/* =============================================
   LAUNDRUKU — STYLESHEET v2.0
   Mobile-First Premium Design
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ---- DESIGN TOKENS ---- */
:root {
    /* Colors */
    --primary:        #2563eb;
    --primary-hover:  #1d4ed8;
    --primary-light:  #eff6ff;
    --primary-dark:   #1e40af;
    --primary-glow:   rgba(37,99,235,.18);

    --success:        #16a34a;
    --success-light:  #dcfce7;
    --success-glow:   rgba(22,163,74,.15);
    --warning:        #d97706;
    --warning-light:  #fef3c7;
    --danger:         #dc2626;
    --danger-light:   #fee2e2;
    --info:           #0891b2;
    --info-light:     #cffafe;
    --purple:         #7c3aed;
    --purple-light:   #ede9fe;

    /* Neutral */
    --white:          #ffffff;
    --bg:             #f1f5f9;
    --surface:        #ffffff;
    --surface-2:      #f8fafc;
    --border:         #e2e8f0;
    --border-light:   #f1f5f9;
    --text:           #0f172a;
    --text-muted:     #64748b;
    --text-light:     #94a3b8;

    /* Radius */
    --radius-sm:  6px;
    --radius:     10px;
    --radius-lg:  16px;
    --radius-xl:  20px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm:  0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
    --shadow:     0 4px 12px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.04);
    --shadow-md:  0 8px 24px rgba(0,0,0,.10), 0 4px 8px rgba(0,0,0,.04);
    --shadow-lg:  0 16px 48px rgba(0,0,0,.14), 0 8px 16px rgba(0,0,0,.06);
    --shadow-primary: 0 6px 20px rgba(37,99,235,.30);
    --shadow-success: 0 6px 20px rgba(22,163,74,.28);
    --shadow-danger:  0 6px 20px rgba(220,38,38,.28);

    /* Transitions */
    --transition: all .18s cubic-bezier(.4,0,.2,1);
    --transition-bounce: all .3s cubic-bezier(.34,1.56,.64,1);

    /* Layout */
    --navbar-h:    56px;
    --bottom-nav-h: 68px;
}

/* ---- BASE ---- */
html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.5;
    min-height: 100vh;
    /* Push content above bottom nav on mobile */
    padding-bottom: var(--bottom-nav-h);
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* ---- TOP NAVBAR (mobile: logo + user only) ---- */
.navbar {
    background: var(--white);
    padding: 0 16px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.5px;
}
.brand-icon { font-size: 22px; }

/* Desktop menu hidden by default on mobile, handled via toggle */
.navbar-menu {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--white);
    padding: 16px;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    gap: 12px;
}
.navbar-menu.open {
    display: flex;
}

.nav-link {
    padding: 6px 12px;
    border-radius: var(--radius);
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    transition: var(--transition);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
}
.nav-link:hover  { background: var(--bg); color: var(--text); }
.nav-link.active { background: var(--primary-light); color: var(--primary); font-weight: 600; }

.navbar-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 34px;
    height: 34px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

.user-name { font-size: 13px; color: var(--text-muted); display: none; }

.btn-logout {
    font-size: 12px;
    color: var(--danger);
    border: 1px solid var(--border);
    padding: 6px 12px;
    border-radius: var(--radius-full);
    transition: var(--transition);
    font-weight: 500;
    display: none; /* hidden on mobile, shown in bottom sheet */
}
.btn-logout:hover { background: var(--danger-light); border-color: var(--danger); }

.btn-logout-mobile {
    color: var(--danger) !important;
    font-weight: 600;
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

/* ---- BOTTOM NAVIGATION (mobile-only) ---- */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--bottom-nav-h);
    background: var(--white);
    border-top: 1px solid var(--border);
    display: flex;
    align-items: stretch;
    z-index: 100;
    box-shadow: 0 -4px 20px rgba(0,0,0,.08);
    padding-bottom: env(safe-area-inset-bottom);
}

.bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: var(--text-light);
    font-size: 10px;
    font-weight: 500;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    background: none;
    padding: 8px 4px;
    text-decoration: none;
    position: relative;
}

.bottom-nav-item.active {
    color: var(--primary);
}

.bottom-nav-item.active .bnav-icon {
    background: var(--primary-light);
    color: var(--primary);
    transform: translateY(-2px) scale(1.05);
}

.bottom-nav-item:active .bnav-icon {
    transform: scale(.92);
}

.bnav-icon {
    width: 40px;
    height: 30px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: var(--transition-bounce);
}

.bnav-label { line-height: 1; }

/* FAB (Floating Action Button) in bottom nav center */
.bottom-nav-fab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    cursor: pointer;
    text-decoration: none;
    padding: 4px;
    position: relative;
}

.fab-btn {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 22px;
    box-shadow: var(--shadow-primary);
    transition: var(--transition-bounce);
    margin-top: -16px;
    line-height: 1;
}

.bottom-nav-fab:active .fab-btn {
    transform: scale(.90);
}

.fab-label {
    font-size: 10px;
    font-weight: 500;
    color: var(--primary);
    margin-top: 2px;
}

/* ---- CONTAINER ---- */
.container {
    max-width: 640px;
    margin: 0 auto;
    padding: 16px 16px 24px;
}

/* ---- PAGE HEADER ---- */
.page-header {
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.page-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -.4px;
    line-height: 1.2;
}
.page-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 3px;
}

/* ---- CARDS ---- */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.card + .card { margin-top: 14px; }

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
}

.card-title { font-size: 14px; font-weight: 700; color: var(--text); }

/* ---- STATS GRID ---- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 14px 16px;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}
.stat-card::after {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 60px; height: 60px;
    border-radius: 50%;
    opacity: .06;
    transform: translate(20px, -20px);
}

.stat-card.primary { border-left: 3px solid var(--primary); }
.stat-card.primary::after { background: var(--primary); }
.stat-card.success { border-left: 3px solid var(--success); }
.stat-card.success::after { background: var(--success); }
.stat-card.warning { border-left: 3px solid var(--warning); }
.stat-card.warning::after { background: var(--warning); }
.stat-card.danger  { border-left: 3px solid var(--danger); }
.stat-card.danger::after  { background: var(--danger); }
.stat-card.info    { border-left: 3px solid var(--info); }
.stat-card.info::after    { background: var(--info); }

.stat-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .6px;
    margin-bottom: 6px;
}
.stat-value {
    font-size: 22px;
    font-weight: 800;
    color: var(--text);
    line-height: 1.1;
    letter-spacing: -.5px;
}
.stat-sub {
    font-size: 11px;
    color: var(--text-light);
    margin-top: 4px;
}

/* Stat card spanning full width */
.stat-card.full {
    grid-column: 1 / -1;
}

/* ---- BUTTONS ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: 1.5px solid transparent;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
    letter-spacing: .1px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
}

.btn:active { transform: scale(.96); }

/* Primary */
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: var(--shadow-primary);
    border-color: transparent;
}
.btn-primary:hover  { background: linear-gradient(135deg, var(--primary-hover), #1e3a8a); box-shadow: 0 8px 24px rgba(37,99,235,.38); }

/* Success */
.btn-success {
    background: linear-gradient(135deg, var(--success), #15803d);
    color: white;
    box-shadow: var(--shadow-success);
}
.btn-success:hover { box-shadow: 0 8px 24px rgba(22,163,74,.38); }

/* Danger */
.btn-danger {
    background: linear-gradient(135deg, var(--danger), #b91c1c);
    color: white;
    box-shadow: var(--shadow-danger);
}
.btn-danger:hover { box-shadow: 0 8px 24px rgba(220,38,38,.38); }

/* Warning */
.btn-warning {
    background: linear-gradient(135deg, var(--warning), #b45309);
    color: white;
    box-shadow: 0 6px 20px rgba(217,119,6,.28);
}

/* Outline */
.btn-outline {
    background: var(--white);
    color: var(--text);
    border-color: var(--border);
    box-shadow: var(--shadow-sm);
}
.btn-outline:hover { background: var(--bg); border-color: #cbd5e1; }

/* Ghost */
.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border-color: transparent;
}
.btn-ghost:hover { background: var(--bg); color: var(--text); }

/* Sizes */
.btn-sm  { padding: 6px 14px; font-size: 12px; }
.btn-lg  { padding: 13px 24px; font-size: 15px; font-weight: 700; }
.btn-xl  { padding: 16px 28px; font-size: 16px; font-weight: 700; }
.btn-block { width: 100%; }
.btn-icon {
    width: 38px;
    height: 38px;
    padding: 0;
    border-radius: var(--radius);
}
.btn-icon.btn-sm { width: 30px; height: 30px; font-size: 14px; }

/* Icon button pill */
.btn-pill {
    border-radius: var(--radius-full);
    padding: 8px 16px;
}

/* ---- ACTION BUTTON ROW ---- */
.action-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.action-row .btn { flex: 1; min-width: 0; }

/* ---- TABLE ---- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -16px; }
.table-wrap table { margin: 0; border-radius: 0; }

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    min-width: 500px;
}

thead th {
    background: var(--surface-2);
    padding: 10px 14px;
    text-align: left;
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .7px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

tbody td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text);
    vertical-align: middle;
}

tbody tr:last-child td { border-bottom: none; }
tbody tr { transition: var(--transition); }
tbody tr:hover td { background: var(--surface-2); }

/* ---- ORDER CARDS (mobile alternative to table) ---- */
.order-list { display: flex; flex-direction: column; gap: 10px; }

.order-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 14px 16px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}
.order-card:active { transform: scale(.99); }

.order-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

.order-kode {
    font-weight: 800;
    font-size: 13px;
    color: var(--primary);
    letter-spacing: -.2px;
}

.order-nama {
    font-weight: 600;
    font-size: 15px;
    color: var(--text);
    line-height: 1.3;
}

.order-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.order-meta-item {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.order-card-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.order-price {
    font-weight: 800;
    font-size: 15px;
    color: var(--text);
    letter-spacing: -.3px;
}

.order-actions {
    display: flex;
    gap: 6px;
}

/* ---- BADGES ---- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    letter-spacing: .2px;
}

.badge-proses   { background: var(--warning-light); color: var(--warning); }
.badge-selesai  { background: var(--info-light);    color: var(--info); }
.badge-diambil  { background: var(--success-light); color: var(--success); }
.badge-diantar  { background: var(--success-light); color: var(--success); }
.badge-masuk    { background: var(--success-light); color: var(--success); }
.badge-keluar   { background: var(--danger-light);  color: var(--danger); }
.badge-reguler  { background: var(--primary-light); color: var(--primary); }
.badge-express  { background: var(--danger-light);  color: var(--danger); }
.badge-setrika  { background: var(--purple-light);  color: var(--purple); }

/* ---- FORMS ---- */
.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}
.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.form-group.full { grid-column: 1 / -1; }

label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: .3px;
}

input, select, textarea {
    padding: 11px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    font-family: inherit;
    color: var(--text);
    background: var(--white);
    transition: var(--transition);
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
    background: var(--white);
}

input::placeholder { color: var(--text-light); }
textarea { resize: vertical; min-height: 80px; }

/* Select arrow */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2364748b' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

/* Toggle / Checkbox */
input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    accent-color: var(--primary);
    cursor: pointer;
    -webkit-appearance: auto;
    appearance: auto;
}

/* ---- RADIO BUTTONS AS SEGMENTED CONTROL ---- */
.radio-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.radio-group .radio-label {
    flex: 1;
    min-width: 80px;
    text-align: center;
    background: var(--white);
    border: 1.5px solid var(--border);
    padding: 10px 8px;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    transition: var(--transition);
    user-select: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.radio-group .radio-label small {
    font-size: 10px;
    font-weight: 500;
    opacity: 0.8;
}
.radio-group input[type="radio"] {
    display: none;
}
.radio-group input[type="radio"]:checked + .radio-label {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary-dark);
}

/* ---- MODAL ---- */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 200;
    display: none;
    align-items: flex-end; /* slide up from bottom on mobile */
    justify-content: center;
    padding: 0;
}

.modal-backdrop.open { display: flex; }

.modal {
    background: white;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 100%;
    max-height: 92vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    animation: slideUp .25s cubic-bezier(.4,0,.2,1);
}

@keyframes slideUp {
    from { transform: translateY(100%); opacity: .6; }
    to   { transform: translateY(0);    opacity: 1; }
}

/* Drag handle */
.modal::before {
    content: '';
    display: block;
    width: 36px;
    height: 4px;
    background: var(--border);
    border-radius: var(--radius-full);
    margin: 12px auto 0;
}

.modal-header {
    padding: 16px 20px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title { font-size: 17px; font-weight: 800; letter-spacing: -.3px; }
.modal-close {
    background: var(--bg);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    font-size: 16px;
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}
.modal-close:hover { background: var(--border); color: var(--text); }

.modal-body   { padding: 16px 20px; }
.modal-footer {
    padding: 0 20px 20px;
    display: flex;
    gap: 8px;
    padding-bottom: max(20px, env(safe-area-inset-bottom));
}
.modal-footer .btn { flex: 1; }

/* ---- ALERT ---- */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 13px;
    margin-bottom: 14px;
    border: 1.5px solid;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-weight: 500;
}

.alert-success { background: var(--success-light); border-color: #86efac; color: #15803d; }
.alert-danger  { background: var(--danger-light);  border-color: #fca5a5; color: #dc2626; }
.alert-warning { background: var(--warning-light); border-color: #fcd34d; color: #d97706; }
.alert-info    { background: var(--info-light);    border-color: #67e8f9; color: #0891b2; }

/* ---- FILTER BAR ---- */
.filter-bar {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 14px;
    padding-bottom: 4px;
    scrollbar-width: none;
}
.filter-bar::-webkit-scrollbar { display: none; }

.filter-bar input,
.filter-bar select {
    width: auto;
    min-width: 130px;
    flex-shrink: 0;
    padding: 8px 12px;
    font-size: 13px;
}

.filter-bar .btn { flex-shrink: 0; }

/* ---- EMPTY STATE ---- */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
}
.empty-state .empty-icon { font-size: 48px; margin-bottom: 12px; display: block; }
.empty-state p { font-size: 14px; line-height: 1.6; }
.empty-state a { color: var(--primary); font-weight: 600; }

/* ---- DIVIDER ---- */
.divider {
    border: none;
    border-top: 1px solid var(--border-light);
    margin: 16px 0;
}

/* ---- SECTION LABEL ---- */
.section-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .8px;
    margin-bottom: 10px;
    padding: 0 2px;
}

/* ---- LIST ITEMS ---- */
.list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
}
.list-item:last-child { border-bottom: none; }

.list-item-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.list-item-content { flex: 1; min-width: 0; }
.list-item-title { font-weight: 600; font-size: 14px; color: var(--text); }
.list-item-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ---- PRICE PREVIEW ---- */
.price-preview {
    background: linear-gradient(135deg, var(--primary-light), #dbeafe);
    border: 1.5px solid #bfdbfe;
    border-radius: var(--radius);
    padding: 12px 16px;
    margin-top: 4px;
    display: none;
}
.price-preview.show { display: block; }
.price-preview-label { font-size: 11px; color: var(--primary); font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
.price-preview-value { font-size: 20px; font-weight: 800; color: var(--primary-dark); letter-spacing: -.4px; }

/* ---- FOOTER ---- */
.footer {
    text-align: center;
    padding: 20px;
    color: var(--text-light);
    font-size: 12px;
    border-top: 1px solid var(--border);
    background: var(--white);
    margin-top: 24px;
}

/* ---- LOGIN PAGE ---- */
.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, #dbeafe 0%, #eff6ff 40%, var(--bg) 100%);
    padding: 24px 16px;
}

.login-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 32px 24px 28px;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.login-logo {
    font-size: 52px;
    margin-bottom: 6px;
    display: block;
    filter: drop-shadow(0 4px 12px rgba(37,99,235,.25));
}
.login-title  { font-size: 24px; font-weight: 800; margin-bottom: 4px; letter-spacing: -.5px; }
.login-subtitle { font-size: 13px; color: var(--text-muted); margin-bottom: 28px; }
.login-card .form-group { text-align: left; }
.login-card .btn {
    width: 100%;
    justify-content: center;
    margin-top: 8px;
    padding: 13px;
    font-size: 15px;
}

/* ---- NOTA PRINT ---- */
.nota {
    max-width: 320px;
    margin: 0 auto;
    font-size: 12px;
    font-family: monospace;
    padding: 16px;
}
.nota-header { text-align: center; border-bottom: 1px dashed #ccc; padding-bottom: 8px; margin-bottom: 8px; }
.nota-row    { display: flex; justify-content: space-between; margin-bottom: 4px; }
.nota-total  { border-top: 1px dashed #ccc; margin-top: 8px; padding-top: 8px; font-weight: bold; }

/* ---- PRINT ---- */
@media print {
    .navbar, .bottom-nav, .btn, .filter-bar, .modal-backdrop { display: none !important; }
    body { padding-bottom: 0; }
    .container { padding: 0; max-width: 100%; }
    table { font-size: 11px; }
}

/* ====================================================
   TABLET & DESKTOP — Breakpoint >= 640px
   ==================================================== */
@media (min-width: 640px) {
    body { padding-bottom: 0; }

    .container { padding: 24px 24px 48px; max-width: 1200px; }

    /* Hide bottom nav, show top menu */
    .bottom-nav { display: none; }
    .navbar-menu { 
        display: flex !important; 
        flex-direction: row; 
        position: static; 
        box-shadow: none; 
        border: none; 
        padding: 0; 
        width: auto;
    }
    .navbar-toggle { display: none !important; }
    .navbar { padding: 0 24px; }
    .navbar-user { gap: 12px; }
    .user-name { display: block; }
    .btn-logout { display: inline-flex; }
    .btn-logout-mobile { display: none !important; }

    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 16px;
    }

    .stat-card.full { grid-column: auto; }

    .form-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }

    /* Modal center on tablet+ */
    .modal-backdrop { align-items: center; padding: 24px; }
    .modal {
        border-radius: var(--radius-xl);
        max-width: 560px;
        max-height: 90vh;
        animation: fadeScaleIn .2s cubic-bezier(.4,0,.2,1);
    }
    .modal::before { display: none; }

    @keyframes fadeScaleIn {
        from { transform: scale(.95); opacity: 0; }
        to   { transform: scale(1);   opacity: 1; }
    }

    .modal-footer .btn { flex: 0 1 auto; min-width: 120px; }
    .modal-footer { justify-content: flex-end; }

    .table-wrap { margin: 0; }
    .table-wrap table { min-width: auto; }

    .filter-bar { flex-wrap: wrap; overflow-x: visible; }

    .btn { padding: 8px 18px; font-size: 13px; }
    .btn-lg { padding: 11px 24px; font-size: 14px; }
}

/* ====================================================
   LARGE DESKTOP — Breakpoint >= 1024px
   ==================================================== */
@media (min-width: 1024px) {
    .container { padding: 28px 32px 64px; }
}
