/* FastWallet Admin — панель управления */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../../assets/fonts/inter-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../../assets/fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../../assets/fonts/inter-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --ink: #14162b;
  --ink-2: #2d3047;
  --muted: #74798d;
  --bg: #f2f4f9;
  --surface: #ffffff;
  --line: rgba(20, 22, 43, 0.08);
  --navy: #15182a;
  --navy-2: #1c2038;
  --accent: #6c5ce7;
  --accent-soft: #eeecff;
  --blue: #3d7bf0;
  --ok: #1f9d72;
  --ok-soft: #e6f7f0;
  --warn: #c98312;
  --warn-soft: #fff4e2;
  --danger: #d8444b;
  --danger-soft: #ffecee;
  --radius: 20px;
  --shadow: 0 16px 46px rgba(20, 22, 45, 0.09);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p { margin: 0; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 42px; padding: 0 18px; border-radius: 12px;
  font-size: 13px; font-weight: 700; white-space: nowrap;
  transition: transform .12s, box-shadow .2s, background .2s, opacity .2s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { color: #fff; background: linear-gradient(135deg, #7b6cf6, #5b8def); box-shadow: 0 10px 24px rgba(97, 92, 231, .25); }
.btn-primary:hover:not(:disabled) { box-shadow: 0 14px 30px rgba(97, 92, 231, .34); }
.btn-dark { color: #fff; background: var(--navy); }
.btn-ghost { background: #fff; border: 1px solid var(--line); color: var(--ink-2); }
.btn-ghost:hover:not(:disabled) { background: #f7f8fc; }
.btn-soft { background: var(--accent-soft); color: var(--accent); }
.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn-ok { background: var(--ok-soft); color: var(--ok); }
.btn-sm { min-height: 34px; padding: 0 13px; font-size: 12px; border-radius: 10px; }
.btn-xs { min-height: 28px; padding: 0 10px; font-size: 11px; border-radius: 8px; }
.btn-block { width: 100%; }

.field { margin: 0; }
.field label { display: block; font-size: 12px; font-weight: 650; color: var(--ink-2); margin-bottom: 7px; }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap > svg { position: absolute; left: 13px; color: var(--muted); pointer-events: none; }
.input-wrap input { padding-left: 40px; }
input, select, textarea {
  width: 100%; min-height: 44px; padding: 10px 13px;
  border: 1px solid var(--line); border-radius: 12px;
  background: #fff; color: var(--ink);
  font: inherit; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  border-color: rgba(108, 92, 231, .5);
  box-shadow: 0 0 0 4px rgba(108, 92, 231, .1);
}
textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
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='%2374798d' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 13px center; padding-right: 34px; }

/* ---------- Login ---------- */
.login-screen { min-height: 100%; display: grid; grid-template-columns: 1.08fr .92fr; }
.login-art {
  position: relative; overflow: hidden; color: #fff; padding: 62px;
  background:
    radial-gradient(70% 60% at 82% 8%, rgba(120, 100, 255, .5), transparent 62%),
    radial-gradient(52% 55% at 6% 94%, rgba(52, 96, 190, .32), transparent 64%),
    linear-gradient(160deg, #191c31 0%, #171a2e 54%, #111322 100%);
  display: flex; align-items: center;
}
.login-art::before {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 58px 58px;
  mask-image: radial-gradient(72% 62% at 52% 34%, #000, transparent 82%);
  -webkit-mask-image: radial-gradient(72% 62% at 52% 34%, #000, transparent 82%);
}
.login-art::after {
  content: ""; position: absolute; width: 460px; height: 460px; right: -120px; top: 60px;
  border-radius: 50%; border: 1px solid rgba(139,126,255,.16);
  box-shadow: 0 0 0 74px rgba(139,126,255,.035), 0 0 0 148px rgba(139,126,255,.022);
}
.login-art-inner { position: relative; z-index: 2; max-width: 520px; }
.login-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 12px; border-radius: 999px;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1);
  font-size: 11px; font-weight: 650; color: rgba(255,255,255,.78); letter-spacing: .3px;
}
.login-badge i { width: 7px; height: 7px; border-radius: 50%; background: #43e0a1; box-shadow: 0 0 0 4px rgba(67,224,161,.14); }
.login-art h1 { margin-top: 22px; font-size: clamp(40px, 4.6vw, 62px); font-weight: 840; letter-spacing: -2.6px; line-height: .98; }
.login-art h1 em { font-style: normal; color: #a99cff; }
.login-art > .login-art-inner > p { margin-top: 20px; color: rgba(255,255,255,.62); font-size: 15px; line-height: 1.6; max-width: 430px; }
.login-points { display: flex; flex-direction: column; gap: 10px; margin-top: 38px; }
.login-points > div { padding: 15px 16px; border-radius: 16px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.07); }
.login-points span { font-size: 10px; font-weight: 800; color: #a99cff; letter-spacing: 1px; }
.login-points b { display: block; font-size: 13.5px; font-weight: 700; margin-top: 2px; }
.login-points p { font-size: 11.5px; color: rgba(255,255,255,.48); margin-top: 2px; }
.login-panel { display: flex; align-items: center; justify-content: center; padding: 40px; background: #fff; }
.login-card { width: min(380px, 100%); }
.login-logo { width: 62px; height: 62px; border-radius: 18px; padding: 6px; background: #f1f4fb; border: 1px solid var(--line); }
.login-logo img { width: 100%; height: 100%; object-fit: contain; border-radius: 12px; }
.login-card h2 { margin-top: 20px; font-size: 24px; font-weight: 820; letter-spacing: -.8px; }
.login-sub { margin-top: 5px; color: var(--muted); font-size: 12.5px; }
.login-card .field { margin-top: 18px; }
.login-error { margin-top: 13px; padding: 11px 13px; border-radius: 11px; background: var(--danger-soft); color: var(--danger); font-size: 12px; font-weight: 600; }
.login-card .btn { margin-top: 18px; min-height: 48px; }
.login-note { margin-top: 14px; font-size: 10.5px; color: var(--muted); line-height: 1.55; text-align: center; }

/* ---------- Layout ---------- */
.admin { display: flex; min-height: 100%; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 40;
  width: 252px; display: flex; flex-direction: column;
  color: rgba(255,255,255,.74);
  background: linear-gradient(180deg, #171a2e, #121426);
  border-right: 1px solid rgba(255,255,255,.05);
}
.sidebar-brand { display: flex; align-items: center; gap: 11px; padding: 21px 20px 19px; }
.brand-tile { width: 42px; height: 42px; border-radius: 13px; background: #fff; padding: 4px; flex: 0 0 auto; }
.brand-tile img { width: 100%; height: 100%; object-fit: contain; border-radius: 9px; }
.sidebar-brand > span:last-child b { display: block; color: #fff; font-size: 15.5px; font-weight: 800; letter-spacing: -.2px; line-height: 1.15; }
.sidebar-brand > span:last-child span { display: block; font-size: 8.5px; letter-spacing: 1.1px; color: rgba(255,255,255,.38); margin-top: 2px; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 2px 12px 18px; }
.nav-group { margin-bottom: 18px; }
.nav-label { display: block; padding: 0 10px 7px; font-size: 9px; font-weight: 750; letter-spacing: 1.2px; text-transform: uppercase; color: rgba(255,255,255,.28); }
.nav-item {
  width: 100%; display: flex; align-items: center; gap: 11px;
  padding: 10px 11px; margin-bottom: 2px; border-radius: 11px;
  font-size: 13px; font-weight: 600; color: rgba(255,255,255,.6);
  transition: background .15s, color .15s;
}
.nav-item:hover { background: rgba(255,255,255,.05); color: #fff; }
.nav-item.active { background: linear-gradient(135deg, rgba(123,108,246,.26), rgba(91,141,239,.18)); color: #fff; box-shadow: inset 0 0 0 1px rgba(139,126,255,.18); }
.nav-item svg { flex: 0 0 auto; opacity: .85; }
.nav-item.active svg { color: #b7adff; opacity: 1; }
.nav-count { margin-left: auto; min-width: 20px; height: 19px; padding: 0 6px; border-radius: 7px; background: rgba(255,255,255,.1); color: rgba(255,255,255,.8); font-style: normal; font-size: 10px; font-weight: 750; display: none; align-items: center; justify-content: center; }
.nav-count.show { display: inline-flex; }
.nav-count.hot { background: rgba(216,68,75,.9); color: #fff; }
.sidebar-foot { padding: 15px 14px 16px; border-top: 1px solid rgba(255,255,255,.06); }
.sidebar-user { display: flex; align-items: center; gap: 10px; }
.su-avatar { width: 36px; height: 36px; border-radius: 11px; background: linear-gradient(135deg, #7b6cf6, #5b8def); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; flex: 0 0 auto; }
.su-main { min-width: 0; }
.su-main b { display: block; color: #fff; font-size: 12.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.su-main span { display: block; font-size: 10.5px; color: rgba(255,255,255,.4); }
.sidebar-links { display: flex; justify-content: space-between; gap: 10px; margin-top: 12px; font-size: 10.5px; }
.sidebar-links a, .sidebar-links button { color: rgba(255,255,255,.42); padding: 0; transition: color .15s; }
.sidebar-links a:hover, .sidebar-links button:hover { color: #fff; }

.main { flex: 1; min-width: 0; margin-left: 252px; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 19px 30px 16px;
  background: rgba(242, 244, 249, .92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar-sub { font-size: 9.5px; font-weight: 750; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); }
.topbar h1 { font-size: 22px; font-weight: 820; letter-spacing: -.7px; margin-top: 1px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.status-live { display: inline-flex; align-items: center; gap: 7px; padding: 7px 11px; border-radius: 999px; background: var(--ok-soft); color: var(--ok); font-size: 10.5px; font-weight: 700; }
.status-live i { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(31,157,114,.14); }
.content { padding: 24px 30px 48px; }

/* ---------- Cards/stats ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.card-head h2 { font-size: 15px; font-weight: 780; letter-spacing: -.25px; }
.card-head p { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 14px; }
.stat-card { position: relative; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 16px; }
.stat-card .sc-ic { width: 38px; height: 38px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent); }
.stat-card:nth-child(2) .sc-ic { background: var(--ok-soft); color: var(--ok); }
.stat-card:nth-child(3) .sc-ic { background: #eaf1ff; color: var(--blue); }
.stat-card:nth-child(4) .sc-ic { background: var(--warn-soft); color: var(--warn); }
.stat-card .sc-value { font-size: 26px; font-weight: 820; letter-spacing: -1px; margin-top: 13px; line-height: 1.1; }
.stat-card .sc-label { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.stat-card .sc-extra { margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--line); font-size: 10.5px; color: var(--muted); display: flex; justify-content: space-between; gap: 8px; }
.stat-card .sc-extra b { color: var(--ink-2); font-weight: 700; }
.balance-hero {
  position: relative; overflow: hidden; color: #fff; border-radius: 24px; padding: 24px;
  background:
    radial-gradient(90% 90% at 88% 0%, rgba(151,132,255,.85), transparent 60%),
    linear-gradient(140deg, #211f4a, #372c77 58%, #4a3da5);
  box-shadow: 0 24px 60px rgba(49, 38, 135, .22);
}
.balance-hero::after { content: ""; position: absolute; width: 260px; height: 260px; right: -100px; bottom: -130px; border-radius: 50%; border: 30px solid rgba(255,255,255,.06); }
.balance-hero .bh-label { font-size: 10px; letter-spacing: 1px; text-transform: uppercase; color: rgba(255,255,255,.55); font-weight: 700; }
.balance-hero .bh-value { font-size: 38px; font-weight: 830; letter-spacing: -1.8px; margin-top: 4px; line-height: 1.1; }
.balance-hero .bh-rows { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.balance-hero .bh-row { flex: 1; min-width: 110px; padding: 11px 13px; border-radius: 12px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.07); font-size: 11px; color: rgba(255,255,255,.6); }
.balance-hero .bh-row b { display: block; color: #fff; font-size: 14px; font-weight: 750; margin-top: 2px; }
.overview-grid { display: grid; grid-template-columns: 1.35fr .65fr; gap: 14px; }
.quick-list { display: flex; flex-direction: column; gap: 8px; }
.quick-row { display: flex; align-items: center; gap: 11px; padding: 11px 12px; border-radius: 13px; background: #f7f8fc; transition: background .15s; text-align: left; width: 100%; }
.quick-row:hover { background: #f1f2f9; }
.quick-row .qr-ic { width: 32px; height: 32px; border-radius: 10px; background: #fff; color: var(--accent); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; box-shadow: 0 2px 8px rgba(20,22,45,.05); }
.quick-row .qr-main { flex: 1; min-width: 0; }
.quick-row b { display: block; font-size: 12.5px; font-weight: 700; }
.quick-row span { display: block; font-size: 10.5px; color: var(--muted); }
.quick-row .qr-num { font-size: 15px; font-weight: 800; color: var(--ink-2); }
.chart { display: flex; align-items: flex-end; gap: 6px; height: 170px; padding-top: 10px; }
.chart-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.chart-bars { width: 100%; height: 142px; display: flex; align-items: flex-end; justify-content: center; gap: 3px; }
.chart-bar { flex: 1; max-width: 13px; border-radius: 4px 4px 2px 2px; background: linear-gradient(180deg, #8a7bf8, #6c5ce7); min-height: 2px; }
.chart-bar.ops { background: linear-gradient(180deg, #7fb2ff, #3d7bf0); }
.chart-col small { font-size: 8.5px; color: var(--muted); white-space: nowrap; }
.chart-legend { display: flex; gap: 16px; font-size: 10px; color: var(--muted); margin-bottom: 4px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 5px; }
.chart-legend i { width: 8px; height: 8px; border-radius: 3px; background: #6c5ce7; }
.chart-legend span:last-child i { background: #3d7bf0; }

/* ---------- Tables ---------- */
.toolbar { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .field { flex: 1; min-width: 200px; }
.toolbar .input-wrap input { min-height: 42px; }
.toolbar select { min-height: 42px; width: auto; min-width: 150px; }
.table-wrap { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
th { text-align: left; padding: 11px 15px; font-size: 9.5px; font-weight: 750; letter-spacing: .8px; text-transform: uppercase; color: var(--muted); background: #f8f9fc; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 12px 15px; border-bottom: 1px solid rgba(20,22,43,.05); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .12s; }
tbody tr:hover { background: #fafbfe; }
tr.clickable { cursor: pointer; }
.cell-main { font-weight: 650; color: var(--ink); }
.cell-sub { font-size: 10.5px; color: var(--muted); margin-top: 1px; }
.cell-num { font-weight: 750; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cell-actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.mono { font-family: "SFMono-Regular", ui-monospace, Menlo, Consolas, monospace; font-size: 10.5px; color: var(--muted); }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; border-radius: 7px; font-size: 10px; font-weight: 700; white-space: nowrap; }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-info { background: #eaf1ff; color: #2f6fdc; }
.badge-muted { background: #f0f2f7; color: var(--muted); }
.empty { padding: 46px 20px; text-align: center; color: var(--muted); }
.empty .empty-ic { width: 50px; height: 50px; border-radius: 16px; background: #f2f4f9; color: #9aa0b3; display: flex; align-items: center; justify-content: center; margin: 0 auto 12px; }
.empty b { display: block; color: var(--ink-2); font-size: 13.5px; }
.empty p { font-size: 11.5px; margin-top: 3px; }
.spinner { padding: 42px; display: flex; justify-content: center; }
.spinner i { width: 26px; height: 26px; border-radius: 50%; border: 3px solid #e8eaf3; border-top-color: var(--accent); animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 15px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--muted); }
.pager-actions { display: flex; gap: 6px; }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.form-grid .full { grid-column: 1 / -1; }
.form-hint { font-size: 11px; color: var(--muted); line-height: 1.5; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.settings-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.settings-card h3 { font-size: 14px; font-weight: 780; margin-bottom: 3px; }
.settings-card > p { font-size: 11px; color: var(--muted); margin-bottom: 16px; }
.settings-card .field + .field { margin-top: 12px; }
.rates-table input { min-height: 38px; width: 150px; text-align: right; font-variant-numeric: tabular-nums; }
.rates-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }

/* ---------- Modal ---------- */
.modal-root { position: relative; z-index: 100; }
.modal-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(13, 15, 30, .52); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 22px;
  animation: fadeIn .16s ease;
}
.modal {
  width: min(760px, 100%); max-height: min(88vh, 920px);
  display: flex; flex-direction: column;
  background: #fff; border-radius: 24px; box-shadow: 0 40px 100px rgba(10, 12, 30, .35);
  animation: slideUp .2s ease;
}
.modal.modal-wide { width: min(960px, 100%); }
.modal.modal-narrow { width: min(440px, 100%); }
.modal-head { display: flex; align-items: flex-start; gap: 14px; padding: 20px 22px 15px; border-bottom: 1px solid var(--line); }
.modal-head h2 { font-size: 17px; font-weight: 800; letter-spacing: -.4px; }
.modal-head p { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.modal-close { margin-left: auto; width: 34px; height: 34px; border-radius: 10px; background: #f2f4f9; color: var(--muted); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.modal-close:hover { background: #e9ecf5; color: var(--ink); }
.modal-body { padding: 20px 22px; overflow-y: auto; }
.modal-foot { padding: 14px 22px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(16px); } }

/* ---------- Detail ---------- */
.detail-hero { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; }
.detail-avatar { width: 52px; height: 52px; border-radius: 16px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 800; flex: 0 0 auto; }
.detail-hero h3 { font-size: 17px; font-weight: 800; letter-spacing: -.4px; }
.detail-hero p { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.detail-actions { display: flex; gap: 7px; margin-left: auto; flex-wrap: wrap; }
.detail-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 18px; }
.detail-meta > div { padding: 10px 12px; border-radius: 11px; background: #f7f8fc; }
.detail-meta span { display: block; font-size: 9.5px; color: var(--muted); }
.detail-meta b { display: block; font-size: 12px; font-weight: 700; margin-top: 1px; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 20px 0 9px; }
.section-title h4 { font-size: 12px; font-weight: 780; letter-spacing: -.1px; }
.section-title span { font-size: 10.5px; color: var(--muted); }
.mini-table { border: 1px solid var(--line); border-radius: 13px; overflow: hidden; }
.mini-table table { font-size: 11.5px; }
.mini-table th { padding: 8px 12px; }
.mini-table td { padding: 9px 12px; }
.adjust-box { padding: 14px; border-radius: 14px; background: #f7f8fc; margin-top: 10px; }
.adjust-box .form-grid { gap: 9px; }
.adjust-box input, .adjust-box select { min-height: 38px; background: #fff; }

/* ---------- Chat ---------- */
.chat-box { display: flex; flex-direction: column; height: min(52vh, 460px); border: 1px solid var(--line); border-radius: 15px; overflow: hidden; }
.chat-scroll { flex: 1; overflow-y: auto; padding: 15px; background: #f7f8fc; display: flex; flex-direction: column; gap: 7px; }
.msg { max-width: 78%; padding: 9px 12px; border-radius: 13px 13px 13px 4px; background: #fff; border: 1px solid var(--line); font-size: 12px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.msg.mine { margin-left: auto; border-radius: 13px 13px 4px 13px; background: linear-gradient(135deg, #7b6cf6, #5b8def); color: #fff; border-color: transparent; }
.msg .m-name { display: block; font-size: 9px; font-weight: 750; opacity: .65; margin-bottom: 2px; letter-spacing: .3px; text-transform: uppercase; }
.msg .m-time { display: block; font-size: 8.5px; opacity: .5; margin-top: 3px; text-align: right; }
.chat-composer { display: flex; gap: 7px; padding: 10px; background: #fff; border-top: 1px solid var(--line); }
.chat-composer input { min-height: 40px; }
.chat-composer .btn { min-height: 40px; }

/* ---------- Toast ---------- */
#toast-root { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { padding: 11px 15px; border-radius: 12px; background: var(--navy); color: #fff; font-size: 12px; font-weight: 600; box-shadow: 0 16px 40px rgba(10,12,30,.3); animation: toastIn .2s ease; max-width: 320px; }
.toast.success { background: #176c53; }
.toast.error { background: #a92f37; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .overview-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .login-screen { grid-template-columns: 1fr; }
  .login-art { display: none; }
  .login-panel { min-height: 100vh; padding: 28px; background: #fff; }
  .sidebar { position: static; width: 100%; flex-direction: row; align-items: center; overflow-x: auto; padding: 8px 10px; }
  .sidebar-brand { padding: 4px 10px 4px 4px; flex: 0 0 auto; }
  .sidebar-brand > span:last-child { display: none; }
  .brand-tile { width: 36px; height: 36px; border-radius: 11px; }
  .sidebar-nav { display: flex; gap: 3px; padding: 0; flex: 1; overflow: visible; }
  .nav-group { display: flex; gap: 3px; margin: 0; }
  .nav-label { display: none; }
  .nav-item { width: auto; margin: 0; padding: 9px 11px; font-size: 11.5px; white-space: nowrap; }
  .nav-item svg { display: none; }
  .nav-count { margin-left: 4px; }
  .sidebar-foot { display: none; }
  .admin { flex-direction: column; }
  .main { margin-left: 0; }
  .topbar { padding: 14px 16px 12px; }
  .content { padding: 16px 16px 40px; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .settings-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .detail-meta { grid-template-columns: 1fr 1fr; }
  .chart { gap: 3px; height: 140px; }
  .chart-bars { height: 112px; }
  .chart-col small { font-size: 7px; }
  td, th { padding: 10px 11px; }
  .modal-overlay { padding: 10px; align-items: flex-end; }
  .modal { max-height: 92vh; border-radius: 20px; }
}
@media (max-width: 560px) {
  .stat-grid { grid-template-columns: 1fr; }
  .topbar-actions .status-live { display: none; }
  .toolbar .field { min-width: 100%; }
  .toolbar select { flex: 1; }
  .detail-meta { grid-template-columns: 1fr; }
  .table-wrap { border-radius: 16px; }
  .balance-hero .bh-value { font-size: 30px; }
}
