/* SamaSky design tokens */
:root {
  /* Palette */
  --navy-900: #050f1f;
  --navy-800: #0b2545;
  --navy-700: #133362;
  --navy-600: #1c4584;
  --navy-500: #2960a8;
  --sky-600:  #1f6be0;
  --sky-500:  #3a86ff;
  --sky-400:  #6ba1ff;
  --sky-100:  #e6eeff;
  --sky-50:   #f1f5ff;
  --gold-700: #b5891c;
  --gold-600: #d4a228;
  --gold-500: #e2b23a;
  --gold-200: #f6e3a1;
  --gold-50:  #fdf7e3;

  --ink-900:  #0b1220;
  --ink-800:  #1b2230;
  --ink-700:  #2a3242;
  --ink-600:  #475066;
  --ink-500:  #6a7388;
  --ink-400:  #9099ad;
  --ink-300:  #c1c7d4;
  --ink-200:  #dde1eb;
  --ink-100:  #eef0f6;
  --ink-50:   #f8f9fb;
  --bg:       #f8f9fb;
  --paper:    #ffffff;

  --ok-500:   #2ea36f;
  --warn-500: #d48121;

  /* Type */
  --font-latin: "Inter", ui-sans-serif, system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-arabic: "IBM Plex Sans Arabic", "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Radii */
  --r-xs: 4px;
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 20px;
  --r-pill: 999px;

  /* Shadows */
  --sh-1: 0 1px 2px rgba(11,37,69,0.06), 0 0 0 1px rgba(11,37,69,0.04);
  --sh-2: 0 4px 12px rgba(11,37,69,0.06), 0 1px 2px rgba(11,37,69,0.04);
  --sh-3: 0 12px 32px rgba(11,37,69,0.10), 0 2px 6px rgba(11,37,69,0.05);
  --sh-focus: 0 0 0 3px rgba(58,134,255,0.25);
}

/* Striped placeholder, used wherever real photography belongs.
   Reusable .ph class, plus mono caption.                          */
.ph {
  position: relative;
  background:
    repeating-linear-gradient(135deg,
      rgba(11,37,69,0.06) 0 10px,
      rgba(11,37,69,0.10) 10px 20px);
  color: var(--ink-700);
  overflow: hidden;
  border-radius: var(--r-md);
}
.ph.ph-dark {
  background:
    repeating-linear-gradient(135deg,
      rgba(255,255,255,0.05) 0 10px,
      rgba(255,255,255,0.10) 10px 20px),
    var(--navy-800);
  color: #cfd6e3;
}
.ph-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
  padding: 8px;
  pointer-events: none;
}
.ph-corner {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 6px;
  height: 6px;
  border-top: 1.5px solid currentColor;
  border-left: 1.5px solid currentColor;
  opacity: 0.5;
}
.ph-corner.tr { left: auto; right: 8px; border-left: 0; border-right: 1.5px solid currentColor; }
.ph-corner.bl { top: auto; bottom: 8px; border-top: 0; border-bottom: 1.5px solid currentColor; }
.ph-corner.br { top: auto; bottom: 8px; left: auto; right: 8px;
  border-top: 0; border-left: 0;
  border-bottom: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor; }

/* App-level base — only applies inside .ap-root so it doesn't bleed into the
   canvas chrome.                                                            */
.ap-root, .ap-root * {
  box-sizing: border-box;
}
.ap-root {
  font-family: var(--font-latin);
  color: var(--ink-800);
  background: var(--bg);
  font-feature-settings: "ss01", "cv11";
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.ap-root[dir="rtl"] {
  font-family: var(--font-arabic);
}
.ap-root h1, .ap-root h2, .ap-root h3, .ap-root h4 {
  font-family: inherit;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--navy-800);
  margin: 0;
  text-wrap: balance;
}
.ap-root p { margin: 0; text-wrap: pretty; }
.ap-root button { font: inherit; cursor: pointer; }
.ap-root a { color: inherit; text-decoration: none; }

/* Button system */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: -0.005em;
  transition: background .15s, color .15s, border-color .15s, box-shadow .15s, transform .12s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--navy-800); color: #fff; }
.btn-primary:hover { background: var(--navy-700); }
.btn-accent { background: var(--sky-500); color: #fff; }
.btn-accent:hover { background: var(--sky-600); }
.btn-ghost { background: transparent; color: var(--ink-800); border-color: var(--ink-200); }
.btn-ghost:hover { background: var(--ink-50); border-color: var(--ink-300); }
.btn-gold { background: var(--gold-500); color: var(--navy-900); }
.btn-gold:hover { background: var(--gold-600); }
.btn-sm { height: 36px; padding: 0 14px; font-size: 13px; }
.btn-xs { height: 30px; padding: 0 12px; font-size: 12px; gap: 6px; }

/* Chip / pill */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  border-radius: var(--r-pill);
  background: var(--ink-100);
  color: var(--ink-700);
  font-size: 12px;
  font-weight: 500;
  border: 1px solid transparent;
  transition: background .12s, border-color .12s;
}
.chip.is-active { background: var(--navy-800); color: #fff; }
.chip.is-outline { background: transparent; border-color: var(--ink-200); }
.chip-x {
  display: inline-flex; align-items: center; justify-content: center;
  width: 14px; height: 14px; border-radius: 999px;
  background: rgba(255,255,255,.18); margin-inline-start: 2px;
  font-size: 10px;
}

/* Accreditation badge */
.badge-accr {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 0 8px;
  border-radius: var(--r-sm);
  background: var(--sky-50);
  color: var(--sky-600);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid var(--sky-100);
}
.badge-accr.icao { background: #eaf4ee; color: #1c7a4e; border-color: #c8e6d4; }
.badge-accr.easa { background: var(--sky-50); color: var(--sky-600); border-color: var(--sky-100); }
.badge-accr.faa { background: #fbf1de; color: #8a6712; border-color: #f1deaa; }
.badge-accr.gaca, .badge-accr.gcaa { background: #f3eefd; color: #6b3fb5; border-color: #ddd0f3; }

/* Cards */
.card {
  background: var(--paper);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
  border: 1px solid var(--ink-100);
  overflow: hidden;
}
.card:hover { box-shadow: var(--sh-2); }

/* Input */
.input {
  height: 44px;
  border-radius: var(--r-md);
  border: 1px solid var(--ink-200);
  background: var(--paper);
  padding: 0 14px;
  font-size: 14px;
  color: var(--ink-800);
  width: 100%;
  transition: border-color .12s, box-shadow .12s;
}
.input:focus { outline: 0; border-color: var(--sky-500); box-shadow: var(--sh-focus); }

/* Tab underline animation */
.tab {
  position: relative;
  padding: 14px 0;
  color: var(--ink-600);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: color .15s;
}
.tab.is-active { color: var(--navy-800); }
.tab.is-active::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: -1px;
  height: 2px;
  background: var(--navy-800);
  border-radius: 2px;
}

/* Subtle elevation hover */
.lift { transition: transform .18s ease, box-shadow .18s ease; }
.lift:hover { transform: translateY(-2px); box-shadow: var(--sh-3); }

/* Scroll containers inside artboards: keep clean, no native bar */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { scrollbar-width: none; }

/* Count-up text */
@keyframes countpop {
  0% { transform: translateY(8px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}
.count-pop { animation: countpop .6s cubic-bezier(.2,.7,.3,1) both; }
