/* NOTARIS — интеллектуальная система нотариальной конторы. Демо. Дизайн по мотивам платформы ТАС. */
:root {
  --bg: #F3F5F9; --bg2: #EAEEF5; --panel: #FFFFFF; --panel2: #F8FAFD;
  --line: #E4E8F0; --line2: #CBD3E1;
  --ink: #1B2232; --ink2: #4E5A6E; --ink3: #8A95A8;
  --accent: #4F7BE6; --accent2: #3862C8; --accent-soft: #EAF0FD;
  --mint: #2FB38A; --mint-soft: #E6F6F0;
  --amber: #E8A33D; --amber-soft: #FDF3E2;
  --rose: #E06C6C; --rose-soft: #FBE9E9;
  --violet: #8A6FE0; --violet-soft: #EFEAFB;
  --shadow: 0 1px 2px rgba(20,30,60,.04), 0 8px 24px rgba(20,30,60,.06);
  --shadow2: 0 2px 6px rgba(20,30,60,.08), 0 16px 40px rgba(20,30,60,.10);
  --rail: 248px; --rail-min: 72px; --top: 60px; --r: 14px;
  --head: 'Manrope', system-ui, sans-serif; --body: 'Manrope', system-ui, sans-serif; --mono: 'JetBrains Mono', ui-monospace, monospace;
}
:root[data-theme="dark"] {
  --bg: #0E1117; --bg2: #141924; --panel: #171C27; --panel2: #1D2330;
  --line: rgba(255,255,255,.08); --line2: rgba(255,255,255,.18);
  --ink: #EEF1F6; --ink2: #AEB7C8; --ink3: #6F7A90;
  --accent: #6D93F0; --accent2: #86A6F5; --accent-soft: rgba(109,147,240,.14);
  --mint: #45CF9F; --mint-soft: rgba(69,207,159,.14); --amber: #F2B33D; --amber-soft: rgba(242,179,61,.14);
  --rose: #F07070; --rose-soft: rgba(240,112,112,.14); --violet: #A08BF0; --violet-soft: rgba(160,139,240,.14);
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35); --shadow2: 0 2px 6px rgba(0,0,0,.4), 0 16px 40px rgba(0,0,0,.5);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--ink); font: 14px/1.5 var(--body); -webkit-font-smoothing: antialiased; min-height: 100vh; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
::selection { background: rgba(79,123,230,.25); }
svg.i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

/* ---------- каркас ---------- */
.shell { display: grid; grid-template-columns: var(--rail) 1fr; min-height: 100vh; transition: grid-template-columns .22s ease; }
.shell.min { grid-template-columns: var(--rail-min) 1fr; }
.rail { position: sticky; top: 0; height: 100vh; background: var(--panel); display: flex; flex-direction: column; padding: 14px 12px; z-index: 20; overflow: hidden; }
.brand { display: flex; align-items: center; gap: 10px; padding: 6px 6px 16px; border-bottom: 1px solid var(--line); min-height: 60px; }
.brand .logo { width: 38px; height: 38px; flex-shrink: 0; }
.brand .t { font: 800 15px/1.1 var(--head); letter-spacing: .04em; white-space: nowrap; }
.brand .s { font: 600 9.5px/1.2 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--ink3); margin-top: 3px; white-space: nowrap; }
.min .brand .t, .min .brand .s, .min .nav a span, .min .nav .grp, .min .rail .foot, .min .nav .badge, .min .rail .me > span:last-child { display: none; }
.min .brand { justify-content: center; padding-left: 0; padding-right: 0; }
.min .nav a { justify-content: center; padding: 10px 0; }
.nav { list-style: none; margin-top: 10px; display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; overflow-x: hidden; scrollbar-width: none; }
.nav .grp { font: 700 10px/1 var(--body); letter-spacing: .16em; text-transform: uppercase; color: var(--ink3); padding: 14px 10px 6px; white-space: nowrap; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 10px; color: var(--ink2); font-weight: 600; font-size: 13.5px; white-space: nowrap; transition: background .15s, color .15s; position: relative; }
.nav a:hover { background: var(--bg2); color: var(--ink); }
.nav a.on { background: var(--accent-soft); color: var(--accent2); }
.nav a .badge { margin-left: auto; font: 700 10.5px/1 var(--mono); background: var(--bg2); color: var(--ink3); padding: 4px 7px; border-radius: 20px; }
.nav a.on .badge { background: rgba(79,123,230,.18); color: var(--accent2); }
.nav a .badge.r { background: var(--rose-soft); color: var(--rose); }
.rail .me { display: flex; align-items: center; gap: 10px; padding: 10px 6px; border-top: 1px solid var(--line); }
.rail .me b { display: block; font-size: 13px; } .rail .me small { color: var(--ink3); font-size: 11px; }
.rail .foot { padding-top: 10px; font-size: 11px; color: var(--ink3); line-height: 1.5; white-space: nowrap; }
main { min-width: 0; display: flex; flex-direction: column; background: var(--panel); }
.content { flex: 1; background: var(--bg); border-top-left-radius: 22px; display: flex; flex-direction: column; min-height: calc(100vh - var(--top)); }
.topbar { position: sticky; top: 0; z-index: 15; height: var(--top); background: var(--panel); display: flex; align-items: center; gap: 12px; padding: 0 22px 0 14px; }
.topbar .ic { width: 36px; height: 36px; border-radius: 10px; border: 0; background: transparent; color: var(--ink2); display: grid; place-items: center; position: relative; cursor: pointer; transition: color .15s ease, filter .15s ease, transform .15s ease; }
.topbar .ic svg { width: 20px; height: 20px; }
.topbar .ic:hover { color: var(--accent2); filter: drop-shadow(0 0 5px rgba(79,123,230,.85)) drop-shadow(0 0 12px rgba(79,123,230,.45)); transform: translateY(-1px); }
.topbar .ic .dot { position: absolute; top: 7px; right: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--rose); border: 2px solid var(--panel); }
.topbar .crumbs { font: 600 13px/1 var(--body); color: var(--ink3); display: flex; align-items: center; gap: 8px; }
.topbar .crumbs b { color: var(--ink); font-weight: 700; }
.topbar .search { margin-left: auto; display: flex; align-items: center; gap: 8px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; height: 36px; width: 320px; color: var(--ink3); }
.topbar .search input { border: 0; background: transparent; outline: 0; width: 100%; color: var(--ink); }
.topbar .search kbd { font: 600 10px/1 var(--mono); border: 1px solid var(--line2); border-radius: 5px; padding: 3px 5px; color: var(--ink3); }
.ava { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font: 700 12px/1 var(--head); color: #fff; background: var(--accent); flex-shrink: 0; }
.ava.m { background: var(--mint); } .ava.a { background: var(--amber); } .ava.v { background: var(--violet); } .ava.r { background: var(--rose); }
.page { padding: 22px 24px 48px; width: 100%; animation: pagein .28s cubic-bezier(.2,.8,.2,1) both; }
@keyframes pagein { from { opacity: 0; transform: translateY(8px); } }

/* ---------- типографика ---------- */
.ph { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.ph h1 { font: 700 24px/1.15 var(--head); letter-spacing: -.01em; }
.ph .sub { color: var(--ink3); font-size: 13px; margin-top: 4px; }
.ph .acts { display: flex; gap: 8px; flex-wrap: wrap; }
h2.sec { font: 700 15px/1.2 var(--head); margin-bottom: 12px; display: flex; align-items: center; gap: 10px; }
h2.sec .cnt { font: 600 11px/1 var(--mono); color: var(--ink3); background: var(--bg2); padding: 4px 7px; border-radius: 20px; }
.eyebrow { font: 700 10.5px/1 var(--body); letter-spacing: .16em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.muted { color: var(--ink3); } .mono { font-family: var(--mono); font-size: .93em; } .num { font-variant-numeric: tabular-nums; }
.row { display: flex; align-items: center; gap: 8px; }

/* ---------- кнопки / поля ---------- */
.btn { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line2); background: var(--panel); color: var(--ink); font-weight: 700; font-size: 13px; transition: all .15s; white-space: nowrap; }
.btn:hover { background: var(--bg2); border-color: var(--ink3); }
.btn.p { background: var(--accent); border-color: var(--accent); color: #fff; } .btn.p:hover { background: var(--accent2); border-color: var(--accent2); }
.btn.m { background: var(--mint); border-color: var(--mint); color: #fff; }
.btn.g { background: transparent; border-color: transparent; color: var(--ink2); } .btn.g:hover { background: var(--bg2); color: var(--ink); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 12px; border-radius: 8px; }
.btn.xs { height: 26px; padding: 0 8px; font-size: 11.5px; border-radius: 7px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.busy svg { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.inp, select.inp, textarea.inp { height: 36px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line2); background: var(--panel); color: var(--ink); outline: 0; width: 100%; transition: border-color .15s, box-shadow .15s; }
.inp:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79,123,230,.15); }
textarea.inp { height: auto; padding: 10px 12px; min-height: 80px; resize: vertical; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-size: 11.5px; font-weight: 700; color: var(--ink3); letter-spacing: .04em; text-transform: uppercase; }
.seg { display: inline-flex; background: var(--bg2); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { height: 30px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; color: var(--ink2); font-weight: 700; font-size: 12.5px; transition: all .15s; }
.seg button.on { background: var(--panel); color: var(--ink); box-shadow: var(--shadow); }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; } .toolbar .sp { flex: 1; }
.tog { position: relative; width: 38px; height: 22px; border-radius: 20px; background: var(--line2); border: 0; transition: background .2s; flex-shrink: 0; }
.tog::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.tog.on { background: var(--accent); } .tog.on::after { transform: translateX(16px); }
.tog:disabled { opacity: .55; cursor: not-allowed; }

/* ---------- карточки ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.card .hd { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.card .hd h3 { font: 700 14px/1.2 var(--head); }
.card .bd { padding: 16px 18px; }
.card.go { cursor: pointer; transition: transform .15s, box-shadow .15s; } .card.go:hover { transform: translateY(-2px); box-shadow: var(--shadow2); }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0,1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0,1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0,1fr)); } .g5 { grid-template-columns: repeat(5, minmax(0,1fr)); }
.g-2-1 { grid-template-columns: 2fr 1fr; } .g-1-2 { grid-template-columns: 1fr 2fr; } .g-3-2 { grid-template-columns: 3fr 2fr; }
.kpi { padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; position: relative; overflow: hidden; }
.kpi .l { font-size: 11.5px; font-weight: 700; color: var(--ink3); letter-spacing: .06em; text-transform: uppercase; }
.kpi .v { font: 700 26px/1.1 var(--head); letter-spacing: -.02em; } .kpi .v small { font-size: 14px; color: var(--ink3); font-weight: 600; margin-left: 4px; }
.kpi .d { font-size: 12px; color: var(--ink3); } .kpi .d b { color: var(--mint); font-weight: 700; } .kpi .d b.neg { color: var(--rose); }
.kpi .ico { position: absolute; right: 14px; top: 14px; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: var(--accent); background: var(--accent-soft); }
.kpi .ico.m { color: var(--mint); background: var(--mint-soft); } .kpi .ico.a { color: var(--amber); background: var(--amber-soft); } .kpi .ico.v { color: var(--violet); background: var(--violet-soft); } .kpi .ico.r { color: var(--rose); background: var(--rose-soft); }
.chip { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 20px; font-size: 11px; font-weight: 700; background: var(--bg2); color: var(--ink2); white-space: nowrap; }
.chip.b { background: var(--accent-soft); color: var(--accent2); } .chip.m { background: var(--mint-soft); color: var(--mint); } .chip.a { background: var(--amber-soft); color: #B87A1E; } .chip.r { background: var(--rose-soft); color: var(--rose); } .chip.v { background: var(--violet-soft); color: var(--violet); }
.chip .dt { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.note { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-radius: 10px; font-size: 12.5px; color: var(--ink2); background: var(--bg2); border: 1px dashed var(--line2); }
.note.warn { background: var(--amber-soft); border-color: rgba(232,163,61,.4); } .note.ok { background: var(--mint-soft); border-color: rgba(47,179,138,.4); }
.note svg { margin-top: 2px; }

/* ---------- таблицы ---------- */
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink3); padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--panel2); position: sticky; top: 0; white-space: nowrap; }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr.go:hover td { background: var(--panel2); cursor: pointer; }
.tbl td.r, .tbl th.r { text-align: right; } .tbl .t { font-weight: 700; color: var(--ink); } .tbl .s { color: var(--ink3); font-size: 13px; }
.tscroll { overflow: auto; border-radius: var(--r); }
.stages { display: flex; gap: 4px; overflow-x: auto; padding-bottom: 2px; }
.stages .st { flex: 1; min-width: 120px; height: 36px; display: flex; align-items: center; justify-content: center; padding: 0 16px 0 20px; font-size: 12px; font-weight: 700; color: var(--ink3); background: var(--bg2); clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 0 100%, 12px 50%); white-space: nowrap; transition: all .15s; }
.stages .st:first-child { clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 0 100%); border-radius: 8px 0 0 8px; }
.stages .st.done { background: var(--accent-soft); color: var(--accent2); } .stages .st.cur { background: var(--accent); color: #fff; } .stages .st.won { background: var(--mint); color: #fff; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs button { height: 40px; padding: 0 14px; border: 0; background: transparent; color: var(--ink3); font-weight: 700; font-size: 13px; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; transition: color .15s; }
.tabs button.on { color: var(--accent2); border-color: var(--accent); }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 8px 14px; font-size: 13px; } .kv .k { color: var(--ink3); font-weight: 600; } .kv .v { color: var(--ink); }
.tl { display: flex; flex-direction: column; }
.tl .e { display: grid; grid-template-columns: 26px 1fr; gap: 10px; padding: 8px 0; position: relative; }
.tl .e::before { content: ""; position: absolute; left: 12px; top: 28px; bottom: -8px; width: 1px; background: var(--line); } .tl .e:last-child::before { display: none; }
.tl .e .ic { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent2); }
.tl .e .ic.m { background: var(--mint-soft); color: var(--mint); } .tl .e .ic.a { background: var(--amber-soft); color: var(--amber); } .tl .e .ic.v { background: var(--violet-soft); color: var(--violet); } .tl .e .ic.r { background: var(--rose-soft); color: var(--rose); }
.tl .e .tx { font-size: 13px; } .tl .e .tx b { font-weight: 700; } .tl .e .dt { font-size: 11px; color: var(--ink3); font-family: var(--mono); }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 140px; }
.bars .b { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.bars .b i { display: block; width: 100%; border-radius: 6px 6px 3px 3px; background: var(--accent); min-height: 3px; transition: height .6s cubic-bezier(.2,.8,.2,1); position: relative; height: 0; }
.bars .b i.m { background: var(--mint); }
.bars .b i:hover::after { content: attr(data-v); position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); margin-bottom: 4px; font: 600 10.5px/1 var(--mono); background: var(--ink); color: var(--panel); padding: 4px 6px; border-radius: 6px; white-space: nowrap; }
.bars .b span { font-size: 10.5px; color: var(--ink3); font-family: var(--mono); }
.hbar { display: grid; grid-template-columns: 160px 1fr 70px; gap: 10px; align-items: center; font-size: 12.5px; padding: 5px 0; }
.hbar .n { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink2); font-weight: 600; }
.hbar .tr { height: 10px; background: var(--bg2); border-radius: 5px; overflow: hidden; } .hbar .tr i { display: block; height: 100%; border-radius: 5px; background: var(--accent); width: 0; transition: width .7s cubic-bezier(.2,.8,.2,1); }
.hbar .tr i.m { background: var(--mint); } .hbar .tr i.a { background: var(--amber); } .hbar .tr i.r { background: var(--rose); } .hbar .tr i.v { background: var(--violet); }
.hbar .v { text-align: right; font-family: var(--mono); font-size: 12px; }

/* ---------- модалка / тост ---------- */
.mback { position: fixed; inset: 0; background: rgba(15,20,35,.45); backdrop-filter: blur(3px); display: grid; place-items: center; z-index: 100; padding: 20px; animation: fade .18s ease; }
@keyframes fade { from { opacity: 0; } }
.modal { background: var(--panel); border-radius: 16px; box-shadow: var(--shadow2); width: min(640px, 100%); max-height: 90vh; overflow: auto; animation: mup .24s cubic-bezier(.2,.8,.2,1); }
@keyframes mup { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.modal.lg { width: min(1000px, 100%); } .modal.sm { width: min(440px, 100%); }
.modal .hd { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); } .modal .hd h3 { font: 700 16px/1.2 var(--head); }
.modal .bd { padding: 20px; } .modal .ft { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line); }
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--panel); padding: 10px 16px; border-radius: 10px; font-weight: 600; font-size: 13px; box-shadow: var(--shadow2); z-index: 200; display: flex; align-items: center; gap: 8px; animation: up .2s ease; }
@keyframes up { from { opacity: 0; transform: translate(-50%, 10px); } }

/* ---------- вход по PIN ---------- */
.login { position: relative; min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; overflow: hidden; background: #0C0F15; color: #EEF1F6; isolation: isolate; }
.lg-glow { position: absolute; border-radius: 50%; filter: blur(70px); pointer-events: none; z-index: 0; }
.lg-glow.a { width: 56vmax; height: 56vmax; left: -18vmax; top: -22vmax; background: radial-gradient(circle, rgba(109,147,240,.26), transparent 62%); animation: lgdrift 22s ease-in-out infinite alternate; }
.lg-glow.b { width: 48vmax; height: 48vmax; right: -16vmax; bottom: -22vmax; background: radial-gradient(circle, rgba(69,207,159,.16), transparent 62%); animation: lgdrift 28s ease-in-out infinite alternate-reverse; }
@keyframes lgdrift { to { transform: translate(6vmax, 4vmax) scale(1.08); } }
.lg-bg { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.lg-mark-bg { position: absolute; width: 112vh; height: 112vh; right: -28vh; top: 50%; margin-top: -56vh; opacity: .12; color: #AEBBFF; -webkit-mask-image: radial-gradient(closest-side, #000 18%, rgba(0,0,0,.55) 48%, transparent 76%); mask-image: radial-gradient(closest-side, #000 18%, rgba(0,0,0,.55) 48%, transparent 76%); animation: lgspin 180s linear infinite, lgbreathe 14s ease-in-out infinite alternate; }
@keyframes lgspin { to { transform: rotate(360deg); } } @keyframes lgbreathe { to { opacity: .2; } }
.login .box { position: relative; z-index: 1; width: 420px; max-width: 100%; padding: 36px 34px 26px; border-radius: 22px; background: rgba(22,27,38,.66); border: 1px solid rgba(255,255,255,.07); backdrop-filter: blur(18px) saturate(1.15); box-shadow: 0 30px 80px -30px rgba(0,0,0,.7), inset 0 1px 0 rgba(255,255,255,.05); animation: lgin .7s cubic-bezier(.2,.8,.2,1) both; }
@keyframes lgin { from { opacity: 0; transform: translateY(16px) scale(.985); } }
.lg-head { text-align: center; margin-bottom: 26px; }
.lg-logo { position: relative; width: 96px; height: 96px; margin: 0 auto 14px; display: grid; place-items: center; color: #8FAEFF; }
.lg-logo .halo { position: absolute; inset: -14px; border-radius: 50%; background: radial-gradient(circle, rgba(109,147,240,.35), transparent 65%); animation: lghalo 4.5s ease-in-out infinite; }
@keyframes lghalo { 0%, 100% { transform: scale(.9); opacity: .6; } 50% { transform: scale(1.1); opacity: 1; } }
.lg-mark { position: relative; width: 84px; height: 84px; filter: drop-shadow(0 0 10px rgba(109,147,240,.45)); }
.lg-mark .ring { stroke-dasharray: 120; stroke-dashoffset: 120; animation: lgdraw 1.2s .15s cubic-bezier(.3,.7,.2,1) forwards; }
.lg-mark .ring2 { stroke-dasharray: 76; stroke-dashoffset: 76; animation: lgdraw 1s .5s cubic-bezier(.3,.7,.2,1) forwards; }
.lg-mark .chk { stroke-dasharray: 20; stroke-dashoffset: 20; animation: lgdraw .6s 1.1s ease forwards; }
@keyframes lgdraw { to { stroke-dashoffset: 0; } }
.lg-brand { font: 800 26px/1.15 var(--head); letter-spacing: .06em; animation: lgin .7s .15s both; }
.lg-tag { margin-top: 6px; font: 700 10.5px/1.2 var(--head); letter-spacing: .22em; text-transform: uppercase; color: #8A95A8; animation: lgin .7s .25s both; }
.pin { display: flex; justify-content: center; gap: 10px; margin: 8px 0 6px; animation: lgin .6s .35s both; }
.pin i { width: 46px; height: 56px; border-radius: 13px; background: rgba(255,255,255,.045); border: 1px solid rgba(255,255,255,.1); display: grid; place-items: center; font: 700 22px/1 var(--mono); color: #EEF1F6; transition: border-color .2s, background .2s, transform .15s; }
.pin i.on { border-color: rgba(109,147,240,.75); background: rgba(109,147,240,.1); }
.pin i.f { background: rgba(109,147,240,.14); border-color: rgba(109,147,240,.9); transform: scale(1.04); }
.pin.err i { border-color: rgba(240,112,112,.8); animation: lgshake .4s cubic-bezier(.36,.07,.19,.97); }
@keyframes lgshake { 10%, 90% { transform: translateX(-1px); } 20%, 80% { transform: translateX(2px); } 30%, 50%, 70% { transform: translateX(-4px); } 40%, 60% { transform: translateX(4px); } }
.pin-hid { position: absolute; opacity: 0; width: 1px; height: 1px; }
.lg-err { min-height: 18px; margin: 4px 0 10px; text-align: center; font-size: 13px; color: #F07070; opacity: 0; transition: opacity .2s; } .lg-err.show { opacity: 1; }
.lg-btn { position: relative; display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 50px; border: 0; border-radius: 14px; cursor: pointer; color: #fff; font: 700 15px/1 var(--head); background: linear-gradient(135deg, #6D93F0, #4F7BE6 55%, #5E6BE8); box-shadow: 0 14px 30px -12px rgba(79,123,230,.7); transition: transform .15s, box-shadow .2s, filter .2s; overflow: hidden; animation: lgin .6s .46s both; }
.lg-btn::after { content: ''; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.18) 50%, transparent 70%); transform: translateX(-120%); transition: transform .6s; }
.lg-btn:hover { transform: translateY(-1px); filter: brightness(1.05); } .lg-btn:hover::after { transform: translateX(120%); }
.lg-btn svg.i { width: 18px; height: 18px; stroke-width: 2.2; }
.lg-foot { margin-top: 18px; text-align: center; font-size: 12px; color: #6F7A90; animation: lgin .6s .55s both; }

/* ---------- проверка документов ---------- */
.chk { display: flex; flex-direction: column; gap: 8px; }
.chk .it { display: grid; grid-template-columns: 30px 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); opacity: 0; transform: translateY(6px); transition: opacity .3s, transform .3s, border-color .3s; }
.chk .it.in { opacity: 1; transform: none; }
.chk .it .st { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--bg2); color: var(--ink3); }
.chk .it .st.run { color: var(--accent); background: var(--accent-soft); } .chk .it .st.run svg { animation: spin 1s linear infinite; }
.chk .it .st.ok { background: var(--mint-soft); color: var(--mint); } .chk .it .st.warn { background: var(--amber-soft); color: var(--amber); } .chk .it .st.bad { background: var(--rose-soft); color: var(--rose); }
.chk .it.warn { border-color: rgba(232,163,61,.5); background: var(--amber-soft); } .chk .it.bad { border-color: rgba(224,108,108,.5); background: var(--rose-soft); }
.chk .it .t { font-weight: 700; font-size: 13.5px; } .chk .it .s { font-size: 12.5px; color: var(--ink2); margin-top: 2px; }
.chk .it .src { font-size: 11px; color: var(--accent2); font-weight: 600; margin-top: 3px; display: inline-flex; align-items: center; gap: 4px; cursor: pointer; } .chk .it .src:hover { text-decoration: underline; }
.prog { height: 6px; background: var(--bg2); border-radius: 4px; overflow: hidden; } .prog i { display: block; height: 100%; background: var(--accent); width: 0; transition: width .5s ease; border-radius: 4px; }
.score { display: flex; align-items: center; gap: 14px; }
.score .ring { width: 72px; height: 72px; position: relative; }
.score .ring svg { transform: rotate(-90deg); } .score .ring circle { fill: none; stroke-width: 7; } .score .ring .bg { stroke: var(--bg2); } .score .ring .fg { stroke: var(--mint); stroke-linecap: round; stroke-dasharray: 201; stroke-dashoffset: 201; transition: stroke-dashoffset 1s cubic-bezier(.2,.8,.2,1); }
.score .ring b { position: absolute; inset: 0; display: grid; place-items: center; font: 700 16px/1 var(--head); }

/* ---------- ИИ-чат ---------- */
.chat { display: grid; grid-template-rows: 1fr auto; height: calc(100vh - var(--top) - 44px - 70px); min-height: 480px; }
.chat .msgs { overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.msg { display: flex; gap: 10px; max-width: 78%; animation: pagein .25s both; }
.msg.me { align-self: flex-end; flex-direction: row-reverse; }
.msg .bub { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 11px 14px; font-size: 13.5px; line-height: 1.55; box-shadow: var(--shadow); }
.msg.me .bub { background: var(--accent); border-color: var(--accent); color: #fff; border-bottom-right-radius: 4px; }
.msg.ai .bub { border-bottom-left-radius: 4px; }
.msg .bub .cite { margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--line2); display: flex; flex-wrap: wrap; gap: 6px; }
.msg .bub .cite a { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; color: var(--accent2); background: var(--accent-soft); padding: 3px 8px; border-radius: 20px; cursor: pointer; }
.msg .bub .nf { color: var(--ink2); }
.typing { display: inline-flex; gap: 4px; padding: 4px 2px; } .typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink3); animation: blink 1.2s infinite; } .typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.chat .in { display: flex; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--line); background: var(--panel); border-radius: 0 0 var(--r) var(--r); }
.chat .in input { flex: 1; }
.sugg { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 10px; }
.sugg button { border: 1px solid var(--line2); background: var(--panel); border-radius: 20px; padding: 6px 11px; font-size: 12px; font-weight: 600; color: var(--ink2); transition: all .15s; } .sugg button:hover { border-color: var(--accent); color: var(--accent2); background: var(--accent-soft); }
.src-list .it { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); } .src-list .it:last-child { border-bottom: 0; }
.src-list .it .ic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent2); flex-shrink: 0; }
.src-list .it b { display: block; font-size: 13px; } .src-list .it small { color: var(--ink3); font-size: 11.5px; }
.src-list .it .tog { margin-left: auto; }

/* ---------- апостиль ---------- */
.flag { font-size: 28px; line-height: 1; }
.cc { padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; cursor: pointer; border: 1px solid var(--line); transition: all .15s; }
.cc:hover, .cc.on { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79,123,230,.12); }
.cc .n { font: 700 15px/1.2 var(--head); }
.qr { width: 120px; height: 120px; border-radius: 12px; background: repeating-conic-gradient(var(--ink) 0 25%, transparent 0 50%) 0 0/16px 16px; position: relative; overflow: hidden; margin: 0 auto; }
.qr::after { content: ""; position: absolute; left: 0; right: 0; height: 3px; background: var(--accent); box-shadow: 0 0 12px var(--accent); animation: scan 1.4s ease-in-out infinite; }
@keyframes scan { 0% { top: 0; } 50% { top: calc(100% - 3px); } 100% { top: 0; } }

/* ---------- календарь ---------- */
.cal { display: grid; grid-template-columns: 70px 1fr; gap: 0; }
.cal .h { padding: 10px 8px; font: 600 11px/1 var(--mono); color: var(--ink3); border-top: 1px solid var(--line); height: 56px; }
.cal .c { border-top: 1px solid var(--line); height: 56px; position: relative; }
.cal .ev { position: absolute; left: 6px; right: 6px; top: 4px; bottom: 4px; border-radius: 8px; padding: 6px 10px; font-size: 12px; font-weight: 700; background: var(--accent-soft); color: var(--accent2); border-left: 3px solid var(--accent); cursor: pointer; transition: transform .15s; }
.cal .ev:hover { transform: translateX(2px); }
.cal .ev.m { background: var(--mint-soft); color: var(--mint); border-color: var(--mint); } .cal .ev.a { background: var(--amber-soft); color: #B87A1E; border-color: var(--amber); } .cal .ev.v { background: var(--violet-soft); color: var(--violet); border-color: var(--violet); }
.cal .ev small { display: block; font-weight: 500; color: var(--ink2); }

/* ---------- экран демо-подсказки ---------- */
.demo-tag { position: fixed; right: 16px; bottom: 16px; z-index: 50; font: 700 10.5px/1 var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--ink3); background: var(--panel); border: 1px dashed var(--line2); padding: 6px 10px; border-radius: 8px; }
.count { font-variant-numeric: tabular-nums; }
.lock { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; background: var(--violet-soft); color: var(--violet); }
.empty { padding: 40px; text-align: center; color: var(--ink3); }
@media (max-width: 1100px) { .g4, .g5 { grid-template-columns: repeat(2, 1fr); } .g3 { grid-template-columns: 1fr 1fr; } .g-2-1, .g-1-2, .g-3-2 { grid-template-columns: 1fr; } .topbar .search { width: 180px; } }
@media (max-width: 760px) { .shell { grid-template-columns: var(--rail-min) 1fr; } .g2, .g3, .g4 { grid-template-columns: 1fr; } .topbar .search { display: none; } .min .brand .t { display: none; } }
