:root {
    --bg: #f4f6f8;
    --card: #ffffff;
    --text: #111827;
    --muted: #64748b;
    --border: #d8dee6;
    --border-soft: #e5e9f0;
    --primary: #1d4ed8;
    --primary-hover: #1e40af;
    --primary-soft: #eff6ff;
    --success: #15803d;
    --success-hover: #166534;
    --danger: #b91c1c;
    --warn: #b45309;
    --radius: 4px;
    --shadow: 0 1px 2px rgba(15, 23, 42, .05);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
    margin: 0; padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, Roboto, sans-serif;
    color: var(--text); background: var(--bg);
    font-size: 13.5px; line-height: 1.45;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0 0 8px; line-height: 1.25; font-weight: 600; color: #0f172a; }
.ic { vertical-align: -3px; flex-shrink: 0; }
.muted { color: var(--muted); font-size: 12.5px; }
.hint { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; font-weight: 400; }
.r { text-align: right; }
.sep { border: 0; border-top: 1px solid var(--border-soft); margin: 14px 0; }

/* Brand */
.brand-mark {
    display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; border-radius: var(--radius);
    background: var(--primary); color: #fff; font-weight: 700; font-size: 15px;
}
.brand-lg { display: flex; align-items: center; justify-content: center; gap: 10px; font-weight: 700; font-size: 18px; margin-bottom: 14px; color: #0f172a; }

/* Auth (Split Screen with Left Illustration) */
.auth-body { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; background: #f8fafc; }
.auth-split-body { min-height: 100vh; margin: 0; background: #ffffff; }
.auth-split { display: grid; grid-template-columns: 1.08fr 1fr; min-height: 100vh; max-width: 1180px; margin: 0 auto; align-items: center; padding: 24px; gap: 32px; }
.auth-illus { display: flex; align-items: center; justify-content: center; padding: 20px; }
.illus-svg { width: 100%; max-width: 520px; height: auto; display: block; }

.auth-panel { display: flex; align-items: center; justify-content: center; padding: 16px; }
.auth-card { width: 100%; max-width: 420px; background: var(--card); border: 1px solid #e5e7eb; border-radius: 6px; padding: 32px; box-shadow: 0 8px 30px rgba(15, 23, 42, .06); }
.auth-title { font-size: 18px; text-align: center; margin-bottom: 4px; }
.auth-sub { color: var(--muted); text-align: center; margin: 0 0 18px; font-size: 13px; }
.auth-foot { text-align: center; margin-top: 16px; color: var(--muted); font-size: 13px; }
.auth-divider { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; font-weight: 600; margin: 14px 0; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; border-top: 1px solid var(--border-soft); }

/* Google Sign-In Button & Verified Card */
.google-box { display: flex; justify-content: center; width: 100%; }
.btn-google {
    width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    padding: 9px 14px; background: #fff; color: #1f2937; border: 1px solid #cbd5e1; border-radius: var(--radius);
    font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.btn-google:hover { background: #f8fafc; border-color: #94a3b8; }
.google-verified {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 10px 12px; background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: var(--radius); margin-bottom: 12px;
}

/* QR Table Management & Customer Self-Order */
.qr-table-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(238px, 1fr)); gap: 12px; }
.qr-table-card { display: flex; flex-direction: column; justify-content: space-between; gap: 10px; }
.qr-preview { display: flex; justify-content: center; padding: 12px; background: #f8fafc; border: 1px solid var(--border-soft); border-radius: var(--radius); }
.qr-actions { display: grid; grid-template-columns: 1fr 1fr 32px; gap: 6px; align-items: stretch; }
.qr-actions > a { width: 100%; padding-left: 8px; padding-right: 8px; }
.qr-del-form { margin: 0; display: flex; }
.qr-del-btn { width: 32px; padding: 0; color: var(--muted); }
.qr-del-btn:hover { color: var(--danger); border-color: #fecaca; background: #fef2f2; }

.so-body { background: #f4f6f8; min-height: 100vh; padding-bottom: 72px; }
.so-header { background: #111827; color: #fff; padding: 14px 16px; border-bottom: 1px solid #1f2937; }
.so-header-inner { max-width: 680px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.so-store { font-size: 16px; font-weight: 700; }
.so-sub { font-size: 12px; color: #9ca3af; }
.so-table-badge { background: var(--primary); color: #fff; padding: 5px 10px; border-radius: var(--radius); font-weight: 700; font-size: 13px; }
.so-wifi { max-width: 680px; margin: 8px auto 0; padding-top: 8px; border-top: 1px solid #1f2937; font-size: 12px; color: #cbd5e1; display: flex; align-items: center; gap: 6px; }
.so-wrap { max-width: 680px; margin: 0 auto; padding: 12px 14px; }
.so-search { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 0 10px; margin-bottom: 10px; color: var(--muted); }
.so-search input { border: 0; padding: 8px 0; outline: none; box-shadow: none; }
.so-grid { display: flex; flex-direction: column; gap: 8px; }
.so-item-card {
    display: flex; align-items: center; gap: 12px; padding: 10px;
    background: #fff; border: 1px solid var(--border); border-radius: 5px; cursor: pointer;
}
.so-item-card:hover { border-color: var(--primary); }
.so-item-img { width: 58px; height: 58px; border-radius: var(--radius); background: #f1f5f9; overflow: hidden; display: flex; align-items: center; justify-content: center; flex-shrink: 0; border: 1px solid var(--border-soft); }
.so-item-img img { width: 100%; height: 100%; object-fit: cover; }
.so-item-body { flex: 1; min-width: 0; }
.so-item-name { font-weight: 600; font-size: 13.5px; color: #0f172a; }
.so-item-price { font-weight: 700; color: var(--primary); margin-top: 2px; }
.so-bottom-bar {
    position: fixed; bottom: 0; left: 0; right: 0; height: 52px;
    background: var(--primary); color: #fff; border: 0; padding: 0 18px;
    display: flex; align-items: center; justify-content: space-between;
    font: inherit; font-size: 14px; cursor: pointer; z-index: 40;
}
.checklist { list-style: none; padding: 0; margin: 8px 0 16px; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.checklist li { padding: 8px 12px; border-bottom: 1px solid var(--border-soft); font-size: 13px; }
.checklist li:last-child { border-bottom: 0; }
.checklist li.ok { color: var(--success); }
.checklist li.fail { color: var(--danger); font-weight: 600; }
.steps { padding-left: 20px; color: var(--text); }
.steps li { margin: 6px 0; }

/* Shell */
.shell { display: flex; min-height: 100vh; }
.sidebar {
    width: 236px; background: #111827; color: #e5e7eb;
    display: flex; flex-direction: column; flex-shrink: 0; border-right: 1px solid #1f2937;
}
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid #1f2937; }
.brand-name { font-weight: 700; font-size: 15px; color: #fff; letter-spacing: -.01em; }
.brand-sub { font-size: 11.5px; color: #9ca3af; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 156px; }
.nav { padding: 10px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav-link {
    display: flex; align-items: center; gap: 10px; padding: 8px 11px;
    border-radius: var(--radius); color: #d1d5db; font-weight: 500; text-decoration: none; font-size: 13px;
}
.nav-link:hover { background: #1f2937; color: #fff; text-decoration: none; }
.nav-link.active { background: var(--primary); color: #fff; }
.nav-link.nav-cta { background: #1e293b; border: 1px solid #334155; color: #fff; font-weight: 600; margin-bottom: 8px; }
.nav-link.nav-cta:hover { background: #334155; }
.sidebar-foot { padding: 12px; border-top: 1px solid #1f2937; }
.user-chip { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; }
.user-avatar { width: 30px; height: 30px; border-radius: var(--radius); background: #374151; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 12.5px; }
.user-meta { overflow: hidden; }
.user-name { font-weight: 600; font-size: 12.5px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-email { font-size: 11px; color: #9ca3af; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-foot .btn-ghost { color: #d1d5db; border-color: #374151; }
.sidebar-foot .btn-ghost:hover { background: #1f2937; color: #fff; }

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar {
    height: 52px; background: var(--card); border-bottom: 1px solid var(--border);
    padding: 0 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.page-title { font-size: 16px; font-weight: 600; margin: 0; }
.content { padding: 20px; max-width: 1260px; width: 100%; }

/* Cards & layout */
.card { background: var(--card); border: 1px solid var(--border); border-radius: 6px; padding: 16px; box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--border-soft); }
.card-head h3 { margin: 0; font-size: 14.5px; }
.card-foot { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border-soft); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* Stats */
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat-card { background: var(--card); border: 1px solid var(--border); border-radius: 6px; padding: 14px 16px; box-shadow: var(--shadow); }
.stat-label { color: var(--muted); font-size: 12px; margin-bottom: 4px; text-transform: uppercase; letter-spacing: .02em; font-weight: 600; }
.stat-value { font-size: 20px; font-weight: 700; color: #0f172a; font-variant-numeric: tabular-nums; }
.stat-sub { color: var(--muted); font-size: 12px; margin-top: 4px; }

/* Onboarding */
.onboarding { margin-bottom: 16px; background: #f8fafc; border-color: var(--border); }
.steps-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.step-item {
    display: flex; gap: 10px; align-items: flex-start; padding: 11px 12px;
    background: #fff; border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); text-decoration: none;
}
.step-item:hover { border-color: var(--primary); text-decoration: none; }
.step-item.done { opacity: .65; }
.step-num {
    width: 22px; height: 22px; border-radius: var(--radius); background: var(--primary); color: #fff;
    display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; flex-shrink: 0;
}
.step-item.done .step-num { background: var(--success); }

/* Forms */
.form { display: flex; flex-direction: column; gap: 11px; }
.form h3 { margin: 10px 0 0; padding-top: 12px; border-top: 1px solid var(--border-soft); font-size: 14px; font-weight: 600; color: #0f172a; }
.form h3:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: 12.5px; color: #334155; }
input, select, textarea {
    width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius);
    font: inherit; color: var(--text); background: #fff;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 2px rgba(29, 78, 216, .15); }
label.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; cursor: pointer; color: var(--text); }
label.check input { width: 15px; height: 15px; margin: 0; }
.form-actions { display: flex; gap: 8px; margin-top: 6px; }
.search-form, .filter-bar, .inline-form { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.search-form input { width: 240px; }
.filter-bar input, .filter-bar select { width: auto; }
.filter-spacer { flex: 1; }
.var-row { display: grid; grid-template-columns: 1fr 160px 34px; gap: 6px; margin-bottom: 6px; }
.img-preview { display: flex; align-items: center; gap: 12px; margin: 4px 0; }
.img-preview img { width: 56px; height: 56px; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--border); }
.sub-panel { background: #f8fafc; border: 1px solid var(--border-soft); border-radius: var(--radius); padding: 12px; }

/* Toggle Switch (Yes/No) */
.switch-row {
    display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 14px;
    padding: 10px 12px; border: 1px solid var(--border-soft); border-radius: var(--radius);
    background: #fcfcfd; cursor: pointer; font-weight: 500;
}
.switch-row:hover { border-color: var(--border); }
.switch-text { display: flex; flex-direction: column; gap: 2px; }
.switch-text b { font-size: 13px; color: var(--text); font-weight: 600; }
.switch-text small { font-size: 12px; color: var(--muted); font-weight: 400; }
.switch { position: relative; display: inline-block; width: 42px; height: 22px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.slider {
    position: absolute; inset: 0; background: #cbd5e1; border-radius: 999px; transition: .15s;
}
.slider::before {
    content: ""; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px;
    background: #fff; border-radius: 50%; transition: .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2);
}
.switch input:checked + .slider { background: var(--primary); }
.switch input:checked + .slider::before { transform: translateX(20px); }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 7px 13px; border-radius: var(--radius); border: 1px solid transparent;
    font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: var(--success-hover); }
.btn-secondary { background: #fff; color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: #f8fafc; border-color: #cbd5e1; }
.btn-ghost { background: transparent; color: var(--muted); border-color: transparent; }
.btn-ghost:hover { background: #f1f5f9; color: var(--text); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { padding: 5px 9px; font-size: 12px; }
.btn-lg { padding: 10px 16px; font-size: 14px; }
.btn-block { width: 100%; }
.icon-btn {
    background: transparent; border: 1px solid transparent; border-radius: var(--radius);
    padding: 5px; cursor: pointer; color: var(--muted); display: inline-flex; align-items: center; justify-content: center;
}
.icon-btn:hover { background: #f1f5f9; color: var(--text); }
.link-btn { background: none; border: 0; color: var(--primary); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; padding: 0; }

/* Tables, badges, chips */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.table th, .table td { padding: 9px 10px; border-bottom: 1px solid var(--border-soft); text-align: left; vertical-align: middle; }
.table th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); background: #f8fafc; font-weight: 600; border-bottom: 1px solid var(--border); }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fafbfc; }
.table .total-row td { font-size: 14px; border-top: 2px solid var(--text); }
.actions { text-align: right; white-space: nowrap; }
.empty { padding: 26px; text-align: center; color: var(--muted); }
.thumb { width: 38px; height: 38px; border-radius: var(--radius); object-fit: cover; display: block; border: 1px solid var(--border-soft); }
.thumb-placeholder { background: #f1f5f9; color: #334155; font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: 12px; }

.badge { display: inline-block; padding: 2px 7px; border-radius: 3px; font-size: 11.5px; font-weight: 600; }
.badge-ok { background: #dcfce7; color: #166534; }
.badge-warn { background: #fef3c7; color: #92400e; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-muted { background: #e2e8f0; color: #334155; }
.badge-btn { border: 0; cursor: pointer; }
.tag { display: inline-block; padding: 2px 6px; border-radius: 3px; background: #f1f5f9; border: 1px solid var(--border-soft); color: #334155; font-size: 11.5px; margin-right: 4px; }
.pill { background: var(--primary); color: #fff; border-radius: 3px; padding: 1px 6px; font-size: 11px; font-weight: 700; }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 16px; overflow-x: auto; background: var(--card); padding: 0 8px; border-radius: 6px 6px 0 0; border: 1px solid var(--border); }
.tab { display: inline-flex; align-items: center; gap: 6px; padding: 10px 12px; color: var(--muted); font-weight: 600; font-size: 12.5px; border-bottom: 2px solid transparent; text-decoration: none; white-space: nowrap; }
.tab:hover { color: var(--text); text-decoration: none; }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }

.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: var(--radius); background: #fff; border: 1px solid var(--border); font-weight: 600; font-size: 12.5px; color: var(--text); }
.chip a { color: inherit; text-decoration: none; }
.chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.chip-edit { background: none; border: 0; color: inherit; cursor: pointer; padding: 0 2px; opacity: .75; }

.kv-list { display: flex; flex-direction: column; gap: 7px; }
.kv-list > div { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; padding-bottom: 5px; border-bottom: 1px dashed var(--border-soft); }
.kv-list > div:last-child { border-bottom: 0; padding-bottom: 0; }
.kv-list > div > span { color: var(--muted); }

/* Alerts & Modals */
.alert { padding: 10px 12px; border-radius: var(--radius); margin-bottom: 14px; font-size: 13px; }
.alert-success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.alert-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert-info { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }

.modal { position: fixed; inset: 0; background: rgba(15, 23, 42, .5); display: none; align-items: center; justify-content: center; padding: 16px; z-index: 60; }
.modal.open { display: flex; }
.modal-box { width: 100%; background: #fff; border: 1px solid var(--border); border-radius: 6px; padding: 18px; max-height: 92vh; overflow-y: auto; box-shadow: 0 12px 28px rgba(0,0,0,.18); }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border-soft); }
.modal-head h3 { margin: 0; font-size: 15px; }

/* ===================== LAYAR KASIR (POS) ===================== */
.pos-body { height: 100vh; display: flex; flex-direction: column; overflow: hidden; background: var(--bg); }
.pos-header {
    height: 50px; background: #111827; color: #fff; padding: 0 12px;
    display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-shrink: 0;
    border-bottom: 1px solid #1f2937;
}
.pos-brand { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13.5px; }
.pos-store-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }
.pos-store-select { background: #1f2937; color: #fff; border: 1px solid #374151; padding: 5px 8px; border-radius: var(--radius); width: auto; font-size: 12.5px; }
.pos-search {
    flex: 1; max-width: 360px; display: flex; align-items: center; gap: 8px;
    background: #1f2937; border: 1px solid #374151; border-radius: var(--radius); padding: 0 10px; color: #9ca3af;
}
.pos-search input { background: transparent; border: 0; color: #fff; padding: 6px 0; outline: none; font-size: 13px; box-shadow: none; }
.pos-header-actions { display: flex; align-items: center; gap: 6px; }
.pos-header .btn-secondary { background: #1f2937; color: #e5e7eb; border-color: #374151; }
.pos-header .btn-secondary:hover { background: #374151; }
.pos-header .btn-ghost { color: #d1d5db; }
.pos-flash { margin: 8px 12px 0; }

.pos-main { flex: 1; display: grid; grid-template-columns: 1fr 380px; min-height: 0; }
.pos-catalog { display: flex; flex-direction: column; min-height: 0; padding: 10px 12px; }
.pos-cats { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 8px; flex-shrink: 0; }
.pos-cat {
    padding: 6px 13px; border-radius: var(--radius); border: 1px solid var(--border);
    background: #fff; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; white-space: nowrap; color: #334155;
}
.pos-cat.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.pos-grid {
    flex: 1; overflow-y: auto; display: grid;
    grid-template-columns: repeat(auto-fill, minmax(142px, 1fr));
    gap: 8px; align-content: start; padding-bottom: 70px;
}
.pos-card {
    background: #fff; border: 1px solid var(--border); border-radius: 5px; padding: 0;
    overflow: hidden; cursor: pointer; text-align: left; display: flex; flex-direction: column;
    transition: border-color .1s; font: inherit;
}
.pos-card:hover { border-color: var(--primary); }
.pos-card:active { background: #f8fafc; }
.pos-card.soldout { opacity: .45; cursor: not-allowed; }
.pos-card-img { position: relative; height: 84px; background: #f1f5f9; display: flex; align-items: center; justify-content: center; border-bottom: 1px solid var(--border-soft); }
.pos-card-img img { width: 100%; height: 100%; object-fit: cover; }
.pos-card-ph { font-size: 18px; font-weight: 700; color: #475569; }
.sold-badge, .var-badge, .stk-badge {
    position: absolute; padding: 1px 6px; border-radius: 3px;
    font-size: 10.5px; font-weight: 600;
}
.sold-badge { top: 5px; right: 5px; background: var(--danger); color: #fff; }
.var-badge { top: 5px; left: 5px; background: rgba(15, 23, 42, .75); color: #fff; }
.stk-badge { bottom: 5px; right: 5px; background: rgba(255, 255, 255, .9); color: #334155; border: 1px solid var(--border); }
.pos-card-body { padding: 8px 9px; }
.pos-card-name { font-weight: 600; font-size: 12.5px; line-height: 1.25; height: 32px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; color: #0f172a; }
.pos-card-price { color: var(--primary); font-weight: 700; margin-top: 4px; font-size: 13px; font-variant-numeric: tabular-nums; }
.pos-empty { grid-column: 1 / -1; text-align: center; padding: 40px; color: var(--muted); }

/* Cart */
.pos-cart { background: #fff; border-left: 1px solid var(--border); display: flex; flex-direction: column; min-height: 0; }
.pos-cart-head { padding: 10px; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 7px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; background: #f1f5f9; padding: 2px; border-radius: var(--radius); border: 1px solid var(--border-soft); }
.seg-btn { border: 0; background: transparent; padding: 6px; border-radius: 3px; font: inherit; font-weight: 600; font-size: 12.5px; cursor: pointer; color: var(--muted); }
.seg-btn.active { background: #fff; color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.pos-meta-row { display: flex; gap: 6px; align-items: center; }
.pos-meta-row input { padding: 6px 8px; font-size: 12.5px; }
.pos-editing { background: #fef3c7; color: #92400e; padding: 5px 8px; border-radius: var(--radius); font-size: 12px; display: flex; justify-content: space-between; align-items: center; }

.pos-items { flex: 1; overflow-y: auto; padding: 4px 10px; font-variant-numeric: tabular-nums; }
.pos-cart-empty { text-align: center; color: var(--muted); padding: 44px 16px; font-size: 12.5px; }
.cart-row { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--border-soft); }
.cart-info { flex: 1; min-width: 0; cursor: pointer; }
.cart-name { font-weight: 600; font-size: 12.5px; color: #0f172a; }
.cart-sub { font-size: 11.5px; color: var(--muted); }
.cart-hint { opacity: .65; }
.cart-qty { display: flex; align-items: center; gap: 5px; }
.cart-qty button { width: 25px; height: 25px; border-radius: 3px; border: 1px solid var(--border); background: #f8fafc; font-weight: 700; font-size: 14px; cursor: pointer; }
.cart-qty span { min-width: 18px; text-align: center; font-weight: 600; font-size: 12.5px; }
.cart-line { font-weight: 600; min-width: 74px; text-align: right; font-size: 12.5px; }

.pos-cart-foot { padding: 10px; border-top: 1px solid var(--border); background: #f8fafc; font-variant-numeric: tabular-nums; }
.pos-summary { display: flex; flex-direction: column; gap: 3px; margin-bottom: 8px; font-size: 12.5px; }
.sum-row { display: flex; justify-content: space-between; color: var(--muted); }
.sum-total { display: flex; justify-content: space-between; font-size: 16px; font-weight: 700; color: var(--text); padding-top: 6px; border-top: 1px solid var(--border); margin-top: 4px; }
.pos-actions { display: grid; grid-template-columns: 92px 1fr; gap: 6px; }
.pos-pay-btn { font-size: 14px; font-weight: 700; }

/* Variant & Payment modal internals */
.var-choices { display: flex; flex-direction: column; gap: 6px; }
.var-choice {
    display: flex; justify-content: space-between; align-items: center; padding: 10px 12px;
    border: 1px solid var(--border); border-radius: var(--radius); background: #fff; font: inherit; cursor: pointer; text-align: left;
}
.var-choice:hover, .var-choice.active { border-color: var(--primary); background: var(--primary-soft); }
.pay-total-box { text-align: center; background: #f8fafc; border: 1px solid var(--border-soft); border-radius: var(--radius); padding: 10px; margin-bottom: 10px; }
.pay-total-num { font-size: 24px; font-weight: 700; color: var(--primary); font-variant-numeric: tabular-nums; }
.pay-methods { display: grid; grid-template-columns: repeat(auto-fit, minmax(95px, 1fr)); gap: 6px; margin-bottom: 10px; }
.pay-method { padding: 9px 8px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.pay-method.active { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.pay-input { font-size: 20px; font-weight: 700; text-align: right; margin-bottom: 8px; font-variant-numeric: tabular-nums; }
.quick-cash { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.pay-change { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-radius: var(--radius); background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; margin-bottom: 10px; font-size: 14.5px; font-variant-numeric: tabular-nums; }
.pay-change.insufficient { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.qris-img { max-width: 220px; width: 100%; border: 1px solid var(--border); border-radius: var(--radius); padding: 6px; background: #fff; }
.done-badge { width: 46px; height: 46px; border-radius: var(--radius); background: #dcfce7; color: var(--success); font-size: 22px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.done-change { display: flex; justify-content: space-between; padding: 10px 12px; background: #f8fafc; border: 1px solid var(--border-soft); border-radius: var(--radius); margin: 12px 0; font-size: 15px; }
.saved-list { display: flex; flex-direction: column; gap: 6px; }
.saved-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 11px; border: 1px solid var(--border); border-radius: var(--radius); }
.saved-right { display: flex; align-items: center; gap: 6px; }

.pos-mobile-bar { display: none; }
.mobile-only { display: none; }
.backdrop { display: none; }
.toast {
    position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%);
    background: #111827; color: #fff; padding: 8px 16px; border-radius: var(--radius);
    font-weight: 600; font-size: 12.5px; z-index: 90; box-shadow: 0 6px 18px rgba(0,0,0,.22);
}

/* Responsive */
@media (max-width: 960px) {
    .auth-split { grid-template-columns: 1fr; }
    .auth-illus { display: none; }
    .sidebar { position: fixed; inset: 0 auto 0 0; z-index: 50; transform: translateX(-100%); transition: transform .18s; }
    .sidebar.open { transform: translateX(0); }
    .backdrop.open { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 40; }
    .mobile-only { display: inline-flex; }
    .hide-md { display: none; }
    .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-2, .grid-3, .steps-grid { grid-template-columns: 1fr; }

    .pos-main { grid-template-columns: 1fr; }
    .pos-cart {
        position: fixed; inset: 50px 0 0 0; z-index: 35;
        transform: translateY(105%); transition: transform .2s ease;
    }
    .pos-cart.open { transform: translateY(0); padding-bottom: 52px; }
    .pos-mobile-bar {
        display: flex; justify-content: space-between; align-items: center;
        position: fixed; bottom: 0; left: 0; right: 0; height: 48px;
        background: var(--primary); color: #fff; border: 0; padding: 0 16px;
        font: inherit; font-size: 14px; cursor: pointer; z-index: 36;
    }
}
@media (max-width: 520px) {
    .hide-xs { display: none; }
    .content { padding: 12px; }
    .stats-grid { grid-template-columns: 1fr; }
}
@media print {
    .no-print { display: none !important; }
}
