/* @import must be first — browsers silently discard any @import after other rules */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ── Conference Platform — Custom Styles ──────────────────────── */

/* ── Brand + Semantic Color Variables ─────────────────────────── */
:root {
  /* Brand */
  --accent: #6366f1;
  --accent-rgb: 99, 102, 241;
  --brand-secondary: var(--accent);

  /* Surfaces */
  --surface-base:   #f8fafc;
  --surface-card:   #ffffff;
  --surface-subtle: #f1f5f9;
  --surface-header: rgba(255,255,255,0.97);
  --surface-hover:  rgba(0,0,0,0.03);

  /* Borders */
  --border:        #e2e8f0;
  --border-strong: #cbd5e1;
  --border-subtle: #f1f5f9;

  /* Text */
  --text-primary:   #0f172a;
  --text-secondary: #475569;
  --text-muted:     #94a3b8;
  --text-faint:     #cbd5e1;
}

/* ── Dark Mode Overrides ───────────────────────────────────────── */
/* Neutral charcoal palette — no blue tint, more Notion/Apple than GitHub */
html.dark {
  --surface-base:   #111113;
  --surface-card:   #1c1c1f;
  --surface-subtle: #0d0d0f;
  --surface-header: rgba(17,17,19,0.97);
  --surface-hover:  rgba(255,255,255,0.04);

  --border:        rgba(255,255,255,0.09);
  --border-strong: rgba(255,255,255,0.18);
  --border-subtle: rgba(255,255,255,0.04);

  --text-primary:   #f5f5f5;
  --text-secondary: #a1a1aa;
  --text-muted:     #71717a;
  --text-faint:     rgba(255,255,255,0.18);
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  font-feature-settings: 'cv02','cv03','cv04','cv11';
  letter-spacing: -0.011em;
  background: var(--surface-base);
  color: var(--text-primary);
  transition: background 0.2s ease, color 0.2s ease;
}

/* ── Scrollbar ─────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ── Accent utility ────────────────────────────────────────────── */
.bg-accent {
  background-color: var(--accent);
}

.text-accent {
  color: var(--accent);
}

.border-accent {
  border-color: var(--accent);
}

.ring-accent {
  --tw-ring-color: var(--accent);
}

/* ── Card ──────────────────────────────────────────────────────── */
.glass {
  background: var(--surface-card);
  border: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  transition: background 0.2s ease, border-color 0.2s ease;
}

html.dark .glass {
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

/* ── Animated Blobs ────────────────────────────────────────────── */
.blob {
  position: fixed;
  filter: blur(90px);
  z-index: -1;
  opacity: 0.35;
  animation: float 25s infinite ease-in-out alternate;
  border-radius: 50%;
  pointer-events: none;
}

.blob-1 {
  top: -10%;
  left: -10%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.8) 0%, rgba(99, 102, 241, 0) 70%);
  animation-delay: 0s;
}

.blob-2 {
  bottom: -20%;
  right: -10%;
  width: 60vw;
  height: 60vw;
  background: radial-gradient(circle, rgba(236, 72, 153, 0.6) 0%, rgba(236, 72, 153, 0) 70%);
  animation-delay: -5s;
}

.blob-3 {
  top: 40%;
  left: 60%;
  width: 40vw;
  height: 40vw;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.5) 0%, rgba(34, 211, 238, 0) 70%);
  animation-delay: -10s;
}

@keyframes float {
  0% {
    transform: translate(0, 0) scale(1);
  }

  33% {
    transform: translate(8%, 12%) scale(1.1);
  }

  66% {
    transform: translate(-5%, 8%) scale(0.95);
  }

  100% {
    transform: translate(3%, -10%) scale(1);
  }
}

/* ── Slide-over panel ──────────────────────────────────────────── */
.slide-over-enter {
  transform: translateX(100%);
  opacity: 0;
}

.slide-over-enter-active {
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.slide-over-enter-active,
.slide-over-leave {
  transform: translateX(0);
  opacity: 1;
}

.slide-over-leave-active {
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.slide-over-leave-to {
  transform: translateX(100%);
  opacity: 0;
}

/* ── Modal ─────────────────────────────────────────────────────── */
.modal-enter {
  opacity: 0;
  transform: scale(0.95);
}

.modal-enter-active {
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.modal-leave-active {
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.modal-leave-to {
  opacity: 0;
  transform: scale(0.95);
}

/* ── Toast notifications ───────────────────────────────────────── */
.toast {
  animation: slideInRight 0.3s ease forwards;
  background: var(--surface-card) !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--border) !important;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* ── Heatmap bars ──────────────────────────────────────────────── */
.heatmap-bar {
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, #22d3ee, #6366f1, #ec4899);
  transition: width 0.6s ease;
}

/* ── Avatar initials ───────────────────────────────────────────── */
.avatar-initials {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff !important;
  user-select: none;
}

/* ── Tag chip ──────────────────────────────────────────────────── */
.tag-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  background: rgba(var(--accent-rgb), 0.18);
  color: rgba(var(--accent-rgb), 1);
  border: 1px solid rgba(var(--accent-rgb), 0.3);
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
  min-height: 22px;
}

.tag-chip:hover,
.tag-chip.active {
  background: rgba(var(--accent-rgb), 0.35);
  color: #fff;
}

/* ── Session card hover ────────────────────────────────────────── */
.session-card {
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

/* Mobile tap scale feedback */
.session-card:active {
  transform: scale(0.977) !important;
  transition-duration: 0.08s !important;
}

/* ── Bottom sheet drag handle ──────────────────────────────────── */
.sheet-handle {
  width: 44px;
  height: 4px;
  background: var(--border-strong);
  border-radius: 2px;
  margin: 0 auto 1rem;
  flex-shrink: 0;
}

/* ── Sticky time group gradient ────────────────────────────────── */
.time-group-sticky {
  background: linear-gradient(to bottom, var(--surface-base) 75%, transparent);
  transition: background 0.2s ease;
}

/* ── Drag-and-Drop zone styles (builder) ───────────────────────── */
.drop-zone {
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  border: 2px solid transparent;
}

.drop-zone-over {
  background-color: rgba(var(--accent-rgb), 0.07) !important;
  border: 2px dashed rgba(var(--accent-rgb), 0.5) !important;
  box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), 0.1);
}

/* Unassigned sidebar drop target */
.unassigned-drop-over {
  background-color: rgba(var(--accent-rgb), 0.05) !important;
  outline: 2px dashed rgba(var(--accent-rgb), 0.4);
  outline-offset: -4px;
}

/* ── Loading spinner ───────────────────────────────────────────── */
@keyframes spin-cw {
  to { transform: rotate(360deg); }
}

.loading-spin {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin-cw 0.7s linear infinite;
  flex-shrink: 0;
}

/* ── Brand preview card ────────────────────────────────────────── */
.brand-preview-header {
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.12) 0%, rgba(var(--brand-secondary-rgb), 0.08) 100%);
  border: 1px solid rgba(var(--accent-rgb), 0.2);
}

/* ── Demand badge ──────────────────────────────────────────────── */
.demand-low {
  color: #4ade80;
}

.demand-medium {
  color: #fb923c;
}

.demand-high {
  color: #f87171;
}

/* ── Status badge ──────────────────────────────────────────────── */
.status-pending {
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.status-approved {
  background: rgba(74, 222, 128, 0.15);
  color: #4ade80;
  border: 1px solid rgba(74, 222, 128, 0.3);
}

.status-rejected {
  background: rgba(248, 113, 113, 0.15);
  color: #f87171;
  border: 1px solid rgba(248, 113, 113, 0.3);
}

/* ── Print styles ──────────────────────────────────────────────── */
@media print {
  .no-print {
    display: none !important;
  }

  body {
    background: #fff !important;
    color: #000 !important;
  }

  .session-card {
    border: 1px solid #ccc !important;
    break-inside: avoid;
    margin-bottom: 0.5rem;
  }

  .glass {
    background: #fff !important;
    backdrop-filter: none;
    border: 1px solid #ccc;
  }
}

/* ── Focus rings ───────────────────────────────────────────────── */
input:focus,
textarea:focus,
select:focus,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ── Transition helpers used with Alpine x-transition ─────────── */
[x-cloak] {
  display: none !important;
}

/* ────────────────────────────────────────────────────────────────
   LIGHT THEME — only when NOT in dark mode.
   Overrides dark Tailwind utility classes for admin.html and
   builder.html which contain many dark-slate-* classes that
   need flipping. index.html uses CSS variables instead.
──────────────────────────────────────────────────────────────── */

/* Backgrounds */
html:not(.dark) .bg-slate-950 { background-color: #f8fafc !important; }
html:not(.dark) .bg-slate-900 { background-color: #f1f5f9 !important; }
html:not(.dark) .bg-slate-900\/10, html:not(.dark) .bg-slate-900\/20,
html:not(.dark) .bg-slate-900\/30, html:not(.dark) .bg-slate-900\/40,
html:not(.dark) .bg-slate-900\/50, html:not(.dark) .bg-slate-900\/60,
html:not(.dark) .bg-slate-900\/80 { background-color: rgba(241,245,249,0.7) !important; }
html:not(.dark) .bg-slate-800 { background-color: #ffffff !important; }
html:not(.dark) .bg-slate-800\/30, html:not(.dark) .bg-slate-800\/40,
html:not(.dark) .bg-slate-800\/50, html:not(.dark) .bg-slate-800\/60,
html:not(.dark) .bg-slate-800\/80 { background-color: rgba(248,250,252,0.9) !important; }
html:not(.dark) .bg-slate-700 { background-color: #e2e8f0 !important; }
html:not(.dark) .bg-slate-700\/50,
html:not(.dark) .bg-slate-700\/60 { background-color: rgba(226,232,240,0.6) !important; }

/* Text */
html:not(.dark) .text-white   { color: #0f172a !important; }
html:not(.dark) .text-slate-100 { color: #1e293b !important; }
html:not(.dark) .text-slate-200 { color: #334155 !important; }
html:not(.dark) .text-slate-300 { color: #475569 !important; }
html:not(.dark) .text-slate-400 { color: #64748b !important; }
html:not(.dark) .text-slate-500 { color: #94a3b8 !important; }
html:not(.dark) .text-slate-600 { color: #94a3b8 !important; }

/* ── Preserve white text on COLORED (non-neutral) backgrounds ──────
   Applied in ALL modes — white text on accent/colored buttons
   should always be white regardless of light/dark mode.         */
.bg-accent,
.bg-accent.text-white,   .bg-accent .text-white   { color: #ffffff !important; }
.bg-emerald-600.text-white, .bg-emerald-600 .text-white,
.bg-emerald-500.text-white, .bg-emerald-500 .text-white { color: #ffffff !important; }
.bg-red-600.text-white,  .bg-red-600 .text-white,
.bg-red-500.text-white,  .bg-red-500 .text-white  { color: #ffffff !important; }
.bg-amber-500,  .bg-amber-500.text-white,  .bg-amber-500 .text-white  { color: #1c1917 !important; }
.bg-amber-400,  .bg-amber-400.text-white,  .bg-amber-400 .text-white  { color: #1c1917 !important; }

/* Borders */
html:not(.dark) .border-slate-700,
html:not(.dark) .border-slate-700\/50,
html:not(.dark) .border-slate-700\/30 { border-color: #e2e8f0 !important; }
html:not(.dark) .border-slate-600,
html:not(.dark) .border-slate-600\/50 { border-color: #cbd5e1 !important; }
html:not(.dark) .border-slate-800 { border-color: #f1f5f9 !important; }

/* Form inputs */
html:not(.dark) input:not([type="color"]):not([type="radio"]):not([type="checkbox"]),
html:not(.dark) textarea,
html:not(.dark) select {
  background-color: #ffffff !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
}
html:not(.dark) input::placeholder,
html:not(.dark) textarea::placeholder { color: #94a3b8 !important; }

/* Search pill: ensure placeholder + icon visible in both themes */
.search-pill input {
  -webkit-appearance: none;
  appearance: none;
}
.search-pill input::placeholder,
.search-pill input::-webkit-input-placeholder {
  color: var(--text-secondary) !important;
  opacity: 1;
}
html.dark .search-pill input::placeholder,
html.dark .search-pill input::-webkit-input-placeholder {
  color: var(--text-secondary) !important;
}

/* Table rows */
html:not(.dark) tbody tr:hover { background-color: #f8fafc !important; }

/* Heatmap bar container */
html:not(.dark) .bg-slate-800.rounded-full { background-color: #f1f5f9 !important; }

/* Divide lines */
html:not(.dark) .divide-slate-700\/50 > * { border-color: #f1f5f9 !important; }