/* ==========================================================================
   FormPOS Design System — Bootstrap 5 + FormPOS tokens + custom components
   ========================================================================== */

@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("../fonts/inter-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("../fonts/inter-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
    --fp-primary: #C8006B;
    --fp-primary-dark: #A10055;
    --fp-primary-soft: #FDF2F8;

    --fp-success: #16A34A;
    --fp-success-soft: #F0FDF4;
    --fp-warning: #D97706;
    --fp-warning-soft: #FFFBEB;
    --fp-danger: #DC2626;
    --fp-danger-soft: #FEF2F2;
    --fp-info: #C8006B;
    --fp-info-soft: #FDF2F8;
    --fp-purple: #7C3AED;
    --fp-purple-soft: #F5F3FF;

    --fp-text: #1F1720;
    --fp-text-secondary: #52525B;
    --fp-text-muted: #71717A;
    --fp-border: #EAE5E8;
    --fp-bg: #FAF7F9;
    --fp-surface: #FFFFFF;

    --fp-radius-sm: 6px;
    --fp-radius: 10px;
    --fp-radius-card: 12px;
    --fp-radius-lg: 16px;

    --fp-shadow-sm: 0 1px 3px rgba(31,10,22, .08);
    --fp-shadow-md: 0 4px 12px rgba(31,10,22, .08);

    --fp-safe-bottom: env(safe-area-inset-bottom, 0px);
    --fp-safe-top: env(safe-area-inset-top, 0px);
    --fp-bottomnav-h: 64px;
    --fp-sidebar-w: 232px;

    /* Bootstrap mapping */
    --bs-primary: var(--fp-primary);
    --bs-primary-rgb: 200, 0, 107;
    --bs-body-font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --bs-body-color: var(--fp-text);
    --bs-body-bg: var(--fp-bg);
    --bs-border-color: var(--fp-border);
    --bs-link-color: var(--fp-primary);
    --bs-link-hover-color: var(--fp-primary-dark);
    --bs-border-radius: var(--fp-radius);
    --bs-body-font-size: 15px;
    --bs-body-line-height: 1.47;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--bs-body-font-family);
    font-size: 15px;
    line-height: 22px;
    color: var(--fp-text);
    background: var(--fp-bg);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { text-decoration: none; }
a:hover { text-decoration: underline; }
h1, .h1 { font-size: 28px; line-height: 36px; font-weight: 700; }
h2, .h2 { font-size: 24px; line-height: 32px; font-weight: 700; }
h3, .h3 { font-size: 20px; line-height: 28px; font-weight: 700; }
h4, .h4 { font-size: 18px; line-height: 26px; font-weight: 600; }
.display-fp { font-size: 32px; line-height: 40px; font-weight: 700; }
.text-body-lg { font-size: 16px; line-height: 24px; }
.text-sm { font-size: 14px; line-height: 20px; }
.text-caption { font-size: 12px; line-height: 18px; font-weight: 500; }
.text-secondary-fp { color: var(--fp-text-secondary) !important; }
.text-muted, .text-muted-fp { color: var(--fp-text-muted) !important; }
.fw-600 { font-weight: 600; }
.tabular { font-variant-numeric: tabular-nums; }

/* Focus */
:focus-visible { outline: 3px solid rgba(200,0,107, .45); outline-offset: 2px; border-radius: 6px; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--fp-primary); color: #fff; padding: 8px 12px; border-radius: 8px; z-index: 2000; }
.skip-link:focus { left: 8px; }

/* ---------- Buttons ---------- */
.btn {
    --bs-btn-border-radius: 10px;
    --bs-btn-font-weight: 600;
    min-height: 44px;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 18px;
    transition: background-color .15s, border-color .15s, box-shadow .15s, transform .15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
    --bs-btn-bg: var(--fp-primary); --bs-btn-border-color: var(--fp-primary);
    --bs-btn-hover-bg: var(--fp-primary-dark); --bs-btn-hover-border-color: var(--fp-primary-dark);
    --bs-btn-active-bg: var(--fp-primary-dark); --bs-btn-active-border-color: var(--fp-primary-dark);
    --bs-btn-disabled-bg: var(--fp-primary); --bs-btn-disabled-border-color: var(--fp-primary);
}
.btn-success {
    --bs-btn-bg: var(--fp-success); --bs-btn-border-color: var(--fp-success);
    --bs-btn-hover-bg: #15803D; --bs-btn-hover-border-color: #15803D;
    --bs-btn-active-bg: #15803D; --bs-btn-active-border-color: #15803D;
}
.btn-outline-primary { --bs-btn-color: var(--fp-primary); --bs-btn-border-color: #FBCFE8; --bs-btn-hover-bg: var(--fp-primary-soft); --bs-btn-hover-color: var(--fp-primary-dark); --bs-btn-hover-border-color: var(--fp-primary); --bs-btn-active-bg: var(--fp-primary-soft); --bs-btn-active-color: var(--fp-primary-dark); }
.btn-secondary-fp { background: var(--fp-surface); border: 1px solid var(--fp-border); color: var(--fp-text); }
.btn-secondary-fp:hover { background: #F4F1F3; color: var(--fp-text); }
.btn-danger-soft { background: var(--fp-danger-soft); border: 1px solid #FECACA; color: var(--fp-danger); }
.btn-danger-soft:hover { background: #FEE2E2; color: #B91C1C; }
.btn-lg-action { min-height: 52px; font-size: 16px; padding: 12px 20px; width: 100%; }
.btn-md-action { min-height: 48px; font-size: 15px; }
.btn-icon { width: 44px; padding: 0; }
.btn .spinner-border { width: 1rem; height: 1rem; border-width: .15em; }
.btn.is-loading { pointer-events: none; opacity: .85; }

/* ---------- Forms ---------- */
.form-label { font-size: 14px; font-weight: 600; margin-bottom: 6px; color: var(--fp-text); }
.form-control, .form-select {
    min-height: 44px; border-radius: var(--fp-radius); border-color: #D4D4D8; font-size: 16px; /* 16px: cegah zoom iOS */
    color: var(--fp-text); background-color: var(--fp-surface);
}
textarea.form-control { min-height: 88px; }
.form-control:focus, .form-select:focus { border-color: var(--fp-primary); box-shadow: 0 0 0 3px rgba(200,0,107, .18); }
.form-control:disabled { background: #F4F1F3; }
.form-text { font-size: 13px; color: var(--fp-text-muted); }
.invalid-feedback { font-size: 13px; }
.form-check-input { width: 1.25rem; height: 1.25rem; margin-top: .15rem; }
.form-check-input:checked { background-color: var(--fp-primary); border-color: var(--fp-primary); }
.form-switch .form-check-input { width: 2.5rem; height: 1.4rem; }
.form-check-label { padding-left: 4px; }
.input-group-text { border-radius: var(--fp-radius); background: #F4F1F3; }

/* ---------- Card ---------- */
.fp-card {
    background: var(--fp-surface); border: 1px solid var(--fp-border);
    border-radius: var(--fp-radius-card); padding: 16px; box-shadow: var(--fp-shadow-sm);
}
.fp-card--flush { padding: 0; overflow: hidden; }
.fp-card + .fp-card:not(.step) { margin-top: 16px; }
.fp-card__title { font-size: 16px; font-weight: 700; margin: 0 0 12px; }
.fp-section { margin-top: 24px; }
.fp-divider { border-top: 1px solid var(--fp-border); margin: 12px 0; }

/* ---------- Badges (selalu teks + ikon, tidak hanya warna) ---------- */
.fp-badge {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 12px; line-height: 16px; font-weight: 700; letter-spacing: .02em;
    padding: 4px 10px; border-radius: 999px; white-space: nowrap; border: 1px solid transparent;
}
.fp-badge--blue { background: var(--fp-primary-soft); color: var(--fp-primary-dark); border-color: #FBCFE8; }
.fp-badge--orange { background: var(--fp-warning-soft); color: #B45309; border-color: #FDE68A; }
.fp-badge--purple { background: var(--fp-purple-soft); color: #6D28D9; border-color: #DDD6FE; }
.fp-badge--green { background: var(--fp-success-soft); color: #15803D; border-color: #BBF7D0; }
.fp-badge--red { background: var(--fp-danger-soft); color: #B91C1C; border-color: #FECACA; }
.fp-badge--gray { background: #F4F1F3; color: #52525B; border-color: var(--fp-border); }
.fp-badge--info { background: var(--fp-info-soft); color: #9D174D; border-color: #FBCFE8; }
.fp-badge--lg { font-size: 13px; padding: 6px 12px; }

/* ---------- Alerts ---------- */
.fp-alert {
    display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px;
    border-radius: var(--fp-radius); border: 1px solid; font-size: 14px; line-height: 20px;
}
.fp-alert i { font-size: 18px; line-height: 20px; }
.fp-alert--info { background: var(--fp-info-soft); border-color: #FBCFE8; color: #9D174D; }
.fp-alert--success { background: var(--fp-success-soft); border-color: #BBF7D0; color: #166534; }
.fp-alert--warning { background: var(--fp-warning-soft); border-color: #FDE68A; color: #92400E; }
.fp-alert--danger { background: var(--fp-danger-soft); border-color: #FECACA; color: #991B1B; }
.fp-alert--purple { background: var(--fp-purple-soft); border-color: #DDD6FE; color: #5B21B6; }

/* ---------- Layout shells ---------- */
.fp-container { width: 100%; max-width: 640px; margin: 0 auto; padding: 0 16px; }
.fp-container--wide { max-width: 1040px; }
.fp-page { padding-top: 16px; padding-bottom: 24px; }

/* Customer */
.fp-topbar {
    position: sticky; top: 0; z-index: 30; background: rgba(255,255,255,.98);
    border-bottom: 1px solid var(--fp-border); padding-top: var(--fp-safe-top);
}
.fp-topbar__inner { display: flex; align-items: center; gap: 12px; min-height: 60px; }
.fp-avatar {
    width: 40px; height: 40px; border-radius: 12px; background: var(--fp-primary-soft); color: var(--fp-primary);
    display: inline-flex; align-items: center; justify-content: center; font-weight: 700; flex: 0 0 auto; overflow: hidden;
}
.fp-avatar img { width: 100%; height: 100%; object-fit: cover; }
.fp-avatar--lg { width: 56px; height: 56px; font-size: 20px; border-radius: 14px; }
.fp-store-name { font-weight: 700; font-size: 17px; line-height: 22px; margin: 0; }
.fp-store-meta { font-size: 13px; color: var(--fp-text-secondary); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.fp-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.fp-dot--green { background: var(--fp-success); } .fp-dot--red { background: var(--fp-danger); } .fp-dot--orange { background: var(--fp-warning); }

.fp-cover { height: 120px; border-radius: var(--fp-radius-card); background: linear-gradient(135deg, #FCE7F3, #FDF2F8); overflow: hidden; margin-bottom: 12px; }
.fp-cover img { width: 100%; height: 100%; object-fit: cover; }

.fp-source-chip {
    display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700;
    padding: 5px 12px; border-radius: 999px; background: var(--fp-primary-soft); color: var(--fp-primary-dark); border: 1px solid #FBCFE8;
}
.fp-source-chip--onsite { background: var(--fp-success-soft); color: #15803D; border-color: #BBF7D0; }

.fp-cat-nav {
    position: sticky; top: 60px; z-index: 20; background: var(--fp-bg); margin: 0 -16px; padding: 8px 16px;
    display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.fp-cat-nav::-webkit-scrollbar { display: none; }
.fp-cat-nav a {
    flex: 0 0 auto; padding: 8px 14px; border-radius: 999px; background: var(--fp-surface); border: 1px solid var(--fp-border);
    color: var(--fp-text-secondary); font-weight: 600; font-size: 14px; min-height: 40px; display: inline-flex; align-items: center;
}
.fp-cat-nav a:hover, .fp-cat-nav a.active { background: var(--fp-primary); color: #fff; border-color: var(--fp-primary); text-decoration: none; }
.fp-cat-title { font-size: 18px; font-weight: 700; margin: 24px 0 12px; scroll-margin-top: 120px; }

/* Product card (horizontal on mobile) */
.fp-products { display: grid; grid-template-columns: 1fr; gap: 12px; }
.fp-product {
    display: flex; gap: 12px; padding: 12px; background: var(--fp-surface); border: 1px solid var(--fp-border);
    border-radius: var(--fp-radius-card); box-shadow: var(--fp-shadow-sm); align-items: stretch;
}
.fp-product__img {
    width: 92px; height: 92px; flex: 0 0 92px; border-radius: 10px; overflow: hidden; background: #F4F1F3;
    display: flex; align-items: center; justify-content: center; color: #A1A1AA; font-size: 28px; aspect-ratio: 1/1;
}
.fp-product__img img { width: 100%; height: 100%; object-fit: cover; }
.fp-product__body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.fp-product__name { font-weight: 600; font-size: 16px; line-height: 22px; margin: 0; }
.fp-product__desc { font-size: 13px; line-height: 18px; color: var(--fp-text-secondary); margin: 2px 0 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fp-product__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 8px; }
.fp-product--soldout .fp-product__img img, .fp-product--soldout .fp-product__name, .fp-product--soldout .fp-price { opacity: .5; filter: grayscale(1); }
.fp-product--soldout { background: #FAF7F9; }

.fp-price { font-weight: 700; font-size: 16px; font-variant-numeric: tabular-nums; }
.fp-price--lg { font-size: 22px; }

.fp-stepper { display: inline-flex; align-items: center; gap: 4px; }
.fp-stepper button {
    width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--fp-border); background: var(--fp-surface); color: var(--fp-primary);
    font-size: 20px; display: inline-flex; align-items: center; justify-content: center; padding: 0;
}
.fp-stepper button.fp-add { background: var(--fp-primary); color: #fff; border-color: var(--fp-primary); }
.fp-stepper button.fp-add:hover { background: var(--fp-primary-dark); }
.fp-stepper .fp-qty { min-width: 28px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.fp-stepper--sm button { width: 36px; height: 36px; border-radius: 10px; font-size: 16px; }
.fp-stepper--sm { }

/* Sticky cart (customer) */
.fp-stickybar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; padding: 10px 16px calc(10px + var(--fp-safe-bottom));
    background: var(--fp-surface); border-top: 1px solid var(--fp-border); box-shadow: 0 -4px 12px rgba(31,10,22, .08);
}
.fp-stickybar__inner { max-width: 640px; margin: 0 auto; }
.fp-stickybar__sum { display: flex; justify-content: space-between; font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.fp-has-sticky { padding-bottom: calc(116px + var(--fp-safe-bottom)); }

/* Order number & payment */
.fp-ordno { font-size: 26px; line-height: 30px; font-weight: 800; letter-spacing: .04em; color: var(--fp-text); font-variant-numeric: tabular-nums; }
.fp-ordno--xl { font-size: 44px; line-height: 48px; }
.fp-ordno--sm { font-size: 20px; line-height: 24px; }
.fp-pay-total {
    background: var(--fp-primary-soft); border: 1px solid #FBCFE8; border-radius: var(--fp-radius-card); padding: 16px; text-align: center;
}
.fp-pay-total__label { font-size: 13px; font-weight: 700; letter-spacing: .06em; color: var(--fp-primary-dark); }
.fp-pay-total__amount { font-size: 38px; line-height: 44px; font-weight: 800; color: var(--fp-primary-dark); font-variant-numeric: tabular-nums; }
.fp-pay-total__amount .fp-code { color: var(--fp-danger); }
.fp-kv { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: 15px; }
.fp-kv dt, .fp-kv .k { font-weight: 400; color: var(--fp-text-secondary); }
.fp-kv dd, .fp-kv .v { margin: 0; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.fp-qris { background: #fff; border: 1px solid var(--fp-border); border-radius: var(--fp-radius-card); padding: 12px; text-align: center; }
.fp-qris img { width: 100%; max-width: 300px; height: auto; display: block; margin: 0 auto; }

.fp-qr { background: #fff; border: 1px solid var(--fp-border); border-radius: var(--fp-radius-card); padding: 8px; display: inline-block; line-height: 0; }
.fp-qr svg { width: 220px; height: 220px; max-width: 100%; }
.fp-qr--lg svg { width: 260px; height: 260px; }

/* Timeline (tracking) */
.fp-timeline { list-style: none; margin: 0; padding: 0; }
.fp-timeline li { position: relative; padding: 0 0 18px 36px; font-size: 15px; color: var(--fp-text-muted); min-height: 30px; }
.fp-timeline li:last-child { padding-bottom: 0; }
.fp-timeline li::before { /* garis */
    content: ""; position: absolute; left: 11px; top: 24px; bottom: -2px; width: 2px; background: var(--fp-border);
}
.fp-timeline li:last-child::before { display: none; }
.fp-timeline .dot {
    position: absolute; left: 0; top: 0; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--fp-border); background: #fff;
    display: flex; align-items: center; justify-content: center; font-size: 13px; color: #fff;
}
.fp-timeline li.done { color: var(--fp-text); }
.fp-timeline li.done::before { background: var(--fp-success); }
.fp-timeline li.done .dot { background: var(--fp-success); border-color: var(--fp-success); }
.fp-timeline li.current { color: var(--fp-text); font-weight: 700; }
.fp-timeline li.current .dot { border-color: var(--fp-primary); background: var(--fp-primary); box-shadow: 0 0 0 4px rgba(200,0,107, .18); }
.fp-timeline li.stop { color: #B91C1C; font-weight: 700; }
.fp-timeline li.stop .dot { background: var(--fp-danger); border-color: var(--fp-danger); }

.fp-ready-banner {
    background: var(--fp-success-soft); border: 1px solid #BBF7D0; border-radius: var(--fp-radius-card);
    padding: 20px 16px; text-align: center; color: #166534;
}
.fp-ready-banner h2 { color: #166534; margin: 4px 0 8px; font-size: 22px; }

/* ---------- Merchant ---------- */
.fp-shell { min-height: 100vh; }
.fp-sidebar {
    display: none; position: fixed; inset: 0 auto 0 0; width: var(--fp-sidebar-w); background: var(--fp-surface);
    border-right: 1px solid var(--fp-border); padding: 16px 12px; flex-direction: column; z-index: 50;
}
.fp-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; color: var(--fp-text); letter-spacing: -.01em; padding: 4px 8px 16px; }
.fp-brand:hover { text-decoration: none; }
.fp-brand__mark { width: 32px; height: 32px; border-radius: 9px; background: var(--fp-primary); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 17px; }
.fp-nav a {
    display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 10px; color: var(--fp-text-secondary);
    font-weight: 600; min-height: 44px; margin-bottom: 2px;
}
.fp-nav a i { font-size: 18px; }
.fp-nav a:hover { background: #F4F1F3; text-decoration: none; color: var(--fp-text); }
.fp-nav a.active { background: var(--fp-primary-soft); color: var(--fp-primary-dark); }
.fp-nav .fp-count { margin-left: auto; background: var(--fp-primary); color: #fff; font-size: 12px; border-radius: 999px; padding: 1px 8px; font-weight: 700; }
.fp-nav__group { margin-top: auto; }
.fp-main { min-width: 0; }
.fp-header {
    position: sticky; top: 0; z-index: 30; background: rgba(255,255,255,.98); border-bottom: 1px solid var(--fp-border);
    padding: calc(8px + var(--fp-safe-top)) 16px 8px; display: flex; align-items: center; gap: 10px; min-height: 60px;
}
.fp-header .fp-brand { padding: 0; font-size: 18px; }
.fp-header__store { margin-left: auto; text-align: right; min-width: 0; }
.fp-header__store b { display: block; font-size: 14px; line-height: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.fp-content { padding: 16px 16px calc(var(--fp-bottomnav-h) + 24px + var(--fp-safe-bottom)); max-width: 1100px; margin: 0 auto; }
.fp-pagehead { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.fp-pagehead h1 { margin: 0; font-size: 24px; line-height: 32px; }

.fp-bottomnav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; background: var(--fp-surface); border-top: 1px solid var(--fp-border);
    display: flex; padding-bottom: var(--fp-safe-bottom); box-shadow: 0 -2px 10px rgba(31,10,22, .05);
}
.fp-bottomnav a {
    flex: 1; min-height: var(--fp-bottomnav-h); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    font-size: 11.5px; font-weight: 600; color: var(--fp-text-muted); position: relative;
}
.fp-bottomnav a i { font-size: 22px; line-height: 1; }
.fp-bottomnav a.active { color: var(--fp-primary); }
.fp-bottomnav a:hover { text-decoration: none; }
.fp-bottomnav .fp-count {
    position: absolute; top: 6px; left: calc(50% + 6px); background: var(--fp-danger); color: #fff; border-radius: 999px;
    font-size: 11px; min-width: 18px; height: 18px; line-height: 18px; text-align: center; padding: 0 5px; font-weight: 700;
}

/* Filter tabs */
.fp-tabs { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px 12px; padding: 0 16px 4px; scrollbar-width: none; }
.fp-tabs::-webkit-scrollbar { display: none; }
.fp-tabs a {
    flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 14px; border-radius: 999px;
    background: var(--fp-surface); border: 1px solid var(--fp-border); color: var(--fp-text-secondary); font-weight: 600;
}
.fp-tabs a:hover { text-decoration: none; background: #F4F1F3; }
.fp-tabs a.active { background: var(--fp-primary); border-color: var(--fp-primary); color: #fff; }
.fp-tabs a .n { background: rgba(0,0,0,.08); border-radius: 999px; font-size: 12px; padding: 0 7px; min-width: 22px; text-align: center; }
.fp-tabs a.active .n { background: rgba(255,255,255,.25); }

/* Order queue card */
.fp-queue { display: grid; gap: 12px; grid-template-columns: 1fr; }
.fp-order {
    background: var(--fp-surface); border: 1px solid var(--fp-border); border-left: 5px solid var(--fp-border);
    border-radius: var(--fp-radius-card); padding: 14px 16px; box-shadow: var(--fp-shadow-sm); display: flex; flex-direction: column; gap: 10px;
    animation: fp-appear .2s ease-out;
}
@keyframes fp-appear { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.fp-order--blue { border-left-color: var(--fp-primary); }
.fp-order--orange { border-left-color: var(--fp-warning); }
.fp-order--purple { border-left-color: var(--fp-purple); }
.fp-order--green { border-left-color: var(--fp-success); }
.fp-order--red { border-left-color: var(--fp-danger); }
.fp-order__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.fp-order__cust { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 600; font-size: 16px; }
.fp-order__items { list-style: none; margin: 0; padding: 0; font-size: 15px; }
.fp-order__items li { display: flex; gap: 8px; padding: 1px 0; }
.fp-order__items .q { font-weight: 700; min-width: 28px; font-variant-numeric: tabular-nums; }
.fp-order__foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.fp-order__total { font-size: 22px; line-height: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }
.fp-order__note { font-size: 13px; background: var(--fp-warning-soft); border: 1px solid #FDE68A; color: #92400E; padding: 6px 10px; border-radius: 8px; }
.fp-order__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.fp-order__actions form { flex: 1 1 140px; margin: 0; }
.fp-order__actions .btn { width: 100%; min-height: 50px; font-size: 16px; }
.fp-order__actions .btn-sm-fp { min-height: 44px; font-size: 14px; }
.fp-order__actions .fp-grow-0 { flex: 0 0 auto; }

/* Quick controls (merchant) */
.fp-quick { display: flex; gap: 8px; flex-wrap: wrap; }
.fp-quick .btn { min-height: 44px; font-size: 14px; }
.fp-banner { border-radius: var(--fp-radius); padding: 10px 14px; font-weight: 600; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fp-banner--paused { background: var(--fp-danger-soft); color: #B91C1C; border: 1px solid #FECACA; }
.fp-banner--busy { background: var(--fp-warning-soft); color: #92400E; border: 1px solid #FDE68A; }

/* Menu manager */
.fp-menu-row { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--fp-border); }
.fp-menu-row:last-child { border-bottom: 0; }
.fp-menu-row .fp-product__img { width: 56px; height: 56px; flex-basis: 56px; font-size: 20px; }
.fp-menu-row__body { flex: 1; min-width: 0; }
.fp-menu-row__name { font-weight: 600; }

/* ---------- Empty state / loading / toast ---------- */
.fp-empty { text-align: center; padding: 40px 16px; color: var(--fp-text-secondary); }
.fp-empty i { font-size: 44px; color: #D4D4D8; display: block; margin-bottom: 8px; }
.fp-empty h3 { font-size: 18px; margin: 0 0 4px; color: var(--fp-text); }
.fp-toasts { position: fixed; left: 0; right: 0; bottom: calc(var(--fp-bottomnav-h) + 16px + var(--fp-safe-bottom)); z-index: 2000; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
.fp-toasts--customer { bottom: calc(96px + var(--fp-safe-bottom)); }
.fp-toast {
    pointer-events: auto; background: #1F1720; color: #fff; padding: 12px 16px; border-radius: 12px; font-weight: 600; font-size: 14px;
    box-shadow: var(--fp-shadow-md); max-width: 460px; animation: fp-appear .2s ease-out; display: flex; gap: 8px; align-items: center;
}
.fp-toast--danger { background: #B91C1C; }
.fp-toast--info { background: var(--fp-primary-dark); }

.fp-offline-bar { display: none; position: sticky; top: 0; z-index: 60; background: #B91C1C; color: #fff; text-align: center; padding: 8px 12px; font-size: 14px; font-weight: 600; }
.fp-offline-bar.show { display: block; }

.fp-install {
    display: none; align-items: center; gap: 12px; background: var(--fp-primary-soft); border: 1px solid #FBCFE8; border-radius: var(--fp-radius-card); padding: 12px 14px; margin-bottom: 16px;
}
.fp-install.show { display: flex; }
.fp-install__txt { flex: 1; font-size: 14px; line-height: 19px; }

/* Modal */
.modal-content { border-radius: var(--fp-radius-lg); border: 0; box-shadow: var(--fp-shadow-md); }
.modal-title { font-size: 18px; font-weight: 700; }

/* ---------- Tables (admin) ---------- */
.fp-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.fp-table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--fp-text-muted); font-weight: 700; padding: 10px 14px; background: #FAF7F9; border-bottom: 1px solid var(--fp-border); white-space: nowrap; }
.fp-table td { padding: 12px 14px; border-bottom: 1px solid var(--fp-border); vertical-align: middle; }
.fp-table tr:last-child td { border-bottom: 0; }
.fp-table tbody tr:hover { background: #FFF9FC; }

/* Mobile: tabel → kartu */
@media (max-width: 767.98px) {
    .fp-table--cards thead { display: none; }
    .fp-table--cards, .fp-table--cards tbody, .fp-table--cards tr, .fp-table--cards td { display: block; width: 100%; }
    .fp-table--cards tr { padding: 12px 14px; border-bottom: 1px solid var(--fp-border); }
    .fp-table--cards td { border: 0; padding: 3px 0; display: flex; justify-content: space-between; gap: 12px; text-align: right; }
    .fp-table--cards td::before { content: attr(data-label); color: var(--fp-text-muted); font-size: 12px; font-weight: 600; text-align: left; flex: 0 0 38%; text-transform: uppercase; letter-spacing: .04em; }
    .fp-table--cards td.fp-actions-cell { justify-content: flex-end; }
    .fp-table--cards td.fp-actions-cell::before { display: none; }
}

.fp-stat { background: var(--fp-surface); border: 1px solid var(--fp-border); border-radius: var(--fp-radius-card); padding: 14px 16px; box-shadow: var(--fp-shadow-sm); }
.fp-stat__n { font-size: 28px; font-weight: 800; line-height: 34px; font-variant-numeric: tabular-nums; }
.fp-stat__l { font-size: 13px; color: var(--fp-text-secondary); font-weight: 600; }
.fp-bars { display: flex; align-items: flex-end; gap: 8px; height: 120px; }
.fp-bars .b { flex: 1; text-align: center; font-size: 11px; color: var(--fp-text-muted); display: flex; flex-direction: column; justify-content: flex-end; height: 100%; }
.fp-bars .b i { display: block; background: var(--fp-primary); border-radius: 6px 6px 0 0; min-height: 3px; margin-bottom: 4px; }
.fp-bars .b span { font-weight: 700; color: var(--fp-text); font-size: 12px; }

/* Wizard */
.fp-steps { display: flex; align-items: center; margin: 4px 0 20px; }
.fp-steps .s { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: 0 0 auto; font-size: 12px; font-weight: 600; color: var(--fp-text-muted); }
.fp-steps .s i { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--fp-border); background: #fff; display: flex; align-items: center; justify-content: center; font-style: normal; font-size: 12px; font-weight: 700; }
.fp-steps .s.done i { background: var(--fp-primary); border-color: var(--fp-primary); color: #fff; }
.fp-steps .s.current i { border-color: var(--fp-primary); color: var(--fp-primary); box-shadow: 0 0 0 4px rgba(200,0,107, .15); }
.fp-steps .s.current, .fp-steps .s.done { color: var(--fp-text); }
.fp-steps .line { flex: 1; height: 2px; background: var(--fp-border); margin: 0 4px 18px; }
.fp-steps .line.done { background: var(--fp-primary); }

/* Auth */
.fp-auth { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding: 24px 16px; }
.fp-auth__box { width: 100%; max-width: 420px; margin: 0 auto; }

/* Landing */
.fp-hero { padding: 40px 0 24px; text-align: center; }
.fp-hero h1 { font-size: 40px; line-height: 44px; font-weight: 800; letter-spacing: -.02em; }
.fp-hero h1 span { color: var(--fp-primary); display: block; }
.fp-how { display: grid; grid-template-columns: 1fr; gap: 12px; }
.fp-how .step { display: flex; gap: 12px; align-items: flex-start; }
.fp-how .num { width: 36px; height: 36px; border-radius: 10px; background: var(--fp-primary-soft); color: var(--fp-primary-dark); font-weight: 800; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }

/* Pagination */
.pagination { --bs-pagination-border-radius: 10px; gap: 4px; flex-wrap: wrap; }
.page-link { min-width: 40px; min-height: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px !important; border-color: var(--fp-border); color: var(--fp-text-secondary); }
.page-item.active .page-link { background: var(--fp-primary); border-color: var(--fp-primary); color: #fff; }

/* Print QR */
.fp-print-sheet { max-width: 420px; margin: 0 auto; background: #fff; border: 2px solid #111; border-radius: 16px; padding: 28px 24px; text-align: center; color: #000; }
.fp-print-sheet h2 { font-size: 26px; font-weight: 800; margin: 0 0 12px; letter-spacing: .02em; text-transform: uppercase; }
.fp-print-sheet .scan { font-size: 30px; font-weight: 800; letter-spacing: .06em; margin: 12px 0 4px; }
.fp-print-sheet .qrbox { display: inline-block; line-height: 0; }
.fp-print-sheet .qrbox svg { width: 280px; height: 280px; max-width: 100%; }
@media print {
    body { background: #fff !important; }
    .no-print, .fp-sidebar, .fp-bottomnav, .fp-header, .fp-toasts { display: none !important; }
    .fp-content { padding: 0 !important; }
    .fp-print-sheet { border: 2px solid #000; box-shadow: none; }
}

/* ---------- Responsive ---------- */
@media (min-width: 576px) {
    .fp-products { grid-template-columns: repeat(2, 1fr); }
    .fp-container { padding: 0 20px; }
}
@media (min-width: 768px) {
    .fp-queue { grid-template-columns: repeat(2, 1fr); }
    .fp-how { grid-template-columns: repeat(3, 1fr); }
    .fp-container--catalog { max-width: 860px; }
    .fp-hero h1 { font-size: 52px; line-height: 56px; }
}
@media (min-width: 992px) {
    .fp-sidebar { display: flex; }
    .fp-main { margin-left: var(--fp-sidebar-w); }
    .fp-bottomnav { display: none; }
    .fp-content { padding: 24px 32px 48px; }
    .fp-header { display: none; }
    .fp-toasts { bottom: 24px; }
    .fp-tabs { margin: 0 0 12px; padding: 0 0 4px; }
    .fp-queue { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1280px) {
    .fp-queue { grid-template-columns: repeat(3, 1fr); }
    .fp-container--catalog { max-width: 1040px; }
    .fp-container--catalog .fp-products { grid-template-columns: repeat(2, 1fr); }
}

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

/* Desktop catalog: 4 kolom, kartu vertikal */
@media (min-width: 992px) {
    .fp-container--catalog { max-width: 1120px; }
    .fp-container--catalog .fp-products { grid-template-columns: repeat(4, 1fr); }
    .fp-container--catalog .fp-product { flex-direction: column; }
    .fp-container--catalog .fp-product__img { width: 100%; height: auto; flex-basis: auto; aspect-ratio: 4 / 3; }
}

.min-w-0 { min-width: 0; }
.fp-nowrap { white-space: nowrap; }

/* Target sentuh minimal 44px */
.fp-stepper--sm button { width: 44px; height: 44px; border-radius: 12px; font-size: 18px; }
.fp-brand { min-height: 44px; }
.form-check { min-height: 44px; display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: center; padding-left: 0; }
.form-check .form-check-input { float: none; margin: 0; }
.form-check .form-check-label { padding: 10px 0; }
.form-check .form-text { grid-column: 2; margin-top: -6px; padding-bottom: 8px; }
.form-switch.form-check { padding-left: 0; }
.form-switch .form-check-input { margin-left: 0; }
.fp-header .fp-brand { min-height: 44px; }
a.fp-ordno { display: inline-flex; align-items: center; min-height: 44px; }
.fp-table td > a:not(.btn) { display: inline-flex; align-items: center; min-height: 44px; }
.fp-hours-check { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; margin: 0; cursor: pointer; }
.fp-hours-check .form-check-input { margin: 0; width: 1.5rem; height: 1.5rem; }

/* Menu manager: rapi di 360px */
.fp-menu-row { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 10px 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--fp-border); }
.fp-menu-row:last-child { border-bottom: 0; }
.fp-menu-row.is-soldout .fp-menu-row__name { color: var(--fp-text-muted); }
.fp-menu-row__name { font-weight: 600; overflow-wrap: anywhere; }
.fp-menu-row .fp-avail-toggle { min-height: 44px; white-space: nowrap; }
.fp-menu-row__actions { grid-column: 1 / -1; display: flex; gap: 8px; justify-content: flex-end; }
.fp-menu-row__actions form { margin: 0; }
.fp-cat-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 8px; }
.fp-cat-head h2 { flex: 1 1 100%; }
.fp-cat-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.fp-cat-actions form { margin: 0; }
@media (min-width: 576px) {
    .fp-menu-row { grid-template-columns: 56px minmax(0, 1fr) auto auto; }
    .fp-menu-row__actions { grid-column: auto; }
    .fp-cat-head h2 { flex: 1 1 auto; }
}

/* Jam operasional */
.fp-hours-row { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--fp-border); }
.fp-hours-row:last-of-type { border-bottom: 0; }
.fp-hours-day { font-weight: 600; }
.fp-hours-check { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin: 0; cursor: pointer; font-size: 14px; }
.fp-hours-check .form-check-input { margin: 0; width: 1.4rem; height: 1.4rem; }
.fp-hours-times { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 10px; align-items: center; }
