/* ============================================================
   Sistem Kursus Pramuka Kwarcab Kota Serang
   Custom Theme - Bootstrap 5 Enhancement
   ============================================================ */

/* Google Font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ============================================================
   CSS Variables / Design Tokens
   ============================================================ */
:root {
    --primary: #4E3629;             /* Chocolate Brown */
    --primary-dark: #0d0710;        /* Deep Purple-Black */
    --primary-light: #5c3b2e;       /* Warm Medium Brown */
    --secondary: #a855f7;           /* Electric Purple */
    --secondary-dark: #8b5cf6;
    --secondary-light: #d8b4fe;
    --accent: #e28743;              /* Bronze Gold */
    --accent-light: #f472b6;        /* Neon Pink-Purple */
    --dark: #0d0710;                /* Deep Space Purple */
    --dark-card: #140d21;           /* Dark Card Background */
    --dark-sidebar: #0d0710;
    --text-dark: #ffffff;           /* Light text for dark theme */
    --text-muted: #9ca3af;
    --bg-light: #0d0710;            /* Dark Purple Background */
    --bg-warm: #1a0f2b;             /* Dark Chocolate-Purple Accent */
    --white: #ffffff;
    --shadow: 0 4px 25px rgba(168, 85, 247, 0.15);
    --shadow-lg: 0 10px 45px rgba(168, 85, 247, 0.25);
    --shadow-hover: 0 15px 55px rgba(168, 85, 247, 0.35);
    --radius: 16px;
    --radius-lg: 24px;
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --gradient-primary: linear-gradient(135deg, #4E3629 0%, #3a0066 100%);
    --gradient-secondary: linear-gradient(135deg, #a855f7 0%, #e28743 100%);
    --gradient-hero: linear-gradient(135deg, #0d0710 0%, #1a0f2b 50%, #2e1810 100%);
}

/* ============================================================
   Global Reset & Base
   ============================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-dark);
    background: var(--bg-light);
    line-height: 1.6;
    overflow-x: hidden;
}

a { text-decoration: none; transition: var(--transition); }
img { max-width: 100%; height: auto; }

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar-pramuka {
    background: #2e1d15 !important; /* Premium deep chocolate brown */
    border-bottom: 2px solid rgba(168, 85, 247, 0.2);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    padding: 0.6rem 0;
    transition: var(--transition);
}

.navbar-pramuka.scrolled {
    padding: 0.4rem 0;
    background: #1f120c !important; /* Slightly darker brown when scrolled */
}

.navbar-brand-text {
    font-weight: 700;
    font-size: 1.1rem;
    color: #e28743 !important; /* Bronze Gold is highly readable and matches Pramuka theme! */
    letter-spacing: 0.5px;
}

.navbar-brand-text small {
    font-size: 0.7rem;
    font-weight: 400;
    color: rgba(255,255,255,0.7) !important;
    display: block;
}

.navbar-pramuka .nav-link {
    color: rgba(255, 255, 255, 0.8) !important;
    font-weight: 500;
    font-size: 0.88rem;
    padding: 0.5rem 0.9rem !important;
    border-radius: 8px;
    transition: var(--transition);
    position: relative;
}

.navbar-pramuka .nav-link:hover {
    color: #e28743 !important; /* Bronze Gold hover */
    background: rgba(255, 255, 255, 0.05);
}

.navbar-pramuka .nav-link.active {
    color: #ffffff !important;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.25) 0%, rgba(226, 135, 67, 0.15) 100%) !important;
    border: 1px solid rgba(168, 85, 247, 0.3) !important;
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.2);
}

/* Custom Dropdown Styling to fix visibility */
.navbar-pramuka .dropdown-menu {
    background: #1a0f2b !important; /* Dark purple background */
    border: 1px solid rgba(168, 85, 247, 0.2) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    padding: 0.5rem;
}

.navbar-pramuka .dropdown-item {
    color: rgba(255, 255, 255, 0.8) !important;
    border-radius: 6px;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition);
}

.navbar-pramuka .dropdown-item:hover {
    background: rgba(168, 85, 247, 0.15) !important;
    color: #ffffff !important;
}

.navbar-pramuka .btn-login {
    background: transparent;
    border: 2px solid #e28743;
    color: #e28743 !important;
    font-weight: 600;
    padding: 0.4rem 1.2rem !important;
    border-radius: 50px;
    transition: var(--transition);
}

.navbar-pramuka .btn-login:hover {
    background: #e28743;
    color: #2e1d15 !important;
    box-shadow: 0 0 15px rgba(226, 135, 67, 0.4);
}

.navbar-pramuka .btn-daftar {
    background: linear-gradient(135deg, #a855f7 0%, #e28743 100%);
    border: none;
    color: #ffffff !important;
    font-weight: 700;
    padding: 0.4rem 1.2rem !important;
    border-radius: 50px;
    transition: var(--transition);
}

.navbar-pramuka .btn-daftar:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(168, 85, 247, 0.4);
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero-section {
    background: var(--gradient-hero);
    min-height: 92vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -50px;
    left: 0;
    right: 0;
    height: 100px;
    background: var(--bg-light);
    clip-path: ellipse(70% 100% at 50% 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-badge {
    display: inline-block;
    background: rgba(249, 168, 37, 0.15);
    color: var(--secondary);
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(249, 168, 37, 0.3);
    animation: fadeInDown 0.8s ease;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    color: white;
    line-height: 1.2;
    margin-bottom: 1.2rem;
    animation: fadeInUp 0.8s ease;
}

.hero-title span {
    color: var(--secondary);
    position: relative;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: rgba(255,255,255,0.8);
    margin-bottom: 2rem;
    max-width: 550px;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-buttons {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease 0.4s both;
}

.btn-hero {
    padding: 0.75rem 1.8rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
    border: none;
}

.btn-hero-primary {
    background: var(--gradient-secondary);
    color: var(--primary-dark);
}

.btn-hero-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(249, 168, 37, 0.4);
    color: var(--primary-dark);
}

.btn-hero-outline {
    background: transparent;
    border: 2px solid rgba(255,255,255,0.4);
    color: white;
}

.btn-hero-outline:hover {
    background: rgba(255,255,255,0.1);
    border-color: white;
    color: white;
    transform: translateY(-3px);
}

.hero-image-container {
    position: relative;
    animation: fadeInRight 1s ease 0.3s both;
}

.hero-float {
    animation: float 6s ease-in-out infinite;
}

/* ============================================================
   SECTION STYLES
   ============================================================ */
.section-padding {
    padding: 5rem 0;
}

.section-title {
    font-size: 2rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    color: #c4b5a5;
    font-size: 1rem;
    margin-bottom: 3rem;
}

.section-divider {
    width: 60px;
    height: 4px;
    background: var(--gradient-secondary);
    border-radius: 2px;
    margin-bottom: 1rem;
}

/* ============================================================
   STAT CARDS
   ============================================================ */
.stat-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    box-shadow: 0 8px 32px rgba(168, 85, 247, 0.15);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(168, 85, 247, 0.1);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-secondary);
    transform: scaleX(0);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.stat-card:hover::before {
    transform: scaleX(1);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
    color: white;
}

.stat-icon.bg-kmd { background: linear-gradient(135deg, #4CAF50, #2E7D32); }
.stat-icon.bg-kml { background: linear-gradient(135deg, #2196F3, #1565C0); }
.stat-icon.bg-kpd { background: linear-gradient(135deg, #FF9800, #E65100); }
.stat-icon.bg-total { background: linear-gradient(135deg, #9C27B0, #6A1B9A); }

.stat-number {
    font-size: 2.2rem;
    font-weight: 800;
    color: #2e1d15;
    line-height: 1;
    margin-bottom: 0.3rem;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
}

/* ============================================================
   COURSE/KURSUS CARDS
   ============================================================ */
.kursus-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(168, 85, 247, 0.15);
    transition: var(--transition);
    height: 100%;
    border: 1px solid rgba(168, 85, 247, 0.1);
}

.kursus-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.kursus-card-header {
    padding: 1.5rem;
    color: white;
    position: relative;
}

.kursus-card-header.kmd { background: linear-gradient(135deg, #4CAF50, #2E7D32); }
.kursus-card-header.kml { background: linear-gradient(135deg, #2196F3, #1565C0); }
.kursus-card-header.kpd { background: linear-gradient(135deg, #FF9800, #E65100); }
.kursus-card-header.narakarya, 
.kursus-card-header.narakarya-dasar,
.kursus-card-header.narakarya-lanjutan { background: linear-gradient(135deg, #FF9800, #F57C00); }

.kursus-card-body {
    padding: 1.5rem;
}

.kursus-card-body .info-item {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin-bottom: 0.8rem;
    font-size: 0.9rem;
    color: #5a4a3a;
}

.kursus-card-body .info-item i {
    width: 18px;
    color: #a855f7;
}

/* ============================================================
   NEWS CARDS
   ============================================================ */
.berita-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(168, 85, 247, 0.15);
    transition: var(--transition);
    height: 100%;
    border: 1px solid rgba(168, 85, 247, 0.1);
}

.berita-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.berita-card-img {
    height: 200px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
    overflow: hidden;
}

.berita-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.berita-card-body {
    padding: 1.5rem;
}

.berita-card-body h5 {
    font-weight: 700;
    color: #2e1d15;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.berita-card-body p {
    color: #5a4a3a;
    font-size: 0.9rem;
    line-height: 1.6;
}

.berita-date {
    font-size: 0.8rem;
    color: #a855f7;
    margin-bottom: 0.5rem;
}

/* ============================================================
   GALLERY
   ============================================================ */
.galeri-item {
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
    cursor: pointer;
    height: 220px;
}

.galeri-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.galeri-item:hover img {
    transform: scale(1.1);
}

.galeri-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: white;
    padding: 1.5rem 1rem 1rem;
    opacity: 0;
    transition: var(--transition);
}

.galeri-item:hover .galeri-overlay {
    opacity: 1;
}

/* ============================================================
   SCHEDULE TABLE
   ============================================================ */
.table-schedule {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.table-schedule thead {
    background: var(--gradient-primary);
}

.table-schedule thead th {
    color: white !important;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 1rem;
    border: none;
}

.table-schedule tbody td {
    padding: 0.9rem 1rem;
    vertical-align: middle;
    font-size: 0.9rem;
    border-color: rgba(0,0,0,0.05);
}

.table-schedule tbody tr:hover {
    background: rgba(249, 168, 37, 0.05);
}

/* ============================================================
   BADGES
   ============================================================ */
.badge-kmd { background: linear-gradient(135deg, #4CAF50, #2E7D32); }
.badge-kml { background: linear-gradient(135deg, #2196F3, #1565C0); }
.badge-kpd { background: linear-gradient(135deg, #FF9800, #E65100); }
.badge-menunggu { background: #ffc107; color: #333; }
.badge-disetujui { background: #28a745; }
.badge-ditolak { background: #dc3545; }
.badge-lulus { background: #28a745; }
.badge-tidak-lulus { background: #dc3545; }
.badge-revisi { background: #fd7e14; }
.badge-aktif { background: #28a745; }
.badge-selesai { background: #6c757d; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
    background: var(--primary-dark);
    color: rgba(255,255,255,0.8);
    padding: 4rem 0 0;
}

.footer h5 {
    color: var(--secondary);
    font-weight: 700;
    margin-bottom: 1.2rem;
    font-size: 1.1rem;
}

.footer a {
    color: rgba(255,255,255,0.7);
    transition: var(--transition);
    font-size: 0.9rem;
}

.footer a:hover {
    color: var(--secondary);
    padding-left: 5px;
}

.footer-bottom {
    background: rgba(0,0,0,0.2);
    padding: 1.2rem 0;
    margin-top: 3rem;
    font-size: 0.85rem;
}

.footer-social a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white !important;
    margin-right: 0.5rem;
    transition: var(--transition);
    font-size: 1rem;
}

.footer-social a:hover {
    background: var(--secondary);
    color: var(--primary-dark) !important;
    transform: translateY(-3px);
    padding-left: 0;
}

/* ============================================================
   AUTH PAGES (LOGIN / REGISTER)
   ============================================================ */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: var(--gradient-hero);
    position: relative;
}

.auth-page::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.auth-card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    max-width: 460px;
    width: 100%;
    margin: 2rem auto;
    position: relative;
    z-index: 2;
    animation: fadeInUp 0.6s ease;
}

.auth-card-header {
    background: var(--gradient-primary);
    padding: 2rem;
    text-align: center;
    color: white;
}

.auth-card-header h3 {
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.auth-card-header p {
    font-size: 0.9rem;
    opacity: 0.8;
    margin: 0;
}

.auth-card-body {
    padding: 2rem;
}

.auth-card .form-control {
    border-radius: 10px;
    padding: 0.75rem 1rem;
    border: 2px solid #e9ecef;
    font-size: 0.9rem;
    transition: var(--transition);
}

.auth-card .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(93, 64, 55, 0.1);
}

.auth-card .form-label {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-dark);
}

.btn-auth {
    background: var(--gradient-primary);
    border: none;
    color: white;
    font-weight: 700;
    padding: 0.75rem;
    border-radius: 10px;
    width: 100%;
    font-size: 1rem;
    transition: var(--transition);
}

.btn-auth:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(93, 64, 55, 0.3);
    color: white;
}

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

/* Sidebar */
.sidebar {
    width: 280px;
    background: var(--dark-sidebar);
    color: white;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1000;
    transition: var(--transition);
    overflow-y: auto;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sidebar-header .logo-icon {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    background: var(--gradient-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--primary-dark);
    font-weight: 800;
    flex-shrink: 0;
}

.sidebar-header .logo-text {
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1.3;
}

.sidebar-header .logo-text small {
    font-size: 0.7rem;
    font-weight: 400;
    color: rgba(255,255,255,0.5);
    display: block;
}

.sidebar-menu {
    padding: 1rem 0;
}

.sidebar-menu .menu-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: rgba(255,255,255,0.35);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.8rem 1.5rem 0.4rem;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.7rem 1.5rem;
    color: rgba(255,255,255,0.6);
    font-size: 0.88rem;
    font-weight: 500;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.sidebar-menu a:hover {
    background: rgba(255,255,255,0.05);
    color: white;
}

.sidebar-menu a.active {
    background: rgba(249, 168, 37, 0.1);
    color: var(--secondary);
    border-left-color: var(--secondary);
}

.sidebar-menu a i {
    width: 20px;
    text-align: center;
    font-size: 0.95rem;
}

.sidebar-user {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-top: auto;
}

.sidebar-user .avatar {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--gradient-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--primary-dark);
    font-size: 0.9rem;
    flex-shrink: 0;
}

.sidebar-user .user-info {
    font-size: 0.85rem;
    font-weight: 600;
}

.sidebar-user .user-info small {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.4);
    display: block;
    font-weight: 400;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 280px;
    min-height: 100vh;
    background: var(--bg-light);
}

.top-bar {
    background: white;
    padding: 1rem 2rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.top-bar h4 {
    font-weight: 700;
    font-size: 1.1rem;
    margin: 0;
    color: var(--primary-dark);
}

.content-area {
    padding: 2rem;
}

.btn-sidebar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.3rem;
    color: var(--primary-dark);
    cursor: pointer;
}

/* ============================================================
   DASHBOARD CARDS
   ============================================================ */
.dash-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: 0 8px 32px rgba(168, 85, 247, 0.12);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(168, 85, 247, 0.08);
}

.dash-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.dash-card .dash-icon {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: white;
    flex-shrink: 0;
}

.dash-card .dash-info h3 {
    font-size: 1.8rem;
    font-weight: 800;
    color: #2e1d15;
    margin: 0;
    line-height: 1;
}

.dash-card .dash-info p {
    color: #5a4a3a;
    font-size: 0.85rem;
    margin: 0.2rem 0 0;
}

.bg-gradient-1 { background: linear-gradient(135deg, #4CAF50, #2E7D32); }
.bg-gradient-2 { background: linear-gradient(135deg, #2196F3, #1565C0); }
.bg-gradient-3 { background: linear-gradient(135deg, #FF9800, #E65100); }
.bg-gradient-4 { background: linear-gradient(135deg, #9C27B0, #6A1B9A); }
.bg-gradient-5 { background: linear-gradient(135deg, #F44336, #C62828); }
.bg-gradient-6 { background: linear-gradient(135deg, #00BCD4, #00838F); }

/* ============================================================
   FORMS
   ============================================================ */
.form-section {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
}

.form-section h5 {
    font-weight: 700;
    color: #2e1d15;
    margin-bottom: 1.5rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid #e9ecef;
}

.form-control, .form-select {
    border-radius: 10px;
    padding: 0.65rem 1rem;
    border: 2px solid #e9ecef;
    font-size: 0.9rem;
    transition: var(--transition);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(93, 64, 55, 0.1);
}

.form-label {
    font-weight: 600;
    font-size: 0.85rem;
    color: #374151;
    margin-bottom: 0.4rem;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-primary-custom {
    background: var(--gradient-primary);
    border: none;
    color: white;
    font-weight: 600;
    padding: 0.6rem 1.5rem;
    border-radius: 10px;
    transition: var(--transition);
}

.btn-primary-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(93, 64, 55, 0.3);
    color: white;
}

.btn-secondary-custom {
    background: var(--gradient-secondary);
    border: none;
    color: var(--primary-dark);
    font-weight: 700;
    padding: 0.6rem 1.5rem;
    border-radius: 10px;
    transition: var(--transition);
}

.btn-secondary-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(249, 168, 37, 0.3);
    color: var(--primary-dark);
}

/* ============================================================
   PROGRESS BARS
   ============================================================ */
.progress-custom {
    height: 8px;
    border-radius: 4px;
    background: #e9ecef;
    overflow: hidden;
}

.progress-custom .progress-bar {
    border-radius: 4px;
    transition: width 1s ease;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    margin-bottom: 0.3rem;
}

.progress-label span:first-child {
    font-weight: 600;
    color: var(--text-dark);
}

.progress-label span:last-child {
    color: var(--text-muted);
}

/* ============================================================
   TABLES (Dashboard)
   ============================================================ */
.table-custom {
    border-radius: var(--radius);
    overflow: hidden;
}

.table-custom thead th {
    background: var(--primary-dark);
    color: white;
    font-weight: 600;
    font-size: 0.83rem;
    padding: 0.8rem;
    border: none;
}

.table-custom tbody td {
    padding: 0.75rem 0.8rem;
    vertical-align: middle;
    font-size: 0.88rem;
    border-color: rgba(0,0,0,0.05);
}

.table-custom tbody tr:hover {
    background: rgba(249, 168, 37, 0.03);
}

/* ============================================================
   CHART CONTAINER
   ============================================================ */
.chart-container {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid rgba(0,0,0,0.04);
}

.chart-container h5 {
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 1rem;
}

/* ============================================================
   STATUS BADGES
   ============================================================ */
.status-badge {
    padding: 0.35rem 0.9rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
}

/* ============================================================
   PROFILE CARD
   ============================================================ */
.profile-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.profile-header {
    background: var(--gradient-primary);
    padding: 2rem;
    text-align: center;
    color: white;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--gradient-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-dark);
    margin: 0 auto 1rem;
    border: 4px solid rgba(255,255,255,0.3);
}

/* ============================================================
   CERTIFICATE
   ============================================================ */
.sertifikat-preview {
    background: white;
    border: 3px solid var(--primary);
    border-radius: var(--radius);
    padding: 3rem;
    text-align: center;
    position: relative;
}

.sertifikat-preview::before {
    content: '';
    position: absolute;
    inset: 8px;
    border: 2px solid var(--secondary);
    border-radius: 8px;
    pointer-events: none;
}

/* ============================================================
   PUBLIC PAGE CONTENT
   ============================================================ */
.page-header {
    background: var(--gradient-primary);
    padding: 7rem 0 4rem;   /* top: 7rem = ~80px navbar + 3rem breathing room */
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-top: 0;
}

.page-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 50px;
    background: var(--bg-light);
    clip-path: ellipse(55% 100% at 50% 100%);
}

.page-header h1 {
    font-weight: 800;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.page-header p {
    opacity: 0.8;
    font-size: 1rem;
}

.content-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
    color: #2e1d15 !important; /* Base dark brown-gray text for white containers */
}

/* Ensuring text inside content cards, auth cards, form sections and other white containers is fully visible */
.content-card h1, .content-card h2, .content-card h3, .content-card h4, .content-card h5, .content-card h6,
.auth-card h1, .auth-card h2, .auth-card h3, .auth-card h4, .auth-card h5, .auth-card h6,
.dash-card h1, .dash-card h2, .dash-card h3, .dash-card h4, .dash-card h5, .dash-card h6,
.form-section h1, .form-section h2, .form-section h3, .form-section h4, .form-section h5, .form-section h6,
.chart-container h1, .chart-container h2, .chart-container h3, .chart-container h4, .chart-container h5, .chart-container h6,
.profile-card h1, .profile-card h2, .profile-card h3, .profile-card h4, .profile-card h5, .profile-card h6,
.top-bar h1, .top-bar h2, .top-bar h3, .top-bar h4, .top-bar h5, .top-bar h6 {
    color: #2e1d15 !important;
}

.content-card p, .content-card span, .content-card li,
.auth-card p, .auth-card span, .auth-card li,
.dash-card p, .dash-card span, .dash-card li,
.form-section p, .form-section span, .form-section li,
.chart-container p, .chart-container span, .chart-container li,
.profile-card p, .profile-card span, .profile-card li {
    color: #4a3e35 !important;
}

/* Override for dark-colored elements inside white cards that should stay dark */
.content-card .text-muted,
.auth-card .text-muted,
.dash-card .text-muted,
.form-section .text-muted {
    color: #6b7280 !important;
}

.content-card .text-success { color: #16a34a !important; }
.content-card .text-danger { color: #dc2626 !important; }
.content-card .text-warning { color: #d97706 !important; }
.content-card .text-primary { color: #a855f7 !important; }

/* Form Controls & Dropdown Inputs Text Visibility */
.form-control, .form-select {
    color: #1f2937 !important;
    background-color: #ffffff !important;
    border: 2px solid #e9ecef !important;
}

.form-control::placeholder {
    color: #9ca3af !important;
}

.input-group-text {
    background-color: #f3f4f6 !important;
    color: #4b5563 !important;
    border: 2px solid #e9ecef !important;
    border-right: none !important;
}

/* Form Labels context-aware visibility */
.form-label {
    color: #ffffff !important; /* By default white text on dark background */
}

.content-card .form-label,
.auth-card .form-label,
.form-section .form-label,
.profile-card .form-label {
    color: #374151 !important; /* Dark text on white card containers */
}

/* Bootstrap utility overrides for white card contexts */
.content-card .bg-light {
    background-color: #f8f5f0 !important; /* Light warm cream, not dark purple */
    color: #2e1d15 !important;
}

.content-card .text-dark,
.content-card .fw-bold,
.content-card h4.fw-bold,
.content-card h4.text-dark {
    color: #2e1d15 !important;
}

/* Top-bar (dashboard header) explicit dark text */
.top-bar {
    background: white !important;
    color: #2e1d15;
}

.top-bar h4 {
    color: #2e1d15 !important;
}

/* Table text in white containers */
.table-custom tbody td {
    color: #2e1d15;
}

/* List group items text fix for white card containers */
.content-card .list-group-item span,
.content-card .list-group-item {
    color: #4a3e35 !important;
}

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.empty-state h5 {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* ============================================================
   FILE UPLOAD
   ============================================================ */
.upload-zone {
    border: 2px dashed #dee2e6;
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: var(--bg-light);
}

.upload-zone:hover {
    border-color: var(--primary);
    background: rgba(93, 64, 55, 0.03);
}

.upload-zone i {
    font-size: 2rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.upload-zone p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 991px) {
    .hero-title { font-size: 2.2rem; }
    .hero-section { min-height: auto; padding: 5rem 0 6rem; }
    .section-padding { padding: 3rem 0; }
    
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .btn-sidebar-toggle {
        display: block;
    }
    
    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.5);
        z-index: 999;
    }
    
    .sidebar-overlay.active {
        display: block;
    }
}

@media (max-width: 767px) {
    .hero-title { font-size: 1.8rem; }
    .hero-subtitle { font-size: 1rem; }
    .section-title { font-size: 1.5rem; }
    .hero-buttons { flex-direction: column; }
    .btn-hero { justify-content: center; }
    .stat-card { margin-bottom: 1rem; }
    .content-area { padding: 1rem; }
    .top-bar { padding: 0.8rem 1rem; }
    .auth-card { margin: 1rem; }
}

@media (max-width: 575px) {
    .hero-title { font-size: 1.5rem; }
    .navbar-brand-text { font-size: 0.9rem; }
    .page-header h1 { font-size: 1.5rem; }
    .dash-card .dash-info h3 { font-size: 1.4rem; }
}

/* ============================================================
   PRINT STYLES
   ============================================================ */
@media print {
    .sidebar, .top-bar, .no-print { display: none !important; }
    .main-content { margin-left: 0 !important; }
    .content-area { padding: 0 !important; }
    body { background: white; }
}
