/* ============================================
   Talk — Video Call Interface
   Aesthetic: Deep Space Noir
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,300&family=Instrument+Serif:ital@0;1&display=swap');

/* --- Tokens --- */
:root {
  --bg-deep: #0a0a0f;
  --bg-surface: #12121a;
  --bg-elevated: #1a1a26;
  --bg-hover: #222233;
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-focus: rgba(255, 255, 255, 0.12);

  --text-primary: #e8e6e3;
  --text-secondary: rgba(232, 230, 227, 0.55);
  --text-muted: rgba(232, 230, 227, 0.3);

  --accent: #c9a87c;
  --accent-glow: rgba(201, 168, 124, 0.15);
  --accent-hover: #ddbf98;

  --danger: #e05555;
  --danger-glow: rgba(224, 85, 85, 0.2);
  --danger-hover: #e87070;

  --success: #5ec269;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --font-display: 'Instrument Serif', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;

  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* --- Reset --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background: var(--bg-deep);
  color: var(--text-primary);
  overflow: hidden;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input { font-family: inherit; }

/* --- Noise texture overlay --- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
}

/* ============================================
   GATE (invite code screen)
   ============================================ */

.gate {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: #000;
}

.gate-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  max-width: 260px;
  padding: 0 1.5rem;
  animation: fade-in 600ms ease both;
}

.gate-input {
  width: 100%;
  padding: 0.9rem 1rem;
  font-family: var(--font-body);
  font-size: 1rem;
  text-align: center;
  letter-spacing: 0.2em;
  color: var(--text-primary);
  background: transparent;
  border: 1px solid rgba(201, 168, 124, 0.35);
  border-radius: var(--radius-full);
  outline: none;
  transition: border-color var(--transition-smooth);
}

.gate-input::placeholder {
  color: rgba(201, 168, 124, 0.45);
  letter-spacing: 0.1em;
}

.gate-input:focus {
  border-color: var(--accent);
}

.gate-error {
  font-size: 0.75rem;
  color: var(--danger);
  opacity: 0.7;
}

/* ============================================
   LANDING PAGE (after auth)
   ============================================ */

.landing {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem;
  position: relative;
}

.landing-card {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  animation: fade-up 800ms cubic-bezier(0.4, 0, 0.2, 1) both;
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Logo (used in admin) */
.logo-title {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 8vw, 5.5rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--text-primary);
}

.logo-title em {
  font-style: italic;
  color: var(--accent);
}

/* Actions */
.landing-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  width: 100%;
  max-width: 340px;
}

.btn-create {
  width: 100%;
  padding: 1rem 2rem;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--bg-deep);
  background: var(--accent);
  border-radius: var(--radius-full);
  transition: all var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.btn-create::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 50%);
  opacity: 0;
  transition: opacity var(--transition-smooth);
}

.btn-create:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 8px 30px var(--accent-glow);
}

.btn-create:hover::before { opacity: 1; }

.btn-create:active {
  transform: translateY(0);
}


/* ============================================
   ROOM PAGE
   ============================================ */

.room {
  position: relative;
  width: 100%;
  height: 100dvh;
  overflow: hidden;
  background: #000;
}

/* Remote video — fullscreen */
.video-remote-wrap {
  position: absolute;
  inset: 0;
  z-index: 1;
}

#remoteVideo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}

/* Local video — PiP */
.video-local-wrap {
  position: absolute;
  bottom: 100px;
  right: 20px;
  width: 200px;
  aspect-ratio: 16/9;
  border-radius: var(--radius-md);
  overflow: hidden;
  z-index: 10;
  border: 2px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  transition: all var(--transition-smooth);
  cursor: grab;
}

.video-local-wrap:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

/* Camera name label above local video */
.camera-label {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.2rem 0.5rem;
  font-size: 0.65rem;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  border-radius: var(--radius-sm);
  white-space: nowrap;
  pointer-events: none;
  z-index: 3;
  display: none;
}

.camera-label.visible {
  display: block;
}

#localVideo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
  background: var(--bg-surface);
}

/* Camera switch dots */
.camera-dots {
  position: absolute;
  bottom: 6px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 4px;
  z-index: 2;
}

.camera-dots.hidden { display: none; }

.camera-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  transition: all var(--transition-fast);
}

.camera-dot.active {
  background: rgba(255, 255, 255, 0.9);
}

/* Overlay states */
.room-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(20px);
  gap: 1.5rem;
  padding: 2rem;
  text-align: center;
  transition: opacity var(--transition-smooth);
}

.room-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.room-overlay h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 400;
  color: var(--text-primary);
}

.room-overlay p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 400px;
}

/* Waiting animation */
.waiting-dots {
  display: flex;
  gap: 6px;
  justify-content: center;
}

.waiting-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: dot-bounce 1.4s ease-in-out infinite;
}

.waiting-dots span:nth-child(2) { animation-delay: 0.2s; }
.waiting-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dot-bounce {
  0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); }
  40% { opacity: 1; transform: scale(1.2); }
}

/* Invite link box */
.invite-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.8rem 0.6rem 1.2rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  max-width: 420px;
  width: 100%;
}

.invite-box input,
.invite-box .invite-url {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 0.8rem;
  outline: none;
  min-width: 0;
  word-break: break-all;
}

.invite-box .btn-copy-invite {
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-glow);
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.invite-box .btn-copy-invite:hover {
  background: rgba(201, 168, 124, 0.25);
}

/* Status toast */
.status-toast {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-60px);
  z-index: 20;
  padding: 0.6rem 1.4rem;
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--text-primary);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  backdrop-filter: blur(12px);
  opacity: 0;
  transition: all var(--transition-spring);
  pointer-events: none;
  white-space: nowrap;
}

.status-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Peer camera off placeholder */
.peer-avatar {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: none;
  align-items: center;
  justify-content: center;
  background: var(--bg-deep);
}

.peer-avatar.visible {
  display: flex;
}

.peer-avatar-circle {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
}

.peer-avatar-circle svg {
  width: 48px;
  height: 48px;
  color: var(--text-muted);
}

/* Peer mic indicator */
.peer-mic-off {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 15;
  display: none;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.8rem;
  font-size: 0.75rem;
  color: var(--danger);
  background: rgba(224, 85, 85, 0.1);
  border-radius: var(--radius-full);
}

.peer-mic-off.visible {
  display: flex;
}

.peer-mic-off svg {
  width: 14px;
  height: 14px;
}

/* Connection quality indicator */
.connection-info {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 15;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  color: var(--text-secondary);
  opacity: 0;
  transition: opacity var(--transition-smooth);
}

.connection-info.visible {
  opacity: 1;
}

.quality-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
}

.quality-dot.quality-good { background: var(--success); }
.quality-dot.quality-fair { background: #e0a855; }
.quality-dot.quality-poor { background: var(--danger); }

.quality-label {
  font-variant-numeric: tabular-nums;
}

.relay-badge {
  display: none;
  padding: 1px 5px;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--accent);
  background: var(--accent-glow);
  border-radius: var(--radius-sm);
}

.relay-badge.visible {
  display: inline-block;
}

/* ============================================
   TOOLBAR
   ============================================ */

.toolbar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1.25rem 1.5rem;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 100%);
}

.toolbar-btn {
  position: relative;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-fast);
}

.toolbar-btn svg {
  width: 22px;
  height: 22px;
  color: var(--text-primary);
  transition: color var(--transition-fast);
}

.toolbar-btn:hover {
  background: var(--bg-hover);
  border-color: var(--border-focus);
  transform: translateY(-2px);
}

.toolbar-btn:active {
  transform: translateY(0);
}

/* Muted / off state */
.toolbar-btn.muted {
  background: var(--danger);
  border-color: var(--danger);
}

.toolbar-btn.muted:hover {
  background: var(--danger-hover);
  border-color: var(--danger-hover);
}

.toolbar-btn.muted svg {
  color: #fff;
}

/* Active state (e.g., screen share active) */
.toolbar-btn.active {
  background: var(--accent);
  border-color: var(--accent);
}

.toolbar-btn.active svg {
  color: var(--bg-deep);
}

.toolbar-btn.active:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

/* End call button */
.toolbar-btn.btn-end {
  background: var(--danger);
  border-color: var(--danger);
  width: 60px;
  height: 52px;
  border-radius: var(--radius-full);
}

.toolbar-btn.btn-end svg {
  color: #fff;
}

.toolbar-btn.btn-end:hover {
  background: var(--danger-hover);
  border-color: var(--danger-hover);
  box-shadow: 0 4px 20px var(--danger-glow);
}

/* Tooltips */
.toolbar-btn[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  padding: 0.35rem 0.7rem;
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--text-primary);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all var(--transition-fast);
}

.toolbar-btn[data-tooltip]:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 640px) {
  .video-local-wrap {
    width: 100px;
    aspect-ratio: 9/16;
    bottom: 80px;
    right: 12px;
  }

  .toolbar {
    padding: 1rem;
    gap: 0.4rem;
  }

  .toolbar-btn {
    width: 46px;
    height: 46px;
  }

  .toolbar-btn svg {
    width: 20px;
    height: 20px;
  }

  .toolbar-btn.btn-end {
    width: 54px;
    height: 46px;
  }

  .toolbar-btn[data-tooltip]::after {
    display: none;
  }

  /* Hide screen share on mobile */
  #btnScreen { display: none; }

  .invite-box {
    flex-direction: column;
    border-radius: var(--radius-md);
    padding: 0.8rem;
  }

  .invite-box input,
  .invite-box .invite-url {
    text-align: center;
    font-size: 0.75rem;
  }
}


/* ============================================
   INFO BUTTON & MODAL
   ============================================ */

.info-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-style: italic;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  z-index: 10;
}

.info-btn:hover {
  color: var(--text-secondary);
  border-color: var(--border-focus);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  padding: 1.5rem;
}

.modal-card {
  position: relative;
  max-width: 420px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 1.4rem;
  color: var(--text-muted);
  cursor: pointer;
  background: none;
  border: none;
  line-height: 1;
}

.modal-close:hover { color: var(--text-primary); }

.modal-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 400;
  margin-bottom: 0.25rem;
}

.modal-subtitle {
  color: var(--text-secondary);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.modal-body h3 {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
}

.modal-body p {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.modal-body .text-muted {
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* ============================================
   INVITE FORM
   ============================================ */

.invite-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
}

.invite-input {
  width: 100%;
  padding: 0.8rem 1.2rem;
  font-size: 1rem;
  text-align: center;
  letter-spacing: 0.15em;
  color: var(--text-primary);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  outline: none;
  transition: border-color var(--transition-fast);
}

.invite-input:focus {
  border-color: var(--accent);
}

.invite-error {
  font-size: 0.8rem;
  color: var(--danger);
}

/* ============================================
   SLOTS
   ============================================ */

.slots-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-content: center;
}

.slots-panel {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 0.5rem;
}

.slots-room {
  margin-top: 1.5rem;
}

.slot-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--border-subtle);
  background: var(--bg-surface);
  cursor: pointer;
  transition: all var(--transition-fast);
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

.slot-num {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.slot-btn.slot-empty {
  opacity: 0.5;
}

.slot-btn.slot-empty:hover {
  opacity: 0.7;
  border-color: var(--border-focus);
}

.slot-btn.slot-bound {
  border-color: var(--accent);
  background: var(--accent-glow);
}

.slot-btn.slot-bound .slot-num {
  color: var(--accent);
}

.slot-btn.slot-bound:hover {
  background: rgba(201, 168, 124, 0.25);
  transform: translateY(-2px);
}

.slot-btn.slot-current {
  border-color: var(--success);
  background: rgba(94, 194, 105, 0.1);
}

.slot-btn.slot-current .slot-num {
  color: var(--success);
}

/* Long press feedback */
.slot-btn:active {
  transform: scale(0.92);
}

/* Inline info button (next to slots) */
.info-btn-inline {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-style: italic;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.info-btn-inline:hover {
  color: var(--text-secondary);
  border-color: var(--border-focus);
}

/* Invite URL (span instead of input) */
.invite-url {
  flex: 1;
  color: var(--text-secondary);
  font-size: 0.8rem;
  min-width: 0;
  word-break: break-all;
  text-align: center;
}

/* Modal tabs */
.modal-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-tab {
  flex: 1;
  padding: 0.6rem 0;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.modal-tab:hover {
  color: var(--text-secondary);
}

.modal-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.modal-tab-content {
  display: none;
}

.modal-tab-content.active {
  display: block;
}

/* ============================================
   ADMIN PAGE
   ============================================ */

.admin {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.admin-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.admin-badge {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-glow);
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
}

.admin-section {
  margin-bottom: 2rem;
}

.admin-section h2 {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.admin-form {
  display: flex;
  gap: 0.5rem;
  max-width: 400px;
}

.admin-input {
  flex: 1;
  padding: 0.7rem 1rem;
  font-size: 0.85rem;
  color: var(--text-primary);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  outline: none;
}

.admin-input:focus {
  border-color: var(--accent);
}

.admin-table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.admin-table th {
  text-align: left;
  padding: 0.5rem 0.75rem;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
}

.admin-table td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.admin-table tr.row-inactive td {
  opacity: 0.4;
}

.code-value {
  font-family: monospace;
  font-size: 0.85rem;
  color: var(--accent);
  background: var(--accent-glow);
  padding: 0.15rem 0.4rem;
  border-radius: var(--radius-sm);
}

.badge-active {
  font-size: 0.7rem;
  color: var(--success);
}

.badge-inactive {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.admin-btn-toggle {
  padding: 0.3rem 0.6rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.admin-btn-toggle:hover {
  border-color: var(--border-focus);
  color: var(--text-primary);
}

/* ============================================
   UTILITY
   ============================================ */

.hidden { display: none !important; }

/* Fade-in animation for overlays */
.fade-in {
  animation: fade-in 400ms cubic-bezier(0.4, 0, 0.2, 1) both;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
