/* OkePOS V2 — restaurant display surfaces (KDS / ServeBoard).
 *
 * V1 visual grammar, preserved: a dark kitchen backdrop with light ticket cards, green/amber/red/
 * dark-red duration headers, and a blinking critical level. The KDS deliberately does NOT follow the
 * cashier app's dark/light theme — V1's kitchen screen has its own scheme for legibility from a
 * distance (docs/ui/V1-DISPLAY-MODULE-PARITY.md §1.6).
 */

:root {
    --kds-bg-1: #070d1c;
    --kds-bg-2: #071a38;
    --kds-card: rgba(248, 250, 252, 0.97);
    --kds-ink: #0f172a;
    --kds-muted: #475569;
    --kds-normal: #4caf3f;
    --kds-warning: #f59f4a;
    --kds-danger: #d90429;
    --kds-critical: #7a0014;
    --kds-border: rgba(148, 163, 184, 0.35);
    --kds-focus: #2563eb;
    --sb-available: rgba(30, 41, 59, 0.86);
    --sb-occupied: rgba(146, 64, 14, 0.92);
    --sb-reserved: rgba(14, 116, 144, 0.92);
    --sb-unknown: rgba(71, 85, 105, 0.92);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

body.display-body {
    background: linear-gradient(160deg, var(--kds-bg-1), var(--kds-bg-2));
    color: #e2e8f0;
    font-family: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
    min-height: 100vh;
}

.display-topbar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 16px;
    background: rgba(2, 6, 23, 0.78);
    border-bottom: 1px solid rgba(148, 163, 184, 0.25);
    position: sticky;
    top: 0;
    z-index: 40;
    flex-wrap: wrap;
}

.display-brand {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.display-brand strong { font-size: 17px; letter-spacing: 0.3px; }
.display-brand span { font-size: 12px; color: #94a3b8; }

.display-topbar .spacer { flex: 1 1 auto; }

.display-clock {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    font-size: 16px;
    min-width: 84px;
    text-align: center;
}

.display-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    padding: 5px 11px;
    font-size: 12px;
    font-weight: 700;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(15, 23, 42, 0.65);
    color: #cbd5e1;
    white-space: nowrap;
}

.display-pill::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #94a3b8;
}

.display-pill.is-online::before { background: #22c55e; }
.display-pill.is-offline::before { background: #ef4444; }
.display-pill.is-reconnecting::before { background: #f59e0b; }

.display-btn,
.display-select {
    border: 1px solid rgba(148, 163, 184, 0.4);
    background: rgba(15, 23, 42, 0.72);
    color: #e2e8f0;
    border-radius: 9px;
    padding: 7px 11px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
}

.display-btn:hover { background: rgba(30, 41, 59, 0.9); }
.display-btn:focus-visible,
.display-select:focus-visible { outline: 2px solid var(--kds-focus); outline-offset: 2px; }
.display-btn[aria-pressed="true"] { border-color: #60a5fa; color: #bfdbfe; }

.display-lang { display: inline-flex; gap: 4px; }
.display-lang a {
    text-decoration: none;
    color: #cbd5e1;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 8px;
    border-radius: 7px;
    border: 1px solid transparent;
}
.display-lang a[aria-current="true"] { border-color: #60a5fa; color: #bfdbfe; }

.display-logout-form { margin: 0; }

.display-main { padding: 14px 16px 28px; }

.display-notice {
    margin: 0 0 12px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(239, 68, 68, 0.16);
    border: 1px solid rgba(248, 113, 113, 0.45);
    color: #fecaca;
    font-size: 13px;
    font-weight: 600;
}

/* ---------------------------------------------------------------- login ---- */

.display-login-wrap {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.display-login-card {
    width: min(460px, 100%);
    background: rgba(15, 23, 42, 0.82);
    border: 1px solid rgba(148, 163, 184, 0.32);
    border-radius: 16px;
    padding: 26px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.display-login-card h1 { margin: 0 0 6px; font-size: 22px; }
.display-login-card p { margin: 0 0 18px; color: #94a3b8; font-size: 13.5px; line-height: 1.5; }

.display-field { margin-bottom: 14px; }
.display-field label {
    display: block;
    font-size: 12.5px;
    font-weight: 700;
    color: #cbd5e1;
    margin-bottom: 6px;
}
.display-field input,
.display-field select {
    width: 100%;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.42);
    background: rgba(2, 6, 23, 0.7);
    color: #f1f5f9;
    padding: 11px 12px;
    font-size: 14px;
    font-family: inherit;
}
.display-field input:focus-visible,
.display-field select:focus-visible { outline: 2px solid var(--kds-focus); outline-offset: 1px; }
.display-help { display: block; margin-top: 6px; font-size: 11.5px; color: #7c8ba1; }

.display-submit {
    width: 100%;
    border: 0;
    border-radius: 11px;
    background: #2563eb;
    color: white;
    font-size: 15px;
    font-weight: 800;
    padding: 12px;
    cursor: pointer;
    font-family: inherit;
}
.display-submit:hover { background: #1d4ed8; }

/* ------------------------------------------------------------------ KDS ---- */

.kds-app.is-compact { --kds-card-font: 12px; }

.kds-board {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: 13px;
    align-items: start;
}

.kds-ticket {
    background: var(--kds-card);
    color: var(--kds-ink);
    border-radius: 13px;
    overflow: hidden;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.32);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.kds-ticket-head {
    color: #fff;
    padding: 9px 11px 10px;
    background: var(--kds-normal);
    transition: background-color 0.35s ease;
}

.kds-ticket-head.warning { background: var(--kds-warning); }
.kds-ticket-head.danger { background: var(--kds-danger); }
.kds-ticket-head.critical {
    background: var(--kds-critical);
    animation: kdsCriticalBlink 1s ease-in-out infinite;
}

@keyframes kdsCriticalBlink {
    0%, 100% { background: #7a0014; }
    50% { background: #3d000a; }
}

@media (prefers-reduced-motion: reduce) {
    .kds-ticket-head.critical { animation: none; background: var(--kds-critical); }
}

.kds-ticket-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.kds-sale-type { font-size: 14.5px; font-weight: 800; }
.kds-table { font-size: 14px; font-weight: 800; white-space: nowrap; }

.kds-order-code {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(0, 0, 0, 0.28);
    padding: 3px 8px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 800;
    letter-spacing: 0.2px;
    margin-top: 6px;
}

.kds-ticket-meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 12px;
    font-weight: 600;
    margin-top: 6px;
    opacity: 0.96;
}

.kds-duration { font-variant-numeric: tabular-nums; font-weight: 800; }

.kds-ticket-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.kds-ticket-status {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    background: rgba(0, 0, 0, 0.24);
    padding: 3px 8px;
    border-radius: 999px;
}

.kds-serve-all {
    border: 1px solid rgba(255, 255, 255, 0.55);
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    font-size: 11.5px;
    font-weight: 800;
    border-radius: 8px;
    padding: 4px 9px;
    cursor: pointer;
    font-family: inherit;
}
.kds-serve-all:hover { background: rgba(255, 255, 255, 0.26); }
.kds-serve-all:disabled { opacity: 0.45; cursor: not-allowed; }

.kds-ticket-body { padding: 8px 11px 11px; }

.kds-group + .kds-group { margin-top: 7px; }
.kds-group-title {
    margin: 4px 0 5px;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.7px;
    text-transform: uppercase;
    color: #64748b;
}

.kds-line {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    padding: 7px 6px;
    border-radius: 8px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.24);
}
.kds-line:last-child { border-bottom: 0; }
.kds-line.is-void { background: rgba(254, 226, 226, 0.55); }

.kds-line-main { min-width: 0; flex: 1 1 auto; }
.kds-line-title {
    font-size: var(--kds-card-font, 14px);
    font-weight: 800;
    line-height: 1.25;
    overflow-wrap: anywhere;
}
.kds-line.is-served .kds-line-title { text-decoration: line-through; color: #64748b; }
.kds-line.is-void .kds-line-title { text-decoration: line-through; color: #991b1b; }
.kds-qty { color: #1d4ed8; margin-right: 5px; }

.kds-line-sub {
    margin-top: 2px;
    font-size: 11.5px;
    color: #475569;
    line-height: 1.35;
}
.kds-line-sub .label { font-weight: 800; color: #334155; }

.kds-status-chip {
    display: inline-block;
    margin-top: 4px;
    font-size: 10.5px;
    font-weight: 800;
    border-radius: 14px;
    padding: 2px 7px;
}
.kds-status-chip.pending { background: #e5e7eb; color: #374151; }
.kds-status-chip.processing { background: #fde68a; color: #78350f; }
.kds-status-chip.plating { background: #fed7aa; color: #9a3412; }
.kds-status-chip.served { background: #bbf7d0; color: #166534; }
.kds-status-chip.void { background: #fee2e2; color: #991b1b; }

.kds-line-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: flex-end;
    max-width: 168px;
}

.kds-status-btn {
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #111827;
    border-radius: 8px;
    padding: 3px 6px;
    font-size: 10.5px;
    font-weight: 800;
    cursor: pointer;
    font-family: inherit;
}
.kds-status-btn.active { border-color: #2563eb; color: #2563eb; }
.kds-status-btn:disabled { opacity: 0.42; cursor: not-allowed; }
.kds-status-btn.busy { opacity: 0.6; }

.kds-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 70px 22px;
    border: 1px dashed rgba(148, 163, 184, 0.42);
    border-radius: 16px;
    color: #94a3b8;
}
.kds-empty h2 { margin: 0 0 8px; color: #e2e8f0; font-size: 21px; }
.kds-empty p { margin: 0; font-size: 13.5px; }

.kds-toast {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 60;
    background: #7f1d1d;
    color: #fee2e2;
    border: 1px solid #ef4444;
    border-radius: 10px;
    padding: 10px 13px;
    font-size: 13px;
    font-weight: 700;
    max-width: 360px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.kds-settings {
    position: fixed;
    right: 16px;
    top: 64px;
    z-index: 55;
    width: 270px;
    background: #0f172a;
    border: 1px solid rgba(148, 163, 184, 0.4);
    border-radius: 13px;
    padding: 14px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.45);
}
.kds-settings[hidden] { display: none; }
.kds-settings h3 { margin: 0 0 10px; font-size: 13px; }
.kds-settings label { display: block; font-size: 12px; font-weight: 700; margin: 9px 0 4px; color: #cbd5e1; }
.kds-settings input[type="range"] { width: 100%; }
.kds-settings select {
    width: 100%;
    background: #020617;
    color: #e2e8f0;
    border: 1px solid rgba(148, 163, 184, 0.42);
    border-radius: 8px;
    padding: 6px;
    font-family: inherit;
}
.kds-settings .row { display: flex; align-items: center; gap: 8px; margin-top: 10px; }

.kds-audio-gate {
    position: fixed;
    inset: 0;
    z-index: 70;
    background: rgba(2, 6, 23, 0.78);
    display: grid;
    place-items: center;
    padding: 24px;
}
.kds-audio-gate[hidden] { display: none; }
.kds-audio-gate button {
    border: 0;
    border-radius: 14px;
    background: #2563eb;
    color: white;
    font-size: 17px;
    font-weight: 800;
    padding: 16px 24px;
    cursor: pointer;
    font-family: inherit;
}

@media (max-width: 700px) {
    .kds-board { grid-template-columns: 1fr; }
    .display-topbar { gap: 8px; }
    .display-clock { display: none; }
}

/* ------------------------------------------------------------ serveboard ---- */

.serveboard-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 14px;
    padding: 14px 16px 22px;
    align-items: start;
}

#serveboard-notice { grid-column: 1 / -1; }

.serveboard-floor-wrap {
    position: relative;
    overflow: hidden;
    min-height: 420px;
    height: calc(100vh - 122px);
    background: rgba(2, 6, 23, 0.42);
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 16px;
}

.serveboard-floor {
    position: absolute;
    top: 0;
    left: 0;
    transform-origin: top left;
}

.sb-table {
    position: absolute;
    border-radius: 11px;
    padding: 9px 10px;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 4px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
    overflow: hidden;
}

.sb-table.available { background: var(--sb-available); }
.sb-table.occupied { background: var(--sb-occupied); }
.sb-table.reserved { background: var(--sb-reserved); }
.sb-table.unknown { background: var(--sb-unknown); border-color: #f59e0b; box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.45); }
.sb-table.inactive { background: rgba(30, 41, 59, 0.55); opacity: 0.62; }

.sb-table .sb-name { font-size: 15px; font-weight: 800; line-height: 1.15; overflow-wrap: anywhere; }
.sb-table .sb-area { font-size: 10.5px; opacity: 0.82; }
.sb-table .sb-status {
    align-self: flex-start;
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    background: rgba(0, 0, 0, 0.26);
    padding: 2px 7px;
    border-radius: 999px;
}
.sb-table .sb-order { font-size: 10.5px; font-weight: 700; opacity: 0.94; }
.sb-table .sb-call-dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.28);
    animation: sbCallBlink 1s ease-in-out infinite;
}
.sb-table .sb-call-dot.is-acknowledged { background: #f59e0b; animation: none; }

.serveboard-unpositioned-wrap {
    grid-column: 1 / -1;
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 14px;
    padding: 12px;
}
.serveboard-unpositioned-wrap[hidden] { display: none; }

.serveboard-unpositioned {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 9px;
}

.serveboard-unpositioned .sb-table {
    position: static;
    min-height: 92px;
}

.serveboard-calls {
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 16px;
    padding: 13px;
    height: calc(100vh - 122px);
    overflow: auto;
}

.serveboard-section-title {
    margin: 0 0 10px;
    font-size: 12.5px;
    font-weight: 800;
    letter-spacing: 0.7px;
    text-transform: uppercase;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.serveboard-count {
    background: #1d4ed8;
    color: #fff;
    border-radius: 999px;
    padding: 1px 8px;
    font-size: 11px;
    font-variant-numeric: tabular-nums;
}

.serveboard-no-calls {
    margin: 12px 2px;
    color: #7c8ba1;
    font-size: 12.5px;
}

.sb-call {
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 11px;
    padding: 10px;
    margin-bottom: 9px;
    background: rgba(2, 6, 23, 0.55);
}

.sb-call.is-pending {
    border-color: #ef4444;
    box-shadow: inset 0 0 0 1px rgba(239, 68, 68, 0.35);
}

.sb-call.is-acknowledged { border-color: #f59e0b; }

.sb-call .sb-call-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.sb-call .sb-call-table { font-weight: 800; font-size: 15px; }
.sb-call .sb-call-state {
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 2px 7px;
    border-radius: 999px;
    background: rgba(239, 68, 68, 0.2);
    color: #fecaca;
    white-space: nowrap;
}
.sb-call.is-acknowledged .sb-call-state { background: rgba(245, 158, 11, 0.2); color: #fde68a; }
.sb-call .sb-call-meta { margin-top: 4px; font-size: 11px; color: #94a3b8; }
.sb-call .sb-call-actions { display: flex; gap: 6px; margin-top: 9px; }
.sb-call button {
    flex: 1 1 0;
    border: 1px solid rgba(148, 163, 184, 0.4);
    background: rgba(30, 41, 59, 0.85);
    color: #e2e8f0;
    border-radius: 8px;
    padding: 6px 8px;
    font-size: 11.5px;
    font-weight: 800;
    cursor: pointer;
    font-family: inherit;
}
.sb-call button:hover { background: rgba(51, 65, 85, 0.95); }
.sb-call button:disabled { opacity: 0.45; cursor: not-allowed; }
.sb-call button.sb-resolve { border-color: rgba(34, 197, 94, 0.5); color: #bbf7d0; }

.sb-call-badge {
    background: #7f1d1d;
    border-color: #ef4444;
    color: #fee2e2;
    font-weight: 800;
}
.sb-call-badge.is-active { animation: sbCallBlink 1s ease-in-out infinite; }
.sb-call-badge[hidden] { display: none; }

@keyframes sbCallBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}

@media (prefers-reduced-motion: reduce) {
    .sb-call-badge.is-active,
    .sb-table .sb-call-dot { animation: none; }
}

@media (max-width: 980px) {
    .serveboard-main { grid-template-columns: 1fr; }
    .serveboard-floor-wrap { height: 62vh; min-height: 340px; }
    .serveboard-calls { height: auto; max-height: 52vh; }
}

/* ------------------------------------------------------------------ worker picker ---
   V1's `Pilih Karyawan` modal. Every value below is copied from V1's own page-inline block
   (`display/kitchen/board.blade.php:222-240` for the overlay and card, `:419-441` for the title,
   select, option list, action row and the two buttons), because that screen IS the specification:
   the picker is the workflow V1 makes a cook name a person before a work stage is entered. */
.kds-worker-modal {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, .68);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 50;
    backdrop-filter: blur(4px);
}

.kds-worker-modal.is-open { display: flex; }

.kds-worker-card {
    width: min(92vw, 360px);
    background: linear-gradient(160deg, rgba(15, 23, 42, .86) 0%, rgba(30, 41, 59, .80) 100%);
    border: 1px solid rgba(148, 163, 184, .32);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 18px 34px rgba(2, 6, 23, .52);
    backdrop-filter: blur(10px);
}

.kds-worker-title { font-size: 17px; font-weight: 700; margin-bottom: 10px; color: #e2e8f0; }

.kds-worker-select {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, .42);
    background: rgba(15, 23, 42, .72);
    color: #e2e8f0;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 15px;
    outline: none;
}

.kds-worker-select:focus {
    border-color: rgba(125, 211, 252, .9);
    box-shadow: 0 0 0 2px rgba(56, 189, 248, .28);
}

.kds-worker-select option {
    background: #0f172a;
    color: #e2e8f0;
}

.kds-worker-actions { margin-top: 12px; display: flex; justify-content: flex-end; gap: 8px; }

.kds-btn-primary, .kds-btn-secondary {
    border: 0;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.kds-btn-primary { background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%); color: #fff; border: 1px solid rgba(147, 197, 253, .35); }
.kds-btn-secondary { background: rgba(51, 65, 85, .62); color: #e2e8f0; border: 1px solid rgba(148, 163, 184, .28); }

/* =================================================================================================
 * Best Seller / customer display board (V1 `best-seller/index.blade.php`, read-only 2026-11-04).
 *
 * The structure, the panel order and the queue-bubble semantics are V1's (`.screen` >
 * `.surface.top` rotator + `.surface.bottom` chart, `:1295-1518`, and the bubble at `:1313-1318`).
 * This block is the functional port: a merchant gets a full-screen board with the two rotating
 * panels, the donut and its legend, the scheduled information line and the queue bubble. V1's own
 * stylesheet inside that Blade runs to ~1,300 lines of animation and shape detail and is copied in
 * a follow-up, so this is NOT yet a pixel match — and until V1's display host is reachable again
 * (the TLS incident gate) there is no honest side-by-side capture to call one.
 * ============================================================================================== */
.bs-screen { position: fixed; inset: 0; display: flex; flex-direction: column; background: #0b1220; color: #e6edf7; font-family: Roboto, "Helvetica Neue", Arial, sans-serif; overflow: hidden; }
.bs-screen[data-theme="light"] { background: #f4f6fb; color: #101828; }
.bs-screen[data-orientation="portrait"] { justify-content: flex-start; }

.bs-surface { display: flex; flex-direction: column; min-height: 0; }
.bs-top { flex: 1 1 auto; padding: 24px 28px 8px; }
.bs-bottom { display: grid; grid-template-rows: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; flex: 0 0 38%; padding: 8px 28px 24px; }

.bs-rotator { position: relative; flex: 1 1 auto; min-height: 0; }
.bs-panel { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 16px; opacity: 0; transition: opacity .55s ease; pointer-events: none; }
.bs-panel.active { opacity: 1; pointer-events: auto; }
.bs-screen[data-transition="slide_up"] .bs-panel { transform: translateY(24px); }
.bs-screen[data-transition="slide_up"] .bs-panel.active { transform: none; }
.bs-screen[data-transition="slide_left"] .bs-panel { transform: translateX(24px); }
.bs-screen[data-transition="slide_left"] .bs-panel.active { transform: none; }

.bs-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.bs-hero-main { font-size: clamp(26px, 3.4vw, 54px); font-weight: 800; letter-spacing: .5px; }
.bs-hero-sub { font-size: clamp(13px, 1.1vw, 20px); text-transform: uppercase; letter-spacing: 3px; opacity: .62; }
.bs-panel-head-right { display: flex; align-items: center; gap: 10px; }

.bs-queue-bubble { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 104px; padding: 8px 14px; border-radius: 14px; border: 1px solid rgba(148,163,184,.34); }
.bs-queue-label { font-size: 11px; text-transform: uppercase; letter-spacing: 1.4px; opacity: .78; }
.bs-queue-count { font-size: 26px; font-weight: 800; }
.bs-queue-bubble.queue-green { background: rgba(34,197,94,.16); color: #22c55e; border-color: rgba(34,197,94,.42); }
.bs-queue-bubble.queue-orange { background: rgba(245,158,11,.16); color: #f59e0b; border-color: rgba(245,158,11,.42); }
.bs-queue-bubble.queue-red { background: rgba(239,68,68,.16); color: #ef4444; border-color: rgba(239,68,68,.42); }

.bs-quick-btn { width: 40px; height: 40px; border-radius: 10px; border: 1px solid rgba(148,163,184,.3); background: rgba(15,23,42,.5); color: inherit; font-size: 18px; cursor: pointer; }
.bs-quick-menu { position: relative; }
.bs-quick-menu summary { list-style: none; }
.bs-quick-menu summary::-webkit-details-marker { display: none; }
.bs-quick-panel { position: absolute; right: 0; top: 46px; z-index: 6; min-width: 220px; padding: 12px; border-radius: 12px; border: 1px solid rgba(148,163,184,.3); background: #0f172a; box-shadow: 0 18px 40px rgba(2,6,23,.45); }
.bs-screen[data-theme="light"] .bs-quick-panel { background: #fff; }
.bs-menu-outlet { font-weight: 700; }
.bs-menu-mode { font-size: 12px; opacity: .7; letter-spacing: .6px; margin-bottom: 10px; }
.bs-menu-logout { width: 100%; padding: 8px 10px; border-radius: 9px; border: 1px solid rgba(148,163,184,.3); background: rgba(239,68,68,.12); color: #fca5a5; cursor: pointer; }

.bs-cards { display: grid; gap: 16px; flex: 1 1 auto; min-height: 0; align-content: start; }
.bs-cards.grid-1x1 { grid-template-columns: 1fr; }
.bs-cards.grid-2x2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bs-cards.grid-3x3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bs-screen[data-orientation="portrait"] .bs-cards.grid-3x3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.bs-card { display: flex; flex-direction: column; min-height: 0; border-radius: 16px; overflow: hidden; border: 1px solid rgba(148,163,184,.22); background: rgba(15,23,42,.55); }
.bs-screen[data-theme="light"] .bs-card { background: #fff; }
.bs-card-image-wrap { flex: 1 1 auto; min-height: 90px; background: rgba(30,41,59,.5); }
.bs-card-image { width: 100%; height: 100%; object-fit: cover; display: block; }
.bs-card-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; }
.bs-card-title-row { display: flex; align-items: baseline; gap: 8px; }
.bs-card-rank { font-size: 12px; font-weight: 800; opacity: .55; }
.bs-card-name { font-size: clamp(14px, 1.25vw, 22px); font-weight: 700; }
.bs-card-price { font-size: clamp(13px, 1.1vw, 19px); color: #22c55e; font-weight: 700; }
.bs-card-qty { font-size: 12px; opacity: .66; }
.bs-card.new-shape .bs-card-image-wrap { min-height: 120px; }
.bs-empty { grid-column: 1 / -1; align-self: center; text-align: center; opacity: .6; padding: 40px 0; }

.bs-chart-wrap { display: flex; flex-direction: column; gap: 8px; height: 100%; }
.bs-chart-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.bs-chart-title { font-size: clamp(15px, 1.3vw, 22px); font-weight: 800; }
.bs-chart-mode { font-size: 12px; text-transform: uppercase; letter-spacing: 1.6px; opacity: .62; }
.bs-chart-stage { display: flex; align-items: center; gap: 22px; flex: 1 1 auto; min-height: 0; }
.bs-donut-layout { display: flex; align-items: center; gap: 22px; flex: 1 1 auto; min-height: 0; }
.bs-donut-wrap { flex: 0 0 clamp(110px, 12vw, 190px); }
.bs-donut { width: clamp(110px, 12vw, 190px); aspect-ratio: 1 / 1; border-radius: 50%; background: var(--bs-donut-bg); position: relative; }
.bs-donut-center { position: absolute; inset: 26%; border-radius: 50%; background: #0b1220; }
.bs-screen[data-theme="light"] .bs-donut-center { background: #f4f6fb; }
.bs-legend { display: flex; flex-direction: column; gap: 6px; min-width: 0; overflow: hidden; }
.bs-legend-item { display: grid; grid-template-columns: 12px 1fr auto; align-items: center; gap: 8px; font-size: clamp(12px, .95vw, 16px); }
.bs-legend-color { width: 12px; height: 12px; border-radius: 3px; }
.bs-legend-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bs-legend-value { font-variant-numeric: tabular-nums; font-weight: 700; }

/* V1 `.info-rotator` (`:1193-1202`) — the information card is a panel, not a line, because the
 * three CFD overlays are positioned inside it and it has to be a surface worth looking at while a
 * customer is paying. `--border` is inlined as V1's own resolved values. */
.bs-info {
    width: 100%;
    min-height: 100%;
    display: flex;
    align-items: center;
    border-radius: 12px;
    border: 1px solid rgba(145, 173, 225, 0.25);
    background: linear-gradient(120deg, rgba(46, 197, 255, 0.3), rgba(255, 194, 75, 0.24) 54%, rgba(75, 224, 143, 0.2));
    padding: 14px;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.09);
}
.bs-screen[data-theme="light"] .bs-info { border-color: rgba(31, 64, 124, 0.18); }
.bs-info-item { display: none; font-size: clamp(13px, 1.15vw, 20px); letter-spacing: .3px; opacity: .9; }
.bs-info-item.active { display: block; }

/* =================================================================================================
 * Best Seller / customer display board — CFD inline card (V1 `:1625-1968`).
 *
 * V1 traces (READ_ONLY, 2026-11-04): `okepos-cloud/resources/views/best-seller/index.blade.php`
 * — the layout hooks the card depends on: `body.layout-portrait.cfd-active .screen` `:220-222`
 * (the top surface grows to 75% so the bill gets the screen), `.bottom` `:945-951` (a grid of two
 * rows, chart above the information card), `.info-rotator` `:1193-1202` (the box the three overlays
 * are positioned inside), and the card itself `:1626-1728` with the QRIS / payment-method / success
 * overlays `:1730-1952` and their keyframes `:1954-1968`.
 *
 * `--border` is V1's own variable, defined in the Blade it was written against; since it resolves to
 * a literal here, both of its values are inlined exactly — `rgba(145,173,225,0.25)` for the dark
 * theme (`:173`) and `rgba(31,64,124,0.18)` for the light one (`:189`). Nothing in this block is a
 * new design decision.
 * ============================================================================================== */
.bs-screen.cfd-active .bs-bottom { flex: 0 0 25%; }

.cfd-card-inline {
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    min-height: 0;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 20px;
    padding: 16px 20px;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.6);
    color: #ffffff;
    backdrop-filter: blur(16px);
    box-sizing: border-box;
    overflow: hidden;
}
.cfd-container-inline {
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: 100%;
    width: 100%;
    min-height: 0;
}
.cfd-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 8px;
    flex-wrap: wrap;
    gap: 8px;
    flex-shrink: 0;
}
.cfd-title { font-size: 1.15rem; font-weight: 800; letter-spacing: -0.3px; }
.cfd-status-badge {
    font-size: 0.8rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 99px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.cfd-status-badge.pending { background: rgba(245, 158, 11, 0.2); border: 1px solid #f59e0b; color: #fbbf24; }
.cfd-status-badge.success { background: rgba(16, 185, 129, 0.2); border: 1px solid #10b981; color: #34d399; }
.cfd-status-badge.cancelled { background: rgba(239, 68, 68, 0.2); border: 1px solid #ef4444; color: #f87171; }
.cfd-body-inline {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    align-items: stretch;
    flex: 1;
    min-height: 0;
}
.cfd-receipt-card {
    background: rgba(0, 0, 0, 0.25);
    border-radius: 16px;
    padding: 14px 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-height: 0;
    height: 100%;
    box-sizing: border-box;
}
.cfd-items-list {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 4px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    padding-right: 6px;
    margin-bottom: auto;
}
.cfd-items-list::-webkit-scrollbar { width: 6px; }
.cfd-items-list::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.2); border-radius: 4px; }

/* QRIS Overlay di dalam Card Informasi Outlet (Bagian Bawah) */
.cfd-qris-bottom-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.94));
    border: 2px solid rgba(56, 189, 248, 0.6);
    box-shadow: inset 0 0 25px rgba(56, 189, 248, 0.2), 0 10px 30px rgba(0, 0, 0, 0.5);
    border-radius: 12px;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 12px 24px;
    box-sizing: border-box;
    animation: cfdFadeIn 300ms ease-out forwards;
}
.cfd-qris-badge-tag {
    position: absolute;
    top: 8px;
    left: 16px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.8px;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.15);
    padding: 2px 8px;
    border-radius: 6px;
    border: 1px solid rgba(56, 189, 248, 0.3);
}
.cfd-qris-qr-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    flex-shrink: 0;
}
.cfd-qris-qr-wrap img {
    height: 70%;
    width: auto;
    aspect-ratio: 1 / 1;
    max-height: 100%;
    object-fit: contain;
    border-radius: 12px;
    background: #ffffff;
    padding: 8px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45);
    box-sizing: border-box;
}
.cfd-qris-info-col {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
}

/* QRIS Success Overlay */
.cfd-qris-success-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(6, 78, 59, 0.96), rgba(15, 23, 42, 0.96));
    border: 2px solid rgba(16, 185, 129, 0.8);
    box-shadow: inset 0 0 35px rgba(16, 185, 129, 0.3), 0 10px 30px rgba(0, 0, 0, 0.6);
    border-radius: 12px;
    z-index: 22;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 12px 28px;
    box-sizing: border-box;
    animation: cfdFadeIn 350ms ease-out forwards;
}
.cfd-success-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    flex-shrink: 0;
}
.cfd-checkmark-svg {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: block;
    stroke-width: 3.5;
    stroke: #10b981;
    stroke-miterlimit: 10;
    box-shadow: inset 0 0 0 #10b981;
    animation: cfdFill 0.4s ease-in-out 0.4s forwards, cfdScale 0.3s ease-in-out 0.9s both;
}
.cfd-checkmark-circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 3.5;
    stroke-miterlimit: 10;
    stroke: #10b981;
    fill: none;
    animation: cfdStroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}
.cfd-checkmark-check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    stroke-width: 4;
    animation: cfdStroke 0.35s cubic-bezier(0.65, 0, 0.45, 1) 0.65s forwards;
}
.cfd-success-info-col {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
}
.cfd-success-title {
    font-size: 1.15rem;
    font-weight: 900;
    color: #34d399;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}
.cfd-success-amount {
    font-size: 1.6rem;
    font-weight: 900;
    color: #ffffff;
    line-height: 1.2;
    margin: 2px 0 4px;
}

/* Non-QRIS Payment Method Overlay (Tunai, EDC, Transfer, dll) */
.cfd-payment-method-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.97), rgba(30, 41, 59, 0.95));
    border: 2px solid rgba(56, 189, 248, 0.5);
    box-shadow: inset 0 0 25px rgba(56, 189, 248, 0.15), 0 10px 30px rgba(0, 0, 0, 0.5);
    border-radius: 12px;
    z-index: 21;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 12px 24px;
    box-sizing: border-box;
    animation: cfdFadeIn 300ms ease-out forwards;
}
.cfd-payment-icon-wrap {
    width: 70px;
    height: 70px;
    border-radius: 14px;
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    flex-shrink: 0;
}
.cfd-payment-info-col {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
}
.cfd-payment-tag {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.8px;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.15);
    padding: 2px 8px;
    border-radius: 6px;
    border: 1px solid rgba(56, 189, 248, 0.3);
    display: inline-block;
    margin-bottom: 4px;
    align-self: flex-start;
}
.cfd-payment-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.cfd-payment-instruction { font-size: 0.78rem; opacity: 0.8; margin: 2px 0 6px; }
.cfd-payment-total-pill {
    font-size: 0.85rem;
    color: #e2e8f0;
    display: flex;
    align-items: center;
    gap: 6px;
}
.cfd-payment-total-pill strong { font-size: 1.15rem; color: #38bdf8; font-weight: 800; }

.cfd-success-details {
    font-size: 0.82rem;
    opacity: 0.95;
    color: #e2e8f0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    margin-top: 4px;
}
.cfd-detail-badge {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 3px 10px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.cfd-detail-badge span {
    opacity: 0.75;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

@keyframes cfdStroke { 100% { stroke-dashoffset: 0; } }
@keyframes cfdScale {
    0%, 100% { transform: none; }
    50% { transform: scale3d(1.15, 1.15, 1); }
}
@keyframes cfdFill { 100% { box-shadow: inset 0 0 0 40px rgba(16, 185, 129, 0.2); } }
@keyframes cfdFadeIn {
    from { opacity: 0; transform: scale(0.97); }
    to { opacity: 1; transform: scale(1); }
}

.bs-disabled-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(2,6,23,.82); backdrop-filter: blur(2px); }
.bs-disabled-words { font-size: clamp(16px, 1.6vw, 26px); font-weight: 700; }
