/* Admin Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

@keyframes adminLoad {
    0% {
        opacity: 0;
        transform: translateY(15px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

body {
    background-color: #f4f6f9;
    animation: adminLoad 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

/* =========================================
   LOGIN PAGE STYLES
   ========================================= */
.login-body {
    background-color: #0066cc; /* Vibrant blue matching the design */
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.login-card {
    display: flex;
    width: 800px;
    max-width: 90%;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    min-height: 400px;
}

.login-left {
    flex: 1;
    background-color: #004085; /* Darker blue */
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
    text-align: center;
}

.login-left img {
    width: 120px;
    margin-bottom: 20px;
}

.login-left h2 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.login-right {
    flex: 1;
    padding: 50px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-right h3 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    font-weight: 600;
    font-size: 1.25rem;
}

.form-group {
    margin-bottom: 20px;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    border-color: #0066cc;
}

.btn-login {
    width: 100%;
    padding: 12px;
    background-color: #004085;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 10px;
}

.btn-login:hover {
    background-color: #003366;
}

.back-link {
    display: block;
    text-align: center;
    margin-top: 20px;
    color: #666;
    text-decoration: none;
    font-size: 0.9rem;
}

.back-link:hover {
    color: #0066cc;
    text-decoration: underline;
}

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

/* Sidebar */
.sidebar {
    width: 250px;
    background-color: #1e1e1e; /* From Figma design */
    color: white;
    display: flex;
    flex-direction: column;
    padding: 20px 0;
}

.sidebar-header {
    text-align: center;
    padding: 0 20px 20px;
    border-bottom: 1px solid #333;
    margin-bottom: 20px;
}

.sidebar-header img {
    width: 60px;
    margin-bottom: 10px;
}

.sidebar-header h3 {
    font-size: 1rem;
    letter-spacing: 1px;
}

.sidebar-menu {
    list-style: none;
    flex: 1;
}

.sidebar-menu li {
    margin-bottom: 5px;
}

.sidebar-menu a {
    display: block;
    padding: 12px 20px;
    color: #ccc;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.sidebar-menu a:hover, .sidebar-menu a.active {
    background-color: #0066cc; /* Blue active state */
    color: white;
}

.logout-btn-container {
    padding: 20px;
}

.btn-logout {
    display: block;
    text-align: center;
    background-color: #dc3545;
    color: white;
    padding: 10px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s;
}

.btn-logout:hover {
    background-color: #c82333;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 30px;
    background-color: #f4f6f9;
}

.welcome-banner {
    background-color: #004085;
    color: white;
    padding: 20px 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.welcome-banner h2 {
    font-weight: 700;
    letter-spacing: 1px;
}

/* Grid Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.stat-card {
    background: white;
    padding: 25px 20px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    text-align: center;
    border-top: 4px solid #004085;
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-icon {
    font-size: 2.5rem;
    color: #0066cc;
    margin-bottom: 15px;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: #333;
    margin-bottom: 5px;
}

.stat-label {
    color: #666;
    font-size: 1rem;
    font-weight: 500;
}

/* Specific borders for different cards */
.card-aspirasi { border-top-color: #f59e0b; }
.card-osis { border-top-color: #3b82f6; }
.card-mpk { border-top-color: #10b981; }
.card-pks { border-top-color: #ef4444; }

.card-aspirasi .stat-icon { color: #f59e0b; }
.card-osis .stat-icon { color: #3b82f6; }
.card-mpk .stat-icon { color: #10b981; }
.card-pks .stat-icon { color: #ef4444; }

/* Responsive */
.mobile-menu-btn {
    display: none;
}

.close-drawer-btn {
    display: none;
}


/* =========================================
   MOBILE DRAWER OVERLAY
   ========================================= */
.drawer-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 998;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.drawer-overlay.show {
    display: block;
}

@media (max-width: 768px) {
    /* Login page */
    .login-body {
        height: 100dvh; /* use dynamic viewport height for mobile */
        padding: 20px;
    }

    .login-card {
        flex-direction: column;
        min-height: auto;
        margin: auto;
        width: 100%;
        max-width: 400px;
        transform: translateY(4vh);
    }

    .login-left {
        padding: 30px 20px;
        flex: none;
    }

    .login-left img {
        width: 80px;
        margin-bottom: 15px;
    }

    .login-left h2 {
        font-size: 1.2rem;
    }

    .login-right {
        padding: 40px 25px;
        flex: none;
    }

    /* Layout: main area takes full width */
    .dashboard-wrapper {
        flex-direction: column;
    }

    /* ---- SIDEBAR sebagai Drawer kiri ---- */
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        width: 270px;
        max-width: 85vw;
        z-index: 999;
        transform: translateX(-100%);
        transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
        padding: 20px 0;
        overflow-y: auto;
        flex-direction: column;
    }

    .sidebar.drawer-open {
        transform: translateX(0);
        box-shadow: 4px 0 30px rgba(0,0,0,0.35);
    }

    /* Header di dalam drawer */
    .sidebar-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 20px 20px;
        border-bottom: 1px solid #333;
        margin-bottom: 20px;
    }

    .logo-title {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .logo-title img {
        width: 40px;
        margin-bottom: 0;
    }

    .logo-title h3 {
        font-size: 1rem;
    }

    /* Tombol Close Drawer di dalam sidebar */
    .close-drawer-btn {
        display: flex;
        background: transparent;
        border: none;
        color: #fff;
        font-size: 1.5rem;
        cursor: pointer;
        padding: 5px;
    }
    .close-drawer-btn:hover {
        color: #ff4444;
    }

    /* Tombol hamburger — muncul di mobile, posisi fixed di kiri atas */
    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        position: fixed;
        top: 14px;
        left: 14px;
        z-index: 997;
        background: #1e1e1e;
        border: none;
        color: white;
        font-size: 1.5rem;
        width: 44px;
        height: 44px;
        border-radius: 10px;
        cursor: pointer;
        box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    }

    /* Konten menu selalu terlihat di dalam drawer */
    .sidebar-menu-wrapper {
        display: flex !important;
        flex-direction: column;
        flex: 1;
    }

    .sidebar-menu {
        flex-direction: column;
        gap: 4px;
        padding: 0 10px;
        margin-bottom: 15px;
    }

    .sidebar-menu li {
        margin-bottom: 0;
    }

    .sidebar-menu a {
        padding: 12px 15px;
        font-size: 0.95rem;
        border-radius: 8px;
    }

    .sidebar-menu a.active {
        background: #0066cc;
    }

    .logout-btn-container {
        padding: 0 10px 10px;
    }

    .btn-logout {
        width: 100%;
        padding: 12px;
    }

    /* Main content: beri padding atas agar tidak tertutup hamburger */
    .main-content {
        padding: 70px 18px 30px;
    }

    /* Pastikan tabel tidak overflow layar */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* =========================================
   TABLE STYLES (ASPIRASI)
   ========================================= */
.table-container {
    background-color: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.table-title {
    margin-bottom: 20px;
    color: #333;
    font-size: 1.2rem;
    font-weight: 700;
}

.table-responsive {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th, .admin-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.admin-table th {
    background-color: #f8f9fa;
    color: #555;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.admin-table tbody tr {
    transition: background-color 0.2s ease;
}

.admin-table tbody tr:hover {
    background-color: #f8fbff;
}

.badge-tujuan {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
}

.badge-osis { background-color: #e0f2fe; color: #0284c7; }
.badge-mpk { background-color: #dcfce7; color: #16a34a; }
.badge-pks { background-color: #fee2e2; color: #dc2626; }

.time-col {
    color: #777;
    font-size: 0.9rem;
}
