/* ============================================================
   AKASIA SWIMMING ACADEMY - Custom Theme
   Tema: Air / Kolam Renang
   ============================================================ */

:root {
    --akasia-navy:      #0a2540;
    --akasia-cyan:      #0dcaf0;
    --akasia-white:     #ffffff;
    --akasia-gray:      #6c757d;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: #f7fafc;
    color: #2d3748;
}

/* ---------- Navbar Landing ---------- */
.navbar-akasia {
    background-color: rgba(10, 37, 64, 0.95);
    backdrop-filter: blur(8px);
    transition: all 0.3s ease;
}
.navbar-akasia .navbar-brand {
    font-weight: 700;
    color: var(--akasia-white) !important;
    letter-spacing: 0.5px;
}
.navbar-akasia .nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 500;
}
.navbar-akasia .nav-link:hover {
    color: var(--akasia-cyan) !important;
}

/* ---------- Sidebar Dashboard ---------- */
.sidebar-akasia {
    width: 260px;
    min-height: 100vh;
    background: linear-gradient(180deg, #0a2540 0%, #0d3a63 100%);
    color: #cbd5e0;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1030;
    transition: transform 0.3s ease;
    overflow-y: auto;
}
.sidebar-akasia .brand {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
}
.sidebar-akasia .nav-link {
    color: #cbd5e0;
    padding: 12px 20px;
    border-radius: 8px;
    margin: 4px 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    transition: all 0.2s;
}
.sidebar-akasia .nav-link:hover,
.sidebar-akasia .nav-link.active {
    background: rgba(13, 202, 240, 0.15);
    color: #0dcaf0;
}
.sidebar-akasia .nav-link i {
    font-size: 1.1rem;
    width: 22px;
    text-align: center;
}

/* Tombol tutup sidebar: default disembunyikan (desktop), tampil di mobile. */
.sidebar-close {
    display: none;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, border-color 0.2s;
}
.sidebar-close:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Lapisan gelap di belakang sidebar (mobile). */
.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(10, 37, 64, 0.55);
    backdrop-filter: blur(2px);
    z-index: 1029; /* satu di bawah sidebar (1030) */
    opacity: 0;
    transition: opacity 0.25s ease;
}
.sidebar-backdrop.show {
    display: block;
    opacity: 1;
}

/* Kunci scroll halaman saat sidebar terbuka di mobile. */
body.sidebar-open {
    overflow: hidden;
}

/* ---------- Main Content ---------- */
.main-content {
    margin-left: 260px;
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}
.topbar-akasia {
    background: #fff;
    padding: 14px 24px;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
    position: sticky;
    top: 0;
    z-index: 1020;
}

/* ---------- Card Stat ---------- */
.stat-card {
    border: none;
    border-radius: 14px;
    padding: 20px;
    color: #fff;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s;
}
.stat-card:hover {
    transform: translateY(-4px);
}
.stat-card .icon-box {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}
.stat-card.bg-navy  { background: linear-gradient(135deg, #0a2540, #0d3a63); }
.stat-card.bg-blue  { background: linear-gradient(135deg, #0d6efd, #3b82f6); }
.stat-card.bg-cyan  { background: linear-gradient(135deg, #0dcaf0, #0891b2); }
.stat-card.bg-green { background: linear-gradient(135deg, #10b981, #059669); }
.stat-card.bg-red   { background: linear-gradient(135deg, #ef4444, #b91c1c); }

/* ---------- Kartu Keuangan (Total Pemasukan) ---------- */
/* Kartu bernuansa terang: nominal rupiah perlu kontras tinggi dan
   warna aksen dipakai sebagai penanda makna, bukan latar penuh. */
.finance-card {
    border: none;
    border-radius: 14px;
    background: #fff;
    padding: 16px 18px;
    height: 100%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border-left: 4px solid #cbd5e1;
    transition: transform 0.2s, box-shadow 0.2s;
}
a.finance-card:hover,
.finance-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.09);
}
.finance-card .finance-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #64748b;
    letter-spacing: 0.01em;
    display: flex;
    align-items: center;
    gap: 6px;
}
.finance-card .finance-value {
    font-size: 1.35rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.25;
    margin: 6px 0 2px;
    word-break: break-word;
}
.finance-card .finance-meta {
    font-size: 0.74rem;
    color: #94a3b8;
    margin: 0;
}

/* Bar progres tipis untuk komposisi tagihan. */
.finance-bar {
    display: flex;
    height: 10px;
    border-radius: 999px;
    overflow: hidden;
    background: #e2e8f0;
}
.finance-bar > span {
    display: block;
    height: 100%;
    transition: width 0.4s ease;
}

/* Varian warna aksen. */
.finance-card.accent-navy   { border-left-color: #0a2540; }
.finance-card.accent-green  { border-left-color: #10b981; }
.finance-card.accent-red    { border-left-color: #ef4444; }
.finance-card.accent-amber  { border-left-color: #f59e0b; }
.finance-card.accent-blue   { border-left-color: #0d6efd; }
.finance-card.accent-cyan   { border-left-color: #0891b2; }

.finance-card .finance-icon {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    flex-shrink: 0;
}
.accent-navy  .finance-icon { background: #e2e8f0; color: #0a2540; }
.accent-green .finance-icon { background: #d1fae5; color: #047857; }
.accent-red   .finance-icon { background: #fee2e2; color: #b91c1c; }
.accent-amber .finance-icon { background: #fef3c7; color: #b45309; }
.accent-blue  .finance-icon { background: #dbeafe; color: #1d4ed8; }
.accent-cyan  .finance-icon { background: #cffafe; color: #0e7490; }

/* ---------- Cards General ---------- */
.card-akasia {
    border: none;
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    background: #fff;
}
.card-akasia .card-header {
    background: transparent;
    border-bottom: 1px solid #e2e8f0;
    font-weight: 600;
    padding: 16px 20px;
}

/* ---------- Badge Status ---------- */
.badge-soft-success { background: #d1fae5; color: #065f46; }
.badge-soft-danger  { background: #fee2e2; color: #991b1b; }
.badge-soft-warning { background: #fef3c7; color: #92400e; }
.badge-soft-info    { background: #cffafe; color: #155e75; }

/* ---------- Buttons ---------- */
.btn-akasia {
    background: linear-gradient(135deg, #0d6efd, #0dcaf0);
    border: none;
    color: #fff;
    font-weight: 600;
    padding: 10px 24px;
    border-radius: 10px;
    transition: all 0.2s;
}
.btn-akasia:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(13, 110, 253, 0.3);
    color: #fff;
}

/* ---------- Section Landing ---------- */
.section-title {
    font-weight: 700;
    color: var(--akasia-navy);
    margin-bottom: 12px;
}
.section-subtitle {
    color: var(--akasia-gray);
    margin-bottom: 40px;
}

/* ---------- Mobile ---------- */
.sidebar-toggle { display: none; }
@media (max-width: 991px) {
    .sidebar-akasia {
        transform: translateX(-100%);
        width: 280px;
        max-width: 85vw;
        box-shadow: 4px 0 24px rgba(10, 37, 64, 0.3);
    }
    .sidebar-akasia.show { transform: translateX(0); }
    .main-content { margin-left: 0; }
    .sidebar-toggle { display: inline-flex; }

    /* Tombol X hanya berguna di layar kecil. */
    .sidebar-close { display: inline-flex; }

    /* Beri ruang aman untuk notch / gesture bar. */
    .sidebar-akasia { padding-bottom: env(safe-area-inset-bottom); }

    .hero-akasia h1 { font-size: 2rem; }
}