:root {
    --bg: #060908;
    --bg-sidebar: #050807;
    --bg-panel: #0b120f;
    --bg-panel-alt: #101a15;
    --border: #1a2e24;
    --text: #e3ece6;
    --text-dim: #6f8a7a;
    --accent: #15b86b;
    --accent-bright: #2effa0;
    --accent-dim: #0c5c38;
    --danger: #e0605a;
    --warn: #d9a14a;
    --font-mono: "JetBrains Mono", "SF Mono", Consolas, monospace;
    --font-body: "Inter", -apple-system, sans-serif;
}

* { box-sizing: border-box; }

body {
    background: var(--bg);
    background-image: radial-gradient(circle at 15% 0%, rgba(21,184,107,0.07), transparent 40%);
    color: var(--text);
    font-family: var(--font-body);
    margin: 0;
    min-height: 100vh;
}

.shell {
    display: flex;
    min-height: 100vh;
}

/* --- Sidebar --- */
.sidebar {
    width: 240px;
    flex-shrink: 0;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-orb {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    flex-shrink: 0;
    background: radial-gradient(circle at 35% 30%, #0f3f28 0%, #050807 55%, #000 100%);
    box-shadow:
        0 0 0 1px rgba(46,255,160,0.25),
        0 0 10px 2px rgba(46,255,160,0.35),
        0 0 22px 4px rgba(21,184,107,0.25);
    position: relative;
}

.brand-orb::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1px solid rgba(46,255,160,0.5);
    box-shadow: inset 0 0 6px rgba(46,255,160,0.4);
}

.sidebar-brand h1 {
    font-family: var(--font-mono);
    font-size: 19px;
    font-weight: 700;
    margin: 0;
    color: var(--text);
    line-height: 1.1;
}

.sidebar-brand h1 .brand-black { color: var(--text); font-weight: 800; }
.sidebar-brand h1 .brand-hold { color: var(--accent-bright); font-weight: 400; }

.sidebar-sub {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--accent);
    margin: 4px 0 0 46px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sidebar-divider {
    margin: 18px 0 14px;
    border-top: 1px solid var(--border);
    position: relative;
}

.sidebar-divider-accent {
    position: absolute;
    top: -1px;
    left: 0;
    width: 40%;
    height: 1px;
    background: linear-gradient(90deg, var(--accent-bright), transparent);
    box-shadow: 0 0 6px 0 rgba(46,255,160,0.6);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 18px;
}

.sidebar-nav a {
    color: var(--text-dim);
    text-decoration: none;
    font-weight: 600;
    font-size: 14.5px;
    padding: 10px 14px;
    border-radius: 8px;
    border-left: 3px solid transparent;
}

.sidebar-nav a:hover {
    color: var(--text);
    background: var(--bg-panel);
}

.sidebar-nav a.active {
    color: var(--text);
    background: var(--bg-panel-alt);
    border-left: 3px solid var(--accent-bright);
    box-shadow: inset 0 0 14px rgba(21,184,107,0.12);
}

.sidebar-section-label {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 6px 0 8px 14px;
}

.sidebar-user {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
}

.sidebar-user-name { color: var(--text-dim); }

.role-badge {
    font-family: var(--font-mono);
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
}

.role-badge.role-admin { background: rgba(46,255,160,0.15); color: var(--accent-bright); }
.role-badge.role-reseller { background: rgba(217,161,74,0.18); color: var(--warn); }
.role-badge.role-client { background: rgba(111,138,122,0.15); color: var(--text-dim); }

/* --- Content --- */
.content {
    flex: 1;
    padding: 32px 40px;
    max-width: 1100px;
}

.content.with-aside {
    max-width: none;
    display: flex;
    gap: 28px;
    align-items: flex-start;
}

.content.with-aside .content-main { flex: 1; min-width: 0; }
.content.with-aside .content-aside { width: 290px; flex-shrink: 0; }

h1 { font-size: 21px; margin: 0 0 20px; }

.card {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 22px;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

th, td {
    text-align: left;
    padding: 11px 8px;
    border-bottom: 1px solid var(--border);
}

th { color: var(--text-dim); font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; }

tr:last-child td { border-bottom: none; }

.status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-family: var(--font-mono);
}

.status.online { background: rgba(46,255,160,0.15); color: var(--accent-bright); }
.status.offline { background: rgba(111,138,122,0.15); color: var(--text-dim); }
.status.installing { background: rgba(217,161,74,0.18); color: var(--warn); }
.status.error { background: rgba(224,96,90,0.15); color: var(--danger); }

.btn {
    display: inline-block;
    background: var(--accent);
    color: #04150d;
    border: none;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.btn:hover { background: var(--accent-bright); box-shadow: 0 0 14px 1px rgba(46,255,160,0.45); }
.btn:disabled { background: var(--bg-panel-alt); color: var(--text-dim); cursor: not-allowed; box-shadow: none; }

.btn.secondary {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
}

.btn.secondary:hover { border-color: var(--accent-dim); box-shadow: none; background: var(--bg-panel-alt); }

.btn.danger { background: var(--danger); color: #fff; }
.btn.danger:hover { background: #f07571; box-shadow: 0 0 14px 1px rgba(224,96,90,0.45); }

.btn.small { padding: 5px 10px; font-size: 13px; }

input, select {
    width: 100%;
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 9px 10px;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 14px;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--accent-dim);
    box-shadow: 0 0 0 2px rgba(21,184,107,0.2);
}

label { font-size: 13px; color: var(--text-dim); display: block; margin-bottom: 4px; }

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}
.checkbox-row input { width: auto; margin: 0; }
.checkbox-row label { margin: 0; color: var(--text); }

.error {
    background: rgba(224,96,90,0.12);
    border: 1px solid rgba(224,96,90,0.3);
    color: var(--danger);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 16px;
}

.notice {
    background: rgba(217,161,74,0.12);
    border: 1px solid rgba(217,161,74,0.3);
    color: var(--warn);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 16px;
}

.console {
    background: #020504;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: var(--font-mono);
    font-size: 13px;
    color: #7df0ae;
    padding: 16px;
    height: 320px;
    overflow-y: auto;
    white-space: pre-wrap;
}

.console-input {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.console-input input {
    margin-bottom: 0;
    font-family: var(--font-mono);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.tabs a {
    padding: 10px 16px;
    color: var(--text-dim);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    border-bottom: 2px solid transparent;
}

.tabs a:hover { color: var(--text); }
.tabs a.active { color: var(--accent-bright); border-bottom-color: var(--accent-bright); }

.stat-row {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    flex: 1;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px 18px;
}

.stat-card .num {
    font-family: var(--font-mono);
    font-size: 26px;
    font-weight: 700;
    color: var(--accent-bright);
}

.stat-card .label {
    font-size: 12px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 4px;
}

/* --- Server hardware/stats card (BlackHold-style sidebar widget) --- */
.server-stats-card {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 18px 18px 20px;
}

.server-stats-card h3 {
    font-family: var(--font-mono);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
    margin: 0 0 14px;
}

.spec-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 9px 0;
    border-bottom: 1px solid var(--border);
}

.spec-row:last-child { border-bottom: none; }

.spec-icon {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(21,184,107,0.12);
    color: var(--accent-bright);
    font-size: 14px;
}

.spec-text .spec-label {
    font-size: 11px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.spec-text .spec-value {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text);
    margin-top: 1px;
}

.spec-text .spec-sub {
    font-size: 12px;
    color: var(--text-dim);
    margin-top: 1px;
}

.quick-links {
    display: flex;
    gap: 8px;
    margin: 14px 0 16px;
}

.quick-links a {
    flex: 1;
    text-align: center;
    background: var(--bg-panel-alt);
    border: 1px solid var(--border);
    color: var(--text-dim);
    font-size: 12px;
    font-weight: 600;
    padding: 8px 6px;
    border-radius: 7px;
    text-decoration: none;
}

.quick-links a:hover { color: var(--accent-bright); border-color: var(--accent-dim); }

.metric-row {
    margin-bottom: 12px;
}

.metric-row:last-child { margin-bottom: 0; }

.metric-row .metric-top {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    margin-bottom: 5px;
}

.metric-row .metric-name { color: var(--text-dim); }
.metric-row .metric-val { font-family: var(--font-mono); color: var(--text); font-weight: 600; }

.gauge {
    height: 6px;
    border-radius: 4px;
    background: var(--bg);
    border: 1px solid var(--border);
    overflow: hidden;
}

.gauge-fill {
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--accent-dim), var(--accent-bright));
    box-shadow: 0 0 8px 0 rgba(46,255,160,0.5);
}

.metric-footnote {
    font-size: 11px;
    color: var(--text-dim);
    margin-top: 3px;
}

/* --- Login page (fara sidebar) --- */
.login-wrap {
    max-width: 360px;
    margin: 10vh auto 0;
    padding: 32px 24px;
}

.login-logo {
    width: 64px;
    height: 64px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #124b2f 0%, #050807 55%, #000 100%);
    box-shadow:
        0 0 0 1px rgba(46,255,160,0.3),
        0 0 18px 4px rgba(46,255,160,0.4),
        0 0 46px 10px rgba(21,184,107,0.3);
    position: relative;
}

.login-logo::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1px solid rgba(46,255,160,0.55);
    box-shadow: inset 0 0 12px rgba(46,255,160,0.45);
}

.login-wordmark {
    font-family: var(--font-mono);
    font-size: 26px;
    margin: 0;
    text-align: center;
}

.login-wordmark .brand-black { color: var(--text); font-weight: 800; }
.login-wordmark .brand-hold { color: var(--accent-bright); font-weight: 400; }

.login-subtitle {
    color: var(--accent);
    font-size: 11.5px;
    margin: 8px 0 0;
    letter-spacing: 0.14em;
    text-align: center;
    text-transform: uppercase;
}

.login-subtitle2 {
    color: var(--text-dim);
    font-size: 11px;
    margin: 2px 0 0;
    letter-spacing: 0.1em;
    text-align: center;
    text-transform: uppercase;
}

/* --- Cookie consent banner --- */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-sidebar);
    border-top: 1px solid var(--border);
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    z-index: 100;
}

.cookie-banner strong { font-size: 14px; }
.cookie-banner p { font-size: 13px; color: var(--text-dim); margin: 4px 0 0; }
.cookie-banner a { color: var(--accent-bright); }

/* --- Simple footer link (login page) --- */
.page-footer {
    text-align: center;
    padding: 20px;
    font-size: 12px;
    color: var(--text-dim);
}
.page-footer a { color: var(--text-dim); }
