@font-face {
  font-family: Manrope;
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/fonts/manrope-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212;
}
@font-face {
  font-family: Manrope;
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/fonts/manrope-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
:root {
  color-scheme: dark;
  --bg: #060311;
  --sidebar: #100d1a;
  --surface: #161320;
  --surface-high: #201a30;
  --border: #302740;
  --text: #f6f3ff;
  --muted: #b4adc5;
  --soft: #a198b5;
  --accent: #c2adff;
  --violet: #5800fd;
  --control-border: #514264;
  --radius-card: 20px;
  --heading-font: Manrope, "Segoe UI", system-ui, sans-serif;
  --green: #65dcb3;
  --yellow: #f5c078;
  --red: #ffa1a6;
  font: 14px/1.5 Inter, "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .48; cursor: default; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1, h2, p { margin: 0; }
h1, h2 { font-family: var(--heading-font); font-weight: 750; }
h1 { font-size: clamp(27px, 3vw, 38px); line-height: 1.18; letter-spacing: -.025em; }
h2 { font-size: 17px; letter-spacing: -.01em; }
small { font-size: 12px; }
code, .mono { font-family: "SFMono-Regular", Consolas, monospace; font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.initial { min-height: 100dvh; display: grid; place-items: center; color: var(--muted); }
.icon { width: 18px; height: 18px; flex: none; vertical-align: middle; }
.brand { display: flex; align-items: center; gap: 11px; font: 800 21px/1.2 var(--heading-font); letter-spacing: .1em; }
.brand small { display: block; margin-top: 3px; font: 400 12px/1.35 system-ui, sans-serif; color: var(--muted); letter-spacing: 0; }
.mark { width: 38px; height: 38px; border-radius: 12px; background: var(--violet); display: grid; place-items: center; color: white; }
.mark .icon { width: 22px; height: 22px; }
.muted { color: var(--muted); }
.soft { color: var(--soft); }
.shell { display: grid; grid-template-columns: 226px minmax(0, 1fr); min-height: 100dvh; }
.sidebar { background: var(--sidebar); border-right: 1px solid var(--border); display: flex; flex-direction: column; padding: 23px 15px 18px; position: sticky; top: 0; height: 100dvh; }
.sidebar > .brand { padding-left: 8px; margin-bottom: 41px; }
.nav { display: grid; gap: 5px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 8px; color: var(--muted); white-space: nowrap; }
.nav a:hover { background: #201a30; color: var(--text); }
.nav a[aria-current=page] { background: #251943; color: #ddccff; font-weight: 650; }
.nav a.system { margin-top: 16px; }
.sidebar-foot { margin-top: auto; padding: 12px 9px 0; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 12px; }
.dot { width: 8px; height: 8px; background: currentColor; border-radius: 50%; display: inline-block; flex: none; }
.mode-demo { color: var(--yellow); }
.mode-live { color: var(--accent); }
.workspace { min-width: 0; }
.topbar { height: 70px; padding: 0 clamp(16px, 2.7vw, 40px); display: flex; align-items: center; justify-content: space-between; gap: 16px; background: #100d1a; border-bottom: 1px solid var(--border); }
.top-path { display: flex; align-items: center; gap: 9px; white-space: nowrap; font-size: 13px; color: var(--muted); }
.top-path strong { color: var(--text); font-weight: 600; }
.top-tools { display: flex; align-items: center; gap: 15px; }
.quick-search { display: flex; align-items: center; gap: 8px; border: 1px solid var(--border); border-radius: 999px; color: var(--soft); background: var(--bg); padding: 0 11px; }
.quick-search input { width: clamp(140px, 18vw, 245px); padding: 9px 0; border: 0; background: transparent; }
.quick-search:focus-within { border-color: var(--accent); }
.quick-search input:focus-visible { outline: none; }
.profile { display: flex; align-items: center; gap: 9px; }
.avatar { width: 32px; height: 32px; display: grid; place-items: center; background: #292141; border: 1px solid #44365f; color: #d9ccff; border-radius: 9px; font-weight: 700; }
.main { max-width: 1600px; margin: auto; padding: 29px clamp(16px, 2.7vw, 40px) 40px; }
.crumb-link { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 15px; color: var(--accent); }
.page-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.page-head p { margin-top: 6px; color: var(--muted); }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 15px; min-height: 38px; border: 1px solid #403552; background: var(--surface); color: var(--text); border-radius: 8px; font-weight: 610; white-space: nowrap; }
.button:hover:not(:disabled) { background: var(--surface-high); border-color: #6d559a; }
.button.primary { color: white; background: var(--violet); border-color: #895aff; border-radius: 999px; }
.button.primary:hover:not(:disabled) { background: #6618ef; }
.button.danger { color: var(--red); border-color: #6f3d49; }
.icon-button { padding: 7px; min-width: 38px; border-radius: 12px; }
.metrics { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 13px; margin-bottom: 17px; }
.metric, .panel { border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--surface); min-width: 0; }
.metric { padding: 16px; }
a.metric:hover { background: var(--surface-high); border-color: #645089; }
.metric-label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; min-height: 29px; }
.metric-icon { color: var(--metric-color, var(--accent)); }
.metric-value { font: 760 32px/1.25 var(--heading-font); letter-spacing: -.035em; font-variant-numeric: tabular-nums; margin-top: 7px; }
.metric-note { color: var(--muted); font-size: 12px; margin-top: 4px; }
.green { color: var(--green); --metric-color: var(--green); }
.yellow { color: var(--yellow); --metric-color: var(--yellow); }
.red { color: var(--red); --metric-color: var(--red); }
.columns { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; align-items: stretch; }
.panel-head { padding: 16px 18px 13px; display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.panel-head p { color: var(--muted); margin-top: 3px; font-size: 13px; }
.panel-body { padding: 5px 18px 18px; }
.period-label { border: 1px solid var(--border); color: var(--muted); font-size: 12px; border-radius: 6px; padding: 4px 7px; white-space: nowrap; }
.status-line { display: grid; grid-template-columns: minmax(100px, 1fr) minmax(34px, 1.15fr) 32px; gap: 11px; align-items: center; padding: 9px 0; }
.status-line strong { text-align: right; }
.progress { width: 100%; height: 7px; display: block; border: 0; border-radius: 4px; background: #302941; overflow: hidden; }
.progress::-webkit-progress-bar { background: #302941; border-radius: 4px; }
.progress::-webkit-progress-value { background: currentColor; border-radius: 4px; }
.progress::-moz-progress-bar { background: currentColor; border-radius: 4px; }
.chart { display: flex; gap: 12px; height: 170px; padding: 0 1px 0 0; color: var(--muted); }
.chart-scale { display: flex; flex-direction: column; justify-content: space-between; font-size: 11px; text-align: right; padding-bottom: 25px; min-width: 19px; }
.chart-plot { flex: 1; min-width: 0; border-radius: 3px; display: flex; align-items: stretch; gap: clamp(5px, 1vw, 13px); padding: 0 4px; background: repeating-linear-gradient(to bottom,#312944 0,#312944 1px,transparent 1px,transparent 25%) 0 0/100% calc(100% - 26px) no-repeat; }
.chart-column { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: end; align-items: center; }
.chart-column time { font-size: 10px; width: 100%; text-align: center; padding-top: 8px; height: 25px; overflow: hidden; color: var(--muted); }
.chart-bar { width: min(76%, 34px); min-height: 2px; background: #9378ed; border-radius: 3px 3px 0 0; }
.summary-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 20px;
  border-block: 1px solid var(--border);
}
.summary-strip a { display: grid; grid-template-rows: 1fr auto; gap: 4px; padding: 13px 14px; border-inline-end: 1px solid var(--border); }
.summary-strip a:first-child { padding-inline-start: 0; }
.summary-strip a:last-child { border-inline-end: 0; }
.summary-strip a:hover { background: var(--surface); }
.summary-strip a:focus-visible { outline-offset: -2px; }
.summary-strip span { color: var(--muted); font-size: 12px; }
.summary-strip strong { font: 750 25px/1.15 var(--heading-font); }
.expiry-links { display: flex; flex-wrap: wrap; gap: 4px 16px; padding: 0 18px 14px; }
.expiry-links a { display: inline-flex; align-items: center; gap: 7px; min-height: 32px; color: var(--accent); }
.expiry-links a:hover { text-decoration: underline; }
.expiry-links strong { color: var(--text); font-variant-numeric: tabular-nums; }
.advanced-filters { display: contents; }
.filter-toggle { display: none; }
.split-panel { margin-bottom: 16px; }
.table-scroll { position: relative; overflow-x: auto; overscroll-behavior-inline: contain; }
.table-scroll:focus { outline-offset: -2px; }
table { border-collapse: collapse; text-align: left; width: 100%; font-size: 13px; }
caption { text-align: left; }
th { color: var(--muted); font-weight: 550; background: #1b1628; white-space: nowrap; }
th, td { padding: 11px 16px; border-top: 1px solid var(--border); }
td:first-child, th:first-child { padding-left: 18px; }
td { vertical-align: middle; }
tbody tr:hover { background: #201a30; }
.row-name { display: inline-block; font-weight: 625; white-space: nowrap; color: var(--accent); }
.row-name:hover { text-decoration: underline; text-underline-offset: 3px; }
.pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 20px; padding: 3px 9px; white-space: nowrap; font-size: 12px; background: #2b2539; color: #d9cfe7; }
.pill .dot { width: 6px; height: 6px; }
.pill.active { background: #153830; color: #91efd0; }
.pill.expired { background: #3a2931; color: #ffc0c4; }
.pill.limited { background: #3c3021; color: #f7cd94; }
.field { display: grid; gap: 5px; min-width: 0; }
.field > label, .field > span { font-size: 12px; color: var(--muted); font-weight: 550; }
input, select { color: var(--text); border: 1px solid var(--control-border); border-radius: 12px; background: #100c1a; padding: 8px 10px; min-width: 0; }
input::placeholder { color: #a59bb5; }
.filters { display: flex; align-items: end; gap: 10px; flex-wrap: wrap; padding: 16px 18px; }
.filters .grow { flex: 1 1 170px; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--border); padding: 12px 18px; color: var(--muted); }
.shortcuts { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 14px; }
.shortcuts a[aria-current=true] { border-color: #7d5fc2; background: #2a1d48; color: #e0d3ff; }
.state { padding: 24px 18px; color: var(--muted); }
.notice { padding: 11px 13px; background: #241a39; border: 1px solid #4d3972; border-radius: 8px; color: #ded2ff; margin-bottom: 12px; }
.error { color: var(--red); }
.success { color: var(--green); }
dl { margin: 0; }
.details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px 18px; }
dt { color: var(--muted); font-size: 12px; }
dd { margin: 3px 0 0; word-break: break-word; }
.operation-menu { display: flex; flex-direction: column; align-items: start; gap: 9px; }
.detail-actions { grid-template-columns: minmax(0, 1.4fr) minmax(200px, 1fr); }
.login { display: grid; place-items: center; min-height: 100dvh; padding: 20px; background:
    radial-gradient(ellipse at 50% 30%, #4532a344, transparent 52%),
    var(--bg); }
.login-card {
  width: min(100%, 440px);
  padding: clamp(24px, 5vw, 36px);
  border-color: #45345e;
  border-radius: 24px;
  background: var(--surface);
}
.login-card .brand { margin-bottom: 29px; }
.login-card h1 { font-size: 32px; }
.login-card > p { margin: 7px 0 23px; }
.login form, .action-form { display: grid; gap: 14px; }
.login input { min-height: 44px; padding-inline: 13px; }
.login form .button { margin-top: 6px; min-height: 46px; }
dialog { width: min(480px,calc(100% - 28px)); color: var(--text); background: var(--surface); border: 1px solid #544071; border-radius: 13px; padding: 21px; }
dialog::backdrop { background: #070311cc; }
dialog h2 { margin-bottom: 13px; }
.dialog-buttons { display: flex; justify-content: flex-end; gap: 8px; margin-top: 7px; }
.dialog-diff { background: #100c1b; padding: 11px 13px; border: 1px solid var(--border); border-radius: 7px; }
.error:empty { display: none; }
.mobile-mode, .mobile-brand { display: none; }
@media (max-width: 1150px) {
  .shell { grid-template-columns: 192px minmax(0, 1fr); }
  .metric { padding: 12px; }
  .metrics { gap: 8px; }
  .metric-label { font-size: 12px; }
  th, td { padding-inline: 11px; }
}
@media (max-width: 930px) {
  .metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .columns { grid-template-columns: 1fr; }
  .shell { grid-template-columns: 64px minmax(0, 1fr); }
  .sidebar { padding-inline: 8px; }
  .sidebar > .brand { margin-bottom: 26px; padding: 0; justify-content: center; }
  .sidebar .brand-text, .sidebar .nav span, .sidebar-foot span:last-child { display: none; }
  .sidebar-foot, .nav a { justify-content: center; }
}
@media (max-width: 560px) {
  .shell { display: block; }
  .sidebar { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--border); padding: 8px 12px; }
  .sidebar > .brand, .sidebar-foot { display: none; }
  .nav { grid-template-columns: repeat(6,minmax(0,1fr)); }
  .nav a { padding: 9px 0; }
  .nav a.system { margin: 0; }
  .topbar { height: 54px; padding-inline: 13px; }
  .top-path > span, .top-path .icon, .profile-name, .profile .avatar { display: none; }
  .top-tools { gap: 6px; }
  .topbar { gap: 8px; }
  .mobile-brand { display: inline; font: 800 14px/1 var(--heading-font); letter-spacing: .11em; color: var(--text); }
  .top-path { min-width: 0; gap: 7px; }
  .top-path strong { padding-left: 7px; border-left: 1px solid var(--border); overflow: hidden; text-overflow: ellipsis; }
  .quick-search input { width: clamp(62px, 22vw, 115px); }
  .quick-search { padding-inline: 8px; gap: 4px; }
  .main { padding: 18px 13px 28px; }
  .metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .page-head { flex-direction: column; align-items: flex-start; gap: 10px; margin-bottom: 17px; }
  .chart-column:nth-child(even) time { visibility: hidden; }
  .details { gap: 12px; }
  .summary-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .summary-strip a { padding: 9px; }
  .summary-strip a:first-child { padding-inline-start: 9px; }
  .summary-strip a:nth-child(3) { border-inline-end: 0; }
  .summary-strip a:nth-child(n+4) { border-top: 1px solid var(--border); }
  .summary-strip strong { font-size: 22px; }
  .expiry-links { gap: 4px 14px; }
  .filters[data-section] { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; padding: 13px; }
  .filters[data-section] .grow { grid-row: 1; }
  .filter-submit { grid-column: 2; grid-row: 1; }
  .filter-toggle { display: inline-flex; justify-self: start; }
  .filters[data-section] .advanced-filters {
    display: none;
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .filters[data-section] .filter-reset { display: none; justify-self: end; }
  .filters[data-section].show-advanced .advanced-filters { display: grid; }
  .filters[data-section].show-advanced .filter-reset { display: inline-flex; grid-column: 2; grid-row: 2; }
  .user-table td { white-space: nowrap; }
  .user-table th:first-child, .user-table td:first-child {
    position: sticky;
    inset-inline-start: 0;
    z-index: 1;
    border-inline-end: 1px solid var(--border);
  }
  .user-table td:first-child { background: var(--surface); }
  .user-table tbody tr:hover td:first-child { background: var(--surface-high); }
  .user-table .row-name { display: inline-block; max-width: 146px; overflow: hidden; text-overflow: ellipsis; }
}
.state-inline { margin-top: 12px; }
.chart-bar.zero { visibility: hidden; }
@media (max-width: 560px) {
  .mobile-mode { display: flex; gap: 7px; align-items: center; padding: 8px 13px 0; color: var(--muted); font-size: 11px; }
}
