:root { --primary: #1abc9c; --primary-dark: #16a085; --bg: #f8f9fa; --text: #333; --radius: 12px; }
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: system-ui, -apple-system, sans-serif; background: var(--bg); color: var(--text); }
.login-wrapper { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px; }
.login-card { background: white; width: 100%; max-width: 850px; border-radius: var(--radius); box-shadow: 0 10px 30px rgba(0,0,0,0.1); display: flex; overflow: hidden; }
.login-brand { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: white; padding: 40px; width: 40%; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; }
.login-form { padding: 40px; width: 60%; }
.sidebar { position: fixed; left: 0; top: 0; width: 240px; height: 100vh; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: white; padding: 20px 0; z-index: 100; }
.sidebar-brand { text-align: center; padding: 20px; border-bottom: 1px solid rgba(255,255,255,0.2); margin-bottom: 10px; }
/* Tambahkan di dalam style.css */
.sidebar-brand img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin-bottom: 10px;
}

.login-brand img {
    width: 100px;
    height: 100px;
    object-fit: contain;
    margin-bottom: 20px;
    background: white; /* Opsional: jika logo transparan dan ingin kontras */
    border-radius: 50%; /* Opsional: membuat logo bulat */
    padding: 5px;
}
.sidebar-menu a { display: flex; align-items: center; padding: 12px 20px; color: white; text-decoration: none; margin: 5px 10px; border-radius: 8px; transition: 0.2s; }
.sidebar-menu a:hover, .sidebar-menu a.active { background: rgba(255,255,255,0.2); }
.sidebar-menu a i { margin-right: 10px; width: 20px; text-align: center; }
.main-content { margin-left: 240px; padding: 30px; min-height: 100vh; }
.top-bar { display: flex; justify-content: space-between; align-items: center; background: white; padding: 15px 20px; border-radius: var(--radius); box-shadow: 0 2px 10px rgba(0,0,0,0.05); margin-bottom: 25px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-bottom: 30px; }
.stat-box { background: white; padding: 20px; border-radius: var(--radius); box-shadow: 0 2px 10px rgba(0,0,0,0.05); text-align: center; transition: transform 0.2s; }
.stat-box:hover { transform: translateY(-5px); }
.stat-box h3 { color: var(--primary); font-size: 1.8rem; margin: 10px 0; }
.card { background: white; border-radius: var(--radius); box-shadow: 0 2px 10px rgba(0,0,0,0.05); margin-bottom: 25px; border: none; }
.card-header { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: white; padding: 15px 20px; font-weight: 600; border-radius: var(--radius) var(--radius) 0 0 !important; }
.card-body { padding: 20px; }
.form-control, .form-select { border-radius: 8px; border: 1px solid #ddd; padding: 10px; }
.form-control:focus, .form-select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26,188,156,0.2); }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); border: none; border-radius: 8px; padding: 10px 20px; color: white; font-weight: 600; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(26,188,156,0.3); }
.admin-only { display: none; }
.admin-only:not(.hidden) { display: block !important; }
th.admin-only:not(.hidden), td.admin-only:not(.hidden) { display: table-cell !important; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px; text-align: left; border-bottom: 1px solid #eee; }
th { background: #f8f9fa; }
.badge { padding: 5px 10px; border-radius: 20px; font-size: 0.8rem; }
.badge-success { background: #2ecc71; color: white; }
.badge-warning { background: #f39c12; color: white; }
.badge-danger { background: #e74c3c; color: white; }
.nav-tabs { border: none; margin-bottom: 20px; }
.nav-tabs .nav-link { border: none; color: #666; font-weight: 500; }
.nav-tabs .nav-link.active { color: var(--primary); border-bottom: 3px solid var(--primary); background: transparent; }
.copyright { text-align: center; padding: 20px; color: #888; font-size: 0.9rem; margin-top: 40px; }
@media (max-width: 768px) {
    .login-card { flex-direction: column; }
    .login-brand, .login-form { width: 100%; }
    .sidebar { transform: translateX(-100%); transition: transform 0.3s; }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; }
}
/* Tambahkan di bagian bawah style.css */

/* ===== RESPONSIVE MOBILE ===== */
@media (max-width: 768px) {
    /* Sidebar */
    .sidebar {
        transform: translateX(-100%); /* Tersembunyi default di HP */
        box-shadow: none;
    }

    .sidebar.open {
        transform: translateX(0);
        box-shadow: 4px 0 20px rgba(0,0,0,0.4);
    }

    /* Main Content menyesuaikan */
    .main-content {
        margin-left: 0 !important;
        padding-top: 70px; /* Beri ruang agar tidak tertutup tombol */
    }
    
    /* Top Bar */
    .top-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 15px;
    }
    
    .top-bar h4 {
        font-size: 1.2rem;
    }
    
    /* Stats Grid */
    .stat-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .stat-box {
        padding: 15px;
    }
    
    .stat-box h3 {
        font-size: 1.5rem;
    }
    
    /* Cards */
    .card-body {
        padding: 15px;
    }
    
    /* Tables */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    table {
        min-width: 600px;
    }
    
    /* Forms */
    .row > div {
        margin-bottom: 10px;
    }
    
    /* Buttons */
    .btn {
        font-size: 0.9rem;
        padding: 8px 15px;
    }
    
    /* Login Page */
    .login-card {
        flex-direction: column;
        margin: 10px;
    }
    
    .login-brand {
        width: 100%;
        padding: 30px 20px;
        min-height: 150px;
    }
    
    .login-brand h1 {
        font-size: 1.8rem;
    }
    
    .login-form {
        width: 100%;
        padding: 30px 20px;
    }
    
    .nav-tabs .nav-link {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    /* Social Buttons */
    .social-links {
        flex-direction: column;
        width: 100%;
        padding: 0 20px;
    }
    
    .social-btn {
        width: 100%;
        justify-content: center;
    }
    
    /* Sidebar Brand */
    .sidebar-brand h3 {
        font-size: 1.2rem;
    }
    
    /* Menu Toggle Button */
    .menu-toggle {
    display: none;
}

@media (max-width: 768px) {
    /* Tombol Menu */
    .menu-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        position: fixed !important;
        top: 15px !important;
        left: 15px !important;
        z-index: 9999 !important; /* Pastikan paling atas */
        background: #1abc9c;
        color: white;
        border: none;
        padding: 12px 14px;
        border-radius: 8px;
        cursor: pointer;
        font-size: 1.2rem;
        box-shadow: 0 4px 12px rgba(0,0,0,0.3);
        pointer-events: auto !important;
        transition: all 0.3s;
    }

    .menu-toggle:active {
        transform: scale(0.95);
    }
}

/* Tablet */
@media (min-width: 769px) and (max-width: 1024px) {
    .stat-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .sidebar {
        transform: translateX(0) !important;
    }
    .menu-toggle {
        display: none !important;
    }
    .main-content {
        margin-left: 240px;
        padding-top: 30px;
    }
}

/* Desktop Kecil */
@media (min-width: 1025px) and (max-width: 1200px) {
    .stat-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Perbaikan untuk semua layar */
* {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    overflow-x: hidden;
}

/* Pastikan gambar responsif */
img {
    max-width: 100%;
    height: auto;
}

/* Perbaiki input form di mobile */
input, select, textarea {
    font-size: 16px; /* Mencegah zoom otomatis di iOS */
}

/* Table scroll yang lebih baik */
.table-responsive {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    -ms-overflow-style: -ms-autohiding-scrollbar;
}

/* Card adjustments */
.card {
    margin-bottom: 15px;
}

/* Typography responsive */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.3;
    word-wrap: break-word;
}

/* Navigation menu mobile */
.sidebar-menu {
    padding: 20px 10px;
}

.sidebar-menu a {
    padding: 12px 15px;
    margin: 5px 0;
}
/* Tambahkan di bagian bawah style.css */

.social-links {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.social-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.social-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.2);
}

.social-btn i {
    font-size: 1.2rem;
}

.social-btn.whatsapp {
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: white;
}

.social-btn.whatsapp:hover {
    background: linear-gradient(135deg, #128C7E, #075E54);
    color: white;
}

.social-btn.youtube {
    background: linear-gradient(135deg, #FF0000, #CC0000);
    color: white;
}

.social-btn.youtube:hover {
    background: linear-gradient(135deg, #CC0000, #990000);
    color: white;
}

/* Responsive untuk mobile */
@media (max-width: 768px) {
    .social-links {
        flex-direction: column;
        align-items: center;
    }
    
    .social-btn {
        width: 80%;
        justify-content: center;
    }
}

/* === PERBAIKAN TOMBOL MENU MOBILE === */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex !important;
        position: fixed !important;
        top: 15px !important;
        left: 15px !important;
        z-index: 99999 !important; /* Pastikan paling atas */
        background: #1abc9c;
        color: white;
        border: none;
        padding: 12px 15px;
        border-radius: 8px;
        cursor: pointer;
        pointer-events: auto !important; /* Wajib bisa diklik */
        box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    }

    /* Sidebar tersembunyi di HP */
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    /* Sidebar muncul saat class .open aktif */
    .sidebar.open {
        transform: translateX(0);
    }
}