/* ===========================================================================
   EDUQARIZ EMPIRE — SlowDNS Dashboard Stylesheet
   Red/dark theme • hacker green accents • mobile-first
   =========================================================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg-base: #0a0a0a;
    --bg-surface: #0f0f0f;
    --bg-card: #141414;
    --bg-card-hover: #1a1a1a;
    --bg-input: #111;
    --border: #2a1a1a;
    --border-active: #c0392b;
    --text: #ddd;
    --text-dim: #999;
    --text-muted: #666;
    --red: #c0392b;
    --red-bright: #e74c3c;
    --red-dark: #7b241c;
    --green: #00cc66;
    --green-dim: #00994d;
    --gold: #d4a017;
    --sidebar-width: 250px;
}

html { font-size: 15px; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-base);
    color: var(--text);
    display: flex; min-height: 100vh; line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    position: relative; z-index: 1;
}

h1 { font-size: 1.4rem; font-weight: 700; letter-spacing: 0.02em; text-transform: uppercase; }
h2 { font-size: 1.15rem; font-weight: 600; }
a { color: var(--red-bright); text-decoration: none; }
a:hover { color: var(--red); }
.mono { font-family: 'JetBrains Mono', 'Share Tech Mono', monospace; font-size: 0.82rem; }

/* ── Sidebar ──────────────────────────────────────────────────────────── */
.sidebar-empire {
    width: var(--sidebar-width); min-width: var(--sidebar-width);
    background: var(--bg-surface);
    border-right: 1px solid var(--border);
    display: flex; flex-direction: column;
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 100;
    transition: transform 0.25s ease;
}
.sidebar-brand-empire {
    display: flex; align-items: center; gap: 10px;
    padding: 22px 18px 18px;
    border-bottom: 2px solid var(--red-dark);
    background: linear-gradient(180deg, rgba(192,57,43,0.08) 0%, transparent 100%);
}
.empire-logo { font-size: 1.8rem; filter: grayscale(0.3); }
.empire-name { font-weight: 700; font-size: 1rem; color: var(--red-bright); letter-spacing: 0.06em; line-height: 1.2; }
.empire-sub { font-size: 0.62rem; color: var(--text-muted); letter-spacing: 0.15em; }

.sidebar-nav-empire { flex: 1; padding: 10px 8px; display: flex; flex-direction: column; gap: 1px; }
.nav-item-empire {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 14px; border-radius: 4px;
    color: var(--text-dim); font-weight: 500; font-size: 0.85rem;
    transition: all 0.15s ease; border-left: 3px solid transparent;
}
.nav-item-empire:hover { background: var(--bg-card); color: var(--text); border-left-color: var(--red-dark); }
.nav-item-empire.active { background: rgba(192,57,43,0.1); color: var(--red-bright); border-left-color: var(--red-bright); }
.nav-icon { font-size: 0.8rem; width: 20px; text-align: center; color: var(--red-bright); }

.sidebar-footer-empire {
    padding: 12px 14px; border-top: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
}
.user-info-empire { display: flex; align-items: center; gap: 6px; font-size: 0.78rem; color: var(--text-dim); }
.user-badge { color: var(--gold); font-size: 0.9rem; }
.btn-logout-empire {
    font-size: 0.7rem; padding: 5px 10px; border-radius: 3px;
    background: var(--bg-card); color: var(--text-dim); transition: all 0.15s;
    border: 1px solid transparent;
}
.btn-logout-empire:hover { background: rgba(231,76,60,0.1); color: var(--red-bright); border-color: var(--red-dark); }

/* ── Sidebar overlay (mobile) ─────────────────────────────────────────── */
.sidebar-overlay {
    display: none;
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6); z-index: 95;
}
.sidebar-overlay.visible { display: block; }

/* ── Mobile header ────────────────────────────────────────────────────── */
.mobile-header-empire {
    display: none; position: fixed; top: 0; left: 0; right: 0; height: 50px;
    background: var(--bg-surface); border-bottom: 2px solid var(--red-dark);
    align-items: center; padding: 0 14px; z-index: 90; gap: 10px;
}
.hamburger-empire { background: none; border: none; color: var(--red-bright); font-size: 1.3rem; cursor: pointer; }
.mobile-brand-empire { font-weight: 700; font-size: 0.95rem; color: var(--red-bright); letter-spacing: 0.04em; }

/* ── Main content ─────────────────────────────────────────────────────── */
.main-content-empire {
    margin-left: var(--sidebar-width); flex: 1;
    padding: 28px 30px; max-width: 1200px; width: 100%;
    position: relative; z-index: 1;
}
.main-full { margin-left: 0; }
.mb-1 { margin-bottom: 12px; }
.mb-2 { margin-bottom: 20px; }
.mt-2 { margin-top: 20px; }

/* ── Flash ────────────────────────────────────────────────────────────── */
.flash-container-empire { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.flash-empire {
    padding: 10px 16px; border-radius: 4px; font-size: 0.82rem; font-weight: 500;
    animation: slideDown 0.3s ease; border-left: 3px solid;
}
.flash-success { background: rgba(0,204,102,0.08); color: var(--green); border-color: var(--green); }
.flash-error   { background: rgba(231,76,60,0.08); color: var(--red-bright); border-color: var(--red-bright); }
.flash-info    { background: rgba(212,160,23,0.08); color: var(--gold); border-color: var(--gold); }
@keyframes slideDown { from { opacity:0; transform:translateY(-8px); } to { opacity:1; transform:translateY(0); } }

/* ── Page header ──────────────────────────────────────────────────────── */
.page-header-empire { margin-bottom: 22px; }
.page-header-empire h1 { color: var(--red-bright); margin-bottom: 2px; }
.subtitle-empire { color: var(--text-muted); font-size: 0.8rem; letter-spacing: 0.04em; }

/* ── Cards ────────────────────────────────────────────────────────────── */
.card-empire {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 6px; padding: 18px 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.card-header-empire {
    display: flex; align-items: center; justify-content: space-between;
    padding-bottom: 12px; margin-bottom: 12px;
    border-bottom: 1px solid var(--border);
}
.card-title-empire {
    font-weight: 600; font-size: 0.8rem; color: var(--text-dim);
    text-transform: uppercase; letter-spacing: 0.08em;
}

/* ── Status ───────────────────────────────────────────────────────────── */
.status-active  { color: var(--green); }
.status-dead    { color: var(--red-bright); }
.status-error   { color: #f0a500; }

/* ── Stat bar ─────────────────────────────────────────────────────────── */
.stat-bar-empire {
    display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 20px;
}
.stat-bar-item {
    display: flex; align-items: center; gap: 8px;
    background: var(--bg-card); border: 1px solid var(--border);
    padding: 8px 14px; border-radius: 4px; font-size: 0.8rem;
}
.stat-bar-dot { width: 8px; height: 8px; border-radius: 50%; }
.stat-bar-dot.status-active { background: var(--green); box-shadow: 0 0 6px var(--green); }
.stat-bar-dot.status-dead { background: var(--red-bright); box-shadow: 0 0 6px var(--red-bright); }
.stat-bar-dot.status-error { background: #f0a500; box-shadow: 0 0 6px #f0a500; }
.stat-bar-label { color: var(--text-dim); }
.stat-bar-val { color: var(--green); font-family: 'JetBrains Mono', monospace; font-size: 0.78rem; }

/* ── VPS cards ────────────────────────────────────────────────────────── */
.vps-grid-empire {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 18px; margin-bottom: 22px;
}
.vps-card-empire {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 6px; overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.4);
    transition: border-color 0.2s;
}
.vps-card-empire:hover { border-color: var(--red-dark); }
.vps-card-header-empire {
    padding: 14px 18px; border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
    background: rgba(192,57,43,0.04);
}
.vps-name-empire { font-weight: 700; font-size: 0.9rem; color: var(--red-bright); }
.vps-meta-empire { font-size: 0.72rem; color: var(--text-muted); font-family: 'JetBrains Mono', monospace; }
.vps-status-pulse {
    font-size: 0.65rem; font-weight: 700; letter-spacing: 0.08em;
    padding: 4px 10px; border-radius: 3px;
}
.vps-status-pulse.status-active { background: rgba(0,204,102,0.1); color: var(--green); border: 1px solid rgba(0,204,102,0.3); }
.vps-status-pulse.status-dead { background: rgba(231,76,60,0.1); color: var(--red-bright); border: 1px solid rgba(231,76,60,0.3); }
.vps-status-pulse.status-error { background: rgba(240,165,0,0.1); color: #f0a500; border: 1px solid rgba(240,165,0,0.3); }

.vps-card-body-empire { padding: 14px 18px; display: flex; flex-direction: column; gap: 8px; }
.services-grid-empire { display: flex; flex-direction: column; gap: 6px; }
.svc-row-empire {
    display: flex; align-items: center; gap: 8px; font-size: 0.82rem;
    padding: 6px 10px; background: rgba(255,255,255,0.02); border-radius: 4px;
}
.svc-row-empire > span:first-child { color: var(--text-dim); min-width: 80px; }
.svc-state {
    margin-left: auto; font-size: 0.65rem; font-weight: 700;
    letter-spacing: 0.06em; padding: 2px 8px; border-radius: 3px;
}
.svc-state.status-active { background: rgba(0,204,102,0.12); color: var(--green); }
.svc-state.status-dead { background: rgba(231,76,60,0.12); color: var(--red-bright); }
.svc-state.status-error { background: rgba(240,165,0,0.12); color: #f0a500; }

.vps-stats-grid-empire {
    display: grid; grid-template-columns: 1fr 1fr 1fr;
    gap: 8px; margin-top: 8px; padding-top: 10px;
    border-top: 1px solid var(--border);
}
.stat-cell-empire { display: flex; flex-direction: column; gap: 2px; }
.stat-label-empire { font-size: 0.6rem; color: var(--text-muted); letter-spacing: 0.06em; }
.stat-val-empire { font-size: 1rem; font-weight: 700; font-family: 'JetBrains Mono', monospace; }

.vps-card-footer-empire {
    padding: 10px 18px; border-top: 1px solid var(--border);
    display: flex; align-items: center; gap: 6px;
    background: rgba(0,0,0,0.2);
}

/* ── Quick actions ────────────────────────────────────────────────────── */
.quick-actions-empire {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 6px; padding: 14px 18px;
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 12px;
    font-weight: 600; font-size: 0.85rem; color: var(--red-bright);
}

/* ── Buttons ──────────────────────────────────────────────────────────── */
.btn-empire {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 8px 16px; border-radius: 4px; font-size: 0.8rem;
    font-weight: 600; border: 1px solid transparent; cursor: pointer;
    transition: all 0.15s; font-family: inherit;
    text-transform: uppercase; letter-spacing: 0.04em;
}
.btn-red { background: var(--red); color: #fff; border-color: var(--red-dark); }
.btn-red:hover { background: var(--red-bright); }
.btn-dark { background: var(--bg-card); color: var(--text-dim); border-color: var(--border); }
.btn-dark:hover { background: #222; color: var(--text); border-color: var(--red-dark); }
.btn-gold { background: rgba(212,160,23,0.15); color: var(--gold); border-color: rgba(212,160,23,0.3); }
.btn-gold:hover { background: rgba(212,160,23,0.25); }
.btn-xs { padding: 4px 8px; font-size: 0.65rem; letter-spacing: 0.06em; }
.btn-group-empire { display: flex; gap: 6px; flex-wrap: wrap; }

/* ── Tables ───────────────────────────────────────────────────────────── */
.table-wrapper-empire { overflow-x: auto; }
.table-empire {
    width: 100%; border-collapse: collapse;
    background: var(--bg-card); font-size: 0.82rem;
}
.table-empire thead { background: rgba(0,0,0,0.25); }
.table-empire th {
    padding: 10px 14px; text-align: left; font-weight: 600;
    font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.06em;
    color: var(--text-muted); border-bottom: 1px solid var(--border);
}
.table-empire td { padding: 9px 14px; border-bottom: 1px solid var(--border); }
.table-empire tr:last-child td { border-bottom: none; }
.table-empire tr:hover td { background: var(--bg-card-hover); }

.badge-empire {
    display: inline-block; padding: 3px 9px; border-radius: 3px;
    font-size: 0.65rem; font-weight: 700; letter-spacing: 0.05em;
}
.badge-active { background: rgba(0,204,102,0.12); color: var(--green); }
.badge-locked { background: rgba(231,76,60,0.12); color: var(--red-bright); }
.badge-expired { background: rgba(240,165,0,0.12); color: #f0a500; }

/* ── Forms ────────────────────────────────────────────────────────────── */
.form-group-empire { margin-bottom: 14px; }
.form-group-empire label {
    display: block; font-size: 0.72rem; font-weight: 700;
    color: var(--text-dim); margin-bottom: 5px;
    letter-spacing: 0.06em;
}
.form-control-empire {
    width: 100%; padding: 10px 12px;
    border: 1px solid var(--border); border-radius: 4px;
    background: var(--bg-input); color: var(--text);
    font-size: 0.85rem; font-family: inherit;
    transition: border-color 0.2s;
}
.form-control-empire:focus {
    outline: none; border-color: var(--red-dark);
    box-shadow: 0 0 0 2px rgba(192,57,43,0.15);
}
textarea.form-control-empire { resize: vertical; min-height: 70px; }
.form-hint-empire { font-size: 0.7rem; color: var(--text-muted); margin-top: 3px; }
.form-check-empire {
    display: flex; align-items: center; gap: 8px;
    font-size: 0.82rem; color: var(--text-dim);
}
.form-check-empire input[type="checkbox"] {
    width: 16px; height: 16px; accent-color: var(--red); cursor: pointer;
}
.expiry-input-empire {
    width: 38px; padding: 3px 4px; font-size: 0.65rem;
    background: var(--bg-input); border: 1px solid var(--border);
    border-radius: 3px; color: var(--text); text-align: center;
}

/* ── Config box ───────────────────────────────────────────────────────── */
.config-box-empire {
    background: rgba(0,0,0,0.3); border: 1px solid var(--border);
    border-radius: 4px; padding: 14px 16px;
    font-family: 'JetBrains Mono', monospace; font-size: 0.78rem;
    line-height: 1.9; position: relative; color: var(--green);
}
.copy-btn-empire {
    position: absolute; top: 8px; right: 8px;
    font-size: 0.65rem; padding: 4px 8px;
}

/* ── Empty state ──────────────────────────────────────────────────────── */
.empty-state-empire { text-align: center; padding: 36px 20px; color: var(--text-muted); }
.empty-icon { font-size: 2.5rem; margin-bottom: 10px; }

/* ── Utility ──────────────────────────────────────────────────────────── */
.text-green  { color: var(--green); }
.text-red    { color: var(--red-bright); }
.text-yellow { color: #f0a500; }
.text-muted  { color: var(--text-muted); }

/* ══════════════════════════════════════════════════════════════════════════
   LOGIN PAGE (standalone — does not extend base)
   ══════════════════════════════════════════════════════════════════════ */
.login-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.78); z-index: 0;
}
.login-page-empire {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    min-height: 100vh; position: relative; z-index: 1;
    padding: 20px;
}

/* Typewriter */
.empire-welcome { margin-bottom: 24px; text-align: center; }
.typewriter {
    font-family: 'Share Tech Mono', 'JetBrains Mono', monospace;
    font-size: 2rem; color: var(--red-bright);
    letter-spacing: 0.1em; text-shadow: 0 0 20px rgba(192,57,43,0.4);
    min-height: 2.5rem;
}
.typewriter.done::after {
    content: '▋'; animation: blink 1s step-end infinite;
    color: var(--red-bright);
}
@keyframes blink { 50% { opacity: 0; } }

/* Login card */
.login-card-empire {
    width: 100%; max-width: 410px;
    background: rgba(10,10,10,0.92);
    border: 1px solid var(--border);
    border-radius: 8px; padding: 30px 28px;
    box-shadow: 0 0 40px rgba(192,57,43,0.08);
    backdrop-filter: blur(6px);
}
.login-header { text-align: center; margin-bottom: 22px; }
.empire-skull { font-size: 2.5rem; display: block; margin-bottom: 6px; }
.login-header h2 {
    font-size: 1.3rem; color: var(--red-bright);
    letter-spacing: 0.08em;
}
.login-header p {
    font-size: 0.7rem; color: var(--text-muted);
    letter-spacing: 0.15em; margin-top: 2px;
}

.login-form-empire .form-group { margin-bottom: 14px; }
.login-form-empire label {
    display: block; font-size: 0.7rem; font-weight: 700;
    color: var(--text-dim); margin-bottom: 5px; letter-spacing: 0.08em;
}
.login-form-empire .form-control-empire {
    width: 100%; padding: 11px 14px;
    border: 1px solid var(--border); border-radius: 4px;
    background: var(--bg-input); color: var(--text);
    font-size: 0.88rem; font-family: inherit;
}
.login-form-empire .form-control-empire:focus {
    outline: none; border-color: var(--red-dark);
    box-shadow: 0 0 0 2px rgba(192,57,43,0.15);
}

.btn-empire[type="submit"] {
    width: 100%; justify-content: center; padding: 12px;
    margin-top: 6px; font-size: 0.85rem; background: var(--red);
    color: #fff; border: none; border-radius: 4px;
    cursor: pointer; font-weight: 700; letter-spacing: 0.06em;
    transition: all 0.15s;
}
.btn-empire[type="submit"]:hover { background: var(--red-bright); }

/* Help section */
.login-help {
    margin-top: 20px; padding-top: 16px;
    border-top: 1px solid var(--border);
    text-align: center;
}
.help-label {
    display: block; font-size: 0.68rem; color: var(--text-muted);
    letter-spacing: 0.1em; margin-bottom: 10px;
}
.help-links { display: flex; gap: 10px; justify-content: center; }
.help-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 14px; border-radius: 4px;
    font-size: 0.75rem; font-weight: 600;
    color: var(--text); transition: all 0.15s;
    border: 1px solid var(--border);
}
.help-wa { background: rgba(37,211,102,0.08); border-color: rgba(37,211,102,0.2); }
.help-wa:hover { background: rgba(37,211,102,0.15); color: #25d366; }
.help-tg { background: rgba(0,136,204,0.08); border-color: rgba(0,136,204,0.2); }
.help-tg:hover { background: rgba(0,136,204,0.15); color: #08c; }

.login-footer-empire {
    margin-top: 20px; text-align: center;
    font-size: 0.62rem; color: var(--text-muted);
    letter-spacing: 0.1em;
}

/* ══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .sidebar-empire { transform: translateX(-100%); }
    .sidebar-empire.open { transform: translateX(0); }
    .mobile-header-empire { display: flex; }
    .main-content-empire { margin-left: 0; padding: 60px 14px 20px; }
    .vps-grid-empire { grid-template-columns: 1fr; }
    .vps-stats-grid-empire { grid-template-columns: 1fr 1fr; }
    .btn-group-empire { flex-direction: column; }
    .btn-group-empire .btn-empire { width: 100%; }
    .typewriter { font-size: 1.3rem; }
    .quick-actions-empire { flex-direction: column; align-items: flex-start; }
    #creds-modal .card-empire { max-width: 95vw; }
}
