
/* ============================================
   Tailwind-style theme on top of Bootstrap 5
   ============================================ */

:root {
    --bs-primary: #3b82f6;
    --bs-primary-rgb: 59, 130, 246;
    --bs-primary-hover: #2563eb;
    --bs-primary-soft: #eff6ff;
    --bs-success: #22c55e;
    --bs-success-rgb: 34, 197, 94;
    --bs-danger: #ef4444;
    --bs-danger-rgb: 239, 68, 68;
    --bs-warning: #f59e0b;
    --bs-warning-rgb: 245, 158, 11;
    --bs-info: #0ea5e9;
    --bs-info-rgb: 14, 165, 233;
    --bs-secondary: #6b7280;
    --bs-secondary-rgb: 107, 114, 128;
    --bs-body-bg: #f9fafb;
    --bs-body-color: #374151;
    --bs-body-font-family: 'Inter', system-ui, -apple-system, sans-serif;
    --bs-border-radius: 0.5rem;
    --bs-border-radius-sm: 0.375rem;
    --bs-border-radius-lg: 0.75rem;
    --bs-border-color: #e5e7eb;
    --bs-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    --bs-box-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --bs-box-shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.06);
    --bs-link-color: #3b82f6;
    --bs-link-hover-color: #2563eb;
    --bs-font-sans-serif: 'Inter', system-ui, -apple-system, sans-serif;

    /* Shared auth-shell palette (login + app chrome) */
    --color-panel: #0d1b2e;
    --color-panel-2: #13243b;
    --color-panel-text: #f8fafc;
    --color-panel-muted: #a9b9d1;
    --color-panel-rule: rgba(168, 190, 222, 0.12);
    --color-panel-grid: rgba(168, 190, 222, 0.05);
    --color-paper: #f7f9fc;
    --color-ink: #141d2b;
    --color-brand: #2563eb;
    --color-focus: #3b82f6;
    --color-rule: #e1e8f0;
}

* {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--color-paper);
    color: #374151;
    font-size: 0.875rem;
}

/* ---------- Soft shadow helpers ---------- */
.soft-shadow {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.soft-shadow-lg {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

/* ---------- Cards (Tailwind-like) ---------- */
.card {
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid #f3f4f6;
    border-radius: 0.75rem 0.75rem 0 0 !important;
    padding: 1rem 1.25rem;
}

.card-header h1,
.card-header h2,
.card-header h3,
.card-header h4,
.card-header h5,
.card-header h6 {
    margin-bottom: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
}

.card-body {
    padding: 1.25rem;
}

/* ---------- Buttons (flat, Tailwind-like) ---------- */
.btn {
    font-weight: 500;
    font-size: 0.875rem;
    border-radius: 0.5rem;
    transition: all 0.15s ease-in-out;
}

.btn-primary {
    background-color: #3b82f6;
    border-color: #3b82f6;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: #2563eb;
    border-color: #2563eb;
}

.btn-success {
    background-color: #22c55e;
    border-color: #22c55e;
}

.btn-success:hover,
.btn-success:focus,
.btn-success:active {
    background-color: #16a34a;
    border-color: #16a34a;
}

.btn-danger {
    background-color: #ef4444;
    border-color: #ef4444;
}

.btn-danger:hover,
.btn-danger:focus,
.btn-danger:active {
    background-color: #dc2626;
    border-color: #dc2626;
}

.btn-warning {
    background-color: #f59e0b;
    border-color: #f59e0b;
    color: #fff;
}

.btn-warning:hover,
.btn-warning:focus {
    background-color: #d97706;
    border-color: #d97706;
    color: #fff;
}

.btn-outline-secondary {
    color: #6b7280;
    border-color: #d1d5db;
}

.btn-outline-secondary:hover {
    background-color: #f9fafb;
    color: #374151;
    border-color: #d1d5db;
}

.btn-light {
    background-color: #f9fafb;
    border-color: #f3f4f6;
    color: #4b5563;
}

.btn-light:hover {
    background-color: #f3f4f6;
    color: #1f2937;
}

.btn:disabled,
.btn.disabled {
    background-color: #93c5fd;
    border-color: #93c5fd;
    color: #fff;
    opacity: 1;
}

/* ---------- Forms (soft, Tailwind-like) ---------- */
.form-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.375rem;
}

.form-control,
.form-select {
    border-radius: 0.5rem;
    border-color: #e5e7eb;
    font-size: 0.875rem;
    color: #1f2937;
    padding: 0.5rem 0.75rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus,
.form-select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.form-control::placeholder {
    color: #9ca3af;
}

.input-group-text {
    border-radius: 0.5rem;
    background-color: #f9fafb;
    border-color: #e5e7eb;
    color: #6b7280;
    font-size: 0.875rem;
}

.form-text {
    font-size: 0.75rem;
    color: #6b7280;
}

/* ---------- Tables (clean, Tailwind-like) ---------- */
.table {
    --bs-table-bg: transparent;
    font-size: 0.875rem;
    color: #374151;
    margin-bottom: 0;
}

.table thead th {
    background-color: #f9fafb;
    color: #6b7280;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-bottom: 1px solid #e5e7eb;
    padding: 0.75rem 1rem;
    white-space: nowrap;
}

.table tbody td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: middle;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.table-hover tbody tr:hover {
    background-color: #f9fafb;
}

.table-responsive {
    border-radius: 0.5rem;
}

/* ---------- Badges (pill, colored) ---------- */
.badge {
    font-weight: 500;
    padding: 0.35em 0.75em;
    border-radius: 9999px;
    font-size: 0.75rem;
}

.badge.bg-success {
    background-color: #dcfce7 !important;
    color: #16a34a;
}

.badge.bg-danger {
    background-color: #fee2e2 !important;
    color: #dc2626;
}

.badge.bg-warning {
    background-color: #fef3c7 !important;
    color: #d97706;
}

.badge.bg-info {
    background-color: #e0f2fe !important;
    color: #0284c7;
}

.badge.bg-secondary {
    background-color: #f3f4f6 !important;
    color: #6b7280;
}

.badge.bg-primary {
    background-color: #dbeafe !important;
    color: #2563eb;
}

/* ---------- Alerts (soft, rounded) ---------- */
.alert {
    border-radius: 0.5rem;
    border-width: 1px;
    font-size: 0.875rem;
}

.alert-success {
    background-color: #f0fdf4;
    border-color: #bbf7d0;
    color: #15803d;
}

.alert-danger {
    background-color: #fef2f2;
    border-color: #fecaca;
    color: #b91c1c;
}

.alert-warning {
    background-color: #fffbeb;
    border-color: #fde68a;
    color: #b45309;
}

/* ---------- Dropdown ---------- */
.dropdown-menu {
    border-radius: 0.75rem;
    border-color: #f3f4f6;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    font-size: 0.875rem;
    padding: 0.375rem;
}

.dropdown-item {
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    color: #374151;
}

.dropdown-item:hover {
    background-color: #f9fafb;
    color: #111827;
}

.dropdown-item.text-danger:hover {
    background-color: #fef2f2;
    color: #dc2626;
}

/* ---------- Pagination (rounded) ---------- */
.pagination {
    --bs-pagination-border-radius: 0.5rem;
    --bs-pagination-color: #374151;
    --bs-pagination-bg: #fff;
    --bs-pagination-border-color: #e5e7eb;
    --bs-pagination-hover-color: #2563eb;
    --bs-pagination-hover-bg: #eff6ff;
    --bs-pagination-hover-border-color: #dbeafe;
    --bs-pagination-active-bg: #3b82f6;
    --bs-pagination-active-border-color: #3b82f6;
    --bs-pagination-focus-box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
    --bs-pagination-font-size: 0.875rem;
}

/* ---------- Modal ---------- */
.modal-content {
    border: none;
    border-radius: 0.75rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.modal-header {
    border-bottom: 1px solid #f3f4f6;
}

.modal-footer {
    border-top: 1px solid #f3f4f6;
}

/* ---------- Text utilities (Tailwind gray scale) ---------- */
.text-gray-50 { color: #f9fafb !important; }
.text-gray-100 { color: #f3f4f6 !important; }
.text-gray-200 { color: #e5e7eb !important; }
.text-gray-300 { color: #d1d5db !important; }
.text-gray-400 { color: #9ca3af !important; }
.text-gray-500 { color: #6b7280 !important; }
.text-gray-600 { color: #4b5563 !important; }
.text-gray-700 { color: #374151 !important; }
.text-gray-800 { color: #1f2937 !important; }
.text-gray-900 { color: #111827 !important; }

.bg-gray-50 { background-color: var(--color-paper) !important; }
.bg-gray-100 { background-color: #f3f4f6 !important; }
.bg-gray-200 { background-color: #e5e7eb !important; }
.bg-gray-300 { background-color: #d1d5db !important; }

.bg-blue-50 { background-color: #eff6ff !important; }
.bg-blue-100 { background-color: #dbeafe !important; }
.bg-green-50 { background-color: #f0fdf4 !important; }
.bg-green-100 { background-color: #dcfce7 !important; }
.bg-red-50 { background-color: #fef2f2 !important; }
.bg-red-100 { background-color: #fee2e2 !important; }
.bg-yellow-50 { background-color: #fffbeb !important; }
.bg-yellow-100 { background-color: #fef3c7 !important; }
.bg-purple-100 { background-color: #f3e8ff !important; }

.text-blue-500 { color: #3b82f6 !important; }
.text-blue-600 { color: #2563eb !important; }
.text-blue-800 { color: #1e40af !important; }
.text-green-500 { color: #22c55e !important; }
.text-green-600 { color: #16a34a !important; }
.text-green-700 { color: #15803d !important; }
.text-red-500 { color: #ef4444 !important; }
.text-red-600 { color: #dc2626 !important; }
.text-red-700 { color: #b91c1c !important; }
.text-red-800 { color: #991b1b !important; }
.text-yellow-500 { color: #f59e0b !important; }
.text-yellow-600 { color: #d97706 !important; }
.text-yellow-800 { color: #92400e !important; }
.text-purple-600 { color: #9333ea !important; }

.border-gray-200 { border-color: #e5e7eb !important; }
.border-gray-100 { border-color: #f3f4f6 !important; }
.border-green-200 { border-color: #bbf7d0 !important; }
.border-red-200 { border-color: #fecaca !important; }
.border-blue-200 { border-color: #bfdbfe !important; }

/* ---------- Misc helpers ---------- */
.min-h-screen { min-height: 100vh; }

.hidden { display: none !important; }

.fs-small { font-size: 0.8125rem; }

.object-cover { object-fit: cover; }

.min-w-0 { min-width: 0; }

/* ---------- Sidebar (navy panel, serasi dengan login) ---------- */
#sidebar {
    --bs-offcanvas-width: 256px;
    background-color: var(--color-panel);
    background-image:
        linear-gradient(var(--color-panel-grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--color-panel-grid) 1px, transparent 1px);
    background-size: 36px 36px;
    color: var(--color-panel-text);
}

#sidebar .offcanvas-header {
    border-bottom: 1px solid var(--color-panel-rule);
}

#sidebar .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* menu scrollable — menu panjang tidak terpotong */
#sidebar nav {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(168, 190, 222, 0.25) transparent;
}

#sidebar nav::-webkit-scrollbar {
    width: 5px;
}

#sidebar nav::-webkit-scrollbar-track {
    background: transparent;
}

#sidebar nav::-webkit-scrollbar-thumb {
    background: rgba(168, 190, 222, 0.25);
    border-radius: 999px;
}

@media (min-width: 992px) {
    #sidebar {
        width: 256px !important;
        position: static !important;
        transform: none !important;
        visibility: visible !important;
        background-color: var(--color-panel) !important;
        border-right: 1px solid var(--color-panel-rule) !important;
        height: 100vh;
        flex-shrink: 0;
    }

    #sidebar .offcanvas-header {
        display: none;
    }
}

.sidebar-brand-name {
    font-family: 'Inter Tight', 'Inter', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: -0.01em;
    color: var(--color-panel-text);
    line-height: 1.2;
}

.sidebar-brand-tag {
    display: block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.5625rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-panel-muted);
    margin-top: 2px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #c7d3e5;
    text-decoration: none;
    position: relative;
    transition: background-color 150ms cubic-bezier(0.16, 1, 0.3, 1), color 150ms cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar-link:hover {
    background-color: rgba(255, 255, 255, 0.06);
    color: var(--color-panel-text);
}

.sidebar-link.active {
    background-color: rgba(37, 99, 235, 0.18);
    color: #93c5fd;
}

.sidebar-link.active::before {
    content: '';
    position: absolute;
    left: -12px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    border-radius: 0 3px 3px 0;
    background-color: var(--color-brand);
}

.sidebar-link:focus-visible {
    outline: 2px solid var(--color-focus);
    outline-offset: 2px;
}

.sidebar-label {
    padding: 1rem 0.75rem 0.5rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(168, 190, 222, 0.55);
}

.icon-w {
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.app-header {
    height: 64px;
    background-color: var(--color-paper);
    border-bottom: 1px solid var(--color-rule);
}

.header-role {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.5625rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #8a99ab;
}

/* ---------- Gradient logo/avatar ---------- */
.gradient-blue {
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ---------- Page header (kicker + title, serasi login) ---------- */
.page-kicker {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-brand);
}

.page-title {
    font-family: 'Inter Tight', 'Inter', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -0.025em;
    line-height: 1.2;
    color: var(--color-ink);
}

.page-date {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.625rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #8a99ab;
}

/* ---------- Card header (kicker + title) ---------- */
.card-kicker {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.5625rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-brand);
}

.card-title {
    font-family: 'Inter Tight', 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.9375rem;
    letter-spacing: -0.015em;
    color: var(--color-ink);
    margin-bottom: 0;
}

.text-meta {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.5625rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #8a99ab;
}

/* ---------- Stat cards ---------- */
.stat-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.5625rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #8a99ab;
}

.stat-value {
    font-family: 'Inter Tight', 'Inter', sans-serif;
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.02em;
    color: var(--color-ink);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Hallmark · macrostructure: Bento Grid · genre: modern-minimal · designed-as-app
 * Pre-emit critique: P5 H5 E5 S4 R5 V4 */
/* ---------- Dashboard stat rail ---------- */
.stat-rail {
    background: #ffffff;
    border: 1px solid var(--color-rule);
    border-radius: 1rem;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
    overflow: hidden;
}

.stat-cell {
    padding: 1.25rem 1.375rem;
    min-width: 0;
}

@media (min-width: 992px) {
    .stat-cell + .stat-cell {
        border-left: 1px solid #eef2f7;
    }
}

.kpi-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: #94a3b8;
    white-space: nowrap;
}

.kpi-value {
    font-family: 'Inter Tight', 'Inter', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--color-ink);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.kpi-chip {
    width: 42px;
    height: 42px;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.kpi-chip i {
    font-size: 0.95rem;
}

.list-rank {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #cbd5e1;
    min-width: 1.75rem;
}

.chart-caption {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.625rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #8a99ab;
}

/* ---------- POS page ---------- */
.pos-page .product-item {
    border: 1px solid #eef2f7;
    border-radius: 12px;
    transition: transform 180ms cubic-bezier(0.16, 1, 0.3, 1), border-color 180ms ease,
        box-shadow 180ms ease;
}

.pos-page .product-item:hover {
    transform: translateY(-2px);
    border-color: rgba(37, 99, 235, 0.45);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.price-tag {
    background: linear-gradient(90deg, var(--color-brand), #3b82f6);
    color: #ffffff;
    font-family: 'Inter Tight', 'Inter', sans-serif;
    font-weight: 700;
    font-size: 0.8125rem;
    font-variant-numeric: tabular-nums;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
}

/* payment method chips */
.pay-chip {
    position: relative;
}

.pay-chip input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.pay-chip span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--color-rule);
    border-radius: 10px;
    background: #ffffff;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.625rem;
    letter-spacing: 0.08em;
    color: #64748b;
    cursor: pointer;
    white-space: nowrap;
    transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease;
}

.pay-chip span:hover {
    border-color: #b6c8e8;
}

.pay-chip input:checked + span {
    border-color: var(--color-brand);
    background: rgba(37, 99, 235, 0.08);
    color: var(--color-brand);
    font-weight: 600;
}

.pay-chip input:focus-visible + span {
    outline: 2px solid var(--color-focus);
    outline-offset: 2px;
}

/* cart qty stepper */
.qty-step {
    width: 24px;
    height: 24px;
    border: 0;
    background: transparent;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    padding: 0;
}

.qty-step:hover {
    color: var(--color-brand);
    background: rgba(37, 99, 235, 0.08);
}

.pos-total {
    font-family: 'Inter Tight', 'Inter', sans-serif;
    font-size: 1.375rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--color-brand);
    font-variant-numeric: tabular-nums;
}

.pos-num {
    font-family: 'JetBrains Mono', monospace;
    font-variant-numeric: tabular-nums;
}

/* floating toast (pojok kanan atas) */
.pos-toast {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 2000;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    max-width: min(360px, calc(100vw - 2rem));
    padding: 0.75rem 1rem;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid #fee2e2;
    border-left: 3px solid #ef4444;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.16);
    font-size: 0.8125rem;
    font-weight: 500;
    color: #1f2937;
    animation: pos-toast-in 260ms cubic-bezier(0.16, 1, 0.3, 1);
}

.pos-toast i {
    color: #ef4444;
    font-size: 1rem;
}

.pos-toast--success {
    border-color: #bbf7d0;
    border-left-color: #22c55e;
}

.pos-toast--success i {
    color: #22c55e;
}

@keyframes pos-toast-in {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

.pos-toast--out {
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 200ms ease, transform 200ms ease;
}

@media (prefers-reduced-motion: reduce) {
    .pos-toast {
        animation: none;
    }
}

/* ---------- Table action buttons ---------- */
.action-btn {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 8px;
    font-size: 0.8125rem;
    text-decoration: none;
    transition: transform 150ms cubic-bezier(0.16, 1, 0.3, 1), background-color 150ms ease,
        color 150ms ease, box-shadow 150ms ease;
}

.action-btn:hover {
    transform: translateY(-1px);
}

.action-btn:focus-visible {
    outline: 2px solid var(--color-focus);
    outline-offset: 2px;
}

.action-btn--edit {
    background: #dbeafe;
    color: #2563eb;
}

.action-btn--edit:hover {
    background: #2563eb;
    color: #ffffff;
}

.action-btn--reset {
    background: #fef3c7;
    color: #d97706;
}

.action-btn--reset:hover {
    background: #d97706;
    color: #ffffff;
}

.action-btn--delete {
    background: #fee2e2;
    color: #dc2626;
}

.action-btn--delete:hover {
    background: #dc2626;
    color: #ffffff;
}

/* ---------- Form section labels ---------- */
.form-section-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-brand);
    margin-bottom: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.form-section-label::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #eef2f7;
}

/* ---------- SKU chip ---------- */
.sku-chip {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6875rem;
    letter-spacing: 0.04em;
    color: #475569;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 0.25rem 0.5rem;
    white-space: nowrap;
    display: inline-block;
}

/* ---------- List rows ---------- */
.list-row {
    border-bottom: 1px solid #f1f5f9;
    padding: 0.625rem 0;
}

.list-row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

/* ---------- Dashboard hero band ---------- */
.hero-band {
    position: relative;
    border-radius: 1rem;
    background-color: var(--color-panel);
    background-image: linear-gradient(var(--color-panel-grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--color-panel-grid) 1px, transparent 1px);
    background-size: 28px 28px;
    border: 1px solid rgba(168, 190, 222, 0.14);
    box-shadow: 0 8px 24px rgba(13, 27, 46, 0.18);
    overflow: hidden;
    padding: 1.5rem 1.75rem;
}

.hero-band::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(440px 190px at 88% -40px, rgba(59, 130, 246, 0.28), transparent 70%);
    pointer-events: none;
}

.hero-band > * {
    position: relative;
    z-index: 1;
}

.hero-kicker {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-panel-muted);
}

.hero-title {
    font-family: 'Inter Tight', 'Inter', sans-serif;
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 700;
    letter-spacing: -0.025em;
    color: #ffffff;
    font-variant-numeric: tabular-nums;
    line-height: 1.15;
}

.hero-meta {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.625rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-panel-muted);
}

.hero-chip {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.625rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-panel-muted);
    background: rgba(168, 190, 222, 0.06);
    border: 1px solid var(--color-panel-rule);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    white-space: nowrap;
}

.hero-chip b {
    color: #ffffff;
    font-weight: 600;
    margin-left: 0.4rem;
    font-variant-numeric: tabular-nums;
}

/* ---------- Dashboard microinteractions ---------- */
.dash-page .card {
    transition: transform 180ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 180ms cubic-bezier(0.16, 1, 0.3, 1);
}

.dash-page .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.dash-page .stat-cell {
    transition: background-color 160ms ease;
}

.dash-page .stat-cell:hover {
    background-color: #f8fafc;
}

.dash-page .kpi-chip {
    transition: transform 160ms cubic-bezier(0.16, 1, 0.3, 1);
}

.dash-page .stat-cell:hover .kpi-chip {
    transform: scale(1.06);
}

.dash-page .list-row {
    border-radius: 10px;
    padding: 0.625rem 0.5rem;
    margin-inline: -0.5rem;
    transition: background-color 160ms ease;
}

.dash-page .list-row:hover {
    background-color: #f8fafc;
}

/* stock alert progress bar */
.stk-track {
    height: 4px;
    border-radius: 999px;
    background: #f1f5f9;
    overflow: hidden;
    flex: 0 0 64px;
}

.stk-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #f87171, #ef4444);
}

/* cashier chart fixed height */
.chart-box {
    height: 280px;
}

/* payment table — sticky kasir column for mobile scroll */
.pm-table th:first-child,
.pm-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    background-color: #ffffff;
}

.pm-table thead th:first-child {
    background-color: #f3f4f6;
}

.pm-table tfoot td:first-child {
    background-color: var(--color-panel);
    color: #ffffff;
}

.pm-table td:first-child {
    min-width: 7rem;
    white-space: nowrap;
}

/* entrance */
@keyframes fade-up {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

.dash-page .fade-up {
    animation: fade-up 480ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.dash-page .fade-up-1 { animation-delay: 70ms; }
.dash-page .fade-up-2 { animation-delay: 140ms; }
.dash-page .fade-up-3 { animation-delay: 210ms; }

@media (prefers-reduced-motion: reduce) {
    .dash-page .fade-up {
        animation: none;
    }

    .dash-page .card,
    .dash-page .stat-cell .kpi-chip {
        transition: none;
    }
}

/* ---------- Tailwind-look stat cards ---------- */
.stat-tw {
    border: 0;
    border-radius: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.07);
}

.stat-tw .stat-tw-label {
    font-size: 0.875rem;
    font-weight: 400;
    color: #6b7280;
}

.stat-tw .stat-tw-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.stat-tw .stat-tw-icon {
    width: 48px;
    height: 48px;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* colorful variants */
.stat-tw[class*="stat-tw--"] {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

.stat-tw[class*="stat-tw--"] .stat-tw-label {
    color: rgba(255, 255, 255, 0.78);
}

.stat-tw[class*="stat-tw--"] .stat-tw-value {
    color: #ffffff;
}

.stat-tw[class*="stat-tw--"] .stat-tw-icon {
    background: rgba(255, 255, 255, 0.22);
}

.stat-tw[class*="stat-tw--"] .stat-tw-icon i {
    color: #ffffff;
}

.stat-tw--green  { background: linear-gradient(135deg, #22c55e, #15803d); }
.stat-tw--blue   { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.stat-tw--purple { background: linear-gradient(135deg, #a855f7, #7e22ce); }
.stat-tw--amber  { background: linear-gradient(135deg, #f59e0b, #b45309); }
.stat-tw--red    { background: linear-gradient(135deg, #ef4444, #b91c1c); }

/* icon chip blends with card hue */
.stat-tw--green .stat-tw-icon { background: #dcfce7; }
.stat-tw--green .stat-tw-icon i { color: #16a34a; }
.stat-tw--blue .stat-tw-icon { background: #dbeafe; }
.stat-tw--blue .stat-tw-icon i { color: #2563eb; }
.stat-tw--purple .stat-tw-icon { background: #f3e8ff; }
.stat-tw--purple .stat-tw-icon i { color: #9333ea; }
.stat-tw--amber .stat-tw-icon { background: #fef3c7; }
.stat-tw--amber .stat-tw-icon i { color: #d97706; }
.stat-tw--red .stat-tw-icon { background: #fee2e2; }
.stat-tw--red .stat-tw-icon i { color: #dc2626; }
