

:root {

  --bg: #0B0E10;
  --bg-deep: #07090A;
  --panel: #12171A;
  --panel-2: #171E22;
  --panel-3: #1D252A;
  --line: #242E33;
  --line-soft: #1B2327;

  --text: #E9EEF1;
  --text-2: #B7C3C9;
  --muted: #83939B;
  --muted-2: #5F6E75;

  --amber: #FFB020;
  --amber-soft: #FFCF6B;
  --amber-deep: #C97F00;
  --amber-glow: rgba(255, 176, 32, .14);

  --green: #44CF83;
  --green-bg: rgba(68, 207, 131, .12);
  --cyan: #35D0C0;
  --cyan-bg: rgba(53, 208, 192, .12);
  --blue: #5B93FF;
  --blue-bg: rgba(91, 147, 255, .12);
  --red: #FF6B6B;
  --red-bg: rgba(255, 107, 107, .12);
  --violet: #A98BFF;

  --font: "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans SC", "Hiragino Sans GB", system-ui, sans-serif;
  --font-num: "Bahnschrift", "DIN Alternate", "Segoe UI Variable Display", "Segoe UI", var(--font);

  --radius: 14px;
  --radius-sm: 9px;
  --sidebar-w: 238px;
  --topbar-h: 64px;
  --shadow-1: 0 1px 0 rgba(255,255,255,.03) inset, 0 10px 30px -18px rgba(0,0,0,.9);
  --shadow-2: 0 24px 60px -24px rgba(0,0,0,.85);
  --ease: cubic-bezier(.22, .8, .3, 1);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;

  background-image:
    radial-gradient(900px 420px at 78% -10%, rgba(255,176,32,.07), transparent 62%),
    radial-gradient(700px 380px at 8% 108%, rgba(53,208,192,.05), transparent 60%),
    linear-gradient(rgba(255,255,255,.014) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.014) 1px, transparent 1px);
  background-size: auto, auto, 44px 44px, 44px 44px;
  background-attachment: fixed;
}
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -.01em; line-height: 1.3; }
p { margin: 0; }
a { color: var(--amber); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--amber); color: #12100A; }


::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #2A343A; border-radius: 20px; border: 3px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #3A4750; }


.boot {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-content: center; gap: 18px; justify-items: center;
  background: var(--bg-deep);
  transition: opacity .35s var(--ease);
}
.boot__mark { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 16px;
  background: linear-gradient(160deg, #1C2429, #0E1316); border: 1px solid var(--line);
  box-shadow: 0 0 0 1px rgba(255,176,32,.12), 0 20px 50px -20px rgba(255,176,32,.4); }
.boot__text { color: var(--muted); font-size: 13px; letter-spacing: .22em; text-transform: uppercase; }
.boot .pmark { color: var(--amber); font-family: var(--font-num); font-size: 30px; font-weight: 700; }

.pmark {
  display: inline-grid; place-items: center;
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(150deg, var(--amber), var(--amber-deep));
  color: #14100A; font-family: var(--font-num); font-weight: 800; font-size: 19px;
  letter-spacing: -.02em; box-shadow: 0 6px 16px -8px rgba(255,176,32,.9);
}


.app { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }
.app.collapsed { --sidebar-w: 72px; }

.app.login-mode { display: block; min-height: 100vh; }


.sidebar {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, #0E1316 0%, #0A0D0F 100%);
  border-right: 1px solid var(--line);
  z-index: 30;
}
.sidebar__brand { display: flex; align-items: center; gap: 12px; height: var(--topbar-h); padding: 0 18px;
  border-bottom: 1px solid var(--line-soft); }
.sidebar__title { min-width: 0; }
.sidebar__title strong { display: block; font-size: 14.5px; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar__title span { display: block; font-size: 10.5px; letter-spacing: .3em; color: var(--muted-2); text-transform: uppercase; }
.app.collapsed .sidebar__title,
.app.collapsed .nav__label,
.app.collapsed .nav__group-title,
.app.collapsed .sidebar__foot small { display: none; }
.app.collapsed .sidebar__brand { justify-content: center; padding: 0; }

.nav { flex: 1; overflow-y: auto; padding: 14px 10px 24px; }
.nav__group { margin: 10px 0 6px; }
.nav__group-title { padding: 8px 12px 6px; font-size: 10px; letter-spacing: .26em; color: var(--muted-2); text-transform: uppercase; }
.nav__item {
  position: relative; display: flex; align-items: center; gap: 11px;
  padding: 9px 12px; margin: 2px 0; border-radius: 10px;
  color: var(--text-2); font-size: 13.5px; cursor: pointer; user-select: none;
  transition: background .18s var(--ease), color .18s var(--ease), transform .18s var(--ease);
  white-space: nowrap;
}
.nav__item svg { width: 17px; height: 17px; flex: none; opacity: .78; }
.nav__item:hover { background: var(--panel); color: var(--text); }
.nav__item.active { background: linear-gradient(90deg, var(--amber-glow), transparent 78%); color: var(--amber-soft); }
.nav__item.active::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 20px; border-radius: 0 3px 3px 0; background: var(--amber);
  box-shadow: 0 0 14px rgba(255,176,32,.75);
}
.nav__item.active svg { opacity: 1; }
.nav__item .nav__badge {
  margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 20px;
  background: var(--red); color: #1A0B0B; font-size: 11px; font-weight: 800;
  display: grid; place-items: center; font-family: var(--font-num);
}
.app.collapsed .nav__item { justify-content: center; padding: 10px 0; }
.app.collapsed .nav__item .nav__badge { position: absolute; top: 4px; right: 10px; margin: 0; min-width: 16px; height: 16px; font-size: 10px; }

.sidebar__foot { padding: 12px; border-top: 1px solid var(--line-soft); display: grid; gap: 8px; }
.sidebar__foot small { color: var(--muted-2); font-size: 10.5px; letter-spacing: .12em; }


.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; height: var(--topbar-h);
  display: flex; align-items: center; gap: 14px; padding: 0 22px;
  background: rgba(11,14,16,.82); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.topbar::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background-image: repeating-linear-gradient(90deg, var(--amber) 0 18px, transparent 18px 34px);
  opacity: .28;
}
.iconbtn {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px;
  border: 1px solid var(--line); background: var(--panel); color: var(--text-2);
  cursor: pointer; transition: all .18s var(--ease);
}
.iconbtn:hover { color: var(--amber); border-color: rgba(255,176,32,.4); background: var(--panel-2); }
.iconbtn svg { width: 16px; height: 16px; }
.topbar__spacer { flex: 1; }
.topbar__clock { display: flex; align-items: baseline; gap: 8px; font-family: var(--font-num);
  color: var(--text-2); letter-spacing: .04em; }
.topbar__clock strong { font-size: 17px; color: var(--text); font-variant-numeric: tabular-nums; }
.topbar__live { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted);
  padding: 5px 11px; border-radius: 30px; border: 1px solid var(--line); background: var(--panel); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(68,207,131,.6); animation: pulse 2.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(68,207,131,.45); } 70% { box-shadow: 0 0 0 8px rgba(68,207,131,0); } 100% { box-shadow: 0 0 0 0 rgba(68,207,131,0); } }

.userchip { display: flex; align-items: center; gap: 10px; padding: 5px 12px 5px 5px; border-radius: 40px;
  border: 1px solid var(--line); background: var(--panel); cursor: pointer; transition: border-color .18s; }
.userchip:hover { border-color: rgba(255,176,32,.35); }
.userchip__avatar { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(150deg, #2A343A, #1A2125); color: var(--amber-soft); font-weight: 700; font-size: 12px;
  border: 1px solid rgba(255,176,32,.25); }
.userchip__meta { line-height: 1.25; }
.userchip__meta b { display: block; font-size: 12.5px; font-weight: 600; }
.userchip__meta span { display: block; font-size: 10.5px; color: var(--muted); letter-spacing: .08em; }


.view { padding: 24px 22px 60px; flex: 1; min-width: 0; }
.page-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head__titles { min-width: 0; }
.page-head h1 { font-size: 23px; letter-spacing: -.02em; }
.page-head .sub { margin-top: 5px; color: var(--muted); font-size: 12.5px; letter-spacing: .02em; }
.page-head__actions { margin-left: auto; display: flex; gap: 9px; flex-wrap: wrap; }


.fade-up { animation: fadeUp .5s var(--ease) both; animation-delay: calc(var(--i, 0) * 45ms); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: none; } }


.card {
  position: relative; background: linear-gradient(180deg, var(--panel) 0%, #101518 100%);
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-1);
}
.card__head { display: flex; align-items: center; gap: 10px; padding: 15px 18px 12px; }
.card__head h3 { font-size: 14px; letter-spacing: .01em; }
.card__head .sub { font-size: 11.5px; color: var(--muted); }
.card__head .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.card__body { padding: 0 18px 16px; }
.card__body.tight { padding: 0 12px 10px; }
.card__foot { padding: 12px 18px; border-top: 1px dashed var(--line); display: flex; align-items: center; gap: 10px; }

.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)); }
.g-2-1 { grid-template-columns: 2fr 1fr; }
.g-1-2 { grid-template-columns: 1fr 2fr; }
.stack { display: grid; gap: 14px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }


.stat {
  position: relative; padding: 16px 18px 15px; overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255,255,255,.022), transparent 60%),
    linear-gradient(180deg, var(--panel) 0%, #0F1417 100%);
  border: 1px solid var(--line);
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 0 100%);
}
.stat::after {
  content: ""; position: absolute; right: -22px; bottom: -22px; width: 96px; height: 96px; border-radius: 50%;
  background: radial-gradient(circle, var(--tone-glow, var(--amber-glow)), transparent 66%);
}
.stat__label { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--muted); letter-spacing: .08em; }
.stat__label svg { width: 14px; height: 14px; color: var(--tone, var(--amber)); }
.stat__value { margin-top: 9px; font-family: var(--font-num); font-variant-numeric: tabular-nums;
  font-size: 30px; font-weight: 600; line-height: 1.05; letter-spacing: -.02em; }
.stat__value small { font-size: 13px; color: var(--muted); font-family: var(--font); margin-left: 5px; letter-spacing: 0; }
.stat__foot { margin-top: 9px; display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--muted-2); }
.stat__spark { margin-top: 10px; height: 26px; }
.stat--warn { --tone: var(--red); --tone-glow: var(--red-bg); }
.stat--ok { --tone: var(--green); --tone-glow: var(--green-bg); }
.stat--info { --tone: var(--cyan); --tone-glow: var(--cyan-bg); }
.stat--blue { --tone: var(--blue); --tone-glow: var(--blue-bg); }
.stat--warn .stat__value { color: #FFD9D9; }
.stat--ok .stat__value { color: #CFF6E1; }


.btn {
  --btn-bg: var(--panel-2); --btn-fg: var(--text); --btn-bd: var(--line);
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 34px; padding: 0 14px; border-radius: 9px; cursor: pointer;
  background: var(--btn-bg); color: var(--btn-fg); border: 1px solid var(--btn-bd);
  font-size: 13px; font-weight: 500; white-space: nowrap;
  transition: transform .12s var(--ease), background .18s, border-color .18s, box-shadow .18s;
}
.btn svg { width: 15px; height: 15px; }
.btn:hover { border-color: #33424A; background: var(--panel-3); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn--primary { --btn-bg: linear-gradient(180deg, var(--amber), var(--amber-deep)); --btn-fg: #1A1305; --btn-bd: transparent;
  font-weight: 700; box-shadow: 0 8px 22px -12px rgba(255,176,32,.95); }
.btn--primary:hover { --btn-bg: linear-gradient(180deg, var(--amber-soft), var(--amber)); background: var(--btn-bg); }
.btn--ghost { --btn-bg: transparent; --btn-bd: var(--line); color: var(--text-2); }
.btn--danger { --btn-bg: var(--red-bg); --btn-fg: #FFC9C9; --btn-bd: rgba(255,107,107,.3); }
.btn--danger:hover { --btn-bg: rgba(255,107,107,.22); background: var(--btn-bg); }
.btn--ok { --btn-bg: var(--green-bg); --btn-fg: #C9F5DC; --btn-bd: rgba(68,207,131,.32); }
.btn--sm { height: 28px; padding: 0 10px; font-size: 12px; border-radius: 7px; }
.btn--lg { height: 42px; padding: 0 20px; font-size: 14px; border-radius: 11px; }
.btn--icon { width: 34px; padding: 0; }
.btn--block { width: 100%; }


.field { display: grid; gap: 6px; }
.field > label { font-size: 12px; color: var(--muted); letter-spacing: .04em; }
.field .hint { font-size: 11.5px; color: var(--muted-2); }
.input, .select, .textarea {
  width: 100%; height: 36px; padding: 0 11px; border-radius: 9px;
  background: #0C1114; border: 1px solid var(--line); color: var(--text);
  transition: border-color .18s, box-shadow .18s, background .18s;
}
.textarea { height: auto; min-height: 84px; padding: 9px 11px; line-height: 1.6; resize: vertical; }
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: rgba(255,176,32,.55); background: #0E1417;
  box-shadow: 0 0 0 3px rgba(255,176,32,.1);
}
.input::placeholder, .textarea::placeholder { color: #4E5C63; }
.select { appearance: none; 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='%2383939B' stroke-width='3'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center; padding-right: 30px; }
.input--plate { font-family: var(--font-num); letter-spacing: .12em; text-transform: uppercase; font-size: 15px; }
.form-grid { display: grid; gap: 13px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .span-2 { grid-column: 1 / -1; }
.search { position: relative; }
.search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--muted-2); }
.search .input { padding-left: 33px; }


.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; }
.switch__track { width: 40px; height: 22px; border-radius: 20px; background: #232E34; border: 1px solid var(--line); transition: all .2s var(--ease); flex: none; }
.switch__track::after { content: ""; display: block; width: 16px; height: 16px; margin: 2px; border-radius: 50%; background: #7A8A92; transition: all .2s var(--ease); }
.switch input:checked + .switch__track { background: rgba(255,176,32,.2); border-color: rgba(255,176,32,.5); }
.switch input:checked + .switch__track::after { transform: translateX(18px); background: var(--amber); }
.switch__label { font-size: 13px; color: var(--text-2); }


.badge {
  display: inline-flex; align-items: center; gap: 5px; height: 21px; padding: 0 8px;
  border-radius: 6px; font-size: 11.5px; font-weight: 500; letter-spacing: .02em;
  background: var(--panel-3); color: var(--text-2); border: 1px solid var(--line); white-space: nowrap;
}
.badge--ok { background: var(--green-bg); color: #8CEAB4; border-color: rgba(68,207,131,.28); }
.badge--warn { background: rgba(255,176,32,.12); color: var(--amber-soft); border-color: rgba(255,176,32,.3); }
.badge--danger { background: var(--red-bg); color: #FFB3B3; border-color: rgba(255,107,107,.28); }
.badge--info { background: var(--blue-bg); color: #A9C6FF; border-color: rgba(91,147,255,.28); }
.badge--cyan { background: var(--cyan-bg); color: #8DE9DF; border-color: rgba(53,208,192,.28); }
.badge__dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }


.plate {
  display: inline-flex; align-items: center; height: 24px; padding: 0 7px; border-radius: 5px;
  font-family: var(--font-num); font-size: 13px; font-weight: 600; letter-spacing: .1em;
  background: linear-gradient(180deg, #1D4ED8, #1E3A8A); color: #FFF;
  border: 1px solid rgba(255,255,255,.22); box-shadow: 0 2px 6px -2px rgba(0,0,0,.7);
  text-shadow: 0 1px 1px rgba(0,0,0,.35); white-space: nowrap;
}
.plate--ne { background: linear-gradient(180deg, #4ADE80, #16A34A); color: #06200F; border-color: rgba(255,255,255,.3); }
.plate--lg { height: 32px; font-size: 15.5px; padding: 0 10px; border-radius: 6px; letter-spacing: .12em; }

.phone { font-family: var(--font-num); color: var(--text-2); letter-spacing: .04em; }
.num { font-family: var(--font-num); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.money { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-weight: 600; }
.money--pos { color: #8CEAB4; }
.money--big { font-size: 15px; }
.muted { color: var(--muted); }
.dim { color: var(--muted-2); }
.small { font-size: 12px; }
.tiny { font-size: 11px; }
.strong { font-weight: 600; }
.mono { font-family: var(--font-num); letter-spacing: .04em; }
.nowrap { white-space: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.center { text-align: center; }
.right { text-align: right; }
.mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-20 { margin-top: 20px; }


.lane-divider { height: 1px; background-image: repeating-linear-gradient(90deg, var(--line) 0 10px, transparent 10px 20px); margin: 14px 0; border: 0; }


.tablewrap { overflow: auto; border-radius: 10px; }
table.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.tbl thead th {
  position: sticky; top: 0; z-index: 2;
  text-align: left; font-weight: 600; font-size: 11.5px; letter-spacing: .08em; color: var(--muted);
  padding: 10px 12px; background: #0E1316; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.tbl tbody td { padding: 11px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.tbl tbody tr { transition: background .15s; }
.tbl tbody tr:hover { background: rgba(255,255,255,.022); }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl td.actions, .tbl th.actions { text-align: right; white-space: nowrap; }
.tbl .cell-actions { display: inline-flex; gap: 6px; justify-content: flex-end; }
.tbl tr.is-clickable { cursor: pointer; }
.col-num { text-align: right; font-family: var(--font-num); font-variant-numeric: tabular-nums; }
.tbl th.col-num { text-align: right; }

.empty { padding: 42px 20px; text-align: center; color: var(--muted-2); }
.empty__mark { font-family: var(--font-num); font-size: 30px; color: #26333A; font-weight: 700; letter-spacing: .2em; }
.empty p { margin-top: 8px; font-size: 13px; }

.pager { display: flex; align-items: center; gap: 8px; padding: 12px 4px 2px; }
.pager__info { color: var(--muted); font-size: 12px; margin-right: auto; font-family: var(--font-num); }
.pager__btn { min-width: 30px; height: 28px; padding: 0 8px; border-radius: 7px; border: 1px solid var(--line);
  background: var(--panel); color: var(--text-2); cursor: pointer; font-size: 12px; font-family: var(--font-num); }
.pager__btn:hover:not(:disabled) { border-color: rgba(255,176,32,.4); color: var(--amber-soft); }
.pager__btn.active { background: var(--amber); color: #1A1305; border-color: transparent; font-weight: 700; }
.pager__btn:disabled { opacity: .35; cursor: not-allowed; }


.filters { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.filters .search { width: 230px; }
.chips { display: inline-flex; gap: 4px; padding: 3px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
.chip { height: 28px; padding: 0 12px; border-radius: 7px; border: 0; background: transparent; color: var(--muted);
  font-size: 12.5px; cursor: pointer; white-space: nowrap; transition: all .16s; }
.chip:hover { color: var(--text); }
.chip.active { background: var(--panel-3); color: var(--amber-soft); font-weight: 600; box-shadow: 0 1px 0 rgba(255,255,255,.04) inset; }


.overlay {
  position: fixed; inset: 0; z-index: 100; background: rgba(4,6,7,.66);
  backdrop-filter: blur(3px); display: grid; place-items: center; padding: 24px;
  animation: fadeIn .18s var(--ease);
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  width: min(560px, 100%); max-height: 88vh; display: flex; flex-direction: column;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid #2A343A; border-radius: 16px; box-shadow: var(--shadow-2);
  animation: modalIn .26s var(--ease);
}
@keyframes modalIn { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: none; } }
.modal--wide { width: min(880px, 100%); }
.modal__head { padding: 16px 20px 12px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.modal__head h3 { font-size: 15px; }
.modal__head .sub { font-size: 11.5px; color: var(--muted); }
.modal__body { padding: 18px 20px; overflow: auto; }
.modal__foot { padding: 13px 20px; border-top: 1px solid var(--line); display: flex; gap: 9px; justify-content: flex-end; }

.drawer-overlay { position: fixed; inset: 0; z-index: 100; background: rgba(4,6,7,.6); backdrop-filter: blur(2px);
  display: flex; justify-content: flex-end; animation: fadeIn .18s var(--ease); }
.drawer { width: min(520px, 100%); height: 100%; background: var(--panel); border-left: 1px solid var(--line);
  display: flex; flex-direction: column; box-shadow: var(--shadow-2); animation: drawerIn .3s var(--ease); }
@keyframes drawerIn { from { transform: translateX(30px); opacity: .6; } to { transform: none; opacity: 1; } }
.drawer__head { padding: 17px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.drawer__body { padding: 18px 20px; overflow: auto; flex: 1; }
.drawer__foot { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; gap: 9px; justify-content: flex-end; }

.toast-layer { position: fixed; top: 18px; right: 18px; z-index: 300; display: grid; gap: 9px; justify-items: end; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 9px; padding: 10px 15px; border-radius: 10px;
  background: var(--panel-2); border: 1px solid var(--line); box-shadow: var(--shadow-2);
  font-size: 13px; max-width: 380px; animation: toastIn .26s var(--ease);
}
@keyframes toastIn { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
.toast__bar { width: 3px; align-self: stretch; border-radius: 3px; background: var(--amber); }
.toast--ok .toast__bar { background: var(--green); }
.toast--error .toast__bar { background: var(--red); }
.toast--info .toast__bar { background: var(--blue); }
.toast.leaving { animation: toastOut .2s var(--ease) forwards; }
@keyframes toastOut { to { opacity: 0; transform: translateX(16px); } }


.chart { width: 100%; display: block; overflow: visible; }
.chart text { font-family: var(--font-num); font-size: 10px; fill: var(--muted-2); }
.chart .grid-line { stroke: #1E272C; stroke-width: 1; stroke-dasharray: 3 5; }
.chart .axis-line { stroke: #26333A; stroke-width: 1; }
.chart .bar { transition: opacity .18s; }
.chart .bar:hover { opacity: .78; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 11.5px; color: var(--muted); }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; }


.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.15fr .85fr; }
.login-hero {
  position: relative; padding: 52px; display: flex; flex-direction: column; justify-content: space-between;
  background:
    radial-gradient(700px 500px at 20% 10%, rgba(255,176,32,.13), transparent 60%),
    linear-gradient(160deg, #14191C, #080B0C 70%);
  overflow: hidden;
}

.login-hero::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(90deg, rgba(255,255,255,.05) 0 1px, transparent 1px 86px),
    repeating-linear-gradient(0deg, rgba(255,255,255,.03) 0 1px, transparent 1px 130px);
  mask-image: linear-gradient(160deg, #000 20%, transparent 75%);
}
.login-hero::after {
  content: "P"; position: absolute; right: -40px; bottom: -140px; font-family: var(--font-num);
  font-size: 460px; font-weight: 800; color: rgba(255,255,255,.018); line-height: 1; pointer-events: none;
}
.login-hero__top { position: relative; display: flex; align-items: center; gap: 13px; }
.login-hero__pill {
  display: inline-flex; align-items: center; gap: 8px; margin-left: auto;
  padding: 6px 13px; border-radius: 30px; font-size: 11.5px; color: var(--muted);
  border: 1px solid var(--line); background: rgba(255,255,255,.02);
}

.flow { list-style: none; margin: 28px 0 0; padding: 0; max-width: 470px; }
.flow li {
  position: relative; display: grid; grid-template-columns: 34px auto 1fr; align-items: baseline; gap: 10px;
  padding: 12px 0; border-top: 1px dashed rgba(255,255,255,.09);
}
.flow li:last-child { border-bottom: 1px dashed rgba(255,255,255,.09); }
.flow b {
  font-family: var(--font-num); font-size: 12px; font-weight: 600; letter-spacing: .1em;
  color: var(--amber); opacity: .85;
}
.flow span { font-size: 13.5px; font-weight: 600; color: var(--text); }
.flow em { font-style: normal; font-size: 12.5px; color: var(--muted); }
.login-hero__copy { position: relative; max-width: 520px; }
.login-hero__copy h1 { font-size: clamp(28px, 3.4vw, 42px); line-height: 1.18; letter-spacing: -.03em; }
.login-hero__copy h1 em { font-style: normal; color: var(--amber); }
.login-hero__copy p { margin-top: 16px; color: var(--text-2); font-size: 14px; line-height: 1.85; }
.login-hero__stats { position: relative; display: flex; gap: 34px; }
.login-hero__stats div span { display: block; font-size: 11px; letter-spacing: .16em; color: var(--muted-2); text-transform: uppercase; }
.login-hero__stats div b { display: block; font-family: var(--font-num); font-size: 22px; color: var(--amber-soft); margin-top: 3px; }
.login-form-wrap { display: grid; place-items: center; padding: 40px; background: var(--bg); border-left: 1px solid var(--line); }
.login-form { width: min(360px, 100%); }
.login-form h2 { font-size: 21px; }
.login-form .sub { color: var(--muted); font-size: 12.5px; margin-top: 6px; }
.login-form .fields { display: grid; gap: 14px; margin-top: 26px; }
.login-hint { margin-top: 18px; padding: 12px 14px; border-radius: 10px; border: 1px dashed var(--line);
  background: rgba(255,255,255,.014); font-size: 12px; color: var(--muted); line-height: 1.8; }
.login-hint b { color: var(--amber-soft); }

.login-back { margin-top: 16px; text-align: center; font-size: 12px; }
.login-back a { color: var(--muted); text-decoration: none; letter-spacing: .02em; transition: color .18s; }
.login-back a:hover { color: var(--amber-soft); }
.sidebar__back {
  display: flex; align-items: center; gap: 4px; padding: 4px 2px;
  color: var(--muted-2); font-size: 11.5px; text-decoration: none; letter-spacing: .04em;
  transition: color .18s;
}
.sidebar__back:hover { color: var(--amber-soft); }
.app.collapsed .sidebar__back span { display: none; }
.app.collapsed .sidebar__back { justify-content: center; }


.dash-hero { display: grid; grid-template-columns: 1.6fr 1fr; gap: 14px; }
.tickets { display: grid; gap: 9px; }
.ticket {
  position: relative; display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center;
  padding: 11px 14px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line-soft);
}
.ticket::before, .ticket::after {
  content: ""; position: absolute; top: 50%; width: 8px; height: 8px; border-radius: 50%;
  background: var(--bg); transform: translateY(-50%); border: 1px solid var(--line-soft);
}
.ticket::before { left: -5px; border-left-color: transparent; }
.ticket::after { right: -5px; border-right-color: transparent; }
.ticket__label { font-size: 12.5px; }
.ticket__label span { display: block; font-size: 10.5px; color: var(--muted-2); margin-top: 1px; }

.mini-list { display: grid; gap: 2px; }
.mini-row { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-bottom: 1px solid var(--line-soft); font-size: 13px; }
.mini-row:last-child { border-bottom: 0; }
.mini-row .grow { flex: 1; min-width: 0; }

.progress { height: 5px; border-radius: 6px; background: #1E272C; overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--amber-deep), var(--amber)); }
.progress--ok > i { background: linear-gradient(90deg, #1E9E63, var(--green)); }

.hourheat { display: flex; gap: 3px; align-items: flex-end; height: 54px; }
.hourheat i { flex: 1; background: #223034; border-radius: 2px 2px 0 0; transition: background .2s; }
.hourheat i:hover { background: var(--amber); }


.kanban { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.kanban__col { background: #0E1316; border: 1px solid var(--line-soft); border-radius: 12px; padding: 11px; min-height: 200px; }
.kanban__head { display: flex; align-items: center; gap: 8px; padding: 2px 4px 10px; font-size: 12.5px; color: var(--text-2); }
.kanban__head b { margin-left: auto; font-family: var(--font-num); color: var(--amber-soft); }
.kanban__card { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; margin-bottom: 9px; }
.kanban__card .row { justify-content: space-between; }


.skeleton { border-radius: 8px; background: linear-gradient(90deg, #161D21 25%, #1D262B 37%, #161D21 63%);
  background-size: 400% 100%; animation: shimmer 1.4s ease infinite; }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.loader { display: grid; place-items: center; padding: 60px; color: var(--muted); font-size: 12px; letter-spacing: .18em; }


.notice { display: flex; gap: 11px; padding: 12px 15px; border-radius: 11px; font-size: 12.5px; line-height: 1.75;
  border: 1px solid rgba(255,176,32,.24); background: rgba(255,176,32,.07); color: #F3DDB3; }
.notice svg { width: 16px; height: 16px; flex: none; margin-top: 3px; color: var(--amber); }
.notice--danger { border-color: rgba(255,107,107,.26); background: rgba(255,107,107,.07); color: #FFCACA; }
.notice--danger svg { color: var(--red); }
.notice--info { border-color: rgba(91,147,255,.24); background: rgba(91,147,255,.07); color: #C7DAFF; }
.notice--info svg { color: var(--blue); }
.notice--ok { border-color: rgba(68,207,131,.24); background: rgba(68,207,131,.07); color: #C6F2D9; }
.notice--ok svg { color: var(--green); }


.announce { font-size: 13px; line-height: 2; color: var(--text-2); white-space: pre-wrap; word-break: break-word; }
.announce strong { color: var(--amber-soft); }


.dl { display: grid; grid-template-columns: auto 1fr; gap: 10px 18px; font-size: 13px; }
.dl dt { color: var(--muted); white-space: nowrap; }
.dl dd { margin: 0; text-align: right; }
.kv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.kv { padding: 11px 13px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line-soft); }
.kv span { display: block; font-size: 11px; color: var(--muted-2); letter-spacing: .06em; }
.kv b { display: block; font-family: var(--font-num); font-size: 17px; margin-top: 3px; font-variant-numeric: tabular-nums; }


.calc { display: grid; gap: 12px; }
.calc__result { display: flex; align-items: baseline; gap: 10px; padding: 14px 16px; border-radius: 12px;
  background: linear-gradient(120deg, rgba(255,176,32,.11), transparent); border: 1px solid rgba(255,176,32,.22); }
.calc__result b { font-family: var(--font-num); font-size: 30px; color: var(--amber-soft); }
.calc__break { display: grid; gap: 6px; font-size: 12.5px; }
.calc__break div { display: flex; justify-content: space-between; padding: 6px 10px; border-radius: 7px; background: var(--panel-2); }


html, body { max-width: 100%; overflow-x: hidden; }
@media (max-width: 1180px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-hero { grid-template-columns: 1fr; }
  .g-2-1, .g-1-2 { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; width: 250px; transform: translateX(-100%);
    transition: transform .26s var(--ease); box-shadow: var(--shadow-2); }
  .app.nav-open .sidebar { transform: none; }
  .app.collapsed { --sidebar-w: 0; }
  .view { padding: 16px 14px 60px; }
  .g3, .g2, .g4 { grid-template-columns: 1fr; }
  .login-wrap { grid-template-columns: 1fr; }
  .login-hero { display: none; }
  .page-head h1 { font-size: 20px; }
  .kanban { grid-template-columns: 1fr; }
  .topbar { padding: 0 14px; }
  .topbar__clock { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .tbl thead { display: none; }
  .tbl tbody td { display: flex; justify-content: space-between; gap: 14px; padding: 8px 12px; }
  .tbl tbody tr { display: block; border-bottom: 1px solid var(--line); padding: 6px 0; }
}

@media (max-width: 620px) {
  .topbar { gap: 8px; padding: 0 10px; }
  .topbar__live { padding: 5px 9px; font-size: 11px; }
  .userchip { padding: 4px; border-radius: 50%; }
  .userchip__meta { display: none; }
  .page-head { align-items: flex-start; }
  .page-head__actions { width: 100%; margin-left: 0; }
  .page-head__actions .btn { flex: 1; }
  .view { padding: 14px 12px 72px; }
  .stat__value { font-size: 26px; }
  .card__head { padding: 13px 14px 10px; }
  .card__body { padding: 0 14px 14px; }
  .card__body.tight { padding: 0 8px 8px; }
  .filters .search { width: 100%; }
  .chips { flex-wrap: wrap; }
  .modal__body, .modal__head, .modal__foot { padding-left: 14px; padding-right: 14px; }
  .tbl tbody td { padding: 7px 10px; font-size: 12.5px; }
}
@media print {
  .sidebar, .topbar, .page-head__actions { display: none; }
  body { background: #fff; color: #000; }
}
