/* AVRIO admin panel. Same design language as avrio.uz: Onest, Prussian blue, electric blue accent, calm motion. */
:root {
  --ink: #011E3C; --ink-2: #0C2E49; --muted: #3D586D; --soft: #6B7F90; --line: #DCE2E7; --line-2: #9EABB6;
  --bg: #F3F5F6; --card: #FFFFFF; --accent: #1A7DAA; --accent-h: #166992; --accent-bg: #EFF7FB; --link: #166992;
  --ok: #157F3D; --ok-bg: #E8F5EC; --warn: #9A5B00; --warn-bg: #FFF4E0; --err: #B42318; --err-bg: #FDECEA;
  --r: 12px; --r-lg: 18px; --ease: cubic-bezier(.2,.7,.2,1); --side: 264px;
  --font: 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 400 15px/1.5 var(--font); color: var(--ink-2); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--link); }
button, input, select, textarea { font: inherit; color: inherit; }
img, video { display: block; max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.boot { min-height: 100vh; display: grid; place-items: center; }
.spin { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--accent); animation: spin 800ms linear infinite; display: inline-block; }
.spin--sm { width: 16px; height: 16px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(60% 60% at 80% 10%, rgba(29,145,194,.28), transparent 60%), linear-gradient(165deg, #0C2E49, #011E3C); }
.login__card { width: min(420px, 100%); background: var(--card); border-radius: 24px; padding: 40px 36px 32px; display: grid; gap: 22px; box-shadow: 0 30px 80px rgba(1,30,60,.35); animation: rise 420ms var(--ease) both; }
.login__logo { color: var(--ink); }
.login h1 { margin: 0; font: 500 26px/1.15 var(--font); letter-spacing: -.015em; color: var(--ink); }
.login p { margin: 0; color: var(--muted); }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }

/* ---------- shell ---------- */
.shell { min-height: 100vh; display: grid; grid-template-columns: var(--side) 1fr; }
.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--ink); color: #CED5DB; display: flex; flex-direction: column; gap: 6px; padding: 22px 14px 18px; }
.side__logo { color: #fff; padding: 4px 12px 18px; display: flex; align-items: center; gap: 10px; text-decoration: none; }
.side__logo small { font: 500 11px/1 var(--font); letter-spacing: .12em; text-transform: uppercase; color: #77BDDA; padding: 5px 8px; border: 1px solid rgba(119,189,218,.35); border-radius: 999px; }
.side__group { font: 500 11px/1 var(--font); letter-spacing: .12em; text-transform: uppercase; color: #6B8499; padding: 16px 12px 6px; }
.side a.nav { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: #CED5DB; text-decoration: none; font-weight: 500; transition: background-color 160ms var(--ease), color 160ms var(--ease); }
.side a.nav svg { flex: none; width: 18px; height: 18px; opacity: .8; }
.side a.nav:hover { background: rgba(255,255,255,.06); color: #fff; }
.side a.nav[aria-current="page"] { background: rgba(29,145,194,.22); color: #fff; }
.side a.nav[aria-current="page"] svg { opacity: 1; color: #77BDDA; }
.badge { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: #1D91C2; color: #fff; font: 600 12px/22px var(--font); text-align: center; }
.side__user { margin-top: auto; padding: 14px 12px 4px; border-top: 1px solid rgba(255,255,255,.08); display: grid; gap: 10px; }
.side__user b { color: #fff; font-weight: 500; display: block; }
.side__user span { font-size: 13px; color: #8FA3B4; }
.side__links { display: flex; gap: 14px; font-size: 13px; }
.side__links a, .side__links button { color: #CED5DB; background: none; border: 0; padding: 0; cursor: pointer; text-decoration: none; }
.side__links a:hover, .side__links button:hover { color: #fff; text-decoration: underline; }

.main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; padding: 14px clamp(16px, 3vw, 36px); background: rgba(243,245,246,.86); backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px); border-bottom: 1px solid var(--line); }
.top__title { font: 500 18px/1.2 var(--font); color: var(--ink); margin: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top__right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.burger { display: none; }
.view { padding: clamp(18px, 3vw, 36px); display: grid; gap: 22px; align-content: start; animation: fade 260ms var(--ease) both; max-width: 1280px; width: 100%; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } }

.pub { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border-radius: 999px; font: 500 13px/1 var(--font); background: var(--ok-bg); color: var(--ok); border: 0; cursor: default; white-space: nowrap; }
.pub::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.pub--warn { background: var(--warn-bg); color: var(--warn); cursor: pointer; }
.pub--err { background: var(--err-bg); color: var(--err); cursor: pointer; }
.pub--busy::before { animation: pulse 900ms ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .3; } }

/* ---------- building blocks ---------- */
.card { background: var(--card); border-radius: var(--r-lg); border: 1px solid var(--line); padding: clamp(18px, 2.2vw, 28px); display: grid; gap: 18px; min-width: 0; }
.card--flat { padding: 0; overflow: hidden; }
.card__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.card h2, .h2 { margin: 0; font: 500 19px/1.25 var(--font); color: var(--ink); letter-spacing: -.005em; }
.card h3 { margin: 0; font: 500 16px/1.3 var(--font); color: var(--ink); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.lead { margin: 0; color: var(--muted); max-width: 70ch; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 18px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 16px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.row--end { justify-content: flex-end; }
.spacer { flex: 1; }
.stack { display: grid; gap: 14px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 18px; border-radius: 999px; border: 1px solid transparent; font: 500 14px/1 var(--font); cursor: pointer; text-decoration: none; white-space: nowrap; transition: background-color 160ms var(--ease), border-color 160ms var(--ease), color 160ms var(--ease); }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-h); }
.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { background: var(--ink-2); }
.btn--outline { background: var(--card); color: var(--ink); border-color: var(--line-2); }
.btn--outline:hover { border-color: var(--ink); }
.btn--ghost { background: transparent; color: var(--link); padding: 0 10px; }
.btn--ghost:hover { background: var(--accent-bg); }
.btn--danger { background: transparent; color: var(--err); border-color: #F1B8B2; }
.btn--danger:hover { background: var(--err-bg); border-color: var(--err); }
.btn--sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.ibtn { width: 32px; height: 32px; display: inline-grid; place-items: center; border-radius: 8px; border: 1px solid var(--line); background: var(--card); color: var(--muted); cursor: pointer; padding: 0; transition: border-color 160ms var(--ease), color 160ms var(--ease), background-color 160ms var(--ease); }
.ibtn svg { width: 16px; height: 16px; }
.ibtn:hover { border-color: var(--ink); color: var(--ink); }
.ibtn--danger:hover { border-color: var(--err); color: var(--err); background: var(--err-bg); }
.ibtn[disabled] { opacity: .35; pointer-events: none; }

.field { display: grid; gap: 7px; min-width: 0; }
.field > label, .lbl { font: 500 13px/1.3 var(--font); color: var(--ink); }
.field .hint { font-size: 12.5px; color: var(--soft); line-height: 1.45; }
.in, .sel, .ta { width: 100%; min-height: 42px; padding: 10px 13px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--card); color: var(--ink); transition: border-color 160ms var(--ease), box-shadow 160ms var(--ease); }
.in:hover, .sel:hover, .ta:hover { border-color: var(--muted); }
.in:focus, .sel:focus, .ta:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(26,125,170,.16); }
.in::placeholder, .ta::placeholder { color: #8C9CAA; }
.ta { min-height: 96px; resize: vertical; line-height: 1.55; }
.ta--tall { min-height: 340px; font-size: 15px; }
.sel { appearance: none; padding-right: 36px; background: var(--card) 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='%233D586D' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 14px center; cursor: pointer; }
.in--sm, .sel--sm { min-height: 34px; padding: 6px 10px; font-size: 14px; }
.sel--sm { padding-right: 30px; background-position: right 10px center; }
.counter { font-size: 12px; color: var(--soft); justify-self: end; margin-top: -4px; }
.tog { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; font-weight: 500; color: var(--ink); }
.tog input { position: absolute; opacity: 0; pointer-events: none; }
.tog i { position: relative; width: 38px; height: 22px; border-radius: 999px; background: var(--line-2); transition: background-color 160ms var(--ease); flex: none; }
.tog i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform 200ms var(--ease); box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.tog input:checked + i { background: var(--accent); }
.tog input:checked + i::after { transform: translateX(16px); }
.tog input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 2px; }

.tag { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 999px; font: 500 12px/1 var(--font); background: var(--bg); color: var(--muted); white-space: nowrap; }
.tag--blue { background: var(--accent-bg); color: var(--accent-h); }
.tag--ok { background: var(--ok-bg); color: var(--ok); }
.tag--warn { background: var(--warn-bg); color: var(--warn); }
.tag--err { background: var(--err-bg); color: var(--err); }
.tag--dark { background: var(--ink); color: #fff; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px; min-height: 42px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--card); align-items: center; }
.chips:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(26,125,170,.16); }
.chips .tag { background: var(--accent-bg); color: var(--accent-h); height: 28px; padding: 0 6px 0 10px; }
.chips .tag button { border: 0; background: none; cursor: pointer; color: inherit; padding: 2px; display: grid; place-items: center; border-radius: 50%; }
.chips .tag button:hover { background: rgba(22,105,146,.15); }
.chips input { flex: 1; min-width: 120px; border: 0; outline: 0; padding: 4px 6px; background: transparent; }

.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r); background: var(--accent-bg); color: var(--ink-2); font-size: 14px; }
.alert svg { flex: none; width: 18px; height: 18px; margin-top: 2px; }
.alert--warn { background: var(--warn-bg); color: #6B3F00; }
.alert--err { background: var(--err-bg); color: #7A1A12; }
.alert--ok { background: var(--ok-bg); color: #0E5A2B; }
.alert b { font-weight: 600; }

/* tables */
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font: 500 12px/1 var(--font); letter-spacing: .06em; text-transform: uppercase; color: var(--soft); padding: 14px 16px; border-bottom: 1px solid var(--line); background: #FAFBFC; white-space: nowrap; }
.tbl td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background-color 120ms var(--ease); }
.tbl tbody tr:hover { background: #F8FAFB; }
.tbl tr.is-click { cursor: pointer; }
.tbl .t-name { font-weight: 500; color: var(--ink); }
.tbl .t-sub { font-size: 13px; color: var(--soft); }
.tbl .t-act { white-space: nowrap; text-align: right; }
.tbl .t-act > * + * { margin-left: 6px; }
.tblwrap { overflow-x: auto; }
.thumb { width: 56px; height: 42px; border-radius: 8px; background: var(--bg) center / cover no-repeat; flex: none; border: 1px solid var(--line); }
.thumb--sq { width: 44px; height: 44px; }
.empty { padding: 48px 20px; text-align: center; color: var(--muted); display: grid; gap: 10px; justify-items: center; }
.empty svg { width: 36px; height: 36px; color: var(--line-2); }

/* toolbar above lists */
.bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.bar .in, .bar .sel { width: auto; min-width: 180px; }
.search { position: relative; }
.search svg { position: absolute; left: 12px; top: 50%; translate: 0 -50%; width: 16px; height: 16px; color: var(--soft); pointer-events: none; }
.search .in { padding-left: 36px; min-width: 240px; }

/* stats */
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px 22px; display: grid; gap: 6px; text-decoration: none; color: inherit; transition: border-color 160ms var(--ease), transform 200ms var(--ease); }
a.stat:hover { border-color: var(--line-2); transform: translateY(-2px); }
.stat__n { font: 500 34px/1 var(--font); letter-spacing: -.02em; color: var(--ink); }
.stat__l { font-size: 13px; color: var(--muted); }
.stat--accent { background: linear-gradient(120deg, #0C2E49, #1D91C2); border-color: transparent; }
.stat--accent .stat__n, .stat--accent .stat__l { color: #fff; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 120px; padding-top: 10px; }
.bars div { flex: 1; display: grid; gap: 6px; align-content: end; justify-items: center; height: 100%; }
.bars i { display: block; width: 100%; max-width: 28px; border-radius: 6px 6px 2px 2px; background: #BFE0EE; min-height: 3px; transition: background-color 160ms var(--ease); }
.bars div:hover i { background: var(--accent); }
.bars span { font-size: 10.5px; color: var(--soft); }
.feed { display: grid; }
.feed > div { display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.feed > div:first-child { border-top: 0; }
.feed time { margin-left: auto; color: var(--soft); font-size: 12.5px; white-space: nowrap; }

/* media */
.mbox { position: relative; border: 1px dashed var(--line-2); border-radius: var(--r); background: var(--bg); overflow: hidden; display: grid; min-height: 150px; }
.mbox--wide { aspect-ratio: 16 / 9; }
.mbox--card { aspect-ratio: 4 / 3; }
.mbox img, .mbox video { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.mbox__empty { display: grid; place-items: center; align-content: center; gap: 8px; padding: 18px; text-align: center; color: var(--muted); font-size: 13px; }
.mbox__empty svg { width: 28px; height: 28px; color: var(--line-2); }
.mbox__acts { position: absolute; left: 10px; right: 10px; bottom: 10px; display: flex; flex-wrap: wrap; gap: 6px; z-index: 2; }
.mbox.has .mbox__acts { opacity: 0; transform: translateY(4px); transition: opacity 160ms var(--ease), transform 160ms var(--ease); }
.mbox.has:hover .mbox__acts, .mbox.has:focus-within .mbox__acts { opacity: 1; transform: none; }
.mbox.has { border-style: solid; border-color: var(--line); }
.mbox.has::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(1,30,60,.55)); opacity: 0; transition: opacity 160ms var(--ease); pointer-events: none; }
.mbox.has:hover::after, .mbox.has:focus-within::after { opacity: 1; }
.mbox__prog { position: absolute; inset: 0; z-index: 3; background: rgba(1,30,60,.72); color: #fff; display: grid; place-items: center; align-content: center; gap: 10px; padding: 16px; text-align: center; font-size: 13px; }
.mbox__prog .pb { width: min(220px, 80%); }
.pb { height: 4px; border-radius: 4px; background: rgba(255,255,255,.25); overflow: hidden; }
.pb i { display: block; height: 100%; background: #77BDDA; width: 0; transition: width 200ms linear; }
.mlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.mitem { position: relative; aspect-ratio: 1; border-radius: var(--r); overflow: hidden; background: var(--bg) center / cover no-repeat; border: 1px solid var(--line); }
.mitem__n { position: absolute; left: 8px; top: 8px; }
.mitem__acts { position: absolute; right: 6px; bottom: 6px; left: 6px; display: flex; gap: 4px; justify-content: flex-end; opacity: 0; transition: opacity 160ms var(--ease); }
.mitem:hover .mitem__acts, .mitem:focus-within .mitem__acts { opacity: 1; }
.madd { aspect-ratio: 1; border-radius: var(--r); border: 1px dashed var(--line-2); background: var(--card); display: grid; place-items: center; align-content: center; gap: 6px; color: var(--muted); font-size: 13px; cursor: pointer; padding: 10px; text-align: center; transition: border-color 160ms var(--ease), color 160ms var(--ease); }
.madd:hover { border-color: var(--accent); color: var(--accent); }
.madd svg { width: 22px; height: 22px; }

.lib { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.lib__it { position: relative; display: grid; gap: 8px; text-align: left; padding: 0; border: 0; background: none; cursor: pointer; color: inherit; min-width: 0; }
.lib__pic { position: relative; aspect-ratio: 4 / 3; border-radius: var(--r); overflow: hidden; background: var(--bg) center / cover no-repeat; border: 1px solid var(--line); transition: box-shadow 160ms var(--ease); }
.lib__it:hover .lib__pic, .lib__it:focus-visible .lib__pic { box-shadow: 0 0 0 3px var(--accent); }
.lib__pic .tag { position: absolute; left: 8px; top: 8px; }
.lib__name { font-size: 13px; font-weight: 500; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lib__meta { font-size: 12px; color: var(--soft); margin-top: -6px; }
.drop { border: 1.5px dashed var(--line-2); border-radius: var(--r-lg); padding: 22px; display: grid; justify-items: center; gap: 8px; text-align: center; color: var(--muted); transition: border-color 160ms var(--ease), background-color 160ms var(--ease); }
.drop.is-over { border-color: var(--accent); background: var(--accent-bg); }

/* repeatable blocks (slides, spec groups, features) */
.blk { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--card); padding: 18px; display: grid; gap: 16px; }
.blk__head { display: flex; align-items: center; gap: 10px; }
.blk__head .h { font: 500 15px/1.2 var(--font); color: var(--ink); }
.blk__head .acts { margin-left: auto; display: flex; gap: 6px; }
.slide { display: grid; grid-template-columns: minmax(220px, 340px) 1fr; gap: 20px; }
.specrow { display: grid; grid-template-columns: 1fr 1.4fr auto; gap: 8px; align-items: center; }
details.more { border-top: 1px solid var(--line); padding-top: 12px; }
details.more summary { cursor: pointer; font-weight: 500; color: var(--link); list-style: none; display: flex; align-items: center; gap: 6px; }
details.more summary::-webkit-details-marker { display: none; }
details.more summary::before { content: '+'; display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; border: 1px solid currentColor; font-size: 13px; line-height: 1; }
details.more[open] summary::before { content: '−'; }
details.more > div { padding-top: 14px; display: grid; gap: 14px; }

/* editor page */
.ed { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; align-items: start; }
.ed__side { position: sticky; top: 86px; display: grid; gap: 16px; }
.savebar { position: sticky; bottom: 0; z-index: 15; margin: 0 calc(-1 * clamp(18px, 3vw, 36px)) calc(-1 * clamp(18px, 3vw, 36px)); padding: 14px clamp(18px, 3vw, 36px); background: rgba(255,255,255,.94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.savebar__state { font-size: 13px; color: var(--soft); display: inline-flex; align-items: center; gap: 8px; }
.savebar__state.is-dirty { color: var(--warn); }
.savebar__state.is-dirty::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.crumb { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--soft); }
.crumb a { color: var(--link); text-decoration: none; }
.crumb a:hover { text-decoration: underline; }

.rt-tools { display: flex; flex-wrap: wrap; gap: 6px; }
.rt-prev { border: 1px solid var(--line); border-radius: var(--r); padding: 22px; display: grid; gap: 16px; font-size: 16px; line-height: 1.65; color: var(--ink-2); max-height: 520px; overflow: auto; background: #fff; }
.rt-prev h2 { margin: 6px 0 0; font: 500 22px/1.2 var(--font); color: var(--ink); }
.rt-prev p, .rt-prev ul { margin: 0; }
.rt-prev img { border-radius: 12px; }

.lead-d { display: grid; gap: 0; }
.lead-d > div { display: grid; grid-template-columns: 170px 1fr; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.lead-d > div:first-child { border-top: 0; }
.lead-d dt { color: var(--soft); font-size: 14px; }
.lead-d dd { margin: 0; color: var(--ink); white-space: pre-wrap; word-break: break-word; }
.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: none; height: 32px; padding: 0 14px; border-radius: 999px; cursor: pointer; font-weight: 500; font-size: 13px; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(1,30,60,.12); }
.st-new { color: var(--accent-h); } .st-progress { color: var(--warn); } .st-done { color: var(--ok); } .st-spam { color: var(--soft); }
.pager { display: flex; gap: 8px; align-items: center; justify-content: flex-end; padding: 14px 16px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }

/* dialogs and toasts */
.dlg { border: 0; padding: 0; border-radius: 20px; width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 48px); color: var(--ink-2); box-shadow: 0 30px 80px rgba(1,30,60,.35); }
.dlg--wide { width: min(1040px, calc(100vw - 32px)); }
.dlg::backdrop { background: rgba(1,30,60,.5); backdrop-filter: blur(2px); }
.dlg[open] { animation: rise 240ms var(--ease) both; }
.dlg__in { display: grid; gap: 18px; padding: 26px; }
.dlg__head { display: flex; align-items: center; gap: 12px; }
.dlg__head h2 { margin: 0; font: 500 19px/1.25 var(--font); color: var(--ink); }
.dlg__head .ibtn { margin-left: auto; }
.dlg__body { max-height: calc(100vh - 230px); overflow: auto; display: grid; gap: 16px; padding: 2px; }
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 1000; display: grid; gap: 10px; justify-items: end; pointer-events: none; }
.toast { pointer-events: auto; max-width: min(420px, calc(100vw - 40px)); display: flex; gap: 10px; align-items: flex-start; padding: 13px 16px; border-radius: 14px; background: var(--ink); color: #fff; font-size: 14px; box-shadow: 0 12px 32px rgba(1,30,60,.3); animation: rise 260ms var(--ease) both; }
.toast svg { flex: none; width: 18px; height: 18px; margin-top: 1px; }
.toast--ok svg { color: #6FD39A; } .toast--err { background: #7A1A12; } .toast--warn { background: #6B3F00; }
.toast.out { opacity: 0; transform: translateY(6px); transition: opacity 200ms var(--ease), transform 200ms var(--ease); }

@media (max-width: 1100px) { .ed { grid-template-columns: 1fr; } .ed__side { position: static; } }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 50; left: 0; top: 0; bottom: 0; width: min(300px, 86vw); transform: translateX(-102%); transition: transform 260ms var(--ease); box-shadow: 0 0 60px rgba(0,0,0,.3); }
  .side.is-open { transform: none; }
  .scrim { position: fixed; inset: 0; z-index: 40; background: rgba(1,30,60,.45); }
  .burger { display: inline-grid; }
  .slide { grid-template-columns: 1fr; }
  .lead-d > div { grid-template-columns: 1fr; gap: 4px; }
  .top .btn span { display: none; }
  .hide-m { display: none; }
}
@media (max-width: 600px) { .specrow { grid-template-columns: 1fr auto; } .specrow > :nth-child(2) { grid-column: 1; } .bar .in, .bar .sel, .search .in { min-width: 0; width: 100%; } .bar > * { flex: 1 1 100%; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 1ms !important; transition-duration: 1ms !important; } }
