/* ===================================================
   SILaundry - Modern Professional UI
   =================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Modern Premium Palette (Teal & Slate) */
    --primary:        #0f766e; /* Deep Teal */
    --primary-dark:   #115e59;
    --primary-light:  #2dd4bf;
    --secondary:      #6366f1; /* Indigo Accent */
    --success:        #10b981;
    --warning:        #f59e0b;
    --danger:         #ef4444;
    
    /* Layout Colors */
    --dark:           #0f172a;
    --sidebar-bg:     rgba(15, 23, 42, 0.95); /* Frosted Slate */
    --sidebar-text:   #94a3b8;
    --sidebar-hover:  rgba(255,255,255,0.06);
    --sidebar-active: rgba(45, 212, 191, 0.15); /* Teal Tint */
    --sidebar-width:  270px;
    
    --body-bg:        #f8fafc; /* Softer, creamy gray */
    --card-bg:        rgba(255, 255, 255, 0.98);
    
    /* Typography Colors */
    --text-primary:   #1e293b;
    --text-secondary: #64748b;
    
    /* Borders & UI Elements */
    --border:         #e2e8f0;
    
    /* Premium Layered Shadows */
    --shadow-sm:      0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow:         0 4px 6px -1px rgba(15, 23, 42, 0.06), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
    --shadow-lg:      0 12px 24px -4px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.04);
    --shadow-glow:    0 0 15px rgba(45, 212, 191, 0.3);
    
    /* Refined Radius */
    --radius:         14px;
    --radius-lg:      20px;
    --radius-pill:    999px;
    
    --transition:     all .25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html, body {
    height: 100%;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 14.5px;
    background: var(--body-bg);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===================================================
   SIDEBAR
   =================================================== */
.sidebar {
    position: fixed;
    top: 0; left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--sidebar-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    overflow-y: auto;
    overflow-x: hidden;
    transition: var(--transition);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 4px; }

/* Brand */
.sidebar-brand {
    padding: 24px 20px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,.05);
    margin-bottom: 8px;
}
.sidebar-brand .brand-icon {
    width: 42px; height: 42px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(79,70,229,.4);
}
.sidebar-brand .brand-text h6 {
    font-size: 16px; font-weight: 700;
    color: #fff; margin: 0; letter-spacing: -.3px;
}
.sidebar-brand .brand-text small {
    color: var(--sidebar-text); font-size: 11px;
}

/* Nav Section */
.sidebar-section-title {
    padding: 12px 20px 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.2px;
    color: rgba(199,210,254,.45);
    text-transform: uppercase;
}

/* Nav Link */
.sidebar-nav { padding: 0 12px; flex: 1; }
.sidebar-nav .nav-item { margin: 2px 0; }

.sidebar-nav .nav-link {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 14px;
    border-radius: var(--radius);
    color: var(--sidebar-text);
    font-size: 13.5px; font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.sidebar-nav .nav-link:hover {
    background: var(--sidebar-hover);
    color: #fff;
    transform: translateX(4px);
}
.sidebar-nav .nav-link.active {
    background: var(--sidebar-active);
    color: var(--primary-light);
    font-weight: 600;
}
.sidebar-nav .nav-link.active::before {
    content: '';
    position: absolute;
    left: 0; top: 10%;
    height: 80%; width: 4px;
    background: var(--primary-light);
    border-radius: 0 4px 4px 0;
}
.sidebar-nav .nav-link i {
    font-size: 17px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}
.sidebar-nav .nav-link .badge {
    margin-left: auto;
    font-size: 10px;
    background: rgba(255,255,255,.1);
    padding: 2px 7px;
    border-radius: var(--radius-pill);
    font-weight: 600;
}

/* Dropdown in sidebar */
.sidebar-nav .collapse-link::after {
    content: '\f282';
    font-family: 'bootstrap-icons';
    margin-left: auto;
    transition: var(--transition);
    font-size: 12px;
}
.sidebar-nav .collapse-link[aria-expanded="true"]::after { transform: rotate(180deg); }
.sidebar-nav .sub-menu { padding-left: 12px; }
.sidebar-nav .sub-menu .nav-link {
    font-size: 13px;
    padding: 8px 14px;
    color: rgba(199,210,254,.75);
}
.sidebar-nav .sub-menu .nav-link:hover { color: #fff; }
.sidebar-nav .sub-menu .nav-link::before {
    content: '';
    width: 6px; height: 6px;
    border-radius: 50%;
    background: currentColor;
    opacity: .5;
    flex-shrink: 0;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 16px 12px 20px;
    border-top: 1px solid rgba(255,255,255,.08);
    margin-top: auto;
}
.user-card {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px;
    background: rgba(255,255,255,.07);
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
}
.user-card:hover { background: rgba(255,255,255,.12); }
.user-avatar {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 700; color: #fff;
    flex-shrink: 0;
}
.user-info h6 { font-size: 13px; font-weight: 600; color: #fff; margin: 0; }
.user-info small { font-size: 11px; color: var(--sidebar-text); }
.user-card .logout-icon { margin-left: auto; color: rgba(199,210,254,.5); font-size: 15px; }
.user-card:hover .logout-icon { color: var(--danger); }

/* ===================================================
   MAIN CONTENT
   =================================================== */
.main-wrapper {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Topbar */
.topbar {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
    padding: 0 28px;
    height: 64px;
    display: flex;
    align-items: center;
    gap: 16px;
    position: sticky;
    top: 0; z-index: 900;
}
.topbar-title {
    font-size: 17px; font-weight: 700;
    color: var(--text-primary);
    flex: 1;
}
.topbar-meta {
    font-size: 12.5px;
    color: var(--text-secondary);
    display: flex; align-items: center; gap: 6px;
    font-weight: 500;
}
.topbar-meta i { font-size: 14px; color: var(--primary); }

/* Main body */
.content-body {
    padding: 28px;
    flex: 1;
}

/* ===================================================
   CARDS
   =================================================== */
.card {
    background: var(--card-bg);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}
.card:hover { box-shadow: var(--shadow); }

.card-header {
    background: transparent;
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    padding: 20px 24px;
    display: flex; align-items: center; gap: 10px;
}
.card-header h5, .card-header h6 {
    font-size: 16px; font-weight: 700;
    color: var(--text-primary); margin: 0;
}
.card-body { padding: 24px; }

/* Stat Cards */
.stat-card {
    border-radius: var(--radius-lg);
    padding: 24px;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    border: none !important;
    cursor: default;
}
.stat-card::before {
    content: '';
    position: absolute;
    width: 150px; height: 150px;
    border-radius: 50%;
    top: -50px; right: -50px;
    background: linear-gradient(135deg, rgba(255,255,255,0.2), rgba(255,255,255,0));
    backdrop-filter: blur(5px);
}
.stat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg) !important; }

.stat-card .stat-label {
    font-size: 12px; font-weight: 600;
    letter-spacing: .5px; text-transform: uppercase;
    color: rgba(255,255,255,.8); margin-bottom: 8px;
}
.stat-card .stat-value {
    font-size: 32px; font-weight: 800;
    color: #fff; letter-spacing: -1px; margin-bottom: 16px;
}
.stat-card .stat-link {
    color: rgba(255,255,255,.9);
    font-size: 13px; font-weight: 600;
    text-decoration: none;
    display: flex; align-items: center; gap: 5px;
    transition: var(--transition);
}
.stat-card .stat-link:hover { color: #fff; gap: 8px; }
.stat-card .stat-icon {
    position: absolute;
    right: 24px; top: 24px;
    font-size: 42px;
    color: rgba(255,255,255,.25);
    z-index: 1;
}

.stat-indigo    { background: linear-gradient(135deg, #0f766e, #115e59); } /* Teal */
.stat-emerald   { background: linear-gradient(135deg, #4f46e5, #4338ca); } /* Indigo */
.stat-amber     { background: linear-gradient(135deg, #f59e0b, #d97706); } /* Amber */
.stat-sky       { background: linear-gradient(135deg, #0ea5e9, #0284c7); } /* Sky */

/* ===================================================
   TABLES
   =================================================== */
.table {
    --bs-table-bg: transparent;
    font-size: 13.5px;
}
.table th {
    font-size: 11px; font-weight: 700;
    letter-spacing: .6px; text-transform: uppercase;
    color: var(--text-secondary);
    padding: 12px 16px;
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}
.table td {
    padding: 13px 16px;
    color: var(--text-primary);
    vertical-align: middle;
    border-bottom: 1px solid var(--border);
}
.table tbody tr { transition: var(--transition); }
.table tbody tr:hover { background: rgba(79,70,229,.035); }
.table tbody tr:last-child td { border-bottom: none; }

/* ===================================================
   BUTTONS
   =================================================== */
.btn {
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 13.5px;
    letter-spacing: .2px;
    padding: 10px 20px;
    transition: var(--transition);
    border: none;
    position: relative;
    overflow: hidden;
}
.btn::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 50%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: all 0.5s ease;
    transform: skewX(-20deg);
}
.btn:hover::after { left: 150%; }

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary   { background: var(--primary); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--primary-dark); color: #fff; box-shadow: var(--shadow-glow); }

.btn-success   { background: var(--success); color: #fff; box-shadow: var(--shadow); }
.btn-success:hover { background: #047857; color: #fff; box-shadow: 0 0 15px rgba(16,185,129,.3); }

.btn-danger    { background: var(--danger); color: #fff; box-shadow: var(--shadow); }
.btn-danger:hover { background: #b91c1c; color: #fff; box-shadow: 0 0 15px rgba(239,68,68,.3); }

.btn-warning   { background: var(--warning); color: #fff; box-shadow: var(--shadow); }
.btn-warning:hover { background: #b45309; color: #fff; }

.btn-info      { background: var(--secondary); color: #fff; box-shadow: var(--shadow); }
.btn-info:hover { background: #4f46e5; color: #fff; box-shadow: 0 0 15px rgba(99,102,241,.3); }

.btn-secondary { background: #e2e8f0; color: var(--text-primary); }
.btn-secondary:hover { background: #cbd5e1; color: var(--text-primary); }

.btn-outline-primary { border: 2px solid var(--primary); color: var(--primary); background: transparent; }
.btn-outline-primary:hover { background: var(--primary); color: #fff; }

.btn-sm { padding: 5px 13px; font-size: 12px; border-radius: 7px; }
.btn-lg { padding: 12px 28px; font-size: 15px; border-radius: 11px; }
.btn-icon { width: 36px; height: 36px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 9px; }

/* ===================================================
   FORMS
   =================================================== */
.form-label { font-size: 13.5px; font-weight: 600; color: var(--text-primary); margin-bottom: 8px; }
.form-control, .form-select {
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 12px 16px;
    font-size: 14px;
    color: var(--text-primary);
    background: var(--body-bg);
    transition: var(--transition);
}
.form-control:focus, .form-select:focus {
    background: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(45, 212, 191, 0.15);
    outline: none;
}
.form-control::placeholder { color: #94a3b8; }
.form-floating label { color: var(--text-secondary); font-size: 14px; }
.form-floating .form-control { border-radius: var(--radius); }

/* ===================================================
   BADGES
   =================================================== */
.badge {
    border-radius: 6px;
    font-weight: 600;
    font-size: 11.5px;
    padding: 4px 9px;
    letter-spacing: .2px;
}
.badge-status-baru     { background: #fef3c7; color: #92400e; }
.badge-status-proses   { background: #dbeafe; color: #1e3a8a; }
.badge-status-selesai  { background: #d1fae5; color: #064e3b; }
.badge-status-diambil  { background: #e2e8f0; color: #334155; }
.badge-lunas           { background: #d1fae5; color: #064e3b; }
.badge-belum           { background: #fee2e2; color: #7f1d1d; }

/* ===================================================
   PAGE HEADER
   =================================================== */
.page-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 24px;
}
.page-header h2 {
    font-size: 22px; font-weight: 800;
    color: var(--text-primary); margin: 0; letter-spacing: -.5px;
}
.page-header p { font-size: 13px; color: var(--text-secondary); margin: 2px 0 0; }

/* Breadcrumb */
.breadcrumb-nav { font-size: 12px; color: var(--text-secondary); margin-bottom: 8px; }
.breadcrumb-nav a { color: var(--primary); text-decoration: none; font-weight: 500; }
.breadcrumb-nav a:hover { text-decoration: underline; }

/* ===================================================
   FOOTER
   =================================================== */
.main-footer {
    padding: 16px 28px;
    border-top: 1px solid var(--border);
    text-align: center;
    font-size: 12px;
    color: var(--text-secondary);
    background: var(--card-bg);
}

/* ===================================================
   EMPTY STATE
   =================================================== */
.empty-state {
    padding: 50px 20px;
    text-align: center;
}
.empty-state i { font-size: 48px; color: #cbd5e1; margin-bottom: 12px; }
.empty-state p { color: var(--text-secondary); margin: 0; }

/* ===================================================
   UTILITIES
   =================================================== */
.text-primary { color: var(--primary) !important; }
.text-success { color: var(--success) !important; }
.text-danger  { color: var(--danger)  !important; }
.text-warning { color: var(--warning) !important; }
.text-muted   { color: var(--text-secondary) !important; }

a { color: var(--primary); }
a:hover { color: var(--primary-dark); }

hr { border-color: var(--border); }
.divider { height: 1px; background: var(--border); margin: 20px 0; }

/* ===================================================
   LOGIN PAGE
   =================================================== */
.login-wrapper {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--sidebar-bg) 0%, #312e81 50%, #1e1b4b 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}
.login-wrapper::before {
    content: '';
    position: absolute;
    width: 400px; height: 400px;
    border-radius: 50%;
    background: rgba(79,70,229,.25);
    top: -100px; left: -100px;
    filter: blur(60px);
}
.login-wrapper::after {
    content: '';
    position: absolute;
    width: 350px; height: 350px;
    border-radius: 50%;
    background: rgba(6,182,212,.2);
    bottom: -80px; right: -80px;
    filter: blur(60px);
}
.login-card {
    background: rgba(255,255,255,.97);
    border-radius: 20px;
    padding: 44px 40px;
    width: 100%; max-width: 420px;
    box-shadow: 0 25px 50px rgba(0,0,0,.35);
    position: relative; z-index: 1;
    backdrop-filter: blur(10px);
}
.login-logo {
    width: 64px; height: 64px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 18px;
    display: flex; align-items: center; justify-content: center;
    font-size: 28px; color: #fff;
    margin: 0 auto 16px;
    box-shadow: 0 8px 20px rgba(79,70,229,.4);
}
.login-title { font-size: 22px; font-weight: 800; color: var(--text-primary); text-align: center; margin-bottom: 4px; }
.login-subtitle { font-size: 13px; color: var(--text-secondary); text-align: center; margin-bottom: 28px; }
.login-card .form-control {
    background: var(--body-bg);
    border: 1.5px solid var(--border);
    padding: 12px 16px;
    border-radius: 11px;
}
.login-card .form-control:focus { background: #fff; }
.login-card .btn-primary { padding: 13px; font-size: 15px; border-radius: 11px; }

/* ===================================================
   RESPONSIVE
   =================================================== */
/* ===================================================
   BOTTOM NAVIGATION (MOBILE)
   =================================================== */
.bottom-nav {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: var(--radius-pill);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 10px 8px;
    z-index: 1000;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.1);
}
.bottom-nav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 600;
    gap: 4px;
    transition: var(--transition);
    padding: 6px 12px;
    border-radius: var(--radius-pill);
}
.bottom-nav .nav-item i {
    font-size: 22px;
}
.bottom-nav .nav-item.active {
    color: var(--primary);
    background: var(--sidebar-active);
}
.bottom-nav .nav-item:hover {
    color: var(--primary);
}

@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.show { transform: translateX(0); }
    .main-wrapper { margin-left: 0; padding-bottom: 70px; } /* Add padding for bottom nav */
    .content-body { padding: 16px; }
    .topbar { padding: 0 16px; }
    #sidebarToggle { display: none !important; } /* Hide the topbar toggle button since we use bottom menu toggle */
}
