:root {
  --primary: #080b12;
  --secondary: #101522;
  --card: #171d2b;
  --sidebar: #0b0f18;
  --accent: #d7e0ec;
  --accent-soft: rgba(215, 224, 236, 0.13);
  --accent-2: #34d399;
  --success: #2ee6a8;
  --success-soft: rgba(32, 201, 151, 0.13);
  --warning: #f5b942;
  --warning-soft: rgba(245, 185, 66, 0.13);
  --danger: #f06464;
  --danger-soft: rgba(240, 100, 100, 0.13);
  --info: #4cc9f0;
  --text: #f5f7fa;
  --muted: #929bad;
  --border: #252d3b;
  --border-strong: #33405a;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 22px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.34);
  --shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.2);
  --sidebar-w: 250px;
  --sidebar-collapsed-w: 78px;
  --topbar-h: 70px;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: "SFMono-Regular", "JetBrains Mono", Consolas, monospace;
}

[data-theme="light"] {
  --primary: #f4f6fb;
  --secondary: #ffffff;
  --card: #ffffff;
  --sidebar: #ffffff;
  --accent-soft: rgba(15, 159, 114, 0.12);
  --accent-2: #0f9f72;
  --text: #111827;
  --muted: #64748b;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.1);
  --shadow-soft: 0 8px 24px rgba(15, 23, 42, 0.07);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% -10%, rgba(215, 224, 236, 0.11), transparent 36%),
    radial-gradient(circle at 92% 0%, rgba(52, 211, 153, 0.09), transparent 30%),
    var(--primary);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
body.no-scroll { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .5; }
svg { display: block; }
::selection { background: var(--accent); color: #fff; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 20px; }

.skip { position: fixed; left: -999px; top: 8px; z-index: 200; padding: 10px 14px; background: var(--accent); color: #fff; border-radius: 8px; }
.skip:focus { left: 12px; }
.wrap { width: min(1240px, calc(100% - 40px)); margin: 0 auto; }
.mono { font-family: var(--mono); font-size: .92em; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.center { text-align: center; }
.right { text-align: right; }
.hidden { display: none !important; }
.grow { flex: 1; }
.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wrap-flex { flex-wrap: wrap; }
.stack { display: grid; gap: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.checklist { list-style: none; display: grid; gap: 11px; padding: 0; margin: 0; }
.checklist li { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 12px; }
.checklist svg { width: 16px; height: 16px; flex: 0 0 auto; }
.steps { margin: 0; padding-left: 20px; color: var(--muted); font-size: 13px; line-height: 1.9; }
.check { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.check input { accent-color: var(--accent); width: 16px; height: 16px; }
.sep { height: 1px; background: var(--border); margin: 16px 0; }
.gradient-text { background: linear-gradient(100deg, #fff 8%, var(--accent-2) 55%, #6ee7c8 95%); -webkit-background-clip: text; background-clip: text; color: transparent; }

.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: .13em; font-size: 14px; white-space: nowrap; }
.brand-mark {
  width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px;
  background: linear-gradient(145deg, var(--accent), #4338ca 65%, #2d2a78);
  color: #fff; font-size: 16px; font-weight: 900; letter-spacing: 0;
  box-shadow: 0 8px 24px rgba(105, 92, 255, .35), inset 0 1px 0 rgba(255,255,255,.2);
}
.brand em { color: var(--accent-2); font-style: normal; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 0 16px; border-radius: 11px; border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.012));
  color: var(--text); font-weight: 650; font-size: 13px; transition: .2s ease; white-space: nowrap;
}
.btn:hover { border-color: var(--border-strong); transform: translateY(-1px); box-shadow: var(--shadow-soft); }
.btn:active { transform: translateY(0); }
.btn svg { width: 16px; height: 16px; }
.btn.primary { background: linear-gradient(135deg, #edf2f8 0%, #b9c7d7 48%, #2fd3a1 100%); border-color: transparent; color: #07100d; font-weight: 800; box-shadow: 0 10px 28px rgba(52,211,153,.22); }
.btn.primary:hover { filter: brightness(1.1); }
.btn.success { background: var(--success-soft); border-color: rgba(32,201,151,.35); color: var(--success); }
.btn.danger { background: var(--danger-soft); border-color: rgba(240,100,100,.35); color: var(--danger); }
.btn.ghost { background: transparent; }
.btn.small { min-height: 34px; padding: 0 12px; font-size: 12px; border-radius: 9px; }
.btn.icon-only { width: 40px; padding: 0; }
.btn.small.icon-only { width: 34px; }
.btn.full { width: 100%; }

.icon-btn {
  width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px;
  border: 1px solid var(--border); background: rgba(255,255,255,.02); color: var(--muted); transition: .2s ease; position: relative;
}
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); background: var(--accent-soft); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn .dot { position: absolute; top: 8px; right: 9px; width: 7px; height: 7px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 0 2px var(--card); }

.field { display: grid; gap: 7px; min-width: 0; }
.field > label, .field-label { font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: .05em; text-transform: uppercase; }
.input, .select, .textarea {
  width: 100%; min-height: 42px; padding: 10px 12px; border-radius: 11px;
  border: 1px solid var(--border); background: rgba(255,255,255,.025); color: var(--text); outline: none; transition: .2s ease;
}
.input::placeholder, .textarea::placeholder { color: #5f6b7f; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 17px) 18px, calc(100% - 12px) 18px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
.textarea { min-height: 96px; resize: vertical; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.checkbox-row { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 12px; }
.checkbox-row input { accent-color: var(--accent); width: 16px; height: 16px; }

.site-header { position: sticky; top: 0; z-index: 60; border-bottom: 1px solid var(--border); background: rgba(8,11,18,.82); backdrop-filter: blur(18px); }
.header-inner { height: 68px; display: flex; align-items: center; gap: 26px; }
.topnav { display: flex; align-items: center; gap: 22px; margin-left: auto; }
.topnav a { color: var(--muted); font-size: 13px; font-weight: 600; transition: color .2s; }
.topnav a:hover { color: var(--text); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.nav-toggle { display: none; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border); background: transparent; color: var(--text); font-size: 18px; }

.hero { padding: 92px 0 76px; display: grid; grid-template-columns: 1.15fr .85fr; gap: 60px; align-items: center; }
.hero h1 { font-size: clamp(38px, 5vw, 66px); line-height: 1.05; margin: 18px 0 20px; letter-spacing: -.04em; font-weight: 850; }
.hero p { color: var(--muted); font-size: 17px; max-width: 600px; }
.hero-actions { display: flex; gap: 12px; margin-top: 30px; flex-wrap: wrap; }
.hero-visual { position: relative; min-height: 380px; }
.hero-card { position: absolute; border: 1px solid var(--border); background: linear-gradient(160deg, rgba(23,29,43,.95), rgba(11,15,24,.92)); border-radius: 22px; padding: 20px; box-shadow: var(--shadow); }
.hero-card.one { inset: 20px 40px 50px 0; }
.hero-card.two { right: 0; bottom: 0; width: 230px; animation: float 7s ease-in-out infinite; }
.hero-line { height: 9px; border-radius: 9px; background: var(--border); margin: 12px 0; }
.hero-line.short { width: 54%; }
.hero-line.accent { background: linear-gradient(90deg, var(--accent), var(--accent-2)); width: 70%; }
.section { padding: 66px 0; }
.section-head { max-width: 660px; margin-bottom: 32px; }
.section-head h2 { font-size: clamp(26px, 3vw, 38px); margin: 8px 0 10px; letter-spacing: -.025em; }
.section-head p { color: var(--muted); font-size: 15px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-2); }
.eyebrow:before { content: ""; width: 18px; height: 1px; background: var(--accent); }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.feature-card { padding: 24px; border-radius: var(--radius); border: 1px solid var(--border); background: linear-gradient(160deg, rgba(255,255,255,.035), rgba(255,255,255,.008)); transition: .25s ease; }
.feature-card:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: var(--shadow); }
.feature-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-2); display: grid; place-items: center; margin-bottom: 16px; }
.feature-icon svg { width: 21px; height: 21px; }
.feature-card h3 { margin: 0 0 8px; font-size: 17px; }
.feature-card p { margin: 0; color: var(--muted); font-size: 13px; }
.site-footer { border-top: 1px solid var(--border); margin-top: 40px; padding: 46px 0 24px; background: rgba(0,0,0,.16); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.footer-grid h4 { margin: 0 0 14px; font-size: 13px; }
.footer-grid a { display: block; color: var(--muted); font-size: 13px; margin: 8px 0; }
.footer-grid a:hover { color: var(--text); }
.footer-brand { margin-bottom: 14px; }
.footer-bottom { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--border); margin-top: 34px; padding-top: 20px; color: var(--muted); font-size: 12px; }

.login-shell { min-height: calc(100vh - 68px); display: grid; grid-template-columns: 1fr 480px; }
.login-aside { padding: 70px 8vw; display: flex; flex-direction: column; justify-content: center; border-right: 1px solid var(--border); position: relative; overflow: hidden; }
.login-aside:after { content: ""; position: absolute; width: 480px; height: 480px; border-radius: 50%; background: radial-gradient(circle, rgba(105,92,255,.2), transparent 65%); right: -160px; bottom: -180px; pointer-events: none; }
.login-aside h1 { font-size: clamp(34px, 4vw, 58px); line-height: 1.08; letter-spacing: -.04em; margin: 18px 0; }
.login-aside p { color: var(--muted); font-size: 16px; max-width: 560px; }
.login-trust { display: flex; gap: 22px; margin-top: 34px; flex-wrap: wrap; }
.login-trust div { border-left: 2px solid var(--accent); padding-left: 12px; }
.login-trust strong { display: block; font-size: 19px; }
.login-trust span { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.login-panel { display: grid; place-items: center; padding: 40px; }
.login-card { width: min(100%, 390px); padding: 30px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: linear-gradient(160deg, rgba(23,29,43,.95), rgba(13,17,27,.96)); box-shadow: var(--shadow); }
.login-card h2 { margin: 20px 0 4px; font-size: 25px; letter-spacing: -.02em; }
.login-card > p { color: var(--muted); margin: 0 0 22px; font-size: 13px; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 12px; background: rgba(255,255,255,.035); border: 1px solid var(--border); }
.tab { padding: 9px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-weight: 700; font-size: 12px; transition: .2s; }
.tab.active { background: var(--accent); color: #fff; box-shadow: 0 6px 18px rgba(105,92,255,.3); }
.login-form { display: grid; gap: 14px; margin-top: 20px; }
.login-note { margin-top: 18px; padding: 11px 12px; border-radius: 10px; background: var(--warning-soft); color: var(--warning); font-size: 11px; border: 1px solid rgba(245,185,66,.22); }

.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); z-index: 90;
  background: linear-gradient(180deg, var(--sidebar), #080b12);
  border-right: 1px solid var(--border); display: flex; flex-direction: column; transition: width .25s ease, transform .25s ease;
}
.sidebar.collapsed { width: var(--sidebar-collapsed-w); }
.sidebar-brand { height: var(--topbar-h); display: flex; align-items: center; gap: 10px; padding: 0 18px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.sidebar-brand .brand-name { display: grid; transition: opacity .2s; white-space: nowrap; }
.sidebar.collapsed .brand-name { opacity: 0; pointer-events: none; }
.sidebar-scroll { overflow: auto; padding: 14px 10px 20px; flex: 1; scrollbar-width: thin; }
.nav-group { margin-bottom: 8px; }
.nav-group-title { display: flex; align-items: center; justify-content: space-between; padding: 12px 10px 6px; color: #5f6b7f; font-size: 10px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; white-space: nowrap; }
.sidebar.collapsed .nav-group-title { justify-content: center; font-size: 0; }
.sidebar.collapsed .nav-group-title:after { content: "•••"; font-size: 10px; letter-spacing: 2px; }
.nav-item {
  width: 100%; display: flex; align-items: center; gap: 11px; min-height: 39px; padding: 0 11px; margin: 2px 0;
  border: 1px solid transparent; border-radius: 10px; background: transparent; color: var(--muted); font-size: 12.5px; font-weight: 600; text-align: left; transition: .18s ease; position: relative;
}
.nav-item svg { width: 17px; height: 17px; flex: 0 0 auto; }
.nav-item span:first-of-type { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-item:hover { background: rgba(255,255,255,.035); color: var(--text); }
.nav-item.active { background: linear-gradient(90deg, var(--accent-soft), rgba(105,92,255,.02)); color: var(--text); border-color: rgba(105,92,255,.22); }
.nav-item.active:before { content: ""; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 4px 4px 0; background: var(--accent); }
.nav-item.active svg { color: var(--accent-2); }
.nav-badge { margin-left: auto; min-width: 19px; height: 18px; display: grid; place-items: center; padding: 0 5px; border-radius: 20px; background: var(--danger-soft); color: var(--danger); font-size: 10px; font-weight: 800; }
.sidebar.collapsed .nav-item { justify-content: center; padding: 0; }
.sidebar.collapsed .nav-item span, .sidebar.collapsed .nav-badge { display: none; }
.sidebar-footer { padding: 12px; border-top: 1px solid var(--border); }
.sidebar-status { display: flex; align-items: center; gap: 9px; padding: 10px; border-radius: 10px; background: rgba(255,255,255,.025); color: var(--muted); font-size: 11px; }
.sidebar-status .live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px var(--success-soft); flex: 0 0 auto; }
.sidebar.collapsed .sidebar-status span { display: none; }

.main-area { margin-left: var(--sidebar-w); min-height: 100vh; transition: margin-left .25s ease; }
.app-shell.sidebar-collapsed .main-area { margin-left: var(--sidebar-collapsed-w); }
.topbar { height: var(--topbar-h); position: sticky; top: 0; z-index: 70; display: flex; align-items: center; gap: 14px; padding: 0 26px; border-bottom: 1px solid var(--border); background: rgba(8,11,18,.78); backdrop-filter: blur(18px); }
[data-theme="light"] .topbar, [data-theme="light"] .site-header { background: rgba(255,255,255,.82); }
.topbar-title { display: none; }
.topbar-search { position: relative; flex: 1; max-width: 420px; }
.topbar-search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted); }
.topbar-search input { width: 100%; height: 40px; padding: 0 14px 0 40px; border-radius: 11px; border: 1px solid var(--border); background: rgba(255,255,255,.025); color: var(--text); outline: none; }
.topbar-search input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.range-select { min-height: 38px; padding: 0 32px 0 12px; border-radius: 11px; border: 1px solid var(--border); background-color: rgba(255,255,255,.025); color: var(--text); font-size: 12px; appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 15px) 17px, calc(100% - 10px) 17px; background-size: 5px 5px; background-repeat: no-repeat; }
.profile-btn { display: flex; align-items: center; gap: 9px; min-height: 40px; padding: 4px 9px 4px 4px; border-radius: 12px; border: 1px solid var(--border); background: rgba(255,255,255,.025); color: var(--text); }
.avatar { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(135deg, var(--accent), #2d2a78); color: #fff; font-size: 12px; font-weight: 800; flex: 0 0 auto; }
.avatar.soft { background: var(--accent-soft); color: var(--accent-2); }
.profile-btn .profile-meta { display: grid; text-align: left; line-height: 1.2; }
.profile-btn .profile-meta strong { font-size: 12px; }
.profile-btn .profile-meta small { color: var(--muted); font-size: 10px; }
.dropdown { position: absolute; top: calc(100% + 10px); right: 0; min-width: 210px; padding: 8px; border-radius: 13px; border: 1px solid var(--border); background: var(--card); box-shadow: var(--shadow); z-index: 100; animation: pop .16s ease; }
.dropdown-wrap { position: relative; }
.dropdown-head { padding: 10px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.dropdown-head strong { display: block; font-size: 12px; }
.dropdown-head small { color: var(--muted); }
.dropdown button, .dropdown a { width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 0; border-radius: 9px; background: transparent; color: var(--text); text-align: left; font-size: 12px; }
.dropdown button:hover, .dropdown a:hover { background: var(--accent-soft); }
.dropdown svg { width: 15px; height: 15px; color: var(--muted); }
.notification-list { max-height: 360px; overflow: auto; }
.notification-item { padding: 11px 10px; border-bottom: 1px solid var(--border); }
.notification-item strong { display: block; font-size: 12px; }
.notification-item small { color: var(--muted); font-size: 11px; }

.content { padding: 26px; max-width: 1720px; margin: 0 auto; animation: fadeUp .3s ease; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font-size: 26px; letter-spacing: -.025em; margin: 6px 0 3px; }
.page-head p { margin: 0; color: var(--muted); font-size: 13px; }
.page-actions { display: flex; gap: 9px; flex-wrap: wrap; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; margin-bottom: 18px; }
.stat-card { position: relative; overflow: hidden; padding: 18px; border-radius: var(--radius); border: 1px solid var(--border); background: linear-gradient(155deg, rgba(255,255,255,.04), rgba(255,255,255,.008)); min-height: 132px; transition: .22s ease; }
.stat-card:hover { transform: translateY(-3px); border-color: var(--border-strong); box-shadow: var(--shadow-soft); }
.stat-card:after { content: ""; position: absolute; width: 120px; height: 120px; right: -50px; top: -55px; border-radius: 50%; background: radial-gradient(circle, var(--accent-soft), transparent 68%); }
.stat-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 12px; font-weight: 600; }
.stat-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-2); }
.stat-icon svg { width: 17px; height: 17px; }
.stat-icon.success { background: var(--success-soft); color: var(--success); }
.stat-icon.warning { background: var(--warning-soft); color: var(--warning); }
.stat-icon.danger { background: var(--danger-soft); color: var(--danger); }
.stat-value { font-size: 27px; font-weight: 800; letter-spacing: -.03em; margin-top: 12px; line-height: 1.1; }
.stat-foot { display: flex; align-items: center; gap: 7px; margin-top: 8px; color: var(--muted); font-size: 11px; }
.trend { display: inline-flex; align-items: center; gap: 3px; font-weight: 750; }
.trend.up { color: var(--success); }
.trend.down { color: var(--danger); }
.trend.flat { color: var(--muted); }

.panel { border: 1px solid var(--border); border-radius: var(--radius); background: linear-gradient(160deg, rgba(255,255,255,.028), rgba(255,255,255,.006)); overflow: hidden; box-shadow: var(--shadow-soft); }
.panel + .panel { margin-top: 18px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 17px 19px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.panel-title { font-size: 14px; font-weight: 750; }
.panel-subtitle { color: var(--muted); font-size: 11px; margin-top: 2px; }
.panel-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.panel-body { padding: 19px; }
.panel-body.tight { padding: 0; }
.panel-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; align-items: start; }
.panel-grid.three { grid-template-columns: 1fr 1fr 1fr; }
.panel-grid .panel + .panel { margin-top: 0; }
.chart { width: 100%; height: 280px; overflow: visible; }
.chart.small { height: 210px; }
.chart .grid-line { stroke: var(--border); stroke-width: 1; stroke-dasharray: 3 5; }
.chart .axis-label { fill: var(--muted); font-size: 10px; font-family: var(--font); }
.chart .area { opacity: .85; }
.chart .line { fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.chart .bar { transition: opacity .2s, transform .2s; transform-origin: bottom; animation: growBar .55s ease both; }
.chart .bar:hover { opacity: .75; }
.chart .donut-segment { transition: opacity .2s; cursor: pointer; }
.chart .donut-segment:hover { opacity: .75; }
.chart-legend { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 0 19px 16px; color: var(--muted); font-size: 11px; }
.legend-item { display: inline-flex; align-items: center; gap: 7px; }
.legend-swatch { width: 9px; height: 9px; border-radius: 3px; }

.data-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.data-table th { padding: 11px 15px; text-align: left; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; background: rgba(255,255,255,.018); border-bottom: 1px solid var(--border); white-space: nowrap; }
.data-table td { padding: 12px 15px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.data-table tbody tr { transition: background .18s; }
.data-table tbody tr:hover { background: rgba(105,92,255,.045); }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table .amount { font-family: var(--mono); font-weight: 700; }
.table-wrap { overflow: auto; max-width: 100%; }
.table-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 16px; border-top: 1px solid var(--border); color: var(--muted); font-size: 11px; flex-wrap: wrap; }
.status { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 20px; font-size: 10px; font-weight: 800; letter-spacing: .03em; white-space: nowrap; }
.status:before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status.success { background: var(--success-soft); color: var(--success); }
.status.warning { background: var(--warning-soft); color: var(--warning); }
.status.danger { background: var(--danger-soft); color: var(--danger); }
.status.info { background: rgba(76,201,240,.12); color: var(--info); }
.status.neutral { background: rgba(146,155,173,.12); color: var(--muted); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 8px; background: rgba(255,255,255,.04); border: 1px solid var(--border); color: var(--muted); font-size: 10.5px; font-weight: 650; white-space: nowrap; }
.progress { width: 100%; height: 6px; border-radius: 6px; background: var(--border); overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.entity { display: flex; align-items: center; gap: 10px; }
.entity .entity-meta { display: grid; line-height: 1.3; }
.entity .entity-meta small { color: var(--muted); font-size: 10px; }
.table-action { padding: 5px 9px; border-radius: 8px; border: 1px solid var(--border); background: transparent; color: var(--muted); font-size: 11px; }
.table-action:hover { color: var(--text); border-color: var(--accent); }
.filter-bar { display: grid; grid-template-columns: 1.5fr repeat(3, minmax(130px, 1fr)) auto; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border); align-items: end; }
.filter-bar .input, .filter-bar .select { min-height: 38px; font-size: 12px; }

.empty-state { padding: 50px 20px; text-align: center; color: var(--muted); }
.empty-state svg { width: 40px; height: 40px; margin: 0 auto 12px; color: var(--border-strong); }
.empty-state h3 { color: var(--text); margin: 0 0 6px; font-size: 14px; }
.empty-state p { margin: 0 auto; max-width: 420px; font-size: 12px; }
.skeleton { border-radius: 8px; background: linear-gradient(90deg, rgba(255,255,255,.035) 25%, rgba(255,255,255,.075) 50%, rgba(255,255,255,.035) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
.skeleton-line { height: 12px; margin: 12px 0; }
.skeleton-card { height: 132px; border-radius: var(--radius); border: 1px solid var(--border); padding: 18px; }

.modal-backdrop { position: fixed; inset: 0; z-index: 150; display: grid; place-items: center; padding: 20px; background: rgba(3,5,10,.72); backdrop-filter: blur(5px); animation: fade .18s ease; }
.modal-card { width: min(680px, 100%); max-height: min(86vh, 900px); overflow: auto; border-radius: var(--radius-lg); border: 1px solid var(--border-strong); background: linear-gradient(160deg, var(--card), var(--secondary)); box-shadow: var(--shadow); animation: pop .2s ease; }
.modal-card.wide { width: min(940px, 100%); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.modal-head h3 { margin: 0; font-size: 16px; }
.modal-body { padding: 20px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 9px; padding: 15px 20px; border-top: 1px solid var(--border); }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.detail-item { padding: 12px; border-radius: 11px; border: 1px solid var(--border); background: rgba(255,255,255,.02); }
.detail-item small { display: block; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; }
.detail-item strong { display: block; margin-top: 4px; font-size: 12.5px; word-break: break-word; }

.toast { position: fixed; right: 22px; bottom: 22px; z-index: 200; min-width: 250px; max-width: 420px; padding: 13px 15px; border-radius: 12px; border: 1px solid var(--border-strong); background: var(--card); box-shadow: var(--shadow); font-size: 12px; animation: pop .2s ease; }
.toast.success { border-color: rgba(32,201,151,.45); color: var(--success); }
.toast.error { border-color: rgba(240,100,100,.45); color: var(--danger); }
.mobile-nav { display: none; }
.sidebar-backdrop { display: none; }
.info-banner { display: flex; gap: 12px; align-items: flex-start; padding: 13px 15px; border-radius: 12px; border: 1px solid rgba(245,185,66,.22); background: var(--warning-soft); color: var(--warning); font-size: 12px; margin-bottom: 18px; }
.info-banner svg { width: 17px; height: 17px; flex: 0 0 auto; margin-top: 1px; }
.kv-list { display: grid; gap: 9px; }
.kv { display: flex; justify-content: space-between; gap: 14px; padding-bottom: 8px; border-bottom: 1px dashed var(--border); font-size: 12px; }
.kv span { color: var(--muted); }
.kv strong { text-align: right; word-break: break-word; }
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mini-stat { padding: 12px; border-radius: 11px; border: 1px solid var(--border); background: rgba(255,255,255,.02); }
.mini-stat small { color: var(--muted); font-size: 10px; display: block; }
.mini-stat strong { font-size: 16px; display: block; margin-top: 3px; }
.code-block { padding: 14px; border-radius: 11px; background: #05070c; border: 1px solid var(--border); color: #b9c6dd; font-family: var(--mono); font-size: 11px; overflow: auto; white-space: pre; }
.timeline { display: grid; gap: 0; }
.timeline-item { display: grid; grid-template-columns: 28px 1fr; gap: 12px; padding: 0 0 18px; position: relative; }
.timeline-item:before { content: ""; position: absolute; left: 13px; top: 20px; bottom: 0; width: 1px; background: var(--border); }
.timeline-item:last-child:before { display: none; }
.timeline-dot { width: 27px; height: 27px; border-radius: 9px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-2); z-index: 1; }
.timeline-dot svg { width: 14px; height: 14px; }
.timeline-item strong { font-size: 12px; }
.timeline-item small { color: var(--muted); display: block; font-size: 11px; }

.pilot-banner { border-color: rgba(245,185,66,.38); background: linear-gradient(100deg, rgba(245,185,66,.14), rgba(52,211,153,.08)); color: #f6d48a; }
.pilot-banner strong { display: block; color: #fff; letter-spacing: .01em; }
.pilot-banner span { display: block; margin-top: 3px; color: var(--muted); }
.nav-item.disabled { opacity: .42; cursor: not-allowed; }
.nav-item.disabled small { margin-left: auto; display: grid; }
.nav-item.disabled small svg { width: 12px; height: 12px; }
.flow-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.flow-grid > div { padding: 14px; border-radius: 12px; border: 1px solid var(--border); background: linear-gradient(145deg, rgba(255,255,255,.045), rgba(255,255,255,.01)); }
.flow-grid span { display: grid; place-items: center; width: 26px; height: 26px; margin-bottom: 9px; border-radius: 8px; background: var(--accent-soft); color: var(--accent-2); font-weight: 800; }
.flow-grid strong { display: block; font-size: 12px; }
.flow-grid p { margin: 5px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.workflow-list { display: grid; gap: 8px; }
.workflow-list > div { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.workflow-list span { padding: 5px 8px; border-radius: 7px; border: 1px solid var(--border); background: rgba(255,255,255,.03); color: var(--muted); font-family: var(--mono); font-size: 10px; }
.qr-frame { display: grid; place-items: center; padding: 14px; border-radius: 14px; border: 1px solid var(--border); background: #fff; }
.qr-image { display: block; width: min(260px, 100%); height: auto; image-rendering: pixelated; }
.button-row { display: flex; flex-wrap: wrap; gap: 9px; }
.amount { color: var(--success); font-family: var(--mono); font-weight: 800; }
.check input { accent-color: var(--accent-2); }
.mono { letter-spacing: -.01em; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: scale(.96) translateY(5px); } to { opacity: 1; transform: none; } }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes growBar { from { transform: scaleY(0); opacity: 0; } to { transform: scaleY(1); opacity: 1; } }

@media (max-width: 1180px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .panel-grid, .panel-grid.three { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-bar { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .filter-bar .btn { grid-column: auto; }
}
@media (max-width: 900px) {
  .topnav { display: none; }
  .nav-toggle { display: grid; place-items: center; }
  .hero { grid-template-columns: 1fr; padding-top: 56px; }
  .hero-visual { display: none; }
  .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
  .flow-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .login-shell { grid-template-columns: 1fr; }
  .login-aside { display: none; }
}
@media (max-width: 760px) {
  .sidebar { transform: translateX(-100%); width: var(--sidebar-w) !important; box-shadow: var(--shadow); }
  .sidebar.mobile-open { transform: none; }
  .sidebar.collapsed .brand-name, .sidebar.collapsed .nav-item span, .sidebar.collapsed .nav-badge, .sidebar.collapsed .nav-group-title { opacity: 1; display: initial; }
  .sidebar.collapsed .nav-item { justify-content: flex-start; padding: 0 11px; }
  .sidebar.collapsed .nav-group-title { justify-content: space-between; font-size: 10px; }
  .sidebar-backdrop.visible { display: block; position: fixed; inset: 0; z-index: 85; background: rgba(0,0,0,.6); }
  .main-area, .app-shell.sidebar-collapsed .main-area { margin-left: 0; }
  .topbar { padding: 0 14px; gap: 9px; }
  .topbar-search { max-width: none; }
  .topbar-search input { padding-left: 36px; }
  .range-select, .profile-btn .profile-meta, .topbar .help-btn { display: none; }
  .profile-btn { padding: 4px; }
  .content { padding: 18px 14px 90px; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 11px; }
  .stat-value { font-size: 22px; }
  .panel-body { padding: 14px; }
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: auto; }
  .filter-bar { grid-template-columns: 1fr 1fr; }
  .filter-bar > *:first-child { grid-column: 1 / -1; }
  .footer-grid, .footer-bottom { grid-template-columns: 1fr; }
  .footer-bottom { display: grid; }
  .mobile-nav { position: fixed; left: 10px; right: 10px; bottom: 10px; z-index: 80; display: grid; grid-template-columns: repeat(5, 1fr); padding: 7px; border-radius: 16px; border: 1px solid var(--border-strong); background: rgba(11,15,24,.94); backdrop-filter: blur(16px); box-shadow: var(--shadow); }
  .mobile-nav button { display: grid; gap: 3px; place-items: center; border: 0; background: transparent; color: var(--muted); font-size: 9px; padding: 5px 0; }
  .mobile-nav button.active { color: var(--accent-2); }
  .mobile-nav svg { width: 18px; height: 18px; }
  .modal-backdrop { padding: 10px; align-items: end; }
  .modal-card { border-radius: 18px 18px 10px 10px; max-height: 90vh; }
  .detail-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .stat-grid { grid-template-columns: 1fr; }
  .flow-grid { grid-template-columns: 1fr; }
  .topbar-title { display: block; font-size: 12px; font-weight: 800; white-space: nowrap; }
  .topbar-search { display: none; }
  .page-actions .btn { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *:before, *:after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
