@import url("https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&family=Sora:wght@500;600;700;800&family=Source+Sans+3:wght@400;500;600;700;800;900&display=swap");

:root {
  color-scheme: dark;
  --sentinel-bg: #051424;
  --sentinel-bg-deep: #010f1f;
  --sentinel-surface: rgba(13, 28, 45, 0.70);
  --sentinel-surface-2: rgba(18, 33, 49, 0.62);
  --sentinel-surface-3: rgba(28, 43, 60, 0.72);
  --sentinel-panel-edge: rgba(138, 235, 255, 0.30);
  --sentinel-stroke: rgba(255, 255, 255, 0.08);
  --sentinel-stroke-soft: rgba(255, 255, 255, 0.05);
  --sentinel-accent: #22d3ee;
  --sentinel-accent-hot: #8aebff;
  --sentinel-accent-dim: rgba(34, 211, 238, 0.11);
  --sentinel-text: #f8fafc;
  --sentinel-on-surface: #d4e4fa;
  --sentinel-muted: rgba(255, 255, 255, 0.50);
  --sentinel-muted-2: rgba(212, 228, 250, 0.38);
  --sentinel-danger: #fb7185;
  --sentinel-warning: #f59e0b;
  --sentinel-success: #22d3ee;
  --sentinel-green: #22c55e;
  --sentinel-radius: 8px;
  --sentinel-blur: 20px;
  --sentinel-glow: 0 0 24px rgba(34, 211, 238, 0.14);
  --sentinel-shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  --sentinel-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sentinel-head: "Sora", "Source Sans 3", system-ui, sans-serif;
  --sentinel-body: "Source Sans 3", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --color-bg: var(--sentinel-bg);
  --color-bg-deep: var(--sentinel-bg-deep);
  --color-surface: var(--sentinel-surface);
  --color-surface-solid: #0d1c2d;
  --color-surface-high: var(--sentinel-surface-3);
  --color-stroke: var(--sentinel-stroke);
  --color-accent: var(--sentinel-accent);
  --color-accent-hover: var(--sentinel-accent-hot);
  --color-text: var(--sentinel-text);
  --color-muted: var(--sentinel-muted);
  --color-muted-2: var(--sentinel-muted-2);
  --color-success: var(--sentinel-green);
  --color-warning: var(--sentinel-warning);
  --color-danger: var(--sentinel-danger);
  --radius-main: var(--sentinel-radius);
  --radius-control: var(--sentinel-radius);
  --radius-panel: var(--sentinel-radius);
  --shadow-panel: var(--sentinel-shadow);
  --blur-panel: var(--sentinel-blur);

  --panel: var(--sentinel-surface);
  --panel2: var(--sentinel-surface-2);
  --panel-2: var(--sentinel-surface-2);
  --stroke: var(--sentinel-stroke);
  --muted: var(--sentinel-muted);
  --muted2: var(--sentinel-muted-2);
  --cta: var(--sentinel-accent);
  --ctaText: var(--sentinel-bg);
  --primary: var(--sentinel-accent-hot);
  --primary-strong: var(--sentinel-accent);
  --primary-ink: var(--sentinel-bg);
  --success: var(--sentinel-success);
  --warning: var(--sentinel-warning);
  --danger: var(--sentinel-danger);
  --radius: var(--sentinel-radius);
}

html {
  background: var(--sentinel-bg);
}

body {
  font-family: var(--sentinel-body) !important;
  color: var(--sentinel-text) !important;
  background:
    radial-gradient(circle at 50% -20%, rgba(34, 211, 238, 0.14), transparent 28rem),
    radial-gradient(circle at 85% 12%, rgba(138, 235, 255, 0.08), transparent 24rem),
    linear-gradient(180deg, #051424 0%, #010f1f 100%) !important;
  background-attachment: fixed !important;
  letter-spacing: 0.01em;
}

body::before {
  content: "" !important;
  position: fixed !important;
  inset: 0 !important;
  z-index: 0 !important;
  pointer-events: none !important;
  background:
    linear-gradient(rgba(138, 235, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(138, 235, 255, 0.045) 1px, transparent 1px),
    radial-gradient(circle at center, transparent 0, rgba(1, 15, 31, 0.40) 72%) !important;
  background-size: 20px 20px, 20px 20px, 100% 100% !important;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.55));
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.025) 0,
    rgba(255, 255, 255, 0.025) 1px,
    transparent 1px,
    transparent 6px
  );
  opacity: 0.18;
}

main,
header,
footer,
.app,
.wrap,
.page-shell,
.shell-root,
.shell-nav,
.shell-menu-fab {
  position: relative;
  z-index: 1;
}

h1,
h2,
h3,
.page-title,
.title,
.brand-title strong,
.brand-title,
.brand-name,
.shell-brand-name,
.card-title,
.section-title,
.headline {
  font-family: var(--sentinel-head) !important;
  color: var(--sentinel-text) !important;
  letter-spacing: -0.02em !important;
}

h1,
.page-title,
.title {
  font-weight: 700 !important;
}

p,
li,
.lead,
.sub,
.subtitle,
.desc,
.meta,
.muted,
.muted2,
.helper,
.small,
.tools-text,
.side-copy,
.brand-kicker,
.brand-title span,
.shell-page-title,
.field-help {
  color: var(--sentinel-muted) !important;
}

.eyebrow,
.side-title,
.tools-label,
.field-label,
.expert-cta-badge,
.badge,
.pill,
.chip,
.tag,
.shell-chip,
.shell-breadcrumb,
.side-count,
.side-booking-status,
.micro-pill {
  font-family: var(--sentinel-mono) !important;
  text-transform: uppercase;
  letter-spacing: 0.08em !important;
}

.eyebrow,
.side-title,
.tools-label,
.field-label {
  color: var(--sentinel-accent-hot) !important;
}

.sentinel-glass,
.glass,
.glass-soft,
.glass-card,
.glass-panel,
.panel,
.card,
.hero,
.hero-card,
.sidebar,
.main.panel,
.main.glass,
.nav-shell,
.topbar,
.popup-card,
.modal-content,
.question-tools,
.question-header,
.question-card,
.progress-wrap,
.intro-shell,
.org-editor,
.metric,
.stat,
.side-link,
.side-booking,
.expert-cta,
.col,
.drop,
.note,
.notePanel,
.shell-topbar,
.shell-dropdown,
.shell-nav,
.shell-context-banner,
.shell-content-cta,
.shell-code-dialog,
.auth-card,
.form-card,
.admin-card,
.empty-state,
.booking-card,
.expert-card {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(13, 28, 45, 0.82), rgba(13, 28, 45, 0.54)) !important;
  border: 1px solid transparent !important;
  border-radius: var(--sentinel-radius) !important;
  box-shadow: var(--sentinel-shadow), inset 0 1px 0 rgba(138, 235, 255, 0.08) !important;
  backdrop-filter: blur(var(--sentinel-blur)) saturate(125%) !important;
  -webkit-backdrop-filter: blur(var(--sentinel-blur)) saturate(125%) !important;
}

.sentinel-glass::before,
.glass::before,
.glass-soft::before,
.glass-card::before,
.panel::before,
.card::before,
.hero::before,
.hero-card::before,
.sidebar::before,
.main.panel::before,
.nav-shell::before,
.question-header::before,
.question-card::before,
.intro-shell::before,
.shell-topbar::before,
.shell-nav::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(138, 235, 255, 0.34), rgba(255, 255, 255, 0.06) 34%, rgba(138, 235, 255, 0.02) 68%, rgba(251, 113, 133, 0.12));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

.sentinel-glass::after,
.glass::after,
.glass-card::after,
.panel::after,
.hero-card::after,
.main.panel::after,
.question-card::after,
.intro-shell::after {
  content: "";
  position: absolute;
  left: -20%;
  right: -20%;
  top: -1px;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.55), transparent);
  opacity: 0.62;
  animation: sentinel-scan 7s linear infinite;
}

@keyframes sentinel-scan {
  0% { transform: translateY(0); opacity: 0; }
  16% { opacity: 0.45; }
  55% { opacity: 0.20; }
  100% { transform: translateY(36rem); opacity: 0; }
}

.glass-soft,
.panel-soft,
.question-tools,
.drop,
.metric,
.stat,
.note,
.notePanel,
.shell-context-banner,
.shell-content-cta {
  background:
    linear-gradient(135deg, rgba(18, 33, 49, 0.68), rgba(18, 33, 49, 0.42)) !important;
}

.topbar,
.site-header {
  background: rgba(5, 20, 36, 0.64) !important;
  border-color: var(--sentinel-stroke-soft) !important;
  backdrop-filter: blur(20px) saturate(130%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(130%) !important;
}

.nav-shell,
.shell-topbar {
  min-height: 62px;
}

.shell-root {
  --topbarH: 62px;
}

.shell-brand,
.brand {
  isolation: isolate;
}

.brand img,
.brand-mark,
.brand-mark img,
.shell-logo {
  border-radius: 8px !important;
  border: 1px solid rgba(138, 235, 255, 0.16) !important;
  background: rgba(1, 15, 31, 0.62) !important;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.03), 0 0 18px rgba(34, 211, 238, 0.08) !important;
}

.btn,
button.btn,
.btn-primary,
.btn-ghost,
.nav-btn,
.tab,
.dashboard-tab,
.side-toggle,
.copy-code-btn,
.k-btn,
.noteBtn,
.shell-menu-btn,
.shell-menu-fab,
.shell-account-btn,
.shell-dd-btn,
.shell-code-btn,
.shell-context-banner button,
.shell-content-cta button,
.pdf-btn,
.toggle-btn,
.back-btn,
.validate-modal,
button[type="submit"] {
  position: relative;
  isolation: isolate;
  min-height: 38px;
  border-radius: var(--sentinel-radius) !important;
  border: 1px solid rgba(138, 235, 255, 0.18) !important;
  background: linear-gradient(180deg, rgba(13, 28, 45, 0.76), rgba(1, 15, 31, 0.62)) !important;
  color: var(--sentinel-on-surface) !important;
  box-shadow: none !important;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
  transition: transform 150ms ease, border-color 150ms ease, background-color 150ms ease, box-shadow 150ms ease, color 150ms ease;
}

.btn:hover,
button.btn:hover,
.btn-primary:hover,
.btn-ghost:hover,
.nav-btn:hover,
.tab:hover,
.dashboard-tab:hover,
.side-toggle:hover,
.copy-code-btn:hover,
.k-btn:hover,
.noteBtn:hover,
.shell-menu-btn:hover,
.shell-menu-fab:hover,
.shell-account-btn:hover,
.shell-dd-btn:hover,
.shell-code-btn:hover,
.pdf-btn:hover,
.toggle-btn:hover,
.back-btn:hover,
.validate-modal:hover {
  transform: translateY(-1px);
  border-color: rgba(34, 211, 238, 0.62) !important;
  background: linear-gradient(180deg, rgba(34, 211, 238, 0.16), rgba(13, 28, 45, 0.80)) !important;
  color: var(--sentinel-text) !important;
  box-shadow: var(--sentinel-glow) !important;
}

.btn.cta,
.btn.primary,
.btn-primary,
.btn-cta,
#login-btn,
#register-btn,
.tab.active,
.dashboard-tab.active,
.shell-code-btn.primary,
.shell-link.active {
  border-color: rgba(34, 211, 238, 0.78) !important;
  background: linear-gradient(180deg, rgba(34, 211, 238, 0.98), rgba(47, 217, 244, 0.78)) !important;
  color: #001f25 !important;
  box-shadow: 0 0 22px rgba(34, 211, 238, 0.18) !important;
}

.btn.danger,
.badge.low,
.tag.danger {
  border-color: rgba(251, 113, 133, 0.52) !important;
  background: rgba(251, 113, 133, 0.12) !important;
  color: #fecdd3 !important;
}

input,
select,
textarea,
.input,
.select,
.input-field,
.shell-code-input,
.shell-org-select {
  border-radius: var(--sentinel-radius) !important;
  border: 1px solid rgba(138, 235, 255, 0.12) !important;
  border-bottom-color: rgba(34, 211, 238, 0.34) !important;
  background: rgba(1, 15, 31, 0.68) !important;
  color: var(--sentinel-text) !important;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02) !important;
}

input:focus,
select:focus,
textarea:focus,
.input:focus,
.select:focus,
.input-field:focus,
.shell-code-input:focus,
.shell-org-select:focus {
  border-color: rgba(34, 211, 238, 0.66) !important;
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12), 0 0 20px rgba(34, 211, 238, 0.10) !important;
  outline: none !important;
}

input::placeholder,
textarea::placeholder {
  color: rgba(212, 228, 250, 0.34) !important;
}

.chip,
.pill,
.badge,
.tag,
.shell-chip,
.shell-breadcrumb,
.side-count,
.side-booking-status,
.micro-pill,
.glass-chip,
.session-chip {
  border: 1px solid rgba(138, 235, 255, 0.14) !important;
  background: rgba(13, 28, 45, 0.54) !important;
  color: rgba(212, 228, 250, 0.78) !important;
  border-radius: 999px !important;
}

.badge.good,
.badge.ok,
.badge.success,
.tag.ok,
.pill.ok,
.side-booking-status.confirmed,
.side-booking-status.in_progress,
.status-pill.success {
  border-color: rgba(34, 211, 238, 0.48) !important;
  background: rgba(34, 211, 238, 0.12) !important;
  color: #cffafe !important;
}

.badge.warn,
.badge.warning,
.tag.warn,
.status-pill.warning,
.side-booking-status.hold {
  border-color: rgba(245, 158, 11, 0.48) !important;
  background: rgba(245, 158, 11, 0.12) !important;
  color: #fde68a !important;
}

.badge.danger,
.status-pill.danger,
.side-booking-status.cancelled,
.side-booking-status.expired {
  border-color: rgba(251, 113, 133, 0.48) !important;
  background: rgba(251, 113, 133, 0.12) !important;
  color: #fecdd3 !important;
}

#answers {
  gap: 12px !important;
}

#answers button,
#answers label,
.answer-btn {
  border-radius: var(--sentinel-radius) !important;
  border: 1px solid rgba(138, 235, 255, 0.18) !important;
  background:
    linear-gradient(90deg, rgba(34, 211, 238, 0.08), transparent 42%),
    rgba(1, 15, 31, 0.52) !important;
  color: var(--sentinel-on-surface) !important;
  box-shadow: inset 3px 0 0 rgba(34, 211, 238, 0.24) !important;
}

#answers button:hover,
#answers label:hover,
.answer-btn:hover {
  border-color: rgba(34, 211, 238, 0.54) !important;
  background:
    linear-gradient(90deg, rgba(34, 211, 238, 0.16), transparent 48%),
    rgba(13, 28, 45, 0.82) !important;
}

.answer-btn.selected {
  border-color: rgba(34, 211, 238, 0.78) !important;
  background:
    linear-gradient(90deg, rgba(34, 211, 238, 0.22), rgba(34, 211, 238, 0.06)),
    rgba(13, 28, 45, 0.88) !important;
  box-shadow: inset 3px 0 0 var(--sentinel-accent), 0 0 18px rgba(34, 211, 238, 0.16) !important;
}

.progress-wrap {
  min-height: 38px;
  display: flex;
  align-items: center;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(138, 235, 255, 0.08) 0 1px,
      transparent 1px 5%
    ),
    rgba(1, 15, 31, 0.62) !important;
}

#progress-background {
  height: 12px !important;
  border-radius: 0 !important;
  border: 1px solid rgba(34, 211, 238, 0.54) !important;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(34, 211, 238, 0.98) 0 13px,
      rgba(34, 211, 238, 0.20) 13px 16px
    ) !important;
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.18) !important;
  transition: width 220ms ease;
}

.meter,
.progress,
.progress-track,
.progress-bar-background {
  border-radius: 999px !important;
  background:
    repeating-linear-gradient(90deg, rgba(138, 235, 255, 0.08) 0 1px, transparent 1px 5%),
    rgba(1, 15, 31, 0.70) !important;
  border: 1px solid rgba(138, 235, 255, 0.10) !important;
}

.meter > span,
.progress-bar,
.progress-fill {
  background:
    repeating-linear-gradient(
      90deg,
      rgba(34, 211, 238, 0.98) 0 12px,
      rgba(34, 211, 238, 0.20) 12px 15px
    ) !important;
}

.status {
  font-family: var(--sentinel-mono) !important;
  border-radius: 6px !important;
  background: rgba(1, 15, 31, 0.62) !important;
  border: 1px solid rgba(138, 235, 255, 0.12) !important;
  color: rgba(212, 228, 250, 0.70) !important;
  box-shadow: none !important;
}

.status.status-yes,
.status-yes {
  border-color: rgba(34, 211, 238, 0.48) !important;
  background: rgba(34, 211, 238, 0.14) !important;
  color: #cffafe !important;
}

.status.status-neutral,
.status-neutral {
  border-color: rgba(188, 199, 222, 0.28) !important;
  background: rgba(188, 199, 222, 0.08) !important;
  color: rgba(212, 228, 250, 0.72) !important;
}

.status.status-other,
.status-other {
  border-color: rgba(251, 113, 133, 0.46) !important;
  background: rgba(251, 113, 133, 0.12) !important;
  color: #fecdd3 !important;
}

.status.status-x,
.status-x,
.status.status-current,
.status-current {
  border-color: rgba(34, 211, 238, 0.62) !important;
  background: rgba(34, 211, 238, 0.18) !important;
  color: #cffafe !important;
}

.status.status-current,
.status-current {
  background: var(--sentinel-accent) !important;
  color: #001f25 !important;
}

.dashboard-tab {
  min-width: 180px;
}

.sidebar.panel {
  top: 16px;
}

.side-link.active,
.card.active {
  border-color: rgba(34, 211, 238, 0.70) !important;
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.22), 0 0 24px rgba(34, 211, 238, 0.10) !important;
}

.kanban {
  gap: 14px !important;
}

.col.todo,
.col.doing,
.col.blocked,
.col.done {
  background:
    linear-gradient(135deg, rgba(13, 28, 45, 0.72), rgba(13, 28, 45, 0.46)) !important;
}

.col.todo { border-color: rgba(251, 113, 133, 0.22) !important; }
.col.doing { border-color: rgba(245, 158, 11, 0.24) !important; }
.col.blocked { border-color: rgba(188, 199, 222, 0.20) !important; }
.col.done { border-color: rgba(34, 211, 238, 0.26) !important; }

table,
thead th,
tbody td {
  border-color: rgba(138, 235, 255, 0.10) !important;
}

thead th {
  font-family: var(--sentinel-mono) !important;
  color: var(--sentinel-accent-hot) !important;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

tbody tr:hover td {
  background: rgba(34, 211, 238, 0.045) !important;
}

.circle {
  border-color: rgba(34, 211, 238, 0.26) !important;
}

.line {
  background: rgba(34, 211, 238, 0.56) !important;
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.16);
}

.text-bg1,
.text-bg2,
.text-bg3,
.text-bg4,
.text-bg5,
.text-bg6,
.text-bg7,
.text-bg8,
.text-bg9,
.text-bg10,
.text-bg11,
.text-bg12 {
  font-family: var(--sentinel-mono) !important;
  border: 1px solid rgba(34, 211, 238, 0.22) !important;
  background: rgba(13, 28, 45, 0.86) !important;
  color: var(--sentinel-text) !important;
  border-radius: var(--sentinel-radius) !important;
}

.score,
.badge-container .score,
#score-percent {
  font-family: var(--sentinel-head) !important;
  color: var(--sentinel-accent-hot) !important;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 899px) {
  body {
    letter-spacing: 0;
  }

  .sentinel-glass,
  .glass,
  .panel,
  .card,
  .hero,
  .hero-card,
  .sidebar,
  .main.panel {
    box-shadow: 0 18px 52px rgba(0, 0, 0, 0.36) !important;
  }

  .dashboard-tab {
    min-width: 0;
  }
}

/* UX fix: remove the moving scan line that could read as a vertical glitch. */
.sentinel-glass::after,
.glass::after,
.glass-card::after,
.panel::after,
.hero-card::after,
.main.panel::after,
.question-card::after,
.intro-shell::after {
  display: none !important;
  animation: none !important;
  content: none !important;
}

/* Dashboard sidebar must scroll even though panels normally hide overflow. */
body:has(.sidebar.panel) .sidebar.panel,
.dashboard-sidebar-scroll,
aside.sidebar.panel {
  overflow-y: auto !important;
  overflow-x: hidden !important;
  max-height: calc(100vh - 32px) !important;
  overscroll-behavior: contain !important;
  scrollbar-gutter: stable !important;
}
