/* --- Custom Design System: Laundry App Light Premium Theme --- */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
    --bg-main: #f8fafc; /* Light Slate 50 */
    --bg-card: #ffffff; /* White */
    --bg-card-hover: #ffffff;
    --bg-sidebar: #ffffff; /* Pure White */
    
    --primary: #6366f1; /* Indigo */
    --primary-hover: #4f46e5;
    --primary-light: rgba(99, 102, 241, 0.08);
    
    --success: #10b981; /* Emerald */
    --success-light: rgba(16, 185, 129, 0.1);
    
    --warning: #f59e0b; /* Amber */
    --warning-light: rgba(245, 158, 11, 0.1);
    
    --info: #0ea5e9; /* Sky Blue */
    --info-light: rgba(14, 165, 233, 0.1);
    
    --danger: #ef4444; /* Rose Red */
    --danger-light: rgba(239, 68, 68, 0.15);
    
    --text-main: #1e293b; /* Slate 800 */
    --text-muted: #64748b; /* Slate 500 */
    --text-dark: #0f172a; /* Slate 900 */
    
    --border-color: rgba(0, 0, 0, 0.08); /* Soft dark border for light bg */
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font: 'Plus Jakarta Sans', sans-serif;
    --shadow: 0 4px 18px -4px rgba(0, 0, 0, 0.05), 0 2px 6px -2px rgba(0, 0, 0, 0.03);
    --shadow-hover: 0 12px 30px -10px rgba(0, 0, 0, 0.08), 0 4px 12px -4px rgba(0, 0, 0, 0.03);
}

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

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font);
    min-height: 100vh;
    display: flex;
    overflow-x: hidden;
}

/* Scrollbar Styles */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* --- Sidebar Styling --- */
aside {
    width: 260px;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.01);
}

.brand-section {
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border-color);
}

.brand-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--primary), var(--info));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
}

.brand-name {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--text-dark);
}

.nav-links {
    list-style: none;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.nav-item a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 14px;
    transition: var(--transition);
}

.nav-item a:hover {
    color: var(--text-dark);
    background-color: rgba(0, 0, 0, 0.02);
}

.nav-item.active a {
    color: var(--primary);
    background: var(--primary-light);
    border-left: 3px solid var(--primary);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-weight: 600;
}

.nav-item.active a i {
    color: var(--primary);
}

.sidebar-footer {
    padding: 24px;
    border-top: 1px solid var(--border-color);
    font-size: 11px;
    color: var(--text-muted);
    opacity: 0.8;
    text-align: center;
}

/* --- Main Content Layout --- */
main {
    margin-left: 260px;
    flex-grow: 1;
    min-height: 100vh;
    padding: 40px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* Header & Profile bar */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-title h1 {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.page-title p {
    color: var(--text-muted);
    font-size: 14px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 40px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--info));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #fff;
    font-size: 12px;
}

/* --- Card Styles --- */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow);
}

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

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title i {
    color: var(--primary);
}

/* Override inline white colors for headings/details in light theme */
.card-title[style*="color: #fff"], 
.card-title[style*="color:#fff"],
.detail-value[style*="color: #fff"], 
.detail-value[style*="color:#fff"],
strong[style*="color: #fff"], 
strong[style*="color:#fff"],
a[style*="color: #fff"], 
a[style*="color:#fff"],
h2[style*="color: #fff"], 
h2[style*="color:#fff"],
h3[style*="color: #fff"], 
h3[style*="color:#fff"],
span[style*="color: #fff"], 
span[style*="color:#fff"],
input[style*="color: #fff"], 
input[style*="color:#fff"] {
    color: var(--text-dark) !important;
}

/* Specific link styling in table grids */
table td a[style*="color: #fff"],
table td a[style*="color:#fff"] {
    color: var(--primary) !important;
    font-weight: 600 !important;
}

/* Override translucent white badges */
span.badge[style*="background-color: rgba(255,255,255,0.06)"],
span.badge[style*="background-color:rgba(255,255,255,0.06)"] {
    background-color: #e2e8f0 !important;
    color: var(--text-main) !important;
}

#display-total[style*="color: #fff"], 
#display-total[style*="color:#fff"] {
    color: var(--primary) !important;
}

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

.stat-card {
    padding: 24px;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -1px;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.stat-desc {
    font-size: 12px;
    color: var(--text-muted);
}

/* --- UI Buttons & Actions --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    text-decoration: none;
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background-color: var(--primary);
    color: #fff;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.2);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-secondary {
    background-color: #f1f5f9;
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

.btn-secondary:hover {
    background-color: #e2e8f0;
}

.btn-success {
    background-color: var(--success);
    color: #fff;
}

.btn-success:hover {
    filter: brightness(0.9);
}

.btn-danger {
    background-color: var(--danger);
    color: #fff;
}

.btn-danger:hover {
    filter: brightness(0.9);
}

/* --- Forms & Inputs --- */
.form-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
}

.form-control {
    background-color: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    color: var(--text-main);
    font-family: var(--font);
    font-size: 14px;
    outline: none;
    transition: var(--transition);
    width: 100%;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

/* --- Table Styles --- */
.table-responsive {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

th {
    padding: 16px 20px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color);
}

td {
    padding: 18px 20px;
    font-size: 14px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
}

tr:hover td {
    background-color: rgba(0, 0, 0, 0.01);
}

/* --- Status Badges --- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 40px;
    font-size: 11px;
    font-weight: 600;
}

.badge-diterima {
    background-color: var(--info-light);
    color: var(--info);
}

.badge-dicuci {
    background-color: var(--warning-light);
    color: var(--warning);
}

.badge-dikeringkan {
    background-color: var(--primary-light);
    color: var(--primary);
}

.badge-disetrika {
    background-color: #f3e8ff;
    color: #a855f7;
}

.badge-siap_diambil {
    background-color: #dcfce7;
    color: #15803d;
}

.badge-selesai {
    background-color: var(--success-light);
    color: var(--success);
}

.badge-lunas {
    background-color: var(--success-light);
    color: var(--success);
}

.badge-dp {
    background-color: var(--warning-light);
    color: var(--warning);
}

.badge-belum_bayar {
    background-color: var(--danger-light);
    color: var(--danger);
}

/* --- Notification System --- */
.alert {
    padding: 16px 24px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-success {
    background-color: var(--success-light);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.alert-warning {
    background-color: var(--warning-light);
    border: 1px solid rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

.alert-danger {
    background-color: var(--danger-light);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

/* --- Grid & Layout Utilities --- */
.row {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}

.col-12 {
    width: 100%;
}

.col-8 {
    flex: 2;
    min-width: 320px;
}

.col-4 {
    flex: 1;
    min-width: 280px;
}

.mt-4 { margin-top: 24px; }
.mb-4 { margin-bottom: 24px; }
.text-center { text-align: center; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }
.gap-2 { gap: 8px; }
.d-flex { display: flex; }

/* Custom details card layout */
.detail-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.detail-label {
    color: var(--text-muted);
    font-size: 14px;
}

.detail-value {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-dark);
}

/* Pagination Customizing */
.pagination {
    display: flex;
    justify-content: center;
    list-style: none;
    gap: 6px;
    margin-top: 24px;
}

.pagination li a, .pagination li span {
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
}

.pagination li a:hover {
    background-color: #f1f5f9;
    color: var(--text-dark);
}

.pagination li.active span {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.pagination li.disabled span {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Nota / Invoice Printing CSS */
@media print {
    body {
        background: #fff !important;
        color: #000 !important;
    }
    aside, header, .btn, .no-print {
        display: none !important;
    }
    main {
        margin: 0 !important;
        padding: 0 !important;
    }
    .card {
        border: none !important;
        box-shadow: none !important;
        background: none !important;
        padding: 0 !important;
    }
    .print-only {
        display: block !important;
    }
    table {
        color: #000 !important;
    }
    td, th {
        border-color: #ccc !important;
    }
}
