/* =========================================================
   style.css
   Tema utama: Hijau (#006633), Putih, Abu muda
   Konsep: Minimalis, Clean, Modern, Glassmorphism ringan
   ========================================================= */

:root {
    --primary: #006633;
    --primary-dark: #004d26;
    --primary-light: #e6f2ec;
    --grey-light: #f4f6f5;
    --radius: 15px;
    --shadow-soft: 0 8px 24px rgba(0, 51, 26, 0.08);
    --transition: all 0.25s ease;
}

* { box-sizing: border-box; }

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--grey-light);
    color: #1c2b24;
}

a { text-decoration: none; }

/* Fade animation */
.fade-in { animation: fadeIn 0.6s ease both; }
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ===================== NAVBAR (public) ===================== */
.navbar-brand-custom {
    font-weight: 700;
    color: var(--primary) !important;
}
.navbar-public {
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-soft);
}
.navbar-public .nav-link {
    font-weight: 500;
    color: #1c2b24 !important;
}
.navbar-public .nav-link:hover { color: var(--primary) !important; }

/* ===================== HERO ===================== */
.hero-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    padding: 100px 0 140px;
    position: relative;
    overflow: hidden;
}
.hero-section h1 { font-weight: 700; font-size: 2.6rem; }
.hero-section p.lead { color: rgba(255,255,255,0.85); }
.btn-hero {
    border-radius: 50px;
    padding: 12px 28px;
    font-weight: 600;
    transition: var(--transition);
}
.btn-hero-light { background: #fff; color: var(--primary); border: none; }
.btn-hero-light:hover { background: var(--primary-light); color: var(--primary-dark); transform: translateY(-2px); }
.btn-hero-outline { border: 2px solid #fff; color: #fff; background: transparent; }
.btn-hero-outline:hover { background: #fff; color: var(--primary); transform: translateY(-2px); }

/* ===================== GLASS CARD ===================== */
.glass-card {
    background: rgba(255,255,255,0.7);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
}
.glass-card:hover { transform: translateY(-6px); box-shadow: 0 16px 32px rgba(0,51,26,0.12); }

.feature-icon {
    width: 60px; height: 60px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

/* Kelas Card */
.kelas-card {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
    background: #fff;
    height: 100%;
}
.kelas-card:hover { transform: translateY(-6px); box-shadow: 0 16px 32px rgba(0,51,26,0.12); }
.kelas-card img { height: 160px; object-fit: cover; width: 100%; }
.kelas-card .badge-kategori {
    background: var(--primary-light); color: var(--primary); font-weight: 600;
}

/* ===================== FOOTER ===================== */
.footer-modern { background: var(--primary-dark); color: #fff; }
.footer-links a { color: rgba(255,255,255,0.7); line-height: 2; }
.footer-links a:hover { color: #fff; }

/* ===================== AUTH PAGES ===================== */
.auth-wrapper {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 2rem;
}
.auth-card {
    background: rgba(255,255,255,0.95);
    border-radius: var(--radius);
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
    max-width: 420px; width: 100%;
    padding: 2.5rem;
}
.auth-card .form-control { border-radius: 10px; padding: 10px 14px; }
.auth-card .form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 0.2rem rgba(0,102,51,0.15); }
.btn-primary-custom {
    background: var(--primary); border: none; border-radius: 10px;
    padding: 10px; font-weight: 600; transition: var(--transition);
}
.btn-primary-custom:hover { background: var(--primary-dark); }

/* ===================== DASHBOARD LAYOUT ===================== */
.dash-wrapper { display: flex; min-height: 100vh; }

.sidebar {
    width: 250px;
    background: var(--primary-dark);
    color: #fff;
    position: sticky; top: 0; height: 100vh;
    display: flex; flex-direction: column;
    transition: var(--transition);
    z-index: 1030;
    flex-shrink: 0;
}
.sidebar-brand {
    padding: 1.4rem 1.2rem; font-weight: 700; font-size: 1.1rem;
    display: flex; align-items: center; gap: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.sidebar-nav { display: flex; flex-direction: column; padding: 1rem 0; overflow-y: auto; }
.sidebar-nav a {
    color: rgba(255,255,255,0.75); padding: 12px 1.4rem;
    display: flex; align-items: center; gap: 12px; font-size: 0.92rem;
    transition: var(--transition); border-left: 3px solid transparent;
}
.sidebar-nav a:hover, .sidebar-nav a.active {
    background: rgba(255,255,255,0.08); color: #fff; border-left-color: #fff;
}

.dash-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar {
    background: #fff; padding: 0.9rem 1.5rem;
    display: flex; align-items: center; justify-content: space-between;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04); position: sticky; top: 0; z-index: 1020;
}
.btn-toggle { background: none; border: none; font-size: 1.2rem; color: var(--primary-dark); }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.btn-icon { background: none; border: none; font-size: 1.1rem; color: var(--primary-dark); }
.btn-profile { background: none; border: none; display: flex; align-items: center; gap: 8px; font-weight: 500; }
.avatar-sm { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }

.dash-content { padding: 1.6rem; }

/* Stat cards */
.stat-card {
    border-radius: var(--radius); padding: 1.4rem; color: #fff;
    box-shadow: var(--shadow-soft); position: relative; overflow: hidden;
}
.stat-card i { font-size: 2.2rem; opacity: 0.35; position: absolute; right: 1rem; top: 1rem; }
.stat-card h3 { font-weight: 700; margin-bottom: 0; }
.stat-card.bg-green { background: linear-gradient(135deg,#006633,#00994d); }
.stat-card.bg-blue { background: linear-gradient(135deg,#0d6efd,#5da8ff); }
.stat-card.bg-orange { background: linear-gradient(135deg,#fd7e14,#ffb066); }
.stat-card.bg-purple { background: linear-gradient(135deg,#6f42c1,#a17fe0); }
.stat-card.bg-teal { background: linear-gradient(135deg,#20c997,#63e6be); }

.card-modern { border: none; border-radius: var(--radius); box-shadow: var(--shadow-soft); }

/* Sidebar collapsed (mobile) */
@media (max-width: 992px) {
    .sidebar { position: fixed; left: -260px; height: 100%; }
    .sidebar.show { left: 0; }
}

/* ===================== DARK MODE ===================== */
[data-bs-theme="dark"] body, body.dark-mode {
    background-color: #10201a; color: #e8f0ec;
}
body.dark-mode .topbar, body.dark-mode .card-modern, body.dark-mode .auth-card { background: #17281f; color: #e8f0ec; }
body.dark-mode .dash-content { background: #10201a; }

/* Loading Spinner */
.spinner-overlay {
    position: fixed; inset: 0; background: rgba(255,255,255,0.8);
    display: flex; align-items: center; justify-content: center; z-index: 2000;
}

/* Upload progress */
.upload-progress { height: 8px; border-radius: 10px; }

/* Utility */
.text-primary-custom { color: var(--primary) !important; }
.bg-primary-custom { background: var(--primary) !important; }
.rounded-15 { border-radius: var(--radius) !important; }
