/* ============================================
   Smart Laundry - Custom CSS (Bootstrap 5)
   Responsive untuk Desktop & Android
   ============================================ */

/* ===================== SIDEBAR ===================== */
.sidebar {
    width: 260px;
    background: #ffffff;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 1040;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #e9ecef;
    box-shadow: 2px 0 8px rgba(0,0,0,0.06);
}

.sidebar-header {
    padding: 22px 20px;
    background: #ffffff;
    border-bottom: 1px solid #e9ecef;
    flex-shrink: 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #1e2a38;
    text-decoration: none;
}

.logo-icon {
    font-size: 26px;
    color: #4da3ff;
}

.logo-text h2 {
    font-size: 17px;
    font-weight: 700;
    margin: 0;
    color: #1e2a38;
}

.logo-text p {
    font-size: 11px;
    margin: 2px 0 0;
    color: #8a9bb0;
}

/* Sidebar Menu */
.sidebar-menu {
    padding: 16px 0;
    flex: 1;
}

.menu-section-label {
    padding: 6px 20px 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #b0bec5;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #4a5568;
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    font-size: 14px;
}

.menu-item:hover {
    background: #f0f4f8;
    color: #1e2a38;
    border-left-color: #4da3ff;
}

.menu-item.active {
    background: #eff6ff;
    color: #2563eb;
    border-left-color: #2563eb;
    font-weight: 600;
}

.menu-item i {
    font-size: 17px;
    width: 22px;
    text-align: center;
    flex-shrink: 0;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 16px;
    background: #f8fafc;
    border-top: 1px solid #e9ecef;
    flex-shrink: 0;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: #f0f4f8;
    border-radius: 10px;
    margin-bottom: 12px;
    color: #1e2a38;
}

.user-avatar {
    width: 38px;
    height: 38px;
    background: #4da3ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
    color: white;
}

.user-name {
    font-size: 13px;
    font-weight: 600;
    color: #1e2a38;
}

.user-role {
    font-size: 11px;
    color: #8a9bb0;
}

/* ===================== OVERLAY MOBILE ===================== */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 1039;
}

.sidebar-overlay.show {
    display: block;
}

/* ===================== MOBILE TOPBAR ===================== */
.mobile-topbar {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: #ffffff;
    border-bottom: 1px solid #e9ecef;
    z-index: 1030;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.07);
}

.mobile-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 700;
    color: #1e2a38;
}

.hamburger-btn {
    width: 40px;
    height: 40px;
    background: #f0f4f8;
    border: none;
    border-radius: 10px;
    font-size: 22px;
    color: #1e2a38;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

.hamburger-btn:hover {
    background: #e2e8f0;
}

/* ===================== MAIN CONTENT ===================== */
.main-content {
    margin-left: 260px;
    padding: 28px 30px;
    min-height: 100vh;
    background: #f0f4f8;
}

/* ===================== PAGE HEADER ===================== */
.page-header {
    margin-bottom: 24px;
}

.page-header h1 {
    font-size: 26px;
    color: #1e2a38;
    margin-bottom: 4px;
}

/* ===================== CARD ===================== */
.card {
    border-radius: 12px !important;
    border: none !important;
}

.card-header {
    border-radius: 12px 12px 0 0 !important;
    border-bottom: 1px solid #e9ecef !important;
}

/* ===================== TABLE ===================== */
.table th {
    font-size: 13px;
    font-weight: 600;
    color: #495057;
    padding: 12px 16px;
}

.table td {
    font-size: 14px;
    padding: 12px 16px;
    color: #2c3e50;
}

/* ===================== FORM ===================== */
.form-control,
.form-select {
    border-radius: 8px;
    font-size: 14px;
    border: 1.5px solid #dee2e6;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus,
.form-select:focus {
    border-color: #4da3ff;
    box-shadow: 0 0 0 3px rgba(77, 163, 255, 0.15);
}

/* ===================== BUTTONS ===================== */
.btn {
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    padding: 9px 20px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 13px;
}

/* ===================== MODAL ===================== */
.modal-content {
    border-radius: 14px;
    border: none;
}

/* ===================== ALERT ===================== */
.alert {
    border-radius: 10px;
}

/* ===================== LOGIN PAGE ===================== */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f4f8;
    padding: 20px;
}

.login-box {
    background: white;
    border-radius: 16px;
    padding: 40px;
    max-width: 440px;
    width: 100%;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05),
                0 20px 60px rgba(0,0,0,0.08);
}

.login-header {
    text-align: center;
    margin-bottom: 28px;
}

.login-header h1 {
    font-size: 26px;
    color: #1e2a38;
    font-weight: 700;
    margin-bottom: 6px;
}

.login-header p {
    color: #6c757d;
    font-size: 14px;
}

/* ===================== RESPONSIVE TABLET (max 991px) ===================== */
@media (max-width: 991.98px) {

    .mobile-topbar {
        display: flex;
    }

    .sidebar {
        transform: translateX(-260px);
        z-index: 1045;
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        padding: 76px 16px 20px;
    }

    .page-header h1 {
        font-size: 20px;
    }

    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .card-body {
        padding: 14px !important;
    }

    .card-header {
        padding: 12px 14px !important;
    }
}

/* ===================== RESPONSIVE MOBILE KECIL (max 575px) ===================== */
@media (max-width: 575.98px) {

    .main-content {
        padding: 68px 12px 16px;
    }

    .page-header {
        margin-bottom: 16px;
    }

    .page-header h1 {
        font-size: 18px;
    }

    .btn {
        font-size: 13px;
        padding: 8px 14px;
    }

    .btn-sm {
        font-size: 12px;
        padding: 5px 10px;
    }

    /* Cegah zoom otomatis saat tap input di Android */
    .form-control,
    .form-select {
        font-size: 16px;
    }

    .table th {
        font-size: 12px;
        padding: 10px 10px;
    }

    .table td {
        font-size: 13px;
        padding: 10px 10px;
    }

    .login-box {
        padding: 28px 20px;
    }

    .row.g-2 .col-auto {
        width: 100%;
    }

    .row.g-2 .col-auto .form-control,
    .row.g-2 .col-auto .btn {
        width: 100%;
    }

    .page-link {
        padding: 5px 9px;
        font-size: 12px;
    }
}

/* Cegah body scroll saat sidebar terbuka di mobile */
body.sidebar-open {
    overflow: hidden;
}
