/* Christeta panel — Apple stiliaus sąsaja: sisteminis šriftas, permatomos juostos, 44 px taikiniai,
   atsakas paspaudus (scale .97 / 100 ms), spyruoklinis easing, light/dark, prefers-reduced-motion. */

:root {
  color-scheme: light dark;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Inter, system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;

  --bg: #f2f2f7;            /* grupuotas fonas */
  --surface: #ffffff;       /* kortelės, sąrašai */
  --surface-2: #f2f2f7;     /* įvedimo laukai ant surface */
  --elevated: #ffffff;
  --text: #1c1c1e;
  --text-2: #6c6c70;        /* antrinis */
  --text-3: #aeaeb2;        /* tretinis */
  --sep: rgba(60, 60, 67, .18);
  --sep-strong: rgba(60, 60, 67, .3);
  --fill: rgba(120, 120, 128, .12);
  --fill-2: rgba(120, 120, 128, .2);
  --accent: #8a5a44;
  --accent-tint: rgba(138, 90, 68, .13);
  --green: #34c759; --orange: #ff9500; --red: #ff3b30; --yellow: #ffcc00; --purple: #af52de; --teal: #30b0c7; --indigo: #5856d6; --pink: #ff2d55; --gray: #8e8e93;
  --glass: rgba(249, 249, 251, .78);
  --glass-strong: rgba(242, 242, 247, .9);
  --shadow-1: 0 1px 2px rgba(0,0,0,.05), 0 0 0 .5px rgba(0,0,0,.04);
  --shadow-2: 0 8px 28px rgba(0,0,0,.12), 0 1px 3px rgba(0,0,0,.08);
  --shadow-3: 0 24px 60px rgba(0,0,0,.22), 0 2px 8px rgba(0,0,0,.1);

  --r-s: 8px; --r: 12px; --r-l: 18px; --r-xl: 26px;
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.32, 1.18, .42, 1);  /* lengva „spyruoklė“ be perlėkimo apačioje */
  --t-fast: 120ms; --t: 240ms; --t-slow: 380ms;

  --sidebar-w: 236px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000; --surface: #1c1c1e; --surface-2: #2c2c2e; --elevated: #2c2c2e;
    --text: #f5f5f7; --text-2: #98989f; --text-3: #636366;
    --sep: rgba(84, 84, 88, .6); --sep-strong: rgba(84, 84, 88, .8);
    --fill: rgba(120, 120, 128, .24); --fill-2: rgba(120, 120, 128, .36);
    --accent: #d9a98f; --accent-tint: rgba(217, 169, 143, .2);
    --green: #30d158; --orange: #ff9f0a; --red: #ff453a; --yellow: #ffd60a; --purple: #bf5af2; --teal: #40c8e0; --indigo: #5e5ce6; --pink: #ff375f; --gray: #98989f;
    --glass: rgba(22, 22, 24, .72); --glass-strong: rgba(28, 28, 30, .9);
    --shadow-1: 0 1px 2px rgba(0,0,0,.4), 0 0 0 .5px rgba(255,255,255,.06);
    --shadow-2: 0 8px 28px rgba(0,0,0,.5), 0 0 0 .5px rgba(255,255,255,.08);
    --shadow-3: 0 24px 60px rgba(0,0,0,.7), 0 0 0 .5px rgba(255,255,255,.1);
  }
}
:root[data-theme="dark"] {
  --bg: #000000; --surface: #1c1c1e; --surface-2: #2c2c2e; --elevated: #2c2c2e;
  --text: #f5f5f7; --text-2: #98989f; --text-3: #636366;
  --sep: rgba(84, 84, 88, .6); --sep-strong: rgba(84, 84, 88, .8);
  --fill: rgba(120, 120, 128, .24); --fill-2: rgba(120, 120, 128, .36);
  --accent: #d9a98f; --accent-tint: rgba(217, 169, 143, .2);
  --green: #30d158; --orange: #ff9f0a; --red: #ff453a; --yellow: #ffd60a; --purple: #bf5af2; --teal: #40c8e0; --indigo: #5e5ce6; --pink: #ff375f; --gray: #98989f;
  --glass: rgba(22, 22, 24, .72); --glass-strong: rgba(28, 28, 30, .9);
  --shadow-1: 0 1px 2px rgba(0,0,0,.4), 0 0 0 .5px rgba(255,255,255,.06);
  --shadow-2: 0 8px 28px rgba(0,0,0,.5), 0 0 0 .5px rgba(255,255,255,.08);
  --shadow-3: 0 24px 60px rgba(0,0,0,.7), 0 0 0 .5px rgba(255,255,255,.1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font: 15px/1.45 var(--font); color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overscroll-behavior-y: none;
}
[hidden] { display: none !important; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
img { display: block; max-width: 100%; }
::selection { background: var(--accent-tint); }
:focus-visible { outline: 3px solid var(--accent-tint); outline-offset: 2px; border-radius: var(--r-s); }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -.01em; }
hr { border: 0; border-top: .5px solid var(--sep); margin: 4px 0; }
kbd { font: 11px/1 var(--mono); background: var(--fill); padding: 3px 5px; border-radius: 5px; color: var(--text-2); }
.muted { color: var(--text-2); }
.small { font-size: 13px; }
.mono { font-family: var(--mono); font-size: 12px; }
.nowrap { white-space: nowrap; }
.empty { color: var(--text-2); text-align: center; padding: 40px 16px; }
.empty .big-icon { font-size: 40px; opacity: .5; margin-bottom: 8px; }

/* ---------- pressable (atsakas paspaudus, ne atleidus) ---------- */
.pressable, .btn, .icon-btn, .row.tappable, .card, .nav a, .tabbar a, .seg button, .chip, .user-chip, .menu button, .ctx button {
  transition: transform var(--t-fast) ease-out, background-color var(--t-fast) ease-out, opacity var(--t-fast) ease-out, box-shadow var(--t-fast) ease-out;
}
.btn:active, .icon-btn:active, .card:active, .chip:active, .user-chip:active, .tabbar a:active { transform: scale(.97); }
.row.tappable:active { background: var(--fill); }
.nav a:active, .menu button:active, .ctx button:active { background: var(--fill-2); }

/* ---------- mygtukai ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 0 14px;
  border-radius: 10px; font-weight: 600; font-size: 15px; background: var(--fill); color: var(--accent); white-space: nowrap; line-height: 1;
}
.btn:hover { background: var(--fill-2); text-decoration: none; }
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.tint { background: var(--accent-tint); }
.btn.plain { background: transparent; }
.btn.plain:hover { background: var(--fill); }
.btn.danger { color: var(--red); }
.btn.danger.primary { background: var(--red); color: #fff; }
.btn.big { min-height: 50px; font-size: 17px; border-radius: 14px; width: 100%; }
.btn.pill { border-radius: 999px; }
.btn.small { min-height: 30px; font-size: 13px; padding: 0 10px; border-radius: 8px; }
.btn:disabled { opacity: .45; cursor: default; transform: none; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 10px;
  background: var(--fill); color: var(--text); font-size: 17px; line-height: 1;
}
.icon-btn:hover { background: var(--fill-2); }
.icon-btn[aria-pressed="true"] { background: var(--accent-tint); color: var(--accent); }
.icon-btn.plain { background: transparent; }
.icon-btn svg, .btn svg { width: 18px; height: 18px; }
@media (pointer: coarse) { .btn { min-height: 44px; } .icon-btn { width: 44px; height: 44px; } .btn.small { min-height: 36px; } }

/* ---------- segmented control ---------- */
.seg { display: inline-flex; padding: 2px; background: var(--fill); border-radius: 9px; gap: 2px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { min-height: 30px; padding: 0 12px; border-radius: 7px; font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; }
.seg button[aria-pressed="true"] { background: var(--elevated); box-shadow: 0 1px 3px rgba(0,0,0,.14), 0 0 0 .5px rgba(0,0,0,.04); }
:root[data-theme="dark"] .seg button[aria-pressed="true"] { background: #636366; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .seg button[aria-pressed="true"] { background: #636366; } }
.seg button .cnt { color: var(--text-2); font-weight: 500; margin-left: 4px; font-size: 12px; }
@media (pointer: coarse) { .seg button { min-height: 36px; } }

/* ---------- chips, pills, badges ---------- */
.chip { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border-radius: 999px; background: var(--fill); font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.chip.on { background: var(--accent-tint); color: var(--accent); }
.pill { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 999px; font-size: 11.5px; font-weight: 700; letter-spacing: .01em; background: var(--fill); color: var(--text-2); white-space: nowrap; }
.pill.blue { background: var(--accent-tint); color: var(--accent); }
.pill.green { background: rgba(52,199,89,.16); color: #1f9e46; }
.pill.orange { background: rgba(255,149,0,.16); color: #b86500; }
.pill.red { background: rgba(255,59,48,.14); color: var(--red); }
.pill.purple { background: rgba(175,82,222,.16); color: var(--purple); }
.pill.gray { background: var(--fill); color: var(--text-2); }
.pill.teal { background: rgba(48,176,199,.16); color: #117a8b; }
.badge { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; }
.badge.quiet { background: var(--fill-2); color: var(--text-2); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--gray); flex: none; }
.dot.laukia { background: var(--gray); } .dot.daroma { background: var(--accent); } .dot.blokuota { background: var(--red); } .dot.padaryta { background: var(--green); }
.avatar { width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: #fff; background: var(--accent); flex: none; letter-spacing: .02em; }
.avatar.s { width: 22px; height: 22px; font-size: 10px; }

/* ---------- laukai ---------- */
.field { display: flex; flex-direction: column; gap: 5px; }
.field > span { font-size: 13px; font-weight: 600; color: var(--text-2); }
.field input, .field select, .field textarea, .input {
  min-height: 40px; padding: 8px 12px; border-radius: 10px; border: .5px solid transparent; background: var(--fill); color: var(--text); font-size: 15px; width: 100%;
  transition: box-shadow var(--t-fast) ease-out, background-color var(--t-fast) ease-out;
}
.field textarea { resize: vertical; min-height: 72px; line-height: 1.4; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { outline: none; background: var(--surface); box-shadow: 0 0 0 3.5px var(--accent-tint), 0 0 0 .5px var(--accent); }
.field select { appearance: none; -webkit-appearance: none; padding-right: 32px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' fill='none' stroke='%238e8e93' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.field-group { display: grid; gap: 10px; }
.field-row { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
@media (pointer: coarse) { .field input, .field select, .input { min-height: 44px; font-size: 16px; } }
.form-error { color: var(--red); font-size: 13px; min-height: 18px; margin: 6px 0 0; }

.toggle { position: relative; width: 51px; height: 31px; border-radius: 999px; background: var(--fill-2); transition: background-color var(--t) var(--ease-out); flex: none; }
.toggle::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 3px 8px rgba(0,0,0,.15), 0 0 0 .5px rgba(0,0,0,.04); transition: transform var(--t) var(--spring); }
.toggle[aria-checked="true"] { background: var(--green); }
.toggle[aria-checked="true"]::after { transform: translateX(20px); }

.search { position: relative; flex: 1 1 200px; max-width: 420px; }
.search input { padding-left: 34px; min-height: 36px; border-radius: 10px; background: var(--fill); border: 0; width: 100%; font-size: 15px; }
.search input:focus { outline: none; background: var(--surface); box-shadow: 0 0 0 3.5px var(--accent-tint); }
.search::before { content: ""; position: absolute; left: 11px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); opacity: .5;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E") center/contain no-repeat; }
:root[data-theme="dark"] .search::before { filter: invert(1); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .search::before { filter: invert(1); } }
.search kbd { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); }
@media (pointer: coarse) { .search kbd { display: none; } }

/* ---------- prisijungimas ---------- */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(1200px 600px at 50% -10%, rgba(0,122,255,.14), transparent 60%), var(--bg); }
.login-card { width: min(380px, 100%); background: var(--surface); border-radius: var(--r-xl); padding: 36px 28px 28px; box-shadow: var(--shadow-2); display: grid; gap: 14px; text-align: center; animation: pop var(--t-slow) var(--spring) both; }
.login-title { font-size: 26px; letter-spacing: -.02em; }
.login-sub { margin: -8px 0 6px; color: var(--text-2); }
.login-card .field-group { text-align: left; }
.app-icon { width: 64px; height: 64px; margin: 0 auto 4px; border-radius: 16px; display: grid; place-items: center; font-weight: 800; font-size: 32px; color: #fff; letter-spacing: -.03em;
  background: linear-gradient(135deg, #b98a70, #6f4631 75%); box-shadow: 0 8px 24px rgba(111,70,49,.3), inset 0 1px 0 rgba(255,255,255,.35); }
.app-icon.small { width: 28px; height: 28px; border-radius: 8px; font-size: 15px; margin: 0; box-shadow: 0 2px 6px rgba(111,70,49,.3); }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }

/* ---------- išdėstymas: šoninė juosta + turinys ---------- */
.app { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100dvh; }
.sidebar {
  position: sticky; top: 0; height: 100dvh; padding: 14px 10px; display: flex; flex-direction: column; gap: 10px;
  background: var(--glass); -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%);
  border-right: .5px solid var(--sep);
}
.brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 10px; color: var(--text); font-weight: 700; letter-spacing: -.01em; font-size: 15px; }
.brand:hover { text-decoration: none; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav .group { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); padding: 14px 10px 6px; }
.nav a { display: flex; align-items: center; gap: 10px; min-height: 34px; padding: 0 10px; border-radius: 8px; color: var(--text); font-weight: 500; font-size: 14px; }
.nav a:hover { background: var(--fill); text-decoration: none; }
.nav a[aria-current="page"] { background: var(--accent); color: #fff; }
.nav a[aria-current="page"] .ico { color: #fff; }
.nav a[aria-current="page"] .badge.quiet { background: rgba(255,255,255,.28); color: #fff; }
.nav .ico { width: 18px; height: 18px; color: var(--accent); flex: none; }
.nav .ico svg { width: 18px; height: 18px; display: block; }
.nav a .badge { margin-left: auto; }
.sidebar-foot { margin-top: auto; }
.user-chip { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 8px; border-radius: 10px; text-align: left; }
.user-chip:hover { background: var(--fill); }
.user-chip .user-name { font-weight: 600; font-size: 14px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip .chev { color: var(--text-3); }

.content { min-width: 0; padding-bottom: calc(24px + var(--safe-b)); }
.view { max-width: 1240px; margin: 0 auto; padding: 0 28px 40px; }

/* didelė antraštė + permatoma įrankių juosta */
.page-head { position: sticky; top: 0; z-index: 5; margin: 0 -28px; padding: 14px 28px 10px; background: var(--glass); -webkit-backdrop-filter: blur(22px) saturate(180%); backdrop-filter: blur(22px) saturate(180%); }
.page-head::after { content: ""; position: absolute; left: 0; right: 0; bottom: -10px; height: 10px; pointer-events: none; background: linear-gradient(to bottom, rgba(0,0,0,.05), transparent); opacity: 0; transition: opacity var(--t); }
.page-head.scrolled::after { opacity: 1; }
.page-title-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-title { font-size: 30px; font-weight: 800; letter-spacing: -.025em; line-height: 1.1; }
.page-title .sub { display: block; font-size: 14px; font-weight: 500; color: var(--text-2); letter-spacing: 0; margin-top: 4px; }
.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.toolbar .spacer { flex: 1; }
.crumbs { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; font-size: 14px; color: var(--text-2); }
.crumbs a { color: var(--text-2); padding: 3px 6px; border-radius: 6px; }
.crumbs a:hover { background: var(--fill); text-decoration: none; color: var(--text); }
.crumbs .cur { color: var(--text); font-weight: 600; padding: 3px 6px; }
.crumbs .sepr { color: var(--text-3); }

/* ---------- grupuoti sąrašai (iOS inset grouped) ---------- */
.section { margin-top: 22px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 0 4px 8px; }
.section-head h2 { font-size: 20px; letter-spacing: -.02em; }
.section-head h3 { font-size: 13px; font-weight: 600; color: var(--text-2); text-transform: uppercase; letter-spacing: .05em; }
.section-head .more { font-size: 14px; font-weight: 600; }
.list { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow-1); overflow: hidden; }
.row { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 9px 14px; position: relative; color: inherit; }
.row + .row::before { content: ""; position: absolute; left: 14px; right: 0; top: 0; border-top: .5px solid var(--sep); }
.row.indent + .row.indent::before { left: 54px; }
.row.tappable { cursor: pointer; }
.row.tappable:hover { background: var(--fill); }
.row .main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.row .title { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .title.done { color: var(--text-2); text-decoration: line-through; }
.row .sub { font-size: 13px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .sub .over { color: var(--red); font-weight: 600; }
.row .sub .today { color: var(--orange); font-weight: 600; }
.row .trail { display: flex; align-items: center; gap: 8px; flex: none; color: var(--text-2); font-size: 13px; }
.row .chevron { color: var(--text-3); font-size: 18px; line-height: 1; margin-left: -2px; }
.row .thumb { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; background: var(--fill); flex: none; }
.row .ficon { width: 44px; height: 44px; border-radius: 8px; display: grid; place-items: center; font-size: 22px; background: var(--fill); flex: none; }
.check { width: 24px; height: 24px; border-radius: 50%; border: 1.6px solid var(--text-3); display: inline-grid; place-items: center; flex: none; color: #fff; font-size: 13px; transition: background-color var(--t-fast), border-color var(--t-fast), transform var(--t-fast); }
.check:hover { border-color: var(--accent); }
.check.on { background: var(--accent); border-color: var(--accent); }
.check:active { transform: scale(.9); }
.row.hidden-done { display: none; }

/* ---------- kortelės, tinklelis, KPI ---------- */
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.card { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow-1); overflow: hidden; position: relative; cursor: pointer; display: flex; flex-direction: column; color: inherit; }
.card:hover { box-shadow: var(--shadow-2); transform: translateY(-1px); text-decoration: none; }
.card .media { aspect-ratio: 4/3; background: var(--fill); display: grid; place-items: center; overflow: hidden; position: relative; }
.card .media img { width: 100%; height: 100%; object-fit: cover; }
.card .media .big-ico { font-size: 40px; opacity: .8; }
.card .media .mosaic { position: absolute; inset: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 2px; padding: 0; }
.card .media .mosaic img { width: 100%; height: 100%; object-fit: cover; }
.card .media .mosaic.one { grid-template-columns: 1fr; }
.card .body { padding: 10px 12px 11px; display: flex; flex-direction: column; gap: 3px; }
.card .name { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card .meta { font-size: 12px; color: var(--text-2); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.card .lock { position: absolute; top: 8px; left: 8px; background: rgba(0,0,0,.55); color: #fff; font-size: 11px; padding: 2px 7px; border-radius: 999px; backdrop-filter: blur(8px); }
.card .star { position: absolute; top: 6px; right: 6px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 17px; background: rgba(0,0,0,.35); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); opacity: 0; transition: opacity var(--t-fast); }
.card:hover .star, .card .star.on, .card .star:focus-visible { opacity: 1; }
.card .star.on { color: var(--yellow); }
@media (pointer: coarse) { .card .star { opacity: 1; } }
.card .reacts { position: absolute; bottom: 58px; left: 8px; display: flex; gap: 4px; opacity: 0; transition: opacity var(--t-fast); }
.card:hover .reacts, .card .reacts.has { opacity: 1; }
.card .reacts button { height: 26px; min-width: 30px; padding: 0 7px; border-radius: 999px; background: rgba(0,0,0,.42); color: #fff; font-size: 12.5px; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); display: inline-flex; align-items: center; gap: 3px; }
.card .reacts button.on { background: var(--accent); }
.card.sel { box-shadow: 0 0 0 3px var(--accent), var(--shadow-1); }
.card .selbox { position: absolute; top: 8px; left: 8px; width: 24px; height: 24px; border-radius: 50%; border: 2px solid #fff; background: rgba(0,0,0,.3); display: grid; place-items: center; color: #fff; font-size: 13px; }
.card.sel .selbox { background: var(--accent); border-color: var(--accent); }

.kpis { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.kpi { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow-1); padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; min-height: 92px; color: inherit; }
.kpi.tappable { cursor: pointer; }
.kpi.tappable:hover { box-shadow: var(--shadow-2); text-decoration: none; }
.kpi .label { font-size: 13px; font-weight: 600; color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.kpi .value { font-size: 30px; font-weight: 800; letter-spacing: -.03em; line-height: 1.05; margin-top: auto; font-variant-numeric: tabular-nums; }
.kpi .value.red { color: var(--red); } .kpi .value.green { color: var(--green); } .kpi .value.orange { color: var(--orange); } .kpi .value.blue { color: var(--accent); } .kpi .value.purple { color: var(--purple); }
.kpi .hint { font-size: 12px; color: var(--text-2); }
.two-col { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); align-items: start; }

/* piltuvėlis (klientai pagal stadiją) */
.funnel { display: flex; gap: 6px; }
.funnel a { flex: 1; min-width: 0; background: var(--surface); border-radius: 10px; box-shadow: var(--shadow-1); padding: 10px 10px 9px; color: inherit; display: flex; flex-direction: column; gap: 2px; border-top: 3px solid var(--c, var(--gray)); }
.funnel a:hover { box-shadow: var(--shadow-2); text-decoration: none; }
.funnel .n { font-size: 22px; font-weight: 800; letter-spacing: -.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.funnel .l { font-size: 11.5px; color: var(--text-2); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stage-naujas { --c: var(--gray); } .stage-kontaktas { --c: var(--accent); } .stage-susitikimas { --c: var(--purple); } .stage-pasiulymas { --c: var(--orange); } .stage-laimeta { --c: var(--green); } .stage-prarasta { --c: var(--red); }
.pill.stage { background: color-mix(in srgb, var(--c) 16%, transparent); color: var(--c); }

/* ---------- lentelė (Excel tipo) ---------- */
.sheet-wrap { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow-1); overflow: auto; max-height: calc(100dvh - 220px); }
table.grid-table { border-collapse: separate; border-spacing: 0; min-width: 100%; font-size: 14px; }
.grid-table th, .grid-table td { border-right: .5px solid var(--sep); border-bottom: .5px solid var(--sep); padding: 0; position: relative; }
.grid-table th { position: sticky; top: 0; z-index: 2; background: var(--glass-strong); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); font-weight: 600; color: var(--text-2); font-size: 12.5px; text-align: left; height: 34px; }
.grid-table th .th { display: flex; align-items: center; gap: 4px; padding: 0 8px; height: 34px; cursor: default; }
.grid-table th .th button { color: var(--text-3); width: 20px; height: 20px; border-radius: 5px; opacity: 0; }
.grid-table th:hover .th button { opacity: 1; }
.grid-table th .rz { position: absolute; right: -3px; top: 0; width: 6px; height: 100%; cursor: col-resize; }
.grid-table td.num { width: 44px; min-width: 44px; text-align: center; color: var(--text-3); font-size: 12px; font-variant-numeric: tabular-nums; background: var(--bg); position: sticky; left: 0; z-index: 1; cursor: context-menu; }
.grid-table th.num { left: 0; z-index: 3; }
.grid-table td .cell { min-height: 34px; padding: 7px 8px; outline: none; white-space: pre-wrap; word-break: break-word; }
.grid-table td .cell:focus { box-shadow: inset 0 0 0 2px var(--accent); background: var(--surface); }
.grid-table td .cell a { pointer-events: auto; }
.grid-table td.type-number .cell { text-align: right; font-variant-numeric: tabular-nums; }
.grid-table tr:hover td { background: color-mix(in srgb, var(--fill) 50%, transparent); }

/* išlaidų lentelė */
.table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow-1); overflow: hidden; font-size: 14px; }
.table th, .table td { padding: 10px 12px; text-align: left; border-bottom: .5px solid var(--sep); vertical-align: middle; }
.table th { font-size: 12px; font-weight: 600; color: var(--text-2); text-transform: uppercase; letter-spacing: .04em; }
.table tr:last-child td { border-bottom: 0; }
.table td.r, .table th.r { text-align: right; font-variant-numeric: tabular-nums; }
.table td[contenteditable] { outline: none; border-radius: 6px; }
.table td[contenteditable]:focus { box-shadow: inset 0 0 0 2px var(--accent); }
.table-wrap { overflow-x: auto; border-radius: var(--r); }

/* ---------- meniu, kontekstinis meniu ---------- */
.menu, .ctx {
  position: fixed; z-index: 60; min-width: 220px; padding: 6px; border-radius: 14px; background: var(--glass-strong);
  -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%); box-shadow: var(--shadow-3);
  display: flex; flex-direction: column; gap: 1px; transform-origin: var(--ox, 50%) var(--oy, 0%); animation: menu-in var(--t) var(--spring) both;
}
.menu button, .ctx button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 34px; padding: 0 12px; border-radius: 8px; text-align: left; font-size: 14px; }
.menu button:hover, .ctx button:hover { background: var(--accent); color: #fff; }
.menu button.danger, .ctx button.danger { color: var(--red); }
.menu button.danger:hover, .ctx button.danger:hover { background: var(--red); color: #fff; }
.menu hr, .ctx hr { margin: 4px 8px; }
@keyframes menu-in { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: none; } }

/* ---------- sheet / modal (iš apačios telefone, centre darbalaukyje) ---------- */
.sheet-scrim { position: fixed; inset: 0; z-index: 70; background: rgba(0,0,0,.32); animation: fade var(--t) ease-out both; }
.sheet {
  position: fixed; z-index: 71; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(560px, calc(100% - 32px)); max-height: calc(100dvh - 48px);
  background: var(--elevated); border-radius: var(--r-l); box-shadow: var(--shadow-3); display: flex; flex-direction: column; overflow: hidden;
  animation: sheet-in var(--t-slow) var(--spring) both;
}
.sheet.wide { width: min(820px, calc(100% - 32px)); }
.sheet.closing { animation: sheet-out var(--t) ease-in both; }
.sheet-scrim.closing { animation: fade-out var(--t) ease-in both; }
.sheet-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px 10px; }
.sheet-head h2 { font-size: 18px; letter-spacing: -.015em; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet-body { padding: 4px 16px 16px; overflow: auto; display: grid; gap: 14px; }
.sheet-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 10px 16px 16px; border-top: .5px solid var(--sep); background: var(--elevated); }
.sheet-foot .left { margin-right: auto; }
.sheet .handle { display: none; width: 36px; height: 5px; border-radius: 3px; background: var(--fill-2); margin: 8px auto 0; }
@keyframes sheet-in { from { opacity: 0; transform: translate(-50%, -50%) scale(.94); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
@keyframes sheet-out { to { opacity: 0; transform: translate(-50%, -50%) scale(.96); } }
@keyframes fade { from { opacity: 0; } } @keyframes fade-out { to { opacity: 0; } }
.note-list { display: flex; flex-direction: column; gap: 10px; }
.note { background: var(--surface-2); border-radius: 12px; padding: 9px 12px; font-size: 14px; }
.note .who { font-size: 12px; color: var(--text-2); display: flex; justify-content: space-between; gap: 8px; margin-bottom: 2px; }
.note .who button { color: var(--text-3); font-size: 12px; }
.note .who button:hover { color: var(--red); }
.timeline { display: grid; gap: 0; }
.detail-grid { display: grid; grid-template-columns: 120px 1fr; gap: 6px 12px; font-size: 14px; }
.detail-grid dt { color: var(--text-2); } .detail-grid dd { margin: 0; }

/* ---------- peržiūra ---------- */
.viewer { position: fixed; inset: 0; z-index: 80; background: var(--bg); display: flex; flex-direction: column; animation: fade var(--t) ease-out both; }
.viewer-bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--glass); -webkit-backdrop-filter: blur(22px) saturate(180%); backdrop-filter: blur(22px) saturate(180%); border-bottom: .5px solid var(--sep); padding-top: max(10px, env(safe-area-inset-top)); }
.viewer-title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.viewer-title strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.viewer-title span { font-size: 12px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viewer-actions { display: flex; gap: 6px; }
.viewer-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 340px; }
.viewer-body.no-side { grid-template-columns: 1fr; }
.viewer-body.no-side .viewer-side { display: none; }
.viewer-stage { min-width: 0; min-height: 0; overflow: auto; display: grid; place-items: center; padding: 16px; background: var(--bg); }
.viewer-stage img, .viewer-stage video { max-width: 100%; max-height: calc(100dvh - 100px); object-fit: contain; border-radius: 6px; box-shadow: var(--shadow-2); }
.viewer-stage iframe { width: 100%; height: 100%; min-height: calc(100dvh - 100px); border: 0; background: #fff; border-radius: 8px; }
.viewer-stage .doc { align-self: start; width: min(820px, 100%); background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow-1); padding: 28px 32px; line-height: 1.6; }
.viewer-stage .doc pre { white-space: pre-wrap; font: 13px/1.5 var(--mono); }
.viewer-stage .doc h1, .viewer-stage .doc h2, .viewer-stage .doc h3 { margin: 1.2em 0 .5em; } .viewer-stage .doc h1:first-child { margin-top: 0; }
.viewer-stage .doc table { border-collapse: collapse; font-size: 13.5px; } .viewer-stage .doc th, .viewer-stage .doc td { border: .5px solid var(--sep-strong); padding: 6px 9px; vertical-align: top; }
.viewer-stage .doc code { background: var(--fill); padding: 1px 5px; border-radius: 5px; font-size: 90%; }
.viewer-stage .doc img { border-radius: 8px; }
.viewer-stage .doc blockquote { margin: 0; padding: 2px 14px; border-left: 3px solid var(--accent); color: var(--text-2); }
.viewer-side { border-left: .5px solid var(--sep); display: flex; flex-direction: column; min-height: 0; background: var(--surface); }
.reactions { display: flex; gap: 6px; padding: 12px; border-bottom: .5px solid var(--sep); flex-wrap: wrap; }
.reactions button { display: inline-flex; align-items: center; gap: 5px; height: 34px; padding: 0 12px; border-radius: 999px; background: var(--fill); font-weight: 600; font-size: 13.5px; }
.reactions button.on { background: var(--accent-tint); color: var(--accent); }
.reactions .stars { margin-left: auto; display: inline-flex; gap: 1px; }
.reactions .stars button { padding: 0 3px; min-width: 0; height: 34px; background: none; font-size: 20px; color: var(--text-3); }
.reactions .stars button.on { color: var(--yellow); }
.comments { flex: 1; overflow: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.comment { background: var(--surface-2); border-radius: 14px 14px 14px 4px; padding: 8px 12px; font-size: 14px; }
.comment .who { font-size: 12px; color: var(--text-2); display: flex; justify-content: space-between; margin-bottom: 2px; }
.comment .who button { color: var(--text-3); font-size: 12px; }
.comment.mine { background: var(--accent-tint); border-radius: 14px 14px 4px 14px; }
.comment-form { display: flex; gap: 8px; padding: 10px 12px; border-top: .5px solid var(--sep); padding-bottom: max(12px, var(--safe-b)); }
.comment-form textarea { flex: 1; resize: none; min-height: 40px; max-height: 120px; padding: 9px 12px; border-radius: 14px; border: 0; background: var(--fill); }
.comment-form textarea:focus { outline: none; box-shadow: 0 0 0 3px var(--accent-tint); }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: calc(24px + var(--safe-b)); transform: translate(-50%, 20px); z-index: 90; background: var(--glass-strong); color: var(--text); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); box-shadow: var(--shadow-2); border-radius: 999px; padding: 10px 16px; font-weight: 600; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity var(--t) var(--ease-out), transform var(--t) var(--spring); display: flex; align-items: center; gap: 12px; max-width: calc(100% - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast button { color: var(--accent); font-weight: 700; }

/* ---------- apatinė skirtukų juosta (telefonas) ---------- */
.tabbar { display: none; }
.drop { position: fixed; inset: 0; z-index: 50; pointer-events: none; display: grid; place-items: center; background: rgba(0,122,255,.12); border: 3px dashed var(--accent); font-weight: 700; color: var(--accent); font-size: 18px; }

/* ---------- tasks list specifics ---------- */
.task-row .prio { width: 3px; align-self: stretch; border-radius: 2px; background: transparent; margin: -9px 0 -9px -6px; }
.task-row .prio.aukštas { background: var(--red); }
.task-row .prio.žemas { background: var(--text-3); }
.who-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--text-2); }

.selbar { position: fixed; left: 50%; bottom: calc(20px + var(--safe-b)); transform: translateX(-50%); z-index: 45; display: flex; gap: 8px; align-items: center; padding: 8px 10px 8px 14px; border-radius: 999px; background: var(--glass-strong); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); box-shadow: var(--shadow-2); font-weight: 600; animation: pop var(--t) var(--spring) both; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .view { padding: 0 16px calc(90px + var(--safe-b)); }
  .page-head { margin: 0 -16px; padding: 10px 16px 8px; padding-top: max(10px, env(safe-area-inset-top)); }
  .page-title { font-size: 26px; }
  .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; justify-content: space-around; padding: 6px 4px calc(6px + var(--safe-b)); background: var(--glass); -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%); border-top: .5px solid var(--sep); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 56px; padding: 4px 6px; border-radius: 10px; color: var(--text-2); font-size: 10.5px; font-weight: 600; position: relative; }
  .tabbar a .ico svg { width: 24px; height: 24px; display: block; }
  .tabbar a[aria-current="page"] { color: var(--accent); }
  .tabbar a .badge { position: absolute; top: 0; right: 6px; }
  .viewer-body { grid-template-columns: 1fr; grid-template-rows: 1fr auto; }
  .viewer-side { border-left: 0; border-top: .5px solid var(--sep); max-height: 45dvh; }
  .viewer-body.no-side { grid-template-rows: 1fr; }
  .viewer-stage img, .viewer-stage video { max-height: 50dvh; }
  .sheet { top: auto; bottom: 0; left: 0; transform: none; width: 100%; max-height: calc(100dvh - 40px); border-radius: var(--r-xl) var(--r-xl) 0 0; animation: sheet-up var(--t-slow) var(--spring) both; }
  .sheet .handle { display: block; }
  .sheet-foot { padding-bottom: calc(14px + var(--safe-b)); }
  .sheet.closing { animation: sheet-down var(--t) ease-in both; }
  .detail-grid { grid-template-columns: 1fr; gap: 2px; } .detail-grid dt { margin-top: 6px; }
  .funnel { overflow-x: auto; scrollbar-width: none; } .funnel a { min-width: 92px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .kpi .value { font-size: 26px; }
  .menu { left: 16px !important; right: 16px; min-width: 0; }
}
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes sheet-down { to { transform: translateY(100%); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; transition-duration: 1ms !important; }
  .btn:active, .icon-btn:active, .card:active, .chip:active { transform: none; }
  .sheet, .login-card, .menu, .ctx { animation: fade var(--t) ease-out both; }
}
@media (prefers-reduced-transparency: reduce) {
  .sidebar, .page-head, .tabbar, .viewer-bar, .menu, .ctx, .toast { background: var(--surface); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (prefers-contrast: more) { .list, .card, .kpi { box-shadow: 0 0 0 1px var(--sep-strong); } }
@media print { .sidebar, .tabbar, .page-head .toolbar { display: none; } }

/* ---------- Patikrinti (To check) ---------- */
.cv-decision { padding: 12px; border-bottom: .5px solid var(--sep); background: var(--surface); }
.cv-decision .field > span { color: var(--green); }
.cv-decision textarea { min-height: 56px; }
.ck-body { font: 13px/1.5 var(--mono); min-height: 260px; }
.ck-note-hint { font-size: 12px; color: var(--text-2); padding: 0 12px 8px; }
.row .ficon.ck { font-size: 20px; }

/* ---------- business views ---------- */
:root { --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --grid: rgba(60,60,67,.12); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --s1: #3987e5; --s2: #d95926; --s3: #199e70; --grid: rgba(235,235,245,.12); } }
:root[data-theme="dark"] { --s1: #3987e5; --s2: #d95926; --s3: #199e70; --grid: rgba(235,235,245,.12); }
.viz { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow-1); padding: 14px 16px 10px; position: relative; min-width: 0; }
.viz h4 { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.viz .viz-sub { font-size: 13px; color: var(--text-2); margin-top: 1px; }
.viz .plot { position: relative; margin-top: 10px; width: 100%; }
.viz svg { display: block; width: 100%; overflow: visible; touch-action: pan-y; }
.viz text { font: 11.5px var(--font); fill: var(--text-2); font-variant-numeric: tabular-nums; }
.viz .gridline { stroke: var(--grid); stroke-width: 1; }
.viz .baseline { stroke: var(--sep-strong); stroke-width: 1; }
.viz .ref { stroke: var(--text-2); stroke-width: 1.25; stroke-dasharray: 4 4; }
.viz .hit { fill: transparent; }
.viz .cross { stroke: var(--sep-strong); stroke-width: 1; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--text-2); margin-top: 8px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.tip { position: absolute; z-index: 4; pointer-events: none; background: var(--elevated); border-radius: 10px; box-shadow: var(--shadow-2); padding: 7px 10px; font-size: 12.5px; white-space: nowrap; transform: translate(-50%, calc(-100% - 10px)); }
.tip b { display: block; font-weight: 600; margin-bottom: 2px; }
.tip span { display: flex; justify-content: space-between; gap: 14px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.viz details { margin-top: 6px; font-size: 13px; }
.viz summary { color: var(--text-2); cursor: pointer; min-height: 28px; display: flex; align-items: center; }
.table-wrap { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow-1); overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
table.data th { text-align: right; font-size: 12.5px; font-weight: 600; color: var(--text-2); padding: 9px 12px; white-space: nowrap; border-bottom: .5px solid var(--sep); }
table.data td { text-align: right; padding: 9px 12px; border-bottom: .5px solid var(--sep); white-space: nowrap; }
table.data tr:last-child td { border-bottom: 0; }
table.data th:first-child, table.data td:first-child { text-align: left; white-space: normal; min-width: 170px; }
table.data td.left, table.data th.left { text-align: left; white-space: normal; min-width: 90px; }
.viz table.data { font-size: 13px; } .viz table.data th, .viz table.data td { padding: 5px 8px; }
.action { display: flex; gap: 10px; align-items: flex-start; }
.action .tag { flex: none; margin-top: 1px; }
.action .txt { white-space: normal; }
.notice { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow-1); padding: 11px 14px; font-size: 14px; color: var(--text-2); margin-top: 14px; }
.notice b { color: var(--text); }
.post-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(164px, 1fr)); }
.post { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow-1); overflow: hidden; cursor: pointer; text-align: left; display: flex; flex-direction: column; color: inherit; transition: transform var(--t-fast) ease-out, box-shadow var(--t-fast) ease-out; }
.post:hover { box-shadow: var(--shadow-2); }
.post:active { transform: scale(.97); }
.post .ph { aspect-ratio: 4/5; background: var(--fill); position: relative; overflow: hidden; }
.post img { width: 100%; height: 100%; object-fit: cover; }
.post .badge-rel { position: absolute; left: 8px; top: 8px; background: rgba(0,0,0,.62); color: #fff; font-size: 12px; font-weight: 700; padding: 2px 7px; border-radius: 999px; font-variant-numeric: tabular-nums; }
.post .meta { padding: 8px 10px 10px; font-size: 12.5px; color: var(--text-2); display: flex; flex-direction: column; gap: 2px; }
.post .meta b { color: var(--text); font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.post-detail { display: grid; gap: 16px; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); }
.post-detail img { width: 100%; border-radius: var(--r-s); background: var(--fill); }
.post-detail .cap { white-space: pre-wrap; font-size: 14px; }
.stat-line { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px 12px; margin-bottom: 12px; }
.stat-line div { font-size: 12px; color: var(--text-2); }
.stat-line b { display: block; font-size: 17px; color: var(--text); font-variant-numeric: tabular-nums; }
.chart-grid { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
@media (max-width: 980px) { .chart-grid { grid-template-columns: minmax(0, 1fr); } }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 14px 0 12px; }
.filters select { background: var(--fill); border: 0; border-radius: 9px; min-height: 34px; padding: 0 10px; font-size: 14px; font-weight: 600; color: var(--text); }
@media (max-width: 640px) { .post-detail { grid-template-columns: 1fr; } .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Important: always red, in the menu and on the page ---------- */
.nav a[data-tab="important"], .tabbar a[data-tab="important"] { color: var(--red); font-weight: 600; }
.nav a[data-tab="important"] .ico { color: var(--red); }
.nav a[data-tab="important"][aria-current="page"] { background: var(--red); color: #fff; }
.nav a[data-tab="important"][aria-current="page"] .ico { color: #fff; }
.nav a[data-tab="important"] .badge.quiet { background: var(--red); color: #fff; }
.nav a[data-tab="important"][aria-current="page"] .badge.quiet { background: rgba(255,255,255,.28); }
.important-box .section-head h3 { color: var(--red); }
.important-box .list { box-shadow: 0 0 0 1px color-mix(in srgb, var(--red) 45%, transparent), var(--shadow-1); }
.row.imp { align-items: flex-start; }
.row.imp .main { color: inherit; text-decoration: none; }
.row.imp .wrap { white-space: normal; overflow: visible; }
.imp-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--red); margin-top: 6px; }
.row.imp.closed .imp-dot { background: var(--gray); }
.row.imp.closed .title { color: var(--text-2); text-decoration: line-through; }
