/* =========================================================
   BEBRYNĖ portalas · programos apvalkalas
   Svetainės pasaulis (Fraunces + Inter Tight, kremas ir pušų žalia,
   šviesi ir tamsi tema), bet darbo įrankio tankumas.
   Žetonų vardai seni (--green, --paper, --ink-soft…), nes juos
   naudoja perkelti moduliai; reikšmės iš naujos svetainės.
   ========================================================= */
@font-face { font-family: "Fraunces"; src: url("../fonts/Fraunces.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Inter Tight"; src: url("../fonts/InterTight.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  color-scheme: light;
  --sand: #f5f0e8;           /* puslapio fonas (svetainės kremas) */
  --panel: #ede6da;          /* šoninis meniu: antras neutralus sluoksnis */
  --paper: #fffdf9;          /* kortelės, lentelės */
  --cream: #f7f2ea;          /* lentelių galvos, poskyriai */
  --input: #ffffff;
  --green: #3d6b3f; --green-dark: #2c4f2e; --green-deep: #15281a;
  --green-soft: #dfe8da; --green-tint: #edf2e8; --on-green: #ffffff;
  --line: rgba(21, 40, 26, .13); --line-soft: rgba(21, 40, 26, .075);
  --ink: #15281a; --ink-soft: #4f5d53; --ink-faint: #677369;
  --gold: #8a6416; --gold-soft: #f1e6cc;
  --amber: #8f5f08; --amber-soft: #f5e7c9;
  --red: #a3362e; --red-soft: #f6e1dc;
  --blue: #2f5c8a; --blue-soft: #e1eaf4;
  --radius: 16px; --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(21, 40, 26, .05), 0 8px 24px rgba(21, 40, 26, .05);
  --shadow-lg: 0 24px 60px rgba(21, 40, 26, .18);
  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --side: 256px;
  --tabbar: 64px;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --sand: #0f1a13; --panel: #0b140e; --paper: #16231a; --cream: #132018; --input: #1a281e;
  --green: #9cc791; --green-dark: #b9dcaf; --green-deep: #e9eee6;
  --green-soft: rgba(156, 199, 145, .17); --green-tint: rgba(156, 199, 145, .09); --on-green: #102015;
  --line: rgba(233, 238, 230, .13); --line-soft: rgba(233, 238, 230, .07);
  --ink: #e9eee6; --ink-soft: rgba(233, 238, 230, .74); --ink-faint: rgba(233, 238, 230, .58);
  --gold: #dcbb72; --gold-soft: rgba(220, 187, 114, .14);
  --amber: #e5b766; --amber-soft: rgba(229, 183, 102, .14);
  --red: #f1a491; --red-soft: rgba(241, 120, 100, .15);
  --blue: #a3c4ea; --blue-soft: rgba(120, 160, 220, .15);
  --shadow: 0 1px 2px rgba(0, 0, 0, .25), 0 10px 28px rgba(0, 0, 0, .22);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, .5);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --sand: #0f1a13; --panel: #0b140e; --paper: #16231a; --cream: #132018; --input: #1a281e;
    --green: #9cc791; --green-dark: #b9dcaf; --green-deep: #e9eee6;
    --green-soft: rgba(156, 199, 145, .17); --green-tint: rgba(156, 199, 145, .09); --on-green: #102015;
    --line: rgba(233, 238, 230, .13); --line-soft: rgba(233, 238, 230, .07);
    --ink: #e9eee6; --ink-soft: rgba(233, 238, 230, .74); --ink-faint: rgba(233, 238, 230, .58);
    --gold: #dcbb72; --gold-soft: rgba(220, 187, 114, .14);
    --amber: #e5b766; --amber-soft: rgba(229, 183, 102, .14);
    --red: #f1a491; --red-soft: rgba(241, 120, 100, .15);
    --blue: #a3c4ea; --blue-soft: rgba(120, 160, 220, .15);
    --shadow: 0 1px 2px rgba(0, 0, 0, .25), 0 10px 28px rgba(0, 0, 0, .22);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, .5);
  }
}

/* ============ PAGRINDAS ============ */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: color-mix(in srgb, var(--green) 45%, transparent) transparent; }
body {
  font-family: var(--sans); font-size: 15px; line-height: 1.5; color: var(--ink); background: var(--sand);
  -webkit-font-smoothing: antialiased; font-variant-numeric: lining-nums tabular-nums;
  caret-color: var(--green); accent-color: var(--green); min-height: 100vh; overflow-x: clip;
}
body.modal-open { overflow: hidden; }
::selection { background: color-mix(in srgb, var(--green) 28%, transparent); color: var(--ink); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--green) 35%, transparent); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }
.hidden { display: none !important; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; }
input, select, textarea { font: inherit; color: inherit; }
a { color: var(--green-dark); text-underline-offset: 3px; text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; border-radius: 8px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; letter-spacing: -.01em; color: var(--ink); font-variation-settings: "opsz" 72, "SOFT" 30; text-wrap: balance; }
b, strong { font-weight: 600; }
svg { flex: 0 0 auto; }
.ic { width: 1.05em; height: 1.05em; vertical-align: -0.17em; flex: 0 0 auto; }
.ic-sm { width: .85em; height: .85em; }

/* ============ MYGTUKAI ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  min-height: 38px; padding: .5rem 1rem; border: 1px solid transparent; border-radius: 999px;
  font-size: .9rem; font-weight: 600; line-height: 1.1; white-space: nowrap; text-decoration: none;
  background: var(--green-tint); color: var(--green-dark);
  transition: background-color .16s, border-color .16s, color .16s, box-shadow .16s, transform .12s;
}
.btn:hover { background: var(--green-soft); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--green); color: var(--on-green); box-shadow: 0 1px 0 rgba(255,255,255,.18) inset, 0 4px 14px color-mix(in srgb, var(--green) 28%, transparent); }
.btn-primary:hover { background: color-mix(in srgb, var(--green) 86%, #000); color: var(--on-green); }
:root[data-theme="dark"] .btn-primary:hover { background: var(--green-dark); }
.btn-outline { background: var(--paper); border-color: var(--line); color: var(--ink); }
.btn-outline:hover { background: var(--paper); border-color: var(--green); color: var(--green-dark); }
.btn-ghost { background: transparent; color: var(--ink-soft); }
.btn-ghost:hover { background: var(--green-tint); color: var(--green-dark); }
.btn-danger { background: var(--red-soft); color: var(--red); }
.btn-danger:hover { background: var(--red); color: #fff; }
:root[data-theme="dark"] .btn-danger:hover { color: #1d0d0a; }
.btn-gold { background: var(--gold-soft); color: var(--gold); }
.btn-gold:hover { background: color-mix(in srgb, var(--gold) 22%, transparent); }
.btn-block { width: 100%; }
.btn-sm { min-height: 32px; padding: .32rem .75rem; font-size: .82rem; }
.btn-icon { min-width: 32px; padding: .3rem .45rem; }
.btn .ic, .btn svg { width: 16px; height: 16px; }
.btn[disabled], .btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn.is-loading { position: relative; color: transparent !important; pointer-events: none; }
.btn.is-loading::after { content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-color: var(--on-green) var(--on-green) transparent transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============ PRISIJUNGIMAS ============ */
.login-screen {
  min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px;
  background: linear-gradient(180deg, rgba(10, 20, 13, .35), rgba(10, 20, 13, .72)), url("../img/hero-poster.webp") center / cover no-repeat, #15281a;
}
.login-card {
  width: 100%; max-width: 400px; padding: 36px 32px 28px; border-radius: 24px;
  background: rgba(250, 247, 241, .9); color: #15281a;
  -webkit-backdrop-filter: blur(18px) saturate(1.2); backdrop-filter: blur(18px) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, .6); box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
}
:root[data-theme="dark"] .login-card { background: rgba(19, 32, 24, .86); color: #e9eee6; border-color: rgba(255,255,255,.1); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .login-card { background: rgba(19, 32, 24, .86); color: #e9eee6; border-color: rgba(255,255,255,.1); } }
.login-logo { font-family: var(--serif); font-size: 30px; letter-spacing: .04em; line-height: 1; color: var(--green-dark); margin-bottom: 28px; }
.login-logo span { display: block; font-family: var(--sans); font-size: 13px; letter-spacing: 0; color: var(--ink-soft); margin-top: 6px; }
.login-card h1 { font-size: 26px; margin-bottom: 4px; color: inherit; }
.login-sub { color: var(--ink-soft); font-size: 14px; margin-bottom: 22px; }
.login-card label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 14px; }
.login-card input { display: block; width: 100%; margin-top: 6px; height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--input); font-size: 15px; }
.login-card input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.login-card .btn { min-height: 46px; font-size: 15px; margin-top: 4px; }
.login-error { color: var(--red); font-size: 13.5px; min-height: 20px; margin: -2px 0 8px; }
.demo-note { margin-top: 18px; font-size: 12.5px; color: var(--ink-soft); text-align: center; }

/* ============ IŠDĖSTYMAS ============ */
.app { min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--side); z-index: 60;
  display: flex; flex-direction: column; padding: 22px 14px 14px;
  background: var(--panel); border-right: 1px solid var(--line-soft);
}
.brand { font-family: var(--serif); font-size: 24px; letter-spacing: .05em; color: var(--green-dark); padding: 2px 10px 20px; line-height: 1; }
.brand span { display: block; font-family: var(--sans); font-size: 12.5px; letter-spacing: 0; color: var(--ink-faint); margin-top: 6px; }
.nav { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; margin: 0 -4px; padding: 0 4px; scrollbar-width: thin; }
.nav-group { display: flex; flex-direction: column; gap: 1px; }
.nav-label { font-size: 12px; color: var(--ink-faint); padding: 16px 10px 6px; }
.nav-item {
  display: flex; align-items: center; gap: 11px; width: 100%; min-height: 36px; padding: 7px 10px;
  border-radius: 10px; color: var(--ink-soft); font-size: 14px; font-weight: 500; text-align: left;
  transition: background-color .14s, color .14s;
}
.nav-item > span:not(.nav-badge) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-item svg, .nav-item .ico { width: 18px; height: 18px; color: var(--ink-faint); transition: color .14s; }
.nav-item:hover { background: color-mix(in srgb, var(--paper) 60%, transparent); color: var(--ink); }
.nav-item.active { background: var(--paper); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(21,40,26,.06); }
.nav-item.active svg { color: var(--green); }
.nav-badge {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--red); color: #fff; font-size: 11.5px; font-weight: 700; line-height: 1;
}
:root[data-theme="dark"] .nav-badge { color: #1d0d0a; }
.nav-badge.soft { background: var(--amber-soft); color: var(--amber); }
.sidebar-footer { border-top: 1px solid var(--line-soft); padding-top: 12px; margin-top: 10px; display: grid; gap: 10px; }
.theme-seg { display: grid; grid-template-columns: repeat(3, 1fr); background: color-mix(in srgb, var(--ink) 6%, transparent); border-radius: 10px; padding: 3px; }
.theme-seg button { height: 30px; border-radius: 8px; display: grid; place-items: center; color: var(--ink-faint); }
.theme-seg button svg { width: 16px; height: 16px; }
.theme-seg button:hover { color: var(--ink); }
.theme-seg button.on { background: var(--paper); color: var(--green-dark); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.user-row { display: flex; align-items: center; gap: 8px; padding: 0 4px 0 10px; }
.user-chip { flex: 1; min-width: 0; font-size: 12.5px; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn-logout { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: var(--ink-faint); }
.btn-logout:hover { background: var(--red-soft); color: var(--red); }
.btn-logout svg { width: 17px; height: 17px; }
.sidebar-scrim, .tabbar { display: none; }

.main { margin-left: var(--side); padding: 32px 40px 64px; max-width: calc(1240px + var(--side)); outline: none; }
.main > * { max-width: 1240px; }

/* ============ PUSLAPIO GALVA ============ */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head h1 { font-size: 34px; line-height: 1.08; }
.page-head .sub { color: var(--ink-soft); font-size: 14px; margin-top: 6px; }
.head-actions, .page-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ============ KORTELĖS ============ */
.card { background: var(--paper); border: 1px solid var(--line-soft); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 22px; }
.card.is-danger, .card.alert-card { background: color-mix(in srgb, var(--red-soft) 70%, var(--paper)); border-color: color-mix(in srgb, var(--red) 25%, transparent); }
.card.alert-card { background: color-mix(in srgb, var(--amber-soft) 75%, var(--paper)); border-color: color-mix(in srgb, var(--amber) 25%, transparent); }
.warn-card { border: 1px solid color-mix(in srgb, var(--gold) 25%, transparent); border-radius: var(--radius); }
.grid { display: grid; gap: 14px; }
.stat-grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-bottom: 24px; }
.stat { background: var(--paper); border: 1px solid var(--line-soft); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px 18px; position: relative; }
.stat::before { content: none; }
.stat .label { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: var(--ink-soft); }
.stat .label::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--green); flex: 0 0 auto; }
.stat .value { font-family: var(--serif); font-size: 30px; line-height: 1.1; margin-top: 8px; color: var(--ink); font-variation-settings: "opsz" 48; }
.stat .value small { font-family: var(--sans); font-size: 14px; color: var(--ink-faint); }
.stat .foot { font-size: 12.5px; color: var(--ink-faint); margin-top: 4px; }
.stat.amber .label::before { background: var(--amber); }
.stat.gold .label::before { background: var(--gold); }
.stat.blue .label::before { background: var(--blue); }
.stat.red .label::before { background: var(--red); }
a.stat, button.stat { text-align: left; color: inherit; text-decoration: none; transition: border-color .15s, transform .15s; }
a.stat:hover, button.stat:hover { border-color: var(--line); transform: translateY(-1px); }
.section-title { font-family: var(--serif); font-size: 22px; color: var(--ink); margin: 28px 0 12px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.section-title:first-child { margin-top: 0; }
.card > .section-title:first-child { margin-top: 0; }

/* ============ LENTELĖS ============ */
.table-wrap { background: var(--paper); border: 1px solid var(--line-soft); border-radius: var(--radius); box-shadow: var(--shadow); overflow: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12.5px; font-weight: 600; color: var(--ink-soft); padding: 11px 14px; background: var(--cream); border-bottom: 1px solid var(--line); white-space: nowrap; position: sticky; top: 0; }
td { padding: 11px 14px; border-bottom: 1px solid var(--line-soft); font-size: 14px; vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: var(--green-tint); }
tr.clickable:focus-visible { outline: 2px solid var(--green); outline-offset: -2px; }
tr.danger td { background: var(--red-soft); }
tr.danger.clickable:hover td { background: color-mix(in srgb, var(--red) 18%, transparent); }
td.num, th.num { text-align: right; }
.empty { padding: 44px 20px; text-align: center; color: var(--ink-soft); font-size: 14px; }
.empty .big svg { width: 36px; height: 36px; stroke-width: 1.4; color: var(--ink-faint); margin-bottom: 10px; }
.empty .big { line-height: 1; }
.empty b { display: block; color: var(--ink); font-size: 15px; margin-bottom: 4px; }

/* ============ ŽENKLELIAI ============ */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap; background: var(--line-soft); color: var(--ink-soft); line-height: 1.35; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.badge.no-dot::before { content: none; }
.badge.confirmed, .badge.paid, .badge.ok { background: var(--green-soft); color: var(--green-dark); }
.badge.pending, .badge.partial, .badge.pending_advance { background: var(--amber-soft); color: var(--amber); }
.badge.awaiting_balance { background: var(--gold-soft); color: var(--gold); }
.badge.unpaid, .badge.err { background: var(--red-soft); color: var(--red); }
.badge.checked_in, .badge.info { background: var(--blue-soft); color: var(--blue); }
.badge.cancelled { color: var(--ink-faint); text-decoration: line-through; }
.badge.finished, .badge.muted, .badge.blocked { background: var(--line-soft); color: var(--ink-soft); }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 8px; font-size: 12.5px; font-weight: 600; background: var(--green-tint); color: var(--green-dark); margin: 0 4px 4px 0; }
button.tag { border: 0; font-family: inherit; cursor: pointer; }
.tag-ok { background: var(--green-soft); color: var(--green-dark); }
.tag-wait { background: var(--line-soft); color: var(--ink-soft); }
.tag-wait:hover { background: var(--green-soft); color: var(--green-dark); }
.chip { display: inline-flex; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; }
.chip-invoice { background: var(--green-tint); color: var(--green-dark); }
.chip-advance { background: var(--gold-soft); color: var(--gold); }
.chip-contract { background: var(--blue-soft); color: var(--blue); }

/* ============ FORMOS ============ */
.form-row { display: grid; gap: 14px; margin-bottom: 14px; }
.form-row.two { grid-template-columns: 1fr 1fr; }
.form-row.three { grid-template-columns: 1fr 1fr 1fr; }
.field { display: flex; flex-direction: column; margin-bottom: 14px; min-width: 0; }
.field.mb0 { margin-bottom: 0; }
.field label, .flabel { font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.field input, .field select, .field textarea, .modal textarea, .inp,
.check-row select, .svc-line input[type=number], .line-row input, select.flag-method {
  width: 100%; min-height: 40px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--input); color: var(--ink); font-size: 14.5px; transition: border-color .15s, box-shadow .15s;
}
.field textarea, .modal textarea { min-height: 84px; resize: vertical; line-height: 1.5; }
.field input:focus, .field select:focus, .field textarea:focus, .modal textarea:focus, .inp:focus,
.check-row select:focus, .svc-line input:focus, .line-row input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.field input[readonly] { background: var(--cream); color: var(--ink-soft); }
input:disabled, select:disabled, textarea:disabled { opacity: .55; cursor: not-allowed; }
.field .hint, .hint { font-size: 12.5px; color: var(--ink-faint); margin-top: 5px; line-height: 1.45; }
input::placeholder, textarea::placeholder { color: var(--ink-faint); opacity: 1; }
.fieldset { border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px 6px; margin-bottom: 16px; }
.fieldset legend { font-size: 13px; font-weight: 600; color: var(--ink-soft); padding: 0 6px; }
.check-row { display: flex; align-items: center; gap: 10px; padding: 7px 2px; min-height: 40px; }
.check-row input[type=checkbox], .svc-line input[type=checkbox] { width: 18px; height: 18px; flex: 0 0 auto; accent-color: var(--green); }
.check-row label { margin: 0; font-weight: 500; font-size: 14px; }
.svc-line { display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 10px; padding: 8px 2px; border-bottom: 1px solid var(--line-soft); }
.svc-line:last-child { border-bottom: 0; }
.svc-line .qty { width: 72px; }
.svc-line .svc-price { font-size: 13px; }
.seg { display: inline-flex; background: color-mix(in srgb, var(--ink) 6%, transparent); border-radius: 999px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { padding: 6px 14px; border-radius: 999px; font-size: 13.5px; font-weight: 600; color: var(--ink-soft); }
.seg button:hover { color: var(--ink); }
.seg button.active { background: var(--paper); color: var(--green-dark); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.inline-select { min-height: 38px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); font-size: 14px; font-weight: 600; color: var(--ink); }
.search { position: relative; min-width: 220px; }
.search svg { position: absolute; left: 12px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); color: var(--ink-faint); pointer-events: none; }
.search input { width: 100%; min-height: 38px; padding: 6px 14px 6px 36px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); font-size: 14px; }
.search input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }

/* Filtrų juosta */
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }

/* ============ MODALAS → šoninis lapas ============ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200; display: flex; justify-content: flex-end;
  background: rgba(12, 22, 15, .42); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
  animation: fade .18s ease;
}
.modal {
  position: relative; width: min(600px, 100%); height: 100%; overflow-y: auto; overscroll-behavior: contain;
  background: var(--paper); box-shadow: var(--shadow-lg); padding: 28px 30px 32px;
  animation: sheet .28s var(--ease);
}
.modal.wide { width: min(780px, 100%); }
.modal-overlay.centered { align-items: center; justify-content: center; padding: 16px; }
.modal.small { width: min(440px, 100%); height: auto; max-height: calc(100vh - 32px); border-radius: 20px; animation: pop .2s var(--ease); }
@keyframes sheet { from { transform: translateX(32px); opacity: .4; } to { transform: none; opacity: 1; } }
@keyframes pop { from { transform: scale(.97) translateY(6px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal h2 { font-size: 26px; line-height: 1.15; margin: 0 44px 6px 0; }
.modal .modal-sub { color: var(--ink-soft); font-size: 14px; margin-bottom: 20px; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 24px; flex-wrap: wrap; }
.modal .modal-actions:last-child { position: sticky; bottom: -32px; margin: 24px -30px -32px; padding: 14px 30px 18px; background: color-mix(in srgb, var(--paper) 92%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border-top: 1px solid var(--line-soft); }
.modal.small .modal-actions:last-child { position: static; margin: 22px 0 0; padding: 0; background: none; border: 0; }
.modal-close { position: absolute; top: 20px; right: 20px; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: var(--ink-faint); z-index: 2; }
.modal-close:hover { background: var(--green-tint); color: var(--ink); }
.modal-close svg { width: 20px; height: 20px; }
.modal-section { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line-soft); }
.modal-section > h3 { font-family: var(--sans); font-size: 15px; font-weight: 600; margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

/* ============ PRANEŠIMAI ============ */
.toast-container { position: fixed; right: 20px; bottom: 20px; z-index: 500; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { pointer-events: auto; max-width: 380px; padding: 12px 16px; border-radius: 12px; background: var(--green-deep); color: var(--sand); font-size: 14px; font-weight: 500; box-shadow: var(--shadow-lg); animation: toastIn .28s var(--ease); transition: opacity .3s, transform .3s; }
.toast.error { background: var(--red); color: #fff; }
:root[data-theme="dark"] .toast { background: #e9eee6; color: #102015; }
:root[data-theme="dark"] .toast.error { background: var(--red); color: #1d0d0a; }
.toast.out { opacity: 0; transform: translateY(6px); }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ============ KALENDORIUS ============ */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; flex-wrap: wrap; gap: 12px; }
.cal-head .month { font-family: var(--serif); font-size: 26px; text-transform: capitalize; }
.cal-nav { display: flex; gap: 6px; }
.cal-nav button { display: inline-flex; align-items: center; gap: 4px; min-width: 38px; height: 38px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); font-size: 14px; font-weight: 600; color: var(--ink); }
.cal-nav button:hover { border-color: var(--green); color: var(--green-dark); }
.timeline { background: var(--paper); border: 1px solid var(--line-soft); border-radius: var(--radius); box-shadow: var(--shadow); overflow-x: auto; }
.tl-inner { min-width: 860px; }
.tl-head { display: grid; border-bottom: 1px solid var(--line); }
.tl-row { display: grid; border-bottom: 1px solid var(--line-soft); }
.tl-row:last-child { border-bottom: 0; }
.tl-corner, .tl-label { padding: 8px 12px; font-weight: 600; font-size: 13px; border-right: 1px solid var(--line); display: flex; align-items: center; background: var(--cream); position: sticky; left: 0; z-index: 3; }
.tl-label small { color: var(--ink-faint); font-weight: 500; margin-left: 6px; white-space: nowrap; }
.tl-days { display: grid; }
.tl-dh { text-align: center; padding: 6px 0 7px; font-size: 12px; border-right: 1px solid var(--line-soft); line-height: 1.25; }
.tl-dh .dow { display: block; color: var(--ink-faint); font-size: 11px; }
.tl-dh .dnum { font-weight: 600; color: var(--ink); }
.tl-dh.we { background: var(--cream); }
.tl-dh.today { background: var(--green-soft); }
.tl-dh.today .dnum { color: var(--green-dark); }
.tl-track { position: relative; height: 48px; }
.tl-cell { border-right: 1px solid var(--line-soft); height: 100%; cursor: pointer; }
.tl-cell:hover { background: var(--green-tint); }
.tl-cell.we { background: color-mix(in srgb, var(--cream) 70%, transparent); }
.tl-cell.today { background: var(--green-tint); }
.tl-bar {
  position: absolute; top: 7px; height: 34px; border-radius: 9px; color: var(--on-green);
  font-size: 12.5px; font-weight: 600; padding: 0 10px; display: flex; align-items: center;
  cursor: pointer; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; z-index: 2;
  box-shadow: 0 1px 2px rgba(0,0,0,.12);
}
.tl-bar.confirmed { background: var(--green); }
.tl-bar.pending { background: var(--amber); color: #fff; }
:root[data-theme="dark"] .tl-bar.pending { color: #1f1405; }
.tl-bar.finished, .tl-bar.cancelled { background: color-mix(in srgb, var(--ink) 35%, var(--paper)); color: var(--paper); }
.tl-bar.web { background: var(--blue); color: #fff; }
:root[data-theme="dark"] .tl-bar.web { color: #0d1a28; }
.tl-bar.block { background: repeating-linear-gradient(45deg, color-mix(in srgb, var(--ink) 30%, var(--paper)) 0 7px, color-mix(in srgb, var(--ink) 22%, var(--paper)) 7px 14px); color: var(--ink); }
.tl-bar:hover { filter: brightness(1.06); }
.cal-legend { display: flex; gap: 18px; margin-top: 14px; flex-wrap: wrap; }
.cal-legend span { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ink-soft); }
.dot { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.dot.block { background: color-mix(in srgb, var(--ink) 30%, var(--paper)); }
.tl-stock { display: flex; align-items: center; justify-content: center; font-size: 11.5px; font-weight: 700; }
.tl-stock.part { background: var(--gold-soft); color: var(--gold); }
.tl-stock.full { background: var(--red-soft); color: var(--red); }

/* ============ DETALĖS ============ */
.detail-row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); font-size: 14px; }
.detail-row:last-child { border-bottom: 0; }
.detail-row .k { color: var(--ink-soft); }
.detail-row .v { font-weight: 600; text-align: right; min-width: 0; overflow-wrap: anywhere; }
.detail-row.clickable { cursor: pointer; border-radius: 8px; padding-left: 8px; padding-right: 8px; margin: 0 -8px; }
.detail-row.clickable:hover { background: var(--green-tint); }
.note-box { background: var(--gold-soft); border-radius: 12px; padding: 12px 14px; font-size: 14px; color: var(--ink); margin: 8px 0; }
.note-box b { display: block; font-size: 12.5px; color: var(--gold); margin-bottom: 3px; }
.warn-box { background: var(--red-soft); border-radius: 12px; padding: 12px 14px; font-size: 14px; color: var(--ink); margin: 10px 0; }
.warn-box b { display: flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--red); margin-bottom: 3px; }
.ok-box { background: var(--green-soft); border-radius: 12px; padding: 12px 14px; font-size: 14px; margin: 10px 0; }
.ok-box b { display: flex; align-items: center; gap: 6px; color: var(--green-dark); }
.pay-progress { height: 8px; background: var(--line-soft); border-radius: 999px; overflow: hidden; margin: 10px 0; }
.pay-progress .bar { height: 100%; background: var(--green); border-radius: 999px; transition: width .4s var(--ease); }
.price-summary { background: var(--cream); border: 1px solid var(--line-soft); border-radius: 12px; padding: 12px 16px; margin: 8px 0 14px; }
.price-summary .pr-line { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; padding: 3px 0; color: var(--ink-soft); }
.price-summary .pr-total { display: flex; justify-content: space-between; font-weight: 600; font-size: 16px; color: var(--ink); border-top: 1px solid var(--line); margin-top: 8px; padding-top: 9px; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.mb1 { margin-bottom: 14px; } .mt1 { margin-top: 14px; } .mt2 { margin-top: 22px; }
.muted { color: var(--ink-soft); font-size: 13.5px; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.text-right { text-align: right; }

/* Įvykių laiko juosta (mokėjimai, laiškai rezervacijoje) */
.events { list-style: none; display: grid; gap: 0; }
.events li { display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: start; padding: 9px 0; border-bottom: 1px solid var(--line-soft); font-size: 14px; }
.events li:last-child { border-bottom: 0; }
.events .ev-ic { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--green-tint); color: var(--green-dark); }
.events .ev-ic svg { width: 15px; height: 15px; }
.events .ev-ic.err { background: var(--red-soft); color: var(--red); }
.events .ev-ic.mute { background: var(--line-soft); color: var(--ink-soft); }
.events .ev-t { min-width: 0; }
.events .ev-t b { font-weight: 600; }
.events .ev-t small { display: block; color: var(--ink-faint); font-size: 12.5px; margin-top: 1px; overflow-wrap: anywhere; }
.events .ev-r { text-align: right; font-weight: 600; white-space: nowrap; display: flex; gap: 6px; align-items: center; }

/* Automatikos žingsniai rezervacijoje */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 4px 0 6px; }
.step { border: 1px solid var(--line-soft); border-radius: 12px; padding: 10px 12px; background: var(--cream); font-size: 13px; min-width: 0; }
.step b { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.step b svg { width: 15px; height: 15px; }
.step small { display: block; color: var(--ink-faint); margin-top: 2px; font-size: 12px; }
.step.done { background: var(--green-tint); border-color: color-mix(in srgb, var(--green) 25%, transparent); }
.step.done b { color: var(--green-dark); }
.step.wait b { color: var(--ink-soft); }

/* ============ APŽVALGA ============ */
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.dash-col { display: grid; gap: 16px; min-width: 0; }
.dash-block { margin-top: 20px; }
.dash-block-b { margin-bottom: 20px; }
.list-card { padding: 6px 0; }
.list-card > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 18px 8px; }
.list-card > header h3 { font-family: var(--sans); font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.list-card > header h3 svg { width: 17px; height: 17px; color: var(--green); }
.list-item { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; padding: 10px 18px; border-top: 1px solid var(--line-soft); cursor: pointer; transition: background-color .12s; width: 100%; text-align: left; }
.list-item:hover { background: var(--green-tint); }
.list-item .li-t { font-weight: 600; font-size: 14px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-item .li-s { grid-column: 1; font-size: 13px; color: var(--ink-soft); min-width: 0; }
.list-item .li-r { grid-row: 1 / span 2; grid-column: 2; text-align: right; font-size: 13px; }
.list-empty { padding: 14px 18px 16px; color: var(--ink-faint); font-size: 13.5px; border-top: 1px solid var(--line-soft); }
.today-strip { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-bottom: 16px; }

/* ============ NAUJI UŽSAKYMAI ============ */
.orders { display: grid; gap: 14px; }
.order { background: var(--paper); border: 1px solid var(--line-soft); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px 24px; }
.order-h { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.order-h h3 { font-size: 22px; }
.order-code { font-size: 13px; color: var(--ink-faint); font-weight: 600; }
.order-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; color: var(--ink-soft); margin-top: 6px; }
.order-meta span { display: inline-flex; align-items: center; gap: 6px; }
.order-meta svg { width: 15px; height: 15px; color: var(--ink-faint); }
.order-sum { text-align: right; }
.order-sum .total { font-family: var(--serif); font-size: 28px; line-height: 1; }
.order-sum small { display: block; color: var(--ink-soft); font-size: 13px; margin-top: 4px; }
.order-note { grid-column: 1 / -1; background: var(--cream); border-radius: 12px; padding: 10px 14px; font-size: 14px; }
.order-actions { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding-top: 4px; }
.order-actions .spacer { flex: 1; }
.hold { font-size: 13px; color: var(--amber); font-weight: 600; display: inline-flex; gap: 6px; align-items: center; }
.hold svg { width: 15px; height: 15px; }
.hold.late { color: var(--red); }

/* ============ ATSILIEPIMAI ============ */
.stars { display: inline-flex; gap: 2px; vertical-align: -2px; }
.stars svg { width: 16px; height: 16px; fill: var(--line); stroke: none; }
.stars svg.on { fill: var(--gold); }
.reviews { display: grid; gap: 14px; }
.review { background: var(--paper); border: 1px solid var(--line-soft); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; }
.review-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.review-h .who { font-weight: 600; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.review blockquote { font-family: var(--serif); font-size: 18px; line-height: 1.5; margin: 12px 0 10px; max-width: 70ch; font-variation-settings: "opsz" 24; }
.review .reply { border-top: 1px solid var(--line-soft); margin-top: 12px; padding-top: 12px; font-size: 14px; color: var(--ink-soft); }
.review .reply b { color: var(--ink); }
.review-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; align-items: center; }
.rating-big { display: flex; align-items: baseline; gap: 12px; }
.rating-big .n { font-family: var(--serif); font-size: 44px; line-height: 1; }
.rating-bars { display: grid; gap: 4px; margin-top: 12px; }
.rating-bars div { display: grid; grid-template-columns: 18px 1fr 28px; gap: 8px; align-items: center; font-size: 12.5px; color: var(--ink-soft); }
.rating-bars i { display: block; height: 6px; border-radius: 99px; background: var(--line-soft); overflow: hidden; }
.rating-bars i span { display: block; height: 100%; background: var(--gold); border-radius: 99px; }

/* ============ GIDAS ============ */
.guide-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
.guide-form .card + .card { margin-top: 14px; }
.guide-form .card h3 { font-family: var(--sans); font-size: 15px; font-weight: 600; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.guide-form .card h3 svg { width: 17px; height: 17px; color: var(--green); }
.field.missing input, .field.missing textarea { border-color: color-mix(in srgb, var(--amber) 70%, transparent); background: color-mix(in srgb, var(--amber-soft) 60%, var(--input)); }
.field.missing label::after { content: "Užpildyti"; margin-left: 8px; font-size: 11.5px; font-weight: 600; color: var(--amber); background: var(--amber-soft); padding: 1px 8px; border-radius: 99px; }
.guide-preview { position: sticky; top: 24px; }
.phone { border-radius: 28px; border: 1px solid var(--line); background: var(--sand); box-shadow: var(--shadow-lg); overflow: hidden; }
.phone-in { height: 620px; overflow-y: auto; padding: 22px 18px; font-size: 14px; }
.phone-in h4 { font-family: var(--serif); font-weight: 400; font-size: 26px; line-height: 1.1; margin: 4px 0 8px; }
.phone-in .pv-sec { background: var(--paper); border: 1px solid var(--line-soft); border-radius: 14px; padding: 12px 14px; margin-top: 10px; }
.phone-in .pv-sec b { display: block; font-size: 12.5px; color: var(--ink-faint); font-weight: 600; margin-bottom: 2px; }
.phone-in .pv-miss { color: var(--amber); font-style: italic; }
.list-editor { display: grid; gap: 8px; }
.list-editor .le-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.list-editor .le-row.nb { grid-template-columns: 1.1fr 70px 2fr auto; }
.progress-line { display: flex; align-items: center; gap: 8px 12px; font-size: 13.5px; color: var(--ink-soft); flex-wrap: wrap; }
.progress-line .pay-progress { min-width: 160px; }
.progress-line .pay-progress { flex: 1; margin: 0; }

/* ============ LAIŠKAI ============ */
.kind { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13.5px; }
.kind svg { width: 15px; height: 15px; color: var(--green); }
.kind.err svg { color: var(--red); }
.email-frame { width: 100%; height: 560px; border: 1px solid var(--line); border-radius: 12px; background: #f5f0e8; }

/* ============ ĮMONĖS / KITA (perkelti moduliai) ============ */
.limit-card { position: relative; }
.limit-card .limit-title { font-family: var(--serif); font-size: 20px; color: var(--ink); }
.limit-figs .v { color: var(--ink); }
.limit-bar { background: var(--line-soft); }
.limit-bar span { background: var(--green); }
.lvl-warn .limit-bar span { background: var(--amber); }
.lvl-over .limit-bar span { background: var(--red); }
.cd-total-row { border-top-color: var(--line); }
.cd-total-row b, .pl-line.total b { color: var(--ink); }
.pl-line.total { border-top: 1px solid var(--line); }
.rule-head { font-family: var(--serif); font-weight: 400; color: var(--ink); }
.rule-head svg { color: var(--green); }
.rep-fig { border-color: var(--line); }

/* ============ KRAUNAMA ============ */
.sk { background: linear-gradient(90deg, var(--line-soft), color-mix(in srgb, var(--line-soft) 40%, transparent), var(--line-soft)); background-size: 200% 100%; animation: sk 1.3s ease-in-out infinite; border-radius: 10px; }
.sk-title { width: 220px; height: 34px; margin-bottom: 10px; }
.sk-line { height: 14px; }
.sk-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 20px; }
.sk-card { height: 96px; border-radius: var(--radius); }
.sk-block { height: 320px; border-radius: var(--radius); }
@keyframes sk { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

/* ============ PLANŠETĖ IR TELEFONAS ============ */
@media (max-width: 1180px) {
  .dash-grid, .guide-layout { grid-template-columns: 1fr; }
  .guide-preview { position: static; }
  .phone-in { height: 480px; }
}
@media (max-width: 960px) {
  :root { --side: 280px; }
  .sidebar { transform: translateX(-100%); transition: transform .28s var(--ease), visibility .28s; visibility: hidden; box-shadow: var(--shadow-lg); padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
  .sidebar.open { transform: none; visibility: visible; }
  .sidebar-scrim { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(12, 22, 15, .4); opacity: 0; pointer-events: none; transition: opacity .2s; }
  .sidebar-scrim.on { opacity: 1; pointer-events: auto; }
  .main { margin-left: 0; padding: 20px 16px calc(var(--tabbar) + 28px + env(safe-area-inset-bottom)); }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    height: calc(var(--tabbar) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    background: color-mix(in srgb, var(--paper) 88%, transparent); -webkit-backdrop-filter: blur(16px) saturate(1.3); backdrop-filter: blur(16px) saturate(1.3);
    border-top: 1px solid var(--line-soft);
  }
  .tab { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; font-weight: 600; color: var(--ink-faint); min-width: 0; }
  .tab span:not(.tab-dot) { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 2px; }
  .tab svg { width: 22px; height: 22px; }
  .tab.active { color: var(--green-dark); }
  .tab.active svg { color: var(--green); }
  .tab-dot { position: absolute; top: 9px; left: calc(50% + 8px); width: 9px; height: 9px; border-radius: 50%; background: var(--red); border: 2px solid var(--paper); }
  .toast-container { left: 16px; right: 16px; bottom: calc(var(--tabbar) + 14px + env(safe-area-inset-bottom)); align-items: center; }
  .modal, .modal.wide { width: 100%; padding: 22px 18px 28px; border-radius: 20px 20px 0 0; height: calc(100% - 24px); margin-top: 24px; animation: up .3s var(--ease); }
  .modal-overlay { align-items: flex-end; }
  .modal .modal-actions:last-child { margin: 22px -18px -28px; padding: 12px 18px calc(14px + env(safe-area-inset-bottom)); }
  .modal-close { top: 14px; right: 12px; }
  @keyframes up { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }
}
@media (max-width: 760px) {
  .page-head { margin-bottom: 18px; align-items: flex-start; }
  .page-head h1 { font-size: 28px; }
  .page-head > .btn, .page-head > .head-actions { width: 100%; }
  .page-head > .btn { justify-content: center; }
  .form-row.two, .form-row.three { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 12px 14px 14px; }
  .stat .value { font-size: 24px; }
  .stat .label { font-size: 12.5px; }
  td, th { padding: 10px 10px; font-size: 13.5px; }
  .today-strip { grid-template-columns: 1fr; }
  .order { grid-template-columns: 1fr; padding: 16px; }
  .order-sum { text-align: left; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
  .order-actions .btn { flex: 1 1 auto; }
  .order-actions .spacer { display: none; }
  .steps { grid-template-columns: 1fr 1fr; }
  .progress-line .pay-progress { flex-basis: 100%; order: 3; }
  .detail-row { flex-wrap: wrap; }
  .search { min-width: 0; flex: 1 1 100%; }
  .list-editor .le-row.nb { grid-template-columns: 1fr auto; }
  .list-editor .le-row.nb > :nth-child(2), .list-editor .le-row.nb > :nth-child(3) { grid-column: 1; }
  /* Kainų redaktorius: eilutės telefone dviem stulpeliais */
  #sp-list > .svc-line:not(.sp-line) { display: none; }
  #sp-list .sp-line, #svc-list .svc-row { grid-template-columns: 1fr 1fr !important; padding: 12px 0; }
  #sp-list .sp-line > :first-child, #svc-list .svc-row > :first-child { grid-column: 1 / -1; }
  #bk-form .svc-row { grid-template-columns: auto 1fr 64px !important; }
  #bk-form .svc-row > .check-row { grid-column: 2; justify-content: flex-start !important; }
  /* Plačios lentelės telefone: kortelių eilutės */
  .table-wrap.stack table, .table-wrap.stack tbody, .table-wrap.stack tr, .table-wrap.stack td { display: block; width: 100%; }
  .table-wrap.stack thead { display: none; }
  .table-wrap.stack tr { padding: 10px 14px; border-bottom: 1px solid var(--line-soft); }
  .table-wrap.stack tr:last-child { border-bottom: 0; }
  .table-wrap.stack td { border: 0; padding: 2px 0; font-size: 13.5px; }
  .table-wrap.stack td[data-l]::before { content: attr(data-l) ": "; color: var(--ink-faint); }
  .table-wrap.stack td.st-main { font-size: 15px; padding-bottom: 4px; }
  .table-wrap.stack td.st-main::before { content: none; }
  .table-wrap.stack td { text-align: left !important; }
  .table-wrap.stack td:not([data-l]):not(.st-main) { display: inline-block; width: auto; margin: 6px 6px 0 0; }
  .table-wrap.stack td[data-l="Kodas"] { font-size: 12.5px; }
  .modal .modal-actions:last-child { flex-wrap: nowrap; gap: 6px; }
  .modal .modal-actions:last-child .btn { flex: 1 1 0; min-width: 0; padding-left: 10px; padding-right: 10px; overflow: hidden; text-overflow: ellipsis; }
  .modal .modal-actions:last-child .btn[style*="margin-right:auto"] { flex: 0 1 auto; margin-right: 0 !important; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ============ SPAUSDINIMAS ============ */
@media print {
  .sidebar, .tabbar, .toast-container, .modal-overlay { display: none !important; }
}

/* Gidas v2 redaktorius */
.gd-jump { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 0 14px; padding: 2px 0; }
.gd-jump::-webkit-scrollbar { display: none; }
.gd-jump a { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font-size: 13px; text-decoration: none; }
.gd-jump a:hover { border-color: var(--green); }
.gd-jump a svg { width: 15px; height: 15px; color: var(--green); }
.guide-form > div { scroll-margin-top: 16px; }
.guide-form > div + div { margin-top: 14px; }
.guide-form .gd-sub { margin: -6px 0 12px; font-size: 13px; }
.gd-shared { margin-left: 6px; font-size: 10.5px; font-weight: 600; letter-spacing: .04em; color: var(--green); background: var(--green-soft, rgba(61,107,64,.1)); border-radius: 6px; padding: 1px 6px; vertical-align: 1px; }
.gd-unit { padding: 12px 14px 2px; border: 1px solid var(--line-soft); border-radius: 14px; margin-bottom: 12px; }
.gd-unit > b { display: block; font-size: 13px; margin-bottom: 8px; }
.gd-list + .gd-list { margin-top: 16px; }
.gd-list-h { font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.list-editor .le-row { align-items: start; }
.list-editor textarea.inp { resize: none; min-height: 40px; line-height: 1.4; overflow: hidden; }
.list-editor .le-row.gd-obj { grid-template-columns: repeat(4, minmax(0, 1fr)) auto; }
.gd-mv { display: flex; gap: 0; }
.gd-mv .btn-icon { width: 30px; height: 36px; }
.gd-mv .btn-icon[disabled] { opacity: .3; }
.gd-pv-bar { display: flex; gap: 6px; margin-bottom: 10px; }
.gd-pv-bar select { flex: 1; min-width: 0; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font: inherit; font-size: 13px; padding: 0 8px; }
.gd-phone { height: 680px; }
.gd-phone iframe { width: 100%; height: 100%; border: 0; display: block; background: var(--sand); }
.gd-pv-note { text-align: center; margin-top: 8px; font-size: 12.5px; }
@media (max-width: 1100px) { .gd-phone { height: 560px; } }
@media (max-width: 700px) {
  .list-editor .le-row.gd-obj { grid-template-columns: 1fr auto; }
  .list-editor .le-row.gd-obj > input { grid-column: 1 !important; }
  .list-editor .le-row.gd-obj > .gd-mv { grid-column: 2; grid-row: 1; }
}

/* ============ Prižiūrėtoja (role-staff) ============ */
.staff-only { display: none !important; }
.role-staff .staff-only { display: flex !important; }
.role-staff .nav-item:not(.staff-only):not([data-view="calendar"]),
.role-staff .tab[data-view]:not(.staff-only):not([data-view="calendar"]),
.role-staff .nav-label { display: none !important; }
.role-staff .tabbar #menu-toggle { display: none; }
.st-today { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.st-box { padding: 14px 16px; }
.st-box-h { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--ink-soft); margin-bottom: 8px; }
.st-box-h svg { width: 16px; height: 16px; color: var(--green); }
.st-box-h b { margin-left: auto; font-family: var(--serif); font-weight: 400; font-size: 24px; color: var(--ink); }
.st-box a { display: block; padding: 6px 0; border-top: 1px solid var(--line-soft); color: var(--ink); text-decoration: none; font-weight: 600; font-size: 13.5px; }
.st-box a small { display: block; font-weight: 400; color: var(--ink-faint); }
.st-h3 { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; margin: 0 0 10px; }
.st-h3 svg { width: 17px; height: 17px; color: var(--green); }
.st-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.st-list { display: grid; gap: 8px; }
.st-row { display: grid; grid-template-columns: 170px 1fr auto; gap: 14px; align-items: center; width: 100%; text-align: left; padding: 12px 14px; border: 1px solid var(--line-soft); border-radius: 14px; background: var(--paper); color: var(--ink); font: inherit; cursor: pointer; }
.st-row:hover { border-color: var(--green); }
.st-row.is-off { opacity: .55; }
.st-date b { display: block; font-size: 14px; }
.st-date small { color: var(--ink-faint); font-size: 12.5px; }
.st-main .muted { font-size: 13px; margin-top: 2px; }
.st-side { display: flex; align-items: center; gap: 8px; color: var(--ink-faint); }
.st-side svg { width: 16px; height: 16px; }
.st-note { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 600; color: var(--gold); }
.st-n { padding: 10px 12px; border-radius: 12px; background: var(--green-tint); margin-bottom: 8px; }
.st-n.is-staff { background: var(--gold-soft); }
.st-n p { margin: 4px 0 0; font-size: 14px; }
.st-n .btn { margin-top: 4px; padding-left: 0; }
.st-dl { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; margin: 6px 0 12px; }
.st-dl dt { font-size: 12px; color: var(--ink-faint); }
.st-dl dd { margin: 2px 0 0; font-weight: 600; font-size: 14px; }
.st-dl a { color: var(--green-dark); }
.st-crow { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; padding: 12px 14px; border: 1px solid var(--line-soft); border-radius: 14px; background: var(--paper); }
.st-contacts { display: flex; gap: 6px; flex-wrap: wrap; }
@media (max-width: 900px) { .st-today { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) {
  .st-row { grid-template-columns: 1fr auto; }
  .st-row .st-date { grid-column: 1 / -1; }
  .st-dl { grid-template-columns: 1fr; }
}
.role-staff .admin-only { display: none !important; }

/* ============ Darbai ============ */
.role-staff .nav-item.staff-ok { display: flex !important; }
.dk-day { padding: 16px 18px; margin-bottom: 12px; }
.dk-date { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.dk-date b { font-family: var(--serif); font-weight: 400; font-size: 22px; color: var(--ink); }
.dk-date span { color: var(--ink-faint); font-size: 13px; }
.dk-task { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; padding: 12px 0; border-top: 1px solid var(--line-soft); }
.dk-body { cursor: pointer; }
.dk-body b { font-size: 15px; }
.dk-body .muted { font-size: 13.5px; margin-top: 2px; }
.dk-check { position: relative; width: 28px; height: 28px; cursor: pointer; margin-top: 1px; }
.dk-check input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.dk-check span { display: block; width: 28px; height: 28px; border-radius: 9px; border: 2px solid var(--line); background: var(--paper); transition: .15s; }
.dk-check input:checked + span { background: var(--green); border-color: var(--green); }
.dk-check input:checked + span::after { content: ""; position: absolute; left: 10px; top: 5px; width: 7px; height: 13px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.dk-check input:focus-visible + span { outline: 2px solid var(--green); outline-offset: 2px; }
.dk-task.is-done .dk-body b, .dk-task.is-done .dk-body .muted { opacity: .55; text-decoration: line-through; }
.dk-urgent { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; padding: 4px 10px; border-radius: 999px; background: var(--amber-soft); color: var(--amber); font-size: 12.5px; font-weight: 600; }
.dk-urgent svg, .dk-notes svg { width: 14px; height: 14px; }
.dk-notes { display: grid; gap: 4px; margin-top: 6px; }
.dk-notes span { display: inline-flex; gap: 6px; align-items: flex-start; font-size: 13px; color: var(--ink-soft); background: var(--gold-soft); padding: 4px 10px; border-radius: 10px; }
.dk-done { margin-top: 4px; font-size: 12.5px; color: var(--green-dark); font-weight: 600; }
@media print { .sidebar, .tabbar, .head-actions { display: none !important; } .dk-day { break-inside: avoid; box-shadow: none; } }

/* ============ Saugumas ============ */
.sec-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 14px; }
.sec-tile { padding: 16px 18px; }
.sec-tile span { display: block; font-size: 13px; color: var(--ink-soft); margin-bottom: 4px; }
.sec-tile b { font-family: var(--serif); font-weight: 400; font-size: 30px; color: var(--ink); }
.sec-tile.is-alert { border: 1px solid var(--red); }
.sec-tile.is-alert b { color: var(--red); }
.sec-rules { display: flex; flex-wrap: wrap; gap: 6px; }
.sec-list { display: grid; gap: 8px; }
.sec-ip { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; padding: 10px 14px; border: 1px solid var(--line-soft); border-radius: 12px; }
.sec-ip.is-alert { border-color: var(--red); background: var(--red-soft); }
.sec-ip b { font-family: Menlo, Consolas, monospace; font-size: 14px; }
.sec-ip-n { text-align: right; }
.sec-ev-wrap { overflow-x: auto; }
.sec-ev { width: 100%; border-collapse: collapse; font-size: 13px; }
.sec-ev th { text-align: left; color: var(--ink-faint); font-weight: 600; font-size: 12px; padding: 6px 10px 6px 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
.sec-ev td { padding: 7px 10px 7px 0; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.sec-ev .mono { font-family: Menlo, Consolas, monospace; font-size: 12px; color: var(--ink-soft); }
@media (max-width: 700px) { .sec-tiles { grid-template-columns: 1fr; } }
