/* Savanoriai Veža – calm, card-based, mobile-first. System fonts only; no external requests. */
:root {
  --brand: #0b3d91;
  --brand-600: #0a3480;
  --brand-700: #082a68;
  --brand-50: #eef3fc;
  --brand-100: #dbe6f8;
  --accent: #f5c518;
  --accent-600: #e0b000;
  --accent-50: #fff8dc;
  --accent-ink: #3d2f00;
  --bg: #f4f6fa;
  --surface: #ffffff;
  --surface-2: #f8f9fc;
  --text: #16213a;
  --text-2: #4a5570;
  --muted: #6b7690;
  --border: #e1e6ef;
  --border-strong: #c9d1e0;
  --ok: #17803d;
  --ok-bg: #e7f6ec;
  --warn: #8a5a00;
  --warn-bg: #fff6d6;
  --err: #b42318;
  --err-bg: #fdecea;
  --shadow: 0 1px 2px rgba(16, 30, 60, 0.06), 0 2px 8px rgba(16, 30, 60, 0.05);
  --shadow-lg: 0 10px 30px rgba(16, 30, 60, 0.14);
  --radius: 16px;
  --radius-sm: 10px;
  --tap: 48px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand: #6f9cf0;
    --brand-600: #8aaff3;
    --brand-700: #a9c4f6;
    --brand-50: #16233d;
    --brand-100: #1d2e50;
    --accent: #f5c518;
    --accent-600: #ffd43b;
    --accent-50: #2e2708;
    --accent-ink: #ffe27a;
    --bg: #0d1320;
    --surface: #151d2e;
    --surface-2: #1a2336;
    --text: #e7ecf5;
    --text-2: #b9c3d6;
    --muted: #8f9ab0;
    --border: #253049;
    --border-strong: #34415f;
    --ok: #5cd08a;
    --ok-bg: #12301f;
    --warn: #f3c969;
    --warn-bg: #2f2710;
    --err: #ff8a80;
    --err-bg: #3a1714;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.5);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
body.has-tabbar { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
h1, h2, h3 { line-height: 1.25; margin: 0 0 0.4em; letter-spacing: -0.01em; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.15rem; }
p { margin: 0 0 0.75em; }
a { color: var(--brand); text-underline-offset: 2px; }
a:hover { color: var(--brand-600); }
code, .mono { font-family: var(--mono); font-size: 0.9em; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ic { width: 1.25em; height: 1.25em; flex: none; vertical-align: -0.25em; }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }
.hint { color: var(--muted); font-size: 0.875rem; margin: 0.35rem 0 0.75rem; }
.center { text-align: center; }
.inline { display: inline; margin: 0; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--surface); color: var(--text); padding: 10px 14px; border-radius: 10px; box-shadow: var(--shadow-lg);
}
.skip:focus { top: 12px; }

/* ---------- testing strip ---------- */
.testing-strip {
  display: flex; align-items: center; gap: 8px; justify-content: center;
  padding: 6px 14px; font-size: 0.8rem; line-height: 1.35;
  background: repeating-linear-gradient(135deg, var(--accent) 0 12px, #f7d24a 12px 24px);
  color: #2b2100;
}
.testing-strip .ic { width: 1.1em; height: 1.1em; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: #0b3d91; color: #fff;
  box-shadow: inset 0 -3px 0 var(--accent), 0 2px 10px rgba(8, 30, 70, 0.18);
}
.topbar-inner {
  max-width: 1160px; margin: 0 auto; padding: 0 16px 3px;
  min-height: 60px; display: flex; align-items: center; gap: 16px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px; min-height: var(--tap);
  color: #fff; text-decoration: none; font-weight: 700; font-size: 1.1rem; letter-spacing: -0.01em;
}
.brand:hover { color: #fff; }
.brand-ic { width: 30px; height: 30px; padding: 5px; border-radius: 9px; background: rgba(255, 255, 255, 0.12); color: var(--accent); }
.mainnav { display: none; gap: 4px; margin-left: 8px; }
.mainnav a {
  display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 12px;
  color: rgba(255, 255, 255, 0.86); text-decoration: none; border-radius: 10px; font-weight: 500; font-size: 0.95rem;
}
.mainnav a:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.mainnav a[aria-current="page"] { background: rgba(255, 255, 255, 0.16); color: #fff; box-shadow: inset 0 -2px 0 var(--accent); }

.usermenu { margin-left: auto; position: relative; }
.usermenu summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px;
  min-height: var(--tap); padding: 4px 8px 4px 4px; border-radius: 999px; color: #fff;
}
.usermenu summary::-webkit-details-marker { display: none; }
.usermenu summary:hover, .usermenu[open] summary { background: rgba(255, 255, 255, 0.12); }
.usermenu .uname { display: none; font-weight: 500; max-width: 16ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.usermenu .chev { width: 16px; height: 16px; opacity: 0.8; transition: transform 0.15s; }
.usermenu[open] .chev { transform: rotate(180deg); }
.menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 230px; padding: 6px;
  background: var(--surface); color: var(--text); border: 1px solid var(--border);
  border-radius: 14px; box-shadow: var(--shadow-lg);
}
.menu a, .menu .menu-btn {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: var(--tap); padding: 0 12px;
  border-radius: 10px; color: var(--text); text-decoration: none; font: inherit; font-size: 0.975rem;
  background: none; border: 0; cursor: pointer; text-align: left; justify-content: flex-start;
}
.menu a:hover, .menu .menu-btn:hover { background: var(--brand-50); color: var(--text); }
.menu a[aria-current="page"] { background: var(--brand-50); font-weight: 600; }
.menu .ic { color: var(--muted); }
.menu form { display: block; border-top: 1px solid var(--border); margin-top: 6px; padding-top: 6px; }
.menu .menu-btn { color: var(--err); }
.menu .menu-btn .ic { color: var(--err); }

/* ---------- avatars ---------- */
.avatar {
  display: inline-grid; place-items: center; flex: none;
  width: 36px; height: 36px; border-radius: 50%;
  font-weight: 700; font-size: 0.95rem; color: #fff; background: var(--brand);
}
.topbar .avatar { box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5); }
.avatar-sm { width: 28px; height: 28px; font-size: 0.8rem; }
.avatar-lg { width: 44px; height: 44px; font-size: 1.1rem; }
.avatar-xl { width: 64px; height: 64px; font-size: 1.6rem; }
.av0 { background: #2f5fb8; }
.av1 { background: #b7791f; }
.av2 { background: #2f855a; }
.av3 { background: #7b4bb3; }
.av4 { background: #c05646; }
.av5 { background: #1f7a8c; }

/* ---------- main ---------- */
main { width: 100%; max-width: 1160px; margin: 0 auto; padding: 20px 16px 32px; flex: 1; }
.page-head { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: flex-end; justify-content: space-between; margin-bottom: 16px; }
.page-head h1 { margin: 0; }
.page-head .lead { margin: 4px 0 0; }
.page-icon { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--brand-50); color: var(--brand); margin-bottom: 10px; }
.page-icon .ic { width: 24px; height: 24px; }
.page-actions { display: none; gap: 10px; }
.lead { color: var(--text-2); font-size: 1.02rem; }
.crumbs { font-size: 0.9rem; color: var(--muted); margin-bottom: 12px; }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px;
}
.card + .card { margin-top: 16px; }
.card-flush { padding: 0; overflow: hidden; }
.card-highlight { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-50), var(--shadow); }
.card-danger { border-color: color-mix(in srgb, var(--err) 35%, var(--border)); }
.card-kicker { display: flex; align-items: center; gap: 6px; font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 8px; }
.narrow { max-width: 680px; margin-left: auto; margin-right: auto; }
.stack-lg > * + * { margin-top: 16px; }
.stack-lg > .card + .card, .stack-lg > .grid-2 { margin-top: 16px; }
.big-ic { width: 40px; height: 40px; color: var(--brand); margin-bottom: 8px; }
.section-title { display: flex; align-items: center; gap: 8px; font-size: 1.05rem; margin-bottom: 12px; }
.section-title .ic { color: var(--brand); }
.count {
  display: inline-grid; place-items: center; min-width: 26px; height: 24px; padding: 0 8px;
  border-radius: 999px; background: var(--brand-50); color: var(--brand); font-size: 0.8rem; font-weight: 700;
}

/* ---------- callouts ---------- */
.callout {
  display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; margin-bottom: 16px;
  border-radius: 12px; border: 1px solid transparent; font-size: 0.95rem;
}
.callout > div > :last-child { margin-bottom: 0; }
.callout .ic { margin-top: 1px; }
.callout-ok { background: var(--ok-bg); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 25%, transparent); }
.callout-err { background: var(--err-bg); color: var(--err); border-color: color-mix(in srgb, var(--err) 25%, transparent); }
.callout-warn { background: var(--warn-bg); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 25%, transparent); }
.callout-info { background: var(--brand-50); color: var(--brand); }
.callout a { color: inherit; font-weight: 600; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--tap); padding: 0 18px; border-radius: 12px; border: 1px solid transparent;
  font: inherit; font-weight: 600; font-size: 0.975rem; line-height: 1.2; text-decoration: none;
  cursor: pointer; transition: background 0.15s, border-color 0.15s, transform 0.05s; -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: #0b3d91; color: #fff; }
.btn-primary:hover { background: #082f72; color: #fff; }
.btn-accent { background: var(--accent); color: #2b2100; }
.btn-accent:hover { background: var(--accent-600); color: #2b2100; }
.btn-secondary { background: var(--surface); color: var(--brand); border-color: var(--border-strong); }
.btn-secondary:hover { background: var(--brand-50); border-color: var(--brand); color: var(--brand); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--brand-50); color: var(--text); }
.btn-danger { background: transparent; color: var(--err); border-color: color-mix(in srgb, var(--err) 40%, var(--border)); }
.btn-danger:hover { background: var(--err-bg); color: var(--err); }
.btn-danger-solid { background: #b42318; color: #fff; }
.btn-danger-solid:hover { background: #912018; color: #fff; }
.btn-lg { min-height: 54px; font-size: 1.05rem; padding: 0 24px; }
.btn-sm { min-height: 40px; padding: 0 12px; font-size: 0.875rem; }
.btn-block { width: 100%; }
form.inline:has(.btn-block) { display: block; }
.btn.copied { color: var(--ok); }
@media (prefers-color-scheme: dark) {
  .btn-primary { background: #3b6fd6; }
  .btn-primary:hover { background: #4d7fe0; }
}

/* ---------- chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 3px 10px;
  border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text-2); font-size: 0.85rem; font-weight: 500; line-height: 1.25;
}
.chip .ic { width: 1.05em; height: 1.05em; color: var(--muted); }
.chip-accent { background: var(--accent-50); border-color: color-mix(in srgb, var(--accent) 55%, transparent); color: var(--accent-ink); }
.chip-accent .ic { color: var(--accent-ink); }
.chip-ok { background: var(--ok-bg); border-color: transparent; color: var(--ok); }
.chip-ok .ic { color: var(--ok); }
.chip-pending { background: var(--warn-bg); border-color: transparent; color: var(--warn); }
.chip-pending .ic { color: var(--warn); }
.chip-muted { color: var(--muted); }
.chip-own { background: var(--brand-50); border-color: transparent; color: var(--brand); }
.chip-own .ic { color: var(--brand); }
.chip-sm { min-height: 22px; font-size: 0.72rem; padding: 1px 8px; }

/* ---------- board ---------- */
.filters { display: grid; gap: 12px; margin-bottom: 14px; }
.filters .field { margin: 0; }
.filter-actions { display: flex; gap: 8px; align-items: flex-end; }
.filter-actions .btn { flex: 1; }
.jump { display: flex; gap: 8px; margin-bottom: 18px; }
.jump a {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--tap);
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  color: var(--text); text-decoration: none; font-weight: 500; box-shadow: var(--shadow);
}
.jump a b { color: var(--brand); }
.jump .ic { color: var(--brand); }
.columns { display: grid; gap: 28px; }
.columns > section { scroll-margin-top: 80px; }
.columns > section > * + * { margin-top: 12px; }

.post {
  position: relative; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 16px 16px 20px; overflow: hidden;
}
.post::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--brand); }
.post-request::before { background: var(--accent); }
.post-top { display: flex; gap: 14px; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; }
.post .chips { margin-bottom: 14px; }
.post-action .chip { min-height: 40px; width: 100%; justify-content: center; border-radius: 12px; }

.route { position: relative; flex: 1; min-width: 0; padding-left: 26px; }
.route::before {
  content: ""; position: absolute; left: 8px; top: 16px; bottom: 16px; width: 0;
  border-left: 2px dashed var(--border-strong);
}
.stop { position: relative; display: flex; flex-direction: column; }
.stop + .stop { margin-top: 10px; }
.stop .dot {
  position: absolute; left: -26px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; border-radius: 50%; background: var(--surface); border: 3px solid var(--brand);
}
.stop.to .dot { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-50); }
.stop-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 700; }
.place { font-weight: 650; font-size: 1.05rem; line-height: 1.25; overflow-wrap: anywhere; }

.datebox {
  flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 62px; padding: 6px 0 7px; border-radius: 12px; background: var(--brand-50); color: var(--brand); text-align: center;
}
.post-request .datebox { background: var(--accent-50); color: var(--accent-ink); }
.db-m { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.db-d { font-size: 1.6rem; font-weight: 800; line-height: 1.05; }
.db-w { font-size: 0.75rem; font-weight: 600; opacity: 0.85; }

.empty {
  text-align: center; padding: 28px 20px; border: 2px dashed var(--border-strong);
  border-radius: var(--radius); background: var(--surface-2);
}
.empty-ic { width: 44px; height: 44px; color: var(--brand); opacity: 0.55; margin-bottom: 6px; }
.empty-title { font-weight: 650; font-size: 1.05rem; margin-bottom: 4px; }
.empty .btn { margin-top: 6px; }

/* ---------- forms ---------- */
.form-card { max-width: 720px; margin: 0 auto; }
.form-section { padding: 16px 0; border-top: 1px solid var(--border); }
.form-section:first-of-type { border-top: 0; padding-top: 4px; }
.form-section-title { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 12px; }
.field { display: block; margin: 0 0 14px; padding: 0; border: 0; min-width: 0; }
.label { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 0.925rem; margin-bottom: 6px; padding: 0; color: var(--text); }
.label .ic { color: var(--brand); width: 1.1em; height: 1.1em; }
input[type=text], input[type=date], input:not([type]), select, input[inputmode] {
  width: 100%; min-height: var(--tap); padding: 10px 14px;
  font: inherit; font-size: 1rem; color: var(--text); background: var(--surface);
  border: 1.5px solid var(--border-strong); border-radius: 12px; transition: border-color 0.15s, box-shadow 0.15s;
}
input::placeholder { color: var(--muted); }
input:hover, select:hover { border-color: var(--brand); }
input:focus, select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 20%, transparent); }
input[type=date] { appearance: none; -webkit-appearance: none; }
input[type=date]::-webkit-calendar-picker-indicator { opacity: 0.7; cursor: pointer; }
@media (prefers-color-scheme: dark) { input[type=date]::-webkit-calendar-picker-indicator { filter: invert(1); } }
.select { position: relative; display: block; }
.select select { appearance: none; -webkit-appearance: none; padding-right: 44px; cursor: pointer; }
.select::after {
  content: ""; position: absolute; right: 16px; top: 50%; width: 10px; height: 10px; margin-top: -7px; pointer-events: none;
  border-right: 2px solid var(--brand); border-bottom: 2px solid var(--brand); transform: rotate(45deg);
}
.seg { display: grid; grid-template-columns: repeat(8, 1fr); gap: 0; border: 1.5px solid var(--border-strong); border-radius: 12px; overflow: hidden; background: var(--surface); }
.seg-item { position: relative; }
.seg-item input, .tile input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.seg-item span {
  display: grid; place-items: center; min-height: var(--tap); font-weight: 650; font-size: 1.05rem; color: var(--text-2);
  border-left: 1px solid var(--border);
}
.seg-item:first-child span { border-left: 0; }
.seg-item input:hover + span { background: var(--brand-50); }
.seg-item input:checked + span { background: #0b3d91; color: #fff; }
.seg-item input:focus-visible + span, .tile input:focus-visible + .tile-body { outline: 3px solid var(--accent); outline-offset: -3px; }
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.tile { position: relative; }
.tile-body {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center;
  min-height: 92px; padding: 10px 8px; border: 1.5px solid var(--border-strong); border-radius: 14px;
  background: var(--surface); font-size: 0.875rem; font-weight: 550; color: var(--text-2); line-height: 1.25;
}
.tile-ic { width: 34px; height: 34px; color: var(--brand); }
.tile input:hover + .tile-body { border-color: var(--brand); }
.tile input:checked + .tile-body { border-color: var(--brand); background: var(--brand-50); color: var(--text); box-shadow: inset 0 0 0 1.5px var(--brand); }
@media (prefers-color-scheme: dark) { .seg-item input:checked + span { background: #3b6fd6; } }
.grid-2 { display: grid; gap: 0 16px; }
.form-actions { display: flex; flex-direction: column; gap: 8px; padding-top: 16px; border-top: 1px solid var(--border); }
.form-actions .btn { width: 100%; }

/* ---------- lists / my page ---------- */
.items { list-style: none; margin: 0; padding: 0; }
.item { padding: 14px 0; border-top: 1px solid var(--border); display: grid; gap: 12px; }
.item:first-child { border-top: 0; padding-top: 4px; }
.item:last-child { padding-bottom: 0; }
.person { display: flex; gap: 12px; align-items: center; }
.person p { margin: 0; }
.person-name { font-size: 1rem; }
.mini { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.mini > .ic { width: 22px; height: 22px; color: var(--brand); margin-top: 2px; }
.mini-request > .ic { color: var(--accent-ink); }
.mini p { margin: 0; }
.mini-route { font-weight: 650; }
.mini-meta { color: var(--text-2); font-size: 0.9rem; }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.row-actions > form, .row-actions > .btn { flex: 1 1 auto; }
.row-actions > form .btn { width: 100%; }
.item-contact .btn-primary { font-size: 1.05rem; }
.coderow { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; align-items: center; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); }
.coderow-label { grid-column: 1 / -1; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.coderow code { overflow-wrap: anywhere; font-size: 0.85rem; }

/* ---------- settings ---------- */
.profile { display: flex; gap: 16px; align-items: center; }
.profile p { margin: 0 0 4px; }
.profile-name { font-size: 1.25rem; font-weight: 700; margin: 0 0 2px; }
.profile .chips { margin-top: 8px; }
.status-line { margin-bottom: 8px; }
.pause-form { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: end; margin-bottom: 10px; }
.pause-form .field { margin: 0; }

/* ---------- onboarding / login ---------- */
.onboarding { text-align: center; }
.choice { display: grid; gap: 10px; margin-top: 18px; }
.login { max-width: 460px; margin: 8px auto 0; }
.login-card { text-align: center; padding: 28px 22px; }
.login-mark {
  display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 18px; margin-bottom: 14px;
  background: #0b3d91; color: var(--accent); box-shadow: 0 8px 20px rgba(11, 61, 145, 0.3);
}
.login-mark .ic { width: 36px; height: 36px; }
.widget { display: flex; justify-content: center; min-height: 48px; margin: 18px 0; }
.widget p { display: flex; align-items: center; gap: 6px; margin: 0; }
.trust { list-style: none; margin: 18px 0 0; padding: 16px 0 0; border-top: 1px solid var(--border); text-align: left; display: grid; gap: 10px; }
.trust li { display: flex; gap: 12px; align-items: flex-start; font-size: 0.925rem; color: var(--text-2); }
.trust .ic { color: var(--brand); margin-top: 1px; }
.card-test { border: 1.5px dashed var(--accent-600); background: linear-gradient(var(--accent-50), var(--surface) 70%); }
.card-test h2 { font-size: 1.1rem; }
.card-dev { border-style: dashed; }

/* ---------- admin ---------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); padding: 12px 14px; display: flex; flex-direction: column; }
.stat-n { font-size: 1.6rem; font-weight: 800; color: var(--brand); line-height: 1.1; }
.stat-l { font-size: 0.8rem; color: var(--muted); }
.table { width: 100%; border-collapse: collapse; font-size: 0.925rem; }
.table th { text-align: left; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); background: var(--surface-2); padding: 10px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--surface-2); }
.person-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; text-decoration: none; min-height: 36px; }
.ok-mark { color: var(--ok); }
@media (max-width: 759px) {
  .table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .table, .table tbody, .table tr, .table td { display: block; }
  .table tr { padding: 12px 16px; border-bottom: 1px solid var(--border); }
  .table tbody tr:last-child { border-bottom: 0; }
  .table td { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; border: 0; }
  .table td::before { content: attr(data-label); color: var(--muted); font-size: 0.85rem; }
  .table td:first-child { padding-bottom: 8px; }
  .table td:first-child::before { content: none; }
}
.tree { list-style: none; margin: 0; padding: 0; }
.tree-node { position: relative; padding: 4px 0 4px 28px; }
.tree-node::before { content: ""; position: absolute; left: 9px; top: 0; bottom: 0; border-left: 2px solid var(--border-strong); }
.tree-node::after { content: ""; position: absolute; left: 9px; top: 50%; width: 14px; border-top: 2px solid var(--border-strong); }
.tree-node:first-child::before { top: 50%; }
ol.tree .tree-node:last-child::before { bottom: 50%; }
ol.tree .tree-node:only-child::before { display: none; }
ul.tree-children .tree-node:last-child::before { bottom: 50%; }
.tree-self .person-link { background: var(--accent-50); color: var(--accent-ink); padding: 2px 10px 2px 4px; border-radius: 999px; box-shadow: inset 0 0 0 1.5px var(--accent); }
.tree-root { padding-top: 8px; padding-bottom: 8px; }

/* ---------- footer / tab bar ---------- */
.footer {
  display: flex; gap: 10px; align-items: flex-start; max-width: 1160px; width: 100%; margin: 0 auto; padding: 18px 16px 24px;
  color: var(--muted); font-size: 0.825rem; border-top: 1px solid var(--border);
}
.footer p { margin: 0; }
.footer .ic { color: var(--brand); opacity: 0.7; }
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: grid; grid-template-columns: repeat(3, 1fr);
  padding: 4px 6px calc(4px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(10px);
  border-top: 1px solid var(--border); box-shadow: 0 -4px 16px rgba(16, 30, 60, 0.06);
}
.tabbar a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 56px; border-radius: 12px; color: var(--muted); text-decoration: none; font-size: 0.75rem; font-weight: 600;
}
.tabbar .ic { width: 24px; height: 24px; }
.tabbar a[aria-current="page"] { color: var(--brand); }
.tabbar a[aria-current="page"] .ic { background: var(--brand-50); border-radius: 999px; padding: 3px; width: 44px; height: 30px; }

/* ---------- larger screens ---------- */
@media (min-width: 560px) {
  .tiles { grid-template-columns: repeat(3, 1fr); }
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .form-actions { flex-direction: row-reverse; justify-content: flex-start; }
  .form-actions .btn { width: auto; }
  .filters { grid-template-columns: 1fr 1fr auto; align-items: end; }
  .filter-actions .btn { flex: none; }
  .item-post, .item-outgoing { grid-template-columns: 1fr auto; align-items: center; }
  .choice { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 900px) {
  body.has-tabbar { padding-bottom: 0; }
  .tabbar { display: none; }
  .mainnav { display: flex; }
  .usermenu .uname { display: inline; }
  .page-actions { display: flex; }
  .jump { display: none; }
  .columns { grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
  main { padding-top: 28px; }
  h1 { font-size: 1.75rem; }
  .card { padding: 22px; }
  .tiles { grid-template-columns: repeat(5, 1fr); }
  .row-actions > form, .row-actions > .btn { flex: 0 0 auto; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
.stack-lg .grid-2 { gap: 16px; }
.grid-2 > .card { margin-top: 0; }

/* ---------- free-seat picker (Mano skelbimai) ---------- */
.item-offer { grid-template-columns: 1fr !important; }
.item-main { display: grid; gap: 10px; min-width: 0; }
.item-offer .row-actions { justify-content: flex-end; }
.item-offer .row-actions > form { flex: 0 0 auto; }
.seats-form { display: grid; grid-template-columns: 1fr; gap: 8px; align-items: end; }
.seats-form .field { margin: 0; }
.seats-form .hint { margin: 0; }
.seg-seats { grid-template-columns: repeat(9, 1fr); }
.seg-seats .seg-item span { min-height: 44px; }
.seg-zero input:checked + span { background: var(--err); color: #fff; }
.is-full .mini { opacity: 0.75; }
.chip-full { background: var(--err-bg); border-color: transparent; color: var(--err); font-weight: 700; }
.chip-full .ic { color: var(--err); }
.seats-form.changed .btn { background: #0b3d91; color: #fff; border-color: transparent; }
@media (max-width: 419px) {
  .seg-seats { grid-template-columns: repeat(5, 1fr); }
  .seg-seats .seg-item:nth-child(-n + 5) span { border-bottom: 1px solid var(--border); }
  .seg-seats .seg-item:nth-child(6) span { border-left: 0; }
}
@media (min-width: 560px) {
  .seats-form { grid-template-columns: 1fr auto; }
  .seats-form .hint { grid-column: 1 / -1; }
}

/* =====================================================================
   UX round 1: calmer structure – home, step-by-step flow, trips
   ===================================================================== */
main { max-width: 760px; }
.topbar-inner { max-width: 760px; }
.footer { max-width: 760px; }
.mainnav { margin-left: auto; }
.mainnav a { position: relative; }
.nav-ic { position: relative; display: inline-flex; }
.badge {
  position: absolute; top: -6px; right: -10px; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 999px; background: #c62828; color: #fff; font-size: 0.72rem; font-weight: 800;
  display: inline-grid; place-items: center; box-shadow: 0 0 0 2px var(--surface);
}
.topbar .badge { box-shadow: 0 0 0 2px #0b3d91; }
.tabbar a { font-size: 0.8rem; }

.hello { font-size: 1.6rem; margin: 4px 0 16px; }
.home-section { margin-bottom: 22px; }
.home-section > .card + .card { margin-top: 12px; }
.attn-title { color: var(--text); }

/* big choices */
.big-choices { display: grid; gap: 12px; }
.big-choice {
  display: flex; align-items: center; gap: 16px; min-height: 96px; padding: 18px 18px 18px 20px;
  border-radius: 18px; text-decoration: none; color: #fff; background: #0b3d91;
  box-shadow: 0 6px 18px rgba(11, 61, 145, 0.25); transition: transform 0.08s, box-shadow 0.15s;
}
.big-choice:hover { color: #fff; box-shadow: 0 10px 24px rgba(11, 61, 145, 0.32); }
.big-choice:active { transform: scale(0.99); }
.bc-have { background: var(--accent); color: #2b2100; box-shadow: 0 6px 18px rgba(200, 150, 0, 0.28); }
.bc-have:hover { color: #2b2100; }
.bc-dest { min-height: 76px; }
.bc-ic { width: 40px; height: 40px; flex: none; padding: 7px; border-radius: 12px; background: rgba(255, 255, 255, 0.16); }
.bc-have .bc-ic { background: rgba(255, 255, 255, 0.45); }
.bc-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.bc-title { font-size: 1.2rem; font-weight: 750; line-height: 1.2; }
.bc-sub { font-size: 0.9rem; opacity: 0.9; margin-top: 2px; }
.bc-chev { width: 22px; height: 22px; transform: rotate(-90deg); opacity: 0.8; flex: none; }
.big-choices.two { grid-template-columns: 1fr 1fr; }
@media (prefers-color-scheme: dark) { .big-choice:not(.bc-have) { background: #2f5fc4; } }

/* attention / agreed cards */
.attn { border-left: 5px solid var(--accent); }
.agreed { border-left: 5px solid var(--ok); }
.person { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.person p { margin: 0; }
.person-name { font-size: 1.05rem; line-height: 1.3; }
.trip-line { display: flex; gap: 8px; align-items: flex-start; font-weight: 600; margin: 0 0 12px; color: var(--text-2); }
.trip-line .ic { color: var(--brand); margin-top: 2px; }
.two-btn { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.two-btn > form .btn, .two-btn > .btn { width: 100%; min-width: 0; white-space: normal; padding-left: 10px; padding-right: 10px; }
.two-btn form.inline { display: block; }
.agreed .btn + .btn { margin-top: 8px; }
.attn .hint { margin-bottom: 0; }

/* status list on home */
.status-list { list-style: none; margin: 0; padding: 0; }
.status-list li + li { border-top: 1px solid var(--border); }
.status-row { display: flex; align-items: center; gap: 12px; padding: 14px 16px; min-height: 64px; color: var(--text); text-decoration: none; }
.status-row:hover { background: var(--surface-2); color: var(--text); }
.sr-ic { width: 22px; height: 22px; color: var(--brand); flex: none; }
.sr-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.sr-title { font-weight: 650; }
.sr-status { color: var(--text-2); font-size: 0.9rem; }
.sr-attn .sr-status { color: var(--warn); font-weight: 700; }
.sr-wait .sr-status { color: var(--muted); }
.sr-chev { width: 18px; height: 18px; transform: rotate(-90deg); color: var(--muted); flex: none; }

/* flow */
.flow { max-width: 560px; margin: 0 auto; }
.flow-head { display: flex; align-items: center; justify-content: space-between; margin: -6px 0 8px; }
.flow-back { padding-left: 6px; font-size: 1rem; }
.flow-step { color: var(--muted); font-size: 0.875rem; font-weight: 600; }
.progress { display: flex; gap: 4px; margin-bottom: 18px; }
.progress span { flex: 1; height: 5px; border-radius: 3px; background: var(--border); }
.progress .done { background: var(--brand); }
.progress .now { background: var(--accent); }
.flow-kicker { display: flex; align-items: center; gap: 6px; color: var(--brand); font-weight: 700; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 4px; }
.flow-q { font-size: 1.55rem; margin-bottom: 16px; }
.group-label { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 18px 0 8px; }
.pick-list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.pick-list li + li { border-top: 1px solid var(--border); }
.pick { display: flex; align-items: center; gap: 14px; min-height: 58px; padding: 10px 16px; color: var(--text); text-decoration: none; font-size: 1.08rem; font-weight: 550; }
.pick:hover { background: var(--brand-50); color: var(--text); }
.pick-ic { width: 28px; height: 28px; color: var(--brand); flex: none; }
.pick-text { flex: 1; display: flex; flex-direction: column; }
.pick-sub { font-size: 0.875rem; color: var(--muted); font-weight: 400; }
.pick-chev { width: 18px; height: 18px; transform: rotate(-90deg); color: var(--muted); flex: none; }
.pick-recent { border-color: var(--accent); }
.pick-cars .pick { min-height: 66px; }
.pick-cars .pick-ic { width: 36px; height: 36px; }
.more-list { margin-top: 16px; }
.more-list .pick-ic { width: 24px; height: 24px; }
.disclose { margin-top: 16px; }
.disclose > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 16px;
  border: 1.5px dashed var(--border-strong); border-radius: 14px; color: var(--brand); font-weight: 650;
}
.disclose > summary::-webkit-details-marker { display: none; }
.disclose > summary .ic { transition: transform 0.15s; }
.disclose[open] > summary { margin-bottom: 12px; }
.disclose[open] > summary .ic:first-child { transform: rotate(180deg); }
.date-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pick-date {
  display: flex; flex-direction: column; justify-content: center; min-height: 70px; padding: 10px 14px;
  background: var(--surface); border: 1.5px solid var(--border-strong); border-radius: 14px; color: var(--text); text-decoration: none;
}
.pick-date:hover { border-color: var(--brand); background: var(--brand-50); color: var(--text); }
.pd-w { font-weight: 700; font-size: 1.02rem; }
.pd-d { color: var(--text-2); }
.other-date { display: grid; gap: 10px; }
.num-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.pick-num {
  display: grid; place-items: center; min-height: 72px; border-radius: 16px; font-size: 1.6rem; font-weight: 800;
  background: var(--surface); border: 1.5px solid var(--border-strong); color: var(--brand); text-decoration: none;
}
.pick-num:hover { background: var(--brand-50); border-color: var(--brand); }
.cta-card { margin: 18px 0; background: var(--brand-50); border-color: transparent; }
.cta-q { font-weight: 750; font-size: 1.1rem; margin-bottom: 4px; }
.flow .post + .post, .flow .lead + .post { margin-top: 12px; }
.summary { margin: 0 0 14px; padding: 4px 18px; }
.sum-row { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "dt ch" "dd ch"; padding: 12px 0; border-top: 1px solid var(--border); align-items: center; }
.sum-row:first-child { border-top: 0; }
.sum-row dt { grid-area: dt; font-size: 0.8rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.sum-row dd { grid-area: dd; margin: 0; font-size: 1.1rem; font-weight: 650; }
.sum-change { grid-area: ch; display: inline-grid; place-items: center; min-height: 44px; padding: 0 12px; font-weight: 600; }
.next-box { display: flex; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--ok-bg); color: var(--text); margin-bottom: 16px; }
.next-box .ic { color: var(--ok); margin-top: 2px; }
.next-box p { margin: 0; }

/* post cards: fewer badges */
.post-facts { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 4px; color: var(--text-2); }
.post-facts li { display: flex; align-items: center; gap: 8px; }
.post-facts .ic { color: var(--muted); }

/* my trips */
.mine { margin-top: 12px; }
.mine-kind { display: flex; align-items: center; gap: 6px; font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin-bottom: 2px; }
.mine-route { font-size: 1.25rem; margin: 0 0 2px; }
.mine-meta { color: var(--text-2); margin-bottom: 14px; }
.stepper-form { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); }
.stepper-label { display: flex; align-items: center; gap: 8px; font-weight: 650; }
.stepper-label .ic { color: var(--brand); }
.stepper { display: flex; align-items: center; gap: 6px; }
.step-btn {
  width: 52px; height: 52px; border-radius: 14px; border: 1.5px solid var(--border-strong); background: var(--surface);
  color: var(--brand); font: inherit; font-size: 1.6rem; font-weight: 700; line-height: 1; cursor: pointer;
}
.step-btn:hover:not([disabled]) { background: var(--brand-50); border-color: var(--brand); }
.step-btn[disabled] { opacity: 0.35; cursor: not-allowed; }
.step-val { min-width: 40px; text-align: center; font-size: 1.6rem; font-weight: 800; }
.is-full .step-val { color: var(--err); }
.full-btn { margin-top: 6px; }
form.inline:has(.full-btn) { display: block; }
.full-btn { width: 100%; }
.full-note { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0 0; color: var(--text-2); font-size: 0.9rem; }
.people { display: grid; gap: 10px; margin-top: 14px; }
.people .card { margin: 0; box-shadow: none; background: var(--surface-2); }
.people-empty { margin: 14px 0 0; }
.mine-foot { display: flex; justify-content: flex-end; margin-top: 10px; border-top: 1px solid var(--border); padding-top: 6px; }
.danger-link { color: var(--err); }
.danger-link:hover { color: var(--err); background: var(--err-bg); }
.waiting { margin-top: 12px; }
.waiting .row-actions { justify-content: space-between; }
.waiting .row-actions > form { flex: 0 0 auto; }
#kiti > .card { margin-top: 12px; }

/* more / invite / settings / help */
.logout { margin-top: 16px; }
.logout form.inline { display: block; }
.invite-main { text-align: left; }
.invite-link { margin: 8px 0 14px; padding: 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); overflow-wrap: anywhere; }
.secondary-actions { margin-top: 12px; }
.secondary-actions form.inline, .disclose form.inline { display: block; }
.big-status { display: flex; gap: 10px; align-items: flex-start; font-size: 1.05rem; font-weight: 650; padding: 12px 14px; border-radius: 12px; }
.big-status.on { background: var(--ok-bg); color: var(--ok); }
.big-status.paused { background: var(--warn-bg); color: var(--warn); }
.big-status .ic { margin-top: 3px; }
.pause-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.pause-grid form.inline { display: block; }
.pause-grid .btn { width: 100%; padding: 0 6px; }
.help-steps { list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 12px; }
.help-steps li { display: flex; gap: 14px; margin: 0; }
.help-n { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: #0b3d91; color: #fff; font-weight: 800; }
.help-t { font-weight: 700; margin-bottom: 2px; display: flex; gap: 6px; align-items: center; }
.help-t .ic { color: var(--brand); }
@media (min-width: 560px) {
  .big-choices:not(.two) { grid-template-columns: 1fr 1fr; }
  .date-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 900px) {
  .mainnav { display: flex; }
  .columns { grid-template-columns: 1fr; }
}

/* UX round 2 */
.big-choices.stack, .big-choices.one { grid-template-columns: minmax(0, 1fr) !important; }
.big-choices > * { min-width: 0; }
.route-lead { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--text); }
.route-lead .ic { color: var(--brand); }
.post.compact { padding-top: 14px; }
.post-when { display: flex; align-items: center; gap: 10px; font-size: 1.15rem; font-weight: 700; margin: 0 0 8px; }
.post-when .ic { color: var(--brand); width: 1.3em; height: 1.3em; }
.pw-l { display: block; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.stack-btn { display: grid; gap: 10px; }
.stack-btn .btn { width: 100%; }
.pause-grid { grid-template-columns: 1fr 1fr; }
.gate { text-align: left; }
.gate .big-ic { margin-bottom: 4px; }

/* ---------- Language choice (Lietuvių / Українська) ---------- */
.lang-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 16px; }
.lang-switch form.inline { display: block; }
.lang-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: var(--tap); padding: 10px 14px;
  border: 2px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); font: inherit; font-weight: 600; font-size: 1.05rem;
  text-decoration: none; cursor: pointer;
}
.lang-btn:hover { border-color: var(--brand); background: var(--brand-50); color: var(--text); }
.lang-btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.lang-btn.is-current { border-color: var(--brand); background: var(--brand-50); box-shadow: inset 0 0 0 1px var(--brand); }
.flag { width: 28px; height: 19px; flex: none; border-radius: 3px; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12); }
.lang-big { grid-template-columns: 1fr; gap: 12px; margin: 18px 0; }
.lang-big .lang-btn { min-height: 64px; font-size: 1.25rem; justify-content: flex-start; padding: 14px 20px; }
.lang-big .flag { width: 36px; height: 24px; }
.lang-choice h1 { text-align: center; }
