/* =====================================================================
   style.css — Gaya custom Sistem Monitor Facebook Ads (v2)
   ===================================================================== */

:root {
    --sidebar-from: #1e293b;
    --sidebar-to: #0f172a;
    --sidebar-width: 260px;
    --content-bg: #f1f5f9;
    --brand: #3b82f6;
}

body {
    background: var(--content-bg);
    -webkit-font-smoothing: antialiased;
}

/* ---- Halaman log masuk / setup ---- */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: radial-gradient(1200px 600px at 50% -10%, #e0e7ff 0%, var(--content-bg) 55%);
}
.auth-card {
    width: 100%;
    max-width: 420px;
    border: none;
    border-radius: 1rem;
}

/* ---- Susun atur utama ---- */
.layout {
    min-height: 100vh;
}
.main-content {
    min-height: 100vh;
    background: var(--content-bg);
    width: 100%;
}

/* ---- Sidebar ---- */
.sidebar {
    background: linear-gradient(180deg, var(--sidebar-from) 0%, var(--sidebar-to) 100%);
    width: var(--sidebar-width);
}
/* Di desktop, Bootstrap menetapkan offcanvas-md jadi 'transparent !important'.
   Kita atasi semula supaya sidebar kekal gelap & teks kelihatan. */
@media (min-width: 768px) {
    .sidebar.offcanvas-md {
        background: linear-gradient(180deg, var(--sidebar-from) 0%, var(--sidebar-to) 100%) !important;
        min-height: 100vh;
        flex-shrink: 0;
        box-shadow: 2px 0 12px rgba(2, 6, 23, 0.15);
    }
    .sidebar.offcanvas-md .offcanvas-body {
        background: transparent !important;
    }
}

.sidebar-brand {
    color: #fff;
    letter-spacing: 0.3px;
}
.sidebar-brand i {
    color: var(--brand);
}
.sidebar .offcanvas-title {
    color: #fff;
}
.sidebar .nav-link {
    color: #cbd5e1;
    border-radius: 0.6rem;
    padding: 0.65rem 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease;
}
.sidebar .nav-link i {
    width: 1.2rem;
    text-align: center;
}
.sidebar .nav-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}
.sidebar .nav-link.active {
    background: linear-gradient(90deg, #3b82f6 0%, #2563eb 100%) !important;
    color: #fff !important;
    box-shadow: 0 6px 14px rgba(37, 99, 235, 0.35);
}

/* ---- Bar atas ---- */
.topbar {
    position: sticky;
    top: 0;
    z-index: 1020;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

/* ---- Kad ---- */
.card {
    border-radius: 0.85rem;
}
.stat-card {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.1) !important;
}
.stat-card .stat-icon {
    width: 46px;
    height: 46px;
    border-radius: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin-bottom: 0.6rem;
}

/* ---- Jadual ---- */
.table > :not(caption) > * > * {
    padding: 0.8rem 0.9rem;
}
.table > thead th {
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.4px;
    color: #64748b;
}
code {
    font-size: 0.8rem;
}

/* ---- Butang ---- */
.btn {
    border-radius: 0.6rem;
}

/* ---- Kaki ---- */
.footer {
    background: #fff;
}
