/* ==========================================================================
   BengkelKu — Design System
   Single stylesheet, no build step. Sections:
   1. Tokens  2. Reset  3. Typography  4. Layout  5. Components
   6. Forms   7. Tables  8. App shell  9. Invoice print  10. Responsive
   ========================================================================== */

/* 1. Tokens ------------------------------------------------------------- */
:root {
    --brand-50:  #e6f4f1;
    --brand-100: #cdebe6;
    --brand-200: #a0d9d0;
    --brand-300: #6cc3b6;
    --brand-400: #2fa593;
    --brand-500: #00897b;
    --brand-600: #00695c;
    --brand-700: #00584d;
    --brand-800: #00463e;
    --brand-900: #00332d;

    --gray-0:   #ffffff;
    --gray-25:  #fbfcfd;
    --gray-50:  #f6f8fa;
    --gray-100: #eef1f5;
    --gray-200: #e1e6ec;
    --gray-300: #cbd3dd;
    --gray-400: #98a3b3;
    --gray-500: #6b7687;
    --gray-600: #4d5765;
    --gray-700: #3a4350;
    --gray-800: #262d38;
    --gray-900: #161c25;

    --success-50:  #ecfdf3; --success-500: #12a150; --success-700: #0a6c36;
    --warning-50:  #fff8eb; --warning-500: #e8912a; --warning-700: #a3600f;
    --danger-50:   #fef2f2; --danger-500:  #e5484d; --danger-700:  #9c1c20;
    --info-50:     #eff6ff; --info-500:    #3182f6; --info-700:    #1c4f9c;

    --bg:            #ffffff;
    --surface:       var(--gray-0);
    --surface-alt:   var(--gray-25);
    --border:        var(--gray-200);
    --border-strong: var(--gray-300);
    --text:          var(--gray-800);
    --text-muted:    var(--gray-500);
    --text-subtle:   var(--gray-400);

    --radius-sm: 6px;
    --radius:    10px;
    --radius-lg: 14px;
    --radius-full: 999px;

    --shadow-xs: 0 1px 2px rgba(16, 24, 40, .05);
    --shadow-sm: 0 1px 3px rgba(16, 24, 40, .08), 0 1px 2px rgba(16, 24, 40, .04);
    --shadow:    0 4px 12px rgba(16, 24, 40, .08);
    --shadow-lg: 0 12px 32px rgba(16, 24, 40, .12);

    --sidebar-w: 248px;
    --header-h: 60px;

    --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
            "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

    --step-0: .25rem; --step-1: .5rem;  --step-2: .75rem; --step-3: 1rem;
    --step-4: 1.5rem; --step-5: 2rem;   --step-6: 3rem;
}

/* 2. Reset -------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.55;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

img, svg, video { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--brand-600); text-decoration: none; }
a:hover { text-decoration: underline; }
hr { border: 0; border-top: 1px solid var(--border); margin: var(--step-4) 0; }
[hidden] { display: none !important; }

/* 3. Typography --------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 { margin: 0 0 var(--step-2); font-weight: 650; line-height: 1.25; color: var(--gray-900); }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.375rem; }
h3 { font-size: 1.125rem; }
h4 { font-size: 1rem; }
h5 { font-size: .9375rem; }
h6 { font-size: .875rem; }
p  { margin: 0 0 var(--step-3); }
p:last-child { margin-bottom: 0; }

.h4 { font-size: 1.125rem; font-weight: 650; }
.h5 { font-size: .9375rem; font-weight: 650; }
.h6 { font-size: .8125rem; font-weight: 650; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); }

.text-muted  { color: var(--text-muted); }
.text-subtle { color: var(--text-subtle); }
.text-danger { color: var(--danger-700); }
.text-success{ color: var(--success-700); }
.text-warning{ color: var(--warning-700); }
.text-info   { color: var(--info-700); }
.text-right  { text-align: right; }
.text-center { text-align: center; }
.text-nowrap { white-space: nowrap; }

.small  { font-size: .8125rem; }
.tiny   { font-size: .75rem; }
.strong { font-weight: 650; }
.mono   { font-family: var(--font-mono); font-size: .85em; }

code {
    font-family: var(--font-mono);
    font-size: .8125rem;
    background: var(--gray-100);
    padding: .1em .35em;
    border-radius: var(--radius-sm);
}

.mb-0 { margin-bottom: 0 !important; }
.mt-1 { margin-top: var(--step-1); } .mt-2 { margin-top: var(--step-2); } .mt-3 { margin-top: var(--step-3); }
.mb-1 { margin-bottom: var(--step-1); } .mb-2 { margin-bottom: var(--step-2); } .mb-3 { margin-bottom: var(--step-3); }
.mb-4 { margin-bottom: var(--step-4); }
.ml-auto { margin-left: auto; }
.w-100 { width: 100%; }
.flex { display: flex; } .flex-col { flex-direction: column; }
.items-center { align-items: center; } .justify-between { justify-content: space-between; }
.gap-1 { gap: var(--step-1); } .gap-2 { gap: var(--step-2); } .gap-3 { gap: var(--step-3); }
.flex-wrap { flex-wrap: wrap; }

/* 4. Layout ------------------------------------------------------------- */
.container        { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 var(--step-4); }
.container-narrow { width: 100%; max-width: 720px; margin: 0 auto; padding: var(--step-5) var(--step-4); }
.container-wide   { width: 100%; max-width: 1440px; margin: 0 auto; padding: 0 var(--step-4); }

.page { padding: var(--step-4) 0 var(--step-6); }
.page-header {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: var(--step-3); flex-wrap: wrap; margin-bottom: var(--step-4);
}
.page-title { font-size: 1.5rem; font-weight: 680; margin: 0; color: var(--gray-900); }
.page-subtitle { margin: var(--step-1) 0 0; color: var(--text-muted); font-size: .875rem; }

.grid { display: grid; gap: var(--step-3); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-auto { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

.stack > * + * { margin-top: var(--step-3); }

/* 5. Components --------------------------------------------------------- */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-xs);
    overflow: hidden;
}
.card-header {
    display: flex; align-items: center; justify-content: space-between; gap: var(--step-3);
    padding: var(--step-3) var(--step-4);
    border-bottom: 1px solid var(--border);
    background: var(--surface-alt);
}
.card-body   { padding: var(--step-4); }
.card-body-tight { padding: var(--step-3); }
.card-footer { padding: var(--step-3) var(--step-4); border-top: 1px solid var(--border); background: var(--surface-alt); }
.card-actions { display: flex; gap: var(--step-2); flex-wrap: wrap; }

/* Stat tiles */
.stat {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: var(--step-3) var(--step-4);
    display: flex; flex-direction: column; gap: var(--step-1);
    box-shadow: var(--shadow-xs);
    transition: transform .15s ease, box-shadow .15s ease;
}
.stat:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}
.stat-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); font-weight: 700; }
.stat-value { font-size: 2rem; font-weight: 800; line-height: 1.1; color: var(--gray-900); }
.stat-meta  { font-size: .75rem; color: var(--text-muted); }

/* Stat variations */
.stat-primary { border-left: 4px solid var(--brand-600); }
.stat-primary .stat-label { color: var(--brand-700); }
.stat-primary .stat-value { color: var(--brand-700); }

.stat-pro { border-left: 4px solid var(--success-600); }
.stat-pro .stat-label { color: var(--success-700); }
.stat-pro .stat-value { color: var(--success-700); }

.stat-free { border-left: 4px solid var(--info-600); }
.stat-free .stat-label { color: var(--info-700); }
.stat-free .stat-value { color: var(--info-700); }

.stat-expiring { border-left: 4px solid var(--warning-600); }
.stat-expiring .stat-label { color: var(--warning-700); }
.stat-expiring .stat-value { color: var(--warning-700); }

.stat-expired { border-left: 4px solid var(--danger-600); }
.stat-expired .stat-label { color: var(--danger-700); }
.stat-expired .stat-value { color: var(--danger-700); }

/* Small stat for tables */
.stat-sm {
    padding: var(--step-2) var(--step-3);
}
.stat-sm .stat-label { font-size: .65rem; }
.stat-sm .stat-value { font-size: 1.5rem; }
.stat-sm .stat-meta { font-size: .7rem; }

.stat-accent { width: 34px; height: 34px; border-radius: var(--radius-sm); display: grid; place-items: center; font-size: 1rem; }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
    padding: .5rem .9rem; border-radius: var(--radius-sm);
    border: 1px solid var(--border-strong); background: var(--surface);
    color: var(--gray-700); font-size: .875rem; font-weight: 600;
    cursor: pointer; text-decoration: none; white-space: nowrap;
    transition: background .12s ease, border-color .12s ease, color .12s ease;
}
.btn:hover  { background: var(--gray-50); border-color: var(--gray-400); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--brand-500); outline-offset: 2px; }
.btn[disabled], .btn.is-disabled { opacity: .55; pointer-events: none; }

.btn-primary   { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }
.btn-primary:hover { background: var(--brand-700); border-color: var(--brand-700); }
.btn-success   { background: var(--success-500); border-color: var(--success-500); color: #fff; }
.btn-success:hover { background: var(--success-700); border-color: var(--success-700); }
.btn-danger    { background: var(--danger-500); border-color: var(--danger-500); color: #fff; }
.btn-danger:hover { background: var(--danger-700); border-color: var(--danger-700); }
.btn-warning   { background: var(--warning-500); border-color: var(--warning-500); color: #fff; }
.btn-warning:hover { background: var(--warning-700); border-color: var(--warning-700); }
.btn-ghost     { background: transparent; border-color: transparent; color: var(--gray-600); }
.btn-ghost:hover { background: var(--gray-100); border-color: transparent; }
.btn-outline-danger { background: transparent; border-color: var(--danger-500); color: var(--danger-700); }
.btn-outline-danger:hover { background: var(--danger-50); }
/* Tombol WA hijau: buka wa.me + catat terkirim (tanpa API). */
.btn-wa { background: #22c55e; border-color: #16a34a; color: #fff; font-weight: 700; }
.btn-wa:hover { background: #16a34a; border-color: #15803d; color: #fff; text-decoration: none; }
.btn-wa::before { content: "✆ "; }

.btn-sm { padding: .3rem .6rem; font-size: .8125rem; }
.btn-lg { padding: .7rem 1.3rem; font-size: 1rem; }
.btn-block { width: 100%; }
.btn-icon { padding: .4rem .5rem; }

.btn-group { display: inline-flex; }
.btn-group .btn { border-radius: 0; margin-left: -1px; }
.btn-group .btn:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); margin-left: 0; }
.btn-group .btn:last-child  { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

/* Badges */
.badge {
    display: inline-flex; align-items: center; gap: .25rem;
    padding: .15rem .5rem; border-radius: var(--radius-full);
    font-size: .75rem; font-weight: 650; line-height: 1.5;
    background: var(--gray-100); color: var(--gray-600);
    white-space: nowrap;
}
.badge-lg { padding: .3rem .75rem; font-size: .8125rem; }
.badge-success { background: var(--success-50); color: var(--success-700); }
.badge-warning { background: var(--warning-50); color: var(--warning-700); }
.badge-danger  { background: var(--danger-50);  color: var(--danger-700); }
.badge-info    { background: var(--info-50);    color: var(--info-700); }
.badge-muted   { background: var(--gray-100);   color: var(--gray-600); }
.badge-brand   { background: var(--brand-50);   color: var(--brand-700); }
.badge-dot::before {
    content: ""; width: 6px; height: 6px; border-radius: 50%;
    background: currentColor; display: inline-block;
}

/* Alerts */
.alert {
    padding: .7rem .9rem; border-radius: var(--radius-sm);
    border: 1px solid transparent; font-size: .875rem; margin-bottom: var(--step-2);
}
.alert-success { background: var(--success-50); border-color: #a9e3c2; color: var(--success-700); }
.alert-danger  { background: var(--danger-50);  border-color: #f7c2c4; color: var(--danger-700); }
.alert-warning { background: var(--warning-50); border-color: #f6d59a; color: var(--warning-700); }
.alert-info    { background: var(--info-50);    border-color: var(--brand-200); color: var(--info-700); }

.flash-stack {
    position: fixed; top: var(--step-3); right: var(--step-3);
    z-index: 900; max-width: 380px; padding: 0 var(--step-3);
}
.flash-stack .alert { box-shadow: var(--shadow); background-color: var(--surface); }

/* Standalone (guest) pages: sign-in, sign-up. Referenced by layouts/minimal.php
   and by the auth templates. */
body.body-minimal { background: var(--gray-50); min-height: 100vh; }

/* ==========================================================================
   14. Halaman auth (login/daftar) — diperbesar + hijau gradasi.
   Scoped .auth-page: halaman dalam app tidak berubah.
   ========================================================================== */
.auth-page {
    min-height: 100vh;
    display: flex; align-items: flex-start; justify-content: center;
    padding: 3.5rem 1rem 0;
    background:
        radial-gradient(600px 300px at 15% 0%, rgba(255, 255, 255, .18), transparent 60%),
        radial-gradient(700px 340px at 85% 10%, rgba(255, 255, 255, .12), transparent 60%),
        linear-gradient(180deg, #00695c 0%, #00897b 45%, #e6f4f1 100%);
}
.auth-card-wrap { width: 100%; max-width: 520px; padding-bottom: 3rem; }
.auth-logo {
    width: 72px; height: 72px; margin: 0 auto .9rem; border-radius: 22px;
    display: grid; place-items: center; font-size: 2rem;
    background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .35);
    box-shadow: 0 10px 26px rgba(0, 60, 53, .3);
}
.auth-title { font-size: 2rem; font-weight: 750; color: #fff; }
.auth-sub { font-size: 1.02rem; color: #d7ece8; }
.auth-page .auth-card { border-radius: 18px; border: 0; box-shadow: 0 18px 48px rgba(0, 60, 53, .28); overflow: hidden; }
.auth-page .auth-card .card-header { padding: 1.2rem 1.6rem; background: #fff; }
.auth-page .auth-card .card-header .h6 { font-size: 1.05rem; color: var(--brand-700); }
.auth-page .auth-card .card-body { padding: 1.6rem; }
.auth-page .auth-card .card-footer { padding: 1.1rem 1.6rem; }
.auth-page .form-label { font-size: .95rem; }
.auth-page .input { font-size: 1.05rem; min-height: 50px; border-radius: 10px; }
.auth-page .input:focus { border-color: var(--brand-500); box-shadow: 0 0 0 4px var(--brand-50); outline: none; }
.auth-page .btn-lg { min-height: 52px; font-size: 1.1rem; border-radius: 12px; box-shadow: 0 8px 20px rgba(0, 105, 92, .35); }
.auth-page .card-footer .tiny { font-size: .9rem; }
@media (max-width: 480px) {
    .auth-page { padding: 2.5rem .9rem 0; }
    .auth-title { font-size: 1.7rem; }
    .auth-page .auth-card .card-body { padding: 1.25rem; }
}

/* Empty state */
.empty-state { text-align: center; padding: var(--step-6) var(--step-4); color: var(--text-muted); }
.empty-state .empty-icon { font-size: 2rem; margin-bottom: var(--step-2); opacity: .5; }
.empty-state h3 { color: var(--gray-700); }

/* Tabs */
.tabs { display: flex; gap: var(--step-1); border-bottom: 1px solid var(--border); margin-bottom: var(--step-4); overflow-x: auto; }
.tab {
    padding: .55rem .85rem; font-size: .875rem; font-weight: 600; color: var(--text-muted);
    border-bottom: 2px solid transparent; white-space: nowrap;
}
.tab:hover { color: var(--gray-800); text-decoration: none; }
.tab.active { color: var(--brand-700); border-bottom-color: var(--brand-600); }

/* Modal */
.modal-backdrop {
    position: fixed; inset: 0; background: rgba(16, 24, 40, .5);
    display: grid; place-items: center; z-index: 1000; padding: var(--step-4);
}
.modal {
    background: var(--surface); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg); width: 100%; max-width: 520px;
    max-height: 90vh; overflow: auto;
}
.modal-lg { max-width: 820px; }
.modal-header { padding: var(--step-3) var(--step-4); border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.modal-body   { padding: var(--step-4); }
.modal-footer { padding: var(--step-3) var(--step-4); border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: var(--step-2); }
body.modal-open { overflow: hidden; }

/* Health / error pages */
.check-list { display: flex; flex-direction: column; gap: var(--step-3); }
.check-row { display: flex; gap: var(--step-3); align-items: flex-start; }
.check-icon {
    width: 24px; height: 24px; flex: 0 0 24px; border-radius: 50%;
    display: grid; place-items: center; font-size: .75rem; font-weight: 700; color: #fff;
}
.check-ok   { background: var(--success-500); }
.check-fail { background: var(--danger-500); }
.check-body { display: flex; flex-direction: column; }
.check-body span { font-size: .8125rem; word-break: break-word; }

.meta-grid {
    margin-top: var(--step-4); padding-top: var(--step-3);
    border-top: 1px solid var(--border);
    display: grid; gap: var(--step-2); grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.meta-grid > div { display: flex; flex-direction: column; gap: .2rem; font-size: .8125rem; }

.steps { margin: 0; padding-left: 1.2rem; display: flex; flex-direction: column; gap: var(--step-2); }
.steps code { background: var(--gray-0); }

.error-code { font-size: 3.5rem; font-weight: 750; color: var(--gray-300); margin: 0; line-height: 1; }
.debug-box { text-align: left; margin-top: var(--step-4); }
.debug-box summary { cursor: pointer; font-size: .8125rem; color: var(--text-muted); }
.debug-box pre {
    background: var(--gray-900); color: #d6deeb; padding: var(--step-3);
    border-radius: var(--radius-sm); overflow: auto; font-size: .75rem; max-height: 320px;
}

/* Avatar */
.avatar {
    width: 36px; height: 36px; border-radius: var(--radius-full);
    background: var(--brand-100); color: var(--brand-700);
    display: grid; place-items: center; font-weight: 650; font-size: .8125rem;
    flex: 0 0 auto; text-transform: uppercase; overflow: hidden;
}
.avatar-lg { width: 48px; height: 48px; font-size: 1rem; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* 6. Forms -------------------------------------------------------------- */
.form-group { margin-bottom: var(--step-3); }
.form-label { display: block; font-size: .8125rem; font-weight: 600; color: var(--gray-700); margin-bottom: .3rem; }
.form-label .required { color: var(--danger-500); margin-left: .15rem; }
.form-hint  { font-size: .75rem; color: var(--text-muted); margin-top: .25rem; }
.form-error { font-size: .75rem; color: var(--danger-700); margin-top: .25rem; display: block; }

.input, .select, .textarea,
input[type="text"], input[type="email"], input[type="password"], input[type="number"],
input[type="tel"], input[type="date"], input[type="datetime-local"], input[type="time"],
input[type="search"], input[type="url"], select, textarea {
    width: 100%; padding: .5rem .65rem;
    border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
    background: var(--surface); font-size: .875rem; color: var(--text);
    transition: border-color .12s ease, box-shadow .12s ease;
}
.input:focus, .select:focus, .textarea:focus, input:focus, select:focus, textarea:focus {
    outline: none; border-color: var(--brand-500);
    box-shadow: 0 0 0 3px var(--brand-50); outline: none;
}
.input:disabled, .select:disabled, input:disabled, select:disabled, textarea:disabled {
    background: var(--gray-50); color: var(--text-muted); cursor: not-allowed;
}
.input.is-error, input.is-error, select.is-error, textarea.is-error { border-color: var(--danger-500); }
.textarea { min-height: 88px; resize: vertical; }
.select, select { appearance: none; padding-right: 2rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7687' d='M2.5 4.5L6 8l3.5-3.5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right .6rem center; }

input[type="checkbox"], input[type="radio"] { width: auto; accent-color: var(--brand-600); width: 16px; height: 16px; }
.checkbox-row { display: flex; align-items: center; gap: .5rem; font-size: .875rem; }
.checkbox-row label { cursor: pointer; }

.input-group { display: flex; }
.input-group .input { border-radius: 0; }
.input-group > :first-child { border-top-left-radius: var(--radius-sm); border-bottom-left-radius: var(--radius-sm); }
.input-group > :last-child  { border-top-right-radius: var(--radius-sm); border-bottom-right-radius: var(--radius-sm); }
.input-prefix {
    display: grid; place-items: center; padding: 0 .6rem; font-size: .8125rem;
    background: var(--gray-50); border: 1px solid var(--border-strong); border-right: 0;
    border-radius: var(--radius-sm) 0 0 var(--radius-sm); color: var(--text-muted);
}
.input-prefix + .input { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

.form-row { display: grid; gap: var(--step-3); grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.form-actions {
    display: flex; gap: var(--step-2); justify-content: flex-end;
    padding-top: var(--step-3); border-top: 1px solid var(--border); flex-wrap: wrap;
}
fieldset { border: 0; padding: 0; margin: 0 0 var(--step-4); }
legend { font-size: .8125rem; font-weight: 650; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); margin-bottom: var(--step-2); padding: 0; }

.radio-cards { display: grid; gap: var(--step-2); grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.radio-card {
    display: flex; align-items: flex-start; gap: .6rem; cursor: pointer;
    border: 1px solid var(--border); border-radius: var(--radius); padding: .7rem .8rem;
    background: var(--surface); transition: border-color .12s, background .12s;
}
.radio-card:hover { border-color: var(--brand-300); }
.radio-card input { margin-top: 3px; }
.radio-card:has(input:checked) { border-color: var(--brand-500); background: var(--brand-50); }
.radio-card strong { display: block; font-size: .875rem; }
.radio-card span { font-size: .75rem; color: var(--text-muted); }

/* 7. Tables ------------------------------------------------------------- */
.table-wrap { overflow-x: auto; }
/* A form sitting inside a table cell, so its button lines up with the row
   instead of forcing the cell to grow a block. */
.inline-form { display: inline; margin: 0; }
.table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.table th {
    text-align: left; font-size: .75rem; font-weight: 650; text-transform: uppercase;
    letter-spacing: .04em; color: var(--text-muted);
    padding: .6rem .75rem; background: var(--gray-50);
    border-bottom: 1px solid var(--border); white-space: nowrap;
}
.table td { padding: .65rem .75rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--gray-25); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table-compact td, .table-compact th { padding: .45rem .6rem; }
.table-fixed { table-layout: fixed; }

.pagination { display: flex; align-items: center; gap: .3rem; flex-wrap: wrap; justify-content: space-between; }
.pagination .pages { display: flex; gap: .2rem; }
.pagination a, .pagination span {
    min-width: 32px; height: 32px; padding: 0 .5rem; border-radius: var(--radius-sm);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: .8125rem; font-weight: 600; color: var(--gray-600);
    border: 1px solid var(--border); background: var(--surface);
}
.pagination a:hover { background: var(--gray-50); text-decoration: none; }
.pagination .active { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }
.pagination .disabled { opacity: .45; pointer-events: none; }

/* 8. App shell ---------------------------------------------------------- */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
    width: var(--sidebar-w); flex: 0 0 var(--sidebar-w);
    background: var(--gray-900); color: var(--gray-300);
    display: flex; flex-direction: column;
    position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar-brand {
    display: flex; align-items: center; gap: .6rem;
    padding: var(--step-3) var(--step-4); min-height: var(--header-h);
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.sidebar-brand .logo { width: 30px; height: 30px; border-radius: var(--radius-sm); object-fit: cover; background: var(--brand-600); }
.sidebar-brand-name { font-weight: 680; color: #fff; font-size: .9375rem; line-height: 1.2; }
.sidebar-brand-plan { font-size: .6875rem; color: var(--gray-500); }

.sidebar-nav { padding: var(--step-2) 0; flex: 1; }
.nav-group-label {
    padding: var(--step-3) var(--step-4) var(--step-1);
    font-size: .6875rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .06em; color: var(--gray-600);
}
.nav-link {
    display: flex; align-items: center; gap: .6rem;
    padding: .5rem var(--step-4); color: var(--gray-400);
    font-size: .875rem; font-weight: 550; border-left: 3px solid transparent;
}
.nav-link:hover { background: rgba(255, 255, 255, .05); color: #fff; text-decoration: none; }
.nav-link.active { background: rgba(0, 105, 92, .12); color: #fff; border-left-color: var(--brand-500); }
.nav-link .nav-icon { width: 18px; text-align: center; flex: 0 0 18px; opacity: .9; }
.nav-link .nav-badge {
    margin-left: auto; background: var(--danger-500); color: #fff;
    font-size: .6875rem; font-weight: 700; padding: .05rem .35rem; border-radius: var(--radius-full);
}

.sidebar-footer { padding: var(--step-3) var(--step-4); border-top: 1px solid rgba(255, 255, 255, .08); font-size: .75rem; }

.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.app-header {
    height: var(--header-h); flex: 0 0 var(--header-h);
    display: flex; align-items: center; gap: var(--step-3);
    padding: 0 var(--step-4); background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 100;
}
.app-header .page-title { font-size: 1.0625rem; }
.app-content { flex: 1; padding: var(--step-4); max-width: 100%; }
.breadcrumb { display: flex; gap: .35rem; font-size: .75rem; color: var(--text-muted); align-items: center; }

.menu-toggle { display: none; }
.sidebar-backdrop { display: none; }

.user-menu { position: relative; }
.user-menu-trigger {
    display: flex; align-items: center; gap: .5rem; background: none;
    border: 1px solid transparent; padding: .25rem .5rem; border-radius: var(--radius-sm); cursor: pointer;
}
.user-menu-trigger:hover { background: var(--gray-50); }
.user-menu-dropdown {
    position: absolute; right: 0; top: calc(100% + 6px); min-width: 210px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); box-shadow: var(--shadow-lg); z-index: 200; padding: .3rem;
}
.user-menu-dropdown a, .user-menu-dropdown button {
    display: block; width: 100%; text-align: left; padding: .45rem .6rem;
    border-radius: var(--radius-sm); font-size: .8125rem; color: var(--gray-700);
    background: none; border: 0; cursor: pointer;
}
.user-menu-dropdown a:hover, .user-menu-dropdown button:hover { background: var(--gray-50); text-decoration: none; }
.user-menu-header { padding: .5rem .6rem; border-bottom: 1px solid var(--border); margin-bottom: .3rem; }

/* Lists (customer / vehicle pickers, history) */
.list { display: flex; flex-direction: column; }
.list-item {
    display: flex; align-items: center; gap: var(--step-3);
    padding: .7rem .75rem; border-bottom: 1px solid var(--border);
}
.list-item:last-child { border-bottom: 0; }
.list-item:hover { background: var(--gray-25); }
.list-item-title { font-weight: 600; font-size: .875rem; }
.list-item-meta { font-size: .75rem; color: var(--text-muted); }
.list-item-aside { margin-left: auto; text-align: right; white-space: nowrap; }

.timeline { position: relative; padding-left: 1.4rem; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
.timeline-item { position: relative; padding-bottom: var(--step-4); }
.timeline-item::before {
    content: ""; position: absolute; left: -1.4rem; top: 5px;
    width: 10px; height: 10px; border-radius: 50%;
    background: var(--brand-500); box-shadow: 0 0 0 3px var(--brand-50);
}

/* Feature lock notice */
.feature-lock {
    border: 1px dashed var(--border-strong); border-radius: var(--radius);
    background: var(--surface-alt); padding: var(--step-5) var(--step-4); text-align: center;
}
.feature-lock .lock-icon { font-size: 1.75rem; margin-bottom: var(--step-2); }

/* 9. Invoice print ------------------------------------------------------ */
.print-toolbar {
    display: flex; gap: var(--step-2); align-items: center; flex-wrap: wrap;
    padding: var(--step-3) var(--step-4); background: var(--surface);
    border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: var(--step-4);
}

.invoice-doc {
    background: #fff; color: #000; margin: 0 auto;
    box-shadow: var(--shadow); border-radius: var(--radius); overflow: hidden;
}
.invoice-doc.A4 { width: 210mm; max-width: 210mm; }
.invoice-doc.thermal-80 { width: 80mm; }
.invoice-doc.thermal-58 { width: 58mm; }
.invoice-inner { padding: 10mm; }
.invoice-thermal .invoice-inner { padding: 3mm; }

.inv-head { display: flex; justify-content: space-between; gap: 6mm; align-items: flex-start; }
.inv-logo { max-height: 18mm; max-width: 40mm; object-fit: contain; }
.inv-shop-name { font-size: 16pt; font-weight: 700; margin: 0 0 1mm; }
.inv-shop-meta { font-size: 8.5pt; line-height: 1.4; color: #333; }
.inv-title { text-align: right; }
.inv-title h2 { font-size: 15pt; margin: 0 0 1mm; text-transform: uppercase; letter-spacing: .05em; }
.inv-title table { margin-left: auto; font-size: 8.5pt; }
.inv-title td { padding: .3mm 0; }
.inv-title td:first-child { padding-right: 3mm; color: #555; }

.inv-parties { display: flex; gap: 6mm; margin: 5mm 0; }
.inv-party { flex: 1; }
.inv-party-label {
    font-size: 7.5pt; text-transform: uppercase; letter-spacing: .06em;
    color: #666; margin-bottom: 1mm; font-weight: 700;
}
.inv-party-name { font-weight: 700; font-size: 10pt; }
.inv-party-meta { font-size: 8.5pt; line-height: 1.45; }

.inv-table { width: 100%; border-collapse: collapse; font-size: 9pt; }
.inv-table th {
    background: #f0f0f0; border-top: .3mm solid #999; border-bottom: .3mm solid #999;
    padding: 1.5mm 2mm; text-align: left; font-size: 8pt; text-transform: uppercase; letter-spacing: .04em;
}
.inv-table td { padding: 1.5mm 2mm; border-bottom: .2mm solid #ddd; vertical-align: top; }
.inv-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.inv-table .col-qty  { width: 14mm; }
.inv-table .col-price { width: 22mm; }
.inv-table .col-total { width: 26mm; }
.inv-table tr.section-row td { background: #fafafa; font-weight: 700; font-size: 8.5pt; }

.inv-summary { margin-top: 4mm; display: flex; justify-content: flex-end; }
.inv-summary table { width: 75mm; font-size: 9pt; }
.inv-summary td { padding: 1mm 2mm; }
.inv-summary td.num { text-align: right; font-variant-numeric: tabular-nums; }
.inv-summary tr.grand td { border-top: .3mm solid #999; font-size: 11pt; font-weight: 800; padding-top: 1.5mm; }
.inv-summary tr.due td   { color: #b00; font-weight: 700; }

.inv-notes { margin-top: 5mm; font-size: 8pt; }
.inv-sign { margin-top: 8mm; display: flex; justify-content: space-between; font-size: 8.5pt; }
.inv-sign div { text-align: center; width: 45mm; }
.inv-sign .sign-space { height: 14mm; }
.inv-thanks { text-align: center; margin-top: 5mm; font-size: 9pt; font-weight: 700; }

.inv-meta-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1mm 4mm; font-size: 8.5pt; }
.inv-meta-grid dt { color: #666; }
.inv-meta-grid dd { margin: 0 0 .5mm; font-weight: 600; }

/* Thermal: single-column, monospace-ish, compact */
.invoice-thermal .inv-head { flex-direction: column; gap: 2mm; text-align: center; }
.invoice-thermal .inv-logo { margin: 0 auto 1mm; max-height: 10mm; }
.invoice-thermal .inv-title { text-align: center; }
.invoice-thermal .inv-title table { margin: 0 auto; }
.invoice-thermal .inv-parties { flex-direction: column; gap: 2mm; }
.invoice-thermal .inv-table th, .invoice-thermal .inv-table td { padding: .8mm 1mm; font-size: 7.5pt; }
.invoice-thermal .inv-summary table { width: 100%; }
.invoice-thermal .inv-sign { display: none; }
.inv-rule { border: 0; border-top: .2mm dashed #999; margin: 2mm 0; }

@media print {
    @page { margin: 0; }
    html, body { background: #fff !important; }
    .sidebar, .app-header, .topbar, .bottom-nav, .print-toolbar, .flash-stack, .no-print { display: none !important; }
    .app-shell { display: block; }
    .app-content { padding: 0 !important; }
    .invoice-doc { box-shadow: none !important; border-radius: 0 !important; margin: 0 !important; }
    .invoice-doc.A4 { width: auto; }
    a[href]::after { content: ""; }
}

/* Thermal page size switching (works in Chrome print dialog) */
@media print {
    body.print-58 { @page { size: 58mm auto; margin: 2mm; } }
    body.print-80 { @page { size: 80mm auto; margin: 3mm; } }
    body.print-a4  { @page { size: A4; margin: 10mm; } }
}

/* 10. Responsive -------------------------------------------------------- */
@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
    :root { --header-h: 56px; }

    .sidebar {
        position: fixed; inset: 0 auto 0 0; z-index: 500;
        transform: translateX(-100%); transition: transform .2s ease;
    }
    .sidebar.is-open { transform: translateX(0); }
    .sidebar-backdrop {
        display: block; position: fixed; inset: 0; z-index: 400;
        background: rgba(16, 24, 40, .45);
    }
    .sidebar-backdrop[hidden] { display: none !important; }
    .menu-toggle { display: inline-flex; }

    .app-content { padding: var(--step-3); }
    .container, .container-wide { padding: 0 var(--step-3); }
    .grid-2, .grid-3, .grid-4, .grid-auto { grid-template-columns: minmax(0, 1fr); }
    .page-header { flex-direction: column; align-items: stretch; }
    .form-actions { flex-direction: column-reverse; }
    .form-actions .btn { width: 100%; }
    .invoice-doc.A4, .invoice-doc.thermal-80, .invoice-doc.thermal-58 { width: 100%; }
    .invoice-inner { padding: 6mm 4mm; }
    .inv-parties { flex-direction: column; gap: 3mm; }
    .print-toolbar { padding: var(--step-3); }
}

@media (max-width: 480px) {
    body { font-size: 14.5px; }
    .stat-value { font-size: 1.25rem; }
    .card-header, .card-body, .card-footer { padding-left: var(--step-3); padding-right: var(--step-3); }
    .flash-stack { left: var(--step-2); right: var(--step-2); max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}


/* ==========================================================================
   11. Shell mobile-first: top bar, bottom navigation, beranda
   Menimpa aturan sidebar lama di atas. Breakpoint utama: 640px / 960px.
   ========================================================================== */
:root {
    --nav-h: 60px;
    --brown: #4e342e;
    --amber: #f59e0b;
    --tile: #e0f2ef;
    --content-w: 1000px;
    --dash-w: 520px;
}

body.has-bottom-nav { padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 12px); min-height: 100vh; }

.topbar {
    position: sticky; top: 0; z-index: 100; background: #fff;
    border-top: 4px solid var(--brown);
    box-shadow: 0 1px 4px rgba(16, 24, 40, .12);
}
.topbar-inner { position: relative; padding: 0 var(--step-3); min-height: 48px; display: flex; align-items: center; }
.workspace {
    display: flex; align-items: center; gap: .55rem; background: none; border: 0;
    padding: .35rem .25rem; cursor: pointer; text-align: left; border-radius: var(--radius-sm);
}
.workspace:hover { background: var(--gray-50); }
.workspace:focus-visible { outline: 2px solid var(--brand-500); outline-offset: 2px; }
.workspace-avatar {
    width: 30px; height: 30px; border-radius: 50%; background: var(--amber); color: #fff;
    display: grid; place-items: center; font-size: .75rem; font-weight: 700; flex: 0 0 auto; object-fit: cover;
}
.workspace-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.workspace-name { font-size: .8125rem; font-weight: 700; color: var(--gray-900); max-width: 60vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workspace-sub { font-size: .625rem; color: var(--text-muted); display: inline-flex; align-items: center; gap: 2px; }
.workspace-panel {
    position: absolute; left: var(--step-3); top: calc(100% - 2px); min-width: 230px; z-index: 200;
    background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow-lg); padding: .3rem;
}
.workspace-panel a, .workspace-panel button {
    display: flex; align-items: center; gap: .55rem; width: 100%; text-align: left; padding: .55rem .6rem;
    border-radius: var(--radius-sm); font-size: .8125rem; color: var(--gray-700); background: none; border: 0; cursor: pointer;
}
.workspace-panel a:hover, .workspace-panel button:hover { background: var(--gray-50); text-decoration: none; }
.workspace-panel-head { padding: .5rem .6rem; border-bottom: 1px solid var(--border); margin-bottom: .3rem; }

.app-content { width: 100%; max-width: var(--content-w); margin: 0 auto; padding: var(--step-4) var(--step-3) var(--step-4); flex: none; }
.app-content.is-narrow, .dash { max-width: var(--dash-w); }

.bottom-nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 100; background: #fff;
    border-top: 1px solid var(--border); box-shadow: 0 -2px 8px rgba(16, 24, 40, .06);
    padding-bottom: env(safe-area-inset-bottom, 0px);
}
.bottom-nav-inner { display: flex; justify-content: space-around; max-width: 900px; margin: 0 auto; }
.bottom-nav-item {
    position: relative; flex: 1 1 0; min-width: 0; height: var(--nav-h);
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    color: var(--gray-500); font-size: .625rem; font-weight: 700; text-decoration: none;
}
.bottom-nav-item:hover { color: var(--brand-600); text-decoration: none; }
.bottom-nav-item:focus-visible { outline: 2px solid var(--brand-500); outline-offset: -3px; }
.bottom-nav-item.is-active { color: var(--brand-600); }
.bottom-nav-item.is-active::before {
    content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
    width: 34px; height: 3px; border-radius: 0 0 3px 3px; background: var(--brand-600);
}
.bottom-nav-item.is-active svg { fill: currentColor; fill-opacity: .18; }

/* --- Beranda -------------------------------------------------------------- */
.dash-hello h2 { font-size: 1.1rem; margin: 0 0 2px; }
.dash-hello p { margin: 0 0 var(--step-3); font-size: .6875rem; color: var(--text-muted); }

.sales-card {
    background: linear-gradient(135deg, #00695c 0%, #00897b 100%); color: #fff;
    border-radius: 16px; padding: var(--step-4) var(--step-3) var(--step-3); margin-bottom: var(--step-3);
    box-shadow: 0 6px 16px rgba(0, 105, 92, .22);
}
.sales-card-title { font-size: .6875rem; font-weight: 800; letter-spacing: .02em; margin: 0 0 var(--step-3); text-transform: uppercase; }
.sales-grid { display: grid; grid-template-columns: 1fr 1fr; }
.sales-col { padding: 0 var(--step-3) 0 0; color: #fff; display: block; min-width: 0; }
.sales-col + .sales-col { padding: 0 0 0 var(--step-3); border-left: 1px solid rgba(255, 255, 255, .25); }
.sales-col:hover { text-decoration: none; }
.sales-label { display: flex; justify-content: space-between; align-items: center; font-size: .625rem; font-weight: 800; text-transform: uppercase; opacity: .92; }
.sales-amount { font-size: 1.35rem; font-weight: 800; margin: 6px 0 4px; line-height: 1.15; overflow-wrap: anywhere; }
.sales-delta { font-size: .625rem; display: flex; align-items: center; gap: 3px; color: #b9f6ca; margin-bottom: var(--step-3); }
.sales-delta.is-down { color: #ffcdd2; }
.sales-count { font-size: .6875rem; font-weight: 800; }

.row-link {
    display: flex; align-items: center; gap: .6rem; padding: .7rem var(--step-3); background: #fff;
    border: 1px solid var(--border); border-radius: 14px; font-size: .8125rem; font-weight: 700;
    color: var(--gray-800); margin-bottom: var(--step-3);
}
.row-link:hover { background: var(--gray-25); text-decoration: none; }
.row-link .grow { flex: 1; }
.row-link .icon:first-child { color: var(--brand-600); }

.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--step-3); margin-bottom: var(--step-3); }
.quick-card {
    display: flex; flex-direction: column; justify-content: space-between; gap: var(--step-4); min-height: 92px;
    padding: var(--step-3); background: #fff; border: 1px solid var(--border); border-radius: 14px;
    font-size: .8125rem; font-weight: 700; color: var(--gray-900);
}
.quick-card:hover { border-color: var(--brand-300); text-decoration: none; }
.tile-icon {
    width: 36px; height: 36px; border-radius: 10px; background: var(--tile); color: var(--brand-700);
    display: grid; place-items: center; flex: 0 0 auto;
}

.panel { background: #fff; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; margin-bottom: var(--step-3); }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 0; padding: 4px; margin: 0; background: var(--gray-50); border-bottom: 1px solid var(--border); }
.seg button {
    border: 0; background: transparent; padding: .5rem; border-radius: 999px; font-size: .75rem; font-weight: 700;
    color: var(--gray-600); cursor: pointer;
}
.seg button[aria-selected="true"] { background: var(--brand-600); color: #fff; box-shadow: 0 2px 6px rgba(0, 105, 92, .35); }
.seg button:focus-visible { outline: 2px solid var(--brand-500); outline-offset: 2px; }
.menu-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--step-3) var(--step-1); padding: var(--step-3) var(--step-2); }
.menu-tile { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--gray-800); font-size: .625rem; font-weight: 700; text-align: center; padding: 2px; border-radius: 10px; }
.menu-tile:hover { text-decoration: none; background: var(--gray-25); }
.menu-tile .tile-icon { width: 38px; height: 38px; }
.menu-grid[hidden] { display: none; }

.attention { padding: var(--step-3); }
.attention h3 { font-size: .8125rem; margin: 0 0 var(--step-2); }
.attention-item { display: flex; align-items: center; gap: .6rem; padding: .5rem 0; border-top: 1px solid var(--border); font-size: .8125rem; color: var(--gray-800); }
.attention-item:first-of-type { border-top: 0; }
.attention-item:hover { text-decoration: none; color: var(--brand-700); }
.attention-count { margin-left: auto; min-width: 26px; text-align: center; font-weight: 800; font-size: .75rem; padding: .1rem .45rem; border-radius: 999px; background: var(--info-50); color: var(--info-700); }
.attention-count.warn { background: var(--warning-50); color: var(--warning-700); }
.attention-count.danger { background: var(--danger-50); color: var(--danger-700); }

/* --- Halaman daftar / form di shell baru --------------------------------- */
.page-header { margin-bottom: var(--step-3); }
.page-title { font-size: 1.15rem; }
.card { border-radius: 14px; box-shadow: none; }
.card-header { background: #fff; }
.btn-primary { background: var(--brand-600); border-color: var(--brand-600); }
.btn-primary:hover { background: var(--brand-700); border-color: var(--brand-700); }
.btn { min-height: 38px; }
.input, .select, .textarea, input[type="text"], input[type="email"], input[type="password"], input[type="number"],
input[type="tel"], input[type="date"], input[type="datetime-local"], input[type="time"], input[type="search"], select, textarea { min-height: 40px; font-size: 16px; }
@media (min-width: 640px) { .input, .select, .textarea, input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="tel"], input[type="date"], input[type="search"], select, textarea { font-size: .875rem; } }
.back-link { display: inline-flex; align-items: center; gap: 4px; font-size: .8125rem; font-weight: 600; margin-bottom: var(--step-2); }
.hub-list { display: flex; flex-direction: column; gap: var(--step-2); }
.hub-list .row-link { margin-bottom: 0; }
.hub-list .row-link small { display: block; font-weight: 500; color: var(--text-muted); font-size: .6875rem; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--step-2); margin-bottom: var(--step-3); }
.stat-row .stat { padding: var(--step-2) var(--step-3); }
.stat-row .stat-value { font-size: 1.15rem; }
.chips { display: flex; gap: var(--step-1); flex-wrap: wrap; margin-bottom: var(--step-3); }
.chip { padding: .3rem .75rem; border-radius: 999px; border: 1px solid var(--border-strong); font-size: .75rem; font-weight: 700; color: var(--gray-600); background: #fff; }
.chip:hover { text-decoration: none; border-color: var(--brand-400); }
.chip.is-active { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }
.filter-bar { display: flex; gap: var(--step-2); flex-wrap: wrap; }
.filter-bar .input { flex: 1 1 200px; max-width: 320px; }

/* Tabel → kartu di layar sempit (label diisi app.js dari <th>) */
@media (max-width: 640px) {
    .table-wrap { overflow: visible; }
    .table.is-stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
    .table.is-stack, .table.is-stack tbody { display: block; }
    .table.is-stack tr { display: block; padding: .6rem var(--step-3); border-bottom: 1px solid var(--border); }
    .table.is-stack tbody tr:last-child { border-bottom: 0; }
    .table.is-stack td { display: flex; justify-content: space-between; align-items: baseline; gap: var(--step-3); padding: .2rem 0; border: 0; text-align: right; }
    .table.is-stack td::before { content: attr(data-label); font-size: .6875rem; font-weight: 700; color: var(--text-muted); text-align: left; flex: 0 0 38%; }
    .table.is-stack td:empty, .table.is-stack td[data-label=""]::before { display: none; }
    .table.is-stack td[colspan] { display: table-cell; text-align: center; }
    .table.is-stack td[colspan]::before { display: none; }
    .table.is-stack .num, .table.is-stack .text-right { text-align: right; }
    .stat-row { grid-template-columns: 1fr 1fr 1fr; }
    .page-header { flex-direction: row; align-items: center; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); }
    .form-row { grid-template-columns: minmax(0, 1fr); }
}
@media (min-width: 960px) {
    .menu-grid { gap: var(--step-4) var(--step-2); }
    .menu-tile { font-size: .6875rem; }
}
.sidebar, .sidebar-backdrop, .menu-toggle { display: none !important; }

.dash { margin-left: auto; margin-right: auto; }
.sales-card .sales-card-title { color: #fff; }

@media (max-width: 640px) {
    .table.is-stack td::before { display: block; }
    .table.is-stack td[data-label=""]::before { display: none; }
    .table.is-stack td[data-label=""] { justify-content: flex-end; }
    .table.is-stack td .cell { min-width: 0; overflow-wrap: anywhere; }
    .table.is-stack td:not([data-label=""]) .cell { text-align: right; }
}

/* ==========================================================================
   12. Modern Automotive POS — halaman "Mulai Penjualan Baru"
   Palette: navy #0F2747 / dark #0A1B33, accent #F97316, bg #F5F7FA,
   card #FFFFFF, text #172033 / #64748B, border #E2E8F0,
   success #16A34A, danger #DC2626. Scoped .pos-* agar halaman lain utuh.
   ========================================================================== */
:root {
    --pos-navy: #0F2747;
    --pos-navy-dark: #0A1B33;
    --pos-accent: #F97316;
    --pos-accent-dark: #EA580C;
    --pos-bg: #F5F7FA;
    --pos-card: #FFFFFF;
    --pos-text: #172033;
    --pos-muted: #64748B;
    --pos-border: #E2E8F0;
    --pos-border-strong: #CBD5E1;
    --pos-success: #16A34A;
    --pos-danger: #DC2626;
    --pos-navy-soft: #E8EEF6;
    --pos-accent-soft: #FFF1E6;
    --pos-shadow-card: 0 2px 6px rgba(15, 39, 71, .12), 0 10px 28px rgba(15, 39, 71, .10);
    --pos-shadow-box: 0 1px 3px rgba(15, 39, 71, .12), 0 4px 12px rgba(15, 39, 71, .08);
}

.pos-page { background: var(--pos-bg); margin: 0 calc(var(--step-3) * -1); padding: var(--step-3) var(--step-3) var(--step-5); font-size: 16px; }
@media (min-width: 640px) { .pos-page { margin: 0 calc(var(--step-4) * -1); padding: var(--step-4) var(--step-4) var(--step-6); } }
/* Desktop wide: halaman transaksi melebar, mobile tetap penuh */
@media (min-width: 1024px) {
    body:has(.pos-page) .app-content { max-width: 1220px; }
    .pos-page { padding: 24px 24px 48px; }
}
@media (min-width: 1440px) {
    body:has(.pos-page) .app-content { max-width: 1320px; }
}

/* Header */
.pos-header { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 20px; }
.pos-back {
    display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto;
    min-height: 48px; padding: 10px 16px; border-radius: 10px;
    border: 2px solid var(--pos-border-strong); background: var(--pos-card); color: var(--pos-navy);
    font-size: .9375rem; font-weight: 700; text-decoration: none;
    box-shadow: var(--pos-shadow-box);
}
.pos-back:hover { background: var(--pos-navy-soft); text-decoration: none; border-color: var(--pos-navy); }
.pos-title { font-size: 1.65rem; font-weight: 800; color: var(--pos-navy); margin: 0; line-height: 1.2; }
@media (min-width: 1024px) { .pos-title { font-size: 1.9rem; } }
.pos-subtitle { margin: 4px 0 0; font-size: .95rem; color: var(--pos-muted); }

/* Cards */
.pos-card { background: var(--pos-card); border: 2px solid var(--pos-border-strong); border-radius: 14px; box-shadow: var(--pos-shadow-card); margin-bottom: 20px; overflow: hidden; }
.pos-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-bottom: 2px solid var(--pos-border); background: var(--pos-card); }
.pos-card-head h3 { margin: 0; font-size: 1.05rem; font-weight: 800; color: var(--pos-navy); display: flex; align-items: center; gap: 8px; }
.pos-step { font-size: .8rem; font-weight: 700; color: var(--pos-muted); background: var(--pos-bg); border: 1.5px solid var(--pos-border-strong); padding: 3px 12px; border-radius: 999px; white-space: nowrap; }
.pos-grid-2 { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); padding: 20px; }
@media (min-width: 720px) { .pos-grid-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.pos-label { display: block; font-size: .9rem; font-weight: 700; color: var(--pos-text); margin-bottom: 8px; }
.pos-label .req { color: var(--pos-danger); }
.pos-select-row { display: flex; gap: 8px; }
.pos-select-row .select, .pos-select-row .input { flex: 1; min-width: 0; }
.pos-card .select, .pos-card .input, .pos-card .textarea { border: 2px solid var(--pos-border-strong); border-radius: 10px; background: #fff; min-height: 48px; font-size: 1rem; box-shadow: 0 1px 2px rgba(15, 39, 71, .06); }
.pos-card .select:focus, .pos-card .input:focus, .pos-card .textarea:focus { border-color: var(--pos-navy); box-shadow: 0 0 0 3px var(--pos-navy-soft), 0 1px 3px rgba(15, 39, 71, .12); outline: none; }
.pos-hint { font-size: .875rem; color: var(--pos-muted); margin: 8px 0 0; }
.pos-btn-secondary {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    width: 100%; min-height: 48px; margin-top: 10px; border-radius: 10px;
    border: 2px solid var(--pos-navy); background: #fff; color: var(--pos-navy);
    font-size: .95rem; font-weight: 700; cursor: pointer;
    box-shadow: var(--pos-shadow-box);
}
.pos-btn-secondary:hover { background: var(--pos-navy-soft); }
.pos-btn-accent {
    min-height: 48px; border-radius: 10px; border: 2px solid var(--pos-accent-dark);
    background: var(--pos-accent); color: #fff; font-weight: 800; font-size: 1rem;
    padding: 10px 22px; cursor: pointer; white-space: nowrap;
    box-shadow: 0 2px 6px rgba(249, 115, 22, .35);
}
.pos-btn-accent:hover { background: var(--pos-accent-dark); border-color: var(--pos-accent-dark); }

/* Customer summary */
.pos-cust-card { display: flex; gap: 12px; align-items: flex-start; margin-top: 12px; padding: 14px; border: 2px solid var(--pos-border-strong); border-radius: 12px; background: var(--pos-bg); box-shadow: var(--pos-shadow-box); }
.pos-cust-avatar { width: 48px; height: 48px; flex: 0 0 48px; border-radius: 50%; background: var(--pos-navy); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 1rem; }
.pos-cust-name { font-weight: 800; font-size: 1rem; color: var(--pos-text); }
.pos-cust-phone { font-size: .875rem; color: var(--pos-muted); font-family: var(--font-mono); }
.pos-cust-veh { font-size: .875rem; color: var(--pos-text); margin-top: 6px; display: flex; gap: 6px; align-items: flex-start; }
.pos-cust-list { margin: 4px 0 0; padding-left: 1.1rem; font-size: .875rem; color: var(--pos-muted); }
.pos-veh-card { display: flex; gap: 8px; align-items: center; margin-top: 12px; padding: 12px 14px; border: 2px dashed var(--pos-border-strong); border-radius: 12px; background: var(--pos-bg); font-size: .95rem; color: var(--pos-text); box-shadow: var(--pos-shadow-box); }
.pos-veh-card strong { color: var(--pos-navy); }

/* Search */
.pos-searchbar { display: flex; gap: 10px; flex-wrap: wrap; }
.pos-search-input { flex: 1 1 240px; display: flex; align-items: center; gap: 10px; border: 2px solid var(--pos-border-strong); border-radius: 12px; background: #fff; padding: 0 14px; min-height: 54px; color: var(--pos-muted); box-shadow: var(--pos-shadow-box); }
.pos-search-input:focus-within { border-color: var(--pos-navy); box-shadow: 0 0 0 3px var(--pos-navy-soft), var(--pos-shadow-box); }
.pos-search-input input { border: 0; outline: 0; flex: 1; min-width: 0; font-size: 1.05rem; background: transparent; min-height: 50px; color: var(--pos-text); }
.pos-search-input input::placeholder { color: var(--pos-muted); }
.pos-search-results { margin-top: 10px; border: 2px solid var(--pos-border-strong); border-radius: 12px; overflow: hidden; background: #fff; box-shadow: var(--pos-shadow-card); }
.pos-result { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 12px 14px; border: 0; border-bottom: 2px solid var(--pos-border); background: #fff; cursor: pointer; min-height: 60px; }
.pos-result:last-child { border-bottom: 0; }
.pos-result:hover { background: var(--pos-bg); }
.pos-result-name { font-weight: 700; font-size: 1rem; color: var(--pos-text); }
.pos-result-meta { font-size: .875rem; color: var(--pos-muted); font-family: var(--font-mono); }
.pos-result-price { margin-left: auto; font-weight: 800; font-size: 1rem; color: var(--pos-navy); white-space: nowrap; }
.pos-result-stock { font-size: .8rem; font-weight: 700; }
.pos-result-stock.is-out { color: var(--pos-danger); }

/* Empty state */
.pos-empty { text-align: center; padding: 36px 20px; border: 2px dashed var(--pos-border-strong); border-radius: 14px; background: var(--pos-bg); margin-top: 12px; }
.pos-empty .pos-empty-icon { color: var(--pos-muted); display: flex; justify-content: center; margin-bottom: 8px; }
.pos-empty strong { display: block; color: var(--pos-text); font-size: 1.05rem; }
.pos-empty p { margin: 4px 0 14px; font-size: .95rem; color: var(--pos-muted); }

/* Item rows */
.pos-list-head { display: none; }
@media (min-width: 860px) {
    .pos-list-head { display: grid; grid-template-columns: minmax(0, 1fr) 150px 170px 150px 130px 44px; gap: 10px; padding: 10px 6px; font-size: .8rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--pos-muted); }
    .pos-list-head .num { text-align: right; }
}
@media (min-width: 1024px) {
    .pos-list-head { grid-template-columns: minmax(0, 1fr) 170px 200px 170px 150px 48px; gap: 14px; }
}
.pos-item { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); padding: 14px; border: 2px solid var(--pos-border-strong); border-radius: 12px; background: #fff; margin-top: 10px; box-shadow: var(--pos-shadow-box); }
@media (min-width: 860px) {
    .pos-item { grid-template-columns: minmax(0, 1fr) 150px 170px 150px 130px 44px; align-items: center; padding: 12px 6px; margin-top: 0; box-shadow: none; border: 0; border-bottom: 2px solid var(--pos-border); border-radius: 0; }
    .pos-item:last-child { border-bottom: 0; }
}
@media (min-width: 1024px) {
    .pos-item { grid-template-columns: minmax(0, 1fr) 170px 200px 170px 150px 48px; gap: 14px; padding: 14px 6px; }
}
.pos-item-name { width: 100%; font-size: 1rem !important; }
.pos-item-meta { font-size: .8rem; color: var(--pos-muted); font-family: var(--font-mono); margin-top: 2px; min-height: 1em; }
.pos-item-qty { display: flex; align-items: stretch; gap: 0; }
.pos-item-qty button { width: 48px; min-height: 48px; border: 2px solid var(--pos-border-strong); background: var(--pos-bg); color: var(--pos-navy); font-size: 1.25rem; font-weight: 800; cursor: pointer; }
.pos-item-qty button:first-child { border-radius: 10px 0 0 10px; }
.pos-item-qty button:last-child { border-radius: 0 10px 10px 0; }
.pos-item-qty button:hover { background: var(--pos-navy-soft); }
.pos-item-qty input { width: 100%; min-width: 0; text-align: center; border-top: 2px solid var(--pos-border-strong); border-bottom: 2px solid var(--pos-border-strong); border-left: 0; border-right: 0; min-height: 48px; font-weight: 700; font-size: 1rem; }
.pos-item-qty input:focus { outline: none; border-color: var(--pos-navy); }
.pos-item select[data-item-type] { font-size: .8rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; border-radius: 999px; text-align: center; min-height: 44px; cursor: pointer; border-width: 2px; }
.pos-item select[data-item-type].is-sparepart { background: var(--pos-navy-soft); border-color: var(--pos-navy); color: var(--pos-navy); }
.pos-item select[data-item-type].is-service { background: var(--pos-accent-soft); border-color: var(--pos-accent); color: var(--pos-accent-dark); }
.pos-item [data-item-price] { font-size: 1rem !important; }
.pos-item-total { font-weight: 800; color: var(--pos-navy); font-variant-numeric: tabular-nums; font-size: 1.05rem; }
@media (max-width: 859px) {
    .pos-item-total { font-size: 1.15rem; }
    .pos-item-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
}
.pos-remove { width: 48px; height: 48px; display: inline-flex; align-items: center; justify-content: center; border: 2px solid transparent; background: transparent; color: var(--pos-muted); border-radius: 10px; cursor: pointer; }
.pos-remove:hover { background: #FEF2F2; color: var(--pos-danger); border-color: #FECACA; }
.pos-mobile-label { font-size: .8rem; font-weight: 700; color: var(--pos-muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; }
@media (min-width: 860px) { .pos-mobile-label { display: none; } }

/* Summary */
.pos-summary { border-top: 2px solid var(--pos-border); margin-top: 14px; padding: 14px 20px 6px; font-size: 1rem; }
.pos-sum-row { display: flex; justify-content: space-between; align-items: baseline; padding: 5px 0; font-size: 1rem; color: var(--pos-muted); }
.pos-sum-row .mono { color: var(--pos-text); font-weight: 600; }
.pos-total { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 10px; padding: 16px 20px; border-top: 3px solid var(--pos-navy); background: var(--pos-navy-soft); border-radius: 0 0 12px 12px; }
.pos-total-label { font-size: .875rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--pos-navy); }
.pos-total-value { font-size: 1.9rem; font-weight: 800; color: var(--pos-navy); font-variant-numeric: tabular-nums; }
@media (min-width: 1024px) { .pos-total-value { font-size: 2.2rem; } }
.pos-count-note { font-size: .875rem; color: var(--pos-muted); }

/* Actions */
.pos-actions { display: flex; gap: 10px; flex-wrap: wrap; padding: 16px 20px; background: var(--pos-card); }
.pos-pay {
    flex: 1 1 240px; min-height: 58px; border-radius: 12px; font-size: 1.15rem; font-weight: 800;
    background: var(--pos-accent); border: 2px solid var(--pos-accent-dark); color: #fff; cursor: pointer;
    box-shadow: 0 3px 10px rgba(249, 115, 22, .4);
}
.pos-pay:hover { background: var(--pos-accent-dark); border-color: var(--pos-accent-dark); }
.pos-cancel { min-height: 58px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; padding: 10px 22px; border: 2px solid var(--pos-border-strong); color: var(--pos-muted); font-weight: 700; font-size: 1rem; text-decoration: none; box-shadow: var(--pos-shadow-box); }
.pos-cancel:hover { background: var(--pos-bg); text-decoration: none; }
@media (max-width: 639px) {
    .pos-actions { flex-direction: column; }
    .pos-pay, .pos-cancel { width: 100%; }
    .pos-searchbar .pos-btn-accent { width: 100%; }
}

/* Bottom nav — modern, active navy soft */
.bottom-nav { background: #fff; border-top: 2px solid var(--pos-border-strong); box-shadow: 0 -4px 16px rgba(15, 39, 71, .12); }
.bottom-nav-inner { gap: 2px; padding: 4px 6px; }
.bottom-nav-item { color: var(--pos-muted); font-size: .625rem; font-weight: 700; border-radius: 12px; margin: 2px; height: 58px; }
.bottom-nav-item svg { width: 22px; height: 22px; }
.bottom-nav-item:hover { color: var(--pos-navy); text-decoration: none; background: var(--pos-bg); }
.bottom-nav-item.is-active { color: var(--pos-navy); background: var(--pos-navy-soft); }
.bottom-nav-item.is-active::before { background: var(--pos-accent); width: 28px; }

/* ==========================================================================
   13. Tampilan admin: sidebar putih + topbar + kartu hijau
   Menimpa shell mobile-first (bagian 11). Hijau mengikuti referensi desain.
   ========================================================================== */
:root {
    --brand-50:  #e8f5e9;
    --brand-100: #c8e6c9;
    --brand-200: #a5d6a7;
    --brand-300: #81c784;
    --brand-400: #66bb6a;
    --brand-500: #4caf50;
    --brand-600: #43a047;
    --brand-700: #388e3c;
    --brand-800: #2e7d32;
    --brand-900: #1b5e20;
    --tile: #e8f5e9;
    --side-w: 260px;
    --page-bg: #f0f2f5;
}

body.has-sidebar { background: var(--page-bg); padding-bottom: 0; }
.app-wrap { display: flex; min-height: 100vh; }

/* Sidebar */
.side {
    width: var(--side-w); flex: 0 0 var(--side-w); background: #fff;
    border-right: 1px solid var(--border); display: flex; flex-direction: column;
    position: sticky; top: 0; height: 100vh; overflow-y: auto; z-index: 500;
    transition: margin-left .2s ease;
}
.side-user { display: flex; align-items: center; gap: .75rem; padding: 1.25rem 1.25rem 1rem; border-bottom: 1px solid var(--border); }
.side-avatar {
    width: 44px; height: 44px; border-radius: 50%; background: var(--brand-500); color: #fff;
    display: grid; place-items: center; font-weight: 700; flex: 0 0 auto; object-fit: cover;
}
.side-user-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.side-user-name { font-weight: 700; color: var(--gray-900); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-user-mail { font-size: .8125rem; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-label { padding: 1rem 1.25rem .5rem; font-size: .75rem; font-weight: 700; color: var(--gray-600); text-transform: uppercase; }
.side-nav { flex: 1; padding-bottom: 1rem; }
.side-nav form { margin: 0; }
.side-link {
    display: flex; align-items: center; gap: .75rem; width: 100%; padding: .75rem 1.25rem;
    color: var(--gray-700); font-size: .9375rem; background: none; border: 0; border-left: 4px solid transparent;
    cursor: pointer; text-align: left; font-family: inherit;
}
.side-link:hover { background: var(--gray-50); text-decoration: none; color: var(--gray-900); }
.side-link:focus-visible { outline: 2px solid var(--brand-500); outline-offset: -2px; }
.side-link.is-active { background: var(--brand-50); color: var(--brand-800); font-weight: 600; border-left-color: var(--brand-500); }
.side-link.is-logout { color: var(--danger-500); }
.side-link.is-logout:hover { background: var(--danger-50); color: var(--danger-700); }
.side-link .icon { flex: 0 0 18px; }
.side-backdrop { display: none; }

body.side-collapsed .side { margin-left: calc(var(--side-w) * -1); }

/* Kolom utama + topbar */
.app-main-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
    position: sticky; top: 0; z-index: 100; background: #fff; border-top: 0;
    border-bottom: 1px solid var(--border); box-shadow: none;
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding: .9rem 1.5rem;
}
.hamburger {
    width: 42px; height: 38px; border: 0; border-radius: 8px; background: var(--brand-500); color: #fff;
    display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.hamburger:hover { background: var(--brand-600); }
.hamburger:focus-visible { outline: 2px solid var(--brand-800); outline-offset: 2px; }
.topbar-hello { font-size: .9375rem; color: var(--gray-600); text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-hello strong { color: var(--gray-800); }
.crumbs { display: flex; align-items: center; gap: .5rem; padding: .85rem 1.5rem; background: var(--gray-50); border-bottom: 1px solid var(--border); font-size: 1rem; color: var(--gray-600); }
.crumbs a { color: var(--info-500); }
.crumbs .sep { color: var(--gray-400); }

.app-content { max-width: none; margin: 0; padding: 1.5rem; }
.app-content.is-narrow, .dash { max-width: none; }

/* Dashboard */
.dash-hello h2 { font-size: 2rem; margin: 0 0 .25rem; color: var(--gray-900); }
.dash-hello p { margin: 0 0 1.5rem; font-size: .9375rem; color: var(--gray-600); }
.dash-hello p strong { color: var(--gray-800); }
.dash-section { font-size: 1rem; font-weight: 700; color: var(--gray-800); margin: 1.5rem 0 .75rem; }

.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.25rem; margin-bottom: .5rem; }
.stat-card {
    display: block; background: #fff; border-radius: 16px; padding: 1.1rem 1.25rem;
    box-shadow: 0 2px 8px rgba(16, 24, 40, .06); color: var(--gray-800);
}
a.stat-card:hover { text-decoration: none; box-shadow: 0 4px 14px rgba(16, 24, 40, .1); }
.stat-card .sales-label { color: var(--gray-600); font-size: .8125rem; opacity: 1; }
.stat-card .sales-amount { font-size: 1.75rem; color: var(--gray-900); }
.stat-card .sales-delta { color: var(--success-700); font-size: .8125rem; margin-bottom: .5rem; }
.stat-card .sales-delta.is-down { color: var(--danger-500); }
.stat-card .sales-count { font-size: .875rem; color: var(--gray-600); font-weight: 600; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.25rem; }
.green-card {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem;
    min-height: 190px; padding: 1.25rem; text-align: center; color: #fff; border-radius: 16px;
    background: linear-gradient(160deg, #4caf50 0%, #43a047 100%);
    box-shadow: 0 4px 12px rgba(67, 160, 71, .25);
    transition: transform .15s ease, box-shadow .15s ease;
}
.green-card:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 8px 20px rgba(67, 160, 71, .32); }
.green-card:focus-visible { outline: 3px solid var(--brand-800); outline-offset: 2px; }
.green-card-title { font-weight: 700; font-size: 1rem; text-transform: uppercase; }
.green-card-sub { font-size: .875rem; opacity: .95; }
.green-card .icon { width: 44px; height: 44px; stroke-width: 1.6; }

.attention { border-radius: 16px; border: 0; box-shadow: 0 2px 8px rgba(16, 24, 40, .06); }

/* Kartu & tombol di halaman lain ikut tampilan admin */
.card, .panel, .row-link, .quick-card { border-color: transparent; box-shadow: 0 2px 8px rgba(16, 24, 40, .06); }
.page-title { font-size: 1.5rem; }

/* Layar kecil: sidebar jadi laci */
@media (max-width: 960px) {
    .side { position: fixed; inset: 0 auto 0 0; margin-left: 0 !important; transform: translateX(-100%); transition: transform .2s ease; box-shadow: var(--shadow-lg); }
    .side.is-open { transform: translateX(0); }
    .side-backdrop { display: block; position: fixed; inset: 0; z-index: 400; background: rgba(16, 24, 40, .45); }
    .side-backdrop[hidden] { display: none !important; }
    .topbar, .crumbs { padding-left: 1rem; padding-right: 1rem; }
    .app-content { padding: 1rem; }
    .dash-hello h2 { font-size: 1.5rem; }
    .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
    .green-card { min-height: 150px; padding: 1rem .75rem; }
    .green-card-title { font-size: .8125rem; }
}
@media (max-width: 380px) { .card-grid { grid-template-columns: minmax(0, 1fr); } }

/* --- Perbaikan setelah review --------------------------------------------- */
/* Nama bengkel aktif (penting untuk akun dengan banyak bengkel) */
.side-biz { display: flex; align-items: center; gap: .5rem; margin: .75rem 1.25rem 0; padding: .5rem .65rem; background: var(--gray-50); border-radius: 8px; font-size: .8125rem; color: var(--gray-700); }
.side-biz .icon { flex: 0 0 16px; color: var(--brand-600); }
.side-biz-name { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-biz-role { font-size: .6875rem; color: var(--text-muted); }

/* Cetak: sembunyikan sidebar, topbar, breadcrumb */
@media print {
    .side, .side-backdrop, .crumbs, .hamburger { display: none !important; }
    .app-wrap, .app-main-col { display: block !important; }
    body.has-sidebar { background: #fff !important; }
}

/* Halaman transaksi (POS): tetap di tengah dan margin negatif sesuai padding baru */
body:has(.pos-page) .app-content { margin: 0 auto; }
@media (min-width: 640px) and (max-width: 960px) {
    .pos-page { margin: 0 calc(var(--step-3) * -1); padding: var(--step-3) var(--step-3) var(--step-5); }
}

/* Sidebar tertutup di HP tidak boleh bisa difokus lewat keyboard */
@media (max-width: 960px) {
    .side { visibility: hidden; transition: transform .2s ease, visibility 0s linear .2s; }
    .side.is-open { visibility: visible; transition: transform .2s ease; }
}

/* ==========================================================================
   13. Super Admin platform — tampilan diperbesar + tema navy/orange
   Scoped .platform-admin: hanya memengaruhi /admin. Fungsi dan halaman
   bengkel tidak berubah.
   ========================================================================== */
.platform-admin {
    font-size: 16.5px;
    --admin-navy: #0F2747;
    --admin-navy-dark: #0A1B33;
    --admin-accent: #F97316;
    --admin-accent-dark: #EA580C;
    --admin-bg: #F1F5F9;
    --admin-card: #FFFFFF;
    --admin-text: #172033;
    --admin-muted: #64748B;
    --admin-border: #E2E8F0;
    background: linear-gradient(180deg, #0F2747 0%, #0F2747 220px, #F1F5F9 220px, #F1F5F9 100%);
    min-height: 100vh;
    color: var(--admin-text);
}
.platform-admin .app-content { padding: 2rem 1.75rem 3rem; background: transparent; }
.platform-admin .topbar-inner { min-height: 60px; }
.platform-admin .workspace-name { font-size: 1rem; }
.platform-admin .workspace-sub { font-size: .75rem; }
.platform-admin .topbar { background: transparent; border-bottom: 0; box-shadow: none; }
.platform-admin .topbar-inner { min-height: 64px; }
.platform-admin .workspace { background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .22); padding: .35rem .8rem .35rem .4rem; }
.platform-admin .workspace:hover { background: rgba(255, 255, 255, .18); }
.platform-admin .workspace-name { color: #fff; }
.platform-admin .workspace-sub { color: #CBD5E1; }
.platform-admin .topbar .tiny.text-muted { color: #CBD5E1 !important; }
.platform-admin .topbar .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .35); }
.platform-admin .topbar .btn-ghost:hover { background: rgba(255, 255, 255, .14); border-color: #fff; color: #fff; }
.platform-admin .page-header { margin-bottom: 1.75rem; }
.platform-admin .page-title { font-size: 2rem; color: #fff; }
.platform-admin .page-subtitle { font-size: 1rem; color: #CBD5E1; }
.platform-admin .grid { gap: 1.25rem; }
/* Kartu statistik: 4 warna berbeda */
.platform-admin .stat { padding: 1.35rem 1.5rem; border-radius: 16px; border: 0; color: #fff; box-shadow: 0 10px 24px rgba(15, 39, 71, .25); position: relative; overflow: hidden; }
.platform-admin .stat::after { content: ""; position: absolute; right: -34px; top: -34px; width: 120px; height: 120px; border-radius: 50%; background: rgba(255, 255, 255, .14); }
.platform-admin .grid-4 .stat:nth-child(1) { background: linear-gradient(135deg, #0F2747, #1E4A8A); }
.platform-admin .grid-4 .stat:nth-child(2) { background: linear-gradient(135deg, #F97316, #EA580C); }
.platform-admin .grid-4 .stat:nth-child(3) { background: linear-gradient(135deg, #B45309, #F59E0B); }
.platform-admin .grid-4 .stat:nth-child(4) { background: linear-gradient(135deg, #B91C1C, #EF4444); }
.platform-admin .grid-3 .stat:nth-child(1) { background: linear-gradient(135deg, #0F2747, #1E4A8A); }
.platform-admin .grid-3 .stat:nth-child(2) { background: linear-gradient(135deg, #0369A1, #0EA5E9); }
.platform-admin .grid-3 .stat:nth-child(3) { background: linear-gradient(135deg, #065F46, #10B981); }
.platform-admin .stat-label { font-size: .85rem; color: rgba(255, 255, 255, .85); }
.platform-admin .stat-value { font-size: 2.1rem; color: #fff; }
.platform-admin .stat-meta { font-size: .95rem; color: rgba(255, 255, 255, .82); }
.platform-admin .card { border-radius: 16px; border: 1px solid var(--admin-border); box-shadow: 0 6px 20px rgba(15, 39, 71, .1); }
.platform-admin .card-header { padding: 1.1rem 1.5rem; background: linear-gradient(180deg, #FFFFFF, #F8FAFC); border-bottom: 2px solid var(--admin-border); }
.platform-admin .card-header .h6 { font-size: 1rem; color: var(--admin-navy); }
.platform-admin .card-header .tiny.text-muted { color: var(--admin-muted) !important; }
.platform-admin .card-body { padding: 1.5rem; }
.platform-admin .card-footer { padding: 1.1rem 1.5rem; background: #F8FAFC; }
.platform-admin .table { font-size: 1rem; }
.platform-admin .table th { font-size: .85rem; padding: .85rem 1rem; background: var(--admin-navy); color: #fff; border-bottom: 0; }
.platform-admin .table th:first-child { border-radius: 0; }
.platform-admin .table tbody tr:hover { background: #FFF7ED; }
.platform-admin .table td { padding: 1rem; border-bottom: 1px solid var(--admin-border); }
.platform-admin .table a { color: var(--admin-navy); font-weight: 600; }
.platform-admin .btn-primary { background: var(--admin-accent); border-color: var(--admin-accent-dark); box-shadow: 0 4px 12px rgba(249, 115, 22, .35); }
.platform-admin .btn-primary:hover { background: var(--admin-accent-dark); border-color: var(--admin-accent-dark); }
.platform-admin .back-link { color: #fff; font-weight: 600; }
.platform-admin .back-link:hover { color: #FDBA74; }
.platform-admin .input:focus, .platform-admin .select:focus, .platform-admin .textarea:focus,
.platform-admin input:focus, .platform-admin select:focus, .platform-admin textarea:focus {
    border-color: var(--admin-accent); box-shadow: 0 0 0 3px #FFEDD5; outline: none;
}
.platform-admin .list-item:hover { background: #FFF7ED; }
.platform-admin .alert-info { background: #EFF6FF; border-color: #BFDBFE; color: #0F2747; }
.platform-admin .pagination .active { background: var(--admin-accent); border-color: var(--admin-accent-dark); }
.platform-admin input[type="checkbox"], .platform-admin input[type="radio"] { accent-color: var(--admin-accent); }
.platform-admin .badge { font-size: .85rem; padding: .25rem .7rem; }
.platform-admin .btn { font-size: 1rem; padding: .65rem 1.15rem; min-height: 44px; }
.platform-admin .btn-sm { font-size: .925rem; padding: .45rem .85rem; min-height: 38px; }
.platform-admin .input, .platform-admin .select, .platform-admin .textarea,
.platform-admin input[type="text"], .platform-admin input[type="search"],
.platform-admin input[type="date"], .platform-admin select, .platform-admin textarea {
    font-size: 1rem; min-height: 46px;
}
.platform-admin .form-label { font-size: .95rem; }
.platform-admin .form-hint { font-size: .875rem; }
.platform-admin .list-item { padding: 1rem 1.1rem; }
.platform-admin .list-item-title { font-size: 1.02rem; }
.platform-admin .list-item-meta { font-size: .875rem; }
.platform-admin .checkbox-row { font-size: 1rem; }
.platform-admin input[type="checkbox"], .platform-admin input[type="radio"] { width: 19px; height: 19px; }
.platform-admin .empty-state h3 { font-size: 1.1rem; }
.platform-admin .pagination a, .platform-admin .pagination span { min-width: 38px; height: 38px; font-size: .95rem; }
@media (min-width: 1400px) {
    .platform-admin .app-content { max-width: 1400px; }
}
@media (max-width: 640px) {
    .platform-admin { font-size: 16px; }
    .platform-admin .app-content { padding: 1.25rem 1rem 2.5rem; }
    .platform-admin .page-title { font-size: 1.6rem; }
    .platform-admin .stat-value { font-size: 1.7rem; }
}
