/* Real Cargo — ortak stil. Renkler token olarak tanımlı; açık/koyu tema aynı rollerle çalışır. */
:root {
  color-scheme: light;
  --bg: #f6f5fb;
  --surface: #ffffff;
  --surface-2: #f9f8fd;
  --border: #e6e3f0;
  --text: #1e1b3a;
  --text-2: #55516f;
  --muted: #8e8aa8;
  --primary: #6a4cf5;          /* menekşe */
  --primary-hover: #5636e0;
  --primary-soft: #f1edff;
  --on-primary: #ffffff;
  --accent: #e2468e;           /* pembe */
  --accent-soft: #fde8f2;
  --grad: linear-gradient(135deg, #6a4cf5 0%, #a64bdc 55%, #e2468e 100%);
  --glass: rgba(255, 255, 255, .84);
  --nav-border: rgba(30, 27, 58, .12);
  --dock-shadow: 0 12px 40px rgba(30, 27, 58, .14), 0 2px 8px rgba(30, 27, 58, .08);
  --good: #0b8a3e;     --good-bg: #e3f6ea;
  --warn: #9a6200;     --warn-bg: #fff3d6;
  --bad: #c0362c;      --bad-bg: #fde6e4;
  --info: #1f5fbf;     --info-bg: #e6efff;
  --neutral: #52606d;  --neutral-bg: #eef1f5;
  --series-1: #2a78d6; --series-2: #eb6834; --series-3: #1baf7a; --series-4: #eda100;
  --grid: #e1e0d9;
  --shadow: 0 1px 2px rgba(30, 27, 58, .05), 0 2px 8px rgba(30, 27, 58, .04);
  --radius: 10px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: "Nunito Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 14px; line-height: 1.45;
  background: var(--bg); color: var(--text);
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
h1 { font-size: 22px; }
h2 { font-size: 16px; }
h3 { font-size: 14px; }
[hidden] { display: none !important; }
svg.i { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* ---------- Kabuk ----------
 * Menü iki düzende çalışır: data-nav="bottom" (yüzen alt menü, varsayılan) ve
 * data-nav="side" (ikonlara daralan sol menü; data-expanded ile başlıklar açılır).
 * Telefonda her zaman alt menü. */
.shell { min-height: 100vh; }
.shell.booting * { transition: none !important; }
.main { min-width: 0; display: flex; flex-direction: column; }

.dock { display: flex; align-items: center; gap: 6px; z-index: 30; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-size: 16px; text-decoration: none; flex-shrink: 0; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 32px; height: 32px; flex: none; }
.brand-mark svg { width: 100%; height: 100%; display: block; }
.brand .wm { font-weight: 400; letter-spacing: -.2px; color: var(--text-2); }
.brand .wm b { font-weight: 800; color: var(--text); }
.brand small { display: block; font-weight: 400; font-size: 11px; color: var(--muted); }
.dock-items, .dock-foot { display: flex; align-items: center; gap: 2px; }

.nav-btn {
  position: relative; display: flex; align-items: center;
  padding: 10px 12px; border: 0; border-radius: 22px; background: none;
  color: var(--text-2); font: inherit; font-weight: 600; font-size: 14px; white-space: nowrap;
  text-decoration: none; cursor: pointer; transition: color .16s, background .16s;
}
.nav-btn:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.nav-btn[aria-current="page"] { color: var(--primary); }
.nav-btn svg.i { width: 24px; height: 24px; stroke-width: 1.8; }
.nav-btn .ico { position: relative; display: grid; place-items: center; flex: none; }
.nav-btn .cnt {
  position: absolute; top: -7px; right: -10px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--grad); color: #fff; font-size: 10.5px; font-weight: 700;
  line-height: 18px; text-align: center; box-shadow: 0 0 0 2px var(--surface);
}
.nav-btn .tag { font-size: 10px; border: 1px solid currentColor; border-radius: 4px; padding: 0 5px; opacity: .8; }
/* Başlık 0fr → 1fr ile akıcı açılır (Vortex alt menüsü gibi) */
.nav-label {
  display: inline-grid; grid-template-columns: 0fr; opacity: 0; margin-left: 0;
  transition: grid-template-columns .26s cubic-bezier(.4,0,.2,1), opacity .2s ease, margin-left .26s cubic-bezier(.4,0,.2,1);
}
.nav-label > span { overflow: hidden; white-space: nowrap; min-width: 0; line-height: 1.2; display: flex; align-items: center; gap: 6px; }
.nav-divider { flex-shrink: 0; background: var(--border); }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 700; font-size: 12px; }

/* Profil menüsü */
.profile-wrap { position: relative; }
.profile-menu {
  position: absolute; min-width: 230px; padding: 6px; z-index: 40;
  display: flex; flex-direction: column; gap: 2px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  box-shadow: var(--dock-shadow); animation: pop .16s ease;
}
.profile-head { padding: 10px 12px 8px; display: flex; flex-direction: column; }
.profile-head span { font-size: 12px; color: var(--muted); }
.profile-sec { padding: 8px 12px 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); border-top: 1px solid var(--border); margin-top: 2px; }
.profile-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 0; border-radius: 10px;
  background: none; color: var(--text-2); font: inherit; font-weight: 600; text-align: left; cursor: pointer;
}
.profile-item:hover { background: var(--surface-2); color: var(--text); }
.profile-item .chk { margin-left: auto; color: var(--primary); visibility: hidden; }
.profile-item[aria-checked="true"] { color: var(--primary); }
.profile-item[aria-checked="true"] .chk { visibility: visible; }
.profile-foot { padding: 8px 12px 6px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--border); margin-top: 2px; }
@keyframes pop { from { opacity: 0; transform: translateY(6px); } }

/* Alt menü */
.shell[data-nav="bottom"] .dock {
  position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%);
  width: max-content; max-width: calc(100vw - 24px); padding: 8px 10px; border-radius: 32px;
  background: var(--glass); border: 1px solid var(--nav-border); box-shadow: var(--dock-shadow);
  backdrop-filter: blur(20px) saturate(160%); -webkit-backdrop-filter: blur(20px) saturate(160%);
}
.shell[data-nav="bottom"] .brand { padding: 0 10px 0 4px; }
.shell[data-nav="bottom"] .brand small { display: none; }
.shell[data-nav="bottom"] .nav-divider { width: 1px; height: 26px; margin: 0 4px; }
.shell[data-nav="bottom"] .nav-btn[aria-current="page"] .nav-label { grid-template-columns: 1fr; opacity: 1; margin-left: 8px; }
.shell[data-nav="bottom"] .rail-toggle { display: none; }
.shell[data-nav="bottom"] .profile-btn { padding: 7px; }
.shell[data-nav="bottom"] .profile-menu { right: 0; bottom: calc(100% + 14px); }
.shell[data-nav="bottom"] .page { padding-bottom: 40px; }
.shell[data-nav="bottom"] ~ .toast-host { bottom: 100px; }

/* Kullanılmayan alt menü aşağı kayar, %70'i gizlenir (16px alt boşluk da kapanır) */
.shell[data-nav="bottom"] .dock { --dock-x: -50%; transform: translate(var(--dock-x), calc(70% + 16px)); transition: transform .25s ease; }
.shell[data-nav="bottom"] .dock:hover,
.shell[data-nav="bottom"] .dock:has(:focus-visible),
.shell[data-nav="bottom"] .dock.held,
.shell[data-nav="bottom"] .dock.revealed { transform: translate(var(--dock-x), 0); }
/* Menü yukarı kalkınca altındaki boşlukta fare kaybolmasın */
.shell[data-nav="bottom"] .dock::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 20px; }
@media (prefers-reduced-motion: reduce) { .shell[data-nav="bottom"] .dock { transition: none; } }

/* Sol menü */
.shell[data-nav="side"] { display: grid; grid-template-columns: 80px minmax(0, 1fr); }
.shell[data-nav="side"][data-expanded] { grid-template-columns: 240px minmax(0, 1fr); }
.shell[data-nav="side"] .dock {
  position: sticky; top: 0; height: 100vh; flex-direction: column; align-items: stretch; gap: 4px;
  padding: 14px 12px; background: var(--surface); border-right: 1px solid var(--border);
}
.shell[data-nav="side"] .brand { padding: 4px 12px 16px; }
.shell[data-nav="side"] .brand-text { display: none; }
.shell[data-nav="side"][data-expanded] .brand-text { display: block; }
.shell[data-nav="side"] .dock-items, .shell[data-nav="side"] .dock-foot { flex-direction: column; align-items: stretch; }
.shell[data-nav="side"] .dock-foot { margin-top: auto; }
.shell[data-nav="side"] .nav-divider { height: 1px; margin: 8px 6px; }
.shell[data-nav="side"] .nav-btn { padding: 12px 16px; border-radius: 12px; }
.shell[data-nav="side"] .nav-btn[aria-current="page"] { background: var(--primary-soft); }
.shell[data-nav="side"][data-expanded] .nav-label { grid-template-columns: 1fr; opacity: 1; margin-left: 12px; }
.shell[data-nav="side"] .profile-btn { padding: 9px 13px; }
.shell[data-nav="side"] .profile-menu { left: calc(100% + 10px); bottom: 0; }
.shell[data-nav="side"] .rail-toggle svg { transform: rotate(180deg); transition: transform .2s; }
.shell[data-nav="side"][data-expanded] .rail-toggle svg { transform: none; }

.topbar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: 12px; height: 60px; padding: 0 24px;
  background: var(--surface); border-bottom: 1px solid var(--border);
}
.global-search { flex: 1; max-width: 460px; position: relative; }
.global-search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.global-search input { padding-left: 36px; }
.topbar .spacer { flex: 1; }
/* Yaklaşan uçuşlar */
.flights { position: relative; display: flex; gap: 8px; flex-shrink: 0; }
.flight-chip {
  display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 8px 0 12px;
  border: 1px solid var(--border); border-radius: 12px; background: var(--surface);
  color: var(--text); font: inherit; text-align: left; cursor: pointer;
}
.flight-chip:hover { background: var(--surface-2); }
.flight-chip > svg.i { width: 22px; height: 22px; color: var(--primary); }
.fc-main { display: flex; flex-direction: column; line-height: 1.2; }
.fc-main b { font-size: 13px; white-space: nowrap; }
.fc-sub { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.fc-cd { padding: 3px 8px; border-radius: 8px; background: var(--primary-soft); color: var(--primary); font-size: 12px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.fc-cd.soon { background: var(--accent-soft); color: var(--accent); }
.flights-pop {
  position: absolute; right: 0; top: calc(100% + 10px); width: 400px; max-width: calc(100vw - 32px); z-index: 40;
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--dock-shadow);
  padding: 6px; animation: pop .16s ease;
}
.fp-head { padding: 10px 12px 8px; display: flex; flex-direction: column; }
.fp-head span, .fp-foot { font-size: 12px; color: var(--muted); }
.fp-row { display: grid; grid-template-columns: 82px 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 10px; color: var(--text); text-decoration: none; }
.fp-row:hover { background: var(--surface-2); text-decoration: none; }
.fp-date { display: flex; flex-direction: column; font-size: 12px; color: var(--text-2); }
.fp-date b { font-size: 14px; color: var(--text); }
.fp-info { display: flex; flex-direction: column; font-size: 13px; font-weight: 600; min-width: 0; }
.fp-cut { font-size: 12px; font-weight: 400; color: var(--muted); }
.fp-cut em { font-style: normal; color: var(--warn); font-weight: 600; }
.fp-foot { padding: 8px 12px 6px; border-top: 1px solid var(--border); margin-top: 4px; }
@media (max-width: 1280px) { .flight-chip.second { display: none; } }

.page { padding: 24px; max-width: 1760px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head p { margin: 4px 0 0; color: var(--text-2); }
.crumbs { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Bileşenler ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px;
  border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; text-decoration: none;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn.primary { background: var(--grad); border-color: transparent; color: var(--on-primary); }
.btn.primary:hover { background: var(--grad); filter: brightness(.93); }
.btn.danger { color: var(--bad); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; }
.btn.icon-only { width: 36px; padding: 0; justify-content: center; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.card-head p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.card-body { padding: 18px; }
.card + .card, .stack > * + * { margin-top: 16px; }
.grid > .card { margin-top: 0; }

.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.side { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }

.kpi { padding: 16px 18px; }
.kpi .label { color: var(--text-2); font-size: 13px; }
.kpi .value { font-size: 26px; font-weight: 700; margin-top: 4px; }
.kpi .sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.delta-up { color: var(--good); font-weight: 600; }
.delta-down { color: var(--bad); font-weight: 600; }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.good { color: var(--good); background: var(--good-bg); }
.badge.warn { color: var(--warn); background: var(--warn-bg); }
.badge.bad { color: var(--bad); background: var(--bad-bg); }
.badge.info { color: var(--info); background: var(--info-bg); }
.badge.accent { color: var(--primary); background: var(--primary-soft); }
.badge.neutral { color: var(--neutral); background: var(--neutral-bg); }
.pill { display: inline-block; padding: 1px 8px; border-radius: 6px; background: var(--neutral-bg); color: var(--text-2); font-size: 12px; font-weight: 600; }

/* Tablo */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: separate; border-spacing: 0; font-variant-numeric: tabular-nums; } /* sabit hücreler kendi çizgisini taşısın */
table.data th, table.data td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.data th { font-size: 12px; font-weight: 700; color: var(--text-2); background: var(--surface-2); position: sticky; top: 0; z-index: 2; }
.table-wrap.fit tfoot td { position: sticky; bottom: 0; z-index: 2; }
.table-wrap.capped, details.pieces .table-wrap { max-height: 380px; overflow-y: auto; }
.table-wrap.fit { overflow-y: auto; }
/* Yatay kayan listelerde ilk sütun sabit. Sabit hücre kendi zeminini ve çizgisini taşır, kayan satırlar altından geçer. */
:is(.fit, .capped, .freeze) > table.data tr > :first-child { position: sticky; left: 0; border-right: 1px solid var(--border); }
:is(.fit, .capped, .freeze) > table.data tbody td:first-child { z-index: 1; background: var(--surface); }
:is(.fit, .capped, .freeze) > table.data tbody tr:hover td:first-child { background: var(--surface-2); }
:is(.fit, .capped, .freeze) > table.data thead tr > :first-child { z-index: 4; }
:is(.fit, .capped, .freeze) > table.data tfoot tr > :first-child { z-index: 3; }
:is(.fit, .capped, .freeze) > table.data thead tr:nth-child(2) > :first-child { position: sticky; left: auto; border-right: 0; z-index: 2; }
/* İki satırlı başlıkta alt satır üsttekinin altında durur */
table.data thead tr:nth-child(2) th { top: 39px; }
.lazy-status { padding: 8px 18px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--border); }
table.data td.num, table.data th.num { text-align: right; }
table.data tbody tr:hover { background: var(--surface-2); }
table.data tbody tr.clickable { cursor: pointer; }
table.data tfoot td { font-weight: 700; background: var(--surface-2); }
table.data .muted { color: var(--muted); }
table.data input[type="number"] { width: 84px; }
.empty { padding: 32px; text-align: center; color: var(--muted); }

/* Filtre şeridi */
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 12px 18px; border-bottom: 1px solid var(--border); }
.toolbar .field { min-width: 160px; }
.toolbar .grow { flex: 1; min-width: 200px; }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.seg button { border: 0; background: var(--surface); color: var(--text-2); font: inherit; font-weight: 600; padding: 7px 12px; cursor: pointer; }
.seg button + button { border-left: 1px solid var(--border); }
.seg button[aria-pressed="true"] { background: var(--primary-soft); color: var(--primary); }

/* Form */
.form-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid .span-2 { grid-column: span 2; }
.form-grid .span-4 { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > span { font-size: 12px; font-weight: 600; color: var(--text-2); }
.field .hint { font-size: 11px; color: var(--muted); font-weight: 400; }
input, select, textarea {
  font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; height: 36px; width: 100%;
}
textarea { height: auto; min-height: 72px; resize: vertical; }
input[type="checkbox"], input[type="radio"] { width: 16px; height: 16px; padding: 0; accent-color: var(--primary); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--primary-soft); border-color: var(--primary); }
input[readonly], input:disabled, select:disabled { background: var(--surface-2); }
input:disabled, select:disabled { color: var(--text-2); opacity: 1; cursor: not-allowed; }
.orig-h { margin-left: 4px; font-size: 12px; color: var(--muted); }
.check { display: flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; }
.check input { width: 16px; height: 16px; }
.input-suffix { position: relative; }
.input-suffix input { padding-right: 46px; }
.input-suffix em { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-style: normal; font-size: 12px; color: var(--muted); }

/* Anahtar-değer listesi */
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.kv .total { border-top: 1px solid var(--border); padding-top: 8px; font-size: 16px; }
.kv .sep { grid-column: 1 / -1; border-top: 1px dashed var(--border); }

/* Uyarı kutusu */
.note { display: flex; gap: 10px; padding: 12px 14px; border-radius: 8px; background: var(--info-bg); color: var(--text); font-size: 13px; }
.note svg { color: var(--info); margin-top: 1px; }
.note.warn { background: var(--warn-bg); }
.note.warn svg { color: var(--warn); }

/* Zaman çizelgesi */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 16px 22px; }
.timeline li::before { content: ""; position: absolute; left: 5px; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.timeline li::after { content: ""; position: absolute; left: 8px; top: 18px; bottom: 0; width: 2px; background: var(--border); }
.timeline li:last-child::after { display: none; }
.timeline .when { font-size: 12px; color: var(--muted); }
.timeline .src { margin-left: 6px; }

/* Tekliflendirilen / Gerçekleşen bantları */
.band { overflow: hidden; }
.band-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 18px; }
.band-head p { margin: 2px 0 0; font-size: 12px; color: var(--text-2); }
.band.quoted .band-head { background: var(--primary-soft); }
.band.quoted .band-head h2 { color: var(--primary); }
.band.actual .band-head { background: var(--accent-soft); }
.band.actual .band-head h2 { color: var(--accent); }
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); border-bottom: 1px solid var(--border); }
.metric { display: flex; flex-direction: column; padding: 12px 18px; font-variant-numeric: tabular-nums; }
.metric .l { font-size: 12px; color: var(--muted); }
.metric b { font-size: 16px; }
.metric .d { font-size: 12px; color: var(--text-2); }
.pieces > summary { padding: 10px 18px; font-size: 13px; font-weight: 600; color: var(--text-2); cursor: pointer; }
.pieces[open] > summary { border-bottom: 1px solid var(--border); }
table.data th.band-col { text-align: center; }
table.data th.band-col.quoted { background: var(--primary-soft); color: var(--primary); }
table.data th.band-col.actual { background: var(--accent-soft); color: var(--accent); }

/* Teklif ve rezervasyon detay başlığı */
#actions { gap: 4px; }
#actions .btn { height: 32px; padding: 0 7px; gap: 4px; font-size: 13px; }
#actions .btn.icon-only { width: 32px; padding: 0; }
#actions svg.i { width: 16px; height: 16px; }
.detail-head p { margin: 4px 0 0; color: var(--text-2); }
.detail-title { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
#statusBadge .badge { padding: 6px 14px; font-size: 15px; font-weight: 700; }
#statusBadge .badge::before { width: 8px; height: 8px; }

/* Statü zaman çizelgesi */
.st-line { list-style: none; margin: 0; padding: 0; }
.st-line li.st-group { display: block; padding: 0 0 8px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.st-line li.st-group::before, .st-line li.st-group::after { display: none; }
.st-line li.st-group:not(:first-child) { margin-top: 2px; padding-top: 8px; border-top: 1px solid var(--border); }
.st-line li { position: relative; display: flex; justify-content: space-between; gap: 12px; padding: 0 0 12px 22px; font-size: 13px; }
.st-line li:last-child { padding-bottom: 0; }
.st-line li::before { content: ""; position: absolute; left: 3px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--primary); }
.st-line li:not(:last-child)::after { content: ""; position: absolute; left: 7px; top: 15px; bottom: -5px; width: 2px; background: var(--primary-soft); }
.st-line b { font-weight: 600; }
.st-line span { flex: none; font-size: 12px; color: var(--muted); }
.st-line .current b { font-weight: 800; color: var(--primary); }
.st-line .current::before { left: 1px; top: 3px; width: 14px; height: 14px; box-shadow: 0 0 0 3px var(--primary-soft); }
.st-line .next b { font-weight: 400; color: var(--muted); }
.st-line .next::before { background: var(--surface); border: 2px solid var(--border); }
.st-line .next::after { background: var(--border) !important; }

/* Statü filtresi */
.status-filter { position: relative; }
.sf-panel { position: absolute; left: 0; top: calc(100% + 6px); z-index: 40; width: 320px; max-width: calc(100vw - 32px); display: flex; flex-direction: column; gap: 2px; padding: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--dock-shadow); }
.sf-actions { display: flex; flex-wrap: wrap; gap: 4px; padding: 0 2px 8px; margin-bottom: 4px; border-bottom: 1px solid var(--border); }
.sf-item { padding: 6px 8px; border-radius: 8px; font-weight: 400; }
.sf-item:hover { background: var(--surface-2); }
.sf-count { margin-left: auto; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* Rezervasyon evrak bilgileri */
.flags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.flag { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px 5px 9px; border-radius: 999px; color: #fff; font-size: 13px; font-weight: 700; white-space: nowrap; }
.flag svg.i { width: 16px; height: 16px; stroke-width: 2.6; }
.flag.on { background: #0b8a3e; }
.flag.off { background: #d92d20; }
.flags.sm { gap: 4px; margin-top: 5px; }
.flag.sm { gap: 3px; padding: 2px 8px 2px 5px; font-size: 11.5px; }
.flag.sm svg.i { width: 13px; height: 13px; }

/* Kalem özel kodları */
table.pieces input[type="number"], table.measure input[type="number"] { appearance: textfield; -moz-appearance: textfield; }
table.pieces input[type="number"]::-webkit-inner-spin-button, table.measure input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
table.data td.codes { white-space: normal; min-width: 72px; max-width: 150px; }
.code-menu { position: fixed; z-index: 60; width: 500px; max-width: calc(100vw - 16px); max-height: calc(100vh - 16px); overflow-y: auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px; padding: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--dock-shadow); }
.code-menu-head { grid-column: 1 / -1; padding: 6px 8px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.code-menu .check { padding: 6px 8px; border-radius: 8px; font-weight: 600; }
.code-menu .check:hover { background: var(--surface-2); }

/* Uçuş segmentleri */
.route { display: flex; flex-direction: column; gap: 10px; }
.leg { display: grid; grid-template-columns: 90px 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); }
.leg .flight { font-weight: 700; }
.leg .path { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.leg .path .line { flex: 1; height: 2px; background: var(--border); position: relative; }
.leg .when { text-align: right; font-size: 13px; }
.leg .when s { color: var(--muted); font-size: 12px; }

/* Sekmeler */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); padding: 0 18px; overflow-x: auto; }
.tabs button { border: 0; background: transparent; font: inherit; font-weight: 600; color: var(--text-2); padding: 12px 10px; border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap; }
.tabs button[aria-selected="true"] { color: var(--primary); border-bottom-color: var(--primary); }

/* Dosya alanı */
.drop { display: block; border: 2px dashed var(--border); border-radius: 10px; padding: 18px; text-align: center; color: var(--text-2); cursor: pointer; }
.drop:hover, .drop.over { border-color: var(--primary); background: var(--primary-soft); }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin-top: 12px; }
.thumb { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--surface-2); font-size: 12px; }
.thumb img, .thumb .ph { width: 100%; height: 84px; object-fit: cover; display: grid; place-items: center; color: var(--muted); }
.thumb div:last-child { padding: 6px 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Diyalog ve bildirim */
dialog { border: 1px solid var(--border); border-radius: 12px; padding: 0; background: var(--surface); color: var(--text); width: min(560px, calc(100vw - 32px)); box-shadow: 0 20px 50px rgba(0,0,0,.25); }
dialog::backdrop { background: rgba(10, 20, 35, .45); }
dialog header, dialog footer { padding: 14px 18px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
dialog header { border-bottom: 1px solid var(--border); }
dialog footer { border-top: 1px solid var(--border); justify-content: flex-end; }
dialog .body { padding: 18px; }
.toast-host { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 50; }
.toast { background: var(--text); color: var(--surface); padding: 10px 14px; border-radius: 8px; box-shadow: var(--shadow); font-weight: 600; animation: toast-in .2s ease-out; }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } }

/* Grafik */
.chart { position: relative; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .gridline { stroke: var(--grid); stroke-width: 1; }
.chart .axis { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart .hit { fill: transparent; cursor: default; }
.chart .hit:hover { fill: var(--text); fill-opacity: .04; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--text-2); margin-bottom: 10px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.tooltip { position: absolute; pointer-events: none; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; font-size: 12px; box-shadow: 0 6px 20px rgba(0,0,0,.12); white-space: nowrap; z-index: 3; }
.tooltip > b { display: block; margin-bottom: 4px; }
.tooltip .r { display: flex; align-items: center; gap: 6px; justify-content: space-between; }
.tooltip .r span { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); }
.tooltip i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.hbar { display: grid; grid-template-columns: 160px 1fr 80px; align-items: center; gap: 10px; padding: 5px 0; font-size: 13px; }
.hbar .track { height: 14px; }
.hbar .fill { height: 14px; border-radius: 0 4px 4px 0; background: var(--primary); min-width: 2px; }
.hbar .val { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.hbar .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Duyarlı ---------- */
@media (max-width: 1100px) {
  .grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.side { grid-template-columns: minmax(0, 1fr); }
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  /* Telefonda alt menü kenardan kenara; yalnız ikonlar, eşit dağılım */
  .shell[data-nav="bottom"] .dock { --dock-x: 0; left: 12px; right: 12px; width: auto; max-width: none; gap: 0; padding: 6px; }
  .shell .brand, .shell .nav-divider { display: none; }
  .shell .dock-items { flex: 1; justify-content: space-around; }
  .shell[data-nav="bottom"] .nav-btn[aria-current="page"] .nav-label { display: none; }
  .shell .nav-btn { padding: 10px 6px; }
  .shell .nav-btn svg.i { width: 22px; height: 22px; }
  .shell[data-nav="bottom"] .profile-btn { padding: 7px; }
  .shell [data-nav="side"] { display: none; }
  .topbar { padding: 0 16px; }
  .page { padding: 16px; }
  .grid.cols-2, .grid.cols-3 { grid-template-columns: 1fr; }
  .fc-sub { display: none; }
}
@media (max-width: 560px) {
  .code-menu { grid-template-columns: 1fr; }
  .flight-chip { padding: 0 6px 0 10px; gap: 8px; }
  .flight-chip .fc-main { display: none; }
  .topbar .spacer { display: none; }
  .grid.cols-4, .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: auto; }
  .leg { grid-template-columns: 1fr; }
  .leg .when { text-align: left; }
  .hbar { grid-template-columns: 100px 1fr 64px; }
}
@media print {
  .dock, .topbar, .actions, .toolbar { display: none !important; }
  .shell { display: block; }
}

/* Yazılımda eklenenler */
.profile-defs { max-height: 240px; overflow-y: auto; }
.profile-item { text-decoration: none; color: inherit; width: 100%; }
.profile-menu form { margin: 0; }
.archived-note { font-size: 12px; }
tr.clickable { cursor: pointer; }
.check-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.days { display: flex; flex-wrap: wrap; gap: 10px; }
.inactive td { color: var(--muted); }
.seg .seg-link { display: inline-flex; align-items: center; color: inherit; text-decoration: none; }
.seg .seg-link { background: var(--surface); color: var(--text-2); font-weight: 600; padding: 7px 12px; }
.seg .seg-link + .seg-link { border-left: 1px solid var(--border); }
.seg .seg-link[aria-pressed="true"] { background: var(--primary-soft); color: var(--primary); }

/* Tanımlar menüsü: ana menüde kategorili açılır panel */
.defs-wrap { position: relative; }
.defs-menu {
  position: absolute; z-index: 40; padding: 8px; display: grid; grid-template-columns: repeat(3, minmax(190px, 1fr)); gap: 0 6px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--dock-shadow); animation: pop .16s ease;
}
.defs-menu[hidden] { display: none; }
.defs-group { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.defs-group .profile-sec { border-top: 0; margin-top: 0; }
.shell[data-nav="bottom"] .defs-menu { left: 50%; translate: -50% 0; bottom: calc(100% + 14px); }
.shell[data-nav="side"] .defs-menu { left: calc(100% + 10px); top: 0; }
@media (max-width: 860px) {
  /* Alt menü dönüşüm (transform) taşıdığı için panel menünün kendisine göre konumlanır: menü kadar geniş, üstünde açılır. */
  .shell[data-nav] .defs-wrap { position: static; }
  .shell[data-nav] .defs-menu { position: absolute; left: 0; right: 0; bottom: calc(100% + 10px); top: auto; translate: none; grid-template-columns: minmax(0, 1fr); max-height: 65vh; overflow-y: auto; }
}
