/* ============================================
   ADMIN LAYOUT - SMKN 1 Prajekan
   Sistem Absensi Terpadu
   ============================================ */

/* ===== BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #f1f5f9;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ===== SIDEBAR ===== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 250px;
    height: 100vh;
    background-color: #0f172a;
    color: #fff;
    overflow-y: auto;
    z-index: 1040;
    transition: transform 0.25s ease;
}

.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-thumb {
    background-color: rgba(255,255,255,0.15);
    border-radius: 4px;
}

.sidebar .logo-area {
    text-align: center;
    padding: 20px 16px 18px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar .logo-area img {
    width: 52px;
    height: 52px;
    object-fit: contain;
    background: #ffffff;
    border-radius: 50%;
    padding: 4px;
    margin-bottom: 10px;
}

.sidebar .logo-area h6 {
    font-size: 13px;
    font-weight: 700;
    margin: 0;
    letter-spacing: 0.5px;
    color: #ffffff;
}

.sidebar .logo-area small {
    font-size: 10px;
    color: #64748b;
    letter-spacing: 0.5px;
}

/* Sidebar Menu Section Labels */
.sidebar .menu-section {
    color: #64748b;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 18px 20px 6px;
    letter-spacing: 1.2px;
}

/* Sidebar Menu Items */
.sidebar a.menu-link {
    color: #94a3b8;
    text-decoration: none;
    padding: 9px 20px;
    display: flex;
    align-items: center;
    font-size: 13px;
    font-weight: 400;
    border-left: 3px solid transparent;
    transition: all 0.15s ease;
}

.sidebar a.menu-link i {
    width: 20px;
    text-align: center;
    margin-right: 10px;
    font-size: 14px;
}

.sidebar a.menu-link:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: #e2e8f0;
    border-left-color: rgba(255,255,255,0.1);
}

.sidebar a.menu-link.active {
    background-color: rgba(56, 189, 248, 0.1);
    color: #38bdf8;
    border-left-color: #38bdf8;
    font-weight: 500;
}

/* Sidebar Divider */
.sidebar .sidebar-divider {
    border-top: 1px solid rgba(255,255,255,0.06);
    margin: 12px 0 6px;
}

/* Logout Button in Sidebar */
.sidebar .logout-btn {
    background: none;
    border: none;
    color: #94a3b8;
    text-decoration: none;
    padding: 9px 20px;
    display: flex;
    align-items: center;
    font-size: 13px;
    font-weight: 400;
    border-left: 3px solid transparent;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: all 0.15s ease;
}

.sidebar .logout-btn i {
    width: 20px;
    text-align: center;
    margin-right: 10px;
    font-size: 14px;
}

.sidebar .logout-btn:hover {
    background-color: rgba(239, 68, 68, 0.1);
    color: #f87171;
    border-left-color: #ef4444;
}

/* ===== MAIN CONTENT AREA ===== */
.main-wrapper {
    margin-left: 250px;
    min-height: 100vh;
    transition: margin-left 0.25s ease;
}

/* ===== TOP NAVBAR ===== */
.top-navbar {
    background-color: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1030;
}

.top-navbar .page-title {
    font-weight: 700;
    font-size: 16px;
    color: #0f172a;
}

.top-navbar .user-info {
    display: flex;
    align-items: center;
    font-size: 13px;
    color: #475569;
    font-weight: 500;
}

.top-navbar .user-info .badge-role {
    background-color: #e2e8f0;
    color: #475569;
    font-size: 10px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 8px;
}

/* Hamburger Button (mobile only) */
.btn-hamburger {
    display: none;
    background: none;
    border: none;
    font-size: 22px;
    color: #0f172a;
    padding: 4px 8px;
    cursor: pointer;
    margin-right: 12px;
}

/* ===== CONTENT AREA ===== */
.content-area {
    padding: 24px;
}

/* ===== STAT CARDS ===== */
.stat-card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    transition: all 0.15s ease;
}

.stat-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}

.stat-card .stat-icon {
    font-size: 28px;
    margin-bottom: 8px;
}

.stat-card .stat-value {
    font-weight: 700;
    font-size: 24px;
    color: #0f172a;
    margin-bottom: 2px;
}

.stat-card .stat-label {
    font-size: 12px;
    color: #94a3b8;
    font-weight: 500;
}

/* Card flat for generic cards */
.card-flat {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px;
}

/* ===== MOBILE OVERLAY ===== */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1035;
}

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

/* ===== RESPONSIVE ===== */
@media (max-width: 767.98px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .main-wrapper {
        margin-left: 0;
    }

    .btn-hamburger {
        display: block;
    }

    .top-navbar {
        padding: 12px 16px;
    }

    .top-navbar .page-title {
        font-size: 15px;
    }

    .content-area {
        padding: 16px;
    }

    .top-navbar .user-info .user-name-text {
        display: none;
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .sidebar {
        width: 220px;
    }

    .main-wrapper {
        margin-left: 220px;
    }
}
