:root {
    --bg: #07100d;
    --surface: #101a16;
    --surface-2: #15221d;
    --line: rgba(219, 255, 232, .1);
    --text: #f1f7f3;
    --muted: #8fa39a;
    --green: #67f21f;
    --green-soft: rgba(103, 242, 31, .12);
    --cyan: #48d4e4;
    --violet: #a673ff;
    --coral: #ff6b76;
    --amber: #ffad33;
    --shadow: 0 22px 60px rgba(0, 0, 0, .28);
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; color: var(--text); background: radial-gradient(circle at 90% 0, rgba(103,242,31,.07), transparent 30%), var(--bg); font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 14px; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button { cursor: pointer; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 258px minmax(0,1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 26px 20px; display: flex; flex-direction: column; border-right: 1px solid var(--line); background: rgba(8,17,14,.94); backdrop-filter: blur(18px); }
.brand { display: flex; align-items: center; gap: 13px; padding: 5px 8px 28px; }
.brand-mark { width: 42px; height: 42px; display: inline-grid; place-items: center; border-radius: 14px; color: #091106; background: linear-gradient(145deg, #86ff47, #35cf2d); box-shadow: 0 10px 30px rgba(103,242,31,.22); font-size: 15px; font-weight: 900; letter-spacing: -1px; }
.brand-mark.large { width: 64px; height: 64px; border-radius: 21px; font-size: 22px; }
.brand strong, .brand small, .admin-profile strong, .admin-profile small { display: block; }
.brand strong { font-size: 16px; }
.brand small, .admin-profile small { color: var(--muted); margin-top: 3px; font-size: 11px; }
.nav { display: grid; gap: 7px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 12px 14px; color: #aebdb6; border-radius: 12px; font-weight: 650; transition: .2s ease; }
.nav a:hover { color: var(--text); background: rgba(255,255,255,.04); }
.nav a.active { color: var(--green); background: var(--green-soft); box-shadow: inset 0 0 0 1px rgba(103,242,31,.12); }
.nav-icon { width: 24px; font-size: 20px; text-align: center; }
.sidebar-footer { margin-top: auto; padding-top: 20px; border-top: 1px solid var(--line); }
.admin-profile { display: flex; gap: 10px; align-items: center; margin-bottom: 13px; min-width: 0; }
.admin-profile > span:last-child { min-width: 0; }
.admin-profile small { overflow: hidden; text-overflow: ellipsis; }
.avatar { width: 36px; height: 36px; flex: 0 0 36px; display: grid; place-items: center; border-radius: 12px; color: var(--green); background: var(--green-soft); font-weight: 800; }
.logout-button { width: 100%; padding: 10px; border: 1px solid var(--line); border-radius: 10px; color: #b8c6bf; background: transparent; }
.logout-button:hover { color: var(--text); background: rgba(255,255,255,.04); }
.main { min-width: 0; padding: 30px clamp(22px,4vw,58px) 60px; }
.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.eyebrow { margin: 0 0 6px; color: var(--green); font-size: 11px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(28px,3vw,38px); letter-spacing: -.04em; }
h2 { margin-bottom: 0; font-size: 19px; letter-spacing: -.02em; }
.live-pill { display: flex; gap: 8px; align-items: center; padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; color: #b7c8c0; background: rgba(255,255,255,.025); font-weight: 650; }
.live-pill span { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 12px var(--green); }
.stats-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; margin-bottom: 18px; }
.stat-card, .panel, .detail-hero { border: 1px solid var(--line); background: linear-gradient(145deg, rgba(19,31,26,.98), rgba(13,23,19,.98)); box-shadow: var(--shadow); }
.stat-card { position: relative; overflow: hidden; min-height: 164px; padding: 22px; border-radius: 20px; }
.stat-card::after { content: ""; position: absolute; right: -35px; bottom: -55px; width: 130px; height: 130px; border-radius: 50%; filter: blur(5px); opacity: .1; background: currentColor; }
.stat-card.cyan { color: var(--cyan); } .stat-card.green { color: var(--green); } .stat-card.violet { color: var(--violet); } .stat-card.coral { color: var(--coral); }
.stat-card p { margin: 14px 0 7px; color: #a9bbb2; }
.stat-card strong { display: block; color: var(--text); font-size: 35px; letter-spacing: -.04em; }
.stat-card small { display: block; margin-top: 7px; color: var(--muted); }
.stat-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; background: currentColor; box-shadow: inset 0 0 0 20px rgba(0,0,0,.77); font-weight: 900; }
.two-column { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(320px,.8fr); gap: 18px; margin-top: 18px; }
.two-column.table-row { grid-template-columns: repeat(2,minmax(0,1fr)); }
.panel { min-width: 0; padding: 22px; border-radius: 20px; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-bottom: 20px; }
.text-link, .back-link, .row-action { color: var(--green); font-weight: 700; }
.provider-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.provider-card { display: flex; align-items: center; gap: 11px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.025); }
.provider-card > div { min-width: 0; flex: 1; }
.provider-card strong, .provider-card small { display: block; }
.provider-card small { margin-top: 4px; color: var(--muted); font-size: 11px; }
.provider-logo { width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; border-radius: 11px; color: #07100d; background: linear-gradient(145deg,var(--green),var(--cyan)); font-weight: 900; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; }.status-dot.online { background: var(--green); box-shadow: 0 0 10px rgba(103,242,31,.7); }.status-dot.offline { background: #58655f; }
.activity-list, .list-table, .mini-records { display: grid; }
.activity-item, .list-row, .mini-record { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.activity-item:first-child, .list-row:first-child, .mini-record:first-child { border-top: 0; padding-top: 0; }
.activity-item:last-child, .list-row:last-child, .mini-record:last-child { padding-bottom: 0; }
.activity-item:hover strong, .list-row:hover strong { color: var(--green); }
.activity-icon { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 34px; border-radius: 10px; color: var(--violet); background: rgba(166,115,255,.12); }
.activity-item strong, .activity-item small, .list-row strong, .list-row small, .mini-record strong, .mini-record small { display: block; }
.activity-item small, .list-row small, .mini-record small { margin-top: 4px; color: var(--muted); font-size: 11px; }
.grow { min-width: 0; flex: 1; }
.device-mark { width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; border-radius: 12px; color: var(--cyan); background: rgba(72,212,228,.11); font-weight: 900; }
.device-mark.purchase { color: var(--violet); background: rgba(166,115,255,.12); }
.device-mark.large { width: 60px; height: 60px; flex-basis: 60px; border-radius: 18px; font-size: 21px; }
.badge { display: inline-flex; align-items: center; white-space: nowrap; padding: 6px 9px; border-radius: 999px; font-size: 11px; font-weight: 800; }
.badge.large { padding: 9px 13px; font-size: 12px; }
.badge.success { color: var(--green); background: var(--green-soft); }.badge.neutral { color: #a9b7b0; background: rgba(255,255,255,.06); }.badge.warning { color: var(--amber); background: rgba(255,173,51,.12); }.badge.danger { color: var(--coral); background: rgba(255,107,118,.12); }
.filter-panel { margin-bottom: 18px; }
.filters { display: grid; grid-template-columns: minmax(240px,2fr) minmax(150px,1fr) minmax(160px,1fr) auto auto; align-items: end; gap: 12px; }
label > span, .filters label > span { display: block; margin-bottom: 7px; color: var(--muted); font-size: 11px; font-weight: 700; }
input, select { width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 11px; color: var(--text); outline: none; background: #0b1511; }
input:focus, select:focus { border-color: rgba(103,242,31,.55); box-shadow: 0 0 0 3px rgba(103,242,31,.08); }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 41px; padding: 10px 15px; border: 1px solid transparent; border-radius: 11px; font-weight: 800; }
.button.primary { color: #071008; background: linear-gradient(135deg,var(--green),#4fe034); box-shadow: 0 8px 20px rgba(103,242,31,.16); }.button.primary:hover { filter: brightness(1.08); }
.button.ghost { color: #b4c2bb; border-color: var(--line); background: rgba(255,255,255,.025); }.button.danger { color: var(--coral); border-color: rgba(255,107,118,.18); background: rgba(255,107,118,.08); }
.button.wide { width: 100%; }
.button.disabled { opacity: .35; cursor: default; }
.data-table-wrap { overflow-x: auto; margin: 0 -22px; }
.data-table { width: 100%; border-collapse: collapse; min-width: 800px; }
.data-table th { padding: 11px 18px; color: var(--muted); border-bottom: 1px solid var(--line); text-align: left; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.data-table td { padding: 15px 18px; border-bottom: 1px solid rgba(219,255,232,.07); color: #c2d0ca; vertical-align: middle; }
.data-table tbody tr:hover { background: rgba(255,255,255,.018); }
.id-cell { display: flex; align-items: center; gap: 11px; }.id-cell strong,.id-cell small { display: block; }.id-cell small { margin-top: 4px; color: var(--muted); font-size: 11px; }
.mono { max-width: 280px; overflow: hidden; text-overflow: ellipsis; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.pagination { display: flex; justify-content: space-between; align-items: center; padding-top: 18px; color: var(--muted); }.pagination > div { display: flex; gap: 8px; }
.empty-state { padding: 44px 20px; color: var(--muted); text-align: center; }.empty-state.compact { padding: 20px; }
.alert { margin-bottom: 18px; padding: 13px 15px; border-radius: 12px; font-weight: 650; }.alert.success { color: var(--green); border: 1px solid rgba(103,242,31,.18); background: var(--green-soft); }.alert.danger { color: var(--coral); border: 1px solid rgba(255,107,118,.2); background: rgba(255,107,118,.09); }
.back-link { display: inline-block; margin: -8px 0 18px; }
.detail-hero { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 24px; border-radius: 20px; }
.detail-identity { min-width: 0; display: flex; align-items: center; gap: 15px; }.detail-identity h2 { overflow-wrap: anywhere; }.detail-identity .muted { margin: 7px 0 0; }
.muted { color: var(--muted); }
.detail-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
.detail-list { display: grid; margin: 0; }.detail-list div { display: grid; grid-template-columns: 130px minmax(0,1fr); gap: 14px; padding: 13px 0; border-top: 1px solid var(--line); }.detail-list div:first-child { border-top: 0; }.detail-list dt { color: var(--muted); }.detail-list dd { margin: 0; overflow-wrap: anywhere; font-weight: 650; }
.subscription-state { display: flex; gap: 13px; align-items: center; padding: 16px; border: 1px solid var(--line); border-radius: 15px; background: rgba(255,255,255,.025); }.subscription-state.active { border-color: rgba(103,242,31,.18); background: var(--green-soft); }.subscription-icon { width: 42px; height: 42px; flex: 0 0 42px; display: grid; place-items: center; border-radius: 14px; color: var(--green); background: rgba(103,242,31,.11); font-size: 18px; font-weight: 900; }.subscription-state strong,.subscription-state small { display: block; }.subscription-state small { margin-top: 5px; color: var(--muted); }
.action-row { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; margin-top: 16px; }.inline-form { display: flex; align-items: end; gap: 9px; }.inline-form label { min-width: 130px; }
.count-pill { padding: 6px 9px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; font-size: 11px; }
.mini-record { justify-content: space-between; }.mini-record > span:last-child { text-align: right; }
.login-page { min-height: 100vh; display: grid; place-items: center; overflow: hidden; padding: 24px; background: radial-gradient(circle at 15% 20%,rgba(72,212,228,.1),transparent 28%),radial-gradient(circle at 85% 80%,rgba(103,242,31,.1),transparent 30%),var(--bg); }
.login-card { position: relative; z-index: 2; width: min(100%,440px); padding: 38px; border: 1px solid var(--line); border-radius: 26px; background: rgba(13,24,19,.9); box-shadow: 0 35px 100px rgba(0,0,0,.5); backdrop-filter: blur(20px); }
.login-brand { margin-bottom: 26px; }.login-card h1 { margin-bottom: 10px; font-size: 35px; }.login-card > .muted { line-height: 1.65; }
.form-stack { display: grid; gap: 16px; margin-top: 25px; }.form-stack label { color: #c5d1cb; font-weight: 650; }.form-stack input { margin-top: 8px; }.checkbox { display: flex; gap: 9px; align-items: center; color: var(--muted) !important; font-size: 12px; }.checkbox input { width: auto; margin: 0; accent-color: var(--green); }
.security-note { margin: 19px 0 0; color: #667970; text-align: center; font-size: 11px; }
.login-orb { position: fixed; width: 320px; height: 320px; border-radius: 50%; filter: blur(100px); opacity: .13; }.orb-one { top: -120px; left: -100px; background: var(--cyan); }.orb-two { right: -100px; bottom: -120px; background: var(--green); }

@media (max-width: 1100px) { .stats-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }.filters { grid-template-columns: repeat(2,minmax(0,1fr)); }.search-field { grid-column: span 2; } }
@media (max-width: 820px) { .app-shell { display: block; }.sidebar { position: static; width: 100%; height: auto; padding: 15px 18px; flex-direction: row; align-items: center; }.brand { padding: 0; }.brand small,.brand span:last-child,.sidebar-footer { display: none; }.nav { display: flex; margin-left: auto; }.nav a { padding: 10px 12px; }.nav-icon { display: none; }.main { padding: 22px 16px 45px; }.two-column,.two-column.table-row,.detail-grid { grid-template-columns: 1fr; }.detail-hero { align-items: flex-start; flex-direction: column; } }
@media (max-width: 560px) { .stats-grid,.provider-grid,.filters { grid-template-columns: 1fr; }.search-field { grid-column: auto; }.topbar { margin-bottom: 20px; }.live-pill { display: none; }.panel { padding: 18px; border-radius: 16px; }.data-table-wrap { margin: 0 -18px; }.login-card { padding: 28px 22px; }.detail-identity { align-items: flex-start; }.inline-form { width: 100%; flex-direction: column; align-items: stretch; }.inline-form label { width: 100%; }.action-row form { width: 100%; }.action-row .button { width: 100%; } }
