:root {
  --brand: #0d9488;
  --brand-strong: #0f766e;
  --brand-bright: #14b8a6;
  --brand-soft: #ccfbf1;
  --brand-ink: #134e4a;
  --sidebar: #0b1120;
  --sidebar-2: #0f172a;
  --sidebar-line: #1e293b;
  --sidebar-text: #94a3b8;
  --bg: #f1f5f9;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --success: #059669;
  --success-soft: #d1fae5;
  --warning: #d97706;
  --warning-soft: #fef3c7;
  --danger: #dc2626;
  --danger-soft: #fee2e2;
  --info: #2563eb;
  --info-soft: #dbeafe;
  --purple: #7c3aed;
  --purple-soft: #ede9fe;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05);
  --shadow: 0 8px 24px -12px rgba(15, 23, 42, .18);
  --shadow-lg: 0 24px 70px -24px rgba(15, 23, 42, .35);
  --sidebar-width: 272px;
  --topbar-height: 64px;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", ui-monospace, "Cascadia Code", "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
img, svg { max-width: 100%; }
h1, h2, h3, h4, h5, p { margin: 0; }
::selection { background: var(--brand-bright); color: white; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
.sidebar ::-webkit-scrollbar-thumb { background: #334155; }

.brand-mark { width: 38px; height: 38px; flex: 0 0 auto; border-radius: 11px; box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 8px 24px -8px rgba(20,184,166,.65); }
.brand-lockup { display: flex; align-items: center; gap: 11px; min-width: 0; }
.brand-name { color: #fff; font-weight: 700; font-size: 15px; letter-spacing: .01em; line-height: 1.2; }
.brand-sub { color: var(--brand-bright); font-size: 9px; text-transform: uppercase; letter-spacing: .22em; font-weight: 700; margin-top: 2px; }

.shell { min-height: 100vh; display: flex; }
.sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 50;
  border-right: 1px solid var(--sidebar-line);
  transform: translateX(0);
  transition: transform .24s ease;
}
.sidebar-head { height: var(--topbar-height); display: flex; align-items: center; padding: 0 20px; border-bottom: 1px solid var(--sidebar-line); background: rgba(0,0,0,.18); flex: 0 0 auto; }
.sidebar-search { padding: 15px 14px 8px; flex: 0 0 auto; }
.sidebar-search .search-wrap { position: relative; }
.sidebar-search input {
  width: 100%;
  background: rgba(30,41,59,.62);
  border: 1px solid #1e293b;
  color: #e2e8f0;
  border-radius: 8px;
  padding: 8px 10px 8px 31px;
  font-size: 12.5px;
  outline: none;
  transition: border-color .15s, background .15s;
}
.sidebar-search input::placeholder { color: #64748b; }
.sidebar-search input:focus { border-color: var(--brand); background: #162033; }
.sidebar-search i { position: absolute; left: 11px; top: 10px; font-size: 11px; color: #64748b; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 4px 12px 24px; }
.nav-label { padding: 16px 12px 7px; font-size: 9.5px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: #475569; }
.nav-group { margin: 0; }
.nav-group summary { list-style: none; }
.nav-group summary::-webkit-details-marker { display: none; }
.nav-parent {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 10px; border-radius: 8px; color: #cbd5e1;
  cursor: pointer; font-size: 13px; font-weight: 500; user-select: none;
  transition: background .15s, color .15s;
}
.nav-parent:hover { background: #1e293b; color: #fff; }
.nav-parent span { display: flex; align-items: center; gap: 10px; min-width: 0; }
.nav-parent i.nav-icon { width: 18px; text-align: center; color: #94a3b8; font-size: 13px; }
.nav-parent .chev { font-size: 9px; color: #64748b; transition: transform .2s; }
.nav-group[open] .nav-parent .chev { transform: rotate(90deg); }
.nav-group.active > .nav-parent { color: #fff; background: rgba(20,184,166,.09); }
.nav-group.active > .nav-parent i.nav-icon { color: var(--brand-bright); }
.nav-children { padding: 2px 0 4px 17px; margin-left: 14px; border-left: 1px solid #1e293b; display: none; }
.nav-group[open] .nav-children { display: block; }
.nav-children a { display: block; padding: 7px 10px; margin: 1px 0; border-radius: 6px; color: #94a3b8; font-size: 12.5px; transition: color .15s, background .15s; }
.nav-children a:hover { color: #fff; background: #1e293b; }
.nav-children a.active { color: var(--brand-bright); background: rgba(20,184,166,.08); font-weight: 600; }
.nav-link { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: #cbd5e1; font-size: 13px; font-weight: 500; transition: background .15s, color .15s; }
.nav-link:hover { background: #1e293b; color: #fff; }
.nav-link.active { color: #fff; background: linear-gradient(90deg, rgba(20,184,166,.18), rgba(20,184,166,.05)); box-shadow: inset 2px 0 0 var(--brand-bright); }
.nav-link i { width: 18px; text-align: center; color: #94a3b8; font-size: 13px; }
.nav-link.active i { color: var(--brand-bright); }
.nav-badge { margin-left: auto; font-size: 9px; font-weight: 700; background: var(--danger); color: #fff; padding: 2px 6px; border-radius: 20px; }
.sidebar-foot { flex: 0 0 auto; padding: 14px 18px; border-top: 1px solid var(--sidebar-line); background: rgba(0,0,0,.18); display: flex; justify-content: space-between; align-items: center; color: #64748b; font-size: 10.5px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); display: inline-block; }
.dot.pulse { animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(5,150,105,.5); } 50% { box-shadow: 0 0 0 4px rgba(5,150,105,0); } }

.main { margin-left: var(--sidebar-width); flex: 1; min-width: 0; min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  height: var(--topbar-height); background: var(--surface); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 16px; padding: 0 26px;
  position: sticky; top: 0; z-index: 30;
}
.topbar-title { font-size: 15px; font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-sub { font-size: 11px; color: var(--muted); margin-top: 1px; }
.topbar-spacer { flex: 1; }
.topbar-item { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11.5px; font-weight: 500; }
.topbar-chip { background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; color: var(--ink-2); }
.topbar-icon { width: 36px; height: 36px; border-radius: 9px; border: 1px solid var(--line); background: #fff; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; position: relative; }
.topbar-icon:hover { color: var(--brand); border-color: var(--brand-soft); background: #f0fdfa; }
.topbar-icon .notice-dot { position: absolute; top: 7px; right: 8px; width: 6px; height: 6px; background: var(--danger); border-radius: 50%; }
.mobile-toggle { display: none; }
.profile { position: relative; }
.profile summary { list-style: none; display: flex; align-items: center; gap: 9px; cursor: pointer; padding-left: 14px; border-left: 1px solid var(--line); }
.profile summary::-webkit-details-marker { display: none; }
.avatar { width: 33px; height: 33px; border-radius: 9px; background: linear-gradient(135deg, #0f172a, #1e293b); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.profile-name { font-size: 12.5px; font-weight: 600; color: var(--ink); }
.profile-role { font-size: 10px; color: var(--muted); }
.profile-menu { position: absolute; right: 0; top: calc(100% + 12px); width: 220px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 80; }
.profile-menu a, .profile-menu button { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: none; border: 0; color: var(--ink-2); padding: 9px 10px; border-radius: 7px; font-size: 12.5px; }
.profile-menu a:hover, .profile-menu button:hover { background: var(--surface-2); color: var(--brand-strong); }
.profile-menu .divider { height: 1px; background: var(--line); margin: 5px 4px; }
.profile-menu form { margin: 0; }

.content { padding: 26px; max-width: 1600px; width: 100%; margin: 0 auto; }
.content.wide { max-width: none; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.page-head h1 { font-size: 21px; letter-spacing: -.02em; font-weight: 750; }
.page-head p { color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.page-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.breadcrumb { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11.5px; margin-bottom: 8px; }
.breadcrumb a:hover { color: var(--brand-strong); }
.breadcrumb i { font-size: 8px; color: var(--line-strong); }

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.wrap { flex-wrap: wrap; }
.mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; } .mt-5 { margin-top: 24px; }
.mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 12px; } .mb-4 { margin-bottom: 16px; } .mb-5 { margin-bottom: 24px; }
.muted { color: var(--muted); }
.small { font-size: 11.5px; }
.tiny { font-size: 10.5px; }
.mono { font-family: var(--mono); font-size: 11.5px; }
.strong { font-weight: 650; }
.text-brand { color: var(--brand-strong); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-pad { padding: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.card-head h2, .card-head h3 { font-size: 13.5px; font-weight: 700; }
.card-head p { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.card-body { padding: 20px; }
.card-foot { padding: 13px 20px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); font-size: 11.5px; color: var(--muted); }
.card-hover { transition: transform .18s, box-shadow .18s, border-color .18s; }
.card-hover:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--line-strong); }

.stat { padding: 18px; position: relative; overflow: hidden; }
.stat-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.stat-title { display: flex; align-items: center; gap: 8px; font-size: 11.5px; font-weight: 650; color: var(--ink-2); }
.stat-title i { color: var(--brand); }
.stat-value { font-size: 27px; font-weight: 750; letter-spacing: -.03em; margin-top: 13px; line-height: 1; }
.stat-unit { font-size: 11px; font-weight: 500; color: var(--muted); margin-left: 2px; }
.stat-meta { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 10px; font-weight: 550; margin-top: 11px; }
.stat-icon { width: 34px; height: 34px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; }
.ic-teal { background: #f0fdfa; color: var(--brand); }
.ic-blue { background: #eff6ff; color: #2563eb; }
.ic-purple { background: #f5f3ff; color: #7c3aed; }
.ic-amber { background: #fffbeb; color: #d97706; }
.ic-green { background: #ecfdf5; color: #059669; }
.ic-red { background: #fef2f2; color: #dc2626; }
.ic-slate { background: #f8fafc; color: #475569; }

.progress { height: 7px; border-radius: 20px; background: #eef2f7; overflow: hidden; margin-top: 12px; }
.progress > span { display: block; height: 100%; border-radius: inherit; background: var(--brand-bright); transition: width .4s ease; }
.progress.blue > span { background: #3b82f6; }
.progress.purple > span { background: #8b5cf6; }
.progress.amber > span { background: #f59e0b; }
.progress.red > span { background: #ef4444; }
.progress.green > span { background: #10b981; }

.badge { display: inline-flex; align-items: center; gap: 5px; border-radius: 20px; padding: 3px 8px; font-size: 9.5px; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.badge i { font-size: 7px; }
.badge-success { color: #047857; background: var(--success-soft); }
.badge-danger { color: #b91c1c; background: var(--danger-soft); }
.badge-warning { color: #b45309; background: var(--warning-soft); }
.badge-info { color: #1d4ed8; background: var(--info-soft); }
.badge-purple { color: #6d28d9; background: var(--purple-soft); }
.badge-muted { color: #475569; background: #f1f5f9; }
.badge-outline { border: 1px solid var(--line); background: #fff; color: var(--muted); }
.badge-brand { color: var(--brand-ink); background: var(--brand-soft); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border-radius: 8px; border: 1px solid transparent; padding: 8px 13px; font-size: 12px; font-weight: 650; line-height: 1.2; transition: background .15s, border-color .15s, color .15s, box-shadow .15s; white-space: nowrap; }
.btn i { font-size: 11px; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 7px 18px -8px rgba(13,148,136,.75); }
.btn-primary:hover { background: var(--brand-strong); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #1e293b; }
.btn-secondary { background: #fff; border-color: var(--line-strong); color: var(--ink-2); }
.btn-secondary:hover { background: var(--surface-2); border-color: var(--muted-2); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn-danger { background: #fff; border-color: #fecaca; color: var(--danger); }
.btn-danger:hover { background: #fef2f2; }
.btn-danger-solid { background: var(--danger); color: #fff; }
.btn-danger-solid:hover { background: #b91c1c; }
.btn-sm { padding: 6px 9px; font-size: 10.5px; border-radius: 7px; }
.btn-lg { padding: 11px 18px; font-size: 13px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-icon { width: 31px; height: 31px; padding: 0; }
.btn-group { display: inline-flex; gap: 5px; align-items: center; }
.link { color: var(--brand-strong); font-weight: 600; }
.link:hover { text-decoration: underline; text-underline-offset: 2px; }

.alert { display: flex; align-items: flex-start; gap: 10px; padding: 11px 13px; border-radius: 9px; font-size: 12px; line-height: 1.5; border: 1px solid transparent; margin-bottom: 16px; }
.alert i { margin-top: 2px; font-size: 12px; }
.alert strong { font-weight: 700; }
.alert a { font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.alert-success { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.alert-error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.alert-warning { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.alert-info { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }
.alert-banner { background: linear-gradient(105deg, #0b1120, #0f2c2b); border-color: rgba(20,184,166,.4); color: #e2e8f0; }
.alert-banner .banner-icon { width: 34px; height: 34px; border-radius: 9px; background: rgba(20,184,166,.15); color: var(--brand-bright); display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.alert-banner strong { color: #fff; }
.alert-banner .btn { margin-left: auto; flex: 0 0 auto; }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 12px; }
.table th { text-align: left; padding: 10px 16px; background: var(--surface-2); border-bottom: 1px solid var(--line); color: var(--muted); font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; white-space: nowrap; }
.table td { padding: 12px 16px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fbfdfe; }
.table .actions { text-align: right; white-space: nowrap; }
.table .actions form { display: inline; }
.table .primary-cell { font-weight: 650; color: var(--ink); }
.table .sub-cell { font-size: 10.5px; color: var(--muted); margin-top: 1px; }
.table.compact td { padding: 9px 12px; }
.table.compact th { padding: 8px 12px; }

.empty { text-align: center; padding: 42px 20px; }
.empty-icon { width: 48px; height: 48px; border-radius: 14px; background: var(--surface-2); color: var(--muted-2); display: inline-flex; align-items: center; justify-content: center; font-size: 18px; margin-bottom: 12px; border: 1px solid var(--line); }
.empty h3 { font-size: 14px; font-weight: 700; }
.empty p { font-size: 12px; color: var(--muted); margin: 5px auto 0; max-width: 380px; }
.empty .btn { margin-top: 14px; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.field label { display: block; font-size: 11.5px; font-weight: 650; color: var(--ink-2); margin-bottom: 6px; }
.field .hint { font-size: 10.5px; color: var(--muted); margin-top: 4px; line-height: 1.45; }
.input, .select, .textarea {
  width: 100%; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff;
  padding: 9px 11px; font-size: 12.5px; color: var(--ink); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(20,184,166,.12); }
.input::placeholder, .textarea::placeholder { color: var(--muted-2); }
.textarea { min-height: 96px; resize: vertical; }
.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='%2364748b' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 30px; }
.input-sm { padding: 6px 9px; font-size: 11.5px; }
.input-group { display: flex; }
.input-group .input { border-radius: 8px 0 0 8px; }
.input-group .btn { border-radius: 0 8px 8px 0; }
.checkbox { display: inline-flex; align-items: flex-start; gap: 8px; font-size: 11.5px; color: var(--ink-2); cursor: pointer; }
.checkbox input { margin: 1px 0 0; width: 14px; height: 14px; accent-color: var(--brand); }
.form-actions { display: flex; align-items: center; gap: 9px; margin-top: 16px; flex-wrap: wrap; }
.field-row-inline { display: flex; align-items: center; gap: 8px; }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .search { position: relative; width: 260px; max-width: 100%; }
.toolbar .search i { position: absolute; left: 10px; top: 9px; color: var(--muted-2); font-size: 11px; }
.toolbar .search input { padding-left: 29px; }
.filters { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }

.tabs { display: flex; gap: 3px; border-bottom: 1px solid var(--line); padding: 0 20px; background: var(--surface); }
.tabs a { padding: 12px 12px 10px; font-size: 12px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; }
.tabs a:hover { color: var(--ink); }
.tabs a.active { color: var(--brand-strong); border-bottom-color: var(--brand); }

.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid #f1f5f9; }
.list-item:last-child { border-bottom: 0; }
.list-icon { width: 33px; height: 33px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; font-size: 13px; }
.list-body { min-width: 0; flex: 1; }
.list-title { font-size: 12px; font-weight: 650; truncate: ellipsis; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-meta { font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.list-end { margin-left: auto; flex: 0 0 auto; }

.kv { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 0; }
.kv > div { padding: 10px 0; border-bottom: 1px solid #f1f5f9; font-size: 12px; }
.kv > div:nth-child(odd) { color: var(--muted); font-weight: 550; }
.kv > div:nth-child(even) { color: var(--ink); text-align: right; font-weight: 600; overflow-wrap: anywhere; }
.kv > div:nth-last-child(-n+2) { border-bottom: 0; }

.code { background: #0b1120; color: #dbeafe; border: 1px solid #1e293b; border-radius: 10px; padding: 14px 16px; font-family: var(--mono); font-size: 11px; line-height: 1.65; overflow-x: auto; position: relative; }
.code .copy-btn { position: absolute; top: 8px; right: 8px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.1); color: #cbd5e1; border-radius: 6px; padding: 4px 7px; font-size: 9px; }
.code .copy-btn:hover { background: rgba(255,255,255,.14); }
.key-box { display: flex; align-items: center; gap: 10px; background: #0b1120; border-radius: 9px; padding: 10px 13px; color: #e2e8f0; font-family: var(--mono); font-size: 12px; }
.key-box code { flex: 1; overflow-x: auto; white-space: nowrap; }
.key-box .copy-btn { background: rgba(20,184,166,.15); border: 1px solid rgba(20,184,166,.3); color: var(--brand-bright); border-radius: 6px; padding: 5px 8px; font-size: 9px; white-space: nowrap; }

.note { font-size: 11.5px; color: var(--muted); line-height: 1.6; }
.note strong { color: var(--ink-2); }
.divider { height: 1px; background: var(--line); margin: 16px 0; }
.status-line { display: flex; align-items: center; gap: 8px; font-size: 11px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; background: var(--muted-2); }
.status-dot.ok { background: var(--success); box-shadow: 0 0 0 3px rgba(5,150,105,.12); }
.status-dot.bad { background: var(--danger); box-shadow: 0 0 0 3px rgba(220,38,38,.1); }
.status-dot.warn { background: var(--warning); box-shadow: 0 0 0 3px rgba(217,119,6,.1); }

.license-hero { background: radial-gradient(1200px 400px at 100% -20%, rgba(20,184,166,.18), transparent 60%), linear-gradient(120deg, #0b1120, #0f172a); color: #e2e8f0; border-radius: var(--radius); padding: 24px; border: 1px solid #1e293b; }
.license-hero h2 { color: #fff; font-size: 18px; }
.license-hero .plan { color: var(--brand-bright); font-weight: 700; }
.license-hero .badge { background: rgba(20,184,166,.15); color: var(--brand-bright); }
.license-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.license-metric { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.07); border-radius: 9px; padding: 11px 12px; }
.license-metric span { display: block; font-size: 9px; text-transform: uppercase; letter-spacing: .1em; color: #64748b; font-weight: 700; }
.license-metric strong { display: block; font-size: 13px; color: #e2e8f0; margin-top: 4px; }

.timeline { position: relative; padding-left: 18px; }
.timeline:before { content: ""; position: absolute; left: 4px; top: 4px; bottom: 4px; width: 1px; background: var(--line); }
.timeline-item { position: relative; padding: 0 0 16px 12px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item:before { content: ""; position: absolute; left: -18px; top: 4px; width: 9px; height: 9px; border-radius: 50%; background: #fff; border: 2px solid var(--brand); }
.timeline-title { font-size: 11.5px; font-weight: 650; }
.timeline-meta { font-size: 10.5px; color: var(--muted); margin-top: 2px; }

.file-browser { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.file-browser-head { display: flex; align-items: center; gap: 8px; padding: 10px 13px; background: var(--surface-2); border-bottom: 1px solid var(--line); font-size: 11.5px; }
.file-browser-head .path { font-family: var(--mono); color: var(--muted); }
.file-row { display: flex; align-items: center; gap: 10px; padding: 9px 13px; border-bottom: 1px solid #f1f5f9; font-size: 12px; }
.file-row:last-child { border-bottom: 0; }
.file-row:hover { background: #fbfdfe; }
.file-icon { width: 26px; height: 26px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; background: var(--surface-2); color: var(--muted); font-size: 11px; flex: 0 0 auto; }
.file-icon.dir { background: #fffbeb; color: #d97706; }
.file-name { min-width: 0; flex: 1; }
.file-name a { font-weight: 600; color: var(--ink-2); }
.file-name a:hover { color: var(--brand-strong); }
.file-meta { color: var(--muted); font-size: 10.5px; white-space: nowrap; }
.file-actions { display: flex; gap: 3px; opacity: .45; }
.file-row:hover .file-actions { opacity: 1; }
.file-actions button, .file-actions a { border: 0; background: none; color: var(--muted); width: 24px; height: 24px; border-radius: 5px; display: inline-flex; align-items: center; justify-content: center; font-size: 10.5px; }
.file-actions button:hover, .file-actions a:hover { background: var(--surface-2); color: var(--ink); }
.upload-zone { border: 1.5px dashed var(--line-strong); border-radius: 10px; padding: 20px; text-align: center; background: var(--surface-2); }
.upload-zone i { color: var(--brand); font-size: 20px; }
.upload-zone p { font-size: 11.5px; color: var(--muted); margin-top: 6px; }

.editor { width: 100%; min-height: 520px; border: 1px solid var(--line-strong); border-radius: 10px; background: #0b1120; color: #e2e8f0; font-family: var(--mono); font-size: 12px; line-height: 1.65; padding: 16px; outline: none; resize: vertical; tab-size: 2; }
.editor:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(20,184,166,.12); }

.dropdown { position: relative; }
.dropdown summary { list-style: none; cursor: pointer; }
.dropdown summary::-webkit-details-marker { display: none; }
.dropdown-menu { position: absolute; right: 0; top: calc(100% + 6px); background: #fff; border: 1px solid var(--line); border-radius: 9px; box-shadow: var(--shadow); padding: 5px; min-width: 160px; z-index: 60; }
.dropdown-menu a, .dropdown-menu button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 9px; border: 0; background: none; border-radius: 6px; font-size: 11.5px; color: var(--ink-2); text-align: left; }
.dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--surface-2); color: var(--brand-strong); }

.pagination { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 18px; border-top: 1px solid var(--line); background: var(--surface-2); font-size: 11px; color: var(--muted); }
.pager { display: flex; gap: 4px; }
.pager a, .pager span { padding: 5px 9px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink-2); font-size: 11px; }
.pager .active { border-color: var(--brand); color: var(--brand-strong); background: #f0fdfa; font-weight: 700; }

.plan-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 20px; background: #f0fdfa; border: 1px solid #99f6e4; color: var(--brand-ink); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.plan-badge.trial { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.plan-badge.business { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }
.plan-badge.unlimited { background: #f5f3ff; border-color: #ddd6fe; color: #6d28d9; }

.cert-status { display: flex; align-items: center; gap: 8px; }
.cert-days { font-size: 10px; color: var(--muted); }

.pulse-ring { width: 9px; height: 9px; border-radius: 50%; background: var(--brand-bright); box-shadow: 0 0 0 0 rgba(20,184,166,.6); animation: pulse-ring 2.2s infinite; }
@keyframes pulse-ring { 0% { box-shadow: 0 0 0 0 rgba(20,184,166,.5); } 70% { box-shadow: 0 0 0 8px rgba(20,184,166,0); } 100% { box-shadow: 0 0 0 0 rgba(20,184,166,0); } }

.toast-wrap { position: fixed; top: 16px; right: 16px; z-index: 120; display: flex; flex-direction: column; gap: 8px; max-width: 360px; }
.toast { display: flex; align-items: flex-start; gap: 9px; background: #fff; border: 1px solid var(--line); border-left: 3px solid var(--brand); border-radius: 9px; padding: 10px 12px; box-shadow: var(--shadow-lg); font-size: 12px; animation: toast-in .2s ease; }
.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
@keyframes toast-in { from { transform: translateY(-6px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.mobile-bar { display: none; }
.overlay { display: none; }

@media (max-width: 1200px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .license-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1024px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; }
  .mobile-toggle { display: inline-flex; }
  .overlay.show { display: block; position: fixed; inset: 0; background: rgba(2,6,23,.55); z-index: 45; backdrop-filter: blur(2px); }
  .topbar { padding: 0 16px; }
  .content { padding: 18px; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .grid-2, .grid-3, .grid-4, .grid-5 { grid-template-columns: 1fr; }
  .page-head { flex-direction: column; align-items: stretch; gap: 12px; }
  .form-grid { grid-template-columns: 1fr; }
  .topbar-item.server-time, .topbar-item.server-chip { display: none; }
  .page-actions { width: 100%; }
  .toolbar .search { width: 100%; }
  .kv { grid-template-columns: 105px minmax(0, 1fr); }
  .license-grid { grid-template-columns: 1fr 1fr; }
  .profile-name, .profile-role { display: none; }
  .profile summary { padding-left: 8px; }
  .file-meta.hide-sm { display: none; }
  .table th, .table td { padding: 10px 12px; }
  .alert-banner { flex-wrap: wrap; }
  .alert-banner .btn { margin-left: 0; width: 100%; }
}
@media (max-width: 520px) {
  .content { padding: 14px; }
  .card-body, .card-pad { padding: 15px; }
  .card-head { padding: 13px 15px; }
  .license-grid { grid-template-columns: 1fr; }
  .topbar { gap: 8px; }
  .topbar-title { font-size: 13px; }
  .file-meta { display: none; }
  .list-item { padding: 11px 14px; }
  .list-end .btn span { display: none; }
}

.login-page { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(420px, .95fr); background: #fff; }
.login-art { background: radial-gradient(900px 600px at 20% 20%, rgba(20,184,166,.2), transparent 55%), radial-gradient(700px 500px at 100% 80%, rgba(37,99,235,.15), transparent 60%), #0b1120; color: #e2e8f0; padding: 46px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.login-art:after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(148,163,184,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(148,163,184,.06) 1px, transparent 1px); background-size: 44px 44px; mask-image: linear-gradient(to bottom, black, transparent 85%); pointer-events: none; }
.login-art > * { position: relative; z-index: 1; }
.login-art h1 { font-size: clamp(28px, 4vw, 46px); line-height: 1.08; letter-spacing: -.04em; max-width: 560px; color: #fff; }
.login-art h1 span { color: var(--brand-bright); }
.login-art .lead { color: #94a3b8; max-width: 500px; margin-top: 18px; font-size: 14px; line-height: 1.7; }
.login-art .feature-list { display: grid; gap: 13px; margin-top: 32px; max-width: 480px; }
.login-art .feature-row { display: flex; align-items: center; gap: 12px; color: #cbd5e1; font-size: 13px; }
.login-art .feature-row i { color: var(--brand-bright); width: 17px; text-align: center; }
.login-art .art-foot { color: #64748b; font-size: 11px; display: flex; justify-content: space-between; gap: 20px; }
.login-form-side { display: flex; align-items: center; justify-content: center; padding: 38px; background: #fff; }
.login-card { width: 100%; max-width: 390px; }
.login-card .logo-row { display: flex; align-items: center; gap: 11px; margin-bottom: 38px; }
.login-card .logo-row .brand-name { color: var(--ink); }
.login-card h2 { font-size: 25px; letter-spacing: -.03em; }
.login-card .sub { color: var(--muted); font-size: 13px; margin-top: 6px; margin-bottom: 25px; }
.login-card .field { margin-bottom: 14px; }
.login-card .input { padding: 11px 13px; }
.login-card .btn { padding: 11px 16px; }
.login-card .assist { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; font-size: 11.5px; color: var(--muted); }
.login-card .assist a { color: var(--brand-strong); font-weight: 600; }
.login-card .login-note { background: var(--surface-2); border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; color: var(--muted); font-size: 11px; margin-top: 20px; }
.login-card .login-note i { color: var(--brand); margin-right: 5px; }
.login-meta { margin-top: 30px; color: var(--muted-2); font-size: 10px; display: flex; justify-content: space-between; gap: 10px; }
@media (max-width: 900px) {
  .login-page { grid-template-columns: 1fr; }
  .login-art { display: none; }
  .login-form-side { min-height: 100vh; padding: 24px; }
}

.error-page { min-height: 100vh; display: grid; place-items: center; background: radial-gradient(600px 350px at 50% 0%, rgba(20,184,166,.1), transparent), var(--bg); padding: 24px; }
.error-card { max-width: 460px; text-align: center; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 38px; box-shadow: var(--shadow); }
.error-code { font-size: 68px; font-weight: 800; letter-spacing: -.06em; color: var(--ink); line-height: 1; }
.error-code span { color: var(--brand); }
.error-card h1 { font-size: 18px; margin-top: 12px; }
.error-card p { color: var(--muted); font-size: 12.5px; margin-top: 8px; }
.error-card .btn { margin-top: 22px; }

.metrics-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.metrics-strip > div { padding: 13px 16px; border-right: 1px solid var(--line); }
.metrics-strip > div:last-child { border-right: 0; }
.metrics-strip span { display: block; font-size: 9.5px; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); font-weight: 700; }
.metrics-strip strong { display: block; font-size: 16px; margin-top: 4px; letter-spacing: -.02em; }

.service-pill { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.service-pill .name { font-size: 11.5px; font-weight: 650; }
.service-pill .desc { font-size: 9.5px; color: var(--muted); margin-top: 1px; }
.service-state { display: inline-flex; align-items: center; gap: 6px; font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.service-state.ok { color: var(--success); }
.service-state.bad { color: var(--danger); }

.section-title { display: flex; align-items: center; gap: 9px; margin-bottom: 13px; }
.section-title h2 { font-size: 14px; font-weight: 700; }
.section-title .badge { margin-left: 2px; }
.section-title .end { margin-left: auto; font-size: 11px; }
.section-title .end a { color: var(--brand-strong); font-weight: 650; }

.split { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, .75fr); gap: 16px; }
.split-even { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1050px) { .split, .split-even { grid-template-columns: 1fr; } }

.modal-backdrop { position: fixed; inset: 0; background: rgba(2,6,23,.5); z-index: 90; display: none; align-items: center; justify-content: center; padding: 20px; }
.modal-backdrop.open { display: flex; }
.modal { background: #fff; border-radius: 14px; border: 1px solid var(--line); box-shadow: var(--shadow-lg); width: 100%; max-width: 480px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.modal-head h3 { font-size: 14px; }
.modal-body { padding: 18px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 18px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 14px 14px; }

.hide { display: none !important; }
@media print { .sidebar, .topbar, .page-actions, .btn { display: none !important; } .main { margin: 0; } .content { padding: 0; } }
