/* Valpla – darbai ir laikas
   Paletė: rašalo mėlynai pilka, vėsus pagrindas, ultramarinas veiksmams,
   chloro geltona – tik tam, kas vyksta dabar (laikmačiai, vykstantys darbai). */

/* Golos Text (SIL Open Font License 1.1) – laikomas savo serveryje, kad šriftas nebūtų kraunamas iš Google */
@font-face {
  font-family: 'Golos Text'; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url(fonts/golos-text-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Golos Text'; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url(fonts/golos-text-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ink: #1B2733;
  --ink-2: #3A4754;
  --muted: #5F6B77;
  --paper: #EEF1F4;
  --surface: #FFFFFF;
  --surface-2: #F6F8FA;
  --line: #D9DFE5;
  --line-soft: #E8ECF0;
  --brand: #2340C7;
  --brand-hover: #1A33A8;
  --brand-soft: #E7EBFB;
  --live: #F5D547;
  --live-strong: #D9B300;
  --ok: #1E8A5A;
  --ok-soft: #E3F3EA;
  --warn: #9A6200;
  --warn-soft: #FDF1D8;
  --danger: #C2382F;
  --danger-soft: #FBEAE8;
  --side: #1B2733;
  --side-text: #C9D2DB;
  --radius: 10px;
  --radius-lg: 16px;
  --font: 'Golos Text', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --shadow: 0 1px 2px rgba(27, 39, 51, .06), 0 4px 16px rgba(27, 39, 51, .06);
  --focus: 0 0 0 3px rgba(35, 64, 199, .35);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #E6EBF0;
    --ink-2: #C3CCD5;
    --muted: #97A3AF;
    --paper: #12191F;
    --surface: #1A232B;
    --surface-2: #202B34;
    --line: #2F3C47;
    --line-soft: #26313A;
    --brand: #6D86FF;
    --brand-hover: #8A9EFF;
    --brand-soft: #232F5C;
    --ok: #4CC38A;
    --ok-soft: #173326;
    --warn: #F0B54A;
    --warn-soft: #3A2D12;
    --danger: #FF7A6E;
    --danger-soft: #3D1E1B;
    --side: #0D1318;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 400 15px/1.5 var(--font);
  color: var(--ink);
  background: var(--paper);
  font-variant-numeric: tabular-nums;
}
h1, h2, h3 { margin: 0; line-height: 1.25; font-weight: 600; }
h1 { font-size: 26px; letter-spacing: -.01em; }
h2 { font-size: 18px; }
h3 { font-size: 15px; }
p { margin: 0 0 .75em; }
a { color: var(--brand); }
hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.mono { font-variant-numeric: tabular-nums; font-feature-settings: 'tnum'; white-space: nowrap; }
.warn-text { color: var(--warn); }
[hidden] { display: none !important; }

:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }
input[type=checkbox]:focus-visible, input[type=radio]:focus-visible { box-shadow: none; outline: 2px solid var(--brand); outline-offset: 2px; }

.ic { display: inline-flex; width: 20px; height: 20px; flex: none; }
.ic svg { width: 100%; height: 100%; }
.ic.tiny { width: 15px; height: 15px; vertical-align: -3px; }

.boot { display: grid; place-items: center; min-height: 100vh; color: var(--muted); }
.boot.error { color: var(--danger); padding: 24px; text-align: center; }

/* ---------- Mygtukai ir laukai ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 8px 14px;
  font: 600 14px/1.2 var(--font); color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-hover); }
.btn.primary.ok { background: var(--ok); border-color: var(--ok); }
.btn.primary.danger { background: var(--danger); border-color: var(--danger); }
.btn.danger-text { color: var(--danger); border-color: transparent; background: transparent; }
.btn.danger-text:hover { background: var(--danger-soft); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.small { min-height: 32px; padding: 5px 10px; font-size: 13px; }
.btn.big { min-height: 50px; font-size: 16px; }
.btn.wide { width: 100%; margin-top: 16px; }
.btn:disabled { opacity: .6; cursor: progress; }
.btn.busy { position: relative; color: transparent !important; }
.btn.busy::after {
  content: ''; position: absolute; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid currentColor; border-color: var(--muted) transparent var(--muted) transparent;
  animation: spin .8s linear infinite;
}
.btn.primary.busy::after { border-color: #fff transparent #fff transparent; }
@keyframes spin { to { transform: rotate(360deg); } }

.icon-btn {
  display: inline-grid; place-items: center; width: 38px; height: 38px;
  border: 0; border-radius: var(--radius); background: transparent; color: var(--ink-2); cursor: pointer;
}
.icon-btn:hover { background: var(--surface-2); }
.link-btn { border: 0; background: none; color: var(--brand); font: inherit; font-weight: 600; cursor: pointer; padding: 4px 0; display: inline-flex; gap: 4px; align-items: center; }
.link { text-decoration: none; }

input, select, textarea {
  width: 100%; font: 400 15px/1.4 var(--font); color: var(--ink);
  background: var(--surface); border: 1px solid #C5CED6; border-radius: 8px; padding: 9px 11px;
}
@media (prefers-color-scheme: dark) { input, select, textarea { border-color: var(--line); } }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: var(--focus); }
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; accent-color: var(--brand); margin: 0; flex: none; }
input.narrow { width: 64px; }
textarea { resize: vertical; }

.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; min-width: 0; }
.field-label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.hint { color: var(--muted); font-size: 12.5px; }
.check { display: flex; align-items: center; gap: 10px; margin: 10px 0; cursor: pointer; }
.radio { display: inline-flex; align-items: center; gap: 8px; margin-right: 16px; cursor: pointer; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.row-inline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.row-inline input[type=date] { width: auto; }
.form-error { color: var(--danger); min-height: 1.2em; margin: 0; }

.pill {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; background: var(--surface-2); color: var(--ink-2); white-space: nowrap;
}
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.live { background: var(--live); color: #1B2733; }
.pill.small { font-size: 11px; padding: 1px 7px; margin-left: 6px; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
  font: 500 13px/1.2 var(--font); cursor: pointer;
}
.chip.small { padding: 3px 9px; font-size: 12.5px; }
.chip .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.chip.on { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.chip.unassigned.on { background: var(--muted); border-color: var(--muted); }

.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 3px; gap: 2px; }
.seg > * {
  border: 0; background: transparent; padding: 6px 12px; border-radius: 7px; cursor: pointer;
  font: 600 13px var(--font); color: var(--muted); text-decoration: none; white-space: nowrap;
}
.seg > .on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.seg.wide { display: flex; overflow-x: auto; margin-bottom: 16px; }
.seg.wide > * { flex: 1; text-align: center; }

.avatar {
  display: inline-grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 50%;
  font: 700 12px/1 var(--font); letter-spacing: .02em;
}
.avatar.xs { width: 20px; height: 20px; font-size: 9px; }
.avatar.sm { width: 28px; height: 28px; font-size: 11px; }
.avatar.lg { width: 56px; height: 56px; font-size: 20px; }
.avatar.ghost { background: transparent; border: 1.5px dashed var(--muted); color: var(--muted); }

.card { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius-lg); padding: 18px 20px; box-shadow: var(--shadow); margin-bottom: 18px; }
.card > h2 { margin-bottom: 12px; }
.empty { padding: 32px 16px; text-align: center; color: var(--muted); }
.empty.soft { background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius-lg); }

/* ---------- Išdėstymas ---------- */

.shell { min-height: 100vh; display: grid; grid-template-columns: 228px minmax(0, 1fr); }
.sidebar {
  position: sticky; top: 0; height: 100vh; height: 100dvh; display: flex; flex-direction: column;
  background: var(--side); color: var(--side-text); padding: 20px 12px;
  /* Ilgas meniu slenka šoninėje juostoje – fonas visada iki apačios */
  overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent;
}
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .18); border-radius: 3px; }
.nav-group + .nav-group { margin-top: 6px; }
.nav-group-head {
  display: flex; align-items: center; gap: 6px; width: 100%; padding: 8px 10px 4px; border: 0; background: none; cursor: pointer;
  color: rgba(255, 255, 255, .45); font: inherit; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; text-align: left;
}
.nav-group-head:hover { color: rgba(255, 255, 255, .75); }
.nav-group-head:focus-visible { outline: 2px solid var(--live); outline-offset: -2px; border-radius: 6px; }
.nav-group-head > span:first-child { flex: 1; }
.nav-caret { font-size: 14px; line-height: 1; transform: rotate(90deg); transition: transform .15s; }
.nav-group-head[aria-expanded="false"] .nav-caret { transform: none; }
.nav-group.pinned .nav-caret { opacity: .35; }
.nav-group-items { display: flex; flex-direction: column; gap: 2px; }
.nav-badge.small { min-width: 16px; height: 16px; font-size: 10px; padding: 0 4px; margin-left: 0; letter-spacing: 0; }
.more-group { padding: 16px 4px 4px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.more-group:first-child { padding-top: 0; }
.brand { font-size: 22px; font-weight: 700; color: #fff; padding: 0 10px 20px; letter-spacing: -.02em; }
.sidebar nav { display: flex; flex-direction: column; gap: 2px; flex: 1 0 auto; }
.nav-item {
  display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: var(--radius);
  color: var(--side-text); text-decoration: none; font-weight: 500;
}
.nav-item:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav-item.on { background: rgba(255, 255, 255, .1); color: #fff; }
.nav-item.on .ic { color: var(--live); }
.side-user { display: flex; align-items: center; gap: 4px; border-top: 1px solid rgba(255, 255, 255, .1); position: sticky; bottom: -20px; background: var(--side); margin: 12px -12px -20px; padding: 12px 12px 16px; }
.side-me { flex: 1; display: flex; align-items: center; gap: 10px; color: var(--side-text); text-decoration: none; padding: 6px; border-radius: var(--radius); min-width: 0; }
.side-me span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-me:hover, .side-me.on { background: rgba(255, 255, 255, .06); color: #fff; }
.side-user .icon-btn { color: var(--side-text); }
.side-user .icon-btn:hover { background: rgba(255, 255, 255, .08); }

.content { padding: 24px 28px 48px; min-width: 0; outline: none; }
.shell.worker .content, .page-mano .content, .content.page-mano, .content.page-savaite, .content.page-mano-laikas, .content.page-profilis {
  max-width: 680px; width: 100%; margin: 0 auto;
}
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.toolbar.wrap { flex-wrap: wrap; }
.toolbar input[type=search] { max-width: 340px; }
.toolbar > select { width: auto; min-width: 200px; }
.range { display: flex; align-items: center; gap: 6px; }
.range input { width: auto; }

.bottom-nav { display: none; }

@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .content { padding: 16px 16px calc(84px + env(safe-area-inset-bottom)); }
  body { font-size: 16px; }
  h1 { font-size: 23px; }
  .bottom-nav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: var(--surface); border-top: 1px solid var(--line);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .bottom-nav a {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 2px;
    color: var(--muted); text-decoration: none; font-size: 11.5px; font-weight: 600; border-radius: 10px;
  }
  .bottom-nav a.on { color: var(--brand); }
  .bottom-nav .ic { width: 24px; height: 24px; }
  .two { grid-template-columns: 1fr; }
}

/* ---------- Prisijungimas ---------- */

.login { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: var(--side); }
.login-card {
  width: 100%; max-width: 380px; background: var(--surface); border-radius: 20px; padding: 32px 28px 28px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
}
.wordmark { display: flex; flex-direction: column; margin-bottom: 26px; }
.wm-name { font-size: 40px; font-weight: 700; letter-spacing: -.035em; line-height: 1; color: var(--ink); }
.wm-name::after { content: ''; display: block; width: 44px; height: 6px; border-radius: 3px; background: var(--live); margin-top: 10px; }
.wm-sub { color: var(--muted); margin-top: 8px; }
.login-card .btn { width: 100%; margin-top: 8px; }

/* ---------- Pranešimai ir modalai ---------- */

#toasts { position: fixed; z-index: 100; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; max-width: min(420px, calc(100vw - 32px)); }
@media (max-width: 820px) { #toasts { left: 16px; right: 16px; bottom: calc(80px + env(safe-area-inset-bottom)); max-width: none; } }
.toast {
  background: var(--ink); color: var(--surface); padding: 12px 16px; border-radius: 12px; box-shadow: var(--shadow);
  font-weight: 500; transition: opacity .3s, transform .3s;
}
.toast.ok { background: var(--ok); color: #fff; }
.toast.error { background: var(--danger); color: #fff; }
.toast.warn { background: var(--warn-soft); color: var(--ink); border: 1px solid var(--live-strong); }
.toast.out { opacity: 0; transform: translateY(8px); }

.overlay {
  position: fixed; inset: 0; z-index: 50; background: rgba(13, 19, 24, .5);
  display: grid; place-items: center; padding: 16px; overflow-y: auto;
}
.dialog {
  width: 100%; max-width: 480px; max-height: calc(100vh - 32px); display: flex; flex-direction: column;
  background: var(--surface); border-radius: var(--radius-lg); box-shadow: 0 24px 60px rgba(0, 0, 0, .3);
}
.dialog.wide { max-width: 860px; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 8px 22px; }
.dialog-body { padding: 8px 22px 12px; overflow-y: auto; }
.dialog-foot { display: flex; justify-content: flex-end; align-items: center; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--line-soft); flex-wrap: wrap; }
.dialog-foot .spacer { flex: 1; }
@media (max-width: 820px) {
  .overlay { padding: 0; align-items: end; }
  .dialog, .dialog.wide { max-width: none; max-height: 94vh; border-radius: 18px 18px 0 0; }
  .dialog-foot { padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
  .dialog-foot .btn { flex: 1; }
  .dialog-foot .spacer { display: none; }
}
.creds { white-space: pre-wrap; background: var(--surface-2); padding: 12px; border-radius: 8px; font: 14px/1.5 var(--font); user-select: all; }

/* ---------- Darbo forma ---------- */

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
@media (max-width: 820px) { .form-grid { grid-template-columns: 1fr; } }
.when { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 0 10px; }
.dur-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin: -6px 0 14px; }
.quick-durs { display: flex; gap: 6px; flex-wrap: wrap; }
.dur-label { color: var(--muted); font-size: 13px; }
.site-note { margin: -8px 0 8px; color: var(--warn); font-size: 13px; }
.site-note:empty { display: none; }
.people-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.person-chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px 5px 5px; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--surface); font: 500 13.5px var(--font); color: var(--ink); cursor: pointer;
}
.person-chip.on { border-color: var(--c); background: color-mix(in srgb, var(--c) 14%, var(--surface)); font-weight: 600; }
.repeat { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px 12px; margin: 0 0 14px; }
.repeat legend { font-size: 13px; font-weight: 600; color: var(--ink-2); padding: 0 6px; display: inline-flex; gap: 4px; align-items: center; }
.repeat.muted { opacity: .55; }
.repeat-details { margin-top: 10px; display: flex; flex-direction: column; gap: 10px; }
.weekday-pick { display: flex; gap: 4px; }
.wd-btn { width: 38px; height: 34px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); font: 600 13px var(--font); color: var(--muted); cursor: pointer; }
.wd-btn.on { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.scope-pick { background: var(--brand-soft); border-radius: var(--radius); padding: 10px 14px; margin-bottom: 16px; display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.task-extra { border-top: 1px solid var(--line-soft); margin-top: 6px; padding-top: 14px; }
.task-extra h3 { margin: 4px 0 8px; }
.time-rows, .comments { list-style: none; padding: 0; margin: 0 0 14px; }
.time-rows li { display: flex; align-items: center; gap: 6px; padding: 3px 0; }
.comment { background: var(--surface-2); border-radius: 8px; padding: 8px 12px; margin-bottom: 6px; }
.c-meta { font-size: 12px; color: var(--muted); }
.task-extra .row-inline input { flex: 1; min-width: 160px; }

.live { display: inline-block; margin-top: 3px; font-size: 11.5px; font-weight: 600; padding: 1px 7px; border-radius: 999px; }
.live.on { background: var(--ok-soft); color: var(--ok); }
.live.working { background: var(--live); color: #1B2733; }

/* ---------- Kalendorius ---------- */

.page-kalendorius.content { padding-bottom: 16px; }
.cal-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.cal-nav, .cal-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cal-title { font-size: 22px; margin-left: 6px; }
.cal-title::first-letter { text-transform: uppercase; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }

.tg { overflow-x: auto; background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.tg { --gut: 52px; --colmin: 112px; }
.tg.mode-day { --colmin: 168px; }
.tg-inner { min-width: calc(var(--gut) + var(--cols) * var(--colmin)); }
.tg-head, .tg-body { display: grid; grid-template-columns: var(--gut) repeat(var(--cols), minmax(0, 1fr)); }
.tg-head { border-bottom: 1px solid var(--line); overflow-y: hidden; scrollbar-gutter: stable; }
.tg-scroll { max-height: calc(100vh - 210px); min-height: 360px; overflow-y: auto; scrollbar-gutter: stable; }
.tg-colhead { padding: 8px 6px; border-left: 1px solid var(--line-soft); min-width: 0; }
.tg-colhead.today .dn { background: var(--brand); color: #fff; }
.col-head-btn { width: 100%; display: flex; align-items: baseline; justify-content: center; gap: 6px; border: 0; background: none; cursor: pointer; color: var(--ink); font: inherit; padding: 2px; border-radius: 8px; }
.col-head-btn:hover { background: var(--surface-2); }
.col-head-btn .wd { color: var(--muted); font-size: 13px; font-weight: 600; }
.col-head-btn .dn { font-size: 18px; font-weight: 600; min-width: 30px; height: 30px; line-height: 30px; border-radius: 50%; text-align: center; }
.person-head { display: flex; align-items: flex-start; gap: 8px; min-width: 0; }
.person-head > div { display: flex; flex-direction: column; min-width: 0; }
.person-head strong { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-head small { color: var(--muted); font-size: 12px; }
.tg-gutter { position: relative; }
.tg-hour { position: absolute; right: 8px; transform: translateY(-50%); font-size: 11.5px; color: var(--muted); }
.tg-hour:first-child { transform: none; }
.tg-col {
  position: relative; border-left: 1px solid var(--line-soft); cursor: copy;
  background-image:
    linear-gradient(to bottom, var(--line-soft) 1px, transparent 1px),
    linear-gradient(to bottom, transparent calc(var(--hour) / 2), color-mix(in srgb, var(--line-soft) 55%, transparent) calc(var(--hour) / 2), transparent calc(var(--hour) / 2 + 1px));
  background-size: 100% var(--hour);
}
.tg-col.today { background-color: color-mix(in srgb, var(--brand) 3%, transparent); }
.tg-col.unassigned-col { background-color: var(--surface-2); }
.now-line { position: absolute; left: 0; right: 0; height: 2px; background: var(--danger); z-index: 3; pointer-events: none; }
.now-line::before { content: ''; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--danger); }

.ev {
  --c: var(--muted);
  position: absolute; z-index: 2; overflow: hidden; padding: 3px 7px 4px 8px;
  background: color-mix(in srgb, var(--c) 15%, var(--surface));
  border-left: 3px solid var(--c); border-radius: 6px;
  font-size: 12px; line-height: 1.3; color: var(--ink); cursor: grab; user-select: none;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--c) 22%, transparent);
}
@media (any-pointer: fine) { .ev { touch-action: none; } }
.ev:hover { background: color-mix(in srgb, var(--c) 24%, var(--surface)); z-index: 4; }
.ev.unassigned {
  background: repeating-linear-gradient(135deg, var(--surface) 0 6px, var(--surface-2) 6px 12px);
  border-left-style: dashed; box-shadow: 0 0 0 1px var(--line);
}
.ev-time { font-size: 11px; font-weight: 600; color: var(--ink-2); display: flex; align-items: center; gap: 3px; }
.ev-time .ic.tiny { width: 12px; height: 12px; }
.ev-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ev-sub { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-people { display: flex; gap: 2px; margin-top: 3px; }
.ev.compact { display: flex; gap: 6px; align-items: center; padding-top: 1px; padding-bottom: 1px; }
.ev.compact .ev-title { -webkit-line-clamp: 1; }
.ev.compact .ev-sub, .ev.compact .ev-people { display: none; }
.ev.s-vykdoma { box-shadow: 0 0 0 2px var(--live-strong); }
.ev.s-vykdoma::after { content: ''; position: absolute; top: 5px; right: 5px; width: 8px; height: 8px; border-radius: 50%; background: var(--live-strong); }
.ev.s-atlikta { opacity: .6; }
.ev.s-atsaukta { opacity: .45; }
.ev.s-atsaukta .ev-title { text-decoration: line-through; }
.ev-resize { position: absolute; left: 0; right: 0; bottom: 0; height: 7px; cursor: ns-resize; }
.ev.dragging { opacity: .3; }
.ev.ghost { opacity: .92; z-index: 6; pointer-events: none; box-shadow: 0 8px 20px rgba(0, 0, 0, .2); }

.month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); }
.month-head { padding: 8px; font-size: 12.5px; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--line); text-align: center; }
.month-cell { min-height: 112px; padding: 4px 5px 6px; border-left: 1px solid var(--line-soft); border-top: 1px solid var(--line-soft); display: flex; flex-direction: column; gap: 2px; cursor: copy; min-width: 0; }
.month-cell:nth-child(7n + 1) { border-left: 0; }
.month-cell.other { background: var(--surface-2); }
.month-cell.other .month-num { color: var(--muted); }
.month-num { align-self: flex-start; border: 0; background: none; font: 600 13px var(--font); color: var(--ink); width: 26px; height: 26px; border-radius: 50%; cursor: pointer; }
.month-num:hover { background: var(--surface-2); }
.month-cell.today .month-num { background: var(--brand); color: #fff; }
.mchip {
  --c: var(--muted);
  display: block; width: 100%; text-align: left; border: 0; cursor: pointer;
  padding: 2px 6px; border-radius: 5px; font: 500 12px/1.35 var(--font); color: var(--ink);
  background: color-mix(in srgb, var(--c) 15%, var(--surface)); border-left: 3px solid var(--c);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mchip.unassigned { background: var(--surface-2); border-left: 3px dashed var(--muted); }
.mchip.s-atlikta { opacity: .6; }
.mchip.s-atsaukta { opacity: .45; text-decoration: line-through; }
.mchip-time { font-weight: 700; }
.more { border: 0; background: none; color: var(--brand); font: 600 12px var(--font); text-align: left; padding: 2px 6px; cursor: pointer; }
@media (max-width: 820px) {
  .month-cell { min-height: 72px; }
  .mchip { font-size: 10.5px; padding: 1px 4px; }
  .mchip-time { display: none; }
  .cal-title { font-size: 18px; width: 100%; margin: 6px 0 0; order: 5; }
  .cal-actions .btn.primary { padding: 8px 10px; }
  .tg-scroll { max-height: calc(100vh - 290px); }
}

/* ---------- Darbuotojo diena ---------- */

.worker-head h1 { font-size: 28px; }
.worker-head p { margin: 2px 0 0; }
.shift { margin-bottom: 26px; }
.shift-start {
  width: 100%; min-height: 104px; display: flex; align-items: center; justify-content: center; gap: 14px;
  border: 0; border-radius: 22px; cursor: pointer;
  background: var(--brand); color: #fff; font: 700 22px/1.2 var(--font); letter-spacing: -.01em;
  box-shadow: 0 10px 30px color-mix(in srgb, var(--brand) 35%, transparent);
}
.shift-start .ic { width: 34px; height: 34px; padding: 6px; background: rgba(255, 255, 255, .18); border-radius: 50%; }
.shift-start:active { transform: scale(.99); }
.shift-meta { text-align: center; color: var(--muted); margin-top: 10px; }
.live-card { background: var(--live); color: #1B2733; border-radius: 22px; padding: 20px 20px 18px; }
.shift-label { font-weight: 600; font-size: 14px; opacity: .8; }
.shift-clock { font-size: 56px; font-weight: 700; letter-spacing: -.03em; line-height: 1.05; font-variant-numeric: tabular-nums; margin: 4px 0 10px; }
.shift-task { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; background: rgba(27, 39, 51, .08); border-radius: 12px; margin-bottom: 12px; font-size: 14.5px; }
.shift-warn { font-size: 13.5px; font-weight: 500; }
.btn.shift-end { width: 100%; min-height: 50px; background: #1B2733; color: #fff; border-color: #1B2733; font-size: 16px; }
.btn.shift-end:hover { background: #2A3846; }

.section-title { display: flex; align-items: baseline; justify-content: space-between; font-size: 17px; margin: 22px 0 10px; }
.section-title .count { font-size: 13px; color: var(--muted); font-weight: 500; }
.job-list { display: flex; flex-direction: column; gap: 12px; }
.job { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius-lg); padding: 14px 16px; box-shadow: var(--shadow); }
.job.running { border: 2px solid var(--live-strong); box-shadow: 0 0 0 4px color-mix(in srgb, var(--live) 45%, transparent); }
.job.done { background: var(--surface-2); box-shadow: none; }
.job.done .job-title { color: var(--muted); }
.job-top { display: flex; align-items: center; gap: 8px; margin-bottom: 2px; }
.job-time { font-weight: 700; font-size: 15px; }
.job-title { font-size: 18px; margin-bottom: 2px; }
.job-client { color: var(--ink-2); margin-bottom: 8px; }
.job-line { display: flex; gap: 8px; align-items: flex-start; padding: 5px 0; color: var(--ink-2); font-size: 14.5px; }
.job-line .ic { color: var(--muted); margin-top: 1px; }
a.job-line { color: var(--brand); font-weight: 500; }
a.job-line .ic { color: var(--brand); }
.job-desc { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; margin: 8px 0; white-space: pre-line; font-size: 14.5px; }
.job-team { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13.5px; margin: 6px 0; }
.teammate { display: inline-flex; align-items: center; gap: 4px; }
.job-spent { font-size: 13.5px; margin-top: 4px; }
.job-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.job-actions .btn { flex: 1 1 auto; min-height: 48px; font-size: 15px; }
.job-actions .btn.ghost { flex: 0 0 auto; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: #1B2733; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .pulse, .btn.busy::after { animation: none; } }
.tomorrow { margin-top: 8px; }
.mini-job { display: flex; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
.stat { background: var(--surface); border-radius: var(--radius-lg); padding: 14px; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.stat-num { font-size: 28px; font-weight: 700; letter-spacing: -.02em; }
.stat-label { font-size: 12.5px; color: var(--muted); }
.day-list { display: flex; flex-direction: column; gap: 10px; }
.day-block { background: var(--surface); border-radius: var(--radius); padding: 10px 14px; border: 1px solid var(--line-soft); }
.day-row { display: flex; justify-content: space-between; gap: 10px; padding-bottom: 6px; }
.entry-row { display: grid; grid-template-columns: 96px 1fr auto; gap: 10px; padding: 4px 0; font-size: 14px; border-top: 1px dashed var(--line-soft); }
.entry-row.shift { color: var(--muted); }

.profile-id { display: flex; align-items: center; gap: 14px; }
.narrow-form { max-width: 460px; }
.narrow-form h2 { margin-bottom: 14px; }

/* ---------- Klientai ---------- */

.split { display: grid; grid-template-columns: minmax(240px, 340px) 1fr; gap: 18px; align-items: start; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }
.client-list { display: flex; flex-direction: column; background: var(--surface); border-radius: var(--radius-lg); border: 1px solid var(--line-soft); overflow: hidden; max-height: calc(100vh - 200px); overflow-y: auto; }
.client-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; text-align: left; border: 0; border-bottom: 1px solid var(--line-soft); background: transparent; padding: 12px 14px; font: inherit; color: var(--ink); cursor: pointer; }
.client-row small { color: var(--muted); white-space: nowrap; }
.client-row:hover { background: var(--surface-2); }
.client-row.on { background: var(--brand-soft); box-shadow: inset 3px 0 0 var(--brand); }
.archived { opacity: .55; }
.client-detail { background: var(--surface); border-radius: var(--radius-lg); border: 1px solid var(--line-soft); padding: 18px 20px; box-shadow: var(--shadow); min-height: 200px; }
.client-detail .empty.soft { border: 0; }
.detail-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.detail-head h2 { display: flex; align-items: center; gap: 8px; }
.client-detail h3 { margin-top: 10px; }
dl.info { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0 0 14px; }
dl.info dt { color: var(--muted); font-size: 13.5px; }
dl.info dd { margin: 0; }
.notes { background: var(--surface-2); border-radius: 8px; padding: 10px 12px; white-space: pre-line; }
.site-list { list-style: none; padding: 0; margin: 0; }
.site-list li { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line-soft); }
.site-list .muted { font-size: 13.5px; display: flex; gap: 4px; align-items: flex-start; margin-top: 2px; }

/* ---------- Lentelės ---------- */

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12.5px; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 9px 10px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.table tfoot td { font-weight: 700; border-bottom: 0; }
.table .num { text-align: right; white-space: nowrap; }
.table .right { text-align: right; }
.table tr.clickable { cursor: pointer; }
.table tr.clickable:hover td { background: var(--surface-2); }
.table tr.shift-row td { background: color-mix(in srgb, var(--surface-2) 70%, transparent); }
.table tr.flag td { background: var(--warn-soft); }
.table .icon-btn { width: 32px; height: 32px; }
.who { display: flex; align-items: center; gap: 10px; }
.swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.swatch { width: 28px; height: 28px; border-radius: 50%; border: 3px solid transparent; cursor: pointer; }
.swatch.on { border-color: var(--surface); box-shadow: 0 0 0 2px var(--ink); }

.time-grid { display: grid; grid-template-columns: minmax(240px, 1fr) 2fr; gap: 0 18px; align-items: start; }
.time-grid > .card:nth-child(3) { grid-column: 1 / -1; }
@media (max-width: 1100px) { .time-grid { grid-template-columns: 1fr; } }
.now-list { list-style: none; padding: 0; margin: 0; }
.now-list li { display: flex; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line-soft); }
.now-list li:first-child { border-top: 0; }
.dialog:focus { outline: none; box-shadow: 0 24px 60px rgba(0, 0, 0, .3); }

/* ---------- v2: žymos, kontroliniai sąrašai, failai, objektai ---------- */

.tag-chip {
  --c: var(--muted);
  display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600;
  color: color-mix(in srgb, var(--c) 80%, var(--ink)); background: color-mix(in srgb, var(--c) 13%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--c) 30%, transparent); white-space: nowrap;
}
.tag-pick, .tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-toggle {
  --c: var(--muted);
  border: 1.5px solid var(--line); background: var(--surface); color: var(--ink-2); border-radius: 999px;
  padding: 4px 11px; font: 500 13px var(--font); cursor: pointer; display: inline-flex; gap: 4px; align-items: center;
}
.tag-toggle.on { border-color: var(--c); background: color-mix(in srgb, var(--c) 15%, var(--surface)); color: var(--ink); font-weight: 600; }
.tag-toggle.add { border-style: dashed; color: var(--muted); }
.tag-new { width: 140px; padding: 4px 10px; border-radius: 999px; font-size: 13px; }
.tag-edit { border: 0; background: none; padding: 2px; cursor: pointer; border-radius: 999px; }
.tag-edit .tag-chip { font-size: 13px; padding: 3px 10px; }
.job-tags { display: flex; flex-wrap: wrap; gap: 4px; margin: -4px 0 8px; }

.check-edit { list-style: none; padding: 0; margin: 0 0 6px; display: flex; flex-direction: column; gap: 4px; }
.check-edit li { display: flex; align-items: center; gap: 8px; }
.check-edit li input { padding: 6px 9px; font-size: 14px; }
.check-edit li.done input { color: var(--muted); text-decoration: line-through; }
.check-box { width: 16px; height: 16px; border: 1.5px solid var(--line); border-radius: 4px; flex: none; }
.check-mark { width: 16px; height: 16px; border-radius: 4px; background: var(--ok); color: #fff; display: grid; place-items: center; flex: none; }
.check-mark .ic.tiny { width: 12px; height: 12px; vertical-align: 0; }
.icon-btn.small { width: 30px; height: 30px; }
.inline-select { width: auto; padding: 5px 9px; font-size: 13px; }
.check.inline { margin: 0; }

.job-check { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; margin: 10px 0 6px; }
.job-check-head { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.check-progress { margin-left: auto; font-weight: 700; font-size: 13px; color: var(--muted); }
.check-progress.all { color: var(--ok); }
.job-check ul { list-style: none; padding: 0; margin: 6px 0 0; }
.job-check li .check { margin: 0; padding: 8px 0; border-top: 1px solid var(--line-soft); font-size: 15px; align-items: flex-start; }
.job-check li:first-child .check { border-top: 0; }
.job-check li input[type=checkbox] { width: 22px; height: 22px; margin-top: 1px; }
.job-check li input:checked + span { color: var(--muted); text-decoration: line-through; }
.job-photos { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.job-photos .thumb.add { width: auto; height: 42px; flex-direction: row; padding: 0 14px; gap: 8px; font-size: 14px; }
.job-photos .thumb.add small { font-size: 14px; font-weight: 600; }
.warn-box { background: var(--warn-soft); color: var(--ink); border-radius: 8px; padding: 9px 12px; margin-bottom: 12px; font-size: 14px; }

.gallery { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.thumb-wrap { position: relative; }
.thumb {
  width: 88px; height: 88px; border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--surface-2); border: 1px solid var(--line-soft); color: var(--ink-2); text-decoration: none; gap: 4px; cursor: pointer; font: inherit;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb-file { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px; text-align: center; }
.thumb-file small { font-size: 11px; overflow: hidden; text-overflow: ellipsis; max-width: 76px; white-space: nowrap; }
.thumb.add { border: 1.5px dashed var(--line); color: var(--brand); }
.thumb.add small { font-size: 12px; font-weight: 600; }
.thumb-del { position: absolute; top: -6px; right: -6px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: var(--ink); color: var(--surface); display: grid; place-items: center; cursor: pointer; }
.upload-wrap { display: inline-flex; }

details.log { margin-top: 10px; }
details.log summary { cursor: pointer; font-weight: 600; color: var(--ink-2); padding: 6px 0; }
.log-list { list-style: none; padding: 0; margin: 6px 0 0; max-height: 260px; overflow-y: auto; }
.log-list li { padding: 6px 0; border-top: 1px solid var(--line-soft); font-size: 13.5px; }
.log-text { white-space: pre-line; }

.ev-check { font-size: 10.5px; font-weight: 700; padding: 0 4px; border-radius: 4px; background: rgba(27, 39, 51, .08); }
.ev-check.all { background: var(--ok-soft); color: var(--ok); }

.shift-buttons { display: flex; gap: 10px; }
.shift-buttons .btn.shift-end { flex: 1; }
.btn.shift-down { min-height: 50px; background: rgba(27, 39, 51, .1); border-color: transparent; color: #1B2733; font-size: 15px; }
.shift-task.down { align-items: center; flex-wrap: wrap; }
.shift-task.down .btn { margin-left: auto; background: #1B2733; color: #fff; border-color: #1B2733; }
.reason-list { display: flex; flex-direction: column; gap: 8px; }
.btn.reason { min-height: 50px; justify-content: flex-start; font-size: 16px; }

.row-sub { display: block; color: var(--muted); font-weight: 400; font-size: 12.5px; }
.client-row > span { min-width: 0; }
.table.compact td, .table.compact th { padding: 7px 8px; }
.link-btn.plain { color: var(--ink); font-weight: 500; text-align: left; padding: 0; }
.link-btn.plain:hover { color: var(--brand); text-decoration: underline; }
.link-btn.strong { font-weight: 700; }
.nowrap { white-space: nowrap; }
.pill.down { background: var(--warn-soft); color: var(--warn); }
.table tr.down-row td { background: color-mix(in srgb, var(--warn-soft) 55%, transparent); }
.downtime-break { font-size: 13px; color: var(--ink-2); margin-top: 6px; }
.two-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
@media (max-width: 1100px) { .two-cards { grid-template-columns: 1fr; } }
.toolbar .seg { flex: none; }

.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; align-items: start; }
@media (max-width: 1000px) { .settings-grid { grid-template-columns: 1fr; } }
.set-list { list-style: none; padding: 0; margin: 0; }
.set-list li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line-soft); }
.set-list li:first-child { border-top: 0; }
.grow { flex: 1; min-width: 0; }
.block { display: block; }
.swatch-dot { width: 14px; height: 14px; border-radius: 50%; flex: none; }
.swatch.none { background: repeating-linear-gradient(45deg, var(--surface) 0 4px, var(--line) 4px 6px); }
.row-end { display: flex; justify-content: flex-end; margin-top: 10px; }
.kind-select { width: auto; flex: none; padding: 6px 6px; font-size: 12.5px; color: var(--ink-2); }
.check-value { font-weight: 700; font-size: 13px; color: var(--ok); white-space: nowrap; }
.check-editor .row-inline { margin-top: 2px; }
.job-check .check-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line-soft); font-size: 15px; }
.job-check li:first-child.check-row { border-top: 0; }
.check-state { width: 22px; height: 22px; border-radius: 6px; border: 1.5px solid var(--line); display: grid; place-items: center; flex: none; background: var(--surface); }
.check-state.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.check-state .ic.tiny { vertical-align: 0; }
.check-input { width: 140px; flex: none; padding: 7px 10px; }
.check-input.num { width: 90px; text-align: right; }
.check-row .thumb.add { width: auto; height: 38px; flex-direction: row; padding: 0 10px; gap: 6px; }
.check-row .thumb.add small { font-size: 13px; }

/* ---------- Personalas ---------- */
.content.page-atostogos { max-width: 680px; width: 100%; margin: 0 auto; }
.pill.danger { background: var(--danger-soft); color: var(--danger); }
.btn.primary.danger { background: var(--danger); border-color: var(--danger); }
.hr-tabs { margin-bottom: 18px; }
.hr-tabs > a { text-decoration: none; white-space: nowrap; }
.hr-alert { display: flex; align-items: center; gap: 10px; padding: 10px 14px; margin: 0 0 12px; border-radius: var(--radius); background: var(--warn-soft); color: var(--warn); font-weight: 600; text-decoration: none; }
.hr-alert.danger { background: var(--danger-soft); color: var(--danger); }
.hr-note { display: flex; gap: 8px; align-items: flex-start; padding: 10px 14px; border-radius: var(--radius); background: var(--brand-soft); color: var(--ink-2); font-size: 13.5px; margin: 0 0 14px; }
.hr-note .ic, .hr-alert .ic { flex: none; }
.month-label { min-width: 140px; text-align: center; }
input.narrow { width: 80px; }
.back { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 10px; color: var(--brand); font-weight: 600; }
.hr-person { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.hr-person h2 { margin: 0; font-size: 22px; display: flex; align-items: center; gap: 8px; }
.hr-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 16px; align-items: start; }
@media (max-width: 820px) { .hr-cards { grid-template-columns: 1fr; } }
.hr-card { margin: 0; }
.hr-card-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.hr-card-head h2 { margin: 0; font-size: 17px; flex: 1; display: flex; align-items: center; gap: 6px; }
.hr-list { list-style: none; margin: 0; padding: 0; }
.hr-list > li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); flex-wrap: wrap; }
.hr-list > li:last-child { border-bottom: 0; }
.hr-list .grow { min-width: 160px; }
.hr-list .row-end { margin-top: 0; gap: 6px; }
.hr-details { margin-top: 10px; }
.hr-details summary { cursor: pointer; color: var(--muted); font-size: 13.5px; }
.hr-stats { margin: 4px 0 8px; }
.stat.danger .stat-num { color: var(--danger); }
.abs-code { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 22px; padding: 0 5px; border-radius: 6px; font-size: 11.5px; font-weight: 700; background: var(--surface-2); color: var(--ink-2); }
.c-A { background: var(--brand-soft) !important; color: var(--brand) !important; }
.c-L { background: var(--danger-soft) !important; color: var(--danger) !important; }
.c-NA, .c-M, .c-VP, .c-KT { background: var(--warn-soft) !important; color: var(--warn) !important; }
.c-DP { background: var(--live) !important; color: #1B2733 !important; }
.c-P, .c-S { color: var(--muted) !important; }
.pending { background-image: repeating-linear-gradient(45deg, transparent 0 4px, rgba(255, 255, 255, .55) 4px 8px) !important; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 10px 0; color: var(--muted); }
.legend > span { display: inline-flex; align-items: center; gap: 6px; }
.grid-month { font-size: 12.5px; }
.grid-month th.d, .grid-month td.d { text-align: center; padding: 6px 1px; min-width: 25px; border-left: 1px solid var(--line-soft); }
.grid-month th.d small { display: block; font-weight: 500; font-size: 10px; }
.grid-month .off { background: var(--surface-2); }
.grid-month th.today { color: var(--brand); }
.grid-month td.d[onclick], .grid-month td.d.c-A, .grid-month td.d.c-L { font-weight: 700; }
.grid-month .sticky { position: sticky; left: 0; background: var(--surface); z-index: 1; min-width: 130px; }
.grid-month.ts td.d { font-variant-numeric: tabular-nums; }
.pending-list { display: grid; gap: 10px; margin-bottom: 10px; }
.card.pending { display: grid; grid-template-columns: minmax(180px, 240px) 1fr auto; gap: 14px; align-items: center; background-image: none !important; }
.card.pending .row-end { margin: 0; gap: 8px; }
@media (max-width: 820px) { .card.pending { grid-template-columns: 1fr; } }
.pending-what ul { margin: 6px 0 0; padding-left: 18px; }
.table.pay td, .table.pay th { white-space: nowrap; }
.role-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; align-items: start; }
.role-card { margin: 0; }
.perm-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.perm-chips li { background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 2px 10px; font-size: 12.5px; }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.perm-group { border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px 10px; margin: 0; }
.perm-group legend { font-weight: 700; font-size: 13px; padding: 0 4px; }
.perm-group .check { margin: 6px 0; }
.profile-hr .card { margin-bottom: 16px; }
.profile-hr h2 { font-size: 17px; margin: 0 0 10px; }
.cal-absent { display: block; font-size: 10.5px; font-weight: 600; color: var(--warn); }
.print-only { display: none; }
@media print {
  @page { size: A4 landscape; margin: 10mm; }
  body { background: #fff !important; color: #000; }
  .sidebar, .bottom-nav, .page-head, .hr-tabs, .no-print, #toasts { display: none !important; }
  .shell { display: block !important; }
  .content { padding: 0 !important; max-width: none !important; }
  .card { box-shadow: none !important; border: 0 !important; padding: 0 !important; }
  .table-wrap { overflow: visible !important; }
  .grid-month { font-size: 9px; }
  .grid-month th.d, .grid-month td.d { min-width: 0; padding: 2px 1px; border: 1px solid #999; }
  .grid-month td, .grid-month th { border: 1px solid #999; padding: 2px 4px; }
  .grid-month .sticky { position: static; min-width: 0; }
  .print-only { display: block; }
  .print-head { margin-bottom: 8px; font-size: 13px; }
  .print-sign { display: flex; justify-content: space-between; margin-top: 30px; font-size: 12px; }
  .legend { font-size: 9px; }
  .c-A, .c-L, .c-NA, .c-M, .c-VP, .c-KT, .c-DP { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
.sched-box { margin-bottom: 14px; }
.sched-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin-top: 6px; }
.sched-day { display: flex; flex-direction: column; gap: 4px; align-items: stretch; }
.sched-head { display: flex; align-items: center; gap: 4px; font-weight: 600; font-size: 13px; }
.sched-day input[type=number] { padding: 6px 4px; text-align: center; min-width: 0; }
@media (max-width: 520px) { .sched-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ---------- Vieta ---------- */
.places { display: flex; flex-wrap: wrap; gap: 4px 6px; margin-top: 4px; }
.place { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 500; padding: 1px 8px 1px 5px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); text-decoration: none; border: 1px solid var(--line-soft); white-space: nowrap; }
.place:hover { border-color: var(--line); }
.place .ic { width: 13px; height: 13px; }
.place.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.place.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.place.danger { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.place-l { color: var(--muted); font-weight: 600; margin-right: 2px; }
.place-l::after { content: ':'; }
.place-acc { opacity: .75; }
.live .place { margin-left: 6px; }
.log-text .place { margin-left: 2px; }
.coord-actions { gap: 8px; margin: -4px 0 14px; flex-wrap: wrap; }

/* ---------- Žemėlapis ---------- */
.vmap { position: relative; overflow: hidden; background: #E7E4DC; touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab; outline: none; }
.vmap:active { cursor: grabbing; }
.vmap:focus-visible { box-shadow: var(--focus); }
.vmap-pane, .vmap-tiles, .vmap-markers { position: absolute; inset: 0; }
.vmap-tile { position: absolute; left: 0; top: 0; width: 256px; height: 256px; opacity: 0; transition: opacity .2s; pointer-events: none; max-width: none; }
.vmap-tile.on { opacity: 1; }
.vmap-svg { position: absolute; left: 0; top: 0; pointer-events: none; overflow: visible; }
.vmap-line { fill: none; stroke: #2340C7; stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; opacity: .75; }
.vmap-line.route { stroke-dasharray: 6 6; }
.vmap-marker { position: absolute; left: 0; top: 0; width: 0; height: 0; }
.vmap-marker > * { position: absolute; }
.vmap-marker.bottom > * { transform: translate(-50%, -100%); }
.vmap-marker.center > * { transform: translate(-50%, -50%); }
.vmap-marker.clickable { cursor: pointer; }
.vmap-marker.drag { cursor: grab; touch-action: none; }
.vmap-marker.dragging > * { transform: translate(-50%, -115%) scale(1.1); }
.vmap-pin { width: 30px; height: 35px; }
.vmap-pin::before { content: ''; position: absolute; left: 50%; top: 0; width: 26px; height: 26px; margin-left: -13px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); transform-origin: 50% 50%; background: var(--c); border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .35); top: 2px; }
.vmap-pin span { position: absolute; top: 7px; left: 0; right: 0; text-align: center; font-size: 9.5px; font-weight: 700; color: #fff; letter-spacing: -.02em; }
.vmap-pin.big { width: 40px; height: 45px; }
.vmap-pin.big::before { width: 34px; height: 34px; margin-left: -17px; }
.vmap-dot { min-width: 22px; height: 22px; padding: 0 4px; border-radius: 999px; background: var(--c); border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .35); color: #fff; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; white-space: nowrap; }
.vmap-dot.ghost { opacity: .8; min-width: 16px; height: 16px; }
.vmap-dot.person { min-width: 32px; height: 32px; font-size: 12px; }
.vmap-dot.person.live { box-shadow: 0 0 0 4px rgba(245, 213, 71, .7), 0 1px 4px rgba(0, 0, 0, .35); }
.vmap-ctrl { position: absolute; right: 10px; top: 10px; display: flex; flex-direction: column; gap: 4px; z-index: 20; }
.vmap-btn { width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 20px; line-height: 1; cursor: pointer; box-shadow: var(--shadow); }
.vmap-attr { position: absolute; right: 0; bottom: 0; z-index: 20; font-size: 10.5px; background: rgba(255, 255, 255, .8); color: #333; padding: 1px 6px; border-top-left-radius: 6px; }
.vmap-attr a { color: inherit; }
.vmap-box { border-radius: var(--radius); border: 1px solid var(--line); }
.vmap-box.picker { height: min(52vh, 460px); margin: 10px 0 6px; }
.vmap-box.mini { margin: 8px 0 4px; }
.vmap-box.page { height: calc(100vh - 210px); min-height: 360px; }
.vmap-results { list-style: none; margin: 6px 0 0; padding: 4px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); max-height: 200px; overflow: auto; }
.vmap-results li { padding: 6px 8px; border-bottom: 1px solid var(--line-soft); }
.vmap-results li:last-child { border-bottom: 0; }
.picker-search { gap: 8px; }
.picker-search input { flex: 1; }
.loc-box { margin: -4px 0 14px; }
.loc-line { gap: 10px; flex-wrap: wrap; }
.ev-list { margin: 6px 0 0; padding-left: 20px; }
.ev-list li { margin: 3px 0; }
.map-layout { display: grid; grid-template-columns: 1fr 320px; gap: 16px; align-items: start; }
.map-side { background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 14px 16px; max-height: calc(100vh - 210px); overflow: auto; }
.map-side h3 { font-size: 14px; margin: 14px 0 8px; }
.map-side h3:first-child, .map-side .who + h3 { margin-top: 0; }
.map-side .who { margin-bottom: 12px; }
.map-events, .map-workers, .map-tasks { list-style: none; margin: 0; padding: 0; }
.map-events li { display: flex; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line-soft); font-size: 13.5px; }
.map-events li.nolocation { opacity: .7; }
.map-num { flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--c); color: #fff; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.map-workers li, .map-tasks li { padding: 6px 0; border-bottom: 1px solid var(--line-soft); font-size: 13.5px; }
.map-tasks li { display: grid; grid-template-columns: 12px 1fr; column-gap: 8px; }
.map-tasks li .muted { grid-column: 2; }
.map-st { width: 10px; height: 10px; border-radius: 50%; background: var(--c); margin-top: 5px; }
.map-legend { display: flex; flex-wrap: wrap; gap: 6px; }
.chip.on-soft { border-color: var(--c); }
.chip.off { opacity: .5; }
.chip .dot { background: var(--c); }
.map-date { min-width: 220px; text-align: center; }
@media (max-width: 1000px) {
  .map-layout { grid-template-columns: 1fr; }
  .vmap-box.page { height: 60vh; }
  .map-side { max-height: none; }
}
@media (prefers-color-scheme: dark) { .vmap { background: #2a2f35; } .vmap-attr { background: rgba(0, 0, 0, .6); color: #ddd; } }

/* ---------- Automobiliai ---------- */
.content.page-automobiliai { max-width: 1280px; }
.fl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.fl-card { display: flex; flex-direction: column; gap: 4px; text-align: left; cursor: pointer; font: inherit; color: inherit; margin: 0; }
.fl-card:hover { border-color: var(--line); }
.fl-plate { align-self: flex-start; font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-weight: 700; letter-spacing: .06em; border: 2px solid var(--ink); border-radius: 6px; padding: 1px 8px; font-size: 14px; background: var(--surface); }
.fl-plate.big { font-size: 20px; padding: 3px 12px; }
.fl-name { font-size: 16px; }
.fl-km { font-size: 13.5px; }
.fl-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.fl-chip { font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.fl-chip.ok { background: var(--ok-soft); color: var(--ok); }
.fl-chip.soon { background: var(--warn-soft); color: var(--warn); }
.fl-chip.overdue, .fl-chip.defect { background: var(--danger-soft); color: var(--danger); }
.fl-alerts h2 { font-size: 16px; margin: 0 0 6px; }
.fl-alerts li.clickable { cursor: pointer; }
.fl-head { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.fl-head h2 { margin: 0 0 2px; font-size: 20px; display: flex; gap: 8px; align-items: center; }
.fl-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-bottom: 16px; }
.fl-tile { display: flex; flex-direction: column; gap: 2px; text-align: left; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line-soft); border-left: 4px solid var(--line); border-radius: var(--radius); padding: 10px 12px; cursor: pointer; box-shadow: var(--shadow); }
.fl-tile:disabled { cursor: default; }
.fl-tile-l { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.fl-tile.ok { border-left-color: var(--ok); }
.fl-tile.soon { border-left-color: var(--live-strong); background: var(--warn-soft); }
.fl-tile.overdue { border-left-color: var(--danger); background: var(--danger-soft); }
.fl-tile.overdue strong { color: var(--danger); }
.fl-body { display: grid; grid-template-columns: 1fr 300px; gap: 16px; align-items: start; }
@media (max-width: 1000px) { .fl-body { grid-template-columns: 1fr; } }
.fl-body .card { margin: 0; }
.fl-open td { background: var(--danger-soft); }
.fl-year { margin-bottom: 12px; }
.fl-costlist { list-style: none; margin: 4px 0 0; padding: 0; font-size: 13.5px; }
.fl-costlist li { display: flex; justify-content: space-between; gap: 8px; padding: 3px 0; border-bottom: 1px dashed var(--line-soft); }

/* ---------- Pardavimai ---------- */
.nav-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.content.page-pardavimai { max-width: none; }
.crm-board { display: grid; grid-template-columns: repeat(4, minmax(220px, 1fr)) repeat(2, minmax(180px, .8fr)); gap: 12px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.crm-col { background: var(--surface-2); border: 1px solid var(--line-soft); border-top: 4px solid var(--c); border-radius: var(--radius); padding: 8px; min-height: 160px; }
.crm-col.closed { opacity: .92; }
.crm-col.over { background: var(--brand-soft); }
.crm-col-head { display: flex; flex-direction: column; gap: 2px; padding: 2px 4px 8px; }
.crm-col-head .count { color: var(--muted); font-weight: 600; }
.crm-col-body { display: flex; flex-direction: column; gap: 8px; min-height: 40px; }
.crm-empty { text-align: center; padding: 10px 0; }
.crm-card { background: var(--surface); border: 1px solid var(--line-soft); border-radius: 10px; padding: 9px 10px; box-shadow: 0 1px 2px rgba(27, 39, 51, .06); cursor: pointer; display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; }
.crm-card:hover { border-color: var(--line); }
.crm-card.dragging { opacity: .5; }
.crm-card.idle { border-left: 3px solid var(--live-strong); }
.crm-card-top { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.crm-card-meta { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.crm-value { font-weight: 700; }
.crm-next { font-size: 12.5px; color: var(--ink-2); }
.crm-next.overdue { color: var(--danger); font-weight: 600; }
.crm-next.none { color: var(--warn); }
.crm-deal { display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px; }
@media (max-width: 820px) { .crm-deal { grid-template-columns: 1fr; } .crm-board { grid-template-columns: repeat(6, 260px); } }
.crm-deal-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.crm-stage { background: var(--c); color: #fff; font-weight: 700; font-size: 12.5px; padding: 3px 10px; border-radius: 999px; }
.crm-actbox h3 { margin: 0 0 8px; font-size: 15px; }
.crm-addact { background: var(--surface-2); border-radius: var(--radius); padding: 8px; display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.crm-addact .row-inline { gap: 6px; }
.crm-addact input:not([type=checkbox]), .crm-addact select { flex: 1; min-width: 0; }
.crm-acts { list-style: none; margin: 0; padding: 0; max-height: 52vh; overflow: auto; }
.crm-acts li { display: flex; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); font-size: 13.5px; }
.crm-acts li.done { color: var(--ink-2); }
.crm-acts li.sys { color: var(--muted); font-size: 12.5px; }
.crm-acts li.overdue strong { color: var(--danger); }
.crm-check { flex: none; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface); color: transparent; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; }
.crm-check:hover { border-color: var(--ok); color: var(--ok); }
.crm-check .ic { width: 14px; height: 14px; }
.crm-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--line); margin: 6px 8px 0; }
.crm-note { white-space: pre-wrap; }
.crm-overdue .mono { color: var(--danger); font-weight: 700; }
.crm-stats { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.crm-stats .stat-num { font-size: 24px; }
.crm-bar { height: 5px; width: var(--w); background: var(--c); border-radius: 3px; margin-top: 4px; min-width: 2px; }
.danger-text { color: var(--danger); }

/* ---------- Telefono meniu „Daugiau“ ---------- */
.bottom-nav button { display: flex; flex-direction: column; align-items: center; gap: 2px; background: none; border: 0; font: inherit; font-size: 11.5px; font-weight: 600; padding: 4px 2px !important; color: var(--muted); cursor: pointer; position: relative; flex: 1; padding: 0; }
.bottom-nav button.on { color: var(--brand); }
.bottom-nav a, .bottom-nav button { position: relative; }
.bottom-nav .nav-badge { position: absolute; top: 2px; left: 55%; margin: 0; min-width: 16px; height: 16px; font-size: 10px; padding: 0 4px; }
.more-menu { display: flex; flex-direction: column; }
.more-menu a, .more-logout { display: flex; align-items: center; gap: 12px; padding: 13px 4px; border-bottom: 1px solid var(--line-soft); color: var(--ink); text-decoration: none; font-size: 16px; background: none; border-left: 0; border-right: 0; border-top: 0; font-family: inherit; cursor: pointer; text-align: left; }
.more-menu a.on { color: var(--brand); font-weight: 600; }
.more-menu .nav-badge { margin-left: auto; }

/* ---------- Instrukcijos ---------- */
.content.page-instrukcijos { max-width: 1100px; }
.kb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.kb-card { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: inherit; margin: 0; }
.kb-card:hover { border-color: var(--line); }
.kb-card.draft { border-style: dashed; }
.kb-card p { margin: 0; }
.kb-card-top { display: flex; gap: 6px; align-items: flex-start; flex-wrap: wrap; }
.kb-card-top strong { flex: 1; font-size: 15.5px; }
.kb-card-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.kb-pending { border-left: 4px solid var(--live-strong); }
.kb-pending h2 { font-size: 16px; margin: 0 0 6px; }
.kb-article { max-width: 820px; }
.kb-head { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; border-bottom: 1px solid var(--line-soft); padding-bottom: 12px; margin-bottom: 14px; }
.kb-head h1 { font-size: 26px; margin: 0 0 4px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.kb-body { font-size: 16px; line-height: 1.6; }
.kb-body h2 { font-size: 20px; margin: 22px 0 8px; }
.kb-body h3 { font-size: 17px; margin: 18px 0 6px; }
.kb-body p { margin: 0 0 12px; }
.kb-body ul, .kb-body ol { margin: 0 0 12px; padding-left: 24px; }
.kb-body li { margin: 4px 0; }
.kb-steps { counter-reset: st; list-style: none; padding-left: 0 !important; }
.kb-steps li { counter-increment: st; position: relative; padding-left: 38px; min-height: 28px; margin: 8px 0; }
.kb-steps li::before { content: counter(st); position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; font-size: 13px; display: flex; align-items: center; justify-content: center; }
.kb-callout { display: flex; gap: 10px; padding: 12px 14px; border-radius: var(--radius); margin: 0 0 12px; }
.kb-callout.warn { background: var(--danger-soft); color: var(--ink); border-left: 4px solid var(--danger); }
.kb-callout.warn .ic { color: var(--danger); flex: none; }
.kb-callout.tip { background: var(--brand-soft); border-left: 4px solid var(--brand); }
.kb-fig { margin: 4px 0 16px; }
.kb-fig img { max-width: 100%; border-radius: var(--radius); cursor: zoom-in; display: block; }
.kb-fig figcaption { font-size: 13px; color: var(--muted); margin-top: 4px; }
.kb-video { position: relative; width: 100%; aspect-ratio: 16 / 9; margin: 4px 0 16px; border-radius: var(--radius); overflow: hidden; background: #000; }
.kb-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.kb-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin-top: 12px; }
.kb-thumb { padding: 0; border: 0; background: none; cursor: zoom-in; }
.kb-thumb img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; display: block; }
.kb-files { margin-top: 14px; display: flex; flex-direction: column; gap: 6px; }
.kb-files h3 { margin: 0; font-size: 15px; }
.kb-file { display: inline-flex; align-items: center; gap: 4px; }
.kb-lightbox img { max-width: 100%; max-height: 75vh; display: block; margin: 0 auto; }
.kb-ack { max-width: 820px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; border-left: 4px solid var(--live-strong); }
.kb-ack.done { border-left-color: var(--ok); color: var(--ok); font-weight: 600; }
.kb-ack p { margin: 0; }
.kb-acks { max-width: 820px; }
.kb-acks summary { cursor: pointer; font-weight: 600; }
.kb-flags { display: flex; flex-direction: column; gap: 4px; }
.kb-toolbar { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.kb-editor { width: 100%; min-height: 420px; font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 14px; line-height: 1.55; }
.kb-split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.kb-pane { background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 14px; min-width: 0; }
.kb-preview { max-height: 620px; overflow: auto; }
.kb-prev-l { margin-bottom: 8px; }
.kb-tabs { display: none; margin-bottom: 10px; }
@media (max-width: 900px) {
  .kb-split { grid-template-columns: 1fr; }
  .kb-tabs { display: inline-flex; }
  .kb-pane.m-hide { display: none; }
}
.kb-media { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.kb-media-item { border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 6px; display: flex; flex-direction: column; gap: 6px; }
.kb-media-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; }
.kb-media-item.uploading { justify-content: center; min-height: 90px; }
.kb-media-add { border: 2px dashed var(--line); border-radius: var(--radius); background: var(--surface-2); color: var(--muted); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 120px; cursor: pointer; font: inherit; }
.job-kb { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.job-kb .chip { text-decoration: none; }
.chip.warn { border-color: var(--live-strong); background: var(--warn-soft); }
.f047-factors { display: flex; flex-direction: column; gap: 6px; margin-bottom: 6px; }
.f047-factors .row-inline { gap: 6px; }
.f047-factors input:first-child { flex: 1; }
/* Pareigybių sąrašas (Personalas → Pareigybės) */
.pos-intro { margin: 0; min-width: 220px; }
.pos-table td { vertical-align: top; }
.pos-notes { max-width: 380px; white-space: pre-line; }
.pos-factors { display: flex; flex-wrap: wrap; gap: 4px; max-width: 420px; }
.pos-factors .pill.small { margin-left: 0; }
.pos-unlisted { margin-top: 14px; }
.pos-factor-list { display: flex; flex-direction: column; gap: 2px; margin-bottom: 4px; max-height: 300px; overflow-y: auto; border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 4px 10px; }
.pos-factor-list:empty { display: none; }
.pos-factor { display: flex; align-items: center; gap: 8px; }
.pos-factor .check { margin: 5px 0; }
.pos-factor .grow { flex: 1; min-width: 0; }
.pos-factor input[type=checkbox] { flex: none; }
.pos-factor input.narrow { width: 76px; padding: 5px 8px; font-size: 14px; flex: none; }
.pos-file-now { margin-bottom: 6px; }
.pos-file-now:empty { display: none; }

/* ---------- LIDL sąskaitos ---------- */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 14px; }
@media (max-width: 820px) { .grid2, .grid3 { grid-template-columns: 1fr; } }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ok-text { color: var(--ok); }
pre.code { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; font-size: 13px; overflow-x: auto; white-space: pre; }
.ic.rot90 svg { transform: rotate(90deg); }
.lidl-warn { border-left: 4px solid var(--live-strong); background: var(--warn-soft); margin-bottom: 14px; }
.lidl-state { display: inline-block; font-size: 12.5px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.lidl-state.warn { background: var(--warn-soft); color: var(--warn); }
.lidl-state.ready { background: var(--brand-soft); color: var(--brand); }
.lidl-state.issued { background: var(--live); color: #1B2733; }
.lidl-state.sent { background: var(--brand); color: #fff; }
.lidl-state.ok { background: var(--ok-soft); color: var(--ok); }
.lidl-state.danger { background: var(--danger-soft); color: var(--danger); }
.lidl-table td.cb, .lidl-table th.cb { width: 34px; }
.lidl-table tr.lidl-overdue td:first-child { box-shadow: inset 3px 0 0 var(--danger); }
.lidl-bulk { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 14px; margin-bottom: 12px; background: var(--ink); color: var(--surface); border-radius: var(--radius); }
.lidl-bulk .btn.ghost { color: var(--surface); }
.lidl-picker { display: flex; flex-direction: column; gap: 8px; }
.lidl-stores-pick { max-height: 260px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 10px; display: flex; flex-direction: column; gap: 2px; }
.lidl-inv-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; }
.lidl-items input { width: 100%; }
.lidl-items input.small { margin-top: 4px; font-size: 13px; }
.lidl-items input.narrow { width: 80px; }
.lidl-items td { vertical-align: top; }
.lidl-attach { margin-top: 16px; border-top: 1px solid var(--line-soft); padding-top: 12px; }
.lidl-attach h3 { margin-bottom: 6px; }
.lidl-files { margin: 0 0 10px; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.lidl-files li { display: flex; align-items: center; gap: 6px; }
.lidl-files li a.grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lidl-files select { width: auto; }
.lidl-inv-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.lidl-log { max-height: 50vh; overflow-y: auto; padding-left: 22px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.lidl-import-opts { display: flex; flex-direction: column; gap: 6px; margin: 12px 0; }
.lidl-checks { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.lidl-checks li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.lidl-prices th { font-size: 12px; }
.page-lidl .seg { max-width: 100%; overflow-x: auto; }
.page-lidl .toolbar > .seg { flex: 0 1 auto; }
@media (max-width: 820px) { .page-lidl .seg > * { white-space: nowrap; } }

/* ---------- Svarba ir užduotys ---------- */
.pre-wrap { white-space: pre-wrap; }
.prio { display: inline-block; font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 999px; white-space: nowrap; background: var(--surface-2); color: var(--muted); }
.prio-high { background: var(--warn-soft); color: var(--warn); }
.prio-urgent { background: var(--danger); color: #fff; }
.prio-low { background: var(--surface-2); color: var(--muted); }
.ev-prio { display: inline-grid; place-items: center; width: 15px; height: 15px; border-radius: 50%; font-size: 11px; font-weight: 800; margin-right: 4px; vertical-align: 1px; }
.ev-prio.prio-high { background: var(--live); color: #1B2733; }
.ev-prio.prio-urgent { background: var(--danger); color: #fff; }
.is-list { display: flex; flex-direction: column; gap: 10px; }
.is-card { text-align: left; display: flex; flex-direction: column; gap: 6px; border: 0; border-left: 4px solid var(--c); cursor: pointer; font: inherit; color: inherit; width: 100%; }
.is-card:hover { box-shadow: 0 0 0 2px var(--brand-soft), var(--shadow); }
.is-card.closed { opacity: .65; }
.is-card.overdue { box-shadow: inset 0 0 0 1px var(--danger-soft), var(--shadow); }
.is-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.is-title { font-size: 16px; }
.is-meta { display: flex; flex-wrap: wrap; gap: 12px; }
.is-type { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; }
.is-type .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.is-status { font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.is-status.new { background: var(--brand-soft); color: var(--brand); }
.is-status.doing { background: var(--live); color: #1B2733; }
.is-status.wait { background: var(--warn-soft); color: var(--warn); }
.is-status.ok { background: var(--ok-soft); color: var(--ok); }
.is-h { margin: 10px 0 6px; }
.is-dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 12px 0; }
.is-dl dt { color: var(--muted); font-size: 13px; }
.is-dl dd { margin: 0; }
.is-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.is-files, .is-log { border-top: 1px solid var(--line-soft); padding-top: 12px; margin-top: 12px; }
.is-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; margin-bottom: 8px; }
.is-photo { position: relative; }
.is-photo img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; display: block; }
.is-photo .icon-btn { position: absolute; top: 4px; right: 4px; background: var(--surface); }
.is-pdf { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; aspect-ratio: 1; border: 1px solid var(--line); border-radius: 8px; font-size: 12px; padding: 6px; text-align: center; word-break: break-all; }
.is-timeline { list-style: none; padding: 0; margin: 0 0 10px; display: flex; flex-direction: column; gap: 8px; }
.is-timeline li { padding: 8px 10px; border-radius: 8px; background: var(--surface-2); }
.is-timeline li.log { background: transparent; padding: 2px 10px; border-left: 2px solid var(--line); border-radius: 0; }
.is-comment { display: flex; gap: 8px; align-items: flex-end; }
.is-comment textarea { flex: 1; }
.lidl-docs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.lidl-doc { border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 8px; display: flex; flex-direction: column; gap: 4px; background: var(--surface); }
.lidl-doc.sel { box-shadow: 0 0 0 2px var(--brand); }
.lidl-doc img, .lidl-doc .is-pdf { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; }
.lidl-doc-big { display: block; margin-bottom: 8px; }
.lidl-doc-big img, .lidl-doc-big .is-pdf { width: 100%; max-height: 50vh; object-fit: contain; border-radius: 8px; }
button.lidl-doc { font: inherit; color: inherit; text-align: left; cursor: pointer; }

/* ---------- Sutartys ir aktai ---------- */
.client-row small.type { color: var(--brand); }
.agr-block, .acts-block { margin-top: 18px; }
.agr-list { display: flex; flex-direction: column; gap: 10px; }
.agr-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; background: var(--surface); }
.agr-card.archived { opacity: .6; }
.agr-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.agr-sum { font-weight: 700; margin-right: 6px; }
.agr-items { list-style: none; margin: 8px 0 0; padding: 0; }
.agr-items li { display: flex; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line-soft); font-size: 14px; }
.agr-client { font-weight: 600; margin: 0 0 4px 2px; }
.agr-sub { margin: 18px 0 4px; font-size: 15px; }
.agr-edit-items { display: flex; flex-direction: column; gap: 10px; margin: 8px 0; }
.agr-edit-row { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; background: var(--surface-2); }
.agr-edit-main { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.agr-edit-main input { flex: 1; font-weight: 600; }
.agr-edit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 0 12px; }
.agr-edit-grid .row-inline { flex-wrap: nowrap; }
.agr-edit-grid input.num { width: 64px; flex: none; }
.agr-edit-grid .row-inline select, .agr-edit-grid .row-inline input:not(.num) { flex: 1; min-width: 0; }
.three { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 14px; }
@media (max-width: 700px) { .three { grid-template-columns: 1fr; } }
.act-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; margin-bottom: 10px; font-size: 14px; }
.act-items input { width: 100%; min-width: 0; }
.act-items input.num { width: 76px; text-align: right; }
.act-items input.unit { width: 60px; }
.act-items td:first-child { min-width: 200px; }
.act-works { list-style: none; margin: 4px 0 10px; padding: 0; max-height: 220px; overflow: auto; }
.act-works li { display: flex; gap: 10px; align-items: center; padding: 3px 0; border-bottom: 1px solid var(--line-soft); font-size: 13.5px; }
.act-sum { list-style: none; margin: 8px 0; padding: 0; }
.act-sum li { display: flex; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line-soft); }
.act-preview { margin-top: 8px; }
.acts-due { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.acts-noact { margin: 0 0 12px; }
.acts-noact summary { cursor: pointer; }
.acts-noact > div { margin-top: 4px; }
.month-label { min-width: 130px; text-align: center; }
.sig-wrap { margin: 10px 0; }
.sig-head { display: flex; justify-content: space-between; align-items: center; }
.sig-canvas { display: block; width: 100%; height: 170px; border: 1px dashed var(--line); border-radius: var(--radius); background: #fff; touch-action: none; cursor: crosshair; }
.sig-line { border-top: 1px solid var(--muted); margin: -36px 18px 40px; pointer-events: none; opacity: .5; }
.card.narrow { max-width: 820px; }

/* ---------- Pranešimai ir žinutės ---------- */
.brand { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.bell-btn { position: relative; border: 0; background: transparent; color: inherit; cursor: pointer; padding: 6px; border-radius: 10px; display: inline-flex; }
.bell-btn:hover { background: rgba(255,255,255,.08); }
.bell-btn .nav-badge { position: absolute; top: -2px; right: -4px; margin: 0; min-width: 18px; height: 18px; font-size: 10px; }
.side-bell { color: var(--side-text); }
.mobile-bell { display: none; }
@media (max-width: 820px) {
  .mobile-bell { display: inline-flex; position: fixed; top: calc(10px + env(safe-area-inset-top)); right: 12px; z-index: 30; background: var(--surface); color: var(--ink); box-shadow: var(--shadow); width: 42px; height: 42px; align-items: center; justify-content: center; border-radius: 50%; }
  .content > .page-head { padding-right: 52px; }
}
.notif-tools { margin-bottom: 10px; }
.notif-list { display: flex; flex-direction: column; gap: 2px; max-height: 65vh; overflow: auto; }
.notif { display: flex; gap: 12px; text-align: left; border: 0; background: transparent; padding: 10px 8px; border-radius: 10px; cursor: pointer; font: inherit; color: inherit; width: 100%; }
.notif:hover { background: var(--surface-2); }
.notif.unread { background: var(--brand-soft); }
.notif.unread strong::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); margin-right: 6px; vertical-align: middle; }
.notif-ico { flex: none; width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--surface-2); color: var(--ink-2); }
.notif-ico.k-leave { color: #00838F; } .notif-ico.k-task { color: var(--brand); } .notif-ico.k-issue { color: #D9480F; } .notif-ico.k-act { color: var(--ok); }
.notif-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.notif-body { white-space: pre-line; font-size: 14px; color: var(--ink-2); }
.toast-link { border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; padding: 0; }

.chat { display: grid; grid-template-columns: 320px 1fr; gap: 16px; height: calc(100vh - 140px); min-height: 420px; }
.chat-side { display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.chat-list { flex: 1; overflow: auto; background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 6px; }
.chat-row { display: flex; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 10px; color: inherit; text-decoration: none; }
.chat-row:hover { background: var(--surface-2); }
.chat-row.on { background: var(--brand-soft); }
.chat-row.unread strong { color: var(--brand); }
.chat-row .nav-badge { margin-left: 0; }
.chat-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.chat-row-top { display: flex; justify-content: space-between; gap: 8px; }
.chat-row-top strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-row-last { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-row.unread .chat-row-last { color: var(--ink); font-weight: 600; }
.avatar.group { background: var(--surface-2); color: var(--ink-2); }
.chat-thread { display: flex; flex-direction: column; background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow); min-height: 0; overflow: hidden; }
.chat-empty { margin: auto; text-align: center; }
.chat-empty .icon svg { width: 40px; height: 40px; }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line-soft); }
.chat-head-actions { display: flex; gap: 2px; }
.chat-head-actions .icon-btn.off { opacity: .45; text-decoration: line-through; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 12px 14px; display: flex; flex-direction: column; gap: 3px; background: var(--surface-2); }
.chat-day { align-self: center; font-size: 12px; color: var(--muted); background: var(--surface); padding: 2px 10px; border-radius: 999px; margin: 10px 0 6px; }
.chat-older { align-self: center; }
.msg { display: flex; gap: 6px; align-items: flex-end; max-width: 84%; }
.msg:not(.cont) { margin-top: 6px; }
.msg.mine { align-self: flex-end; flex-direction: row-reverse; }
.avatar-gap { width: 20px; flex: none; }
.msg.mine .avatar-gap { display: none; }
.msg-col { display: flex; flex-direction: column; min-width: 0; }
.msg-author { font-size: 12px; color: var(--muted); margin: 0 0 2px 10px; }
.bubble { position: relative; background: var(--surface); border-radius: 16px 16px 16px 4px; padding: 7px 11px 5px; box-shadow: 0 1px 1px rgba(27,39,51,.06); overflow-wrap: anywhere; }
.msg.mine .bubble { background: var(--brand); color: #fff; border-radius: 16px 16px 4px 16px; }
.msg.mine .bubble a { color: #fff; }
.chat-text { white-space: pre-wrap; font-size: 15px; line-height: 1.4; }
.chat-time { display: block; text-align: right; font-size: 10.5px; opacity: .65; margin-top: 2px; }
.chat-img img { display: block; max-width: min(260px, 60vw); max-height: 320px; border-radius: 10px; margin: 2px 0 4px; }
.chat-file { display: inline-flex; align-items: center; gap: 4px; }
.msg-del { position: absolute; top: -10px; left: -10px; display: none; border: 0; border-radius: 50%; width: 26px; height: 26px; background: var(--surface); color: var(--danger); box-shadow: var(--shadow); cursor: pointer; align-items: center; justify-content: center; }
.msg.mine:hover .msg-del, .msg.sel .msg-del { display: inline-flex; }
.chat-seen { align-self: flex-end; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.chat-compose { display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line-soft); background: var(--surface); }
.chat-compose textarea { flex: 1; resize: none; min-height: 42px; max-height: 160px; border-radius: 20px; padding: 10px 14px; }
.chat-send { border-radius: 50%; width: 44px; height: 44px; padding: 0; justify-content: center; }
.pick-list { display: flex; flex-direction: column; gap: 2px; max-height: 55vh; overflow: auto; margin-top: 8px; }
.pick-row { display: flex; gap: 10px; align-items: center; padding: 8px; border-radius: 10px; color: inherit; text-decoration: none; }
.pick-row:hover { background: var(--surface-2); }
.pick-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 2px 12px; max-height: 50vh; overflow: auto; margin-top: 10px; }
.pick-check { align-items: center; }
@media (max-width: 820px) {
  .chat { grid-template-columns: 1fr; height: auto; min-height: 0; }
  .chat.has-thread .chat-side { display: none; }
  .chat:not(.has-thread) .chat-thread { display: none; }
  .chat-list { box-shadow: none; padding: 0; background: transparent; }
  .page-zinutes .chat.has-thread { position: fixed; inset: 0 0 calc(64px + env(safe-area-inset-bottom)) 0; z-index: 20; }
  .page-zinutes .chat.has-thread .chat-thread { border-radius: 0; height: 100%; }
  .msg { max-width: 90%; }
}
.msg.mine .bubble em.muted { color: rgba(255,255,255,.8); }

/* ---------- Priemonės ---------- */
.sup-form .two { margin-bottom: 4px; }
.sup-items { max-height: 46vh; overflow: auto; margin: 8px 0; border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 4px 8px; }
.sup-cat h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 12px 0 4px; }
.sup-row { display: flex; align-items: center; gap: 8px; padding: 6px 4px; border-bottom: 1px solid var(--line-soft); }
.sup-row:last-child { border-bottom: 0; }
.sup-row.on { background: var(--brand-soft); border-radius: 8px; }
.sup-step { display: inline-flex; align-items: center; gap: 2px; }
.sup-step .icon-btn { width: 36px; height: 36px; font-size: 20px; font-weight: 700; border: 1px solid var(--line); border-radius: 50%; }
input.sup-qty { width: 64px; text-align: center; }
.sup-unit { width: 38px; font-size: 13px; }
input.sup-unit-in { width: 70px; }
.sup-custom { display: flex; flex-direction: column; gap: 6px; margin: 6px 0 10px; }
.sup-custom .sup-row input:first-child { flex: 1; min-width: 0; }
.sup-lines { font-size: 14px; color: var(--ink-2); }
.is-status.new { background: var(--brand-soft); color: var(--brand); }
@media print { .page-priemones .toolbar, .page-priemones .head-actions, .page-priemones .row-end { display: none !important; } }

/* ---------- QR / NFC žymos ir transportas ---------- */
.tag-view { text-align: center; }
.qr-img { display: inline-block; background: #fff; padding: 6px; border-radius: 8px; line-height: 0; }
.qr-img svg { max-width: min(260px, 70vw); height: auto; }
.tag-code { margin: 10px 0 4px; font-size: 15px; }
.scan-box { display: flex; flex-direction: column; gap: 10px; }
.scan-video { width: 100%; max-height: 50vh; border-radius: 10px; background: #000; object-fit: cover; }
.tag-page { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.tag-page .btn.wide { min-height: 52px; font-size: 16px; }
.tag-ok { color: var(--ok); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.tag-tasks { display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; }
.tr-board { margin-bottom: 16px; }
.tr-list { list-style: none; margin: 0; padding: 0; }
.tr-list li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line-soft); }
.tr-list li .fl-plate { align-self: center; }
.tr-mine { display: flex; align-items: center; gap: 12px; background: var(--ok-soft); border-radius: 10px; padding: 10px 12px; margin: 8px 0; }
section.tr-mine { margin: 0 0 14px; }
.big-input { font-size: 22px; padding: 10px 12px; letter-spacing: .04em; }
.worker-head .btn { align-self: flex-start; }

/* ---------- Inventorius ---------- */
.inv-stats { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.inv-stats .stat { background: var(--surface); border-radius: 12px; padding: 10px 14px; min-width: 120px; display: flex; flex-direction: column; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.inv-stats .stat-num { font-size: 20px; font-weight: 700; }
.inv-stats .stat-label { font-size: 12px; color: var(--muted); }
.inv-stats .stat.danger .stat-num { color: var(--danger, #C2382F); }
.inv-st.ok { background: var(--ok-soft); color: var(--ok); }
.inv-st.danger { background: #FBE3E1; color: #A12A22; }
.inv-st.warn { background: var(--warn-soft); color: var(--ink); }
.inv-st.off { background: var(--line-soft); color: var(--muted); }
.inv-where { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.inv-alert-dot { color: #C2382F; margin-left: 6px; vertical-align: middle; }
.inv-table td { vertical-align: top; }
.inv-head { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 12px; }
.inv-head h2 { margin: 2px 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.inv-loc { margin-top: 6px; }
.inv-alerts { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.inv-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.inv-actions.col { flex-direction: column; }
.inv-actions.col .btn { min-height: 50px; font-size: 16px; justify-content: center; }
.inv-body { display: grid; grid-template-columns: 1fr 340px; gap: 14px; align-items: start; }
.inv-side { display: flex; flex-direction: column; gap: 14px; }
@media (max-width: 900px) { .inv-body { grid-template-columns: 1fr; } }
.inv-tl { list-style: none; margin: 0; padding: 0; }
.inv-ev { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--line-soft); }
.inv-ev:first-child { border-top: 0; }
.inv-ev-ic { width: 28px; height: 28px; border-radius: 50%; background: var(--line-soft); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.inv-ev.gedimas .inv-ev-ic { background: #FBE3E1; color: #A12A22; }
.inv-ev.remontas .inv-ev-ic, .inv-ev.aptarnavimas .inv-ev-ic { background: var(--ok-soft); color: var(--ok); }
.inv-ev.open { background: #FFF6F5; margin: 0 -8px; padding-left: 8px; padding-right: 8px; border-radius: 8px; }
.inv-ev .pill { margin-left: 6px; }
.inv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; margin-bottom: 18px; }
.inv-card { text-align: left; display: flex; flex-direction: column; gap: 4px; cursor: pointer; border: 0; font: inherit; color: inherit; }
.inv-card-top { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.inv-fs { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px 0; margin: 4px 0 12px; }
.inv-fs legend { font-size: 13px; color: var(--muted); padding: 0 4px; }
.inv-lvl.danger { background: #FBE3E1; color: #A12A22; }
.inv-lvl.warn { background: var(--warn-soft); }
.nav-badge.inline { position: static; margin-left: 6px; }
@media (max-width: 640px) { .three { grid-template-columns: 1fr; } .inv-table th:nth-child(3), .inv-table td:nth-child(3) { display: none; } }
/* Inventoriaus nuotraukos */
.inv-photo { display: inline-flex; align-items: center; justify-content: center; object-fit: cover; background: var(--line-soft); color: var(--muted); border-radius: 8px; flex: none; }
.inv-photo.thumb { width: 44px; height: 44px; }
.inv-photo.big { width: 160px; height: 160px; border-radius: 12px; flex-direction: column; gap: 4px; }
.inv-photo.card-img { width: 100%; height: 140px; border-radius: 10px; margin-bottom: 4px; }
.inv-photo.wide { width: 100%; max-height: 260px; border-radius: 12px; margin: 4px 0; }
.inv-photo.noimg { border: 1px dashed var(--line); padding: 0; margin: 0; }
.inv-photo-link { line-height: 0; }
.inv-ph-cell { width: 56px; padding-right: 0 !important; }
@media (max-width: 640px) { .inv-photo.big { width: 100%; height: 220px; } }

/* ---------- Saugos dokumentai (SDL, sertifikatai) ---------- */
.ghs { display: inline-flex; line-height: 0; }
.ghs svg { display: block; }
.ghs-row { display: flex; flex-wrap: wrap; gap: 4px; }
.sd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin-bottom: 18px; }
.sd-card { text-align: left; display: flex; flex-direction: column; gap: 8px; cursor: pointer; border: 0; font: inherit; color: inherit; }
.sd-card:hover { box-shadow: var(--focus); }
.sd-card.archived { opacity: .6; }
.sd-card-top { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.sd-card-foot { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: auto; }
.sd-signal { font-weight: 700; letter-spacing: .04em; }
.sd-signal.pavojinga { background: var(--danger-soft); color: var(--danger); }
.sd-signal.atsargiai { background: var(--warn-soft); color: var(--warn); }
.sd-ppe { display: flex; flex-wrap: wrap; gap: 6px; }
.ppe-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; padding: 2px 9px; border-radius: 999px; background: #E3EEFB; color: #0B4F9C; }
.sd-ppe.big .ppe-chip { font-size: 15px; padding: 6px 12px; }
@media (prefers-color-scheme: dark) { .ppe-chip { background: #16304F; color: #9CC6F5; } }
.sd-head { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.sd-head h2 { margin: 2px 0 4px; }
.ghs-legend { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-bottom: 8px; }
.ghs-item { display: flex; gap: 10px; align-items: center; }
.sd-firstaid { border-left: 5px solid var(--ok); }
.sd-firstaid h2 { display: flex; align-items: center; gap: 6px; }
.sd-firstaid.compact { border-left: 4px solid var(--ok); padding: 8px 10px; background: var(--ok-soft); border-radius: var(--radius); margin-top: 8px; }
.sd-quick { display: flex; flex-direction: column; gap: 10px; }
.sd-preview { max-width: 100%; max-height: 520px; border-radius: var(--radius); border: 1px solid var(--line); display: block; margin: 8px 0 16px; }
.sd-pick { max-height: 220px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 10px; margin-top: 6px; background: var(--surface-2); }
.sd-pick .check { display: flex; padding: 3px 0; }
.sd-form fieldset { border: 0; padding: 0; }
.ghs-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; }
.ghs-btn { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 4px; border: 2px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); cursor: pointer; font: inherit; text-align: center; line-height: 1.2; }
.ghs-btn.on { border-color: #E30613; background: var(--danger-soft); }
.ghs-btn:not(.on) .ghs { opacity: .55; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 4px 12px; }
.row-start { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 4px 0 16px; }
.sdl-btn { display: inline-flex; align-items: center; gap: 3px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); border-radius: 999px; padding: 2px 8px 2px 4px; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; margin-right: 6px; white-space: nowrap; }
.sdl-btn:hover { border-color: var(--brand); }
.sd-table td:first-child { min-width: 220px; }
.totp-setup ol { padding-left: 20px; margin: 0 0 10px; }
.totp-setup .qr-img { display: flex; justify-content: center; margin: 6px 0; }
.totp-setup .qr-img svg { width: 200px; height: 200px; background: #fff; padding: 4px; border-radius: 8px; }

/* ---------- Kokybės kontrolė ---------- */
.q-res.atitinka { background: var(--ok-soft); color: var(--ok); }
.q-res.neatitinka { background: var(--danger-soft); color: var(--danger); }
.q-pick { max-height: 55vh; overflow-y: auto; margin-top: 8px; display: flex; flex-direction: column; gap: 4px; }
.q-pick-row { display: flex; gap: 10px; align-items: center; text-align: left; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; }
.q-pick-row:hover { border-color: var(--brand); }
.q-due { display: flex; flex-direction: column; gap: 8px; }
.q-due-row { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: var(--radius); background: var(--surface-2); border-left: 4px solid var(--warn); }
.q-due-row.late { border-left-color: var(--danger); }
.q-site-head { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-start; }
.q-site-head h2 { margin: 2px 0; }
.q-sched { margin-top: 6px; }
.q-rooms input, .q-rooms select { width: 100%; min-width: 0; }
.q-rooms td:first-child { min-width: 160px; }
.q-floor { max-width: 90px; }
.q-add { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0; }
.q-add select { flex: 1 1 220px; } .q-add input:not(.q-n) { flex: 2 1 200px; } .q-n { width: 70px; }
.field.inline { display: flex; align-items: center; gap: 8px; margin: 0; }
.field.inline .field-label { margin: 0; white-space: nowrap; }
.q-sticky { position: sticky; top: 8px; z-index: 5; padding: 12px 14px; }
.q-bar { height: 8px; border-radius: 999px; background: var(--line-soft); overflow: hidden; }
.q-bar span { display: block; height: 100%; background: var(--brand); transition: width .2s; }
.q-prog-txt { display: flex; gap: 8px; margin-top: 6px; font-size: 14px; }
.q-live.atitinka { color: var(--ok); } .q-live.neatitinka { color: var(--danger); }
.q-items { display: flex; flex-direction: column; gap: 10px; margin: 10px 0 14px; }
.q-item { border-left: 5px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.q-item.ok { border-left-color: var(--ok); }
.q-item.bad { border-left-color: var(--danger); }
.q-item.crit { box-shadow: 0 0 0 2px var(--danger-soft), var(--shadow); }
.q-item-top { display: flex; gap: 10px; align-items: flex-start; }
.q-lvl { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.q-lvl.l1 { background: var(--surface-2); color: var(--ink-2); } .q-lvl.l2 { background: var(--brand-soft); color: var(--brand); } .q-lvl.l3 { background: #F1E4F8; color: #7A2FA0; }
@media (prefers-color-scheme: dark) { .q-lvl.l3 { background: #3A2347; color: #D9A6F2; } }
.q-focus { color: var(--warn); display: flex; gap: 4px; align-items: flex-start; }
.q-crit-wrap summary { cursor: pointer; font-size: 13px; color: var(--brand); }
.q-crit { margin: 6px 0 0; padding-left: 18px; font-size: 13px; color: var(--ink-2); }
.q-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.q-btn { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 12px; border-radius: var(--radius); border: 2px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-weight: 600; font-size: 16px; cursor: pointer; }
.q-btn.ok.on { background: var(--ok); border-color: var(--ok); color: #fff; }
.q-btn.bad.on { background: var(--danger); border-color: var(--danger); color: #fff; }
.q-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.q-chip { border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 14px; cursor: pointer; }
.q-chip.on { background: var(--danger-soft); border-color: var(--danger); color: var(--danger); font-weight: 600; }
.q-chip.crit { border-style: dashed; border-color: var(--danger); }
.q-chip.crit.on { background: var(--danger); color: #fff; border-style: solid; }
.q-chip.static { cursor: default; padding: 3px 10px; font-size: 13px; background: var(--surface-2); }
.q-chip.static.crit { background: var(--danger-soft); color: var(--danger); border-style: solid; }
.q-chip.static.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.q-chip.static.rep { background: var(--warn-soft); color: var(--warn); border-color: var(--warn); font-weight: 600; }
.q-photos { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.q-ph { position: relative; display: inline-block; }
.q-ph img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; display: block; border: 1px solid var(--line); }
.q-ph-x { position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: var(--danger); color: #fff; font-size: 14px; line-height: 22px; cursor: pointer; padding: 0; }
.q-skip { align-self: flex-start; color: var(--muted); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; }
.q-finish { display: flex; flex-direction: column; gap: 8px; margin: 18px 0 30px; }
.q-sum { display: flex; gap: 14px; align-items: center; padding: 12px 14px; border-radius: var(--radius); background: var(--surface-2); margin-bottom: 12px; }
.q-sum.atitinka { background: var(--ok-soft); color: var(--ok); }
.q-sum.neatitinka { background: var(--danger-soft); color: var(--danger); }
.q-sum-pct { font-size: 30px; font-weight: 800; line-height: 1; }
.q-result-head { display: flex; flex-direction: column; gap: 8px; }
.q-result-head .head-actions { align-self: flex-end; }
.q-meta { display: grid; gap: 3px; font-size: 14px; }
.q-fix { display: flex; gap: 12px; align-items: center; text-decoration: none; color: var(--ink); border-left: 5px solid var(--warn); }
.q-fix.late { border-left-color: var(--danger); }
.q-bad-list { display: flex; flex-direction: column; gap: 12px; }
.q-bad { padding: 10px 12px; border-radius: var(--radius); background: var(--surface-2); display: flex; flex-direction: column; gap: 6px; border-left: 4px solid var(--danger); }
.q-spark polyline { fill: none; stroke: var(--brand); stroke-width: 1.6; }
.q-spark circle.ok { fill: var(--ok); } .q-spark circle.bad { fill: var(--danger); }
.q-bars { display: flex; flex-direction: column; gap: 6px; }
.q-bar-row { display: grid; grid-template-columns: minmax(120px, 220px) 1fr 40px; gap: 10px; align-items: center; font-size: 14px; }
.q-bar-t { height: 10px; background: var(--line-soft); border-radius: 999px; overflow: hidden; }
.q-bar-t span { display: block; height: 100%; background: var(--warn); }
.q-bar-n { text-align: right; font-variant-numeric: tabular-nums; }
.q-user .q-chips { margin-top: 4px; }
.q-groups input[type=checkbox] { width: auto; }
.q-empty p { max-width: 640px; }

.card h2 .count { margin-left: 8px; font-size: 13px; font-weight: 600; color: var(--muted); background: var(--surface-2); border-radius: 999px; padding: 1px 8px; vertical-align: 2px; }
@media (max-width: 800px) { .q-sticky { top: 64px; } }

/* ---------- Šventinės dienos ---------- */
.hol-label { display: block; font-size: 11px; font-weight: 600; color: var(--danger); line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.month-cell.hol { background: color-mix(in srgb, var(--danger-soft) 55%, transparent); }
.month-cell.hol .month-num { color: var(--danger); }
.col-head-btn { flex-wrap: wrap; }
.col-head-btn .hol-label { flex-basis: 100%; text-align: center; }
.tg-colhead.hol .dn, .tg-colhead.hol .wd { color: var(--danger); }
.tg-col.hol { background: color-mix(in srgb, var(--danger-soft) 40%, transparent); }
.pill.hol-pill { background: var(--danger-soft); color: var(--danger); margin-left: 8px; font-weight: 600; }
.worker-head .pill.hol-pill { margin-left: 6px; }
.ts td.hol-work { box-shadow: inset 0 0 0 2px var(--danger); }

.page-sventes .page-head p { max-width: 720px; }
.hol-sum td { vertical-align: middle; }
.hol-sum .pill.warn { margin-left: 6px; }
.hol-people { display: inline-flex; gap: 2px; align-items: center; flex-wrap: wrap; }
.hol-people .chip { display: inline-flex; align-items: center; gap: 4px; }
.hol-matrix table { border-collapse: separate; border-spacing: 0; }
.hol-matrix th.sticky { position: sticky; left: 0; z-index: 1; background: var(--surface); min-width: 220px; max-width: 280px; text-align: left; }
.hol-matrix thead th.sticky { z-index: 2; }
.hol-matrix th.hd { font-size: 12px; text-align: center; white-space: nowrap; padding: 6px 4px; }
.hol-matrix th.hd span { display: block; font-weight: 600; }
.hol-matrix th.hd small { color: var(--muted); font-weight: 500; }
.hol-matrix th.hd.past, .hol-matrix td.past { opacity: .45; }
.hol-matrix td.hcell { padding: 3px; text-align: center; }
.hol-matrix tr.hl th.sticky { box-shadow: inset 4px 0 0 var(--brand); }
.hol-site { display: flex; gap: 8px; align-items: flex-start; }
.hol-site input { margin-top: 3px; width: auto; }
.hol-site strong { display: block; font-size: 14px; }
.hol-site .link-btn { font-size: 12px; padding: 0; text-align: left; }
.hc { position: relative; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; width: 44px; min-height: 34px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font: inherit; font-weight: 700; font-size: 15px; cursor: pointer; padding: 2px; }
.hc:disabled { cursor: default; }
.hc small { font-size: 10px; font-weight: 600; }
.hc.work { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 40%, transparent); color: var(--ok); }
.hc.unset { background: var(--warn-soft); border: 1px dashed var(--warn); color: var(--warn); }
.hc.off { background: var(--surface-2); }
.hc.ex::after { content: ''; position: absolute; top: 3px; right: 3px; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }
.hc.bad { border-color: var(--danger); color: var(--danger); }
.hc-n { position: absolute; bottom: -5px; right: -5px; min-width: 17px; height: 17px; border-radius: 9px; background: var(--ink); color: var(--surface); font-size: 10px; line-height: 17px; padding: 0 4px; }
.hc-n.warn { background: var(--warn); }
.hol-legend .hc { width: 24px; min-height: 20px; font-size: 12px; cursor: default; vertical-align: middle; margin: 0 2px; }
.hol-dlg { display: flex; flex-direction: column; gap: 12px; }
.hol-fs { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.hol-fs legend { font-weight: 600; margin-bottom: 6px; }
.radio-row { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.radio-row input { width: auto; margin: 0; }
.hol-days { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 12px; padding: 8px 10px; background: var(--surface-2); border-radius: var(--radius); }
.hol-days[hidden] { display: none; }
@media (max-width: 800px) {
  .hol-matrix th.sticky { min-width: 150px; max-width: 170px; }
  .hc { width: 38px; }
}
.hc { width: 48px; }
.hc small { font-size: 9px; letter-spacing: -.2px; }
.hol-site > div { min-width: 0; }
.hol-site .link-btn { display: block; white-space: normal; line-height: 1.3; }
.page-sventes .toolbar .seg { max-width: 100%; overflow-x: auto; }
@media (max-width: 800px) {
  .hc { width: 42px; }
  .hol-sum td:nth-child(2) { min-width: 120px; }
  .page-sventes .toolbar > * { max-width: 100%; }
}

/* ---------- Programos diegimas ---------- */
.install-hint { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius); background: var(--warn-soft); color: var(--ink); margin: 0 0 14px; text-align: left; }
.install-hint > .ic { color: var(--warn); flex: none; margin-top: 2px; }
.install-hint strong { display: block; margin-bottom: 2px; }
.install-hint p { margin: 0 0 8px; font-size: 14px; line-height: 1.4; }
.install-hint.compact p { font-size: 13px; }
.install-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.login-card .install-hint { margin: 16px 0 0; }
.login-card .install-hint .btn { width: auto; margin-top: 0; }
.install-card .install-hint { margin: 0; }

/* ---------- Sutartys ir aktai (v3.21) ---------- */
.agr-edit-grid input.num.wide { width: 100%; }
.agr-edit-grid input.unit { width: 100%; }
.agr-est { margin-top: 4px; min-height: 1em; }
.agr-items li .right { text-align: right; }
.fill-opt { align-items: flex-start; padding: 6px 0; }
.fill-opt input { margin-top: 3px; }
.new-act .act-preview table td:first-child { width: 60%; }
.act-head-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 0 12px; }
.act-items textarea.act-title { width: 100%; min-width: 220px; resize: vertical; font: inherit; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); field-sizing: content; }
.act-items input.freq { width: 110px; }
.act-items input.unit { width: 64px; }
.act-items td { vertical-align: top; }
.act-items .fixed-mark { display: block; font-size: 11px; padding: 2px 0 0; margin-left: auto; color: var(--warn); }
.act-items td[hidden] { display: none; }
.from-agr { max-width: 340px; }
.act-add-work input[type=date] { width: auto; }
.act-add-work input:not([type]) { flex: 1; min-width: 180px; }
@media (min-width: 801px) { .dialog.wide:has(.act-edit) { max-width: min(1200px, 96vw); width: min(1200px, 96vw); } }
.act-items input.num { width: 72px; }
.act-items input.freq { width: 100px; }
.act-items textarea.act-title { min-width: 200px; }
.act-items td, .act-items th { padding-left: 4px; padding-right: 4px; }
.act-items th { font-size: 12px; line-height: 1.25; vertical-align: bottom; }
.act-items input[aria-label="Suma"] { width: 96px; }
.act-edit { min-width: 0; max-width: 100%; }
.act-edit .table-wrap { overflow-x: auto; max-width: 100%; }
.dialog-body:has(.act-edit) { overflow-x: hidden; }
@media (max-width: 800px) { .dialog:has(.act-edit), .dialog:has(.agr-edit-items), .dialog:has(.new-act) { width: 100%; max-width: 100vw; } }

/* ---------- v3.22: kopijavimas, pasirašymas el. paštu ---------- */
.sign-link { margin-top: 10px; padding: 10px 12px; background: var(--ok-soft); border-radius: var(--radius); }
.sign-link .row-inline input { flex: 1; min-width: 0; font-family: ui-monospace, monospace; font-size: 12.5px; }
.send-sign .num { width: 90px; }

/* Įspėjimas „esate ne prie objekto“ */
.far-warn { text-align: center; }
.far-warn-icon { width: 56px; height: 56px; margin: 4px auto 12px; border-radius: 50%; display: grid; place-items: center; background: var(--warn-soft); color: var(--warn); }
.far-warn-icon svg { width: 28px; height: 28px; }
.far-warn-text { font-size: 17px; font-weight: 600; line-height: 1.45; margin: 0 0 10px; }

/* ---------- Nesuplanuoti darbai (kalendorius) ---------- */
.cal-wrap.with-backlog { display: grid; grid-template-columns: minmax(0, 1fr) 272px; gap: 12px; align-items: start; }
.cal-wrap .cal-body { min-width: 0; }
.backlog {
  position: sticky; top: 12px; display: flex; flex-direction: column; gap: 8px; max-height: calc(100vh - 140px);
  background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 12px;
}
.backlog-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.backlog-head h2 { font-size: 15px; margin: 0; display: flex; align-items: center; gap: 8px; }
.backlog-head .count { font-size: 12px; font-weight: 700; color: var(--muted); }
.backlog-hint { margin: 0; font-size: 12px; color: var(--muted); }
.backlog-search { width: 100%; }
.backlog-list { display: flex; flex-direction: column; gap: 6px; overflow-y: auto; min-height: 40px; padding: 2px; margin: -2px; }
.backlog-empty { font-size: 13px; color: var(--muted); margin: 6px 2px; }
.bl-card {
  border: 1px dashed var(--line); border-radius: 8px; padding: 7px 9px; background: var(--surface-2); cursor: grab; user-select: none;
  display: flex; flex-direction: column; gap: 2px; font-size: 12.5px;
}
.bl-card:hover { border-color: var(--brand); background: var(--surface); }
.bl-card:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.bl-card.bl-urgent { border-left: 3px solid var(--danger); }
.bl-card.bl-high { border-left: 3px solid var(--warn); }
.bl-card.dragging { opacity: .35; }
.bl-title { font-weight: 600; line-height: 1.3; }
.bl-sub { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bl-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--ink-2); font-size: 12px; }
.bl-meta .ic.tiny { width: 12px; height: 12px; vertical-align: -2px; }
.bl-due.late { color: var(--danger); font-weight: 600; }
.bl-plan { margin-left: auto; }
.bl-float { position: fixed; left: 0; top: 0; z-index: 1000; pointer-events: none; box-shadow: 0 10px 24px rgba(0, 0, 0, .22); background: var(--surface); border-style: solid; opacity: .95; }
body.bl-dragging, body.bl-dragging * { cursor: grabbing !important; }
.month-cell.drop-on { outline: 2px solid var(--brand); outline-offset: -2px; background: color-mix(in srgb, var(--brand) 6%, var(--surface)); }
.backlog-drop { display: none; align-items: center; justify-content: center; gap: 6px; padding: 14px 8px; border: 2px dashed var(--line); border-radius: 8px; color: var(--muted); font-size: 12.5px; text-align: center; }
body.ev-dragging .backlog-drop { display: flex; }
.backlog.drop-here .backlog-drop { border-color: var(--brand); color: var(--brand); background: color-mix(in srgb, var(--brand) 6%, var(--surface)); }
.count-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--brand); color: #fff; font-size: 11px; font-weight: 700; margin-left: 2px; }
.btn.on { box-shadow: inset 0 0 0 2px var(--brand); }
.unsched-toggle { margin-bottom: 10px; font-weight: 600; }
.unsched-fields { margin-bottom: 8px; }
@media (max-width: 1100px) {
  .cal-wrap.with-backlog { grid-template-columns: 1fr; }
  .backlog { position: static; max-height: none; order: -1; }
  .backlog-list { max-height: 260px; }
}
.signed-file { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; font-size: 13px; }
.signed-file .ic.tiny { color: var(--ok); }

/* ---------- Sąskaitos ---------- */
.seg-link { display: inline-flex; align-items: center; gap: 2px; padding: 6px 12px; color: var(--ink-2); text-decoration: none; font-weight: 600; border-radius: 8px; }
.seg-link:hover { background: var(--surface-2); color: var(--brand); }
.crumb { display: inline-flex; align-items: center; gap: 2px; font-size: 13px; color: var(--muted); text-decoration: none; margin-bottom: 2px; }
.crumb:hover { color: var(--brand); }
.inv-sum { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.inv-sum-card { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius-lg); padding: 10px 14px; display: flex; flex-direction: column; gap: 2px; box-shadow: var(--shadow); }
.inv-sum-card strong { font-size: 20px; }
.inv-sum-card.total { background: var(--surface-2); }
.inv-sum-card.s-draft strong { color: var(--ink-2); }
.inv-sum-card.s-paid strong { color: var(--ok); }
.inv-due { display: block; }
.inv-bulk { margin-bottom: 8px; }
.inv-table td.chk, .inv-table th.chk { width: 32px; }
.inv-table tr.click { cursor: pointer; }
.inv-table tr.click:hover td { background: var(--surface-2); }
.inv-table tr.is-draft td:nth-child(4) { color: var(--muted); }
.grp { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.grp-cpo { background: color-mix(in srgb, var(--brand) 12%, var(--surface)); color: var(--brand); }
.grp-network { background: var(--warn-soft); color: var(--warn); }
.pill.info { background: color-mix(in srgb, var(--brand) 12%, var(--surface)); color: var(--brand); }
.info-box { background: color-mix(in srgb, var(--brand) 7%, var(--surface)); border: 1px solid color-mix(in srgb, var(--brand) 25%, transparent); border-radius: 10px; padding: 10px 12px; margin: 0 0 12px; font-size: 13.5px; line-height: 1.5; }
.danger-box { background: var(--danger-soft); color: var(--danger); border-radius: 10px; padding: 10px 12px; margin: 0 0 12px; }
.inv-edit .act-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.inv-items textarea { width: 100%; min-width: 220px; resize: vertical; }
.inv-items input.unit { width: 70px; }
.inv-items input.num { width: 96px; text-align: right; }
.inv-items tfoot td { padding-top: 10px; }
.plain-list { margin: 0; padding-left: 18px; }
.plain-list li { margin: 4px 0; }
.pm-card h2 { margin: 0; font-size: 17px; }
.pm-head { margin-bottom: 10px; }
.price-matrix th, .price-matrix td { vertical-align: top; }
.price-matrix .pm-svc { min-width: 220px; }
.price-matrix .pm-svc input { width: 100%; }
.price-matrix input.unit { width: 78px; }
.price-matrix .pm-col { min-width: 108px; font-size: 12px; line-height: 1.25; }
.pm-cell { white-space: nowrap; }
.pm-cell input { width: 72px; text-align: right; display: block; }
.pm-cell input + input { margin-top: 3px; font-size: 12px; padding-top: 3px; padding-bottom: 3px; }
.pm-all { background: var(--surface-2); }
@media (max-width: 820px) {
  .inv-sum { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inv-sum-card.total { grid-column: 1 / -1; }
  .inv-table th:nth-child(3), .inv-table td:nth-child(3), .inv-table th:nth-child(5), .inv-table td:nth-child(5) { display: none; }
}

/* Akto peržiūra (v3.23.1) */
.act-toolbar { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 0 12px; margin-bottom: 12px; border-bottom: 1px solid var(--line, #e3e7ef); }
.act-info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px 18px; margin: 4px 0 14px; }
.act-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.act-info > span:last-child { overflow-wrap: anywhere; }
.act-view-items td, .act-view-items th { vertical-align: top; }
.act-view-items .act-row-hidden td { color: var(--muted, #8a93a6); }
.act-view-works { margin: 10px 0; }
.act-view-works summary { cursor: pointer; font-weight: 600; padding: 4px 0; }
.act-view-notes { margin: 10px 0; white-space: pre-wrap; }
@media (max-width: 600px) {
  .act-toolbar { display: grid; grid-template-columns: 1fr 1fr; }
  .act-toolbar .btn { width: 100%; min-width: 0; justify-content: center; padding-left: 8px; padding-right: 8px; }
  .act-toolbar .btn.primary { grid-column: 1 / -1; order: -1; }
  .act-info-grid { grid-template-columns: 1fr 1fr; gap: 8px 14px; }
}

/* LIDL automatika (v3.24) */
.lidl-state.approval { background: #FFF1D6; color: #8A5A00; box-shadow: inset 0 0 0 1px #F0C46A; }
.lidl-approval { margin: 10px 0 14px; padding: 12px 14px; border-left: 4px solid var(--line); }
.lidl-approval.wait { border-left-color: #E0A526; background: #FFF8E8; }
.lidl-approval.bad { border-left-color: var(--danger); background: var(--danger-soft); }
.lidl-approval p { margin: 4px 0; }
.lidl-warn-list { margin: 6px 0 0; padding-left: 18px; }
.lidl-approval-note { border-left: 4px solid #E0A526; background: #FFF8E8; margin-bottom: 12px; }
.lidl-stores { display: flex; flex-wrap: wrap; gap: 4px; }
.lidl-store-chip { display: inline-flex; align-items: center; gap: 2px; padding: 2px 7px; border-radius: 999px; font-size: 12px; font-family: var(--mono, monospace); background: var(--line-soft); color: var(--muted); }
.lidl-store-chip.done { background: var(--ok-soft, #E3F4EA); color: var(--ok, #1E8A5A); }
.lidl-check-list { list-style: none; margin: 0; padding: 0; }
.lidl-check-list li { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line-soft); }
.lidl-check-list li:first-child { border-top: 0; }
@media (prefers-color-scheme: dark) {
  .lidl-state.approval { background: #4A3a12; color: #F5D58A; box-shadow: none; }
  .lidl-approval.wait, .lidl-approval-note { background: #3A3018; }
}
.lidl-stamp-chip { display: inline-block; padding: 1px 6px; border: 1.5px solid currentColor; border-radius: 3px; font-size: 11px; font-weight: 700; white-space: nowrap; color: var(--text, #1c2430); background: var(--surface, #fff); }
.lidl-cq-doc { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 4px; margin: 0 8px 4px 0; text-decoration: none; }
.lidl-cq-doc img { max-width: 64px; max-height: 64px; border-radius: 4px; border: 1px solid var(--line); }

/* ---------- PIRKIMAI ---------- */
.pur-banner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: space-between; }
.pur-banner > div { flex: 1 1 320px; }
.pur-table td .pill { white-space: nowrap; }
.pur-form .span2 { grid-column: 1 / -1; }
.pur-card h3.sub, .pur-page h3.sub { font-size: 14px; margin: 16px 0 6px; color: var(--muted); font-weight: 600; }
.pur-files { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.pur-files li { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pur-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
@media (max-width: 820px) { .pur-grid2 { grid-template-columns: 1fr; } }
.pur-src { display: grid; grid-template-columns: max-content 1fr; gap: 3px 10px; margin: 0; }
.pur-src dt { color: var(--muted); }
.pur-src dd { margin: 0; overflow-wrap: anywhere; }
.pur-fwd { display: grid; gap: 4px; margin-bottom: 8px; overflow-wrap: anywhere; }
.pur-lines { margin-top: 12px; }
.pur-hist { margin-top: 14px; }
.pur-hist ul, .pur-resolved ul { padding-left: 18px; }
.check-line { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.check-line input[type=date] { width: auto; }
.pur-checks { display: grid; gap: 12px; }
.pur-check { margin-bottom: 0; display: grid; gap: 4px; overflow-wrap: anywhere; }
.pur-check-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pur-info { background: var(--surface-2); border-radius: 8px; padding: 6px 9px; }
.pur-box-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.pur-box-head h2 { margin: 0; font-size: 17px; overflow-wrap: anywhere; }
.pur-sup { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 2px; }
.pur-sup li { display: flex; align-items: center; gap: 6px; }
.pur-sup li > span:first-child { overflow-wrap: anywhere; }
.pur-tools > .seg { max-width: 100%; overflow-x: auto; flex: 0 1 auto; }
@media (max-width: 820px) { .pur-tools > .seg > * { white-space: nowrap; } }

/* Aktai, gauti el. paštu */
.macts-list { display: grid; gap: 8px; margin: 8px 0 16px; }
.macts-row { display: grid; gap: 4px; padding: 10px 12px; }
.macts-row .row-inline { gap: 6px; }
.macts-row .muted.small { overflow-wrap: anywhere; }
.macts-subs { display: grid; gap: 8px; margin: 6px 0; }
.macts-sub input, .macts-sub select { flex: 1 1 180px; min-width: 0; }
.macts-boxes { display: grid; gap: 6px; margin: 4px 0 10px; }
.macts-boxes .check { flex-wrap: wrap; align-items: baseline; overflow-wrap: anywhere; }
.macts-boxes .check span { flex-basis: 100%; padding-left: 26px; white-space: normal; }

/* ---------- Sutartys (3.29) ---------- */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pill.brand { background: var(--brand-soft); color: var(--brand); }
.agr-page { display: flex; flex-direction: column; gap: 4px; }
.agr-card2 {
  display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(150px, 1fr) minmax(0, 1.2fr) auto; gap: 8px 16px; align-items: center;
  border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; background: var(--surface);
}
.agr-card2.archived { opacity: .7; }
.agr-card-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 6px; }
.agr-card-title strong { font-size: 15.5px; }
.agr-client-link { flex-basis: 100%; font-weight: 600; text-decoration: none; font-size: 13px; }
.agr-card-when { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.agr-card-tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.agr-card-tags a.pill { text-decoration: none; }
.agr-card-act { display: flex; gap: 4px; align-items: center; justify-content: flex-end; }
.agr-card2 .agr-more { grid-column: 1 / -1; }
.agr-more > summary, .agr-old > summary { cursor: pointer; color: var(--muted); font-size: 13px; font-weight: 600; }
.agr-old { margin-top: 10px; }
.agr-old .agr-list { margin-top: 8px; }
.agr-bar { width: 100%; max-width: 180px; height: 6px; border-radius: 3px; background: var(--line-soft); overflow: hidden; }
.agr-bar span { display: block; height: 100%; background: var(--brand); border-radius: 3px; }
.agr-bar.warn span { background: var(--warn); }
.agr-code { display: inline-block; min-width: 34px; margin-right: 6px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
@media (max-width: 820px) { .agr-card2 { grid-template-columns: minmax(0, 1fr); } .agr-card-act { justify-content: flex-start; } .agr-card2 .agr-items li { flex-wrap: wrap; } .agr-card2 .agr-items .nowrap { white-space: normal; } }

.dialog:has(.agr-form) { max-width: min(1340px, 97vw); width: 97vw; }
.agr-form { display: flex; flex-direction: column; gap: 16px; }
.agr-top { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.agr-side { display: flex; flex-direction: column; gap: 16px; }
.agr-sec { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 14px 16px; background: var(--surface); }
.agr-sec > h3 { margin: 0 0 8px; font-size: 15px; }
.agr-objs { display: flex; flex-direction: column; }
.agr-objs .check { margin: 6px 0; }
.agr-same { border-top: 1px solid var(--line-soft); padding-top: 10px; }
.agr-file { display: flex; flex-direction: column; gap: 8px; border: 1px dashed #C5CED6; border-radius: var(--radius); padding: 10px; background: var(--surface-2); }
.agr-file.over { border-color: var(--brand); background: var(--brand-soft); }
.agr-file-cur { display: flex; align-items: center; gap: 8px; }
.agr-file-cur a, .agr-file-cur span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.agr-drop { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; cursor: pointer; }
.agr-items-sec { padding-left: 0; padding-right: 0; }
.agr-items-head { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; padding: 0 16px; }
.agr-items-head h3 { margin: 0; font-size: 15px; }
.agr-items-head input[type=search] { width: 280px; max-width: 100%; }
.agr-items-sec > .hint { display: block; padding: 4px 16px 6px; }
.agr-items-sec > .row-inline { padding: 8px 16px 0; }
.agr-table-wrap { border-top: 1px solid var(--line-soft); max-height: 60vh; overflow: auto; }
.agr-table { min-width: 860px; }
.agr-table thead th { position: sticky; top: 0; background: var(--surface); z-index: 1; font-size: 12.5px; vertical-align: bottom; }
.agr-table thead tr + tr th { top: 34px; }
.agr-table th.pm-col.obj { min-width: 150px; text-align: center; background: var(--surface-2); border-left: 1px solid var(--line-soft); }
.agr-table th.pm-sub { font-weight: 500; color: var(--muted); text-align: center; background: var(--surface-2); border-left: 1px solid var(--line-soft); }
.agr-table td { vertical-align: middle; }
.agr-table td.pm-cell { border-left: 1px solid var(--line-soft); }
.agr-table .pm-cell input { display: inline-block; width: 72px; }
.agr-table .pm-cell input + input { margin: 0 0 0 4px; font-size: 14px; padding: 6px 8px; }
.agr-table .pm-svc { min-width: 260px; }
.agr-table .pm-svc input, .agr-table .pm-svc select { width: 100%; }
.agr-table input.unit { width: 70px; }
.agr-table input.num { width: 56px; }
.agr-table select { padding: 6px 8px; font-size: 14px; }
.agr-chk { width: 30px; }
.agr-svc { display: flex; align-items: baseline; gap: 2px; flex-wrap: wrap; cursor: pointer; }
.agr-row.off td { color: var(--muted); padding-top: 5px; padding-bottom: 5px; }
.agr-row.off .agr-svc span:not(.agr-code) { color: var(--ink-2); }
.agr-row.variant .pm-svc { padding-left: 28px; }
.agr-grp th { text-align: left; background: var(--surface-2); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding-top: 10px; }
.agr-grp.warn th { background: var(--warn-soft); color: var(--warn); }
.agr-more-row td { background: var(--surface-2); }
.agr-more-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 12px; }
.agr-desc { flex: 1 1 320px; }
.agr-desc summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--brand); }
.agr-desc p { white-space: pre-line; max-height: 220px; overflow: auto; }
.agr-total { font-weight: 600; }
.cpo-cat section h3 { margin: 14px 0 6px; font-size: 14px; }
.cpo-cat ul { list-style: none; margin: 0; padding: 0; }
.cpo-cat li { border-top: 1px solid var(--line-soft); padding: 6px 0; }
.cpo-cat summary { cursor: pointer; }
.cpo-desc { white-space: pre-line; color: var(--ink-2); }
@media (max-width: 900px) { .agr-top { grid-template-columns: 1fr; } .agr-more-grid { grid-template-columns: 1fr; } .dialog:has(.agr-form) { width: 100%; max-width: 100vw; } }
.agr-page .seg { flex-wrap: wrap; max-width: 100%; }
.agr-page .toolbar select { max-width: 100%; }
.agr-table .row-inline { flex-wrap: nowrap; gap: 4px; }
.agr-table .row-inline select { width: auto; min-width: 130px; }
.agr-table .pm-cell input.pm-price { width: 86px; }
.split > * { min-width: 0; }
.agr-block { margin-bottom: 18px; }

/* ---------- Mėnuo (3.30) ---------- */
.mb-head { flex-wrap: wrap; gap: 10px 16px; justify-content: flex-start; }
.mb-head .seg { margin-left: auto; }
.mb-month { display: flex; align-items: center; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 2px; }
.mb-month strong { padding: 0 8px; min-width: 130px; text-align: center; }
.mb-page { display: flex; flex-direction: column; gap: 14px; }
.mb-att { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 14px 16px; }
.mb-att h2 { font-size: 15px; margin: 0 0 10px; }
.mb-att-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.mb-att-card { display: flex; flex-direction: column; gap: 2px; text-align: left; border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 10px 12px; background: var(--surface-2); color: var(--ink-2); font: inherit; cursor: pointer; }
.mb-att-card strong { font-size: 14px; color: var(--ink); }
.mb-att-card span { font-size: 12.5px; }
.mb-att-card.todo { background: var(--warn-soft); border-color: transparent; }
.mb-att-card.bad { background: var(--danger-soft); border-color: transparent; }
.mb-att-card.bad strong { color: var(--danger); }
.mb-att-card:hover { filter: brightness(.97); }
.mb-tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.mb-tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px; display: flex; flex-direction: column; }
.mb-tile-l { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.mb-tile strong { font-size: 19px; }
.mb-tile small { font-size: 13px; color: var(--muted); font-weight: 500; }
.mb-bulk { margin: 0; }
.mb-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.mb-table { min-width: 1020px; }
.mb-table th { font-size: 12.5px; color: var(--muted); }
.mb-table td { vertical-align: middle; }
.mb-grp th { text-align: left; background: var(--surface-2); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding-top: 10px; }
.mb-row.done td { background: color-mix(in srgb, var(--ok-soft) 35%, var(--surface)); }
.mb-name { min-width: 220px; }
.mb-name .link-btn { text-align: left; padding: 0; }
.mb-cell { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.mb-sub { display: block; font-size: 12px; color: var(--muted); line-height: 1.3; }
.mb-pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap; background: var(--surface-2); color: var(--ink-2); }
.mb-pill.ok { background: var(--ok-soft); color: var(--ok); }
.mb-pill.wait { background: var(--brand-soft); color: var(--brand); }
.mb-pill.todo { background: var(--warn-soft); color: var(--warn); }
.mb-pill.bad { background: var(--danger-soft); color: var(--danger); }
.mb-pill.none { background: transparent; color: var(--muted); padding-left: 0; font-weight: 500; }
.mb-next { white-space: nowrap; }
.mb-panel .mb-steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin: 10px 0 14px; }
.mb-step { border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 6px 8px; }
.mb-step-l { display: block; font-size: 11.5px; color: var(--muted); font-weight: 600; margin-bottom: 2px; }
.mb-timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.mb-timeline li { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 8px; }
.mb-ev-ic { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-2); }
.mbev-signed .mb-ev-ic, .mbev-paid .mb-ev-ic { background: var(--ok-soft); color: var(--ok); }
.mbev-check .mb-ev-ic, .mbev-bad .mb-ev-ic { background: var(--danger-soft); color: var(--danger); }
.mb-timeline .link-btn { margin-right: 12px; font-size: 13px; }
@media (max-width: 720px) { .mb-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } .mb-panel .mb-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } .mb-head .seg { margin-left: 0; } }
.mb-step .mb-pill { white-space: normal; max-width: 100%; overflow-wrap: anywhere; }
.bank-head { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 8px; }
.bank-head p { flex: 1 1 320px; margin: 0; }
.bank-dlg h3 { font-size: 15px; margin: 14px 0 8px; }
.bank-list { display: flex; flex-direction: column; gap: 8px; }
.bank-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 12px; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; }
.bank-purpose { overflow-wrap: anywhere; margin-top: 2px; }
.bank-act { display: flex; flex-direction: column; gap: 6px; }
.bank-sels { display: flex; flex-direction: column; gap: 4px; }
.bank-title { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin: 14px 0 8px; }
.bank-title h3 { margin: 0; }
.bank-why { margin-top: 6px; padding: 5px 8px; border-radius: 6px; background: var(--warn-soft); color: var(--warn); overflow-wrap: anywhere; }
.bank-why.ok { background: var(--ok-soft); color: var(--ok); }
.bank-why-list { margin: 0; padding-left: 24px; }
.bank-sum.ok { color: var(--ok); }
.bank-suspect summary { color: var(--warn); }
.bank-recent { margin-top: 12px; }
.bank-recent summary { cursor: pointer; font-weight: 600; color: var(--muted); }
@media (max-width: 720px) { .bank-row { grid-template-columns: 1fr; } }

/* Automatinės mėnesio sąskaitos */
.auto-head { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; margin-bottom: 8px; }
.auto-head > div:first-child { flex: 1 1 320px; min-width: 0; }
.auto-head p { margin: 0 0 6px; }
.auto-dlg td { vertical-align: top; }
.mb-row.mb-auto .mb-name .link-btn { text-align: left; }
.mb-head .btn .mb-pill { margin-left: 6px; }
.auto-dlg { min-width: 0; max-width: 100%; }
.auto-dlg .table-wrap { max-width: 100%; overflow-x: auto; }
.auto-dlg td:first-child { overflow-wrap: anywhere; }
.auto-mode-m { display: none; }
@media (max-width: 640px) {
  .auto-dlg .auto-mode { display: none; }
  .auto-mode-m { display: block; }
  .auto-dlg td:first-child { overflow-wrap: normal; }
  .auto-dlg table, .auto-dlg tbody, .auto-dlg tr { display: block; width: 100%; }
  .auto-dlg thead { display: none; }
  .auto-dlg tr { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 10px 0; border-bottom: 1px solid var(--line, #e5e7eb); }
  .auto-dlg td { display: block; padding: 0 !important; border: 0 !important; }
  .auto-dlg td:nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
  .auto-dlg td:nth-child(5) { grid-column: 1 / -1; grid-row: 3; }
  .auto-head > div:first-child { flex-basis: 100%; }
}

/* Laiškai klientams */
.cm-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }
.cm-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.cm-card.bad { border-color: var(--danger, #c2382f); }
.cm-card-head { display: flex; gap: 10px; align-items: flex-start; }
.cm-card-head .grow { min-width: 0; overflow-wrap: anywhere; }
.cm-lines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.cm-lines li { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; }
.cm-card-act { display: flex; justify-content: flex-end; margin-top: auto; }
.cm-body { font-family: inherit; width: 100%; min-height: 220px; }
.cm-compose { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(320px, 1.4fr); gap: 14px; align-items: start; }
.cm-col { padding: 14px 16px; min-width: 0; }
.cm-col h2 { font-size: 16px; margin: 0 0 10px; }
.cm-rcpt { max-height: 420px; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; margin-top: 8px; }
.cm-rcpt-row { display: flex; gap: 8px; align-items: center; padding: 6px 10px; border-bottom: 1px solid var(--line-soft); margin: 0; }
.cm-rcpt-row small { overflow-wrap: anywhere; text-align: right; max-width: 45%; }
.cm-preview { margin-top: 12px; border-top: 1px dashed var(--line); padding-top: 10px; }
.cm-pre { white-space: pre-wrap; font-family: inherit; font-size: 13px; background: var(--surface-2); padding: 10px 12px; border-radius: 8px; margin: 6px 0 0; overflow-wrap: anywhere; }
.cm-sig { white-space: pre-line; }
@media (max-width: 800px) { .cm-compose { grid-template-columns: 1fr; } .cm-list { grid-template-columns: 1fr; } }

/* ---------- Rolės ir leidimai (medis) ---------- */
.acl-lv { display: inline-block; margin-left: 6px; padding: 0 7px; border-radius: 999px; font-size: 11.5px; font-weight: 600; background: var(--surface-2); color: var(--muted); }
.acl-lv.l1 { background: var(--brand-soft); color: var(--brand); }
.acl-lv.l2 { background: color-mix(in srgb, var(--ok) 12%, var(--surface)); color: var(--ok); }
.acl-lv.l3 { background: var(--warn-soft); color: var(--warn); }
.acl-lv.l4 { background: var(--danger-soft); color: var(--danger); }
.acl-chips li { display: inline-flex; align-items: center; }
.acl-xnote { margin: 8px 0 0; }
.acl-xmark { font-size: 11.5px; font-weight: 700; color: var(--danger); }
.acl-head h2 { margin: 0; font-size: 18px; }
.acl-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
.acl-side { position: sticky; top: 72px; margin: 0; }
.acl-side h3 { font-size: 14px; margin: 0 0 6px; }
.acl-side h3 + p, .acl-side p { margin: 0 0 12px; line-height: 1.45; }
.acl-xlist { margin: 0 0 12px; padding-left: 18px; font-size: 13px; }
.acl-group > h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 22px 0 8px; }
.acl-mod { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 10px; }
.acl-mod.off { background: var(--surface-2); }
.acl-mod.owner { background: var(--surface-2); }
.acl-mod-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; }
.acl-mod-head strong { font-size: 15px; }
.acl-mod-head .switch-line { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.acl-quick { width: auto; font-size: 13px; padding: 4px 8px; }
.acl-note { margin: -4px 14px 8px; }
.acl-secs { border-top: 1px solid var(--line-soft); }
.acl-sec { display: grid; grid-template-columns: 190px auto minmax(0, 1fr); gap: 4px 14px; align-items: center; padding: 9px 14px; border-top: 1px solid var(--line-soft); }
.acl-sec:first-child { border-top: 0; }
.acl-sec-name { font-weight: 600; font-size: 14px; }
.acl-sec.owner { grid-template-columns: 190px 1fr; color: var(--muted); }
.acl-seg > * { padding: 5px 10px; font-size: 12.5px; }
.acl-seg > *:disabled { opacity: .4; cursor: not-allowed; }
.acl-seg > .on.l1 { color: var(--brand); }
.acl-seg > .on.l2 { color: var(--ok); }
.acl-seg > .on.l3 { color: var(--warn); }
.acl-seg > .on.l4 { color: var(--danger); }
.acl-desc { margin: 0; color: var(--ink-2); line-height: 1.4; }
.acl-x { grid-column: 2 / -1; display: flex; flex-wrap: wrap; gap: 4px 18px; }
.acl-x .check { margin: 0; font-size: 13px; }
.acl-cmp-wrap { padding: 0; }
.acl-cmp { font-size: 13px; }
.acl-cmp th, .acl-cmp td { white-space: nowrap; }
.acl-cmp .acl-cmp-name { min-width: 220px; text-align: left; }
.acl-cmp thead th { position: sticky; top: 0; background: var(--surface); }
.acl-cmp-group th { text-align: left; background: var(--surface-2); text-transform: uppercase; font-size: 11.5px; letter-spacing: .04em; color: var(--muted); }
.acl-cmp-sec { padding-left: 22px !important; }
.acl-cmp .acl-lv { margin-left: 0; }
@media (max-width: 900px) {
  .acl-layout { grid-template-columns: 1fr; }
  .acl-side { position: static; order: -1; }
  .acl-sec { grid-template-columns: 1fr; }
  .acl-sec.owner { grid-template-columns: 1fr; }
  .acl-x { grid-column: 1; }
  .acl-seg { display: flex; overflow-x: auto; }
}
.acl-head { position: sticky; top: 0; z-index: 5; background: var(--paper); padding: 8px 0; margin-bottom: 4px; }
.acl-owner-note { flex: 1 1 220px; }
/* Sutartys: ne šio sezono darbai */
.agr-items li.off-season { opacity: .55; }
.agr-season-wrap { display: inline-flex; align-items: center; gap: 6px; }
.agr-season { width: auto; font-size: 13px; padding: 4px 8px; }
.agr-lidl-season { margin-top: 4px; color: var(--ink-2); }
/* Objekto darbuotojai */
.site-workers .chips { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0 0 8px; }
.site-workers .chip { background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; font-size: 13px; }
.site-cost-sum { margin: 4px 0; }
.site-cost-workers { margin: 2px 0 10px; padding-left: 18px; color: var(--ink-2); }
.share-in { width: 64px; text-align: right; padding: 4px 6px; }
/* Daugiabučio butų sutartys – viena kortelė */
.agr-house-list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.agr-house-unit { display: grid; grid-template-columns: 80px minmax(0, 1fr); gap: 8px; align-items: start; }
.agr-unit-no { font-size: 13px; padding-top: 14px; color: var(--ink-2); }
.agr-house-unit .agr-card2 { margin: 0; }
@media (max-width: 700px) { .agr-house-unit { grid-template-columns: 1fr; } .agr-unit-no { padding-top: 0; } }

/* Darbo jėga ir marža sutarčių kortelėse */
.agr-labor { border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 10px; padding: 3px 10px; font: inherit; font-size: 13px; text-align: left; cursor: pointer; display: inline-flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.agr-labor:hover { border-color: var(--brand); }
.agr-margin.pos { color: var(--ok); font-weight: 600; }
.agr-margin.neg { color: var(--danger); font-weight: 600; }
.agr-labor-bar { padding-top: 0; }
.agr-labor-dlg .table td.num { white-space: nowrap; }

/* Darbų saugos pasirašymai */
.sign-todo h2 { margin: 0 0 4px; font-size: 17px; }
.sign-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.sign-item { width: 100%; display: flex; gap: 12px; align-items: center; text-align: left; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: var(--radius); padding: 12px; font: inherit; cursor: pointer; }
.sign-item:hover { border-color: var(--brand); }
.sign-ok { display: flex; gap: 12px; align-items: center; }
.sign-done { margin-top: 12px; }
.sign-done summary { cursor: pointer; font-weight: 600; }
.sign-agree { margin: 12px 0 4px; font-weight: 600; }
.sign-dlg .pre, .card .pre { white-space: pre-line; }
.sign-banner { display: flex; gap: 12px; align-items: center; text-decoration: none; color: var(--ink); border: 1px solid var(--warn); background: var(--warn-soft); margin-bottom: 12px; }
.pos-checks { display: grid; gap: 4px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); max-height: 260px; overflow: auto; padding: 4px 0; }
.instr-types { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.instr-types a.pill { text-decoration: none; }
.instr-due { margin: 6px 0 12px; }
.instr-due summary { cursor: pointer; font-weight: 600; }
.ext-row { margin-bottom: 6px; }
.sign-stats { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 640px) { .sign-stats { grid-template-columns: repeat(2, 1fr); } }

/* Rekvizitai iš registro */
.reg-box { background: var(--brand-soft); border-radius: var(--radius); padding: 10px 12px; margin-bottom: 14px; }
.reg-box .row-inline input { flex: 1; min-width: 0; }
.reg-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; max-height: 260px; overflow: auto; }
.reg-item { width: 100%; display: flex; text-align: left; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 8px; padding: 6px 10px; font: inherit; cursor: pointer; }
.reg-item:hover { border-color: var(--brand); }
.reg-card { background: var(--surface); border-radius: 8px; padding: 10px; margin-top: 8px; display: grid; gap: 6px; }
.reg-filled { background: var(--ok-soft); }
.deal-reg { margin: 4px 0 12px; }
.deal-reg summary { cursor: pointer; font-weight: 600; font-size: 14px; margin-bottom: 8px; }
.inv-pick { margin: -4px 0 8px; }
.inv-pick-h { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 10px 0 0; }
.inv-pick .reg-item.ghost { border-style: dashed; }
.inv-buyer { margin: 0 0 8px; }

/* ---------- Valymo standartai ---------- */
.cs-levels { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.cs-levels > .cs-row { border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; background: var(--surface-2); }
.cs-lvl-head { display: flex; align-items: center; gap: 8px; }
.cs-lvl { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font-weight: 700; color: #fff; background: var(--muted); flex: none; }
.cs-lvl.l1 { background: #6D7B88; } .cs-lvl.l2 { background: #2340C7; } .cs-lvl.l3 { background: #8E3BB8; } .cs-lvl.l4 { background: #1E8A5A; }
.cs-row.click { cursor: pointer; }
.cs-row.click:hover { background: var(--brand-soft); }
.cs-row.click:focus-visible { outline: none; box-shadow: var(--focus); }
.cs-table td, .cs-table th { vertical-align: top; }
.cs-table th[scope=row] { font-weight: 600; text-align: left; white-space: nowrap; }
.cs-grp { font-size: 14px; margin: 16px 0 6px; color: var(--ink-2); }
.cs-code { text-decoration: none; border-bottom: 1px dotted var(--muted); margin-right: 4px; white-space: nowrap; cursor: help; }
.cs-freq { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
.cs-qlist { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 2px; }
.cs-qlist > li { padding: 6px 8px; border-radius: 8px; }
.cs-kind { margin-right: 4px; }
.cs-kind.critical { background: var(--danger-soft); color: var(--danger); }
.cs-kind.initial { background: var(--warn-soft); color: var(--warn); }
.cs-kind.extra { background: var(--brand-soft); color: var(--brand); }

/* ---------- Objektų vertinimai ---------- */
.as-list { display: flex; flex-direction: column; gap: 8px; }
.as-card { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius-lg); box-shadow: var(--shadow); color: var(--ink); text-decoration: none; }
.as-card:hover { border-color: var(--brand); }
.as-card-top { display: flex; gap: 8px; align-items: center; }
.as-head { flex-wrap: wrap; gap: 8px; }
.as-head h1 { flex: 1 1 200px; min-width: 0; overflow-wrap: anywhere; }
.as-save { font-size: 12px; padding: 3px 9px; border-radius: 99px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.as-save.ok { background: var(--ok-soft); color: var(--ok); }
.as-save.offline, .as-save.error { background: var(--warn-soft); color: var(--warn); }
.as-steps { position: sticky; top: 0; z-index: 5; display: flex; gap: 4px; overflow-x: auto; background: var(--paper); padding: 6px 0 10px; margin-bottom: 4px; scrollbar-width: none; }
.as-step { flex: 1 0 auto; display: flex; align-items: center; gap: 6px; padding: 8px 10px; border: 1px solid var(--line); background: var(--surface); border-radius: 99px; font: 600 13px var(--font); color: var(--ink-2); cursor: pointer; }
.as-step-n { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--surface-2); font-size: 12px; }
.as-step.done .as-step-n { background: var(--ok-soft); color: var(--ok); }
.as-step.on { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.as-step.on .as-step-n { background: var(--brand); color: #fff; }
.as-body { display: flex; flex-direction: column; gap: 12px; }
.as-sec h2 { margin-top: 0; }
.as-body input, .as-body select, .as-body textarea { font-size: 16px; }
.as-body .seg > * { padding: 9px 14px; font-size: 14px; }
.as-body .seg { flex-wrap: wrap; margin-bottom: 10px; }
.as-nav { position: sticky; bottom: 0; display: flex; justify-content: space-between; gap: 10px; padding: 12px 0 calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--paper) 70%, transparent); margin-top: 8px; z-index: 4; }
.as-nav .btn { min-height: 46px; padding: 0 18px; font-size: 15px; }
.as-q { padding: 8px 0; border-top: 1px solid var(--line-soft); display: flex; flex-direction: column; gap: 6px; }
.as-q:first-of-type { border-top: 0; }
.as-q-t { font-weight: 600; }
.as-q-n { color: var(--muted); }
.as-q textarea { min-height: 44px; resize: vertical; }
.as-zsum { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.as-zone { padding: 0; overflow: hidden; }
.as-zhead { width: 100%; display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 0; background: transparent; text-align: left; font: inherit; color: inherit; cursor: pointer; min-height: 56px; }
.as-zone.open .as-zhead { border-bottom: 1px solid var(--line-soft); background: var(--surface-2); }
.as-zcode { flex: none; display: inline-grid; place-items: center; min-width: 36px; height: 30px; padding: 0 6px; border-radius: 8px; font-weight: 700; font-size: 13px; background: var(--brand-soft); color: var(--brand); }
.as-zcode.g-S { background: #E3F3EA; color: #1E8A5A; } .as-zcode.g-V { background: #FDF1D8; color: #9A6200; } .as-zcode.g-P { background: #F3E8F9; color: #8E3BB8; }
.as-zcode.g-G, .as-zcode.g-T { background: #ECEFF2; color: #455A64; }
.as-chev { color: var(--muted); font-size: 14px; }
.as-zbody { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 2px; }
.as-lvls { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.as-lvls.now { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.as-lvl { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 8px 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font: 500 11px var(--font); color: var(--muted); cursor: pointer; min-height: 52px; }
.as-lvl strong { font-size: 18px; color: var(--ink); }
.as-lvl.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.as-lvl.on strong { color: var(--brand); }
.as-lvl:disabled { opacity: .4; cursor: not-allowed; }
.as-sub { font-size: 14px; margin: 14px 0 4px; }
.as-sub2 { font-size: 13px; margin: 10px 0 2px; color: var(--muted); font-weight: 600; }
.as-el { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line-soft); }
.as-el.off .as-el-l > span { opacity: .55; }
.as-el.need .as-el-q input { border-color: var(--warn); background: var(--warn-soft); }
.as-el-l { flex: 1; display: flex; gap: 10px; align-items: flex-start; cursor: pointer; min-width: 0; }
.as-el-l input[type=checkbox] { width: 22px; height: 22px; flex: none; margin-top: 1px; }
.as-el-q { display: flex; align-items: center; gap: 4px; flex: none; }
.as-el-q input { width: 84px; }
.as-photos { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 4px 0 6px; }
.as-ph-btns { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.q-ph.pending img { opacity: .55; }
.as-ph-wait { position: absolute; left: 0; right: 0; bottom: 4px; text-align: center; font-size: 10px; font-weight: 600; color: var(--ink); }
.as-zact { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line-soft); }
.as-ztypes .cs-grp:first-child { margin-top: 0; }
.as-zt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px; }
.as-zt { text-align: left; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font: inherit; color: var(--ink); cursor: pointer; min-height: 48px; }
.as-zt:hover, .as-zt.on { border-color: var(--brand); background: var(--brand-soft); }
.as-sign { padding: 10px 0; border-top: 1px solid var(--line-soft); display: flex; flex-direction: column; gap: 8px; }
.as-sign-top { display: flex; gap: 10px; align-items: flex-start; }
.as-sign-top .seg { margin: 0; flex-wrap: nowrap; }
.as-sign.yes .as-sign-top strong { color: var(--warn); }
.as-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.as-risk { padding: 8px 0; }
.as-summary li { padding: 3px 0; }
@media (max-width: 640px) {
  .as-body .three { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 8px; }
  .as-body .two { grid-template-columns: 1fr; }
  .as-step-l { display: none; }
  .as-step.on .as-step-l { display: inline; }
  .as-lvl span { font-size: 10px; }
  .cs-freq { grid-template-columns: 1fr; }
}
.as-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.as-tools select { width: auto; max-width: 100%; }
@media (max-width: 640px) { .as-tools > .btn { width: 100%; justify-content: center; } .as-tools .grow { display: none; } .as-tools select { flex: 1 1 140px; } }
.as-lvl span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 820px) {
  .as-nav { bottom: calc(64px + env(safe-area-inset-bottom)); }
  .as-steps { padding-right: 52px; }
}
.as-body .seg > .on { background: var(--brand); color: #fff; }

/* ---------- Švaros lygiai: objekto zonos ir instruktažas ---------- */
.guide-head{display:flex;flex-direction:column;align-items:flex-start;gap:2px;margin-bottom:8px}
.guide-head h1{font-size:1.25rem}
.guide-frame{display:block;width:100%;min-height:320px;border:0;border-radius:12px;background:#f2f5f5}
.page-svaros-lygiai{padding-bottom:0}
.lvl-pill{display:inline-block;font-size:12px;font-weight:700;border-radius:999px;padding:2px 9px;white-space:nowrap}
.lvl-pick{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}
.lvl-btn{display:flex;flex-direction:column;align-items:flex-start;gap:2px;min-width:0;padding:8px 10px;border:1px solid var(--line,#d9dfe5);border-top:4px solid var(--c);border-radius:8px;background:#fff;cursor:pointer;text-align:left;font:inherit}
.lvl-btn b{font-size:16px}
.lvl-btn span{font-size:12px;color:var(--muted,#5f6b77);overflow-wrap:anywhere}
.lvl-btn.on{background:#e0eff1;box-shadow:inset 0 0 0 2px #0f6c7a}
.lvl-btn:disabled{opacity:.35;cursor:not-allowed}
@media (max-width:520px){.lvl-pick{grid-template-columns:repeat(2,minmax(0,1fr))}}
.site-zones{margin-top:8px}
.zone-log{margin-top:6px}
.zone-log summary{cursor:pointer;color:var(--muted,#5f6b77)}
.kb-pinned{display:block;margin-bottom:12px;border-left:4px solid #0f6c7a}

/* ---------- Valymo planas ---------- */
.plan-head h1 { margin: 4px 0 2px; }
.plan-status { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; border-left: 4px solid var(--line); }
.plan-status.st-juodrastis { border-left-color: var(--warn); }
.plan-status.st-galioja { border-left-color: var(--ok); }
.plan-status.st-suplanuota { border-left-color: var(--accent, #2f7f92); }
.plan-stats { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.plan-stats .stat strong { font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
.plan-tabs { margin-top: 4px; }
.plan-tabs button { white-space: nowrap; }
.plan-create ul { margin-bottom: 14px; }
.plan-form td { vertical-align: top; }
.plan-form input, .plan-form select { width: 100%; min-width: 90px; padding: 6px 8px; font-size: 14px; }
.plan-els td { vertical-align: top; }
.plan-els select { padding: 5px 6px; font-size: 13.5px; max-width: 170px; }
.plan-els .cb { width: 28px; }
.num-in { width: 76px; text-align: right; padding: 5px 7px; font-size: 14px; }
.plan-zone h3 { margin: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.plan-zone > select { margin-top: 8px; max-width: 360px; }
.plan-checks { list-style: none; margin: 0; padding: 0; }
.plan-checks .check { margin: 6px 0; }
.plan-rules details { border-top: 1px solid var(--line-soft); padding: 8px 0; }
.plan-rules summary { cursor: pointer; font-weight: 600; }
.plan-rules ol { margin: 6px 0 0; padding-left: 22px; }
.plan-rules li { margin: 3px 0; font-size: 14px; }
.cloth-dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-left: 3px; vertical-align: -1px; box-shadow: 0 0 0 1px rgba(0,0,0,.12); }
.day-picks { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.day-picks .check { margin: 4px 0; }
.sched-row { border-top: 1px solid var(--line-soft); padding: 10px 0; }
.sched-row .row-inline select, .sched-row .row-inline input { width: auto; }
.hr-list li.warn { background: color-mix(in srgb, var(--warn) 10%, transparent); }
.day-name { width: 30px; display: inline-block; }
.plan-diff ul { margin: 6px 0 10px; padding-left: 20px; }
.plan-diff li.major { font-weight: 600; }
.plan-consent { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px 4px; margin-top: 8px; }
.plan-consent legend { font-weight: 600; padding: 0 4px; }
@media (max-width: 700px) {
  .plan-stats { grid-template-columns: 1fr 1fr; }
}
.plan-times { flex-wrap: wrap; gap: 8px; }
.plan-times input, .plan-times select { width: auto; flex: none; }
.plan-times input[type=time] { width: 130px; }

/* SMS kodas pasirašant */
.sms-box { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-top: 8px; }
.sms-box .row-inline { gap: 10px; flex-wrap: wrap; align-items: center; }
.otp-in { width: 9.5ch; font-size: 22px; letter-spacing: .18em; text-align: center; padding: 8px 10px; font-variant-numeric: tabular-nums; }
.sign-dlg .seg { margin-top: 8px; }
.sms-prev { max-width: 420px; font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; line-height: 1.4; }
@media (max-width: 720px) {
  .pay-table thead { display: none; }
  .pay-table tr { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; padding: 12px 0; border-bottom: 1px solid var(--line, #e3e7ee); }
  .pay-table td { display: block; border: 0; padding: 0; }
  .pay-table td.sms-prev, .pay-table td:nth-child(4), .pay-table td:nth-child(5) { grid-column: 1 / -1; max-width: none; }
}
.tg-card h3 { margin: 18px 0 8px; font-size: 15px; }
.tg-kinds { display: grid; gap: 6px; }
.tg-setup { margin-bottom: 8px; }
.tg-setup summary { cursor: pointer; font-weight: 600; margin-bottom: 8px; }
.tg-setup ol.steps { padding-left: 20px; display: grid; gap: 6px; }
.tg-mail { border-top: 1px solid var(--line, #e3e7ee); margin-top: 16px; }
.btn.disabled { opacity: .55; pointer-events: none; }
.tg-card input[type="time"] { width: auto; min-width: 110px; }
.tg-card .tg-kinds .check { margin: 0; }

/* ---------- Peržiūra „Žiūrėti kaip“ ---------- */

:root { --viewas-h: 44px; }
.viewas-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 90; height: var(--viewas-h);
  padding: 0 12px 0 16px; padding-top: env(safe-area-inset-top); box-sizing: content-box;
  display: flex; align-items: center; gap: 10px;
  background: repeating-linear-gradient(135deg, #F5D547 0 18px, #F0C93A 18px 36px); color: #1B2733;
  border-bottom: 2px solid #1B2733; box-shadow: 0 2px 10px rgba(0, 0, 0, .18); font-size: 14px;
}
.viewas-bar > .ic { flex: none; }
.viewas-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viewas-ro { flex: none; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; background: #1B2733; color: #F5D547; padding: 2px 8px; border-radius: 999px; }
.viewas-left { flex: none; font-size: 12px; font-weight: 600; opacity: .8; }
.viewas-back {
  flex: none; display: inline-flex; align-items: center; gap: 4px; border: 0; cursor: pointer;
  background: #1B2733; color: #fff; font: inherit; font-weight: 700; padding: 7px 14px 7px 10px; border-radius: 999px;
}
.viewas-back:hover { background: #000; }
.viewas-back:focus-visible { outline: 3px solid #fff; outline-offset: 1px; }
body.viewas { padding-top: calc(var(--viewas-h) + env(safe-area-inset-top)); }
body.viewas .sidebar { top: calc(var(--viewas-h) + env(safe-area-inset-top)); height: calc(100vh - var(--viewas-h)); height: calc(100dvh - var(--viewas-h) - env(safe-area-inset-top)); }
body.viewas .shell { min-height: calc(100vh - var(--viewas-h)); }
body.viewas .overlay { top: calc(var(--viewas-h) + env(safe-area-inset-top)); }
@media (max-width: 820px) {
  .viewas-bar { gap: 8px; padding-left: 12px; font-size: 13px; }
  .viewas-k, .viewas-ro { display: none; }
  .viewas-left { font-size: 11px; }
  body.viewas .mobile-bell { top: calc(var(--viewas-h) + 10px + env(safe-area-inset-top)); }
  body.viewas .dialog, body.viewas .dialog.wide { max-height: calc(94vh - var(--viewas-h)); }
}
@media print { .viewas-bar { display: none !important; } body.viewas { padding-top: 0; } }

.viewas-pick { display: flex; flex-direction: column; gap: 10px; }
.viewas-pick .seg { align-self: flex-start; }
.viewas-list { display: flex; flex-direction: column; gap: 4px; max-height: 46vh; overflow-y: auto; }
.viewas-item {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; cursor: pointer;
  border: 1px solid var(--line-soft); background: var(--surface); color: var(--ink); font: inherit; padding: 8px 10px; border-radius: var(--radius);
}
.viewas-item:hover { background: var(--surface-2); }
.viewas-item.on { border-color: var(--brand); background: var(--brand-soft); }
.viewas-item > .ic:last-child { margin-left: auto; color: var(--brand); }
.viewas-name { display: flex; flex-direction: column; min-width: 0; }
.viewas-ic { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--surface-2); flex: none; }
.viewas-log summary { cursor: pointer; font-weight: 600; padding: 4px 0; }
.viewas-log table td, .viewas-log table th { white-space: nowrap; }

/* CPO deklaracijos */
.cpo-stats .stat { min-width: 160px; }
.cpo-num.danger-text { color: var(--danger); }
.cpo-num.warn-text { color: var(--warn); }
.strike { text-decoration: line-through; }
.cpo-buyer-m { display: none; }
@media (max-width: 640px) {
  .cpo-table .cpo-buyer { display: none; }
  .cpo-table .cpo-buyer-m { display: block; max-width: 120px; }
}
.cpo-steps { margin: 6px 0 4px 18px; padding: 0; }
.cpo-steps li { margin: 2px 0; }

/* Sandėlis */
.stock-table .group-row td, .stock-count .group-row td { background: var(--surface-2, rgba(0,0,0,.03)); font-weight: 600; font-size: 12.5px; color: var(--muted); }
.stock-low td:first-child { color: var(--danger); }
.alloc-table td { vertical-align: top; }
.alloc-table select { max-width: 260px; }
.alloc-extra { display: grid; gap: 6px; margin-top: 6px; }
.alloc-extra .row-inline { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.alloc-extra .row-inline input:not(.sup-qty) { flex: 1 1 160px; }
.alloc-extra input:not(.sup-qty) { min-width: 140px; }
.alloc-done td { opacity: .85; }
.alloc-member td { opacity: .6; padding-top: 2px; padding-bottom: 2px; }
.alloc-group > td { background: var(--surface-2); }
.alloc-group-list { margin: 4px 0 0; padding-left: 18px; color: var(--muted); }
.alloc-group-list li { margin: 1px 0; }
.alloc-bulk { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 8px 10px; margin: 6px 0 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.alloc-bulk select { max-width: 240px; }
.alloc-table td:first-child { width: 28px; }
.stock-count { max-height: 55vh; overflow: auto; }
tr.clickable { cursor: pointer; }

/* PIRKIMAI – eilučių taisymas */
.pur-lines-edit td:first-child input { width: 100%; min-width: 220px; }
.pur-lines-edit td { vertical-align: middle; }
.pur-lines-sum { padding: 4px 0; }
.pur-lines-edit td:nth-child(3) input { width: 76px; }

/* ---------- Objekto failai ir planai ---------- */
.site-files { margin-top: 18px; }
.sf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.sf-grid.worker { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.sf-tile { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.sf-open { position: relative; display: block; width: 100%; padding: 0; border: 0; background: var(--line-soft); cursor: pointer; aspect-ratio: 4 / 3; }
.sf-thumb { width: 100%; height: 100%; object-fit: cover; display: block; }
.sf-thumb.pdf, .sf-thumb.file { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--muted); background: var(--brand-soft); }
.sf-thumb.pdf { color: var(--danger); }
.sf-thumb .ic svg { width: 40px; height: 40px; }
.sf-ext { font-size: 12px; font-weight: 700; letter-spacing: .5px; }
.sf-hide { position: absolute; top: 6px; right: 6px; background: rgba(0,0,0,.55); color: #fff; border-radius: 6px; padding: 3px; display: inline-flex; }
.sf-hide .ic svg { width: 14px; height: 14px; }
.sf-meta { padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.sf-name { text-align: left; font-weight: 600; word-break: break-word; }
.sf-descr { font-size: 13px; color: var(--ink); opacity: .85; word-break: break-word; }
.sf-sub { font-size: 12px; }
.sf-actions { display: flex; gap: 2px; justify-content: flex-end; padding: 4px 6px; border-top: 1px solid var(--line-soft); }
.sf-pick { display: flex; gap: 8px; flex-wrap: wrap; }
.sf-chosen { margin: 8px 0; word-break: break-word; }
.sf-multi { margin-top: 8px; }
.sf-multi summary { cursor: pointer; color: var(--brand); }
.sf-multi-list { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; max-height: 220px; overflow: auto; }

/* Peržiūra per visą ekraną */
.sf-viewer { position: fixed; inset: 0; z-index: 2000; background: rgba(10,14,20,.94); display: flex; flex-direction: column; }
.sf-vbar { display: flex; align-items: center; gap: 10px; padding: 10px 12px; color: #fff; }
.sf-vcap { flex: 1; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sf-vbtn, .sf-vclose { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 10px; border: 0; background: rgba(255,255,255,.14); color: #fff; cursor: pointer; }
.sf-vbtn .ic svg, .sf-vclose .ic svg { width: 20px; height: 20px; }
.sf-vstage { flex: 1; overflow: hidden; display: flex; align-items: center; justify-content: center; touch-action: none; }
.sf-vimg { max-width: 100%; max-height: 100%; transform-origin: center center; will-change: transform; user-select: none; -webkit-user-drag: none; }
.sf-vnav { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 60px; border: 0; border-radius: 10px; background: rgba(255,255,255,.14); color: #fff; font-size: 30px; line-height: 1; cursor: pointer; }
.sf-vnav.prev { left: 8px; } .sf-vnav.next { right: 8px; }

/* Bandomoji kopija (bandymai.valpla.lt) */
.sandbox-bar { position: sticky; top: 0; z-index: 60; background: repeating-linear-gradient(45deg, #F0B54A, #F0B54A 14px, #F6CB72 14px, #F6CB72 28px); color: #1B2733; font-weight: 700; font-size: 13px; text-align: center; padding: 5px 12px; }
