:root {
    color-scheme: dark;
    --bg: #050505;
    --sidebar: #111111;
    --surface: #151B26;
    --surface-2: #1C2433;
    --surface-3: #0B0F15;
    --line: #1E2738;
    --line-hover: #2A3450;
    --ink: #F7F7F7;
    --muted: #B7B7B7;
    --dim: #8892A8;
    --faint: #5A647C;
    --green: #25D366;
    --cyan: #50D3F3;
    --danger: #F87171;
    --warning: #FBBF24;
    --success: #34D399;
}

* { box-sizing: border-box; }
html, body, #app { width: 100%; min-height: 100%; margin: 0; }
body { min-height: 100vh; background: var(--bg); color: var(--ink); font-family: Onest, system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
::selection { background: rgb(37 211 102 / 26%); }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #0B0F15; }
::-webkit-scrollbar-thumb { background: #273146; border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: #34425c; }

.boot-screen { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 14px; color: var(--green); }
.boot-mark { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid rgb(37 211 102 / 35%); border-radius: 12px; background: rgb(37 211 102 / 9%); font-size: 23px; font-weight: 800; }
.boot-spinner { width: 19px; height: 19px; border: 2px solid #263146; border-top-color: var(--green); border-radius: 50%; animation: spin .8s linear infinite; }
.auth-screen { min-height: 100vh; padding: 24px; display: grid; place-items: center; background: radial-gradient(ellipse at 50% 0%, #13231A 0%, var(--bg) 58%); }
.auth-card { width: min(420px, 100%); padding: 30px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: 0 24px 80px rgb(0 0 0 / 40%); }
.auth-brand { margin-bottom: 29px; display: flex; align-items: center; gap: 9px; color: var(--ink); font-size: 12px; font-weight: 800; letter-spacing: .08em; }
.auth-brand img { width: 27px; height: 27px; object-fit: contain; }
.auth-brand b { color: var(--green); }
.auth-card h1 { margin: 0; font-size: 24px; letter-spacing: -.025em; }
.auth-description { margin: 8px 0 20px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.auth-card .field { margin-top: 13px; }
.auth-submit { width: 100%; margin-top: 18px; }
.auth-link { width: 100%; margin-top: 13px; border: 0; background: transparent; color: #78DFA0; cursor: pointer; font-size: 14px; font-weight: 600; }
.auth-link:hover { color: #A6F0BD; text-decoration: underline; }
.auth-message { margin: 12px 0 0; color: #A6F0BD; font-size: 14px; line-height: 1.5; }
.auth-footnote { margin: 15px 0 0; color: var(--dim); font-size: 12px; line-height: 1.5; text-align: center; }
@keyframes spin { to { transform: rotate(360deg); } }

.app-shell { min-height: 100vh; background: var(--bg); }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 30; width: 246px; display: flex; flex-direction: column; overflow-y: auto; background: var(--sidebar); border-right: 1px solid #242424; }
.brand { height: 87px; padding: 22px 22px 16px; display: flex; align-items: center; gap: 9px; }
.brand img { display: block; width: 150px; max-height: 42px; object-fit: contain; object-position: left center; filter: brightness(0) invert(1); }
.brand-tag { margin-left: auto; padding: 4px 6px; border: 1px solid rgb(80 211 243 / 22%); border-radius: 5px; color: var(--cyan); font-size: 8px; font-weight: 800; letter-spacing: .12em; }
.nav-group { padding: 18px 12px 0; }
.nav-label { padding: 0 12px; margin: 0 0 8px; color: #686868; font-size: 9px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.nav-link { min-height: 42px; margin: 2px 0; padding: 0 12px; display: flex; align-items: center; gap: 12px; border: 1px solid transparent; border-radius: 8px; color: #A2AAB8; font-size: 13px; font-weight: 500; transition: background .16s ease, color .16s ease, border-color .16s ease; }
.nav-link i { width: 18px; font-size: 17px; color: #848B98; }
.nav-link:hover { background: #191919; color: var(--ink); }
.nav-link.active { background: #171D25; border-color: #252F3F; color: var(--ink); }
.nav-link.active i { color: var(--cyan); }
.nav-count { margin-left: auto; padding: 2px 7px; border-radius: 999px; background: #222A36; color: #AEB8C8; font-size: 10px; }
.sidebar-bottom { margin-top: auto; padding: 12px; border-top: 1px solid #242424; }
.sidebar-bottom .nav-link { min-height: 38px; }
.user-card { margin-top: 10px; padding: 12px 9px 4px; display: flex; align-items: center; gap: 10px; border-top: 1px solid #242424; }
.user-signout { width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid transparent; border-radius: 7px; background: transparent; color: #818997; cursor: pointer; }
.user-signout:hover { border-color: var(--line); background: var(--surface); color: var(--ink); }
.user-meta { min-width: 0; flex: 1; }
.user-meta strong, .user-meta span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-meta strong { color: #E8EDF5; font-size: 11px; font-weight: 600; }
.user-meta span { margin-top: 2px; color: #818997; font-size: 10px; }

.workspace { min-height: 100vh; margin-left: 246px; display: flex; flex-direction: column; background: var(--bg); }
.topbar { height: 62px; padding: 0 28px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-bottom: 1px solid #1D1D1D; background: rgb(17 17 17 / 88%); }
.breadcrumb { display: flex; align-items: center; gap: 10px; color: #7D8490; font-size: 12px; }
.breadcrumb i { color: #545B66; font-size: 13px; }
.breadcrumb strong { color: var(--ink); font-weight: 600; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.local-pill { display: inline-flex; align-items: center; gap: 7px; padding: 6px 9px; border: 1px solid #283142; border-radius: 999px; background: #121823; color: #B6C2D4; font-size: 10px; }
.local-pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--warning); box-shadow: 0 0 7px rgb(251 191 36 / 45%); }
.api-state { color: #7F8CA0; font-size: 10px; }
.icon-button { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid transparent; border-radius: 8px; background: transparent; color: #A2AAB8; cursor: pointer; }
.icon-button:hover { border-color: var(--line); background: var(--surface); color: var(--ink); }
.mobile-menu { display: none; }
.main-content { width: 100%; max-width: 1540px; margin: 0 auto; padding: 29px 30px 48px; }

.page-head { margin-bottom: 24px; display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; }
.page-kicker { margin: 0 0 6px; color: var(--green); font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.page-head h1 { margin: 0; color: var(--ink); font-size: 27px; font-weight: 700; letter-spacing: -.025em; }
.page-head p { margin: 6px 0 0; color: #A3AAB6; font-size: 14px; }
.page-actions { display: flex; align-items: center; gap: 8px; }
.btn { min-height: 38px; padding: 0 13px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 8px; cursor: pointer; font-size: 13px; font-weight: 600; transition: background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease; }
.btn:disabled { opacity: .5; cursor: wait; }
.btn-primary { border-color: #28B85D; background: var(--green); color: #07130B; }
.btn-primary:hover:not(:disabled) { background: #39E078; transform: translateY(-1px); }
.btn-secondary { border-color: #2B3547; background: #171D27; color: #D8DFE9; }
.btn-secondary:hover:not(:disabled) { border-color: #42516B; background: #202938; }
.btn-danger { border-color: #713B43; background: #2D1B20; color: #F0B3B8; }
.btn-danger:hover:not(:disabled) { border-color: #A14B56; background: #3A2027; }
.btn-quiet { border-color: transparent; background: transparent; color: #9AA4B3; }
.btn-quiet:hover:not(:disabled) { background: #171D27; color: var(--ink); }
.btn-sm { min-height: 34px; padding: 0 10px; font-size: 12px; }
.btn i { font-size: 15px; }

.stat-grid { margin-bottom: 18px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; }
.stat-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat-card { min-height: 128px; padding: 16px 17px 14px; border: 1px solid var(--line); border-radius: 11px; background: linear-gradient(155deg, #161D29, #121721 82%); }
.stat-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.stat-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; background: rgb(80 211 243 / 10%); color: var(--cyan); font-size: 17px; }
.stat-icon.green { background: rgb(37 211 102 / 10%); color: var(--green); }
.stat-icon.yellow { background: rgb(251 191 36 / 10%); color: var(--warning); }
.stat-icon.purple { background: rgb(167 139 250 / 11%); color: #B69AFF; }
.stat-trend { display: inline-flex; align-items: center; gap: 3px; color: var(--success); font-size: 12px; }
.stat-value { margin: 14px 0 3px; color: var(--ink); font-size: 28px; font-weight: 700; letter-spacing: -.03em; line-height: 1; }
.stat-label { color: #AFB7C4; font-size: 13px; }
.stat-foot { margin-top: 7px; color: #798394; font-size: 12px; }

.content-grid { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(260px, .85fr); gap: 14px; }
.panel { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); }
.panel-head { min-height: 57px; padding: 0 17px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); }
.panel-title { margin: 0; display: flex; align-items: center; gap: 8px; color: #E9EDF4; font-size: 15px; font-weight: 600; }
.panel-title i { color: var(--cyan); font-size: 16px; }
.panel-subtitle { margin: 4px 0 0; color: #8F99AA; font-size: 12px; }
.text-link { display: inline-flex; align-items: center; gap: 5px; color: var(--cyan); font-size: 12px; font-weight: 500; }
.text-link:hover { color: #8AE8FA; }

.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { padding: 12px 16px; background: #171F2B; color: #98A2B2; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.data-table td { padding: 14px 16px; border-bottom: 1px solid #222B3A; color: #C5CDD8; font-size: 13px; white-space: nowrap; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover td { background: rgb(80 211 243 / 2.5%); }
.data-table tbody tr.clickable-row { cursor: pointer; }
.tenant-cell { display: flex; align-items: center; gap: 10px; }
.tenant-mark { width: 34px; height: 34px; display: grid; flex: 0 0 34px; place-items: center; border: 1px solid #344153; border-radius: 8px; background: #202A39; color: #B9D2E7; font-size: 12px; font-weight: 700; }
.tenant-name { color: #F0F3F7; font-size: 13px; font-weight: 600; }
.tenant-owner { margin-top: 3px; color: #8D98A9; font-size: 12px; }
.status-badge { min-height: 25px; padding: 0 9px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid transparent; border-radius: 999px; font-size: 12px; font-weight: 600; }
.status-badge::before { width: 6px; height: 6px; border-radius: 50%; background: currentColor; content: ''; }
.status-badge.active { border-color: rgb(52 211 153 / 20%); background: rgb(52 211 153 / 8%); color: #55D9A0; }
.status-badge.provisioning { border-color: rgb(251 191 36 / 22%); background: rgb(251 191 36 / 8%); color: #F1C34D; }
.status-badge.suspended { border-color: rgb(248 113 113 / 20%); background: rgb(248 113 113 / 8%); color: #F48A8A; }
.status-badge.online { border-color: rgb(52 211 153 / 20%); background: rgb(52 211 153 / 8%); color: #55D9A0; }
.status-badge.stopped { border-color: rgb(248 113 113 / 20%); background: rgb(248 113 113 / 8%); color: #F48A8A; }
.status-badge.offline { border-color: #30394A; background: #202938; color: #A0A9B8; }
.plan-badge { padding: 5px 8px; border-radius: 5px; background: #222B39; color: #C4CDDA; font-size: 12px; font-weight: 600; }
.row-action { width: 28px; height: 28px; display: inline-grid; place-items: center; border: 1px solid transparent; border-radius: 7px; background: transparent; color: #8D98A9; cursor: pointer; }
.row-action:hover { border-color: #344153; background: #222B39; color: var(--ink); }
.context-menu-backdrop { position: fixed; inset: 0; z-index: 120; background: transparent; }
.row-context-menu { position: fixed; z-index: 121; min-width: 190px; padding: 4px; border: 1px solid #344153; border-radius: 8px; background: #171D27; box-shadow: 0 12px 32px rgb(0 0 0 / 38%); }
.context-menu-danger { width: 100%; min-height: 40px; padding: 0 10px; display: flex; align-items: center; gap: 8px; border: 0; border-radius: 5px; background: transparent; color: #F48A8A; cursor: pointer; font-size: 12px; text-align: left; }
.context-menu-danger:hover, .context-menu-danger:focus-visible { outline: none; background: rgb(248 113 113 / 10%); }
.context-menu-danger:disabled { cursor: wait; opacity: .65; }

.activity-list { padding: 2px 16px; }
.activity-item { padding: 14px 0; display: flex; gap: 10px; border-bottom: 1px solid #222B3A; }
.activity-item:last-child { border-bottom: 0; }
.activity-icon { width: 29px; height: 29px; display: grid; flex: 0 0 29px; place-items: center; border-radius: 8px; background: #202A38; color: var(--cyan); font-size: 14px; }
.activity-icon.success { background: rgb(52 211 153 / 9%); color: var(--success); }
.activity-icon.warning { background: rgb(251 191 36 / 9%); color: var(--warning); }
.activity-copy { min-width: 0; }
.activity-copy strong { display: block; color: #E2E7EE; font-size: 13px; font-weight: 600; }
.activity-copy p { margin: 4px 0 0; color: #9AA4B3; font-size: 12px; line-height: 1.5; }
.activity-copy time { display: block; margin-top: 6px; color: #6F7A8B; font-size: 12px; }
.health-row { padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 1px solid #222B3A; color: #BCC5D1; font-size: 13px; }
.health-row:last-child { border-bottom: 0; }
.health-label { display: flex; align-items: center; gap: 8px; }
.health-label i { color: #91A0B3; font-size: 14px; }
.infra-metrics-grid { padding: 15px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.infra-metric-card { min-width: 0; padding: 13px; border: 1px solid #283243; border-radius: 9px; background: #111722; }
.infra-metric-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; color: #AAB4C3; font-size: 13px; }
.infra-metric-top > span { display: flex; align-items: center; gap: 7px; }
.infra-metric-top i { color: var(--cyan); font-size: 15px; }
.infra-metric-top strong { color: #EDF1F6; font-size: 15px; white-space: nowrap; }
.infra-metric-card small { margin-top: 9px; display: block; color: #8F9AAA; font-size: 12px; line-height: 1.5; }
.infra-metric-bar { height: 6px; margin-top: 13px; overflow: hidden; border-radius: 999px; background: #293241; }
.infra-metric-bar span { height: 100%; max-width: 100%; display: block; border-radius: inherit; background: #36C776; transition: width .25s ease; }
.infra-network-rates { margin-top: 12px; display: flex; gap: 14px; color: #E0E6EE; font-size: 13px; }
.infra-network-rates span { display: flex; align-items: center; gap: 5px; }
.infra-network-rates i { color: var(--cyan); }
.infra-metrics-note { padding: 9px 15px 0; display: flex; align-items: center; gap: 7px; color: #AAB4C3; font-size: 12px; }
.infra-metrics-note i { color: var(--cyan); }
.health-ok { display: inline-flex; align-items: center; gap: 5px; color: #55D9A0; font-size: 12px; }
.health-warning { color: #F1C34D; }

.toolbar { margin-bottom: 13px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.toolbar-left, .toolbar-right { display: flex; align-items: center; gap: 8px; }
.search-box { width: min(340px, 100%); height: 40px; padding: 0 11px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-3); color: #8E9BAE; }
.search-box i { font-size: 14px; }
.search-box input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 13px; }
.search-box input::placeholder { color: #798394; }
.filter-select { height: 40px; padding: 0 30px 0 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-3); color: #C6CEDA; font-size: 13px; }
.result-count { color: #95A0B1; font-size: 12px; }
.empty-state { padding: 44px 20px; text-align: center; }
.empty-state i { color: #79889B; font-size: 28px; }
.empty-state h3 { margin: 12px 0 5px; color: #EDF1F6; font-size: 16px; }
.empty-state p { max-width: 420px; margin: 0 auto; color: #A0AAB8; font-size: 13px; line-height: 1.55; }

.flag-list { padding: 0 17px; }
.flag-row { min-height: 82px; display: flex; align-items: center; gap: 13px; border-bottom: 1px solid #252E3C; }
.flag-row:last-child { border-bottom: 0; }
.flag-icon { width: 35px; height: 35px; flex: 0 0 35px; display: grid; place-items: center; border-radius: 9px; background: #202A38; color: #91CADD; font-size: 17px; }
.flag-info { min-width: 0; flex: 1; }
.flag-info strong { color: #E6EBF2; font-size: 14px; font-weight: 600; }
.flag-info p { margin: 5px 0 0; color: #9AA4B3; font-size: 13px; line-height: 1.5; }
.flag-meta { margin-top: 7px; color: #818C9D; font-size: 12px; }
.flag-sync-error { margin-top: 7px !important; color: #E9A5A5 !important; font-size: 12px !important; overflow-wrap: anywhere; }
.switch { position: relative; width: 38px; height: 22px; flex: 0 0 38px; border: 1px solid #4A5362; border-radius: 999px; background: #303846; cursor: pointer; transition: background .18s ease, border-color .18s ease; }
.switch::after { position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #E2E7EE; content: ''; transition: transform .18s ease; }
.switch[aria-checked="true"] { border-color: #27B95D; background: #208E4B; }
.switch[aria-checked="true"]::after { transform: translateX(16px); background: #fff; }
.switch:disabled { opacity: .55; cursor: wait; }

.modal-backdrop { position: fixed; inset: 0; z-index: 80; padding: 20px; display: grid; place-items: center; background: rgb(0 0 0 / 70%); backdrop-filter: blur(3px); }
.modal { width: min(520px, 100%); overflow: hidden; border: 1px solid #30394B; border-radius: 13px; background: #151B26; box-shadow: 0 24px 70px rgb(0 0 0 / 55%); }
.modal-head { padding: 18px 20px; display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; color: var(--ink); font-size: 18px; }
.modal-head p { margin: 5px 0 0; color: #A4ADBA; font-size: 13px; }
.modal-body { padding: 18px 20px; }
.tenant-pulse-import { margin-bottom: 15px; }
.tenant-pulse-import > .btn { margin-bottom: 10px; }
.tenant-pulse-import .client-pulse-confirmation { margin: 0 0 12px; }
.tenant-pulse-import .client-pulse-search { margin-bottom: 8px; }
.tenant-pulse-import .client-pulse-results { max-height: 190px; }
.form-grid { display: grid; gap: 13px; }
.form-grid-wide { grid-column: 1 / -1; }
.field label { margin-bottom: 7px; display: block; color: #CCD3DE; font-size: 13px; font-weight: 600; }
.field input, .field select { width: 100%; height: 42px; padding: 0 11px; border: 1px solid #303B4D; border-radius: 7px; background: #0B0F15; color: #EEF2F7; font-size: 14px; }
.field input::placeholder { color: #7D8796; }
.form-error { margin: 12px 0 0; color: #F89999; font-size: 12px; }
.modal-foot { padding: 13px 20px; display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--line); }
.drawer { position: fixed; inset: 0 0 0 auto; z-index: 70; width: min(540px, 100%); padding: 0; overflow-y: auto; border-left: 1px solid #30394B; background: #141A24; box-shadow: -18px 0 60px rgb(0 0 0 / 35%); }
.drawer-backdrop { position: fixed; inset: 0; z-index: 65; background: rgb(0 0 0 / 50%); }
.license-detail-backdrop { position: fixed; inset: 0; z-index: 85; background: rgb(0 0 0 / 50%); }
.license-detail-drawer { z-index: 90; }
.license-select-row { cursor: pointer; }
.drawer-section { padding: 17px 20px; border-bottom: 1px solid #273142; }
.drawer-section h3 { margin: 0 0 12px; color: #9EA9B9; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.detail-line { margin: 11px 0; display: flex; justify-content: space-between; gap: 16px; color: #9DA7B6; font-size: 13px; }
.detail-line strong { color: #E2E7EE; font-weight: 500; text-align: right; }
.toast { position: fixed; right: 22px; bottom: 22px; z-index: 100; max-width: min(420px, calc(100vw - 32px)); padding: 13px 15px; display: flex; align-items: center; gap: 9px; border: 1px solid #375643; border-radius: 9px; background: #132018; color: #CDF5D8; box-shadow: 0 12px 30px rgb(0 0 0 / 32%); font-size: 13px; }
.toast.error { border-color: #663A40; background: #251517; color: #FFD3D3; }
.toast-enter-active, .toast-leave-active { transition: opacity .16s ease, transform .16s ease; }
.toast-enter-from, .toast-leave-to { opacity: 0; transform: translateY(8px); }
.loading-row { padding: 15px 16px; color: #9BA5B3; font-size: 13px; }
.error-banner { margin-bottom: 14px; padding: 12px 14px; display: flex; align-items: center; gap: 8px; border: 1px solid #73454A; border-radius: 8px; background: #28191B; color: #FFC5C5; font-size: 12px; }
.settings-stack { max-width: 820px; display: grid; gap: 14px; }
.settings-tabs { max-width: 820px; margin: -8px 0 14px; display: flex; gap: 8px; overflow-x: auto; border-bottom: 1px solid var(--line); }
.settings-tabs button { min-height: 42px; padding: 0 13px; display: inline-flex; align-items: center; gap: 8px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); cursor: pointer; font-size: 14px; white-space: nowrap; }
.settings-tabs button:hover, .settings-tabs button.active { color: var(--ink); }
.settings-tabs button.active { border-bottom-color: var(--green); }
.settings-tabs button i { color: var(--cyan); font-size: 16px; }
.settings-form { padding: 17px; display: grid; gap: 14px; }
.settings-help { margin: 6px 0 0; color: #9AA4B3; font-size: 13px; line-height: 1.5; }
.settings-error { padding: 13px 16px; display: flex; align-items: center; gap: 9px; color: #FFC5C5; font-size: 12px; }
.settings-error > span { flex: 1; }
.settings-divider { height: 1px; background: var(--line); }
.settings-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.integration-endpoints { padding: 11px 12px; display: grid; gap: 8px; border: 1px solid #293446; border-radius: 8px; background: #101620; }
.integration-endpoints > div { min-width: 0; display: grid; gap: 4px; }
.integration-endpoints span { color: #8F99AA; font-size: 12px; }
.integration-endpoints code { overflow-wrap: anywhere; color: #C4D3E5; font-size: 12px; }
.license-search-panel { margin-bottom: 14px; }
.license-search-toolbar { margin: 0; padding: 12px 16px; justify-content: flex-start; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.license-search-toolbar .search-box { flex: 1 1 250px; width: auto; }
.license-search-toolbar .result-count { margin-left: auto; }
.license-client-table td:last-child { text-align: right; }
.license-empty { padding-top: 27px; padding-bottom: 27px; }
.license-pagination { padding: 9px 14px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); }
.license-pagination > div { display: flex; gap: 5px; }
.license-workflow-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, .9fr); align-items: start; gap: 14px; }
.license-client-summary { padding: 17px; display: flex; align-items: flex-start; gap: 11px; }
.license-client-summary .tenant-mark { width: 38px; height: 38px; flex-basis: 38px; }
.license-client-summary > div { min-width: 0; display: grid; gap: 4px; }
.license-client-summary strong { color: #EDF1F6; font-size: 14px; }
.license-client-summary span:not(.tenant-mark) { color: #A0AAB8; font-size: 12px; overflow-wrap: anywhere; }
.license-installations { padding-top: 13px; }
.license-installations h3 { display: flex; align-items: center; justify-content: space-between; }
.license-no-installations { color: #9AA4B3; font-size: 12px; }
.license-installation-list { display: grid; }
.license-installation { padding: 9px 0; display: flex; align-items: center; gap: 9px; border-bottom: 1px solid #252E3C; }
.license-installation:last-child { border-bottom: 0; }
.license-installation .activity-icon { flex: 0 0 29px; }
.license-installation > div { min-width: 0; display: grid; gap: 3px; }
.license-installation strong { overflow: hidden; color: #E2E7EE; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.license-installation span:not(.activity-icon) { overflow: hidden; color: #9AA4B3; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.license-create-form select { width: 100%; height: 42px; padding: 0 11px; border: 1px solid #303B4D; border-radius: 7px; background: #0B0F15; color: #EEF2F7; font-size: 14px; }
.license-prerequisite { padding: 12px; display: flex; align-items: flex-start; gap: 8px; border: 1px solid #38404C; border-radius: 8px; background: #171D27; color: #AEB8C8; font-size: 13px; line-height: 1.5; }
.license-prerequisite i { color: var(--cyan); }
.license-result { margin: 0 16px 16px; overflow: hidden; border: 1px solid #28543C; border-radius: 9px; background: #101C16; }
.license-result-heading { padding: 12px; display: flex; align-items: flex-start; gap: 9px; border-bottom: 1px solid #244532; color: var(--success); }
.license-result-heading > i { font-size: 17px; }
.license-result-heading > div { display: grid; gap: 3px; }
.license-result-heading strong { color: #D6F5E1; font-size: 13px; }
.license-result-heading span { color: #A6C5B1; font-size: 12px; }
.license-result-tenant { padding: 11px 12px; display: grid; gap: 4px; border-bottom: 1px solid #244532; }
.license-result-tenant strong { color: #E5F1E9; font-size: 13px; }
.license-result-tenant > span:not(.result-count), .license-result-tenant code { color: #AFC0B4; font-size: 12px; overflow-wrap: anywhere; }
.license-token-block { padding: 11px 12px; display: grid; gap: 7px; }
.license-token-block > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.license-token-block > code { padding: 9px; overflow-wrap: anywhere; border: 1px solid #2A4937; border-radius: 6px; background: #0A130E; color: #C9E8D2; font-size: 12px; user-select: all; }
.license-integration-warning { align-items: center; }
.license-integration-warning > span { flex: 1; }
.client-page-tabs { margin: -8px 0 17px; display: flex; gap: 4px; border-bottom: 1px solid var(--line); }
.client-page-tabs a { min-height: 42px; padding: 0 14px; display: inline-flex; align-items: center; border-bottom: 2px solid transparent; color: #9AA4B3; font-size: 13px; font-weight: 600; }
.client-page-tabs a[aria-selected="true"] { border-bottom-color: var(--green); color: #EAF3ED; }
.license-list-toolbar { margin: 0; padding: 10px 14px; justify-content: flex-start; border-bottom: 1px solid var(--line); }
.license-list-toolbar .search-box { flex: 1; }
.client-detail-tabs { padding: 0 20px; display: flex; gap: 5px; border-bottom: 1px solid var(--line); }
.client-detail-tabs button { min-height: 42px; padding: 0 12px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: #98A2B2; cursor: pointer; font-size: 13px; font-weight: 600; }
.client-detail-tabs button[aria-selected="true"] { border-bottom-color: var(--green); color: #EAF3ED; }
.client-full-tabs { max-width: 900px; margin: -8px 0 16px; display: flex; gap: 5px; overflow-x: auto; border-bottom: 1px solid var(--line); }
.client-full-tabs button { min-height: 44px; padding: 0 14px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); cursor: pointer; font-size: 14px; font-weight: 600; white-space: nowrap; }
.client-full-tabs button.active, .client-full-tabs button:hover { color: var(--ink); }
.client-full-tabs button.active { border-bottom-color: var(--green); }
.full-detail-panel { max-width: 900px; }
.full-detail-grid, .full-feature-list { padding: 8px 20px 18px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; }
.full-detail-grid .detail-line, .full-feature-list .detail-line { min-width: 0; padding: 8px 0; border-bottom: 1px solid #222B3A; }
.full-detail-grid .detail-line strong, .full-detail-grid .detail-line a, .full-feature-list .detail-line span:first-child { overflow-wrap: anywhere; }
.full-detail-section { padding: 10px 20px 18px; }
.full-detail-section h3 { color: var(--ink); font-size: 16px; }
.full-runtime-key { padding: 0 20px 20px; }
.full-runtime-key .license-token-block { margin-top: 12px; }
.runtime-database-tools { margin: 0 20px 20px; padding: 16px; display: grid; gap: 13px; border: 1px solid var(--line); border-radius: 9px; background: #111720; }
.runtime-database-tools h3 { margin: 0; color: var(--ink); font-size: 15px; }
.runtime-database-tools p { margin: 4px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.runtime-database-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.runtime-file-button { position: relative; overflow: hidden; cursor: pointer; }
.runtime-file-button input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.runtime-backup-name { max-width: 260px; overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.runtime-database-actions .btn.disabled { opacity: .6; pointer-events: none; }
.client-detail-content { padding-bottom: 12px; }
.client-licenses { padding: 15px 16px 20px; }
.client-license-heading { margin-bottom: 11px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.client-license-heading h3, .client-license-form-heading h3 { margin: 0; color: #E9EDF4; font-size: 15px; }
.client-license-heading p, .client-license-form-heading p { margin: 4px 0 0; color: #929DAE; font-size: 12px; line-height: 1.5; }
.client-licenses .data-table th { padding-right: 10px; padding-left: 10px; }
.client-licenses .data-table td { padding: 10px; }
.client-license-form { margin-top: 15px; padding-top: 14px; border-top: 1px solid var(--line); }
.client-license-form-heading { margin-bottom: 13px; }
.client-pulse-search { margin-bottom: 9px; display: flex; align-items: center; gap: 7px; }
.client-pulse-search .search-box { flex: 1; width: auto; }
.client-pulse-results { max-height: 170px; overflow-y: auto; border: 1px solid #283244; border-radius: 8px; }
.client-pulse-result { width: 100%; padding: 9px 11px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 0; border-bottom: 1px solid #252E3C; background: transparent; color: #DCE3EC; cursor: pointer; text-align: left; }
.client-pulse-result:last-child { border-bottom: 0; }
.client-pulse-result:hover, .client-pulse-result:focus-visible { background: #1B2431; }
.client-pulse-result span, .client-pulse-confirmation span { min-width: 0; display: grid; gap: 3px; }
.client-pulse-result strong, .client-pulse-confirmation strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.client-pulse-result small, .client-pulse-confirmation small { overflow: hidden; color: #98A3B3; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.client-pulse-result > i { color: var(--cyan); }
.client-pulse-confirmation { margin: 11px 0; padding: 10px; display: flex; align-items: center; gap: 9px; border: 1px solid #28543C; border-radius: 8px; background: #101C16; color: var(--success); }
.client-pulse-confirmation span { flex: 1; color: #E5F1E9; }
.client-license-fields { margin-top: 12px; display: grid; gap: 12px; }
.client-license-fields select { width: 100%; height: 42px; padding: 0 11px; border: 1px solid #303B4D; border-radius: 7px; background: #0B0F15; color: #EEF2F7; font-size: 14px; }
.client-licenses .license-result { margin: 13px 0 0; }
.client-licenses .settings-error { padding: 9px 0; }
.client-licenses .license-prerequisite { margin: 8px 0; }
.status-badge.revoked, .status-badge.expired { border-color: rgb(248 113 113 / 20%); background: rgb(248 113 113 / 8%); color: #F48A8A; }

.mobile-overlay { display: none; }
@media (max-width: 1100px) {
    .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .content-grid { grid-template-columns: minmax(0, 1.45fr) minmax(235px, .8fr); }
}
@media (max-width: 820px) {
    .sidebar { transform: translateX(-100%); transition: transform .2s ease; }
    .sidebar.open { transform: translateX(0); }
    .mobile-overlay.open { position: fixed; inset: 0; z-index: 25; display: block; background: rgb(0 0 0 / 60%); }
    .workspace { margin-left: 0; }
    .mobile-menu { display: inline-grid; }
    .topbar { padding: 0 16px; }
    .main-content { padding: 24px 18px 38px; }
    .content-grid { grid-template-columns: 1fr; }
    .license-workflow-grid { grid-template-columns: 1fr; }
    .infra-metrics-grid { grid-template-columns: 1fr; }
    .client-license-heading { align-items: flex-start; }
    .full-detail-grid, .full-feature-list { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
    .local-pill { padding: 5px 7px; font-size: 0; }
    .local-pill .dot { width: 7px; height: 7px; }
    .api-state { display: none; }
    .topbar { height: 56px; gap: 8px; }
    .breadcrumb { gap: 7px; font-size: 10px; }
    .main-content { padding: 20px 13px 30px; }
    .page-head { align-items: flex-start; flex-direction: column; }
    .page-actions { width: 100%; }
    .page-actions .btn { flex: 1; }
    .stat-grid { gap: 9px; }
    .stat-grid-3 { grid-template-columns: 1fr; }
    .stat-card { min-height: 116px; padding: 13px; }
    .stat-value { font-size: 22px; }
    .toolbar { align-items: stretch; flex-direction: column; }
    .toolbar-left, .toolbar-right { width: 100%; }
    .search-box { flex: 1; }
    .filter-select { flex: 1; }
    .panel-head { padding: 0 13px; }
    .data-table th, .data-table td { padding-right: 12px; padding-left: 12px; }
    .user-meta strong { max-width: 160px; }
    .license-search-toolbar .result-count { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
