/* Pultas — dizaino tokenai ir komponentai.
   Paletė: šiltas popierius ir rašalas, terakotos akcentas, serifinės antraštės, viršutinis meniu —
   sąmoningai kitaip nei incidentų sistema (tamsus šoninis meniu, oranžinė, Montserrat). Spalva visada reiškia būseną ar riziką, ne dekoraciją. */

@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/static/fonts/inter-latin-wght-normal.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; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/static/fonts/inter-latin-ext-wght-normal.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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  /* šiltas popierius + rašalas: terakota (veiksmas), šalavijas (atlikta), ochra (laukiu), dulkėta mėlyna (planas) */
  --bg: #F3EEE6;
  --bg-side: #ECE5D9;
  --surface: #FFFDF9;
  --surface-2: #FAF6EF;
  --surface-3: #F1EBE1;
  --hover: rgba(70, 52, 36, .05);
  --border: #E7DFD2;
  --border-2: #D9CEBD;
  --text: #2B2622;
  --text-2: #6A6058;
  --text-3: #9A8F84;
  --accent: #B5603F;
  --accent-2: #9C4F31;
  --accent-soft: #F6E6DD;
  --accent-ink: #FFFDF9;
  --brand: #B5603F;
  --sage: #6F8C73;
  --focus-ring: rgba(181, 96, 63, .25);
  --shadow-1: 0 1px 2px rgba(70, 52, 36, .05), 0 2px 8px -2px rgba(70, 52, 36, .06);
  --shadow-2: 0 2px 6px rgba(70, 52, 36, .06), 0 12px 28px -10px rgba(70, 52, 36, .16);
  --shadow-3: 0 30px 70px -20px rgba(60, 40, 25, .35), 0 6px 16px rgba(60, 40, 25, .08);
  --overlay: rgba(43, 38, 34, .22);

  --p1: #B5503A; --p1-bg: #F7E3DC;
  --p2: #C08A3E; --p2-bg: #F6EBD8;
  --p3: #5F7F9E; --p3-bg: #E5ECF2;
  --p4: #9A8F84; --p4-bg: #EFEAE3;

  --st-inbox: #8C7BA8; --st-todo: #5F7F9E; --st-doing: #B5603F; --st-waiting: #C08A3E;
  --st-someday: #A99E92; --st-done: #6F8C73; --st-cancelled: #BDB4AA;
  --ok: #5F8A66; --ok-bg: #E4EEE3; --warn: #B07D33; --warn-bg: #F6ECD9; --bad: #B5503A; --bad-bg: #F7E3DC;

  --c-sage: #A9BFA6; --c-sky: #A7BDD3; --c-lavender: #BDB1D3; --c-peach: #E9BFA2;
  --c-rose: #DDB0AE; --c-sand: #D8C7A0; --c-teal: #9FC3BC; --c-slate: #B3AEA6;

  --r-sm: 8px; --r: 12px; --r-lg: 18px; --r-xl: 24px;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Sitka Heading", "Sitka Text", "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #1B1815;
  --bg-side: #161411;
  --surface: #24201C;
  --surface-2: #2A2521;
  --surface-3: #312B26;
  --hover: rgba(240, 228, 212, .06);
  --border: #38312A;
  --border-2: #463D35;
  --text: #EEE6DA;
  --text-2: #B9AC9E;
  --text-3: #85796D;
  --accent: #E08B68;
  --accent-2: #EBA084;
  --accent-soft: #3B2A22;
  --accent-ink: #1B1815;
  --brand: #E08B68;
  --sage: #93B096;
  --focus-ring: rgba(224, 139, 104, .3);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-2: 0 10px 26px -8px rgba(0, 0, 0, .5);
  --shadow-3: 0 30px 70px -20px rgba(0, 0, 0, .7);
  --overlay: rgba(10, 8, 6, .55);
  --p1: #E08B68; --p1-bg: #3B2A22; --p2: #D9AC63; --p2-bg: #372E1F;
  --p3: #8FAACB; --p3-bg: #232B35; --p4: #95897D; --p4-bg: #2D2823;
  --st-inbox: #AE9FCB; --st-todo: #8FAACB; --st-doing: #E08B68; --st-waiting: #D9AC63;
  --st-someday: #95897D; --st-done: #93B096; --st-cancelled: #6E645B;
  --ok: #93B096; --ok-bg: #26302A; --warn: #D9AC63; --warn-bg: #372E1F; --bad: #E08B68; --bad-bg: #3B2A22;
  --c-sage: #7E9A80; --c-sky: #7F98B2; --c-lavender: #978BAF; --c-peach: #C69A7C;
  --c-rose: #B98C8A; --c-sand: #B3A27C; --c-teal: #7AA39B; --c-slate: #8E8981;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font); font-size: 14px; line-height: 1.45; color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; font-feature-settings: "cv11", "ss01";
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
::selection { background: var(--accent-soft); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.num { font-variant-numeric: tabular-nums; }
svg.i { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
svg.i-sm { width: 14px; height: 14px; }
svg.i-lg { width: 20px; height: 20px; }

/* ----------------------------------------------------------------- kraunasi */
.kraunasi { display: grid; place-items: center; height: 100vh; }
.kraunasi-taskas { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); animation: pulsas 1s ease-in-out infinite; }
@keyframes pulsas { 50% { transform: scale(1.8); opacity: .3; } }

/* ----------------------------------------------------------------- mygtukai */
.btn {
  display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer;
  font-weight: 500; font-size: 13px; white-space: nowrap; transition: background .12s, border-color .12s, box-shadow .12s, transform .06s;
  text-decoration: none !important;
}
.btn:hover { background: var(--surface-2); border-color: var(--border-2); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); box-shadow: var(--shadow-1); }
.btn-primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--hover); border-color: transparent; color: var(--text); }
.btn-danger { color: var(--bad); }
.btn-danger:hover { background: var(--bad-bg); border-color: transparent; }
.btn-sm { height: 26px; padding: 0 9px; font-size: 12.5px; border-radius: 7px; gap: 5px; }
.btn-lg { height: 42px; padding: 0 18px; font-size: 14.5px; border-radius: 10px; }
.btn-icon { width: 32px; padding: 0; justify-content: center; }
.btn-sm.btn-icon { width: 26px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
kbd {
  font-family: var(--font); font-size: 11px; font-weight: 500; color: var(--text-3); background: var(--surface-3);
  border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 5px; padding: 0 5px; line-height: 16px; min-width: 18px; text-align: center; display: inline-block;
}

/* ----------------------------------------------------------------- formos */
.inp, .sel, .ta {
  width: 100%; height: 34px; padding: 0 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface);
  transition: border-color .12s, box-shadow .12s; outline: none;
}
.ta { height: auto; padding: 8px 10px; resize: vertical; min-height: 70px; line-height: 1.5; }
.inp:hover, .sel:hover, .ta:hover { border-color: var(--border-2); }
.inp:focus, .sel:focus, .ta:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--focus-ring); }
.inp-bare { border-color: transparent; background: transparent; padding: 0 6px; }
.inp-bare:hover { background: var(--hover); border-color: transparent; }
.sel { appearance: none; padding-right: 28px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238C909A' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 9px center; }
.lbl { display: block; font-size: 12px; font-weight: 500; color: var(--text-2); margin-bottom: 5px; }
.check {
  appearance: none; width: 18px; height: 18px; border-radius: 50%; border: 1.6px solid var(--border-2); background: var(--surface);
  cursor: pointer; flex: none; display: inline-grid; place-items: center; transition: all .15s; margin: 0;
}
.check:hover { border-color: var(--accent); background: var(--accent-soft); }
.check:checked { background: var(--st-done); border-color: var(--st-done); }
.check:checked::after { content: ""; width: 9px; height: 5px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: translateY(-1px) rotate(-45deg); }
.check.p1 { border-color: var(--p1); } .check.p2 { border-color: var(--p2); }
.check-sq { border-radius: 5px; width: 16px; height: 16px; }
.check-lg { width: 22px; height: 22px; }
.check.pop { animation: pop .3s ease; }
@keyframes pop { 40% { transform: scale(1.25); } }

/* ----------------------------------------------------------------- išdėstymas */
.layout { display: grid; grid-template-columns: var(--side-w) 1fr; height: 100vh; overflow: hidden; }
.side {
  background: var(--bg-side); border-right: 1px solid var(--border); display: flex; flex-direction: column;
  padding: 14px 10px 10px; gap: 2px; overflow-y: auto;
}
.side-top { display: flex; align-items: center; gap: 10px; padding: 4px 8px 14px; }
.logo { width: 26px; height: 26px; border-radius: 8px; background: var(--text); display: grid; place-items: center; flex: none; }
.logo i { display: block; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 3px rgba(242, 169, 59, .25); }
.side-top b { font-size: 15px; letter-spacing: -.01em; }
.side-top small { display: block; font-size: 11.5px; color: var(--text-3); font-weight: 400; margin-top: -1px; }
.nav-a {
  display: flex; align-items: center; gap: 10px; height: 32px; padding: 0 10px; border-radius: 8px; color: var(--text-2);
  font-weight: 500; font-size: 13.5px; text-decoration: none !important; position: relative; cursor: pointer; border: 0; background: none; width: 100%; text-align: left;
}
.nav-a:hover { background: var(--hover); color: var(--text); }
.nav-a.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-1); }
.nav-a.on svg { color: var(--accent); }
.nav-a .cnt { margin-left: auto; font-size: 11.5px; color: var(--text-3); font-weight: 500; font-variant-numeric: tabular-nums; }
.nav-a .cnt.hot { color: var(--accent-ink); background: var(--accent); border-radius: 10px; padding: 0 7px; line-height: 18px; }
.nav-a .cnt.warn { color: var(--warn); }
.side-sep { height: 1px; background: var(--border); margin: 10px 8px; }
.side-h { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); font-weight: 600; padding: 6px 10px 4px; }
.side-proj { display: flex; align-items: center; gap: 9px; height: 28px; padding: 0 10px; border-radius: 7px; color: var(--text-2); font-size: 13px; text-decoration: none !important; }
.side-proj:hover { background: var(--hover); color: var(--text); }
.side-proj.on { color: var(--text); background: var(--surface); }
.side-proj span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.dot { width: 8px; height: 8px; border-radius: 3px; flex: none; }
.side-foot { margin-top: auto; padding-top: 10px; display: flex; flex-direction: column; gap: 2px; }
.sync { font-size: 11.5px; color: var(--text-3); padding: 6px 10px; display: flex; align-items: center; gap: 6px; }
.sync .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }
.sync.warn .dot { background: var(--warn); }
.sync.off .dot { background: var(--text-3); }

.main { display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.top {
  height: 56px; flex: none; display: flex; align-items: center; gap: 12px; padding: 0 24px; border-bottom: 1px solid transparent;
  background: var(--bg); position: relative; z-index: 5;
}
.top.scrolled { border-bottom-color: var(--border); }
.top h1 { font-size: 17px; font-weight: 600; margin: 0; letter-spacing: -.015em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top .crumb { color: var(--text-3); font-weight: 500; }
.top-sp { flex: 1; }
.search-btn {
  display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 8px 0 11px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-3); width: 260px; cursor: pointer; font-size: 13px;
}
.search-btn:hover { border-color: var(--border-2); color: var(--text-2); }
.search-btn kbd { margin-left: auto; }
.menu-btn { display: none; }
.view { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 6px 24px 80px; scroll-behavior: smooth; }
.view-in { max-width: 1240px; margin: 0 auto; }
.view-wide .view-in { max-width: none; }

/* ----------------------------------------------------------------- kortelės / sekcijos */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-1); }
.card-h { display: flex; align-items: center; gap: 10px; padding: 14px 16px 6px; }
.card-h h2, .card-h h3 { font-size: 13.5px; font-weight: 600; margin: 0; letter-spacing: -.005em; }
.card-h .sub { color: var(--text-3); font-size: 12.5px; }
.card-h .sp { flex: 1; }
.card-b { padding: 4px 8px 10px; }
.card-pad { padding: 16px; }
.grid { display: grid; gap: 16px; }
.g-today { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); align-items: start; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; align-items: center; gap: 8px; }
.row-wrap { flex-wrap: wrap; }
.sp { flex: 1; }
.h-sec { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); margin: 18px 4px 8px; display: flex; align-items: center; gap: 8px; }
.h-sec .n { color: var(--text-3); font-weight: 500; }

/* ----------------------------------------------------------------- šiandien */
.hello { padding: 18px 2px 18px; display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.hello h2 { font-size: 26px; font-weight: 650; letter-spacing: -.025em; margin: 0 0 4px; }
.hello p { margin: 0; color: var(--text-2); font-size: 14px; }
.stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 12px 14px; cursor: pointer;
  text-decoration: none !important; color: var(--text); transition: border-color .15s, transform .15s, box-shadow .15s; box-shadow: var(--shadow-1);
}
.stat:hover { border-color: var(--border-2); transform: translateY(-1px); box-shadow: var(--shadow-2); }
.stat .k { font-size: 12px; color: var(--text-2); display: flex; align-items: center; gap: 6px; font-weight: 500; }
.stat .v { font-size: 24px; font-weight: 650; letter-spacing: -.02em; margin-top: 2px; font-variant-numeric: tabular-nums; }
.stat .v small { font-size: 13px; color: var(--text-3); font-weight: 500; letter-spacing: 0; }
.stat.bad .v { color: var(--bad); } .stat.warn .v { color: var(--warn); } .stat.ok .v { color: var(--ok); }

.focus-list { display: flex; flex-direction: column; gap: 8px; padding: 6px 8px 8px; }
.focus-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2);
  border: 1px solid var(--border); cursor: pointer; transition: border-color .15s, background .15s;
}
.focus-item:hover { border-color: var(--border-2); }
.focus-item .t { font-weight: 550; font-size: 14.5px; }
.focus-n { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 11.5px; font-weight: 650; background: var(--brand); color: #3B2A0B; flex: none; }
.focus-empty { padding: 16px; border: 1.5px dashed var(--border-2); border-radius: 12px; color: var(--text-2); text-align: center; margin: 4px 8px 8px; }
.suggest { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 8px; }
.suggest:hover { background: var(--hover); }

/* ----------------------------------------------------------------- užduoties eilutė */
.trow {
  display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 6px 8px; border-radius: 9px; cursor: pointer; position: relative;
  transition: background .1s;
}
.trow:hover { background: var(--hover); }
.trow.sel { background: var(--accent-soft); }
.trow .t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.trow .tt { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trow.done .tt { color: var(--text-3); text-decoration: line-through; text-decoration-color: var(--border-2); }
.trow .meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12px; color: var(--text-3); }
.trow .right { display: flex; align-items: center; gap: 6px; flex: none; }
.trow .acts { display: none; gap: 2px; }
.trow:hover .acts { display: flex; }
.trow.dense { min-height: 34px; padding: 4px 8px; }
.list-group + .list-group { margin-top: 6px; }
.lg-h { display: flex; align-items: center; gap: 8px; padding: 10px 8px 4px; font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.lg-h .n { color: var(--text-3); font-weight: 500; }

/* žymelės */
.chip {
  display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 7px; border-radius: 6px; font-size: 11.5px; font-weight: 500;
  background: var(--surface-3); color: var(--text-2); white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; border: 0;
}
.chip svg.i { width: 12px; height: 12px; }
.chip-bad { background: var(--bad-bg); color: var(--bad); }
.chip-warn { background: var(--warn-bg); color: var(--warn); }
.chip-ok { background: var(--ok-bg); color: var(--ok); }
.chip-acc { background: var(--accent-soft); color: var(--accent); }
.chip-out { background: transparent; border: 1px solid var(--border); }
.chip-proj { background: transparent; padding-left: 2px; color: var(--text-2); }
.chip-proj .dot { width: 7px; height: 7px; border-radius: 2px; }
.chip-lbl { background: transparent; color: var(--text-3); padding: 0 2px; }
.pri { display: inline-flex; align-items: center; justify-content: center; height: 18px; min-width: 22px; padding: 0 5px; border-radius: 5px; font-size: 10.5px; font-weight: 650; letter-spacing: .02em; }
.pri-1 { background: var(--p1-bg); color: var(--p1); } .pri-2 { background: var(--p2-bg); color: var(--p2); }
.pri-3 { background: var(--p3-bg); color: var(--p3); } .pri-4 { background: var(--p4-bg); color: var(--p4); }
.pdot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.pdot-1 { background: var(--p1); } .pdot-2 { background: var(--p2); } .pdot-3 { background: var(--p3); } .pdot-4 { background: var(--p4); }
.st { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; color: var(--text-2); }
.st::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--text-3)); }
.st-inbox { --c: var(--st-inbox); } .st-todo { --c: var(--st-todo); } .st-doing { --c: var(--st-doing); } .st-waiting { --c: var(--st-waiting); }
.st-someday { --c: var(--st-someday); } .st-done { --c: var(--st-done); } .st-cancelled { --c: var(--st-cancelled); }
.st-idea { --c: var(--st-inbox); } .st-planned { --c: var(--st-todo); } .st-active { --c: var(--st-doing); } .st-paused { --c: var(--st-waiting); }
.prog { height: 6px; border-radius: 4px; background: var(--surface-3); overflow: hidden; flex: 1; }
.prog > i { display: block; height: 100%; border-radius: 4px; background: var(--accent); transition: width .4s ease; }
.prog-sm { height: 4px; }
.health { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--text-3); }
.health-on_track { background: var(--ok); } .health-at_risk { background: var(--warn); } .health-off_track { background: var(--bad); }
.src { width: 18px; height: 18px; border-radius: 5px; display: inline-grid; place-items: center; flex: none; background: var(--surface-3); color: var(--text-3); }
.src svg.i { width: 11px; height: 11px; }

/* ----------------------------------------------------------------- lenta (kanban) */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(272px, 1fr); gap: 14px; align-items: start; padding-bottom: 20px; overflow-x: auto; }
.col { background: var(--surface-3); border-radius: var(--r-lg); padding: 8px; min-height: 120px; display: flex; flex-direction: column; gap: 8px; border: 1px solid transparent; transition: background .15s, border-color .15s; }
.col.over { background: var(--accent-soft); border-color: var(--accent); border-style: dashed; }
.col-h { display: flex; align-items: center; gap: 8px; padding: 4px 6px 2px; font-weight: 600; font-size: 13px; }
.col-h .n { color: var(--text-3); font-weight: 500; font-size: 12px; }
.col-h .wip { font-size: 11px; color: var(--warn); font-weight: 600; }
.col-add { color: var(--text-3); justify-content: flex-start; }
.tcard {
  background: var(--surface); border: 1px solid var(--border); border-radius: 11px; padding: 10px 11px; cursor: grab; box-shadow: var(--shadow-1);
  display: flex; flex-direction: column; gap: 7px; transition: box-shadow .15s, border-color .15s, transform .1s; position: relative;
}
.tcard:hover { border-color: var(--border-2); box-shadow: var(--shadow-2); }
.tcard.dragging { opacity: .45; transform: rotate(1.5deg); }
.tcard .tt { font-weight: 500; line-height: 1.38; display: flex; gap: 8px; align-items: flex-start; }
.tcard .tt .ttx { flex: 1; overflow-wrap: anywhere; }
.tcard .tt .pdot { margin-top: 6px; }
.tcard .meta { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; font-size: 12px; color: var(--text-3); }
.tcard.moved::after { content: ""; position: absolute; top: 9px; right: 9px; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }
.tcard .bar { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--text-3); }
.drop-line { height: 2px; background: var(--accent); border-radius: 2px; margin: -5px 2px; }

/* ----------------------------------------------------------------- matrica */
.matrix { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.quad { border-radius: var(--r-lg); padding: 12px; min-height: 220px; border: 1px solid var(--border); background: var(--surface); }
.quad h3 { margin: 0 0 2px; font-size: 13.5px; display: flex; gap: 8px; align-items: center; }
.quad p { margin: 0 0 8px; color: var(--text-3); font-size: 12px; }
.quad.q1 { background: linear-gradient(180deg, var(--p1-bg), var(--surface) 70%); }
.quad.q2 { background: linear-gradient(180deg, var(--accent-soft), var(--surface) 70%); }
.quad.q3 { background: linear-gradient(180deg, var(--p2-bg), var(--surface) 70%); }

/* ----------------------------------------------------------------- įrankių juosta */
.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 0 14px; position: sticky; top: -6px; background: var(--bg); z-index: 3; }
.seg { display: inline-flex; background: var(--surface-3); border-radius: 9px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; height: 26px; padding: 0 11px; border-radius: 7px; cursor: pointer; color: var(--text-2); font-weight: 500; font-size: 12.5px; display: inline-flex; align-items: center; gap: 6px; }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-1); }
.filter-inp { width: 220px; height: 32px; }
.fchip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: 8px; border: 1px dashed var(--border-2); background: transparent; color: var(--text-2); cursor: pointer; font-size: 12.5px; font-weight: 500; }
.fchip:hover { border-color: var(--text-3); color: var(--text); }
.fchip.on { border-style: solid; border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }

/* ----------------------------------------------------------------- laukiu */
.wgroup { margin-bottom: 14px; }
.wgroup-h { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.wgroup-h .av { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-weight: 650; font-size: 12px; background: var(--warn-bg); color: var(--warn); flex: none; }
.wgroup-h h3 { margin: 0; font-size: 14px; }
.wrow { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--border); cursor: pointer; }
.wrow:last-child { border-bottom: 0; }
.wrow:hover { background: var(--surface-2); }
.wrow .tt { font-weight: 500; }
.wrow .acts { display: flex; gap: 6px; }
.silent { font-weight: 600; font-variant-numeric: tabular-nums; }
.silent.s-ok { color: var(--text-3); } .silent.s-warn { color: var(--warn); } .silent.s-bad { color: var(--bad); }

/* ----------------------------------------------------------------- projektai */
.horizons { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.hcol { display: flex; flex-direction: column; gap: 12px; min-height: 140px; border-radius: var(--r-lg); padding: 4px; transition: background .15s; }
.hcol.over { background: var(--accent-soft); }
.hcol-h { padding: 6px 6px 2px; }
.hcol-h b { font-size: 14px; display: flex; align-items: center; gap: 8px; }
.hcol-h p { margin: 2px 0 0; color: var(--text-3); font-size: 12px; }
.pcard {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 14px 15px 13px; cursor: pointer; box-shadow: var(--shadow-1);
  display: flex; flex-direction: column; gap: 10px; position: relative; overflow: hidden; transition: box-shadow .15s, border-color .15s, transform .15s; text-decoration: none !important; color: var(--text);
}
.pcard::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--pc, var(--c-sage)); }
.pcard:hover { box-shadow: var(--shadow-2); border-color: var(--border-2); transform: translateY(-1px); }
.pcard h3 { margin: 0; font-size: 14.5px; font-weight: 600; letter-spacing: -.01em; line-height: 1.3; }
.pcard .sum { color: var(--text-2); font-size: 12.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard .row { font-size: 12px; color: var(--text-3); }
.pcard .next { font-size: 12.5px; color: var(--text-2); display: flex; gap: 6px; align-items: flex-start; }
.pcard .next svg { margin-top: 2px; color: var(--accent); }
.pc-sage { --pc: var(--c-sage); } .pc-sky { --pc: var(--c-sky); } .pc-lavender { --pc: var(--c-lavender); } .pc-peach { --pc: var(--c-peach); }
.pc-rose { --pc: var(--c-rose); } .pc-sand { --pc: var(--c-sand); } .pc-teal { --pc: var(--c-teal); } .pc-slate { --pc: var(--c-slate); }
.bg-sage { background: var(--c-sage); } .bg-sky { background: var(--c-sky); } .bg-lavender { background: var(--c-lavender); } .bg-peach { background: var(--c-peach); }
.bg-rose { background: var(--c-rose); } .bg-sand { background: var(--c-sand); } .bg-teal { background: var(--c-teal); } .bg-slate { background: var(--c-slate); }
.wip-warn { display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-radius: 12px; background: var(--warn-bg); color: var(--warn); font-weight: 500; margin-bottom: 14px; font-size: 13px; }

.phead { padding: 14px 0 6px; }
.phead .title-inp { font-size: 26px; font-weight: 650; letter-spacing: -.025em; height: 44px; padding: 0 6px; margin-left: -6px; width: 100%; }
.phead .sum-inp { color: var(--text-2); font-size: 14.5px; margin-left: -6px; width: 100%; border: 1px solid transparent; background: transparent; resize: none; padding: 4px 6px; border-radius: 8px; min-height: 30px; outline: none; overflow: hidden; }
.phead .sum-inp:hover { background: var(--hover); }
.phead .sum-inp:focus { background: var(--surface); border-color: var(--accent); box-shadow: 0 0 0 3px var(--focus-ring); }
.props { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 10px 0 16px; align-items: center; }
.prop { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-3); }
.prop .sel, .prop .inp { height: 30px; width: auto; font-size: 13px; background-color: var(--surface); }
.g-proj { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); align-items: start; }
.ms { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 8px; }
.ms:hover { background: var(--hover); }
.ms .t { flex: 1; min-width: 0; }
.ms.done .t { color: var(--text-3); text-decoration: line-through; }
.ms .inp-bare { height: 28px; }
.diamond { width: 9px; height: 9px; transform: rotate(45deg); border-radius: 2px; background: var(--border-2); flex: none; }
.diamond.on { background: var(--ok); }

/* laiko juosta (gantt) */
.gantt { overflow-x: auto; padding-bottom: 6px; }
.gantt-in { min-width: 820px; position: relative; }
.g-months { display: grid; border-bottom: 1px solid var(--border); font-size: 11.5px; color: var(--text-3); font-weight: 500; }
.g-months div { padding: 6px 8px; border-left: 1px solid var(--border); }
.g-row { display: grid; grid-template-columns: 220px 1fr; align-items: center; border-bottom: 1px solid var(--border); min-height: 42px; }
.g-row .g-name { padding: 0 12px; font-weight: 500; font-size: 13px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; display: flex; align-items: center; gap: 8px; cursor: pointer; }
.g-track { position: relative; height: 42px; }
.g-bar { position: absolute; top: 11px; height: 20px; border-radius: 6px; opacity: .9; display: flex; align-items: center; padding: 0 8px; font-size: 11px; color: #22252C; font-weight: 600; overflow: hidden; white-space: nowrap; }
.g-ms { position: absolute; top: 16px; width: 10px; height: 10px; transform: rotate(45deg); background: var(--surface); border: 2px solid var(--text-2); border-radius: 2px; margin-left: -5px; }
.g-ms.on { background: var(--ok); border-color: var(--ok); }
.g-now { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--brand); z-index: 2; }

/* ----------------------------------------------------------------- laiko juosta (activity) */
.tl { position: relative; padding: 4px 4px 4px 22px; }
.tl::before { content: ""; position: absolute; left: 9px; top: 10px; bottom: 10px; width: 1.5px; background: var(--border); }
.tl-i { position: relative; padding: 6px 0 10px; }
.tl-i::before { content: ""; position: absolute; left: -17px; top: 11px; width: 9px; height: 9px; border-radius: 50%; background: var(--surface); border: 2px solid var(--border-2); }
.tl-i.k-note::before { border-color: var(--accent); }
.tl-i.k-decision::before { border-color: var(--st-inbox); background: var(--st-inbox); }
.tl-i.k-blocker::before { border-color: var(--bad); background: var(--bad); }
.tl-i.k-status::before, .tl-i.k-created::before { border-color: var(--text-3); width: 7px; height: 7px; left: -16px; top: 12px; }
.tl-i .when { font-size: 11.5px; color: var(--text-3); display: flex; gap: 6px; align-items: center; }
.tl-i .what { margin-top: 2px; white-space: pre-wrap; overflow-wrap: anywhere; }
.tl-i.sys .what { color: var(--text-2); font-size: 12.5px; }
.tl-i .tag { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; padding: 1px 6px; border-radius: 4px; }
.tag-decision { background: var(--surface-3); color: var(--st-inbox); } .tag-blocker { background: var(--bad-bg); color: var(--bad); }
.note-box { display: flex; flex-direction: column; gap: 8px; padding: 8px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); margin-bottom: 10px; }
.note-box .ta { min-height: 54px; border: 0; background: transparent; box-shadow: none !important; padding: 4px 6px; resize: none; }
.feed-i { display: flex; gap: 10px; padding: 8px; border-radius: 8px; cursor: pointer; }
.feed-i:hover { background: var(--hover); }
.feed-i .ic { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); flex: none; }
.feed-i .ic svg { width: 13px; height: 13px; }
.feed-i .b { min-width: 0; flex: 1; }
.feed-i .b .t { font-weight: 500; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed-i .b .x { font-size: 12.5px; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.feed-i .w { font-size: 11.5px; color: var(--text-3); white-space: nowrap; }

/* ----------------------------------------------------------------- drawer */
.overlay { position: fixed; inset: 0; background: var(--overlay); z-index: 40; opacity: 0; transition: opacity .2s; }
.overlay.on { opacity: 1; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(600px, 100vw); background: var(--surface); z-index: 41; box-shadow: var(--shadow-3);
  display: flex; flex-direction: column; transform: translateX(100%); transition: transform .26s cubic-bezier(.2, .8, .2, 1); border-left: 1px solid var(--border);
}
.drawer.on { transform: none; }
.drawer-top { display: flex; align-items: center; gap: 6px; padding: 10px 12px 10px 18px; border-bottom: 1px solid var(--border); flex: none; }
.drawer-b { overflow-y: auto; padding: 16px 22px 40px; flex: 1; }
.d-title { font-size: 20px; font-weight: 650; letter-spacing: -.02em; line-height: 1.3; width: 100%; border: 1px solid transparent; background: transparent; resize: none; padding: 4px 6px; margin: 0 0 6px -7px; border-radius: 8px; outline: none; overflow: hidden; }
.d-title:hover { background: var(--hover); }
.d-title:focus { background: var(--surface); border-color: var(--accent); box-shadow: 0 0 0 3px var(--focus-ring); }
.d-status { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 16px; }
.d-status button { border: 1px solid var(--border); background: var(--surface); height: 28px; padding: 0 10px; border-radius: 8px; cursor: pointer; font-size: 12.5px; font-weight: 500; color: var(--text-2); display: inline-flex; align-items: center; gap: 6px; }
.d-status button::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.d-status button:hover { border-color: var(--border-2); color: var(--text); }
.d-status button.on { background: var(--surface-3); border-color: var(--c); color: var(--text); box-shadow: inset 0 0 0 1px var(--c); }
.d-grid { display: grid; grid-template-columns: 128px 1fr; gap: 4px 10px; align-items: center; margin-bottom: 18px; }
.d-grid > label { font-size: 12.5px; color: var(--text-3); display: flex; align-items: center; gap: 7px; height: 32px; }
.d-grid .inp, .d-grid .sel { height: 32px; border-color: transparent; background-color: transparent; }
.d-grid .inp:hover, .d-grid .sel:hover { background-color: var(--hover); }
.d-grid .inp:focus, .d-grid .sel:focus { background-color: var(--surface); border-color: var(--accent); }
.d-sec { font-size: 12px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; margin: 20px 0 8px; display: flex; align-items: center; gap: 8px; }
.d-sec .sp { flex: 1; }
.cl-i { display: flex; align-items: center; gap: 9px; padding: 4px 6px; border-radius: 7px; }
.cl-i:hover { background: var(--hover); }
.cl-i .inp-bare { height: 28px; flex: 1; }
.cl-i.done .inp-bare { color: var(--text-3); text-decoration: line-through; }
.cl-i .x { opacity: 0; }
.cl-i:hover .x { opacity: 1; }
.prio-pick { display: inline-flex; gap: 3px; }
.prio-pick button { border: 1px solid var(--border); background: var(--surface); border-radius: 6px; height: 28px; min-width: 34px; cursor: pointer; font-weight: 650; font-size: 11.5px; color: var(--text-3); }
.prio-pick button.on.p1 { background: var(--p1-bg); color: var(--p1); border-color: var(--p1); }
.prio-pick button.on.p2 { background: var(--p2-bg); color: var(--p2); border-color: var(--p2); }
.prio-pick button.on.p3 { background: var(--p3-bg); color: var(--p3); border-color: var(--p3); }
.prio-pick button.on.p4 { background: var(--p4-bg); color: var(--p4); border-color: var(--p4); }

/* ----------------------------------------------------------------- modalai, paletė, greitas įvedimas */
.modal-w { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-start; justify-content: center; padding: 12vh 16px 16px; background: var(--overlay); animation: fade .15s ease; }
@keyframes fade { from { opacity: 0; } }
.modal { background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--shadow-3); width: min(620px, 100%); border: 1px solid var(--border); overflow: hidden; animation: rise .18s cubic-bezier(.2, .8, .2, 1); max-height: 76vh; display: flex; flex-direction: column; }
.modal-lg { width: min(860px, 100%); }
@keyframes rise { from { transform: translateY(8px) scale(.985); opacity: 0; } }
.modal-h { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.modal-h h2 { margin: 0; font-size: 15px; }
.modal-b { padding: 16px 18px; overflow-y: auto; }
.modal-f { display: flex; gap: 8px; justify-content: flex-end; padding: 12px 18px; border-top: 1px solid var(--border); background: var(--surface-2); }
.qa-inp { width: 100%; border: 0; outline: none; background: transparent; font-size: 17px; padding: 18px 20px 10px; font-weight: 500; }
.qa-inp::placeholder { color: var(--text-3); font-weight: 400; }
.qa-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 20px 14px; min-height: 34px; }
.qa-chips .chip { height: 24px; font-size: 12px; }
.qa-foot { display: flex; align-items: center; gap: 10px; padding: 10px 14px 10px 20px; border-top: 1px solid var(--border); background: var(--surface-2); font-size: 12px; color: var(--text-3); flex-wrap: wrap; }
.qa-foot .sel { width: auto; height: 28px; font-size: 12.5px; }
.pal-inp { width: 100%; border: 0; outline: none; background: transparent; font-size: 16px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.pal-list { overflow-y: auto; padding: 6px; max-height: 52vh; }
.pal-i { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 9px; cursor: pointer; }
.pal-i .t { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pal-i.on { background: var(--accent-soft); }
.pal-h { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); padding: 10px 12px 4px; font-weight: 600; }
.menu { position: fixed; z-index: 70; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-3); padding: 5px; min-width: 200px; max-height: 340px; overflow-y: auto; animation: rise .12s ease; }
.menu button { display: flex; align-items: center; gap: 9px; width: 100%; border: 0; background: none; padding: 7px 10px; border-radius: 7px; cursor: pointer; text-align: left; font-size: 13px; }
.menu button:hover, .menu button.on { background: var(--hover); }
.menu hr { border: 0; border-top: 1px solid var(--border); margin: 4px 2px; }

/* ----------------------------------------------------------------- toast */
.toasts { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 12px; background: var(--text); color: var(--bg); padding: 10px 12px 10px 16px; border-radius: 12px; box-shadow: var(--shadow-3); font-size: 13px; font-weight: 500; animation: rise .2s ease; max-width: 90vw; }
.toast button { background: rgba(255, 255, 255, .14); color: inherit; border: 0; border-radius: 7px; padding: 4px 10px; cursor: pointer; font-weight: 600; font-size: 12.5px; }
:root[data-theme="dark"] .toast button { background: rgba(0, 0, 0, .1); }
.toast.err { background: var(--bad); color: #fff; }

/* ----------------------------------------------------------------- tuščia būsena */
.empty { text-align: center; padding: 34px 20px; color: var(--text-2); }
.empty .art { width: 54px; height: 54px; border-radius: 16px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin: 0 auto 12px; }
.empty .art svg { width: 26px; height: 26px; }
.empty h3 { margin: 0 0 4px; font-size: 15px; color: var(--text); }
.empty p { margin: 0 auto; max-width: 380px; font-size: 13px; }

/* ----------------------------------------------------------------- inbox triage */
.triage { display: flex; gap: 6px; flex-wrap: wrap; padding: 4px 8px 10px 36px; }
.inbox-i { border-radius: 12px; transition: background .15s; }
.inbox-i.sel { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border); }
.inbox-i .snip { font-size: 12.5px; color: var(--text-2); padding: 0 8px 6px 36px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ----------------------------------------------------------------- kalendorius */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); }
.cal-h { padding: 8px 10px; font-size: 11.5px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.cal-d { min-height: 118px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 6px; display: flex; flex-direction: column; gap: 3px; transition: background .12s; }
.cal-d:nth-child(7n) { border-right: 0; }
.cal-d.out { background: var(--surface-2); }
.cal-d.out .n { color: var(--text-3); opacity: .6; }
.cal-d.we { background: var(--surface-2); }
.cal-d.over { background: var(--accent-soft); }
.cal-d .n { font-size: 12px; font-weight: 600; color: var(--text-2); width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; }
.cal-d.today .n { background: var(--accent); color: var(--accent-ink); }
.cal-e { font-size: 11.5px; padding: 2px 6px; border-radius: 5px; background: var(--surface-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; border-left: 3px solid var(--c, var(--text-3)); font-weight: 500; }
.cal-e:hover { filter: brightness(.97); }
.cal-e.done { opacity: .55; text-decoration: line-through; }
.cal-e.ms { background: transparent; border-left: 0; padding-left: 2px; color: var(--text-2); }
.cal-more { font-size: 11px; color: var(--text-3); padding-left: 4px; cursor: pointer; }

/* ----------------------------------------------------------------- istorija / apžvalga */
.day-h { display: flex; align-items: baseline; gap: 10px; padding: 16px 8px 6px; }
.day-h b { font-size: 13.5px; }
.day-h span { color: var(--text-3); font-size: 12.5px; }
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin: 6px 0 16px; }
.kpi { padding: 14px 16px; }
.kpi .k { font-size: 12px; color: var(--text-2); font-weight: 500; }
.kpi .v { font-size: 26px; font-weight: 650; letter-spacing: -.02em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi .d { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.bars { display: flex; align-items: flex-end; gap: 8px; height: 170px; padding: 10px 16px 0; }
.bars .b { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; min-width: 0; }
.bars .pair { display: flex; gap: 3px; align-items: flex-end; height: 100%; width: 100%; justify-content: center; }
.bars .pair i { display: block; width: 42%; max-width: 16px; border-radius: 4px 4px 2px 2px; background: var(--accent); min-height: 2px; transition: height .4s ease; }
.bars .pair i.c { background: var(--border-2); }
.bars .lb { font-size: 10.5px; color: var(--text-3); white-space: nowrap; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--text-2); padding: 8px 16px 14px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.hbar { display: grid; grid-template-columns: 140px 1fr 36px; gap: 10px; align-items: center; padding: 6px 16px; font-size: 13px; }
.hbar .nm { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--text-2); }
.hbar .tr { height: 8px; background: var(--surface-3); border-radius: 4px; overflow: hidden; }
.hbar .tr i { display: block; height: 100%; background: var(--accent); border-radius: 4px; opacity: .8; }
.hbar .v { text-align: right; font-variant-numeric: tabular-nums; color: var(--text-2); font-weight: 500; }
.md-prev { white-space: pre-wrap; font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 12.5px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 14px; max-height: 50vh; overflow: auto; line-height: 1.55; }

/* ----------------------------------------------------------------- peržiūra */
.rv-step { display: flex; gap: 14px; padding: 14px 16px; border-bottom: 1px solid var(--border); align-items: flex-start; }
.rv-step:last-child { border-bottom: 0; }
.rv-n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 650; font-size: 13px; background: var(--surface-3); color: var(--text-2); flex: none; }
.rv-step.ok .rv-n { background: var(--ok-bg); color: var(--ok); }
.rv-step h3 { margin: 3px 0 2px; font-size: 14px; }
.rv-step p { margin: 0; color: var(--text-2); font-size: 13px; }
.rv-body { flex: 1; min-width: 0; }

/* ----------------------------------------------------------------- nustatymai */
.set-row { display: grid; grid-template-columns: 260px 1fr; gap: 20px; padding: 16px; border-bottom: 1px solid var(--border); align-items: start; }
.set-row:last-child { border-bottom: 0; }
.set-row h3 { margin: 0 0 3px; font-size: 13.5px; }
.set-row p { margin: 0; color: var(--text-3); font-size: 12.5px; }
.code { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 12px; background: var(--surface-3); border-radius: 6px; padding: 2px 6px; overflow-wrap: anywhere; }
pre.code { padding: 12px; white-space: pre-wrap; margin: 8px 0 0; }

/* ----------------------------------------------------------------- prisijungimas */
body.login { display: grid; place-items: center; min-height: 100vh; padding: 20px;
  background: radial-gradient(1200px 600px at 10% -10%, var(--accent-soft), transparent 60%), radial-gradient(900px 500px at 110% 110%, rgba(242, 169, 59, .12), transparent 60%), var(--bg); }
.login-kortele { width: min(400px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: 22px; box-shadow: var(--shadow-3); padding: 36px 32px 28px; text-align: center; }
.login-kortele h1 { margin: 16px 0 6px; font-size: 26px; letter-spacing: -.025em; }
.login-sub { color: var(--text-2); margin: 0 0 24px; }
.login-kortele .btn-lg { width: 100%; justify-content: center; }
.login-zenklas { display: inline-flex; gap: 6px; padding: 12px; border-radius: 16px; background: var(--text); }
.login-zenklas span { width: 10px; height: 10px; border-radius: 50%; background: var(--brand); }
.login-zenklas span:nth-child(2) { opacity: .6; } .login-zenklas span:nth-child(3) { opacity: .3; }
.login-klaida { background: var(--bad-bg); color: var(--bad); border-radius: 10px; padding: 10px; font-size: 13px; }
.login-dev { margin-top: 10px; }
.login-pastaba { color: var(--text-3); font-size: 12px; margin: 18px 0 0; }

/* ----------------------------------------------------------------- v2: savitas veidas
   Viršutinis „doko“ meniu vietoj šoninio, serifinės antraštės, kortelės be rėmelių, popieriaus faktūra. */
body {
  background:
    radial-gradient(1200px 520px at 8% -8%, rgba(233, 191, 162, .28), transparent 62%),
    radial-gradient(900px 520px at 105% 0%, rgba(169, 191, 166, .22), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}
:root[data-theme="dark"] body {
  background: radial-gradient(1100px 520px at 8% -10%, rgba(224, 139, 104, .10), transparent 62%), radial-gradient(900px 520px at 105% 0%, rgba(147, 176, 150, .08), transparent 60%), var(--bg);
}
.layout { display: flex; flex-direction: column; }
.side { display: none; }
.main { flex: 1; min-height: 0; }
.top { height: 68px; padding: 0 28px; gap: 14px; background: transparent; border-bottom: 1px solid transparent; transition: background .2s, border-color .2s; }
.top.scrolled { background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom-color: var(--border); }
.top h1 { display: none; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none !important; font-family: var(--serif); font-size: 21px; font-weight: 600; letter-spacing: -.01em; flex: none; }
.logo { width: 30px; height: 30px; border-radius: 10px; background: var(--accent); box-shadow: 0 4px 12px -4px rgba(181, 96, 63, .55); }
.logo i { width: 10px; height: 10px; background: var(--surface); box-shadow: none; border-radius: 3px; transform: rotate(45deg); }
.dock { display: flex; gap: 2px; padding: 4px; background: var(--surface); border-radius: 999px; box-shadow: var(--shadow-1); margin-left: 22px; }
.dock a, .dock button { height: 34px; padding: 0 14px; border-radius: 999px; display: inline-flex; align-items: center; gap: 7px; color: var(--text-2); font-weight: 500; font-size: 13.5px;
  border: 0; background: none; cursor: pointer; text-decoration: none !important; white-space: nowrap; transition: background .15s, color .15s; }
.dock a:hover, .dock button:hover { color: var(--text); background: var(--hover); }
.dock a.on { background: var(--text); color: var(--surface); }
.dock a.on svg { color: var(--surface); }
.dock .cnt { font-size: 10.5px; font-weight: 650; min-width: 18px; height: 18px; border-radius: 9px; display: inline-grid; place-items: center; padding: 0 5px; background: var(--accent); color: var(--accent-ink); }
.dock .cnt.warn { background: var(--warn); }
.dock .cnt.soft { background: var(--surface-3); color: var(--text-2); }
.dock a.on .cnt.soft { background: rgba(255, 255, 255, .18); color: var(--surface); }
.search-btn { border: 0; border-radius: 999px; box-shadow: var(--shadow-1); background: var(--surface); width: 240px; height: 36px; }
.top .btn-primary { border-radius: 999px; height: 36px; padding: 0 16px; }
.sync-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 18%, transparent); }
.sync-dot.warn { background: var(--warn); box-shadow: 0 0 0 4px color-mix(in srgb, var(--warn) 18%, transparent); }
.sync-dot.off { background: var(--text-3); box-shadow: none; }

.view { padding: 0 28px 90px; }
.view-in { max-width: 1280px; }
.pagehead { display: flex; align-items: flex-end; gap: 14px; padding: 22px 2px 16px; flex-wrap: wrap; }
.pagehead h1 { font-family: var(--serif); font-weight: 600; font-size: 36px; letter-spacing: -.012em; margin: 0; line-height: 1.1; }
.pagehead .crumb { font-family: var(--serif); color: var(--text-3); font-weight: 500; }
.pagehead .crumb a, a.crumb { color: var(--text-3); }
.pagehead .sub { color: var(--text-2); font-size: 14px; padding-bottom: 5px; }
.hello { padding: 26px 2px 20px; }
.hello h2 { font-family: var(--serif); font-weight: 600; font-size: 40px; letter-spacing: -.015em; line-height: 1.08; margin-bottom: 8px; }
.hello p { font-size: 14.5px; }

.card, .stat, .kpi { border: 0; border-radius: var(--r-xl); box-shadow: var(--shadow-1); }
.card-h { padding: 18px 20px 6px; }
.card-h h2, .card-h h3 { font-family: var(--serif); font-size: 19px; font-weight: 600; letter-spacing: -.005em; }
.card-h h2 svg { color: var(--accent); }
.card-b { padding: 4px 12px 14px; }
.stat { padding: 16px 18px; }
.stat:hover { border-color: transparent; }
.stat .v, .kpi .v { font-family: var(--serif); font-size: 34px; font-weight: 600; letter-spacing: -.01em; line-height: 1.15; }
.stats { gap: 14px; margin-bottom: 18px; }
.grid { gap: 18px; }
.stack { gap: 18px; }

.focus-item { background: var(--surface-2); border: 0; border-radius: 16px; padding: 14px 16px; }
.focus-item:hover { background: var(--accent-soft); }
.focus-n { background: transparent; color: var(--accent); font-family: var(--serif); font-size: 26px; width: 26px; font-weight: 600; }
.focus-empty { border-color: var(--border-2); border-radius: 16px; background: var(--surface-2); font-family: var(--serif); font-size: 16px; font-style: italic; }

.trow { border-radius: 12px; }
.col { background: color-mix(in srgb, var(--surface-3) 70%, transparent); border-radius: 22px; padding: 10px; }
.col-h { font-family: var(--serif); font-size: 16px; padding: 6px 8px 4px; }
.tcard { border: 0; border-radius: 14px; box-shadow: var(--shadow-1); }
.tcard:hover { box-shadow: var(--shadow-2); }
.board { gap: 16px; }

.pcard { border: 0; border-radius: var(--r-xl); padding: 20px 18px 16px; box-shadow: var(--shadow-1); }
.pcard::before { top: 0; left: 0; right: 0; bottom: auto; width: auto; height: 6px; }
.pcard h3 { font-family: var(--serif); font-size: 19px; color: var(--text); }
.dock a.on { font-weight: 600; }
.hcol-h b { font-family: var(--serif); font-size: 20px; font-weight: 600; }
.wip-warn { border-radius: 16px; }
.phead .title-inp { font-family: var(--serif); font-size: 36px; font-weight: 600; height: 52px; }
.d-title { font-family: var(--serif); font-size: 25px; font-weight: 600; }
.drawer { border-left: 0; border-radius: 24px 0 0 24px; }
.wgroup-h h3, .rv-step h3, .set-row h3 { font-family: var(--serif); font-size: 17px; }
.wgroup-h .av { border-radius: 50%; font-family: var(--serif); font-size: 14px; }
.wgroup-h, .wrow { border-color: var(--border); }
.seg { border-radius: 999px; background: var(--surface); box-shadow: var(--shadow-1); }
.seg button { border-radius: 999px; height: 28px; padding: 0 12px; }
.seg button.on { background: var(--text); color: var(--surface); box-shadow: none; }
.fchip { border-radius: 999px; border-style: solid; border-color: var(--border-2); background: var(--surface); }
.btn { border-radius: 10px; }
.btn-primary { border-radius: 999px; }
.modal { border: 0; border-radius: 22px; }
.qa-inp { font-family: var(--serif); font-size: 21px; }
.pal-inp { font-family: var(--serif); font-size: 19px; }
.cal { border: 0; border-radius: var(--r-xl); box-shadow: var(--shadow-1); }
.cal-d.today .n { background: var(--accent); }
.day-h b { font-family: var(--serif); font-size: 16px; }
.toast { border-radius: 999px; padding-left: 18px; }
.lg-h { font-family: var(--serif); font-size: 15px; color: var(--text); font-weight: 600; }
.h-sec { font-family: var(--serif); text-transform: none; letter-spacing: 0; font-size: 16px; color: var(--text-2); }
.check:checked { background: var(--sage); border-color: var(--sage); }
.prog > i { background: linear-gradient(90deg, var(--sage), color-mix(in srgb, var(--sage) 70%, var(--accent))); }
.bars .pair i { background: var(--accent); }
.hbar .tr i { background: var(--sage); }
.login-zenklas { background: var(--accent); border-radius: 18px; }
.login-zenklas span { background: var(--surface); }
.login-kortele { border: 0; border-radius: 28px; }
.login-kortele h1 { font-family: var(--serif); font-size: 34px; }
@media (max-width: 1180px) { .dock a span.dl { display: none; } .dock a { padding: 0 11px; } }

/* ----------------------------------------------------------------- mobilus */
.bnav { display: none; }
@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .g-today, .g-proj { grid-template-columns: 1fr; }
  .search-btn { width: 200px; }
}
@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: 280px; z-index: 50; transform: translateX(-100%); transition: transform .25s; box-shadow: var(--shadow-3); }
  .side.open { transform: none; }
  .menu-btn { display: inline-flex; }
  .top { padding: 0 12px 0 8px; gap: 6px; }
  .search-btn { width: auto; }
  .search-btn span, .search-btn kbd { display: none; }
  .view { padding: 4px 16px 96px; }
  .horizons, .g-2, .g-3, .g-4, .matrix { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hello h2 { font-size: 22px; }
  .board { grid-auto-columns: 84vw; scroll-snap-type: x mandatory; }
  .col { scroll-snap-align: start; }
  .d-grid { grid-template-columns: 110px 1fr; }
  .drawer-b { padding: 14px 16px 60px; }
  .set-row { grid-template-columns: 1fr; gap: 10px; }
  .trow .acts { display: none !important; }
  .filter-inp { width: 100%; }
  .modal-w { padding: 8vh 10px 10px; }
  .bnav { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--surface); border-top: 1px solid var(--border); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); justify-content: space-around; }
  .bnav a, .bnav button { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 10.5px; color: var(--text-3); text-decoration: none !important; padding: 4px 8px; border: 0; background: none; position: relative; min-width: 54px; }
  .bnav a.on { color: var(--accent); }
  .bnav .fab { width: 46px; height: 46px; border-radius: 15px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; margin-top: -18px; box-shadow: var(--shadow-2); padding: 0; min-width: 0; }
  .bnav .fab svg { width: 22px; height: 22px; }
  .bnav .b { position: absolute; top: 0; right: 10px; background: var(--accent); color: var(--accent-ink); border-radius: 8px; font-size: 9.5px; padding: 0 5px; font-weight: 650; }
  .toasts { bottom: 86px; }
  .cal-d { min-height: 74px; padding: 3px; }
  .cal-e { font-size: 10px; padding: 1px 3px; }
  .gantt-in { min-width: 640px; }
  .g-row { grid-template-columns: 140px 1fr; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

@media (max-width: 860px) { .dock, .sync-dot { display: none; } .top { padding: 0 12px; height: 60px; } .view { padding: 0 16px 100px; } .pagehead h1 { font-size: 28px; } .hello h2 { font-size: 30px; } .search-btn { width: 36px; padding: 0; justify-content: center; } }

.stat .v, .kpi .v, .focus-n, .num, .pagehead h1, .hello h2, .card-h .sub { font-variant-numeric: lining-nums tabular-nums; }

.login-forma { display: flex; flex-direction: column; gap: 6px; text-align: left; margin-top: 4px; }
.login-forma .inp { height: 42px; margin-bottom: 8px; }
.login-forma .btn-lg { margin-top: 6px; }
