:root {
    --bg: #0b1020;
    --panel: #121a2d;
    --panel-2: #182238;
    --text: #edf2ff;
    --muted: #93a4c4;
    --line: #263451;
    --accent: #6ea8fe;
    --good: #61d095;
    --warn: #f6c85f;
    --bad: #ff6b7a;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text);
}
a { color: inherit; text-decoration: none; }
code {
    font-family: "SFMono-Regular", Consolas, monospace;
    color: #b9d5ff;
    word-break: break-all;
}
.topbar {
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    background: rgba(11,16,32,.96);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 10;
}
.brand { font-weight: 800; font-size: 20px; }
.tenant { color: var(--muted); margin-left: 14px; font-size: 13px; }
.userbox { display: flex; align-items: center; gap: 16px; color: var(--muted); }
.userbox form { margin: 0; }
.link-button { border: 0; background: none; color: var(--accent); cursor: pointer; }
.shell { display: grid; grid-template-columns: 230px 1fr; min-height: calc(100vh - 68px); }
.sidebar {
    border-right: 1px solid var(--line);
    padding: 22px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.sidebar a {
    color: var(--muted);
    padding: 11px 14px;
    border-radius: 10px;
}
.sidebar a:hover { background: var(--panel-2); color: var(--text); }
.content { padding: 30px; min-width: 0; }
.page-head {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}
.page-head h1, .panel h2 { margin: 0 0 7px; }
.page-head p, .panel p { margin: 0; color: var(--muted); }
.cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 22px;
}
.stat, .panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 16px;
}
.stat { padding: 22px; }
.stat span { color: var(--muted); display: block; margin-bottom: 12px; }
.stat strong { font-size: 30px; }
.panel { padding: 22px; margin-bottom: 22px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { text-align: left; padding: 13px 11px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
td { font-size: 14px; }
.badge {
    display: inline-flex;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 12px;
    background: var(--panel-2);
}
.badge.active { color: var(--good); }
.badge.suspended { color: var(--warn); }
.badge.revoked, .badge.disabled, .badge.expired { color: var(--bad); }
.form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 18px;
}
.form-grid label, .stack label {
    color: var(--muted);
    font-size: 13px;
    display: flex;
    flex-direction: column;
    gap: 7px;
}
.form-grid .wide { grid-column: 1 / -1; }
.actions { display: flex; align-items: end; }
input, select, textarea {
    width: 100%;
    background: #0e1629;
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 11px 12px;
    outline: none;
}
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
.button {
    border: 1px solid var(--line);
    background: var(--panel-2);
    color: var(--text);
    padding: 9px 13px;
    border-radius: 9px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.button.primary { background: var(--accent); color: #08101f; border-color: transparent; font-weight: 700; }
.button.danger { color: var(--bad); }
.inline { display: flex; gap: 7px; min-width: 220px; }
.alert {
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 20px;
    border: 1px solid var(--line);
    background: var(--panel);
}
.alert.success { border-color: rgba(97,208,149,.5); }
.alert.danger { border-color: rgba(255,107,122,.5); color: #ffd7dd; }
.secret-row { display: flex; gap: 12px; align-items: center; margin: 12px 0 6px; }
.secret-row code { font-size: 17px; }
.json { display: block; max-width: 360px; max-height: 80px; overflow: auto; }
.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        radial-gradient(circle at 20% 20%, rgba(110,168,254,.16), transparent 32%),
        radial-gradient(circle at 80% 70%, rgba(97,208,149,.10), transparent 30%),
        var(--bg);
}
.login-card {
    width: min(420px, 100%);
    background: rgba(18,26,45,.92);
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 32px;
    box-shadow: 0 30px 100px rgba(0,0,0,.35);
}
.logo-mark {
    width: 48px; height: 48px; display: grid; place-items: center;
    border-radius: 14px; background: var(--accent); color: #08101f; font-weight: 900;
}
.login-card h1 { margin-bottom: 7px; }
.login-card p { color: var(--muted); margin: 0 0 22px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.empty-state { text-align: center; padding: 60px 20px; }

@media (max-width: 1000px) {
    .cards { grid-template-columns: repeat(2, 1fr); }
    .form-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
    .shell { grid-template-columns: 1fr; }
    .sidebar { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); }
    .content { padding: 18px; }
    .cards, .form-grid { grid-template-columns: 1fr; }
    .form-grid .wide { grid-column: auto; }
    .topbar { padding: 0 16px; }
    .tenant { display: none; }
}


.embed-code {
    min-width: 330px;
    min-height: 76px;
    font-family: "SFMono-Regular", Consolas, monospace;
    font-size: 11px;
    margin-bottom: 7px;
}

.license-blocked-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        radial-gradient(circle at 20% 20%, rgba(255,107,122,.15), transparent 34%),
        radial-gradient(circle at 80% 80%, rgba(110,168,254,.10), transparent 30%),
        var(--bg);
}

.license-blocked-card {
    width: min(560px, 100%);
    text-align: center;
    padding: 42px;
    border: 1px solid rgba(255,107,122,.42);
    border-radius: 24px;
    background: rgba(18,26,45,.96);
    box-shadow: 0 35px 110px rgba(0,0,0,.45);
}

.blocked-icon {
    width: 72px;
    height: 72px;
    display: grid;
    place-items: center;
    margin: 0 auto 20px;
    border-radius: 22px;
    background: rgba(255,107,122,.14);
    color: var(--bad);
    border: 1px solid rgba(255,107,122,.45);
    font-size: 40px;
    font-weight: 900;
}

.blocked-kicker {
    color: var(--bad);
    font-size: 12px;
    letter-spacing: .18em;
    font-weight: 800;
}

.license-blocked-card h1 {
    font-size: clamp(30px, 6vw, 48px);
    margin: 10px 0 8px;
}

.blocked-product {
    color: var(--accent);
    font-weight: 700;
    margin: 0 0 20px;
}

.blocked-reason {
    color: var(--text);
    font-size: 18px;
    line-height: 1.6;
}

.blocked-status {
    display: inline-flex;
    margin: 8px 0 22px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255,107,122,.10);
    color: var(--bad);
    border: 1px solid rgba(255,107,122,.30);
    font-family: "SFMono-Regular", Consolas, monospace;
}

.blocked-help {
    color: var(--muted);
    line-height: 1.6;
}
