/* ==========================================================================
   YükYol Admin — global styles
   Light, professional logistics dashboard. No build step.
   ========================================================================== */

:root {
  --bg: #F4F6F9;
  --surface: #FFFFFF;
  --border: #E4E9F0;
  --border-strong: #CBD3DE;
  --ink: #0A1A2F;
  --ink-2: #52627A;
  --ink-3: #8A97AB;
  --navy: #0A1A2F;
  --navy-2: #12243D;
  --amber: #F5A524;
  --amber-hover: #E0961A;
  --amber-soft: #FEF3DC;
  --success: #14A36B;
  --success-soft: #E3F6EE;
  --warning: #D97706;
  --warning-soft: #FDF0DC;
  --danger: #E5484D;
  --danger-soft: #FDE8E9;
  --info: #2F7DEB;
  --info-soft: #E6F0FD;
  --neutral-soft: #EEF2F7;

  --radius-card: 12px;
  --radius-ctl: 8px;
  --shadow-sm: 0 1px 2px rgba(10, 26, 47, 0.05), 0 1px 3px rgba(10, 26, 47, 0.04);
  --shadow-md: 0 4px 12px rgba(10, 26, 47, 0.08), 0 1px 3px rgba(10, 26, 47, 0.05);
  --shadow-lg: 0 16px 40px rgba(10, 26, 47, 0.16);
  --ring: 0 0 0 3px rgba(245, 165, 36, 0.35);

  --sidebar-w: 248px;
  --sidebar-w-collapsed: 72px;
  --topbar-h: 64px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-width: 1024px;
}
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: 20px; }
h2 { font-size: 16px; }
h3 { font-size: 14px; }
p { margin: 0; }
a { color: var(--info); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--radius-ctl); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* Boot splash --------------------------------------------------------------- */
.boot { min-height: 100vh; display: grid; place-content: center; gap: 20px; justify-items: center; }
.boot__mark { font-size: 28px; font-weight: 700; color: var(--navy); letter-spacing: -0.02em; }
.boot__mark span, .wordmark span { color: var(--amber); }
.boot__spinner, .spinner {
  width: 24px; height: 24px; border-radius: 50%;
  border: 3px solid var(--border); border-top-color: var(--amber);
  animation: spin 0.8s linear infinite;
}
.spinner--sm { width: 16px; height: 16px; border-width: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Layout -------------------------------------------------------------------- */
.shell { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }
.sidebar {
  background: var(--navy); color: #fff;
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
  padding: 20px 14px;
  gap: 4px;
}
.sidebar__brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 22px; }
.sidebar__logo { width: 34px; height: 34px; border-radius: 9px; background: var(--amber); display: grid; place-items: center; flex: none; }
.sidebar__logo svg { width: 20px; height: 20px; }
.wordmark { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; white-space: nowrap; }
.sidebar__sub { font-size: 11px; color: rgba(255,255,255,0.5); font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; }
.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav__section { font-size: 11px; color: rgba(255,255,255,0.4); text-transform: uppercase; letter-spacing: 0.08em; padding: 14px 12px 6px; font-weight: 600; }
.nav__item {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 12px; border-radius: 9px;
  color: rgba(255,255,255,0.72); font-weight: 500; text-decoration: none;
  transition: background 0.12s, color 0.12s;
  white-space: nowrap;
}
.nav__item:hover { background: rgba(255,255,255,0.06); color: #fff; text-decoration: none; }
.nav__item.is-active { background: var(--amber); color: var(--navy); font-weight: 600; }
.nav__item.is-active .nav__icon { color: var(--navy); }
.nav__item:focus-visible { box-shadow: var(--ring); }
.nav__icon { width: 20px; height: 20px; flex: none; color: rgba(255,255,255,0.7); }
.nav__icon svg { width: 20px; height: 20px; display: block; }
.nav__count { margin-left: auto; font-size: 11px; font-weight: 600; background: rgba(255,255,255,0.14); padding: 1px 7px; border-radius: 999px; }
.nav__item.is-active .nav__count { background: rgba(10,26,47,0.15); }
.sidebar__footer { padding: 12px 12px 0; border-top: 1px solid rgba(255,255,255,0.08); font-size: 11px; color: rgba(255,255,255,0.4); white-space: nowrap; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: var(--topbar-h); background: var(--surface); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; padding: 0 28px;
  position: sticky; top: 0; z-index: 20;
}
.topbar__title { display: flex; align-items: baseline; gap: 12px; }
.topbar__sub { color: var(--ink-3); font-size: 13px; }
.topbar__right { display: flex; align-items: center; gap: 14px; }
.admin-chip { display: flex; align-items: center; gap: 10px; }
.admin-chip__name { font-weight: 600; font-size: 13px; }
.admin-chip__role { font-size: 11px; color: var(--ink-3); }
.content { padding: 24px 28px 48px; flex: 1; }

@media (max-width: 1199px) {
  .shell { grid-template-columns: var(--sidebar-w-collapsed) 1fr; }
  .sidebar { padding: 20px 12px; }
  .sidebar__brand { justify-content: center; padding: 4px 0 20px; }
  .sidebar__brand .wordmark, .sidebar__brand .sidebar__sub, .nav__item span.nav__label, .nav__section, .sidebar__footer, .nav__count { display: none; }
  .nav__item { justify-content: center; padding: 10px; }
  .content { padding: 20px; }
  .topbar { padding: 0 20px; }
}

/* Avatar ------------------------------------------------------------------ */
.avatar {
  width: 36px; height: 36px; border-radius: 50%; flex: none;
  background: var(--neutral-soft); color: var(--ink-2);
  display: grid; place-items: center; font-weight: 600; font-size: 13px;
  overflow: hidden; border: 1px solid var(--border);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar--sm { width: 28px; height: 28px; font-size: 11px; }
.avatar--lg { width: 56px; height: 56px; font-size: 18px; }
.avatar--amber { background: var(--amber-soft); color: #9A6104; }

/* Buttons ----------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 36px; padding: 0 14px; border-radius: var(--radius-ctl);
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--ink);
  font-weight: 500; font-size: 13px; white-space: nowrap;
  transition: background 0.12s, border-color 0.12s, box-shadow 0.12s, transform 0.05s;
  text-decoration: none;
}
.btn:hover { background: #F8FAFC; border-color: #B8C2CF; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn svg { width: 16px; height: 16px; }
.btn--primary { background: var(--amber); border-color: var(--amber); color: var(--navy); font-weight: 600; }
.btn--primary:hover { background: var(--amber-hover); border-color: var(--amber-hover); }
.btn--navy { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn--navy:hover { background: var(--navy-2); border-color: var(--navy-2); }
.btn--danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn--danger:hover { background: #CF3C41; border-color: #CF3C41; }
.btn--success { background: var(--success); border-color: var(--success); color: #fff; }
.btn--success:hover { background: #10905E; border-color: #10905E; }
.btn--ghost { border-color: transparent; background: transparent; color: var(--ink-2); }
.btn--ghost:hover { background: var(--neutral-soft); border-color: transparent; color: var(--ink); }
.btn--danger-ghost { border-color: transparent; background: transparent; color: var(--danger); }
.btn--danger-ghost:hover { background: var(--danger-soft); border-color: transparent; }
.btn--sm { height: 30px; padding: 0 10px; font-size: 12px; }
.btn--sm svg { width: 14px; height: 14px; }
.btn--icon { width: 36px; padding: 0; }
.btn--icon.btn--sm { width: 30px; }
.btn--block { width: 100%; }
.btn .spinner { width: 14px; height: 14px; border-width: 2px; }

/* Forms ------------------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field__label { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.field__hint { font-size: 12px; color: var(--ink-3); }
.field__error { font-size: 12px; color: var(--danger); }
.input, .select, .textarea {
  height: 36px; padding: 0 12px; border-radius: var(--radius-ctl);
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--ink);
  width: 100%; min-width: 0; transition: border-color 0.12s, box-shadow 0.12s;
}
.input::placeholder, .textarea::placeholder { color: var(--ink-3); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--amber); box-shadow: var(--ring); }
.input:disabled, .select:disabled, .textarea:disabled { background: var(--bg); color: var(--ink-3); }
.input--sm, .select--sm { height: 30px; font-size: 12px; padding: 0 8px; }
.input--num { text-align: right; font-variant-numeric: tabular-nums; }
.select {
  appearance: none; padding-right: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2352627A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
}
.textarea { height: auto; min-height: 88px; padding: 10px 12px; resize: vertical; line-height: 1.45; }
.input-icon { position: relative; }
.input-icon svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--ink-3); pointer-events: none; }
.input-icon .input { padding-left: 34px; }
.checkbox { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; }
.checkbox input { width: 16px; height: 16px; accent-color: var(--amber); margin: 0; cursor: pointer; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px 16px; }
.form-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.form-row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.input-group { display: flex; align-items: center; }
.input-group .input { border-radius: var(--radius-ctl) 0 0 var(--radius-ctl); }
.input-group__suffix { height: 36px; display: flex; align-items: center; padding: 0 10px; border: 1px solid var(--border-strong); border-left: 0; border-radius: 0 var(--radius-ctl) var(--radius-ctl) 0; background: var(--bg); color: var(--ink-2); font-size: 12px; white-space: nowrap; }
.counter { font-size: 11px; color: var(--ink-3); text-align: right; }

/* Cards ------------------------------------------------------------------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); box-shadow: var(--shadow-sm); }
.card__header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.card__header h2 { font-size: 15px; }
.card__header .hint { color: var(--ink-3); font-size: 12px; font-weight: 400; margin-left: 8px; }
.card__body { padding: 20px; }
.card__body--flush { padding: 0; }
.card__footer { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stack { display: flex; flex-direction: column; gap: 20px; }
.stack--sm { gap: 12px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row--between { justify-content: space-between; }
.row--end { justify-content: flex-end; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--ink-3); }
.muted-2 { color: var(--ink-2); }
.small { font-size: 12px; }
.strong { font-weight: 600; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; }
.nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.text-right { text-align: right; }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-amber { color: #9A6104; }

/* Page header / toolbar ------------------------------------------------------ */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .select, .toolbar .input { width: auto; }
.toolbar .select { min-width: 160px; }
.toolbar .input-icon { width: 260px; }
.toolbar .input-icon .input { width: 100%; }
.toolbar__spacer { flex: 1; }
.toolbar__count { color: var(--ink-3); font-size: 13px; white-space: nowrap; }
.tabs { display: inline-flex; background: var(--neutral-soft); border-radius: 10px; padding: 3px; gap: 2px; }
.tab { border: 0; background: transparent; padding: 6px 14px; border-radius: 8px; font-weight: 500; color: var(--ink-2); font-size: 13px; }
.tab:hover { color: var(--ink); }
.tab.is-active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); font-weight: 600; }
.tab .count { margin-left: 6px; color: var(--ink-3); font-size: 12px; }

/* Stat cards ---------------------------------------------------------------- */
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1400px) { .stats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.stat {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); box-shadow: var(--shadow-sm);
  padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; min-width: 0;
  text-align: left; color: inherit; text-decoration: none; transition: box-shadow 0.12s, border-color 0.12s, transform 0.12s;
}
a.stat:hover { box-shadow: var(--shadow-md); border-color: var(--border-strong); text-decoration: none; transform: translateY(-1px); }
.stat__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.stat__label { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.stat__icon { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--neutral-soft); color: var(--ink-2); }
.stat__icon svg { width: 18px; height: 18px; }
.stat__icon--amber { background: var(--amber-soft); color: #9A6104; }
.stat__icon--success { background: var(--success-soft); color: var(--success); }
.stat__icon--info { background: var(--info-soft); color: var(--info); }
.stat__icon--danger { background: var(--danger-soft); color: var(--danger); }
.stat__icon--warning { background: var(--warning-soft); color: var(--warning); }
.stat__value { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat__sub { font-size: 12px; color: var(--ink-3); }
.stat__sub b { color: var(--ink-2); font-weight: 600; }
.charts-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }

/* SVG bar chart ------------------------------------------------------------- */
.chart { width: 100%; height: auto; display: block; }
.chart .bar { fill: var(--amber); transition: opacity 0.12s; }
.chart .bar--info { fill: var(--info); }
.chart .bar:hover { opacity: 0.8; }
.chart .grid { stroke: var(--border); stroke-width: 1; }
.chart .axis { fill: var(--ink-3); font-size: 10px; font-family: var(--font); }
.chart .val { fill: var(--ink-2); font-size: 10px; font-weight: 600; font-family: var(--font); }
.chart__legend { display: flex; gap: 14px; font-size: 12px; color: var(--ink-2); }
.chart__legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* Badges ------------------------------------------------------------------ */
.badge {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; white-space: nowrap; line-height: 1;
  background: var(--neutral-soft); color: var(--ink-2);
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.8; }
.badge--plain::before { display: none; }
.badge--success { background: var(--success-soft); color: #0E7A50; }
.badge--warning { background: var(--warning-soft); color: #A85B05; }
.badge--danger { background: var(--danger-soft); color: #B8323A; }
.badge--info { background: var(--info-soft); color: #1F5FBF; }
.badge--amber { background: var(--amber-soft); color: #9A6104; }
.badge--navy { background: #E3E8F0; color: var(--navy); }
.badge--neutral { background: var(--neutral-soft); color: var(--ink-2); }
.badge svg { width: 12px; height: 12px; }
.chip { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 6px; background: var(--neutral-soft); color: var(--ink-2); font-size: 12px; font-weight: 500; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* Tables ------------------------------------------------------------------ */
.table-wrap { overflow-x: auto; border-radius: var(--radius-card); }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td { padding: 11px 14px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--border); }
.table th { font-size: 11.5px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.04em; background: #FAFBFD; white-space: nowrap; position: sticky; top: 0; z-index: 1; }
.table td { color: var(--ink); }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr.is-clickable { cursor: pointer; }
.table tbody tr.is-clickable:hover { background: #FAFBFD; }
.table tbody tr.is-clickable:focus-visible { box-shadow: inset 0 0 0 2px var(--amber); outline: none; }
.table .td-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table th.td-num { text-align: right; }
.table .td-main { font-weight: 600; }
.table .td-sub { color: var(--ink-3); font-size: 12px; margin-top: 1px; }
.table--compact th, .table--compact td { padding: 8px 12px; font-size: 12.5px; }
.table .cell-user { display: flex; align-items: center; gap: 10px; min-width: 0; }
.route { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.route svg { width: 14px; height: 14px; color: var(--ink-3); }
.rating { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.rating svg { width: 13px; height: 13px; color: var(--amber); }

/* Pagination ---------------------------------------------------------------- */
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--border); font-size: 13px; color: var(--ink-2); }
.pagination__btns { display: flex; gap: 6px; }

/* Skeletons / empty ---------------------------------------------------------- */
.skel { position: relative; overflow: hidden; background: var(--neutral-soft); border-radius: 6px; }
.skel::after { content: ''; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255,255,255,0.7), transparent); animation: shimmer 1.4s infinite; }
@keyframes shimmer { 100% { transform: translateX(100%); } }
.skel--line { height: 12px; }
.skel--stat { height: 118px; border-radius: var(--radius-card); }
.skel--block { height: 220px; border-radius: var(--radius-card); }
.empty { padding: 48px 20px; text-align: center; color: var(--ink-3); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.empty__icon { width: 48px; height: 48px; border-radius: 14px; background: var(--neutral-soft); display: grid; place-items: center; color: var(--ink-3); margin-bottom: 6px; }
.empty__icon svg { width: 22px; height: 22px; }
.empty__title { font-weight: 600; color: var(--ink-2); font-size: 14px; }
.empty__hint { font-size: 13px; max-width: 360px; }
.error-box { padding: 14px 16px; border-radius: var(--radius-ctl); background: var(--danger-soft); color: #B8323A; font-size: 13px; display: flex; gap: 10px; align-items: flex-start; }
.error-box svg { width: 16px; height: 16px; flex: none; margin-top: 1px; }
.info-box { padding: 12px 14px; border-radius: var(--radius-ctl); background: var(--info-soft); color: #1F5FBF; font-size: 13px; }
.warn-box { padding: 12px 14px; border-radius: var(--radius-ctl); background: var(--warning-soft); color: #A85B05; font-size: 13px; }

/* Definition lists ------------------------------------------------------------ */
.dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; margin: 0; font-size: 13px; }
.dl dt { color: var(--ink-3); font-weight: 500; white-space: nowrap; }
.dl dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.dl--cols { grid-template-columns: max-content 1fr max-content 1fr; }
.section { display: flex; flex-direction: column; gap: 10px; }
.section__title { font-size: 12px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.06em; display: flex; align-items: center; gap: 8px; }
.section__title .count { background: var(--neutral-soft); color: var(--ink-2); border-radius: 999px; padding: 1px 7px; font-size: 11px; text-transform: none; letter-spacing: 0; }
.divider { border: 0; border-top: 1px solid var(--border); margin: 4px 0; }
details.raw summary { cursor: pointer; color: var(--ink-2); font-weight: 500; font-size: 13px; }
details.raw pre { background: #0F1E33; color: #DCE6F5; padding: 14px; border-radius: var(--radius-ctl); overflow: auto; max-height: 360px; margin-top: 10px; font-size: 11.5px; line-height: 1.5; }

/* Party card ----------------------------------------------------------------- */
.party { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; background: #FAFBFD; min-width: 0; }
.party__name { font-weight: 600; display: flex; align-items: center; gap: 6px; }
.party__sub { font-size: 12px; color: var(--ink-3); }
.party__role { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-3); font-weight: 600; margin-bottom: 2px; }
.parties { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* Timeline ------------------------------------------------------------------- */
.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.timeline__item { display: grid; grid-template-columns: 22px 1fr; gap: 12px; position: relative; padding-bottom: 16px; }
.timeline__item:last-child { padding-bottom: 0; }
.timeline__dot { width: 22px; height: 22px; border-radius: 50%; background: var(--surface); border: 2px solid var(--border-strong); display: grid; place-items: center; z-index: 1; }
.timeline__dot svg { width: 11px; height: 11px; color: var(--ink-2); }
.timeline__dot--status { border-color: var(--amber); background: var(--amber-soft); }
.timeline__dot--status svg { color: #9A6104; }
.timeline__item::before { content: ''; position: absolute; left: 10px; top: 22px; bottom: 0; width: 2px; background: var(--border); }
.timeline__item:last-child::before { display: none; }
.timeline__title { font-weight: 600; font-size: 13px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.timeline__meta { font-size: 12px; color: var(--ink-3); }
.timeline__msg { font-size: 13px; color: var(--ink-2); margin-top: 2px; }

/* Gallery -------------------------------------------------------------------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.gallery__item { position: relative; aspect-ratio: 4 / 3; border-radius: 8px; overflow: hidden; border: 1px solid var(--border); background: var(--neutral-soft); display: block; padding: 0; }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery__item .gallery__label { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(10,26,47,0.7); color: #fff; font-size: 10.5px; padding: 3px 6px; text-align: left; }
.gallery__file { display: grid; place-items: center; color: var(--ink-2); font-size: 12px; text-align: center; padding: 8px; gap: 4px; }
.gallery__file svg { width: 22px; height: 22px; }

/* Modal / Drawer --------------------------------------------------------------- */
.overlay { position: fixed; inset: 0; background: rgba(10, 26, 47, 0.45); z-index: 50; display: flex; align-items: center; justify-content: center; padding: 24px; animation: fade 0.15s ease-out; }
.overlay--drawer { justify-content: flex-end; padding: 0; }
@keyframes fade { from { opacity: 0; } }
.modal { background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-lg); width: 100%; max-width: 640px; max-height: calc(100vh - 48px); display: flex; flex-direction: column; animation: pop 0.16s ease-out; }
@keyframes pop { from { transform: translateY(8px) scale(0.985); opacity: 0; } }
.modal--lg { max-width: 900px; }
.modal--xl { max-width: 1100px; }
.modal--sm { max-width: 460px; }
.modal__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.modal__header h2 { font-size: 16px; }
.modal__sub { color: var(--ink-3); font-size: 13px; margin-top: 2px; }
.modal__body { padding: 22px; overflow: auto; flex: 1; }
.modal__footer { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--border); }
.modal__footer--between { justify-content: space-between; }
.drawer { background: var(--surface); width: 720px; max-width: 100%; height: 100vh; display: flex; flex-direction: column; box-shadow: var(--shadow-lg); animation: slide 0.18s ease-out; }
@keyframes slide { from { transform: translateX(24px); opacity: 0; } }
.drawer .modal__body { padding: 22px 24px; }

/* Toasts ------------------------------------------------------------------------- */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 100; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { pointer-events: auto; background: var(--navy); color: #fff; padding: 11px 14px; border-radius: 10px; box-shadow: var(--shadow-lg); font-size: 13px; display: flex; align-items: center; gap: 10px; min-width: 260px; max-width: 420px; animation: toastin 0.18s ease-out; }
.toast svg { width: 16px; height: 16px; flex: none; }
.toast--success svg { color: #48D39A; }
.toast--error svg { color: #FF8A8E; }
.toast--info svg { color: #7DB0F5; }
.toast--warning svg { color: var(--amber); }
.toast.is-leaving { opacity: 0; transform: translateY(6px); transition: opacity 0.2s, transform 0.2s; }
@keyframes toastin { from { opacity: 0; transform: translateY(8px); } }

/* Login --------------------------------------------------------------------------- */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login__side { background: var(--navy); color: #fff; padding: 48px 56px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.login__side::before { content: ''; position: absolute; right: -120px; top: -120px; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(circle, rgba(245,165,36,0.25), transparent 65%); }
.login__side::after { content: ''; position: absolute; left: -80px; bottom: -160px; width: 360px; height: 360px; border-radius: 50%; background: radial-gradient(circle, rgba(47,125,235,0.22), transparent 65%); }
.login__brand { display: flex; align-items: center; gap: 12px; position: relative; }
.login__brand .sidebar__logo { width: 40px; height: 40px; border-radius: 11px; }
.login__brand .sidebar__logo svg { width: 24px; height: 24px; }
.login__brand .wordmark { font-size: 24px; }
.login__hero { position: relative; max-width: 460px; }
.login__hero h1 { font-size: 32px; line-height: 1.2; letter-spacing: -0.02em; margin-bottom: 14px; }
.login__hero p { color: rgba(255,255,255,0.7); font-size: 15px; }
.login__points { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-direction: column; gap: 10px; color: rgba(255,255,255,0.85); font-size: 14px; }
.login__points li { display: flex; align-items: center; gap: 10px; }
.login__points svg { width: 18px; height: 18px; color: var(--amber); }
.login__foot { color: rgba(255,255,255,0.4); font-size: 12px; position: relative; }
.login__main { display: grid; place-items: center; padding: 40px; }
.login__card { width: 100%; max-width: 400px; }
.login__card h2 { font-size: 22px; margin-bottom: 4px; }
.login__card .lead { color: var(--ink-3); margin-bottom: 24px; }
.login__form { display: flex; flex-direction: column; gap: 16px; }
.login__form .input { height: 42px; }
.login__form .btn { height: 42px; font-size: 14px; }
.login__version { margin-top: 24px; text-align: center; color: var(--ink-3); font-size: 12px; }

/* Documents queue ------------------------------------------------------------------ */
.doc-list { display: flex; flex-direction: column; }
.doc { display: grid; grid-template-columns: 44px 1fr auto; gap: 14px; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--border); }
.doc:last-child { border-bottom: 0; }
.doc__icon { width: 44px; height: 44px; border-radius: 10px; background: var(--neutral-soft); display: grid; place-items: center; color: var(--ink-2); }
.doc__icon svg { width: 20px; height: 20px; }
.doc__title { font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.doc__meta { font-size: 12px; color: var(--ink-3); display: flex; gap: 12px; flex-wrap: wrap; margin-top: 2px; }
.doc__actions { display: flex; gap: 6px; }
.doc-preview { width: 100%; height: 70vh; border: 1px solid var(--border); border-radius: 10px; background: var(--neutral-soft); }
.doc-preview--img { display: block; object-fit: contain; }

/* Pricing --------------------------------------------------------------------------- */
.pricing-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; align-items: start; }
@media (max-width: 1400px) { .pricing-layout { grid-template-columns: 1fr; } }
.sticky-actions { position: sticky; top: calc(var(--topbar-h) + 12px); z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); box-shadow: var(--shadow-md); padding: 12px 16px; }
.sticky-actions.is-dirty { border-color: var(--amber); }
.rate-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.rate-table th, .rate-table td { padding: 6px 6px; border-bottom: 1px solid var(--border); text-align: left; }
.rate-table th { font-size: 11px; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.04em; white-space: nowrap; font-weight: 600; }
.rate-table td:first-child { font-weight: 600; white-space: nowrap; }
.rate-table .input { height: 30px; padding: 0 8px; font-size: 12.5px; min-width: 76px; }
.mult-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px 14px; }
.mult { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mult label { font-size: 12.5px; color: var(--ink-2); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mult .input { width: 84px; height: 30px; padding: 0 8px; font-size: 12.5px; flex: none; }
.mult.is-changed label { color: #9A6104; font-weight: 600; }
.bands { display: flex; flex-direction: column; gap: 8px; }
.band { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: center; }
.quote-result { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.quote-box { background: #FAFBFD; border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; }
.quote-box__label { font-size: 11px; color: var(--ink-3); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.quote-box__value { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; margin-top: 2px; }
.quote-box--main { background: var(--amber-soft); border-color: #F2D28F; }
.quote-box--main .quote-box__value { color: #7A4C00; font-size: 24px; }
.bar-compare { display: flex; flex-direction: column; gap: 6px; }
.bar-compare__row { display: grid; grid-template-columns: 110px 1fr 90px; align-items: center; gap: 10px; font-size: 12.5px; }
.bar-compare__track { height: 10px; background: var(--neutral-soft); border-radius: 999px; overflow: hidden; }
.bar-compare__fill { height: 100%; border-radius: 999px; background: var(--amber); }
.bar-compare__fill--info { background: var(--info); }
.bar-compare__fill--muted { background: var(--ink-3); }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px dashed var(--border); font-size: 13px; }
.kv:last-child { border-bottom: 0; }
.kv span:last-child { font-variant-numeric: tabular-nums; font-weight: 600; }
.req-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 10px; }

/* Reports / broadcast ------------------------------------------------------------------ */
.report-details { max-width: 420px; white-space: pre-wrap; color: var(--ink-2); font-size: 12.5px; }
.broadcast-layout { display: grid; grid-template-columns: minmax(0, 560px) 1fr; gap: 20px; align-items: start; }
.preview-notif { background: var(--bg); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; display: flex; gap: 12px; }
.preview-notif__icon { width: 36px; height: 36px; border-radius: 9px; background: var(--navy); display: grid; place-items: center; flex: none; }
.preview-notif__icon .wordmark { font-size: 11px; color: #fff; }
.preview-notif__title { font-weight: 600; font-size: 13px; }
.preview-notif__body { font-size: 13px; color: var(--ink-2); white-space: pre-wrap; overflow-wrap: anywhere; }

/* Misc ------------------------------------------------------------------------------- */
.kbd { font-family: inherit; font-size: 11px; padding: 1px 6px; border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 5px; background: var(--bg); color: var(--ink-2); }
.link-btn { background: none; border: 0; padding: 0; color: var(--info); font-weight: 500; cursor: pointer; }
.link-btn:hover { text-decoration: underline; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); }
.dot--success { background: var(--success); }
.dot--danger { background: var(--danger); }
.photo-strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.photo-strip a { flex: none; width: 140px; height: 100px; border-radius: 8px; overflow: hidden; border: 1px solid var(--border); }
.photo-strip img { width: 100%; height: 100%; object-fit: cover; display: block; }
.price-range { display: flex; align-items: baseline; gap: 6px; }
.price-range b { font-size: 15px; }
.progress { height: 6px; background: var(--neutral-soft); border-radius: 999px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--amber); border-radius: 999px; }
