/* ================= RESET ================= */
* {
    box-sizing: border-box;
    transition: background 0.2s ease,
                box-shadow 0.2s ease,
                transform 0.2s ease,
                border 0.2s ease;
}

/* ================= BODY ================= */
body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, sans-serif;
    background: radial-gradient(circle at top, #0f1115 0%, #0b0d12 60%, #080a0f 100%);
    color: #e5e7eb;
    overflow: hidden;
}

a { text-decoration: none; color: inherit; }

/* ================= INPUTS ================= */
input, select {
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 10px;
    border-radius: 8px;
    border: 1px solid rgba(56,189,248,0.25);
    background: rgba(15,17,21,0.8);
    color: #e5e7eb;
    outline: none;
    backdrop-filter: blur(8px);
}

input::placeholder { color: #9ca3af; }

input:focus, select:focus {
    border-color: rgba(56,189,248,0.6);
    box-shadow: 0 0 0 1px rgba(56,189,248,0.5);
}

/* ================= LAYOUT ================= */
.app { display: flex; height: 100vh; }

.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* ================= SIDEBAR ================= */
.sidebar {
    width: 250px;
    padding: 22px;
    background: linear-gradient(180deg, #0e1015, #0b0d12);
    border-right: 1px solid rgba(255,255,255,0.06);
}

.logo {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 26px;
    text-align: center;
    color: #ffffff;
}

/* ================= NAV ================= */
.nav a {
    display: block;
    padding: 11px 14px;
    margin-bottom: 6px;
    border-radius: 8px;
    color: #cbd5f5;
}

.nav a.active,
.nav a:hover {
    background: rgba(56,189,248,0.15);
    box-shadow: inset 0 0 0 1px rgba(56,189,248,0.35);
}

/* ================= MAIN ================= */
.main {
    flex: 1;
    padding: 28px;
    overflow-y: auto;
}

/* ================= GLASS BOX (KEYAUTH STYLE) ================= */
.box {
    margin-bottom: 18px;
    padding: 18px;
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(22,24,30,0.9), rgba(16,18,24,0.85));
    border: 1px solid rgba(255,255,255,0.06);
    box-shadow: 0 8px 20px rgba(0,0,0,0.55);
}

/* Compact */
.box.compact { padding: 14px 16px; }
.box.compact h3 { font-size: 14px; margin-bottom: 8px; }

/* ================= HEADINGS ================= */
h2 {
    margin-top: 0;
    font-size: 22px;
    color: #f9fafb;
}

h3 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 14px;
    color: #e5e7eb;
}

/* ================= LABEL / CREDENTIAL ================= */
.label {
    font-size: 11px;
    color: #9ca3af;
    margin-top: 8px;
}

.cred {
    margin-top: 4px;
    padding: 9px 11px;
    border-radius: 6px;
    font-family: monospace;
    background: rgba(15,17,21,0.9);
    border: 1px solid rgba(255,255,255,0.08);
    color: #e5e7eb;
}

/* ================= BUTTONS (KEYAUTH BLUE GLOW) ================= */
.btn {
    padding: 7px 14px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.12);
    font-weight: 700;
    cursor: pointer;
    margin: 2px;
    background: rgba(56,189,248,0.95);
    color: #020617;
    box-shadow:
        0 0 0 1px rgba(56,189,248,0.55),
        0 0 12px rgba(56,189,248,0.45);
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow:
        0 0 0 1px rgba(56,189,248,0.8),
        0 0 22px rgba(56,189,248,0.7);
}

/* Button color variants */
.blue   { background: rgba(56,189,248,0.95); }
.green  { background: #22c55e; color: #020617; box-shadow: 0 0 10px rgba(34,197,94,0.5); }
.orange { background: #f59e0b; color: #020617; box-shadow: 0 0 10px rgba(245,158,11,0.5); }
.gray   { background: #64748b; color: #020617; box-shadow: 0 0 8px rgba(148,163,184,0.4); }
.red    { background: #ef4444; color: #020617; box-shadow: 0 0 10px rgba(239,68,68,0.55); }

/* ================= TABLE ================= */
table { width: 100%; border-collapse: collapse; }

th, td {
    padding: 8px;
    font-size: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

th { color: #cbd5f5; }

table tr:hover {
    background: rgba(56,189,248,0.06);
}

/* ================= STATUS ================= */
.status {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: bold;
}

.status.active {
    background: rgba(34,197,94,0.15);
    color: #4ade80;
}

.status.paused {
    background: rgba(239,68,68,0.15);
    color: #f87171;
}

/* ================= LOGIN ================= */
.login-wrap {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-box {
    width: 360px;
    padding: 28px;
    border-radius: 10px;
    background: linear-gradient(180deg, #16181e, #101218);
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 0 40px rgba(0,0,0,0.7);
    text-align: center;
}

.error {
    background: rgba(239,68,68,0.2);
    color: #fecaca;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 10px;
}

/* ================= MISC ================= */
.muted { color: #9ca3af; font-size: 12px; }

/* ================= TOAST ================= */
#toast {
    position: fixed;
    bottom: 26px;
    right: 26px;
    background: rgba(56,189,248,0.95);
    color: #020617;
    padding: 9px 15px;
    border-radius: 8px;
    box-shadow: 0 0 18px rgba(56,189,248,0.7);
    opacity: 0;
}

#toast.show { opacity: 1; }
