/* AMS Live Demo — premium aviation SaaS shell */
:root {
  --demo-bg: #04080f;
  --demo-surface: #0a1220;
  --demo-surface-2: #101c2e;
  --demo-surface-3: #162436;
  --demo-border: rgba(148, 163, 184, 0.12);
  --demo-text: #f1f5f9;
  --demo-muted: #94a3b8;
  --demo-faint: #64748b;
  --demo-accent: #38bdf8;
  --demo-accent-2: #6366f1;
  --demo-ok: #34d399;
  --demo-warn: #fbbf24;
  --demo-bad: #f87171;
  --demo-sidebar: 240px;
  --demo-font: 'Inter', system-ui, sans-serif;
  --demo-display: 'Plus Jakarta Sans', var(--demo-font);
  --demo-radius: 12px;
  --demo-radius-lg: 16px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body.demo-body {
  font-family: var(--demo-font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--demo-text);
  background: var(--demo-bg);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.demo-hidden { display: none !important; }

/* Welcome */
.demo-welcome {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem;
  background:
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(56, 189, 248, 0.12), transparent),
    radial-gradient(ellipse 40% 30% at 80% 80%, rgba(99, 102, 241, 0.08), transparent),
    var(--demo-bg);
}
.demo-welcome__card {
  max-width: 520px;
  width: 100%;
  text-align: center;
  padding: 3rem 2.5rem;
  background: var(--demo-surface);
  border: 1px solid var(--demo-border);
  border-radius: 24px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.5);
  animation: demo-fade-up 0.6s ease;
}
@keyframes demo-fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.demo-welcome__logo {
  height: auto;
  width: min(280px, 72vw);
  max-height: 320px;
  margin: 0 auto 1.25rem;
  object-fit: contain;
  display: block;
}
.demo-welcome__sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.demo-welcome__badge {
  display: inline-flex;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.12);
  color: var(--demo-accent);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.demo-welcome h1 {
  font-family: var(--demo-display);
  font-size: 1.85rem;
  font-weight: 800;
  margin: 0 0 0.35rem;
  letter-spacing: -0.02em;
}
.demo-welcome__sub {
  color: var(--demo-muted);
  font-size: 0.95rem;
  margin: 0 0 1.25rem;
}
.demo-welcome__lead {
  color: var(--demo-muted);
  font-size: 1rem;
  line-height: 1.65;
  margin: 0 0 2rem;
}
.demo-welcome__note {
  margin-top: 1.25rem;
  font-size: 0.78rem;
  color: var(--demo-faint);
}

/* Shell */
.demo-shell {
  display: grid;
  grid-template-columns: var(--demo-sidebar) 1fr;
  height: 100vh;
  animation: demo-fade-in 0.4s ease;
}
@keyframes demo-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.demo-sidebar {
  background: var(--demo-surface);
  border-right: 1px solid var(--demo-border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.demo-sidebar__brand {
  padding: 1.1rem 1rem;
  border-bottom: 1px solid var(--demo-border);
}
.demo-sidebar__brand img { height: 32px; width: auto; }
.demo-sidebar__org {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--demo-border);
}
.demo-sidebar__org strong {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--demo-text);
}
.demo-sidebar__org span {
  font-size: 0.72rem;
  color: var(--demo-faint);
}
.demo-sidebar__nav {
  flex: 1;
  padding: 0.75rem;
  overflow-y: auto;
}
.demo-nav-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.65rem 0.85rem;
  margin-bottom: 0.2rem;
  border: none;
  border-radius: 10px;
  background: none;
  color: var(--demo-muted);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.demo-nav-link:hover { background: rgba(255,255,255,0.05); color: var(--demo-text); }
.demo-nav-link.is-active {
  background: rgba(56, 189, 248, 0.12);
  color: var(--demo-accent);
  font-weight: 600;
}
.demo-nav-link svg { width: 18px; height: 18px; flex-shrink: 0; opacity: 0.85; }
.demo-sidebar__foot {
  padding: 0.85rem 1rem;
  border-top: 1px solid var(--demo-border);
  font-size: 0.72rem;
  color: var(--demo-faint);
}
.demo-sidebar__foot a { color: var(--demo-accent); text-decoration: none; }

.demo-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}
.demo-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1.25rem;
  background: var(--demo-surface-2);
  border-bottom: 1px solid var(--demo-border);
  flex-shrink: 0;
}
.demo-topbar h1 {
  font-family: var(--demo-display);
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
}
.demo-topbar__actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.demo-guide {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 1.25rem;
  background: linear-gradient(90deg, rgba(56,189,248,0.1), rgba(99,102,241,0.08));
  border-bottom: 1px solid var(--demo-border);
  font-size: 0.82rem;
  color: var(--demo-muted);
  flex-shrink: 0;
}
.demo-guide strong { color: var(--demo-accent); }
.demo-guide__steps { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.demo-guide__step {
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  color: var(--demo-muted);
  font-family: inherit;
}
.demo-guide__step.is-done { color: var(--demo-ok); }
.demo-guide__step.is-current { background: rgba(56,189,248,0.2); color: var(--demo-accent); }

.demo-content {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
}
.demo-content__inner {
  max-width: 1200px;
  margin: 0 auto;
  animation: demo-fade-up 0.35s ease;
}

/* Buttons */
.demo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}
.demo-btn:hover { transform: translateY(-1px); }
.demo-btn--primary {
  background: linear-gradient(135deg, var(--demo-accent), var(--demo-accent-2));
  color: #fff;
  box-shadow: 0 4px 16px rgba(56, 189, 248, 0.3);
}
.demo-btn--ghost {
  background: rgba(255,255,255,0.06);
  color: var(--demo-text);
  border: 1px solid var(--demo-border);
}
.demo-btn--sm { padding: 0.4rem 0.75rem; font-size: 0.78rem; }
.demo-btn--lg { padding: 0.85rem 1.5rem; font-size: 0.95rem; border-radius: 10px; }

/* Stats */
.demo-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.demo-stat {
  padding: 1.15rem 1.25rem;
  background: var(--demo-surface-2);
  border: 1px solid var(--demo-border);
  border-radius: var(--demo-radius-lg);
  transition: border-color 0.2s;
}
.demo-stat:hover { border-color: rgba(56, 189, 248, 0.25); }
.demo-stat__label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--demo-faint);
  margin-bottom: 0.35rem;
}
.demo-stat__value {
  font-family: var(--demo-display);
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.demo-stat__value--ok { color: var(--demo-ok); }
.demo-stat__value--warn { color: var(--demo-warn); }

.demo-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
.demo-card {
  background: var(--demo-surface-2);
  border: 1px solid var(--demo-border);
  border-radius: var(--demo-radius-lg);
  padding: 1.25rem;
}
.demo-card h2 {
  font-family: var(--demo-display);
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 1rem;
}
.demo-list { list-style: none; margin: 0; padding: 0; }
.demo-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--demo-border);
  font-size: 0.85rem;
}
.demo-list li:last-child { border-bottom: none; }
.demo-list__meta { color: var(--demo-faint); font-size: 0.78rem; }

.demo-badge {
  display: inline-flex;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.demo-badge--ok { background: rgba(52, 211, 153, 0.15); color: var(--demo-ok); }
.demo-badge--warn { background: rgba(251, 191, 36, 0.15); color: var(--demo-warn); }
.demo-badge--bad { background: rgba(248, 113, 113, 0.15); color: var(--demo-bad); }
.demo-badge--mx { background: rgba(129, 140, 248, 0.15); color: #a5b4fc; }

/* Fleet table */
.demo-table-wrap { overflow-x: auto; }
.demo-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.demo-table th {
  text-align: left;
  padding: 0.65rem 0.75rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--demo-faint);
  border-bottom: 1px solid var(--demo-border);
}
.demo-table td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--demo-border);
}
.demo-table tr:hover td { background: rgba(255,255,255,0.02); }
.demo-table .demo-link {
  color: var(--demo-accent);
  font-weight: 600;
  font-family: ui-monospace, monospace;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font-size: inherit;
  text-decoration: none;
}
.demo-table .demo-link:hover { text-decoration: underline; }

/* Aircraft profile */
.demo-ac-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.demo-ac-header h1 {
  font-family: ui-monospace, monospace;
  font-size: 1.75rem;
  font-weight: 800;
  margin: 0 0 0.25rem;
}
.demo-ac-header p { margin: 0; color: var(--demo-muted); }
.demo-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--demo-border);
  padding-bottom: 0;
}
.demo-tab {
  padding: 0.65rem 1rem;
  border: none;
  background: none;
  color: var(--demo-muted);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
}
.demo-tab:hover { color: var(--demo-text); }
.demo-tab.is-active {
  color: var(--demo-accent);
  border-bottom-color: var(--demo-accent);
}
.demo-dl {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem 2rem;
}
.demo-dl div { display: flex; flex-direction: column; gap: 0.15rem; }
.demo-dl dt { font-size: 0.72rem; color: var(--demo-faint); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.demo-dl dd { margin: 0; font-weight: 500; }

/* Kanban */
.demo-kanban {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  min-height: 420px;
}
.demo-kanban__col {
  background: var(--demo-surface);
  border: 1px solid var(--demo-border);
  border-radius: var(--demo-radius-lg);
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
}
.demo-kanban__col h3 {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--demo-faint);
  margin: 0 0 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.demo-kanban__count {
  background: rgba(255,255,255,0.08);
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  font-size: 0.68rem;
}
.demo-kanban__cards { flex: 1; display: flex; flex-direction: column; gap: 0.65rem; }
.demo-kanban-card {
  padding: 0.85rem;
  background: var(--demo-surface-2);
  border: 1px solid var(--demo-border);
  border-radius: 10px;
  cursor: grab;
  transition: transform 0.15s, box-shadow 0.15s;
}
.demo-kanban-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  border-color: rgba(56,189,248,0.2);
}
.demo-kanban-card strong { display: block; font-size: 0.88rem; margin-bottom: 0.35rem; }
.demo-kanban-card span { font-size: 0.75rem; color: var(--demo-faint); }

/* AMS Report */
.demo-report-hero {
  padding: 1.75rem;
  border-radius: var(--demo-radius-lg);
  background: linear-gradient(145deg, #002855, #003d7a 50%, #004d99);
  border: 1px solid rgba(56,189,248,0.2);
  margin-bottom: 1.25rem;
}
.demo-report-hero__score {
  font-family: var(--demo-display);
  font-size: 3.5rem;
  font-weight: 900;
  line-height: 1;
  background: linear-gradient(180deg, #fff, #93c5fd);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.demo-report-hero__of { font-size: 1.25rem; color: var(--demo-faint); font-weight: 600; }
.demo-trust-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-top: 1rem;
}
.demo-trust-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.65rem;
  background: rgba(255,255,255,0.06);
  border-radius: 8px;
  font-size: 0.75rem;
}
.demo-trust-item.is-missing { opacity: 0.55; }
.demo-timeline { position: relative; padding-left: 1.5rem; }
.demo-timeline::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 4px;
  bottom: 4px;
  width: 2px;
  background: linear-gradient(180deg, var(--demo-accent), var(--demo-accent-2));
}
.demo-timeline__item {
  position: relative;
  padding-bottom: 1.25rem;
}
.demo-timeline__item::before {
  content: '';
  position: absolute;
  left: -1.5rem;
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--demo-accent);
  box-shadow: 0 0 0 3px rgba(56,189,248,0.25);
}
.demo-timeline__year {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--demo-accent);
  letter-spacing: 0.06em;
}
.demo-timeline__title { font-weight: 700; margin: 0.15rem 0; }
.demo-timeline__detail { font-size: 0.82rem; color: var(--demo-muted); margin: 0; }

/* Modal */
.demo-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  animation: demo-fade-in 0.2s ease;
}
.demo-modal {
  width: min(640px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  background: var(--demo-surface-2);
  border: 1px solid var(--demo-border);
  border-radius: 20px;
  padding: 1.5rem;
  box-shadow: 0 32px 80px rgba(0,0,0,0.5);
}
.demo-modal h2 {
  font-family: var(--demo-display);
  font-size: 1.25rem;
  margin: 0 0 0.5rem;
}
.demo-toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  padding: 0.85rem 1.25rem;
  background: var(--demo-surface-3);
  border: 1px solid var(--demo-border);
  border-radius: 10px;
  font-size: 0.85rem;
  z-index: 1100;
  animation: demo-fade-up 0.3s ease;
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}

.demo-banner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1.25rem;
  background: rgba(251, 191, 36, 0.1);
  border-bottom: 1px solid rgba(251, 191, 36, 0.2);
  font-size: 0.75rem;
  color: var(--demo-warn);
  flex-shrink: 0;
}

@media (max-width: 900px) {
  .demo-shell { grid-template-columns: 1fr; }
  .demo-sidebar { display: none; }
  .demo-stats { grid-template-columns: repeat(2, 1fr); }
  .demo-grid-2, .demo-kanban { grid-template-columns: 1fr; }
  .demo-dl { grid-template-columns: 1fr; }
  .demo-trust-grid { grid-template-columns: 1fr; }
}
