/* ==========================================================================
   MonzaPOS Enterprise v4.0 — Modern Boutique SaaS & High-Speed POS Design
   Refined Palette, Crisp Hierarchy, Compact Notifications & Smooth Modals
   ========================================================================== */
:root {
    --bg-canvas: #f8fafc;
    --bg-surface: #ffffff;
    --bg-subtle: #f1f5f9;
    --sidebar-bg: #090d16;
    --sidebar-hover: rgba(255, 255, 255, 0.06);
    --sidebar-border: rgba(255, 255, 255, 0.08);
    --brand: #0d9488;
    --brand-dark: #0f766e;
    --brand-soft: #f0fdfa;
    --brand-border: #99f6e4;
    --indigo: #4f46e5;
    --indigo-soft: #eef2ff;
    --amber: #d97706;
    --amber-soft: #fffbeb;
    --rose: #e11d48;
    --rose-soft: #fff1f2;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --border-light: #e2e8f0;
    --border-hover: #cbd5e1;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --shadow-card: 0 1px 2px rgba(15, 23, 42, 0.04), 0 6px 20px -4px rgba(15, 23, 42, 0.05);
    --shadow-float: 0 12px 32px -4px rgba(15, 23, 42, 0.14);
}

*, *::before, *::after { box-sizing: border-box; }
html, body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-primary);
    background: var(--bg-canvas);
    font-size: 13.5px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--brand-dark); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--brand); }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 12px; background: var(--bg-subtle); padding: 2px 6px; border-radius: 5px; color: #334155; }

/* ==================== LOGIN & INSTALLER ==================== */
.login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 15% 20%, #134e4a 0%, #090d16 60%, #020617 100%);
    padding: 24px;
}
.login-shell {
    width: 100%;
    max-width: 1020px;
    display: grid;
    grid-template-columns: 1.12fr 0.88fr;
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(16px);
}
.login-brand-pane {
    padding: 42px;
    color: #f8fafc;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.brand-badge { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.brand-logo-lg { width: 64px; height: 64px; border-radius: 16px; box-shadow: 0 10px 25px rgba(0,0,0,0.3); }
.brand-badge h1 { margin: 6px 0 4px; font-size: 22px; font-weight: 800; letter-spacing: -0.02em; color: #fff; }
.brand-badge p { margin: 0; color: #94a3b8; font-size: 13px; }
.pill-gold {
    display: inline-flex; align-items: center; gap: 5px;
    background: rgba(245, 158, 11, 0.16); border: 1px solid rgba(245, 158, 11, 0.4);
    color: #fcd34d; padding: 3px 10px; border-radius: 99px; font-size: 10.5px; font-weight: 700; letter-spacing: 0.5px;
}
.login-card .pill-gold { background: var(--amber-soft); color: #92400e; border-color: #fde68a; }
.feature-highlights { display: grid; gap: 10px; margin: 10px 0 22px; }
.fh-item {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 12px 15px; border-radius: 12px;
}
.fh-item strong { display: block; color: #5eead4; font-size: 13px; margin-bottom: 2px; }
.fh-item span { color: #cbd5e1; font-size: 12px; }
.login-app-links { display: flex; gap: 10px; flex-wrap: wrap; }
.login-form-pane { background: #ffffff; padding: 40px 36px; display: flex; align-items: center; }
.login-card { width: 100%; background: #fff; border-radius: 16px; }
.installer-wrap { width: 100%; max-width: 620px; }
.installer-wrap .login-card { padding: 34px; box-shadow: 0 24px 60px rgba(0,0,0,0.35); }
.login-card h2 { margin: 4px 0 4px; font-size: 21px; font-weight: 800; letter-spacing: -0.02em; }
.quick-accounts { margin-top: 20px; padding-top: 16px; border-top: 1px dashed var(--border-light); }
.qa-title { font-size: 11px; color: var(--text-muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; margin-bottom: 8px; }
.qa-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.qa-chip { background: var(--bg-canvas); border: 1px solid var(--border-light); border-radius: 9px; padding: 7px 10px; text-align: left; cursor: pointer; transition: all 0.15s; }
.qa-chip:hover { border-color: var(--brand); background: var(--brand-soft); }
.qa-chip strong { display: block; font-size: 12px; color: var(--text-primary); }
.qa-chip span { font-size: 11px; color: var(--text-muted); font-family: monospace; }
.app-dl-box { border: 1px solid var(--border-light); border-radius: 14px; padding: 18px; background: var(--bg-canvas); }
.app-dl-box h3 { margin: 0 0 6px; font-size: 15.5px; }

/* ==================== MAIN APP SHELL ==================== */
.app-layout { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }

.sidebar {
    background: var(--sidebar-bg);
    color: #cbd5e1;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    border-right: 1px solid var(--sidebar-border);
    z-index: 40;
}
.sb-brand {
    display: flex; align-items: center; gap: 11px;
    padding: 18px 18px 15px;
    border-bottom: 1px solid var(--sidebar-border);
}
.sb-brand img { width: 38px; height: 38px; border-radius: 10px; }
.sb-brand-title { font-weight: 800; font-size: 15px; color: #fff; letter-spacing: -0.02em; }
.sb-brand-sub { font-size: 11px; color: #64748b; font-weight: 500; }

.sb-user {
    margin: 12px 12px 4px;
    padding: 11px 13px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
}
.sb-user-name { font-weight: 700; color: #f8fafc; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-user-role {
    display: inline-block; margin-top: 4px; padding: 2px 8px; border-radius: 99px;
    font-size: 10px; font-weight: 700; background: rgba(13, 148, 136, 0.22); color: #5eead4; border: 1px solid rgba(94, 234, 212, 0.25);
}

.sb-nav { padding: 8px 10px 16px; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.sb-section {
    font-size: 10px; text-transform: uppercase; letter-spacing: 0.9px;
    color: #475569; padding: 14px 10px 5px; font-weight: 800;
}
.sb-link {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 12px; border-radius: 10px;
    color: #94a3b8; font-weight: 500; font-size: 13px;
    transition: all 0.14s ease;
}
.sb-link svg { width: 17px; height: 17px; stroke-width: 2; flex-shrink: 0; opacity: 0.85; }
.sb-link:hover { background: var(--sidebar-hover); color: #f8fafc; }
.sb-link.active {
    background: linear-gradient(90deg, rgba(13, 148, 136, 0.22), rgba(13, 148, 136, 0.06));
    color: #5eead4;
    font-weight: 700;
    border: 1px solid rgba(45, 212, 191, 0.24);
}
.sb-link.active svg { opacity: 1; color: #2dd4bf; }
.sb-footer { padding: 12px; border-top: 1px solid var(--sidebar-border); }

/* ==================== TOPBAR & COMPACT NOTIFICATIONS ==================== */
.main-area { display: flex; flex-direction: column; min-width: 0; }
.topbar {
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-light);
    padding: 11px 24px;
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    position: sticky; top: 0; z-index: 30;
}
.topbar-title h1 { margin: 0; font-size: 16.5px; font-weight: 800; letter-spacing: -0.02em; color: var(--text-primary); }
.topbar-title span { font-size: 11.5px; color: var(--text-muted); }
.topbar-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mobile-toggle { display: none; background: var(--sidebar-bg); color: #fff; border: none; border-radius: 8px; padding: 7px 11px; font-weight: 700; cursor: pointer; }

.live-sync-pill {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 10px; border-radius: 99px;
    background: var(--brand-soft); border: 1px solid var(--brand-border);
    color: var(--brand-dark); font-size: 11px; font-weight: 700;
}
.live-dot {
    width: 7px; height: 7px; border-radius: 50%; background: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
    animation: pulseDot 2s infinite;
}
@keyframes pulseDot { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }

/* Compact Bell & Popover */
.notif-bell-wrap { position: relative; }
.notif-bell-btn {
    position: relative; height: 34px; padding: 0 11px;
    background: #fff; border: 1px solid var(--border-light); border-radius: 9px;
    cursor: pointer; font-weight: 600; font-size: 12px; color: var(--text-secondary);
    display: inline-flex; align-items: center; gap: 6px; transition: all 0.15s;
}
.notif-bell-btn:hover { border-color: var(--border-hover); background: var(--bg-canvas); }
.notif-badge {
    background: var(--rose); color: #fff; font-size: 10px; font-weight: 800;
    padding: 1px 5px; border-radius: 99px; min-width: 17px; text-align: center; line-height: 1.3;
}
.notif-popover {
    display: none; position: absolute; right: 0; top: 40px;
    width: 310px; max-width: 90vw; background: #fff;
    border: 1px solid var(--border-light); border-radius: 13px;
    box-shadow: var(--shadow-float); z-index: 95; overflow: hidden;
}
.notif-popover.open { display: block !important; }
.np-head {
    padding: 9px 12px; background: var(--bg-canvas); border-bottom: 1px solid var(--border-light);
    display: flex; justify-content: space-between; align-items: center; font-size: 11.5px; font-weight: 700;
}
.np-list { max-height: 250px; overflow-y: auto; }
.np-item { padding: 9px 12px; border-bottom: 1px solid #f1f5f9; font-size: 11.5px; line-height: 1.35; }
.np-item.unread { background: #f0fdfa; border-left: 3px solid var(--brand); }
.np-item strong { display: block; font-size: 11.5px; color: var(--text-primary); margin-bottom: 2px; }
.np-time { font-size: 10px; color: var(--text-muted); margin-top: 3px; }

/* Ultra-Compact Bottom-Right Toast Pill (Never intrusive!) */
.rt-toast-stack {
    position: fixed; bottom: 18px; right: 18px; z-index: 130;
    display: flex; flex-direction: column; gap: 8px;
    max-width: 295px; width: calc(100% - 36px); pointer-events: none;
}
.rt-toast {
    pointer-events: auto; background: rgba(15, 23, 42, 0.95); color: #f8fafc;
    border: 1px solid rgba(255,255,255,0.12); border-left: 3.5px solid #2dd4bf;
    border-radius: 11px; padding: 9px 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(8px);
    animation: toastFadeUp 0.22s ease-out;
}
.rt-toast-title { font-weight: 700; font-size: 11.5px; color: #5eead4; display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.rt-toast-msg { font-size: 11px; color: #e2e8f0; line-height: 1.35; margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@keyframes toastFadeUp { from { transform: translateY(14px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ==================== CONTENT, CARDS & KPI TILES ==================== */
.content-wrap { padding: 22px 24px 44px; max-width: 1460px; width: 100%; margin: 0 auto; }

.card {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-card);
    margin-bottom: 18px;
}
.card-header {
    display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
    margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid #f1f5f9;
}
.card-header h2, .card-header h3 { margin: 0; font-size: 15px; font-weight: 800; letter-spacing: -0.01em; color: var(--text-primary); }

.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.kpi-card {
    background: var(--bg-surface); border: 1px solid var(--border-light); border-radius: var(--radius-lg);
    padding: 17px 18px; box-shadow: var(--shadow-card);
    display: flex; flex-direction: column; justify-content: space-between;
    transition: transform 0.15s, box-shadow 0.15s;
}
.kpi-card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -6px rgba(15, 23, 42, 0.08); }
.kpi-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.kpi-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.45px; color: var(--text-muted); font-weight: 700; }
.kpi-icon { width: 32px; height: 32px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 15px; background: var(--brand-soft); color: var(--brand-dark); }
.kpi-card.gold .kpi-icon { background: var(--amber-soft); color: var(--amber); }
.kpi-card.info .kpi-icon { background: var(--indigo-soft); color: var(--indigo); }
.kpi-value { font-size: 21px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; color: var(--text-primary); margin: 2px 0 4px; }
.kpi-sub { font-size: 11.5px; color: var(--text-muted); }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }

/* ==================== BOUTIQUE POS TERMINAL ==================== */
.pos-grid { display: grid; grid-template-columns: 1.38fr 0.92fr; gap: 18px; align-items: start; }
.pos-search-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.grade-pills { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.grade-pill {
    padding: 5px 12px; border-radius: 99px; border: 1px solid var(--border-light);
    background: var(--bg-canvas); cursor: pointer; font-size: 12px; font-weight: 600; color: var(--text-secondary);
    transition: all 0.14s;
}
.grade-pill:hover { border-color: var(--brand); color: var(--brand-dark); }
.grade-pill.active { background: var(--text-primary); color: #fff; border-color: var(--text-primary); }

.product-catalog {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(182px, 1fr)); gap: 10px;
    max-height: 66vh; overflow-y: auto; padding-right: 4px;
}
.prod-tile {
    background: #fff; border: 1px solid var(--border-light); border-radius: 13px; padding: 12px;
    cursor: pointer; transition: all 0.14s ease; display: flex; flex-direction: column; justify-content: space-between;
}
.prod-tile:hover { border-color: var(--brand); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(13, 148, 136, 0.1); }
.prod-tile.out { opacity: 0.42; pointer-events: none; }
.pt-top { display: flex; justify-content: space-between; align-items: center; gap: 4px; margin-bottom: 7px; }
.pt-sku { font-family: monospace; font-size: 10px; color: var(--text-muted); background: var(--bg-subtle); padding: 1px 5px; border-radius: 4px; }
.pt-name { font-weight: 700; font-size: 12.8px; line-height: 1.3; margin-bottom: 5px; color: var(--text-primary); }
.pt-meta { font-size: 11px; color: var(--text-muted); margin-bottom: 8px; }
.pt-price { font-weight: 800; font-size: 14.5px; color: var(--brand-dark); font-variant-numeric: tabular-nums; }

.cart-panel {
    background: #fff; border: 1px solid var(--border-light); border-radius: var(--radius-lg);
    padding: 18px; position: sticky; top: 70px; box-shadow: var(--shadow-card);
}
.cart-items { max-height: 290px; overflow-y: auto; border-top: 1px solid var(--border-light); border-bottom: 1px solid var(--border-light); margin: 10px 0; }
.cart-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 9px 0; border-bottom: 1px dashed #e2e8f0; align-items: center; }
.cart-row:last-child { border-bottom: none; }
.qty-ctrl { display: inline-flex; align-items: center; gap: 5px; }
.qty-btn { width: 24px; height: 24px; border-radius: 6px; border: 1px solid var(--border-light); background: var(--bg-canvas); cursor: pointer; font-weight: 700; }
.qty-btn:hover { background: var(--border-light); }
.cart-summary-row { display: flex; justify-content: space-between; align-items: center; padding: 4px 0; font-size: 12.5px; color: var(--text-secondary); }
.cart-grand {
    display: flex; justify-content: space-between; align-items: center;
    padding: 11px 14px; background: linear-gradient(135deg, #0f172a, #134e4a);
    border-radius: 12px; font-size: 16.5px; font-weight: 800; color: #fff; margin: 10px 0 12px;
}
.quick-cash { display: flex; gap: 5px; flex-wrap: wrap; margin: 6px 0 10px; }
.qc-btn { padding: 5px 9px; font-size: 11px; border-radius: 7px; border: 1px solid var(--border-light); background: var(--bg-canvas); cursor: pointer; font-weight: 600; color: var(--text-secondary); }
.qc-btn:hover { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-dark); }

/* ==================== TABLES, BADGES, BUTTONS & MODALS ==================== */
.badge { display: inline-flex; align-items: center; padding: 2.5px 8px; border-radius: 99px; font-size: 10.5px; font-weight: 700; letter-spacing: 0.2px; }
.badge-kepala { background: #fef3c7; color: #92400e; }
.badge-gradea { background: #dcfce7; color: #166534; }
.badge-gradeb { background: #e0f2fe; color: #075985; }
.badge-obral { background: #f3e8ff; color: #6b21a8; }
.badge-reject { background: #ffe4e6; color: #9f1239; }
.badge-success { background: #dcfce7; color: #15803d; }
.badge-danger { background: #ffe4e6; color: #be123c; }
.badge-muted { background: #f1f5f9; color: #475569; }

.progress-track { width: 100%; height: 8px; background: #e2e8f0; border-radius: 99px; overflow: hidden; margin: 5px 0; }
.progress-fill { height: 100%; background: linear-gradient(90deg, #0d9488, #2dd4bf); border-radius: 99px; transition: width 0.3s; }
.progress-fill.gold { background: linear-gradient(90deg, #d97706, #fbbf24); }

.table-responsive { width: 100%; overflow-x: auto; }
table.data-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12.8px; }
table.data-table th, table.data-table td { padding: 10px 12px; border-bottom: 1px solid #f1f5f9; text-align: left; vertical-align: middle; }
table.data-table th {
    background: var(--bg-canvas); font-weight: 700; color: var(--text-muted);
    font-size: 10.8px; text-transform: uppercase; letter-spacing: 0.5px;
    border-top: 1px solid var(--border-light); border-bottom: 1px solid var(--border-light);
}
table.data-table th:first-child { border-top-left-radius: 9px; border-bottom-left-radius: 9px; border-left: 1px solid var(--border-light); }
table.data-table th:last-child { border-top-right-radius: 9px; border-bottom-right-radius: 9px; border-right: 1px solid var(--border-light); }
table.data-table tbody tr:hover td { background: #f8fafc; }
.text-right { text-align: right !important; font-variant-numeric: tabular-nums; white-space: nowrap; }
.text-muted { color: var(--text-muted); }
.action-row { display: inline-flex; align-items: center; gap: 5px; flex-wrap: wrap; }

.form-group { margin-bottom: 12px; }
.form-group label { display: block; font-weight: 600; font-size: 12px; margin-bottom: 4px; color: var(--text-secondary); }
.form-control {
    width: 100%; padding: 8.5px 11px; border: 1px solid var(--border-light); border-radius: 9px;
    font-size: 13px; font-family: inherit; background: #fff; color: var(--text-primary); transition: border-color 0.15s, box-shadow 0.15s;
}
.form-control:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.14); }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 8px 14px; border-radius: 9px; border: 1px solid transparent;
    font-weight: 600; font-size: 12.5px; cursor: pointer; text-decoration: none;
    transition: all 0.14s ease; font-family: inherit; white-space: nowrap;
}
.btn-sm { padding: 5px 10px; font-size: 11.5px; border-radius: 7px; }
.btn-lg { padding: 11px 18px; font-size: 13.8px; font-weight: 700; border-radius: 10px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--brand-dark); color: #fff; box-shadow: 0 2px 6px rgba(15, 118, 110, 0.22); }
.btn-primary:hover { background: var(--brand); color: #fff; }
.btn-gold { background: var(--amber); color: #fff; }
.btn-gold:hover { background: #b45309; color: #fff; }
.btn-info { background: var(--indigo-soft); color: var(--indigo); border-color: #c7d2fe; }
.btn-info:hover { background: var(--indigo); color: #fff; }
.btn-danger { background: var(--rose-soft); color: var(--rose); border-color: #fecdd3; }
.btn-danger:hover { background: var(--rose); color: #fff; }
.btn-outline { background: #fff; border-color: var(--border-light); color: var(--text-secondary); }
.btn-outline:hover { background: var(--bg-canvas); border-color: var(--border-hover); color: var(--text-primary); }
.btn-outline-light { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.22); color: #fff; }
.btn-outline-gold { background: rgba(245,158,11,0.16); border-color: rgba(245,158,11,0.45); color: #fde68a; }

.alert { padding: 12px 16px; border-radius: 11px; margin-bottom: 16px; font-size: 13px; border: 1px solid transparent; }
.alert-success { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.alert-danger { background: #fff1f2; border-color: #fecdd3; color: #9f1239; }
.alert-info { background: #f0f9ff; border-color: #bae6fd; color: #075985; }

/* Smooth Backdrop-Blur Modals */
.modal-backdrop {
    display: none; position: fixed; inset: 0;
    background: rgba(15, 23, 42, 0.48); backdrop-filter: blur(3px);
    z-index: 100; align-items: center; justify-content: center; padding: 16px;
}
.modal-backdrop.open { display: flex !important; }
.modal-box {
    background: #fff; border-radius: 18px; width: 100%; max-width: 620px;
    max-height: 90vh; overflow-y: auto; padding: 22px 24px;
    box-shadow: 0 25px 65px rgba(15, 23, 42, 0.28); border: 1px solid var(--border-light);
    animation: modalZoom 0.16s ease-out;
}
@keyframes modalZoom { from { transform: scale(0.96); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-head { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #f1f5f9; padding-bottom: 12px; margin-bottom: 16px; }
.modal-head h3 { margin: 0; font-size: 16px; font-weight: 800; letter-spacing: -0.01em; }
.modal-close { width: 30px; height: 30px; border-radius: 8px; background: var(--bg-subtle); border: none; font-size: 18px; cursor: pointer; color: var(--text-secondary); display: flex; align-items: center; justify-content: center; }
.modal-close:hover { background: #e2e8f0; color: var(--text-primary); }

.perm-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; max-height: 280px; overflow-y: auto; padding: 12px; border: 1px solid var(--border-light); border-radius: 10px; background: var(--bg-canvas); }
.perm-item { display: flex; align-items: flex-start; gap: 8px; font-size: 12px; cursor: pointer; }

@media (max-width: 1024px) {
    .login-shell { grid-template-columns: 1fr; }
    .app-layout { grid-template-columns: 1fr; }
    .sidebar { display: none; position: fixed; left: 0; top: 0; bottom: 0; width: 260px; }
    .sidebar.open { display: flex; }
    .mobile-toggle { display: inline-block; }
    .kpi-grid { grid-template-columns: repeat(2, 1fr); }
    .pos-grid { grid-template-columns: 1fr; }
    .cart-panel { position: static; }
}
@media (max-width: 640px) {
    .kpi-grid, .grid-2, .grid-3, .grid-4, .perm-grid, .qa-grid { grid-template-columns: 1fr; }
    .content-wrap { padding: 14px; }
}
