/* ===================================================================
   MultiAPIPanel — Dashboard theme
   =================================================================== */
:root {
    --map-bg: #0f172a;
    --map-sidebar: #111827;
    --map-sidebar-hover: #1f2937;
    --map-accent: #6366f1;
    --map-accent-2: #8b5cf6;
    --map-text-muted: #94a3b8;
    --map-card: #ffffff;
    --map-body: #f1f5f9;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
    background: var(--map-body);
    color: #1e293b;
}

/* ---------- Auth screens ---------- */
.auth-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f172a 0%, #312e81 60%, #6366f1 100%);
    padding: 24px;
}
.auth-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
    padding: 36px 32px;
}
.auth-brand {
    text-align: center;
    margin-bottom: 24px;
}
.auth-brand .logo {
    display: inline-flex;
    width: 56px; height: 56px;
    align-items: center; justify-content: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--map-accent), var(--map-accent-2));
    color: #fff; font-size: 26px; margin-bottom: 12px;
}
.auth-brand h1 { font-size: 22px; margin: 0; font-weight: 700; }
.auth-brand p { color: var(--map-text-muted); margin: 4px 0 0; font-size: 14px; }

/* ---------- App shell ---------- */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
    width: 250px;
    background: var(--map-sidebar);
    color: #cbd5e1;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; bottom: 0; left: 0;
    z-index: 1030;
    transition: transform .25s ease;
}
.sidebar .brand {
    padding: 20px 22px;
    font-size: 18px; font-weight: 700; color: #fff;
    display: flex; align-items: center; gap: 10px;
    border-bottom: 1px solid rgba(255,255,255,.06);
}
.sidebar .brand .logo {
    width: 34px; height: 34px; border-radius: 9px;
    background: linear-gradient(135deg, var(--map-accent), var(--map-accent-2));
    display: inline-flex; align-items: center; justify-content: center; color:#fff;
}
.sidebar .nav-section {
    padding: 14px 22px 6px;
    font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
    color: #64748b;
}
.sidebar a.nav-link {
    color: #cbd5e1;
    padding: 10px 22px;
    display: flex; align-items: center; gap: 12px;
    font-size: 14.5px; border-left: 3px solid transparent;
}
.sidebar a.nav-link:hover { background: var(--map-sidebar-hover); color: #fff; }
.sidebar a.nav-link.active {
    background: var(--map-sidebar-hover); color: #fff;
    border-left-color: var(--map-accent);
}
.sidebar a.nav-link i { font-size: 17px; width: 20px; text-align: center; }

.main { flex: 1; margin-left: 250px; min-width: 0; }

.topbar {
    height: 62px;
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 22px;
    position: sticky; top: 0; z-index: 1020;
}
.topbar .page-title { font-size: 18px; font-weight: 600; margin: 0; }
.topbar .user-chip {
    display: flex; align-items: center; gap: 10px;
    font-size: 14px;
}
.topbar .user-chip .avatar {
    width: 36px; height: 36px; border-radius: 50%;
    background: linear-gradient(135deg, var(--map-accent), var(--map-accent-2));
    color: #fff; display: inline-flex; align-items: center; justify-content: center;
    font-weight: 600;
}
.badge-role {
    font-size: 11px; padding: 2px 8px; border-radius: 999px;
    background: #eef2ff; color: #4338ca; text-transform: capitalize;
}

.content { padding: 24px; }

/* ---------- Stat cards ---------- */
.stat-card {
    background: #fff; border-radius: 14px; padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
    display: flex; align-items: center; gap: 16px;
    height: 100%;
}
.stat-card .icon {
    width: 52px; height: 52px; border-radius: 12px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 22px; color: #fff; flex-shrink: 0;
}
.stat-card .label { color: var(--map-text-muted); font-size: 13px; margin: 0; }
.stat-card .value { font-size: 26px; font-weight: 700; margin: 0; line-height: 1.2; }

.bg-indigo { background: linear-gradient(135deg,#6366f1,#8b5cf6); }
.bg-emerald{ background: linear-gradient(135deg,#10b981,#059669); }
.bg-amber  { background: linear-gradient(135deg,#f59e0b,#d97706); }
.bg-sky    { background: linear-gradient(135deg,#0ea5e9,#0284c7); }
.bg-rose   { background: linear-gradient(135deg,#f43f5e,#e11d48); }

.card-soft {
    background:#fff; border:none; border-radius:14px;
    box-shadow:0 1px 3px rgba(0,0,0,.06);
}

/* ---------- Sidebar toggle (mobile) ---------- */
.sidebar-backdrop {
    display:none; position:fixed; inset:0; background:rgba(0,0,0,.45); z-index:1029;
}
@media (max-width: 991px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main { margin-left: 0; }
    .sidebar-backdrop.show { display:block; }
}
