:root {
  color-scheme: dark;
  --bg: #091019;
  --sidebar: #0c1520;
  --panel: #101b28;
  --panel-2: #142233;
  --line: #26384d;
  --text: #f1f6fc;
  --muted: #8fa2b7;
  --accent: #77aaff;
  --accent-strong: #397bdc;
  --good: #47d18b;
  --warn: #f0bc58;
  --bad: #ff6c78;
  --radius: 14px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", sans-serif;
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; background: radial-gradient(circle at 90% -10%, #173658 0, transparent 35%), var(--bg); color: var(--text); font-size: 14px; line-height: 1.5; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.muted { color: var(--muted); }
.eyebrow { margin: 0 0 5px; color: var(--accent); font-size: 10px; line-height: 1.4; font-weight: 800; letter-spacing: .18em; }
h1, h2, p { margin-top: 0; }
h1 { font-size: 28px; line-height: 1.2; letter-spacing: -.025em; }
h2 { margin-bottom: 4px; font-size: 17px; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

.login-view { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(410px, 100%); padding: 38px; border: 1px solid var(--line); background: rgba(16,27,40,.95); border-radius: 20px; box-shadow: 0 30px 80px rgba(0,0,0,.35); }
.login-card h1 { margin: 12px 0 8px; }.login-card > .muted { margin-bottom: 28px; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; color: #eaf3ff; background: linear-gradient(145deg, #4d91f2, #265ca7); font-weight: 900; letter-spacing: -.04em; box-shadow: inset 0 1px rgba(255,255,255,.28); }
.brand-mark.small { width: 34px; height: 34px; border-radius: 9px; font-size: 12px; }
.field { display: grid; gap: 7px; color: #bac9d9; font-size: 12px; font-weight: 650; }
.field small { color: var(--muted); font-weight: 400; }
input, select, textarea { width: 100%; border: 1px solid var(--line); border-radius: 9px; background: #0b1622; color: var(--text); padding: 10px 11px; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(119,170,255,.13); }
textarea { resize: vertical; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; border: 1px solid var(--line); border-radius: 9px; padding: 8px 14px; background: var(--panel-2); color: var(--text); font-weight: 650; white-space: nowrap; }
.button:hover { border-color: #45688f; background: #192b3f; }.button:disabled { opacity: .5; cursor: wait; }
.button.primary { border-color: #4f89df; background: var(--accent-strong); }.button.primary:hover { background: #4489ec; }
.button.ghost { background: transparent; }.button.wide { width: 100%; margin-top: 18px; }
.button.danger { color: var(--bad); border-color: #64303b; background: #29171e; }
.button.small { min-height: 30px; padding: 5px 9px; font-size: 12px; border-radius: 7px; }
.form-error { min-height: 20px; margin: 10px 0 0; color: var(--bad); font-size: 12px; }

.app-view { min-height: 100vh; display: grid; grid-template-columns: 228px minmax(0,1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 24px 18px; border-right: 1px solid #1f3042; background: rgba(11,20,31,.94); }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 5px 26px; }.brand div:last-child { display: grid; }.brand strong { font-size: 14px; }.brand span { color: var(--muted); font-size: 10px; letter-spacing: .04em; }
nav { display: grid; gap: 5px; }.nav-item { border: 0; border-radius: 9px; padding: 10px 12px; text-align: left; color: var(--muted); background: transparent; font-weight: 600; }.nav-item:hover { color: var(--text); background: #121f2d; }.nav-item.active { color: #eaf2ff; background: #173151; box-shadow: inset 3px 0 var(--accent); }
.sidebar-footer { margin-top: auto; padding: 18px 5px 0; border-top: 1px solid #1f3042; }.health { display: flex; align-items: center; gap: 8px; margin-bottom: 13px; color: var(--muted); font-size: 12px; }.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--good); box-shadow: 0 0 8px rgba(71,209,139,.5); }.text-button { padding: 0; border: 0; background: transparent; color: var(--muted); }.text-button:hover { color: var(--text); }
.content { min-width: 0; max-width: 1460px; width: 100%; margin: 0 auto; padding: 30px 34px 50px; }
.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 25px; }.page-header p:last-child { margin-bottom: 0; }.header-actions { display: flex; gap: 9px; }
.metric-grid { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 13px; margin-bottom: 15px; }.metric-card { position: relative; min-height: 138px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; background: linear-gradient(145deg, #122033, #0f1925); }.metric-card::after { content:""; position:absolute; width:90px; height:90px; right:-30px; bottom:-40px; border-radius:50%; background:#2f6db6; filter:blur(32px); opacity:.16; }.metric-card span { color: var(--muted); font-size: 12px; }.metric-card strong { display:block; margin: 10px 0 4px; font-size: 35px; line-height:1; }.metric-card small { color: var(--muted); }.metric-card.good strong { color: var(--good); }.metric-card.warn strong { color: var(--warn); }.metric-card.bad strong { color: var(--bad); }
.split-grid, .api-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, .8fr); gap: 15px; }.api-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: rgba(16,27,40,.9); padding: 19px; }.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 16px; }.panel-head p { margin-bottom: 0; color: var(--muted); font-size: 12px; }.accent-panel { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; background: linear-gradient(145deg, #142a44, #0f1b29); }.accent-panel .muted { margin-bottom: 20px; }
.expiry-list { display: grid; }.expiry-row { display: grid; grid-template-columns: 1fr auto; gap: 14px; padding: 10px 0; border-bottom: 1px solid #1f2e3e; }.expiry-row:last-child { border-bottom: 0; }.expiry-row strong { display:block; font-size:13px; }.expiry-row span { color: var(--muted); font-size: 11px; }.days-badge { align-self:center; border-radius:999px; padding:4px 9px; color:var(--warn); background:#362b15; font-size:11px; font-weight:700; }
.toolbar { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; }.search-field { flex:1; }.toolbar select { width: 150px; }
.pool-stats { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:14px; }.pool-stats span { border:1px solid var(--line); border-radius:999px; padding:5px 10px; color:var(--muted); font-size:12px; }.pool-stats strong { margin-left:4px; color:var(--text); }.proxy-url { display:block; max-width:390px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--muted); font-size:11px; }
.assigned-users { display:grid; gap:5px; max-height:110px; overflow:auto; }.assigned-users .user-cell { padding-bottom:4px; border-bottom:1px solid #1f2e3e; }.assigned-users .user-cell:last-child { border-bottom:0; }
.activation-code-cell { display:flex; align-items:center; gap:7px; min-width:230px; }.activation-code-cell code { font-size:12px; white-space:nowrap; }.copy-code { border:1px solid var(--line); border-radius:6px; padding:3px 7px; color:var(--accent); background:transparent; font-size:11px; }.copy-code:disabled { color:var(--muted); cursor:default; opacity:.65; }
.table-wrap { width: 100%; overflow-x: auto; }table { width: 100%; border-collapse: collapse; min-width: 850px; }th { padding: 10px; color: var(--muted); font-size: 11px; text-align: left; text-transform: uppercase; letter-spacing: .05em; border-bottom: 1px solid var(--line); }td { padding: 13px 10px; border-bottom: 1px solid #1e2c3c; vertical-align: middle; }tr:last-child td { border-bottom: 0; }tbody tr:hover { background: rgba(30,50,72,.35); }.user-cell { display:grid; gap:2px; }.user-cell strong { font-size:13px; }.user-cell span { color:var(--muted); font-size:11px; }.actions-column { text-align:right; }.row-actions { display:flex; justify-content:flex-end; gap:5px; flex-wrap:wrap; }.status-pill { display:inline-flex; align-items:center; border-radius:999px; padding:4px 8px; font-size:11px; font-weight:700; }.status-pill.active { color:var(--good); background:#123426; }.status-pill.expiring { color:var(--warn); background:#382d14; }.status-pill.expired,.status-pill.disabled { color:var(--bad); background:#3b1a22; }.status-pill.unlicensed { color:var(--muted); background:#202e3e; }.proxy-pill { color:#a9caff; background:#172b44; }
.empty-state { padding: 38px 10px; color:var(--muted); text-align:center; }
.form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }.field.full { grid-column:1/-1; }.secret-input { display:flex; gap:6px; }.secret-input input { flex:1; }.secret-input button { border:1px solid var(--line); border-radius:8px; padding:0 10px; color:var(--muted); background:var(--panel-2); }
.form-hint { margin:12px 0 0; color:var(--muted); font-size:12px; }
dialog { max-width: calc(100vw - 28px); padding:0; border:1px solid var(--line); border-radius:16px; color:var(--text); background:var(--panel); box-shadow:0 30px 100px rgba(0,0,0,.65); }dialog::backdrop { background:rgba(3,8,13,.76); backdrop-filter:blur(4px); }.dialog-card { width:min(620px,calc(100vw - 28px)); padding:23px; }.dialog-card.compact { width:min(420px,calc(100vw - 28px)); }.dialog-head { display:flex; align-items:flex-start; justify-content:space-between; gap:20px; margin-bottom:19px; }.dialog-head h2 { font-size:22px; }.icon-button { width:32px; height:32px; border:1px solid var(--line); border-radius:8px; color:var(--muted); background:transparent; font-size:20px; line-height:1; }.dialog-actions { display:flex; justify-content:flex-end; gap:8px; margin-top:20px; }
.generated-codes { display:grid; gap:8px; max-height:55vh; overflow:auto; }.generated-code { display:flex; align-items:center; justify-content:space-between; gap:12px; border:1px solid var(--line); border-radius:9px; padding:10px 12px; background:#0b1622; }.generated-code code { font-size:13px; letter-spacing:.04em; }.generated-code button { border:0; padding:4px; color:var(--accent); background:transparent; }
.api-grid .panel pre { overflow:auto; border:1px solid #213348; border-radius:10px; padding:14px; color:#c9dbf0; background:#09131e; font-size:12px; line-height:1.65; }.api-note { margin:14px 0 0; color:var(--muted); font-size:12px; }.check-list { display:grid; gap:12px; padding-left:20px; color:#becddd; }.check-list li::marker { color:var(--good); }
.toast { position:fixed; z-index:20; right:24px; bottom:24px; max-width:410px; border:1px solid #356186; border-radius:10px; padding:11px 14px; background:#172c41; color:var(--text); box-shadow:0 12px 30px rgba(0,0,0,.35); }.toast.error { border-color:#713842; background:#351b24; }
@media (max-width: 1100px) { .metric-grid{grid-template-columns:repeat(3,minmax(0,1fr))} }
@media (max-width: 1000px) { .app-view{grid-template-columns:172px minmax(0,1fr)}.sidebar{padding:20px 12px}.brand div:last-child span{display:none}.content{padding:24px 20px}.metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.split-grid,.api-grid{grid-template-columns:1fr} }
@media (max-width: 650px) { .app-view{display:block}.sidebar{position:static;height:auto;flex-direction:row;align-items:center;gap:12px;padding:12px}.brand{padding:0}.brand-mark.small{width:30px;height:30px}nav{display:flex;flex:1;overflow:auto}.nav-item{font-size:12px}.sidebar-footer{margin:0;padding:0;border:0}.content{padding:18px 13px 40px}.page-header{display:block}.header-actions{margin-top:16px}.metric-grid{grid-template-columns:1fr 1fr;gap:8px}.metric-card{min-height:118px;padding:14px}.form-grid{grid-template-columns:1fr}.field.full{grid-column:auto}.toolbar{align-items:stretch}.toolbar select{width:auto}.page-header h1{font-size:24px}.dialog-card{padding:18px} }
