/* Dashboard (admin.sirdaryo-ssb.uz) — visual style of dashboard/frontend/Dashboard.html ("Veb-sayt" module). */

@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../vendor/inter/inter-cyrillic-ext.ca15706333.woff2") format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../vendor/inter/inter-cyrillic.71d5ee93cc.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../vendor/inter/inter-latin-ext.34b9c504ca.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../vendor/inter/inter-latin.3100e775e8.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; }

/* ---------- tokens (light = sample defaults; dark = sample isDark()) ---------- */
:root {
  --ground: #C1C1C4; --shell: #D4D4D7; --rail: #232326; --rail-icon: #D6D6DA; --rail-on: #3C3C40;
  --panel: #CACACD; --panel-bd: rgba(0,0,0,.06);
  --card: rgba(255,255,255,.42); --card-bd: rgba(255,255,255,.75);
  --card-sh: 0 1px 0 rgba(255,255,255,.8) inset, 0 10px 28px rgba(0,0,0,.07);
  --raise: rgba(255,255,255,.62); --raise-bd: rgba(255,255,255,.9);
  --raise-sh: 0 1px 0 rgba(255,255,255,.9) inset, 0 6px 16px rgba(0,0,0,.08);
  --hover: rgba(255,255,255,.38); --sel: rgba(255,255,255,.55);
  --inp: rgba(0,0,0,.06); --inp-bd: rgba(0,0,0,.07);
  --inp-sh: 0 2px 4px rgba(0,0,0,.12) inset, 0 1px 0 rgba(255,255,255,.7);
  --ink: #1C1C1E; --ink-2: #3A3A3D; --muted: #6B6B70; --line: rgba(0,0,0,.08);
  --dark: #232326; --dark-fg: #F2F2F4; --ghost: rgba(255,255,255,.4); --ghost-bd: rgba(0,0,0,.12);
  --ok: #1F7A4D; --ok-fg: #165C3A; --ok-bg: rgba(31,122,77,.12); --ok-bd: rgba(31,122,77,.3);
  --warn: #B06A00; --err: #B42318; --err-fg: #8A1C1C; --err-bg: rgba(176,32,32,.1); --err-bd: rgba(176,32,32,.3);
  --dot-none: rgba(128,128,132,.45);
  --bar: #2A2A2D;
  --r-card: 18px; --r-ctl: 12px; --r-inp: 10px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --ground: #101012; --shell: #1B1B1E; --rail: #0A0A0B; --rail-icon: #A9A9AE; --rail-on: #2C2C30;
  --panel: #141416; --panel-bd: rgba(255,255,255,.05);
  --card: rgba(255,255,255,.045); --card-bd: rgba(255,255,255,.07);
  --card-sh: 0 1px 0 rgba(255,255,255,.04) inset, 0 10px 28px rgba(0,0,0,.35);
  --raise: rgba(255,255,255,.09); --raise-bd: rgba(255,255,255,.1);
  --raise-sh: 0 1px 0 rgba(255,255,255,.05) inset, 0 6px 16px rgba(0,0,0,.3);
  --hover: rgba(255,255,255,.05); --sel: rgba(255,255,255,.08);
  --inp: rgba(0,0,0,.35); --inp-bd: rgba(255,255,255,.08);
  --inp-sh: 0 2px 4px rgba(0,0,0,.4) inset, 0 1px 0 rgba(255,255,255,.03);
  --ink: #EDEDF0; --ink-2: #C9C9CE; --muted: #8E8E95; --line: rgba(255,255,255,.08);
  --dark: #EDEDF0; --dark-fg: #141416; --ghost: rgba(255,255,255,.05); --ghost-bd: rgba(255,255,255,.14);
  --ok: #3FB47A; --ok-fg: #7FD9A9; --ok-bg: rgba(63,180,122,.13); --ok-bd: rgba(63,180,122,.35);
  --warn: #E3A13B; --err: #F0645A; --err-fg: #FFA49C; --err-bg: rgba(240,100,90,.12); --err-bd: rgba(240,100,90,.35);
  --bar: #D9D9DE;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] {
    --ground: #101012; --shell: #1B1B1E; --rail: #0A0A0B; --rail-icon: #A9A9AE; --rail-on: #2C2C30;
    --panel: #141416; --panel-bd: rgba(255,255,255,.05);
    --card: rgba(255,255,255,.045); --card-bd: rgba(255,255,255,.07);
    --card-sh: 0 1px 0 rgba(255,255,255,.04) inset, 0 10px 28px rgba(0,0,0,.35);
    --raise: rgba(255,255,255,.09); --raise-bd: rgba(255,255,255,.1);
    --raise-sh: 0 1px 0 rgba(255,255,255,.05) inset, 0 6px 16px rgba(0,0,0,.3);
    --hover: rgba(255,255,255,.05); --sel: rgba(255,255,255,.08);
    --inp: rgba(0,0,0,.35); --inp-bd: rgba(255,255,255,.08);
    --inp-sh: 0 2px 4px rgba(0,0,0,.4) inset, 0 1px 0 rgba(255,255,255,.03);
    --ink: #EDEDF0; --ink-2: #C9C9CE; --muted: #8E8E95; --line: rgba(255,255,255,.08);
    --dark: #EDEDF0; --dark-fg: #141416; --ghost: rgba(255,255,255,.05); --ghost-bd: rgba(255,255,255,.14);
    --ok: #3FB47A; --ok-fg: #7FD9A9; --ok-bg: rgba(63,180,122,.13); --ok-bd: rgba(63,180,122,.35);
    --warn: #E3A13B; --err: #F0645A; --err-fg: #FFA49C; --err-bg: rgba(240,100,90,.12); --err-bd: rgba(240,100,90,.35);
    --bar: #D9D9DE;
    color-scheme: dark;
  }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font: 400 14px/1.45 Inter, system-ui, sans-serif; color: var(--ink); background: var(--ground);
  -webkit-font-smoothing: antialiased; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
[x-cloak] { display: none !important; }
[hidden] { display: none !important; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ic { flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.vh { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.muted { color: var(--muted); }
.inline { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
code, .mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 12.5px; }

/* ---------- frame: ground > shell > rail | side | main ---------- */
.ground { min-height: 100%; padding: 12px; }
.shell { display: grid; grid-template-columns: 76px 250px minmax(0, 1fr); gap: 12px; height: calc(100vh - 24px);
  min-width: 1100px; }
.rail { display: flex; flex-direction: column; justify-content: space-between; gap: 12px; }
.rail-top, .rail-bottom { background: var(--shell); border-radius: 24px; padding: 10px;
  box-shadow: 0 1px 0 rgba(255,255,255,.55) inset, 0 18px 40px rgba(0,0,0,.12); }
.rail-top { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; background: var(--rail);
  box-shadow: 0 18px 40px rgba(0,0,0,.25); }
.rail-bottom { display: flex; justify-content: center; }
.rbtn { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: var(--rail-icon);
  text-decoration: none; transition: background .15s, color .15s; }
.rbtn:hover { background: rgba(255,255,255,.08); color: #F2F2F4; }
.rbtn.is-on { background: var(--rail-on); color: #F2F2F4; box-shadow: 0 1px 0 rgba(255,255,255,.14) inset, 0 2px 6px rgba(0,0,0,.3); }
.rbtn--set { width: 56px; height: 56px; border-radius: 14px; background: var(--rail); color: #F2F2F4;
  box-shadow: 0 1px 0 rgba(255,255,255,.08) inset, 0 10px 24px rgba(0,0,0,.28); }
.rbtn--set.is-on, .rbtn--set:hover { background: var(--rail); box-shadow: 0 0 0 2px #F2F2F4, 0 10px 24px rgba(0,0,0,.28); }

.side { background: var(--shell); border-radius: 24px; padding: 18px 16px; overflow-y: auto; display: flex; flex-direction: column;
  box-shadow: 0 1px 0 rgba(255,255,255,.55) inset, 0 18px 40px rgba(0,0,0,.12); scrollbar-width: thin; }
.me { display: flex; align-items: center; gap: 12px; padding: 2px 4px 16px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none; overflow: hidden;
  background: var(--rail); color: #F2F2F4; font-weight: 600; font-size: 14px; box-shadow: 0 0 0 2px var(--raise-bd), 0 4px 10px rgba(0,0,0,.25); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar--lg { width: 76px; height: 76px; font-size: 24px; }
.me-text { display: flex; flex-direction: column; min-width: 0; }
.me-name { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-sub { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 12px; }
.side-cap { font-size: 12px; color: var(--muted); margin: 4px 4px 8px; }
.side-cap--sub { margin-top: 14px; }
.side-sep { border: 0; border-top: 1px solid var(--line); margin: 12px 0; }

.msearch { position: relative; margin-bottom: 18px; }
.msearch > .ic { position: absolute; left: 13px; top: 50%; translate: 0 -50%; color: var(--muted); pointer-events: none; }
.inp--search { padding-left: 36px !important; }

.tree { display: flex; flex-direction: column; gap: 4px; }
.tg-head { list-style: none; display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 12px; border-radius: var(--r-ctl);
  border: 1px solid transparent; cursor: pointer; font-size: 15px; user-select: none; }
.tg-head::-webkit-details-marker { display: none; }
.tg-head:hover { background: var(--hover); }
.tg[open] > .tg-head { background: var(--raise); border-color: var(--raise-bd); box-shadow: var(--raise-sh); }
.tg-title { flex: 1; min-width: 0; }
.cnt { display: inline-grid; place-items: center; min-width: 20px; height: 18px; padding: 0 6px; border-radius: 9px; font-size: 11px;
  font-weight: 500; background: rgba(255,255,255,.7); color: var(--ink); }
:root[data-theme="dark"] .cnt { background: rgba(255,255,255,.1); }
.tg-items { list-style: none; margin: 8px 0 10px 18px; padding: 0 0 0 10px; border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 1px; }
.ti { display: block; padding: 6px 8px; border-radius: 8px; text-decoration: none; font-size: 13px; line-height: 1.3; }
.ti:hover { background: var(--hover); }
.ti.is-on { background: var(--sel); font-weight: 500; }
.tree.is-searching .tg-items { margin-top: 4px; }

.smenu { display: flex; flex-direction: column; gap: 4px; }
.sm { display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 12px; border-radius: var(--r-ctl); border: 1px solid transparent;
  text-decoration: none; font-size: 15px; }
.sm span:first-of-type { flex: 1; }
.sm:hover { background: var(--hover); }
.sm.is-on { background: var(--raise); border-color: var(--raise-bd); box-shadow: var(--raise-sh); }
.sm-val { font-size: 12px; color: var(--muted); }
.sm--danger { color: var(--err-fg); }

.main { background: var(--shell); border-radius: 24px; padding: 10px; overflow: hidden;
  box-shadow: 0 1px 0 rgba(255,255,255,.55) inset, 0 18px 40px rgba(0,0,0,.12); outline: none; }
.main-in { height: 100%; overflow-y: auto; background: var(--panel); border-radius: 16px; border: 1px solid var(--panel-bd);
  box-shadow: 0 2px 8px rgba(0,0,0,.07) inset, 0 1px 0 rgba(255,255,255,.4); padding: 28px 36px 40px; scrollbar-width: thin; }
.narrow { display: none; }
@media (max-width: 1279px) {
  .narrow { display: block; position: fixed; left: 50%; bottom: 14px; translate: -50% 0; z-index: 30; padding: 8px 14px; border-radius: 10px;
    background: var(--dark); color: var(--dark-fg); font-size: 13px; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
  body { overflow-x: auto; }
}

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: var(--r-ctl);
  border: 1px solid transparent; font-size: 14px; font-weight: 500; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform .08s, box-shadow .15s, background .15s; }
.btn:active { transform: translateY(1px); }
.btn--dark { background: var(--dark); color: var(--dark-fg); box-shadow: 0 8px 18px rgba(0,0,0,.22); padding: 0 22px; }
.btn--dark:hover { box-shadow: 0 10px 22px rgba(0,0,0,.3); }
.btn--ghost { background: var(--ghost); border-color: var(--ghost-bd); color: var(--ink); }
.btn--ghost:hover { background: var(--raise); }
.btn--danger { background: var(--err); color: #fff; }
.btn--sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.ibtn { width: 32px; height: 32px; display: inline-grid; place-items: center; border-radius: 9px; border: 1px solid var(--ghost-bd);
  background: var(--ghost); cursor: pointer; text-decoration: none; color: var(--ink); }
.ibtn:hover:not(:disabled) { background: var(--raise); }
.ibtn:disabled { opacity: .35; cursor: default; }
.ibtn--danger:hover:not(:disabled) { color: var(--err); border-color: var(--err-bd); }

.inp { width: 100%; height: 42px; padding: 0 14px; border-radius: var(--r-inp); background: var(--inp); border: 1px solid var(--inp-bd);
  box-shadow: var(--inp-sh); outline: none; transition: border-color .15s, box-shadow .15s; }
.inp::placeholder { color: var(--muted); opacity: .85; }
.inp:focus { border-color: var(--ink-2); box-shadow: var(--inp-sh), 0 0 0 3px rgba(0,0,0,.08); }
.inp--sm { height: 34px; padding: 0 10px; font-size: 13px; width: auto; }
.inp[readonly] { opacity: .7; }
select.inp { appearance: none; padding-right: 34px;
  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='%236B6B70' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; }
textarea.ta { height: auto; min-height: 64px; padding: 11px 14px; resize: vertical; line-height: 1.5; }
input[type="date"].inp, input[type="datetime-local"].inp { max-width: 260px; }
.chk { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; }
.switch-ui { width: 40px; height: 24px; border-radius: 12px; background: var(--inp); border: 1px solid var(--inp-bd); box-shadow: var(--inp-sh); position: relative; transition: background .15s; }
.switch-ui::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: translate .15s; }
.switch input:checked + .switch-ui { background: var(--ok); }
.switch input:checked + .switch-ui::after { translate: 16px 0; }
.switch input:focus-visible + .switch-ui { outline: 2px solid var(--ink); outline-offset: 2px; }

.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--dot-none); flex: none; }
.dot--1 { background: var(--warn); } .dot--2 { background: var(--ok); } .dot--red { background: var(--err); } .dot--ink { background: var(--ink); }

.msg { display: flex; align-items: flex-start; gap: 10px; padding: 11px 14px; border-radius: 12px; border: 1px solid; margin-bottom: 16px; font-size: 13.5px; }
.msg .ic { margin-top: 2px; }
.msg--ok { background: var(--ok-bg); border-color: var(--ok-bd); color: var(--ok-fg); }
.msg--err { background: var(--err-bg); border-color: var(--err-bd); color: var(--err-fg); }
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; margin-top: 14px; border-radius: 12px; background: var(--hover); color: var(--ink-2); font-size: 13.5px; }

.pill { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 10px; font-size: 11.5px; font-weight: 500;
  background: rgba(0,0,0,.07); color: var(--ink-2); }
.pill--open { background: rgba(31,122,77,.14); color: var(--ok-fg); }
.pill--warn { background: rgba(176,106,0,.14); color: var(--warn); }
.pill--draft { background: rgba(176,32,32,.1); color: var(--err-fg); }
.ext { display: inline-grid; place-items: center; min-width: 38px; height: 22px; padding: 0 5px; border-radius: 6px; font-size: 10.5px; font-weight: 600;
  color: #fff; background: #3A3A3D; letter-spacing: .02em; }
.ext--pdf { background: #B42318; } .ext--doc, .ext--docx { background: #1F4E99; } .ext--xls, .ext--xlsx { background: #1F7A4D; } .ext--jpg { background: #6B4FA0; }
.lbadge { font-size: 11.5px; font-weight: 500; padding: 2px 7px; border-radius: 8px; background: rgba(0,0,0,.06); color: var(--muted); }
.lbadge--full { color: var(--ok-fg); background: var(--ok-bg); }
.lbadge--part { color: var(--warn); background: rgba(176,106,0,.12); }

/* ---------- editor ---------- */
.ed, .setp { max-width: 1120px; margin: 0 auto; }
.setp { max-width: 860px; }
.setp--wide { max-width: 1120px; }
.ed-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 18px; }
.ed-title { font-size: 20px; font-weight: 500; letter-spacing: -.01em; }
.ed-hint { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.ltabs { display: inline-flex; gap: 2px; padding: 4px; border-radius: 12px; background: rgba(0,0,0,.06); box-shadow: 0 1px 2px rgba(0,0,0,.08) inset; flex: none; }
.ltab { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border: 0; border-radius: 9px; background: transparent;
  font-size: 12.5px; font-weight: 600; cursor: pointer; }
.ltab[aria-selected="true"] { background: var(--rail); color: #F2F2F4; box-shadow: 0 4px 10px rgba(0,0,0,.2); }
.ltab .dot { width: 6px; height: 6px; }

/* only the current language's inputs are visible */
.ed[data-cur-lang="uz"] [data-lang]:not([data-lang="uz"]),
.ed[data-cur-lang="oz"] [data-lang]:not([data-lang="oz"]),
.ed[data-cur-lang="ru"] [data-lang]:not([data-lang="ru"]),
.ed[data-cur-lang="en"] [data-lang]:not([data-lang="en"]) { display: none; }
[data-kind-hidden] { display: none !important; }

.seg { display: flex; align-items: center; gap: 4px; padding: 5px; border-radius: 14px; background: rgba(0,0,0,.06); box-shadow: 0 1px 2px rgba(0,0,0,.08) inset; margin-bottom: 16px; }
.seg-btn { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 10px; text-decoration: none; font-size: 13.5px; }
.seg-btn:hover { background: var(--hover); }
.seg-btn.is-on { background: var(--rail); color: #F2F2F4; box-shadow: 0 4px 10px rgba(0,0,0,.2); }
.seg-btn.is-on .cnt { background: rgba(255,255,255,.18); color: #F2F2F4; }
.seg-stat { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; padding: 0 14px; height: 36px; border-radius: 10px; background: var(--raise); font-size: 13px; }
.seg--inner { margin: 0 0 6px; }

.card { background: var(--card); border: 1px solid var(--card-bd); border-radius: var(--r-card); box-shadow: var(--card-sh); padding: 20px 22px; margin-bottom: 16px; }
.card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.card-head > :first-child { margin-right: auto; }
.card-title { font-size: 17px; font-weight: 500; display: flex; align-items: center; gap: 8px; }
.form .card-title { margin-bottom: 14px; }
.form h2.card-title:not(:first-of-type) { margin-top: 18px; }
.sec-title { font-size: 16px; font-weight: 500; margin: 22px 0 10px; }
.empty { padding: 22px; border: 1px dashed var(--ghost-bd); border-radius: 12px; text-align: center; color: var(--ink-2); font-size: 13.5px; }
.empty--big { display: grid; justify-items: center; gap: 6px; padding: 40px 20px; color: var(--muted); }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 14px; }
.fld { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fld--half { grid-column: span 1; }
.fld--chk { justify-content: flex-end; padding-bottom: 8px; }
.flabel { font-size: 12.5px; color: var(--ink-2); }
.form-actions { display: flex; align-items: center; gap: 10px; margin-top: 18px; }
.dirty { font-size: 12.5px; color: var(--warn); display: inline-flex; align-items: center; gap: 6px; }
.dirty::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--warn); }
.saved-at { font-size: 12.5px; color: var(--muted); }

.upl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; align-items: center; }
.upl-prev { grid-row: span 3; width: 160px; height: 96px; border-radius: 12px; background: var(--inp); border: 1px dashed var(--ghost-bd);
  display: grid; place-items: center; overflow: hidden; color: var(--muted); font-size: 12.5px; }
.upl-prev img { width: 100%; height: 100%; object-fit: cover; }
.upl-file { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; min-height: 30px; font-size: 13.5px; }
.upl-file a { text-decoration: none; font-weight: 500; }
.upl-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.upl-hint { font-size: 12px; color: var(--muted); }
.upl-err { font-size: 12.5px; color: var(--err-fg); }
.atts { gap: 8px; padding-top: 6px; border-top: 1px solid var(--line); margin-top: 16px; }
.atts-head { display: flex; align-items: center; justify-content: space-between; }
.atts-list, .atts-new { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.atts-list li, .atts-new li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--hover); font-size: 13px; }
.atts-list a { text-decoration: none; font-weight: 500; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.atts-new li { background: var(--ok-bg); }

.mdtools { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.mdbtn { width: 30px; height: 28px; display: grid; place-items: center; border-radius: 7px; border: 1px solid var(--ghost-bd); background: var(--ghost); cursor: pointer; }
.mdbtn:hover { background: var(--raise); }
.mdhelp { font-size: 11.5px; color: var(--muted); margin-left: 8px; }

.lsearch { position: relative; }
.lsearch .ic { position: absolute; left: 10px; top: 50%; translate: 0 -50%; color: var(--muted); }
.lsearch .inp { padding-left: 30px; width: 220px; }
.grp { font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin: 16px 0 8px; text-transform: none; }
.grp:first-of-type { margin-top: 0; }
.rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; align-items: center; gap: 14px; padding: 10px 12px; border-radius: 14px; background: rgba(255,255,255,.35);
  border: 1px solid rgba(255,255,255,.6); }
:root[data-theme="dark"] .row { background: rgba(255,255,255,.03); border-color: rgba(255,255,255,.05); }
.row.is-on { box-shadow: 0 0 0 2px var(--ink); }
.row[data-hidden] { display: none; }
.thumb { width: 56px; height: 42px; border-radius: 9px; overflow: hidden; display: grid; place-items: center; flex: none; background: var(--inp); color: var(--muted); }
.thumb--wide { width: 96px; height: 40px; }
.thumb--tag { background: transparent; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.row-main { flex: 1; min-width: 0; }
.row-title { display: block; font-weight: 500; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-title:hover { text-decoration: underline; }
.row-meta { font-size: 12.5px; color: var(--muted); margin-top: 2px; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.row-actions { display: flex; gap: 6px; flex: none; }

.gallery, .ocards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.gal { position: relative; border-radius: 14px; overflow: hidden; background: var(--inp); aspect-ratio: 4 / 3; }
.gal img { width: 100%; height: 100%; object-fit: cover; }
.gal.is-primary { box-shadow: 0 0 0 2px var(--ok); }
.gal-badge { position: absolute; top: 8px; left: 8px; display: inline-flex; gap: 4px; align-items: center; padding: 3px 8px; border-radius: 8px;
  background: var(--ok); color: #fff; font-size: 11.5px; font-weight: 500; }
.gal-actions { position: absolute; inset: auto 8px 8px; display: flex; gap: 6px; justify-content: flex-end; }
.gal-actions .ibtn { background: rgba(255,255,255,.85); color: #1C1C1E; }
.ocard { border-radius: 14px; overflow: hidden; background: rgba(255,255,255,.35); border: 1px solid rgba(255,255,255,.6); display: flex; flex-direction: column; }
:root[data-theme="dark"] .ocard { background: rgba(255,255,255,.03); border-color: rgba(255,255,255,.05); }
.ocard-img { aspect-ratio: 16 / 9; background: var(--inp); display: grid; place-items: center; align-content: center; gap: 4px; color: var(--muted); font-size: 12px; }
.ocard-img img { width: 100%; height: 100%; object-fit: cover; }
.ocard-body { padding: 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.ocard-title { font-weight: 500; font-size: 13.5px; line-height: 1.35; }
.ocard-actions { display: flex; align-items: center; gap: 8px; margin-top: auto; flex-wrap: wrap; }
.preview { border-radius: 14px; overflow: hidden; background: var(--inp); margin-bottom: 16px; }
.preview img { display: block; max-width: 100%; margin: 0 auto; }
.preview iframe { display: block; width: 100%; height: 560px; border: 0; background: #fff; }

/* ---------- overview ---------- */
.ov { max-width: 1320px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.ov-top { display: flex; justify-content: flex-end; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.kpi { background: var(--card); border: 1px solid var(--card-bd); border-radius: var(--r-card); box-shadow: var(--card-sh); padding: 16px 18px; }
.kpi-cap { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-2); }
.kpi-val { font-size: 26px; font-weight: 400; letter-spacing: -.01em; margin: 6px 0 4px; }
.kpi-sub { font-size: 11.5px; }
.kpi-sub--ok { color: var(--ok-fg); } .kpi-sub--warn { color: var(--warn); } .kpi-sub--err { color: var(--err-fg); } .kpi-sub--muted { color: var(--muted); }
.ov-row { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.chart .card-head { align-items: flex-start; }
.chart-tip { font-size: 12.5px; }
.bars { display: grid; grid-template-columns: 44px 1fr; gap: 8px; height: 320px; }
.bars-scale { display: flex; flex-direction: column; justify-content: space-between; font-size: 10.5px; color: var(--muted); text-align: right; padding-bottom: 22px; }
.bars-plot { display: flex; align-items: flex-end; gap: 4px; padding-bottom: 22px; border-bottom: 1px solid var(--line);
  background: linear-gradient(var(--line), var(--line)) 0 50% / 100% 1px no-repeat; }
.bar { position: relative; flex: 1; height: 100%; display: flex; align-items: flex-end; outline: none; }
.bar-fill { width: 100%; height: var(--h); min-height: 2px; border-radius: 3px 3px 0 0; background: var(--bar); transition: opacity .15s; }
.bar:hover .bar-fill, .bar:focus .bar-fill { opacity: .7; }
.bar-x { position: absolute; bottom: -20px; left: 50%; translate: -50% 0; font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.bar:hover::after, .bar:focus::after { content: attr(data-tip); position: absolute; bottom: calc(var(--h) + 8px); left: 50%; translate: -50% 0; z-index: 2;
  padding: 4px 8px; border-radius: 7px; background: var(--dark); color: var(--dark-fg); font-size: 11.5px; white-space: nowrap; pointer-events: none; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.chip { padding: 5px 10px; border-radius: 9px; background: var(--raise); border: 1px solid var(--raise-bd); font-size: 12px; }
.att-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.att-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--raise); border: 1px solid var(--raise-bd);
  text-decoration: none; }
.att-item:hover { box-shadow: var(--raise-sh); }
.att-text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.att-title { font-size: 13.5px; }
.att-sub { font-size: 11.5px; color: var(--muted); }

/* ---------- settings ---------- */
.prof-head { display: flex; align-items: center; gap: 18px; padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.prof-head .inline { margin-top: 8px; }
.prof-name { font-size: 18px; font-weight: 500; }
.choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.choice { display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 16px; border-radius: 14px; border: 1px solid var(--ghost-bd); background: var(--ghost);
  cursor: pointer; font-size: 14px; text-align: left; }
.choice.is-on { background: var(--raise); border-color: var(--ink); box-shadow: var(--raise-sh); }
.swatch { width: 26px; height: 26px; border-radius: 8px; border: 1px solid var(--ghost-bd); }
.swatch--light { background: #D4D4D7; } .swatch--dark { background: #1B1B1E; } .swatch--auto { background: linear-gradient(135deg, #D4D4D7 50%, #1B1B1E 50%); }
.choice-code { font-weight: 600; width: 30px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font-weight: 500; font-size: 12px; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl--dense td { padding: 7px 10px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.pager { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; }

/* ---------- message pages ---------- */
.shell--msg { grid-template-columns: 1fr; min-width: 0; }
.main--msg .msgcard, .main--msg { display: grid; place-items: center; }
.msgcard { max-width: 460px; text-align: center; display: grid; justify-items: center; gap: 10px; padding: 32px; }
.msgcard-ico { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: var(--rail); color: #F2F2F4; }

/* ---------- confirm dialog ---------- */
.dlg { border: 0; border-radius: 18px; padding: 22px; width: min(420px, 92vw); background: var(--shell); color: var(--ink); box-shadow: 0 24px 60px rgba(0,0,0,.35); }
.dlg::backdrop { background: rgba(0,0,0,.35); }
.dlg p { font-size: 14.5px; margin-bottom: 18px; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 10px; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- auth pages (login, invite, logged out) ---------- */
.authcard { width: min(440px, 100%); padding: 30px; display: grid; gap: 14px; }
.auth-head { display: flex; align-items: center; gap: 14px; }
.auth-head .card-title { margin: 0; }
.auth-app { font-size: 12.5px; }
.auth-langs { display: flex; gap: 4px; }
.auth-langs a { padding: 4px 9px; border-radius: 8px; font-size: 12px; font-weight: 500; color: var(--muted); text-decoration: none; }
.auth-langs a:hover { background: var(--hover); color: var(--ink); }
.auth-langs a.is-on { background: var(--sel); color: var(--ink); }
.authcard .form { display: grid; gap: 12px; }
.authcard .form-actions { margin-top: 4px; }
.btn--wide { width: 100%; }
.btn--danger-text { color: var(--err-fg); }

/* ---------- password strength (sample: 4 bars + label + rules) ---------- */
.pwm { display: flex; align-items: center; gap: 10px; }
.pwm-bars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; flex: 1; }
.pwm-bar { height: 4px; border-radius: 2px; background: var(--line); }
.pwm-text { font-size: 12px; color: var(--muted); min-width: 70px; text-align: right; }
[data-score="0"] .pwm-bar[data-bar="0"], [data-score="1"] .pwm-bar[data-bar="0"] { background: var(--err); }
[data-score="2"] .pwm-bar:is([data-bar="0"], [data-bar="1"]) { background: var(--warn); }
[data-score="3"] .pwm-bar:not([data-bar="3"]), [data-score="4"] .pwm-bar { background: var(--ok); }
.pwm-rules { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.pwm-rules li { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 10px; font-size: 12px; background: var(--hover); color: var(--ink-2); }
.pwm-rules li svg { opacity: .35; }
.pwm-rules li[data-ok] { background: var(--ok-bg); color: var(--ok-fg); }
.pwm-rules li[data-ok] svg { opacity: 1; }
.pw-new { display: grid; gap: 12px; margin-top: 14px; max-width: 520px; }

/* ---------- security: passkeys, sessions, toggles ---------- */
.klist { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.krow { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--hover); }
.krow-ico { width: 34px; height: 34px; flex: none; border-radius: 10px; display: grid; place-items: center; background: var(--sel); }
.krow-main { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; flex-wrap: wrap; }
.krow-main b { font-weight: 500; }
.krow-meta { font-size: 12px; color: var(--muted); }
span.krow-main { flex-direction: column; align-items: flex-start; gap: 2px; }
.krow-note { font-size: 12px; }
.kadd { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; }
.kadd .upl-err, .kadd .upl-hint { flex-basis: 100%; }
.trow { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.trow:last-child { border-bottom: 0; }
.trow-text { flex: 1; display: grid; gap: 2px; }
.trow-text b { font-weight: 500; }
.trow-text .muted { font-size: 12.5px; }
button.switch { background: none; border: 0; padding: 0; }
.switch.is-disabled { opacity: .45; cursor: not-allowed; }

/* ---------- users ---------- */
.invite { border: 1px solid var(--ok-bd); }
.invite-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.invite-row .inp { flex: 1; }
.tbl-actions { display: flex; gap: 6px; justify-content: flex-end; white-space: nowrap; }
