/* ============================================================
   RIKA BAKERY — GLOBAL DESIGN SYSTEM
   v3 | 2026-09-29
   ============================================================ */

/* ============================================================
   1. DESIGN TOKENS
   ============================================================ */
:root {
    /* --- Brand colors --- */
    --primary:        #2563EB;
    --primary-dark:   #1d4ed8;
    --primary-light:  #dbeafe;
    --success:        #16A34A;
    --success-bg:     #dcfce7;
    --warning:        #F59E0B;
    --warning-bg:     #fef3c7;
    --danger:         #DC2626;
    --danger-bg:      #fee2e2;
    --info:           #0284c7;
    --info-bg:        #e0f2fe;

    /* --- Neutrals --- */
    --background:     #F7F8FA;
    --surface:        #FFFFFF;
    --surface-2:      #f9fafb;
    --text:           #111827;
    --text-secondary: #374151;
    --muted:          #6B7280;
    --border:         #E5E7EB;
    --border-strong:  #d1d5db;

    /* --- Sidebar --- */
    --sidebar-bg:     #0f172a;
    --sidebar-hover:  #1e293b;
    --sidebar-active: #2563eb;
    --sidebar-width:  250px;

    /* --- Border radius scale --- */
    --radius-xs: 6px;
    --radius-sm: 8px;
    --radius:    12px;
    --radius-md: 14px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl:28px;

    /* --- Shadows --- */
    --shadow:    0 1px 3px rgba(0,0,0,.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,.10);
    --shadow-lg: 0 10px 30px rgba(0,0,0,.12);

    /* --- Typography scale --- */
    --text-2xs:  10px;
    --text-xs:   12px;
    --text-sm:   13px;
    --text-base: 15px;
    --text-md:   17px;
    --text-lg:   18px;
    --text-xl:   22px;
    --text-2xl:  26px;

    /* --- Transition --- */
    --transition: all .15s ease;

    /* --- Z-index scale --- */
    --z-base:     1;
    --z-topbar:   100;
    --z-bottomnav:100;
    --z-overlay:  150;
    --z-sidebar:  200;
    --z-dropdown: 9999;
    --z-toast:    9999;
}

/* ============================================================
   2. RESET & BASE
   ============================================================ */
* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--background);
    color: var(--text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    font-size: var(--text-base);
    line-height: 1.5;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: none; }

/* ============================================================
   3. BUTTONS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    border-radius: var(--radius-sm);
    padding: 10px 18px;
    font-size: var(--text-base);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    min-height: 44px;
    text-decoration: none;
    white-space: nowrap;
}
.btn:disabled { opacity: .55; cursor: not-allowed; }

.btn-primary  { background: var(--primary); color: #fff; }
.btn-primary:hover:not(:disabled)  { background: var(--primary-dark); }
.btn-success  { background: var(--success); color: #fff; }
.btn-success:hover:not(:disabled)  { background: #15803d; }
.btn-danger   { background: var(--danger);  color: #fff; }
.btn-danger:hover:not(:disabled)   { background: #b91c1c; }
.btn-warning  { background: var(--warning); color: #fff; }
.btn-warning:hover:not(:disabled)  { background: #d97706; }
.btn-info     { background: var(--info);    color: #fff; }
.btn-info:hover:not(:disabled)     { background: #0369a1; }

.btn-outline  {
    background: transparent;
    border: 1.5px solid var(--border);
    color: var(--text);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }

.btn-ghost {
    background: transparent;
    color: var(--muted);
    border: none;
}
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }

.btn-block { width: 100%; }
.btn-lg    { padding: 14px 24px; font-size: var(--text-md); min-height: 52px; }
.btn-sm    { padding: 7px 12px;  font-size: var(--text-sm); min-height: 34px; border-radius: var(--radius-xs); }

/* ============================================================
   4. CARDS
   ============================================================ */
.card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    overflow: hidden;
}
.card-body        { padding: 20px; }
.card-body-flush  { padding: 0; }  /* gunakan .card-body-flush ganti .card-body p-0 */
.card-body-sm     { padding: 14px; }

.card-header {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    font-size: var(--text-base);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: var(--surface);
    flex-wrap: wrap;
}
.card-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--border);
    background: var(--surface-2);
    font-size: var(--text-sm);
    color: var(--muted);
}

/* ============================================================
   5. PAGE HEADER (standar semua halaman admin)
   ============================================================ */
.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.page-header-left  { display: flex; flex-direction: column; gap: 4px; }
.page-title        { font-size: var(--text-lg); font-weight: 700; color: var(--text); margin: 0; }
.page-subtitle     { font-size: var(--text-sm); color: var(--muted); margin: 0; }
.page-header-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ============================================================
   6. BREADCRUMB
   ============================================================ */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: var(--text-sm);
    color: var(--muted);
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.breadcrumb a        { color: var(--muted); transition: color .15s; }
.breadcrumb a:hover  { color: var(--primary); }
.breadcrumb .sep     { color: var(--border-strong); }
.breadcrumb .current { color: var(--text); font-weight: 500; }

/* ============================================================
   7. BADGES
   ============================================================ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: var(--text-xs);
    font-weight: 600;
    white-space: nowrap;
}
.badge-success { background: var(--success-bg);  color: var(--success); }
.badge-warning { background: var(--warning-bg);  color: #b45309; }
.badge-danger  { background: var(--danger-bg);   color: var(--danger); }
.badge-primary { background: var(--primary-light); color: var(--primary-dark); }
.badge-info    { background: var(--info-bg);     color: #075985; }
.badge-muted   { background: #f3f4f6;            color: var(--muted); }

/* ============================================================
   8. FORMS
   ============================================================ */
.form-label {
    display: block;
    font-size: var(--text-sm);
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text);
}
.form-label .required { color: var(--danger); margin-left: 2px; }
.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: var(--text-base);
    font-family: inherit;
    background: var(--surface);
    color: var(--text);
    transition: border .15s;
    min-height: 44px;
    appearance: auto;
}
.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,.10);
}
.form-control::placeholder { color: #9ca3af; }
.form-control:disabled     { background: var(--surface-2); color: var(--muted); cursor: not-allowed; }
.form-group   { margin-bottom: 16px; }
.form-hint    { font-size: var(--text-xs); color: var(--muted); margin-top: 5px; }
.form-error   { font-size: var(--text-xs); color: var(--danger); margin-top: 5px; }
textarea.form-control { min-height: 90px; resize: vertical; }
select.form-control   { cursor: pointer; }

/* Form row untuk filter bar */
.filter-bar {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.filter-bar .form-group { margin-bottom: 0; }
.filter-bar .form-label { font-size: var(--text-xs); }

/* ============================================================
   9. ALERTS & TOASTS
   ============================================================ */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.6;
    border-left: 4px solid transparent;
}
.alert-success { background: var(--success-bg); color: #166534; border-left-color: var(--success); }
.alert-danger  { background: var(--danger-bg);  color: #991b1b; border-left-color: var(--danger); }
.alert-warning { background: var(--warning-bg); color: #92400e; border-left-color: var(--warning); }
.alert-info    { background: var(--info-bg);    color: #075985; border-left-color: var(--info); }

.toast-container {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: var(--z-toast);
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: min(90%, 420px);
}
.toast {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    color: #fff;
    font-size: 14px;
    box-shadow: var(--shadow-lg);
    animation: slideIn .25s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}
.toast-success { background: var(--success); }
.toast-error   { background: var(--danger); }
.toast-warning { background: var(--warning); }
.toast-info    { background: var(--info); }
@keyframes slideIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

/* ============================================================
   10. TABLES
   ============================================================ */
.table-wrap { overflow-x: auto; max-width: 100%; -webkit-overflow-scrolling: touch; }
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
/* Tabel data (di dalam .table-wrap) butuh lebar minimum + scroll horizontal di layar kecil.
   Tabel info/key-value polos TIDAK diberi min-width supaya teksnya membungkus, bukan terpotong. */
.table-wrap .table { min-width: 640px; }
.table th,
.table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.table thead th {
    background: var(--surface-2);
    font-size: var(--text-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--muted);
    white-space: nowrap;
}
.table tbody tr:hover td { background: #f8fafc; }
.table tbody tr:last-child td { border-bottom: none; }
.table .text-right, .table th.text-right { text-align: right; }
.table .text-center, .table th.text-center { text-align: center; }
.table .text-mono { font-variant-numeric: tabular-nums; }
.table .nowrap { white-space: nowrap; }

/* ============================================================
   11. EMPTY & LOADING STATES
   ============================================================ */
.empty-state {
    text-align: center;
    padding: 56px 24px;
    color: var(--muted);
}
.empty-state .icon { font-size: 48px; margin-bottom: 12px; display: block; }
.empty-state h3    { font-size: var(--text-base); font-weight: 600; margin: 0 0 6px; color: var(--text); }
.empty-state p     { font-size: var(--text-sm); margin: 0; }

.spinner {
    width: 18px; height: 18px;
    border: 2.5px solid rgba(255,255,255,.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .7s linear infinite;
    flex-shrink: 0;
}
.spinner-dark {
    border-color: rgba(17,24,39,.15);
    border-top-color: var(--primary);
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   12. STAT CARDS (dashboard admin)
   ============================================================ */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}
.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 18px;
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
    display: block;
}
.stat-card:hover { border-color: var(--primary); box-shadow: var(--shadow-md); }
.stat-card .value { font-size: var(--text-2xl); font-weight: 700; line-height: 1.2; }
.stat-card .label { font-size: var(--text-sm); color: var(--muted); margin-top: 2px; }
.stat-card .trend { font-size: var(--text-xs); margin-top: 6px; }
.stat-card .icon  { font-size: 28px; margin-bottom: 8px; display: block; }

/* ============================================================
   13. AUTH LAYOUT
   ============================================================ */
.auth-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, var(--sidebar-bg), #1e3a8a, var(--primary));
}
.auth-card {
    background: var(--surface);
    border-radius: var(--radius-xl);
    box-shadow: 0 25px 80px rgba(0,0,0,.28);
    padding: 36px 32px;
    width: 100%;
    max-width: 420px;
}
.auth-logo {
    width: 64px; height: 64px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, #1e3a8a, var(--primary));
    display: flex; align-items: center; justify-content: center;
    font-size: 30px;
    margin: 0 auto 16px;
}
.auth-logo-img {
    width: 64px; height: 64px;
    border-radius: var(--radius-md);
    object-fit: contain;
    background: #fff;
    border: 1px solid var(--border);
    padding: 6px;
    display: block;
    margin: 0 auto 16px;
}
.auth-title    { text-align: center; font-size: var(--text-xl); font-weight: 700; margin-bottom: 4px; }
.auth-subtitle { text-align: center; color: var(--muted); margin-bottom: 28px; font-size: 14px; }

/* Toggle lihat password */
.password-wrap { position: relative; }
.password-wrap .form-control { padding-right: 46px; }
.pw-toggle {
    position: absolute;
    top: 50%;
    right: 6px;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    color: #9ca3af;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.pw-toggle:hover { color: var(--primary); background: rgba(37,99,235,.08); }
.pw-toggle svg { display: block; }

/* ============================================================
   14. ADMIN LAYOUT — sidebar + topbar
   ============================================================ */
.admin-shell { display: flex; min-height: 100vh; }

/* --- Sidebar --- */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: #fff;
    position: fixed;
    top: 0; bottom: 0; left: 0;
    display: flex;
    flex-direction: column;
    z-index: var(--z-sidebar);
    transition: transform .25s ease;
}
.sidebar .brand {
    padding: 18px 20px;
    font-weight: 700;
    font-size: var(--text-md);
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid rgba(255,255,255,.07);
}
.sidebar .brand .logo {
    width: 38px; height: 38px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, #1e3a8a, var(--primary));
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}
.sidebar .brand .brand-logo {
    width: 38px; height: 38px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    background: #fff;
    padding: 2px;
    flex-shrink: 0;
}
.sidebar nav {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 8px 0 20px;
}
.sidebar nav::-webkit-scrollbar { width: 4px; }
.sidebar nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 4px; }

.sidebar .nav-section {
    padding: 16px 20px 4px;
    font-size: var(--text-2xs);
    text-transform: uppercase;
    letter-spacing: .1em;
    color: rgba(255,255,255,.30);
    font-weight: 600;
}
.sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    color: rgba(255,255,255,.65);
    text-decoration: none;
    border-left: 3px solid transparent;
    font-size: 14px;
    transition: var(--transition);
}
.sidebar .nav-link:hover  { background: var(--sidebar-hover); color: #fff; }
.sidebar .nav-link.active { background: rgba(37,99,235,.25); color: #fff; border-left-color: #60a5fa; font-weight: 600; }
.sidebar .nav-link .nav-badge {
    margin-left: auto;
    background: var(--danger);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 999px;
}

/* --- Sidebar footer (user info) --- */
.sidebar-footer {
    padding: 14px 20px;
    border-top: 1px solid rgba(255,255,255,.07);
    display: flex;
    align-items: center;
    gap: 10px;
}
.sidebar-footer .sf-name { font-size: var(--text-sm); font-weight: 600; color: rgba(255,255,255,.85); }
.sidebar-footer .sf-role { font-size: var(--text-xs); color: rgba(255,255,255,.40); }

/* --- Overlay --- */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: var(--z-overlay);
}

/* --- Main area --- */
.main-area { flex: 1; margin-left: var(--sidebar-width); min-width: 0; }

/* --- Topbar --- */
.topbar {
    position: sticky; top: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: var(--z-topbar);
    gap: 12px;
}
.topbar-left  { display: flex; align-items: center; gap: 12px; min-width: 0; }
.topbar-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.topbar .title {
    font-size: var(--text-lg);
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.topbar .user-info { text-align: right; }
.topbar .user-name { font-weight: 600; font-size: 14px; line-height: 1.3; }
.topbar .user-branch { font-size: var(--text-xs); color: var(--muted); }
.topbar .avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700;
    font-size: var(--text-sm);
    flex-shrink: 0;
}
.topbar .avatar-photo {
    width: 36px; height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

/* --- Content --- */
.content { padding: 24px; }

/* --- Hamburger --- */
.hamburger { display: inline-flex; }

/* --- Desktop collapse --- */
.admin-shell.collapsed .sidebar    { transform: translateX(-100%); }
.admin-shell.collapsed .main-area  { margin-left: 0; }

/* ============================================================
   15. GRID & LAYOUT UTILITIES
   ============================================================ */
.grid-2   { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3   { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.grid-4   { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }

.flex     { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.flex-1   { flex: 1; }
.items-center  { align-items: center; }
.items-start   { align-items: flex-start; }
.items-end     { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.justify-end   { justify-content: flex-end; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.flex-wrap { flex-wrap: wrap; }

/* Item pesanan — responsif: 1 baris (desktop/tablet), 2 baris (HP) */
.order-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    background: var(--bg);
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 10px;
}
.order-item .oi-name   { flex: 1 1 160px; min-width: 0; }
.order-item .oi-qty    { flex: 0 0 84px; }
.order-item .oi-unit   { flex: 0 0 76px; }
.order-item .oi-price  { flex: 0 0 130px; }
.order-item .oi-remove { flex: 0 0 auto; }

@media (max-width: 768px) {
    .order-item .oi-name   { order: 1; flex: 1 1 calc(100% - 48px); }
    .order-item .oi-remove { order: 2; }
    .order-item .oi-qty    { order: 3; flex: 1 1 0; min-width: 0; }
    .order-item .oi-unit   { order: 4; flex: 1 1 0; min-width: 0; }
    .order-item .oi-price  { order: 5; flex: 1.4 1 0; min-width: 0; }
}

/* ============================================================
   16. SPACING UTILITIES
   ============================================================ */
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-5 { margin-top: 20px; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-5 { margin-bottom: 20px; }
.p-0  { padding: 0; }
.p-3  { padding: 12px; }
.p-4  { padding: 16px; }
.p-5  { padding: 20px; }

/* ============================================================
   17. TEXT UTILITIES
   ============================================================ */
.text-sm      { font-size: var(--text-sm); }
.text-xs      { font-size: var(--text-xs); }
.text-muted   { color: var(--muted); }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.text-warning { color: #b45309; }
.text-right   { text-align: right; }
.text-center  { text-align: center; }
.font-bold    { font-weight: 700; }
.font-semibold{ font-weight: 600; }
.truncate     { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ============================================================
   18. MODAL / CONFIRM DIALOG
   ============================================================ */
.modal-backdrop {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.5);
    z-index: calc(var(--z-sidebar) + 100);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn .15s ease;
}
.modal-dialog {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 420px;
    padding: 28px 24px;
    animation: slideIn .2s ease;
}
.modal-dialog h4  { margin: 0 0 8px; font-size: var(--text-base); font-weight: 700; }
.modal-dialog p   { margin: 0 0 20px; color: var(--muted); font-size: var(--text-sm); }
.modal-actions    { display: flex; gap: 10px; justify-content: flex-end; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ============================================================
   19. PHOTO GRID (shared)
   ============================================================ */
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 8px; }
.photo-grid img { width: 100%; height: 80px; object-fit: cover; border-radius: var(--radius-sm); }

/* ============================================================
   19b. LAPORAN TIM DETAIL — checklist kerja umum & bukti foto
   ============================================================ */
.section-title {
    font-size: var(--text-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--muted);
    margin: 0 0 10px;
}
.work-list { list-style: none; margin: 0; padding: 0; }
.work-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 0;
    border-bottom: 1px solid var(--border);
}
.work-list li:first-child { padding-top: 0; }
.work-list li:last-child  { padding-bottom: 0; border-bottom: none; }
.work-label { display: flex; align-items: center; gap: 10px; min-width: 0; }
.work-label .work-name { line-height: 1.4; }
.work-label input[type="checkbox"] { width: 18px; height: 18px; flex: 0 0 auto; margin: 0; accent-color: var(--success); }
.work-check { font-size: 18px; line-height: 1; flex: 0 0 auto; }
.work-thumb {
    flex: 0 0 auto;
    display: block;
    width: 48px; height: 48px;
    border-radius: var(--radius-xs);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--surface-2);
}
.work-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.report-photo {
    display: block;
    width: 100%;
    max-width: 260px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

/* ============================================================
   19.5 REPORT ABSENSI — penanda warna sel & ringkasan
   ============================================================ */
.cell-early { background: var(--success-bg); color: #166534; font-weight: 600; }
.cell-late  { background: var(--danger-bg);  color: #991b1b; font-weight: 600; }
.cell-short { background: var(--warning-bg); color: #92400e; font-weight: 600; }

.stat-chip {
    display: inline-flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    min-width: 110px;
}
.stat-chip-label { font-size: var(--text-xs); color: var(--muted); }
.stat-chip-value { font-size: var(--text-base); font-weight: 700; color: var(--text); }

.legend { font-size: var(--text-sm); color: var(--muted); align-items: center; }
.legend-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 3px;
    margin-right: 6px;
    vertical-align: -1px;
    border: 1px solid rgba(0,0,0,0.06);
}

/* ============================================================
   20. RESPONSIVE — TABLET (max 1024px)
   ============================================================ */
@media (max-width: 1024px) {
    .grid-3 { grid-template-columns: 1fr 1fr; }
    .grid-4 { grid-template-columns: 1fr 1fr; }
    .sidebar { transform: translateX(-100%); }
    .main-area { margin-left: 0; }
    .admin-shell.collapsed .sidebar { transform: translateX(-100%); }
}

/* ============================================================
   21. RESPONSIVE — MOBILE (max 768px)
   ============================================================ */
@media (max-width: 768px) {
    .sidebar-overlay.open { display: block; }
    .sidebar.open         { transform: translateX(0); }
    .content              { padding: 16px; }
    .stat-grid            { grid-template-columns: repeat(2, 1fr); }
    .grid-2               { grid-template-columns: 1fr; }
    .grid-3               { grid-template-columns: 1fr; }
    .grid-4               { grid-template-columns: 1fr 1fr; }
    .page-header          { flex-direction: column; align-items: flex-start; }
    .filter-bar           { flex-direction: column; align-items: stretch; }
    .topbar               { padding: 10px 16px; }
    .topbar .title        { font-size: var(--text-base); }
    .modal-dialog         { padding: 20px; }
    .table-wrap           { border-radius: 0; }
    .hide-mobile          { display: none !important; }
}

/* ============================================================
   22. RESPONSIVE — SMALL (max 480px)
   ============================================================ */
@media (max-width: 480px) {
    .stat-grid { grid-template-columns: 1fr 1fr; }
    .grid-4    { grid-template-columns: 1fr 1fr; }
    .btn-lg    { padding: 12px 18px; font-size: var(--text-base); }
}
