/* =========================================================
   Kasir Warung — cashier UI
   ========================================================= */

:root {
    --bg: #f5efe4;
    --paper: #fffdf8;
    --ink: #241d17;
    --muted: #857463;
    --line: #e9ddcc;
    --brand: #9c2d1e;
    --brand-2: #c0432a;
    --gold: #e5a53d;
    --green: #2e7d5b;
    --danger: #b3261e;
    --dark: #241a15;
    --radius: 18px;
    --shadow: 0 14px 34px rgba(52, 35, 20, 0.09);
    --shadow-soft: 0 4px 14px rgba(52, 35, 20, 0.06);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Segoe UI", "Inter", system-ui, -apple-system, sans-serif;
    color: var(--ink);
    background:
        radial-gradient(900px 500px at 85% -10%, rgba(229, 165, 61, 0.18), transparent 60%),
        radial-gradient(700px 420px at -10% 20%, rgba(156, 45, 30, 0.12), transparent 55%),
        var(--bg);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p {
    margin: 0;
}

button,
input,
textarea {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
}

.muted {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

/* ============================ Buttons ============================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid transparent;
    border-radius: 12px;
    padding: 11px 18px;
    font-weight: 600;
    font-size: 14px;
    line-height: 1;
    transition: transform 0.08s ease, box-shadow 0.16s ease, background 0.16s ease, opacity 0.16s ease;
    white-space: nowrap;
}

.btn:active:not(:disabled) {
    transform: translateY(1px);
}

.btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.btn.primary {
    background: linear-gradient(180deg, var(--brand-2), var(--brand));
    color: #fff7ef;
    box-shadow: 0 8px 18px rgba(156, 45, 30, 0.24);
}

.btn.primary:hover:not(:disabled) {
    box-shadow: 0 10px 22px rgba(156, 45, 30, 0.32);
}

.btn.ghost {
    background: transparent;
    color: var(--ink);
    border-color: var(--line);
}

.btn.ghost:hover:not(:disabled) {
    background: rgba(36, 29, 23, 0.05);
}

.btn.ghost.light {
    color: #f4e9d9;
    border-color: rgba(244, 233, 217, 0.28);
}

.btn.ghost.light:hover:not(:disabled) {
    background: rgba(244, 233, 217, 0.12);
}

.btn.icon {
    padding: 9px;
    min-width: 38px;
    min-height: 38px;
    border-radius: 10px;
}

.btn.block {
    width: 100%;
}

.btn:focus-visible,
.menu-card:focus-visible,
.chip:focus-visible,
.segmented button:focus-visible,
.qty-stepper button:focus-visible {
    outline: 3px solid rgba(229, 165, 61, 0.65);
    outline-offset: 2px;
}

/* ============================= Login ============================= */

.login-screen {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    gap: 48px;
    max-width: 1080px;
    margin: 0 auto;
    padding: 40px 28px;
}

.login-brand {
    padding: 36px;
    border-radius: 28px;
    background:
        linear-gradient(150deg, rgba(36, 26, 21, 0.96), rgba(82, 36, 22, 0.94)),
        var(--dark);
    color: #f6ead8;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.login-brand::after {
    content: "";
    position: absolute;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    border: 34px solid rgba(229, 165, 61, 0.16);
    right: -120px;
    bottom: -140px;
}

.login-brand h1 {
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(28px, 3.4vw, 40px);
    line-height: 1.14;
    letter-spacing: -0.4px;
    margin: 22px 0 10px;
    max-width: 16ch;
}

.login-brand p {
    color: rgba(246, 234, 216, 0.7);
    font-size: 14px;
}

.login-points {
    margin: 30px 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 12px;
    font-size: 14px;
    color: rgba(246, 234, 216, 0.88);
}

.login-points li {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.login-points li::before {
    content: "✓";
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    border-radius: 50%;
    background: rgba(229, 165, 61, 0.22);
    color: var(--gold);
    font-size: 12px;
    margin-top: 1px;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 13px;
    background: linear-gradient(150deg, var(--gold), #c98224);
    color: #2a1a11;
    font-weight: 800;
    font-size: 16px;
    letter-spacing: 0.5px;
    box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.18);
}

.brand-mark.big {
    width: 58px;
    height: 58px;
    font-size: 20px;
    border-radius: 17px;
}

.brand-logo {
    display: block;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border-radius: 13px;
    object-fit: cover;
    background: #fff;
    border: 1px solid rgba(246, 234, 216, 0.22);
    box-shadow: 0 4px 12px rgba(36, 26, 21, 0.18);
}

.brand-logo.big {
    width: 58px;
    height: 58px;
    flex-basis: 58px;
    border-radius: 17px;
}

.login-card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 30px;
    box-shadow: var(--shadow);
    display: grid;
    gap: 16px;
    max-width: 420px;
    width: 100%;
    justify-self: center;
}

.login-card h2 {
    font-size: 22px;
    letter-spacing: -0.3px;
}

.login-card .btn {
    margin-top: 4px;
    padding-block: 13px;
}

.login-hint {
    text-align: center;
    font-size: 12px;
    color: var(--muted);
}

.login-hint code {
    background: #f1e6d5;
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 11px;
}

/* ============================= Fields ============================ */

.field {
    display: grid;
    gap: 7px;
    font-size: 13px;
    font-weight: 600;
    color: #4b3d31;
}

.field span {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--muted);
}

.field input,
.field textarea,
.field select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fffefa;
    font-size: 15px;
    font-weight: 500;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field select {
    cursor: pointer;
}

.field select:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.field textarea {
    min-height: 64px;
    line-height: 1.5;
    resize: vertical;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 4px rgba(229, 165, 61, 0.18);
}

.field.compact input {
    padding: 10px 12px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.form-error {
    margin: 0;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(179, 38, 30, 0.08);
    border: 1px solid rgba(179, 38, 30, 0.22);
    color: var(--danger);
    font-size: 13px;
    line-height: 1.45;
    font-weight: 500;
}

/* ============================== App ============================= */

.app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 12px 22px;
    background: linear-gradient(120deg, rgba(36, 26, 21, 0.98), rgba(58, 30, 20, 0.97));
    color: #f6ead8;
    box-shadow: 0 6px 22px rgba(36, 26, 21, 0.25);
    backdrop-filter: blur(8px);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
    min-width: 0;
}

.brand-text strong {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.brand-text span {
    font-size: 11px;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: rgba(246, 234, 216, 0.55);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.shift-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(229, 165, 61, 0.14);
    border: 1px solid rgba(229, 165, 61, 0.3);
    color: #f0c887;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.shift-pill::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 0 3px rgba(229, 165, 61, 0.18);
}

.shift-pill.closed {
    background: rgba(246, 234, 216, 0.08);
    border-color: rgba(246, 234, 216, 0.2);
    color: rgba(246, 234, 216, 0.75);
}

.shift-pill.closed::before {
    background: rgba(246, 234, 216, 0.5);
    box-shadow: none;
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 6px 12px 6px 6px;
    border-radius: 999px;
    background: rgba(246, 234, 216, 0.08);
    border: 1px solid rgba(246, 234, 216, 0.12);
}

.avatar {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(150deg, var(--gold), #c98224);
    color: #2a1a11;
    font-weight: 800;
    font-size: 13px;
}

.user-meta {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.user-meta strong {
    font-size: 12.5px;
    font-weight: 600;
}

.user-meta small {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: rgba(246, 234, 216, 0.5);
}

/* ============================= Layout ============================ */

.pos {
    flex: 1;
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 20px 22px 26px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 396px;
    gap: 20px;
    align-items: start;
}

.catalog {
    min-width: 0;
}

.catalog-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.catalog-head h2 {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 25px;
    letter-spacing: -0.3px;
    margin-bottom: 2px;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 0 12px;
    color: var(--muted);
    box-shadow: var(--shadow-soft);
    min-width: 210px;
}

.search-box input {
    border: none;
    background: transparent;
    outline: none;
    padding: 11px 0;
    font-size: 14px;
    width: 100%;
    color: var(--ink);
}

.chips {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 6px;
    margin-bottom: 14px;
    scrollbar-width: thin;
}

.chip {
    border: 1px solid var(--line);
    background: var(--paper);
    color: #5d4c3d;
    border-radius: 999px;
    padding: 8px 15px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.15s ease;
}

.chip:hover {
    border-color: #d8c5ab;
}

.chip.active {
    background: var(--dark);
    border-color: var(--dark);
    color: #f6ead8;
    box-shadow: 0 6px 14px rgba(36, 26, 21, 0.2);
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(172px, 1fr));
    gap: 12px;
}

.menu-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    text-align: left;
    padding: 0;
    overflow: hidden;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    transition: transform 0.12s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    min-height: 132px;
}

.menu-card::after {
    content: "+";
    position: absolute;
    z-index: 2;
    top: 10px;
    right: 10px;
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 253, 248, 0.92);
    color: var(--brand);
    box-shadow: 0 4px 10px rgba(36, 26, 21, 0.16);
    font-weight: 700;
    font-size: 15px;
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.menu-card:hover {
    transform: translateY(-2px);
    border-color: #dbc6a8;
    box-shadow: var(--shadow);
}

.menu-card:hover::after {
    background: var(--brand);
    color: #fff;
    transform: scale(1.06);
}

.menu-photo {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #f3e7d3;
}

.menu-photo-img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.menu-card:hover .menu-photo-img {
    transform: scale(1.04);
}

.menu-tag {
    position: absolute;
    left: 9px;
    bottom: 9px;
    max-width: calc(100% - 44px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(255, 251, 243, 0.94);
    color: #7b5a2c;
    box-shadow: 0 3px 8px rgba(36, 26, 21, 0.12);
}

.menu-tag.drink {
    background: rgba(238, 247, 237, 0.94);
    color: #38694b;
}

.menu-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 7px;
    padding: 12px 13px 13px;
}

.menu-name {
    font-size: 14.5px;
    font-weight: 650;
    line-height: 1.3;
    letter-spacing: -0.1px;
    padding-right: 10px;
}

.menu-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 4px 8px;
    margin-top: auto;
}

.menu-price {
    font-size: 15px;
    font-weight: 750;
    color: var(--brand);
}

.menu-meta {
    font-size: 10.5px;
    color: var(--muted);
}

.empty-state {
    padding: 40px;
    text-align: center;
    color: var(--muted);
    font-size: 14px;
}

/* ============================== Cart ============================= */

.cart {
    position: sticky;
    top: 84px;
    display: flex;
    flex-direction: column;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: var(--shadow);
    max-height: calc(100vh - 104px);
    overflow: hidden;
}

.cart-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px dashed var(--line);
}

.cart-head h2 {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 20px;
}

.segmented {
    display: inline-flex;
    padding: 3px;
    border-radius: 10px;
    background: #f2e8d9;
    gap: 2px;
}

.segmented button {
    border: none;
    background: transparent;
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 11.5px;
    font-weight: 650;
    color: #7c6754;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.segmented button.active {
    background: #fff;
    color: var(--brand);
    box-shadow: 0 2px 6px rgba(52, 35, 20, 0.12);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 8px 12px;
    min-height: 140px;
}

.cart-empty {
    display: grid;
    place-items: center;
    text-align: center;
    gap: 4px;
    padding: 38px 16px;
    color: var(--muted);
}

.cart-empty-icon {
    font-size: 30px;
    filter: grayscale(0.2);
    margin-bottom: 2px;
}

.cart-empty p {
    font-size: 14px;
    font-weight: 650;
    color: #6e5b49;
}

.cart-empty small {
    font-size: 12px;
}

.cart-item {
    padding: 12px 8px;
    border-bottom: 1px dashed #efe4d4;
    display: grid;
    gap: 9px;
}

.cart-item:last-child {
    border-bottom: none;
}

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

.ci-main {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.ci-name {
    font-size: 13.5px;
    font-weight: 650;
    line-height: 1.3;
}

.ci-mods {
    font-size: 11.5px;
    color: #8a6c3f;
}

.ci-note {
    font-size: 11.5px;
    color: var(--muted);
    font-style: italic;
}

.ci-price {
    font-size: 13.5px;
    font-weight: 700;
    white-space: nowrap;
}

.ci-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.ci-remove {
    border: none;
    background: transparent;
    color: #a08a76;
    font-size: 11.5px;
    font-weight: 600;
    padding: 4px 2px;
    border-radius: 6px;
}

.ci-remove:hover {
    color: var(--danger);
}

.qty-stepper,
.ci-stepper {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
    background: #fffefa;
}

.qty-stepper button,
.ci-stepper button {
    border: none;
    background: transparent;
    width: 32px;
    height: 30px;
    font-size: 16px;
    font-weight: 700;
    color: var(--brand);
    display: grid;
    place-items: center;
}

.qty-stepper button:hover,
.ci-stepper button:hover {
    background: #f5ebdd;
}

.qty-stepper span,
.ci-stepper span {
    min-width: 30px;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
}

.cart-foot {
    padding: 14px 18px 16px;
    border-top: 1px solid var(--line);
    background: linear-gradient(180deg, #fffdf9, #fdf7ec);
    display: grid;
    gap: 12px;
}

.total-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    font-size: 14px;
    color: var(--muted);
    font-weight: 600;
}

.total-row strong {
    font-size: 24px;
    color: var(--ink);
    font-weight: 800;
    letter-spacing: -0.6px;
}

.pay-tabs {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(78px, 1fr));
}

.pay-tabs button {
    padding: 9px 6px;
    font-size: 12.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cash-panel {
    display: grid;
    gap: 9px;
}

.quick-cash {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.quick-cash button {
    border: 1px solid var(--line);
    background: #fffefa;
    border-radius: 8px;
    padding: 7px 10px;
    font-size: 11.5px;
    font-weight: 650;
    color: #5f4c3b;
}

.quick-cash button:hover {
    border-color: var(--gold);
    background: #fdf3e2;
}

.change-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--muted);
    font-weight: 600;
}

.change-row strong {
    font-size: 16px;
    color: var(--green);
}

.change-row.negative strong {
    color: var(--danger);
}

.qris-note {
    margin: 0;
    padding: 11px 12px;
    background: #eef4ef;
    border: 1px dashed #bcd6c3;
    border-radius: 10px;
    color: #35634a;
    font-size: 12.5px;
    line-height: 1.4;
}

.pay-btn {
    padding-block: 15px;
    font-size: 15px;
    border-radius: 14px;
}

.pay-hint {
    text-align: center;
    font-size: 11.5px;
    color: var(--muted);
}

/* ============================= Dialogs =========================== */

dialog.modal {
    border: none;
    padding: 0;
    background: transparent;
    width: min(540px, 94vw);
    max-height: 92vh;
    color: var(--ink);
}

dialog.modal::backdrop {
    background: rgba(30, 20, 14, 0.55);
    backdrop-filter: blur(3px);
}

.modal-card {
    background: var(--paper);
    border-radius: 22px;
    padding: 22px;
    box-shadow: 0 30px 70px rgba(20, 12, 6, 0.4);
    display: grid;
    gap: 16px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
}

.modal-head h2 {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 21px;
    letter-spacing: -0.3px;
    margin-bottom: 3px;
}

.modifier-list {
    display: grid;
    gap: 8px;
}

.modifier-option {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fffefa;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
    font-size: 14px;
}

.modifier-option:hover {
    border-color: #d9c3a3;
}

.modifier-option:has(input:checked) {
    border-color: var(--gold);
    background: #fdf4e4;
}

.modifier-option input {
    accent-color: var(--brand);
    width: 17px;
    height: 17px;
}

.modifier-option .mod-price {
    margin-left: auto;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--brand);
}

.modal-foot,
.modal-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.modal-actions {
    justify-content: flex-end;
}

.modal-actions .btn {
    flex: 1;
    min-width: 140px;
}

.modal-foot .btn.primary {
    flex: 1;
}

/* Receipt */

.receipt-modal {
    width: min(400px, 94vw);
}

.receipt-badge {
    padding: 12px 14px;
    border-radius: 12px;
    background: #eaf3ec;
    border: 1px solid #c4ddca;
    color: #275c41;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.45;
}

.receipt-badge strong {
    display: block;
    font-size: 18px;
    letter-spacing: -0.2px;
}

.ticket {
    background:
        repeating-linear-gradient(0deg, #fffefa, #fffefa 27px, #faf3e6 28px);
    border: 1px solid #eee1cf;
    border-radius: 8px;
    padding: 14px 12px;
    overflow-x: auto;
    box-shadow: inset 0 2px 8px rgba(90, 60, 30, 0.04);
}

.ticket pre {
    margin: 0;
    font-family: "Courier New", ui-monospace, SFMono-Regular, monospace;
    font-size: 12px;
    line-height: 1.5;
    white-space: pre;
    color: #2a241d;
}

.close-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.close-stat {
    background: #f8f0e2;
    border: 1px solid #efe1cc;
    border-radius: 12px;
    padding: 11px 13px;
    display: grid;
    gap: 3px;
}

.close-stat span {
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    color: var(--muted);
    font-weight: 700;
}

.close-stat strong {
    font-size: 16px;
    letter-spacing: -0.2px;
}

.close-stat.wide {
    grid-column: 1 / -1;
}

.close-stat.highlight {
    background: #eaf3ec;
    border-color: #c4ddca;
}

.close-stat.highlight strong {
    color: #275c41;
}

/* ============================== Toasts =========================== */

.toasts {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 80;
    display: grid;
    gap: 10px;
    width: min(380px, calc(100vw - 36px));
}

.toast {
    background: #2b211a;
    color: #f6ead8;
    border-radius: 14px;
    padding: 13px 15px;
    box-shadow: 0 16px 36px rgba(20, 12, 6, 0.35);
    border-left: 4px solid var(--gold);
    font-size: 13px;
    line-height: 1.45;
    animation: toast-in 0.2s ease;
}

.toast strong {
    display: block;
    margin-bottom: 3px;
    font-size: 13.5px;
}

.toast.error {
    border-left-color: #e2685c;
}

.toast ul {
    margin: 6px 0 0;
    padding-left: 18px;
    color: rgba(246, 234, 216, 0.82);
}

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

/* ============================== Print ============================ */

#print-area {
    display: none;
}

@media print {
    body > *:not(#print-area) {
        display: none !important;
    }

    body {
        background: #fff;
    }

    #print-area {
        display: block !important;
    }

    #print-area pre {
        margin: 0;
        width: 72mm;
        font-family: "Courier New", monospace;
        font-size: 11pt;
        line-height: 1.35;
        white-space: pre;
        color: #000;
    }

    @page {
        margin: 4mm;
    }
}

/* ============================ Responsive ========================= */

@media (max-width: 1120px) {
    .pos {
        grid-template-columns: minmax(0, 1fr) 360px;
    }

    .user-meta {
        display: none;
    }
}

@media (max-width: 900px) {
    .login-screen {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 24px 18px;
    }

    .login-brand {
        padding: 26px;
    }

    .login-brand h1 {
        font-size: 28px;
    }

    .login-points {
        display: none;
    }

    .login-card {
        max-width: none;
    }

    .pos {
        grid-template-columns: 1fr;
        padding: 16px 14px 24px;
    }

    .cart {
        position: static;
        max-height: none;
    }

    .cart-items {
        max-height: 320px;
    }

    .catalog-head {
        align-items: stretch;
        flex-direction: column;
        gap: 10px;
    }

    .search-box {
        width: 100%;
    }

    .topbar {
        padding: 10px 14px;
        gap: 10px;
    }

    .brand-text strong {
        font-size: 14px;
    }

    .shift-pill {
        display: none;
    }

    .menu-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

@media (max-width: 700px) {
    .history-link .history-link-text {
        display: none;
    }

    .history-link {
        padding-inline: 12px;
    }
}

@media (max-width: 520px) {
    .topbar-right {
        gap: 6px;
    }

    .topbar .user-chip {
        display: none;
    }

    .topbar .brand-text {
        display: none;
    }

    .btn.ghost.light {
        padding-inline: 12px;
    }

    .menu-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .menu-card {
        min-height: 118px;
        padding: 12px;
    }

    .close-summary {
        grid-template-columns: 1fr;
    }
}

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

/* ============================ Riwayat ============================ */

.history-login {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 40px 18px;
}

.history-login .login-card {
    max-width: 440px;
}

.history-login-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.history-login-brand h2 {
    font-size: 20px;
    letter-spacing: -0.3px;
}

.history-login .login-hint a {
    color: var(--brand);
    text-decoration: none;
    font-weight: 600;
}

.history-login .login-hint a:hover {
    text-decoration: underline;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    flex: none;
    border-radius: 12px;
    background: linear-gradient(150deg, var(--gold), var(--brand-2));
    color: #2b1a12;
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.4px;
    box-shadow: 0 6px 16px rgba(156, 45, 30, 0.22);
}

.brand-mark.big {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    font-size: 22px;
}

.history {
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    padding: 26px 22px 48px;
    display: grid;
    gap: 16px;
}

.history-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.history-head h1 {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 26px;
    letter-spacing: -0.4px;
    margin-bottom: 4px;
}

.range-chips {
    margin: 0;
    padding: 0;
    gap: 6px;
}

.history-filters {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    padding: 14px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow-soft);
}

.history-search {
    flex: 1 1 240px;
    min-width: 220px;
    box-shadow: none;
}

.history-filters .field {
    flex: 0 1 150px;
    min-width: 130px;
}

.history-filters .field select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fffefa;
    font-size: 14px;
    font-weight: 600;
    accent-color: var(--brand);
}

.history-filters .field select:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 4px rgba(229, 165, 61, 0.18);
}

.history-filters .btn {
    margin-left: auto;
}

.history-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.summary-stat {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 12px 15px;
    display: grid;
    gap: 3px;
    box-shadow: var(--shadow-soft);
}

.summary-stat span {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.7px;
    text-transform: uppercase;
    color: var(--muted);
}

.summary-stat strong {
    font-size: 18px;
    letter-spacing: -0.3px;
}

.history-list {
    display: grid;
    gap: 9px;
}

.order-card {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 0.9fr) auto;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 14px 16px;
    text-align: left;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow-soft);
    transition: transform 0.12s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.order-card:hover {
    transform: translateY(-1px);
    border-color: #dbc6a8;
    box-shadow: var(--shadow);
}

.order-card:focus-visible {
    outline: 3px solid rgba(229, 165, 61, 0.65);
    outline-offset: 2px;
}

.oc-main {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.oc-line {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
}

.oc-invoice {
    font-family: "Courier New", ui-monospace, monospace;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.oc-meta {
    font-size: 12.5px;
    color: var(--muted);
    line-height: 1.4;
}

.oc-mid {
    display: grid;
    gap: 3px;
    font-size: 12.5px;
    color: var(--muted);
    line-height: 1.4;
}

.oc-mid strong {
    font-size: 13px;
    color: #4b3d31;
    font-weight: 600;
}

.oc-total {
    display: grid;
    justify-items: end;
    gap: 3px;
    text-align: right;
}

.oc-total strong {
    font-size: 16px;
    letter-spacing: -0.2px;
}

.oc-total span {
    font-size: 11px;
    font-weight: 600;
    color: var(--brand);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

.status-badge.paid {
    background: #eaf3ec;
    border: 1px solid #c4ddca;
    color: #275c41;
}

.status-badge.void {
    background: rgba(179, 38, 30, 0.08);
    border: 1px solid rgba(179, 38, 30, 0.24);
    color: var(--danger);
}

.history .empty-state {
    display: grid;
    justify-items: center;
    gap: 6px;
    padding: 46px 24px;
    background: var(--paper);
    border: 1px dashed #dbc6a8;
    border-radius: 18px;
}

.history .empty-state span {
    font-size: 30px;
}

.history .empty-state p {
    font-weight: 600;
    color: #4b3d31;
}

.history-hint {
    text-align: center;
}

/* ---------------------------- Detail ---------------------------- */

.detail-body {
    display: grid;
    gap: 14px;
}

.detail-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.detail-stat {
    background: #f8f0e2;
    border: 1px solid #efe1cc;
    border-radius: 12px;
    padding: 10px 12px;
    display: grid;
    gap: 3px;
}

.detail-stat span {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.7px;
    text-transform: uppercase;
    color: var(--muted);
}

.detail-stat strong {
    font-size: 14px;
    letter-spacing: -0.1px;
    word-break: break-word;
}

.detail-items {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

.detail-item {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 10px 12px;
    display: grid;
    gap: 3px;
    background: #fffefa;
}

.di-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    font-size: 14px;
}

.di-top strong {
    font-weight: 600;
}

.di-sub {
    font-size: 11.5px;
    color: var(--muted);
}

.di-mods,
.di-note {
    font-size: 12px;
    color: #6c5745;
    line-height: 1.45;
}

.di-note {
    color: var(--brand);
    font-style: italic;
}

.detail-totals {
    display: grid;
    gap: 6px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #f8f0e2;
    border: 1px solid #efe1cc;
}

.detail-total-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    font-size: 13.5px;
}

.detail-total-row span {
    color: var(--muted);
}

.detail-total-row.grand {
    border-top: 1px dashed #dcc9ad;
    margin-top: 2px;
    padding-top: 8px;
    font-size: 16px;
    font-weight: 700;
    color: var(--ink);
}

.detail-total-row.grand span {
    color: var(--ink);
    font-weight: 600;
}

.detail-void-note {
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(179, 38, 30, 0.07);
    border: 1px solid rgba(179, 38, 30, 0.2);
    color: var(--danger);
    font-size: 12.5px;
    font-weight: 600;
}

@media (max-width: 900px) {
    .history {
        padding: 18px 14px 40px;
    }

    .history-summary {
        grid-template-columns: 1fr;
    }

    .order-card {
        grid-template-columns: 1fr auto;
    }

    .oc-main {
        grid-column: 1 / -1;
    }

    .oc-mid {
        grid-template-columns: auto auto;
        gap: 10px;
    }
}

@media (max-width: 520px) {
    .history-head h1 {
        font-size: 22px;
    }

    .history-filters .field {
        flex: 1 1 46%;
    }

    .history-filters .btn {
        width: 100%;
        margin-left: 0;
    }

    .detail-meta {
        grid-template-columns: 1fr;
    }

    .oc-total strong {
        font-size: 15px;
    }
}

/* ============================== QRIS ============================= */

dialog.qris-modal {
    width: min(420px, 94vw);
}

.qris-body {
    display: grid;
    gap: 9px;
    justify-items: center;
    text-align: center;
}

.qris-frame {
    width: min(300px, 100%);
    padding: 12px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: inset 0 2px 10px rgba(90, 60, 30, 0.05);
}

.qris-code {
    width: 100%;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    color: var(--muted);
}

.qris-code svg {
    display: block;
    width: 100%;
    height: auto;
}

.qris-loading {
    font-size: 12.5px;
    color: var(--muted);
}

.qris-total {
    font-size: 27px;
    letter-spacing: -0.7px;
    font-variant-numeric: tabular-nums;
}

.qris-demo {
    width: 100%;
    padding: 7px 10px;
    border-radius: 9px;
    background: #fdf4e4;
    border: 1px dashed #e2bc80;
    color: #8a5b3d;
    font-size: 11.5px;
    line-height: 1.4;
    font-weight: 600;
}

.qris-body .form-error {
    width: 100%;
    text-align: left;
}

@media (max-width: 380px) {
    .qris-total {
        font-size: 23px;
    }
}

.print-note {
    margin: 0;
    padding: 9px 11px;
    border-radius: 9px;
    background: #eaf3ec;
    border: 1px solid #c4ddca;
    color: #275c41;
    font-size: 12px;
    line-height: 1.45;
}

.print-note.error {
    background: rgba(179, 38, 30, 0.08);
    border-color: rgba(179, 38, 30, 0.22);
    color: var(--danger);
}

/* ====================== Login animasi (shared) ==================== */

.auth-screen {
    position: relative;
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: clamp(14px, 3vw, 36px);
    overflow: hidden;
    isolation: isolate;
    background:
        radial-gradient(880px 520px at 8% 0%, rgba(229, 165, 61, 0.2), transparent 62%),
        radial-gradient(760px 520px at 96% 100%, rgba(156, 45, 30, 0.14), transparent 60%),
        linear-gradient(135deg, #f8f0e4 0%, #efe1cf 100%);
}

.auth-orb {
    position: absolute;
    z-index: 0;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(8px);
    will-change: transform;
}

.auth-orb--one {
    width: 380px;
    height: 380px;
    top: -150px;
    left: -120px;
    background: radial-gradient(circle at 40% 40%, rgba(229, 165, 61, 0.5), transparent 68%);
    animation: auth-drift 17s ease-in-out infinite alternate;
}

.auth-orb--two {
    width: 460px;
    height: 460px;
    right: -180px;
    bottom: -200px;
    background: radial-gradient(circle at 55% 45%, rgba(156, 45, 30, 0.32), transparent 68%);
    animation: auth-drift 21s ease-in-out -6s infinite alternate-reverse;
}

.auth-orb--three {
    width: 250px;
    height: 250px;
    left: 56%;
    top: 8%;
    background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.7), transparent 66%);
    animation: auth-drift 13s ease-in-out -3s infinite alternate;
}

.auth-stage {
    position: relative;
    z-index: 1;
    width: min(1080px, 100%);
    min-height: min(660px, calc(100vh - 64px));
    display: grid;
    grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr);
    overflow: hidden;
    border-radius: 32px;
    border: 1px solid rgba(255, 255, 255, 0.62);
    background: var(--paper);
    box-shadow:
        0 36px 88px -30px rgba(36, 26, 21, 0.52),
        0 1px 0 rgba(255, 255, 255, 0.7) inset;
    animation: auth-rise 0.72s cubic-bezier(0.22, 0.8, 0.28, 1) both;
}

.auth-visual {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 32px;
    padding: clamp(30px, 4vw, 52px);
    color: #fbf1e4;
    background:
        radial-gradient(120% 90% at 90% 0%, rgba(229, 165, 61, 0.3), transparent 55%),
        linear-gradient(145deg, #1d130f 0%, #3a1c14 46%, #6d2c1a 100%);
}

.auth-visual::before {
    content: "";
    position: absolute;
    z-index: 0;
    width: 540px;
    height: 540px;
    right: -250px;
    top: -180px;
    border-radius: 50%;
    border: 1px solid rgba(245, 219, 178, 0.15);
    box-shadow:
        0 0 0 48px rgba(245, 219, 178, 0.045),
        0 0 0 104px rgba(245, 219, 178, 0.025);
    animation: auth-breathe 14s ease-in-out infinite;
}

.auth-visual::after {
    content: "";
    position: absolute;
    z-index: 0;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
    background-size: 54px 54px;
    opacity: 0.5;
    mask-image: linear-gradient(to bottom, #000 8%, transparent 88%);
}

.auth-visual > * {
    position: relative;
    z-index: 2;
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 13px;
}

.auth-brand .brand-mark,
.auth-brand .brand-logo {
    width: 54px;
    height: 54px;
    flex-basis: 54px;
    border-radius: 16px;
}

.auth-brand-text strong {
    display: block;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 16px;
    line-height: 1.2;
    letter-spacing: 0.1px;
    color: #fff7ea;
}

.auth-brand-text span {
    display: block;
    margin-top: 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2.2px;
    text-transform: uppercase;
    color: rgba(248, 238, 225, 0.48);
}

.auth-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 2.8px;
    text-transform: uppercase;
    color: #e8c78f;
}

.auth-kicker::before {
    content: "";
    width: 28px;
    height: 1px;
    background: linear-gradient(90deg, rgba(229, 165, 61, 0.2), var(--gold));
}

.auth-visual h1 {
    max-width: 11ch;
    margin: 17px 0 14px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(34px, 4vw, 52px);
    line-height: 1.02;
    letter-spacing: -1.4px;
    color: #fff8ed;
    text-wrap: balance;
    text-shadow: 0 10px 34px rgba(0, 0, 0, 0.18);
}

.auth-copy {
    max-width: 34ch;
    font-size: 13.5px;
    line-height: 1.6;
    color: rgba(248, 238, 225, 0.66);
}

.auth-points {
    display: grid;
    gap: 12px;
    margin: 30px 0 0;
    padding: 0;
    list-style: none;
}

.auth-points li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    line-height: 1.45;
    color: rgba(248, 238, 225, 0.8);
}

.auth-points li::before {
    content: "";
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 0 4px rgba(229, 165, 61, 0.12);
}

.auth-visual-foot {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: rgba(248, 238, 225, 0.4);
}

.auth-live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #7ed6a3;
    box-shadow: 0 0 0 0 rgba(126, 214, 163, 0.55);
    animation: auth-ping 2.6s ease-out infinite;
}

.auth-panel {
    position: relative;
    display: grid;
    place-items: center;
    overflow: hidden;
    padding: clamp(28px, 3.8vw, 50px);
    background:
        radial-gradient(90% 70% at 100% 0%, rgba(229, 165, 61, 0.16), transparent 58%),
        linear-gradient(160deg, #fffdf8 0%, #f7edde 100%);
}

.auth-panel::before {
    content: "";
    position: absolute;
    width: 300px;
    height: 300px;
    right: -150px;
    top: -150px;
    border-radius: 50%;
    border: 1px solid rgba(156, 45, 30, 0.08);
    box-shadow:
        0 0 0 38px rgba(156, 45, 30, 0.025),
        0 0 0 78px rgba(156, 45, 30, 0.015);
    pointer-events: none;
}

.auth-panel-inner {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 374px;
}

.auth-mobile-brand {
    display: none;
    align-items: center;
    gap: 11px;
    margin-bottom: 28px;
}

.auth-mobile-brand strong {
    display: block;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 15px;
}

.auth-mobile-brand span {
    display: block;
    margin-top: 2px;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: var(--muted);
}

.auth-header {
    animation: auth-fade-up 0.62s 0.12s cubic-bezier(0.22, 0.8, 0.28, 1) both;
}

.auth-eyebrow {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(156, 45, 30, 0.08);
    color: var(--brand);
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.auth-header h2 {
    margin: 15px 0 7px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(28px, 3vw, 34px);
    line-height: 1.08;
    letter-spacing: -0.8px;
    color: var(--ink);
    text-wrap: balance;
}

.auth-header p {
    max-width: 34ch;
    font-size: 12.5px;
    line-height: 1.55;
    color: var(--muted);
}

.auth-form {
    display: grid;
    gap: 14px;
    margin-top: 26px;
}

.auth-field {
    position: relative;
    display: block;
    animation: auth-fade-up 0.55s cubic-bezier(0.22, 0.8, 0.28, 1) both;
}

.auth-field:nth-of-type(1) {
    animation-delay: 0.2s;
}

.auth-field:nth-of-type(2) {
    animation-delay: 0.28s;
}

.auth-field input {
    width: 100%;
    height: 60px;
    padding: 21px 52px 7px 48px;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 1px 0 #fff inset;
    font-size: 15px;
    font-weight: 600;
    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        background 0.18s ease;
}

.auth-field input:hover {
    border-color: #d8c4ad;
}

.auth-field input:focus {
    outline: none;
    border-color: var(--gold);
    background: #fff;
    box-shadow:
        0 0 0 4px rgba(229, 165, 61, 0.14),
        0 12px 24px -20px rgba(36, 26, 21, 0.5);
}

.auth-field-icon {
    position: absolute;
    left: 17px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--brand);
    opacity: 0.58;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.auth-field:focus-within .auth-field-icon {
    opacity: 1;
    transform: translateY(-50%) scale(1.06);
}

.auth-label {
    position: absolute;
    left: 48px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    pointer-events: none;
    transform-origin: left top;
    transition:
        top 0.16s ease,
        transform 0.16s ease,
        font-size 0.16s ease,
        color 0.16s ease,
        letter-spacing 0.16s ease;
}

.auth-field input:focus ~ .auth-label,
.auth-field input:not(:placeholder-shown) ~ .auth-label {
    top: 14px;
    transform: none;
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--brand);
}

.auth-field input:-webkit-autofill {
    -webkit-text-fill-color: var(--ink);
    box-shadow: 0 0 0 100px #fff inset;
}

.auth-reveal {
    position: absolute;
    right: 9px;
    top: 50%;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 11px;
    background: transparent;
    color: var(--muted);
    transition: background 0.16s ease, color 0.16s ease;
}

.auth-reveal:hover,
.auth-reveal[aria-pressed="true"] {
    background: rgba(156, 45, 30, 0.09);
    color: var(--brand);
}

.auth-form .form-error {
    animation: auth-fade-up 0.24s ease both;
}

.btn.auth-submit {
    height: 54px;
    margin-top: 2px;
    border-radius: 15px;
    background: linear-gradient(110deg, #c0432a 0%, #9c2d1e 55%, #a63a24 100%);
    background-size: 180% 100%;
    background-position: 0 0;
    font-size: 14px;
    letter-spacing: 0.2px;
    box-shadow:
        0 14px 26px -16px rgba(156, 45, 30, 0.72),
        0 1px 0 rgba(255, 255, 255, 0.18) inset;
    transition:
        background-position 0.3s ease,
        box-shadow 0.2s ease,
        transform 0.16s ease,
        opacity 0.16s ease;
    animation: auth-fade-up 0.55s 0.36s cubic-bezier(0.22, 0.8, 0.28, 1) both;
}

.btn.auth-submit:hover:not(:disabled) {
    background-position: 100% 0;
    box-shadow:
        0 18px 30px -16px rgba(156, 45, 30, 0.82),
        0 1px 0 rgba(255, 255, 255, 0.2) inset;
    transform: translateY(-1px);
}

.btn.auth-submit:active:not(:disabled) {
    transform: translateY(0);
}

.auth-hint {
    margin-top: 2px;
    text-align: center;
    font-size: 11.5px;
    line-height: 1.6;
    color: var(--muted);
}

.auth-hint code {
    padding: 2px 6px;
    border: 1px solid rgba(156, 45, 30, 0.08);
    border-radius: 6px;
    background: rgba(241, 230, 213, 0.7);
    color: #6b4533;
    font-size: 10.5px;
}

.auth-hint a {
    color: var(--brand);
    font-weight: 700;
    text-decoration: none;
}

.auth-hint a:hover {
    text-decoration: underline;
}

.auth-footnote {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 20px;
    font-size: 9.5px;
    letter-spacing: 0.4px;
    color: #a4917d;
    animation: auth-fade-up 0.55s 0.46s cubic-bezier(0.22, 0.8, 0.28, 1) both;
}

@keyframes auth-rise {
    from {
        opacity: 0;
        transform: translateY(22px) scale(0.985);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

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

@keyframes auth-drift {
    from {
        transform: translate3d(0, 0, 0) scale(1);
    }
    to {
        transform: translate3d(18px, -22px, 0) scale(1.06);
    }
}

@keyframes auth-breathe {
    0%,
    100% {
        transform: scale(1);
        opacity: 0.75;
    }
    50% {
        transform: scale(1.06);
        opacity: 1;
    }
}

@keyframes auth-ping {
    0% {
        box-shadow: 0 0 0 0 rgba(126, 214, 163, 0.55);
    }
    70%,
    100% {
        box-shadow: 0 0 0 7px rgba(126, 214, 163, 0);
    }
}

@media (max-width: 920px) {
    .auth-screen {
        padding: 16px;
    }

    .auth-stage {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .auth-visual {
        display: none;
    }

    .auth-panel {
        padding: clamp(28px, 6vw, 46px);
    }

    .auth-mobile-brand {
        display: flex;
    }

    .auth-panel-inner {
        max-width: 420px;
    }
}

@media (max-width: 480px) {
    .auth-screen {
        padding: 10px;
    }

    .auth-stage {
        border-radius: 24px;
    }

    .auth-panel {
        padding: 26px 20px 24px;
    }

    .auth-header h2 {
        font-size: 27px;
    }

    .auth-field input {
        height: 58px;
    }
}

@media (max-height: 760px) and (min-width: 921px) {
    .auth-visual {
        padding-block: 34px;
    }

    .auth-visual h1 {
        font-size: clamp(32px, 3.6vw, 44px);
    }

    .auth-points {
        margin-top: 22px;
        gap: 9px;
    }

    .auth-panel {
        padding-block: 32px;
    }
}

/* =================================================================
   Kasir — penyegaran visual elegan & modern
   ================================================================= */

body {
    background:
        radial-gradient(1100px 620px at 84% -8%, rgba(229, 165, 61, 0.17), transparent 62%),
        radial-gradient(900px 560px at -8% 24%, rgba(156, 45, 30, 0.09), transparent 58%),
        linear-gradient(180deg, #f8f3ea 0%, #f2ebdf 100%);
}

::selection {
    background: rgba(156, 45, 30, 0.18);
    color: var(--ink);
}

/* --------------------------- Topbar ----------------------------- */

.topbar {
    top: 10px;
    width: min(1480px, calc(100% - 28px));
    margin: 10px auto 0;
    padding: 9px 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    background: linear-gradient(112deg, rgba(29, 20, 15, 0.97), rgba(62, 31, 21, 0.95));
    box-shadow:
        0 20px 42px -26px rgba(30, 20, 14, 0.7),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(18px) saturate(130%);
}

.topbar .brand {
    gap: 11px;
}

.topbar .brand-mark,
.topbar .brand-logo {
    width: 39px;
    height: 39px;
    flex-basis: 39px;
    border-radius: 12px;
}

.topbar .brand-text strong {
    font-size: 16px;
    letter-spacing: 0.1px;
}

.topbar .brand-text span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
    font-size: 9px;
    letter-spacing: 2.2px;
    color: rgba(246, 234, 216, 0.42);
}

.topbar .brand-text span::before {
    content: "";
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 8px rgba(229, 165, 61, 0.65);
}

.topbar-right {
    gap: 8px;
}

.topbar .btn.ghost.light {
    padding: 9px 13px;
    border-color: rgba(246, 234, 216, 0.14);
    border-radius: 10px;
    background: rgba(246, 234, 216, 0.05);
    font-size: 12.5px;
    font-weight: 600;
    box-shadow: none;
}

.topbar .btn.ghost.light:hover:not(:disabled) {
    border-color: rgba(246, 234, 216, 0.26);
    background: rgba(246, 234, 216, 0.11);
}

.topbar .btn.ghost.light.icon {
    padding: 9px;
    min-width: 36px;
    min-height: 36px;
    border-radius: 10px;
}

.topbar #btn-shift {
    border-color: #f6ead8;
    background: #f6ead8;
    color: #2b1b11;
    font-weight: 700;
    box-shadow: 0 6px 16px -8px rgba(0, 0, 0, 0.5);
}

.topbar #btn-shift:hover:not(:disabled) {
    border-color: #fff8ed;
    background: #fff8ed;
    color: #21150f;
}

.shift-pill {
    padding: 7px 11px;
    border-color: rgba(126, 214, 163, 0.2);
    background: rgba(126, 214, 163, 0.09);
    color: #b9e3c8;
    font-size: 11.5px;
    letter-spacing: 0.2px;
}

.shift-pill::before {
    background: #7ed6a3;
    box-shadow:
        0 0 0 3px rgba(126, 214, 163, 0.12),
        0 0 12px rgba(126, 214, 163, 0.5);
}

.shift-pill.closed {
    background: rgba(246, 234, 216, 0.06);
    border-color: rgba(246, 234, 216, 0.16);
}

.shift-pill.closed::before {
    background: rgba(246, 234, 216, 0.45);
    box-shadow: none;
}

.user-chip {
    gap: 8px;
    padding: 4px 11px 4px 4px;
    border-color: rgba(246, 234, 216, 0.1);
    background: rgba(246, 234, 216, 0.055);
}

.avatar {
    width: 31px;
    height: 31px;
    font-size: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
}

.user-meta strong {
    font-size: 12px;
    font-weight: 600;
}

.user-meta small {
    font-size: 9px;
    letter-spacing: 1px;
    color: rgba(246, 234, 216, 0.45);
}

/* ---------------------------- Layout ---------------------------- */

.pos {
    max-width: 1480px;
    padding: 22px 24px 36px;
    grid-template-columns: minmax(0, 1fr) 402px;
    gap: 22px;
}

.catalog-head {
    align-items: flex-end;
    gap: 18px;
    margin-bottom: 16px;
}

.catalog-title {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.catalog-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 1px;
    color: var(--brand);
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 2.4px;
    text-transform: uppercase;
}

.catalog-eyebrow::before {
    content: "";
    width: 22px;
    height: 1px;
    background: linear-gradient(90deg, var(--gold), transparent);
}

.catalog-head h2 {
    margin-bottom: 1px;
    font-size: 31px;
    line-height: 1.05;
    letter-spacing: -1px;
}

#catalog-count {
    font-size: 11.5px;
    letter-spacing: 0.2px;
}

.search-box {
    min-width: 252px;
    padding: 0 13px;
    border-color: rgba(70, 48, 30, 0.1);
    border-radius: 13px;
    background: rgba(255, 253, 248, 0.66);
    box-shadow: 0 8px 20px -16px rgba(52, 35, 20, 0.4);
    backdrop-filter: blur(10px);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.search-box:focus-within {
    border-color: rgba(229, 165, 61, 0.65);
    background: #fffdf8;
    box-shadow:
        0 0 0 4px rgba(229, 165, 61, 0.12),
        0 12px 26px -20px rgba(52, 35, 20, 0.45);
}

.search-box svg {
    flex: none;
    opacity: 0.55;
}

.search-box input {
    padding: 12px 0;
    font-size: 13.5px;
}

.chips {
    gap: 7px;
    margin-bottom: 18px;
    padding-bottom: 5px;
}

.chip {
    padding: 9px 16px;
    border-color: rgba(74, 52, 34, 0.12);
    background: rgba(255, 253, 248, 0.55);
    color: #6b5948;
    font-size: 12.5px;
    letter-spacing: 0.1px;
    box-shadow: 0 4px 10px -10px rgba(52, 35, 20, 0.35);
}

.chip:hover {
    border-color: rgba(156, 45, 30, 0.28);
    background: #fffdf8;
    color: var(--brand);
}

.chip.active {
    border-color: transparent;
    background: linear-gradient(135deg, #3b2418, #211812);
    color: #fff8ed;
    box-shadow: 0 12px 22px -14px rgba(36, 26, 21, 0.8);
}

/* --------------------------- Menu cards -------------------------- */

.menu-grid {
    grid-template-columns: repeat(auto-fill, minmax(178px, 1fr));
    gap: 16px;
}

.menu-card {
    border-color: rgba(70, 48, 30, 0.09);
    border-radius: 20px;
    background: #fffdfa;
    box-shadow: 0 10px 26px -20px rgba(52, 35, 20, 0.45);
}

.menu-card:hover {
    transform: translateY(-4px);
    border-color: rgba(229, 165, 61, 0.5);
    box-shadow: 0 24px 42px -26px rgba(52, 35, 20, 0.5);
}

.menu-photo::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 48%;
    background: linear-gradient(180deg, transparent, rgba(24, 16, 11, 0.22));
    pointer-events: none;
}

.menu-tag {
    left: 10px;
    bottom: 10px;
    z-index: 1;
    max-width: calc(100% - 20px);
    padding: 5px 9px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(28, 20, 14, 0.55);
    color: #fff8ec;
    font-size: 8.5px;
    letter-spacing: 1.5px;
    box-shadow: none;
    backdrop-filter: blur(8px);
}

.menu-tag.drink {
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(27, 58, 41, 0.58);
    color: #e2f6e8;
}

.menu-card::after {
    top: 10px;
    right: 10px;
    width: 27px;
    height: 27px;
    background: rgba(255, 251, 243, 0.9);
    box-shadow: 0 6px 14px -6px rgba(36, 26, 21, 0.4);
    backdrop-filter: blur(8px);
}

.menu-body {
    gap: 8px;
    padding: 13px 14px 15px;
}

.menu-name {
    font-size: 14.5px;
    font-weight: 700;
    letter-spacing: -0.2px;
}

.menu-price {
    font-size: 16px;
    letter-spacing: -0.3px;
}

.menu-meta {
    padding: 3px 7px;
    border-radius: 999px;
    background: #f8f1e5;
    color: #8b7661;
    font-size: 10px;
}

/* ----------------------------- Cart ------------------------------ */

.cart {
    top: 92px;
    max-height: calc(100vh - 112px);
    border-color: rgba(255, 255, 255, 0.75);
    border-radius: 24px;
    background: rgba(255, 253, 248, 0.9);
    box-shadow:
        0 30px 65px -38px rgba(52, 35, 20, 0.55),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(18px) saturate(120%);
}

.cart-head {
    align-items: center;
    gap: 10px;
    padding: 17px 19px 15px;
    border-bottom: 1px solid rgba(70, 48, 30, 0.08);
}

.cart-heading {
    display: grid;
    gap: 1px;
    min-width: 0;
}

.cart-eyebrow {
    color: #9c8874;
    font-size: 8.5px;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.cart-title-row {
    display: flex;
    align-items: center;
    gap: 7px;
}

.cart-head h2 {
    font-size: 21px;
    letter-spacing: -0.5px;
}

.cart-count {
    padding: 3px 7px;
    border: 1px solid rgba(156, 45, 30, 0.1);
    border-radius: 999px;
    background: rgba(156, 45, 30, 0.08);
    color: var(--brand);
    font-size: 9.5px;
    font-weight: 750;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.segmented {
    gap: 2px;
    padding: 4px;
    border: 1px solid rgba(70, 48, 30, 0.05);
    border-radius: 11px;
    background: rgba(241, 231, 215, 0.72);
}

.segmented button {
    padding: 7px 11px;
    border-radius: 8px;
    font-size: 11px;
    letter-spacing: 0.1px;
}

.segmented button.active {
    background: #fffdfa;
    color: var(--brand);
    box-shadow: 0 3px 9px -4px rgba(52, 35, 20, 0.25);
}

.cart-items {
    min-height: 0;
    padding: 8px 14px;
}

.cart-empty {
    gap: 6px;
    padding: 44px 16px;
}

.cart-empty-icon {
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    margin-bottom: 6px;
    border-radius: 50%;
    background: linear-gradient(145deg, #f7edde, #efe1cd);
    color: #a77e4b;
    box-shadow: inset 0 1px 0 #fff;
}

.cart-empty-icon svg {
    display: block;
}

.cart-empty p {
    font-size: 14px;
    font-weight: 700;
    color: #5d4a39;
}

.cart-empty small {
    font-size: 11.5px;
}

.cart-item {
    gap: 10px;
    padding: 14px 5px;
    border-bottom: 1px solid rgba(70, 48, 30, 0.07);
}

.ci-name {
    font-size: 13.5px;
    font-weight: 700;
    letter-spacing: -0.1px;
}

.ci-mods {
    font-size: 11px;
    color: #9b7336;
}

.ci-price {
    font-size: 13.5px;
    font-weight: 800;
    letter-spacing: -0.2px;
}

.ci-stepper {
    border-color: rgba(70, 48, 30, 0.08);
    border-radius: 9px;
    background: #fbf5ea;
}

.ci-stepper button {
    width: 31px;
    height: 28px;
}

.ci-stepper button:hover {
    background: #f1e5d3;
}

.ci-stepper span {
    font-size: 12.5px;
}

.ci-remove {
    font-size: 11px;
    letter-spacing: 0.2px;
}

.cart-foot {
    gap: 12px;
    padding: 15px 19px 18px;
    border-top: 1px solid rgba(70, 48, 30, 0.08);
    background: linear-gradient(180deg, rgba(255, 253, 249, 0.55), rgba(248, 240, 228, 0.92));
}

.total-row {
    align-items: center;
}

.total-row span {
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: #927e69;
}

.total-row strong {
    font-size: 29px;
    font-weight: 800;
    letter-spacing: -1.2px;
}

.pay-tabs {
    padding: 4px;
    border: 1px solid rgba(70, 48, 30, 0.05);
    border-radius: 12px;
    background: rgba(241, 231, 215, 0.75);
}

.pay-tabs button {
    padding: 9px;
    border-radius: 9px;
    font-size: 12px;
}

.field.compact input {
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.7);
}

.quick-cash button {
    border-color: rgba(70, 48, 30, 0.08);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.65);
}

.quick-cash button:hover {
    border-color: rgba(229, 165, 61, 0.5);
    background: #fffdf8;
}

.change-row {
    font-size: 12px;
}

.change-row strong {
    font-size: 15.5px;
}

.pay-btn {
    display: inline-flex;
    gap: 9px;
    padding-block: 17px;
    border-radius: 13px;
    font-size: 14.5px;
    letter-spacing: 0.1px;
    box-shadow: 0 18px 30px -18px rgba(156, 45, 30, 0.7);
}

.pay-btn::after {
    content: "→";
    font-size: 17px;
    line-height: 1;
    transition: transform 0.18s ease;
}

.pay-btn:hover:not(:disabled)::after {
    transform: translateX(3px);
}

.pay-hint {
    font-size: 11px;
    letter-spacing: 0.1px;
}

.menu-price,
.ci-price,
.total-row strong,
.change-row strong,
.shift-pill {
    font-variant-numeric: tabular-nums;
}

.btn {
    text-decoration: none;
}

.topbar .btn.history-link {
    border-color: transparent;
    background: transparent;
}

.topbar .btn.history-link:hover:not(:disabled) {
    border-color: transparent;
    background: rgba(246, 234, 216, 0.09);
}

.pay-btn:disabled::after {
    opacity: 0.42;
}

/* ---------------------------- Dialogs --------------------------- */

dialog.modal::backdrop {
    background: rgba(26, 17, 11, 0.58);
    backdrop-filter: blur(8px);
}

.modal-card {
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 24px;
    box-shadow: 0 45px 90px -40px rgba(20, 12, 6, 0.65);
}

.modal-head h2 {
    font-size: 23px;
    letter-spacing: -0.6px;
}

.modifier-option {
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.55);
}

.modifier-option:hover {
    border-color: rgba(156, 45, 30, 0.25);
    background: #fffefb;
}

.modifier-option:has(input:checked) {
    border-color: rgba(229, 165, 61, 0.8);
    background: #fff7e9;
    box-shadow: 0 0 0 3px rgba(229, 165, 61, 0.08);
}

.modal-actions .btn {
    border-radius: 12px;
}

.toast {
    border-radius: 14px;
    background: linear-gradient(140deg, #2f231a, #1f1711);
}

/* ------------------------- Scrollbar rapi ----------------------- */

.cart-items {
    scrollbar-width: thin;
    scrollbar-color: rgba(106, 82, 58, 0.28) transparent;
}

.cart-items::-webkit-scrollbar {
    width: 6px;
}

.cart-items::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(106, 82, 58, 0.24);
}

.chips {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.chips::-webkit-scrollbar {
    display: none;
}

/* --------------------------- Responsive ------------------------- */

@media (max-width: 1200px) {
    .pos {
        grid-template-columns: minmax(0, 1fr) 360px;
        gap: 18px;
        padding: 20px 18px 32px;
    }
}

@media (max-width: 900px) {
    .topbar {
        top: 8px;
        width: calc(100% - 16px);
        margin-top: 8px;
        padding: 9px 12px;
        border-radius: 16px;
    }

    .pos {
        grid-template-columns: 1fr;
        gap: 18px;
        padding: 18px 14px 28px;
    }

    .cart {
        position: static;
        max-height: none;
    }

    .cart-items {
        max-height: 360px;
    }

    .catalog-head {
        align-items: stretch;
        gap: 10px;
    }

    .catalog-head h2 {
        font-size: 28px;
    }

    .search-box {
        width: 100%;
        min-width: 0;
    }

    .menu-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 12px;
    }
}

@media (max-width: 520px) {
    .topbar {
        top: 6px;
        width: calc(100% - 12px);
        margin-top: 6px;
        border-radius: 14px;
    }

    .pos {
        padding: 14px 12px 24px;
    }

    .menu-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 11px;
    }

    .menu-body {
        padding: 11px 11px 12px;
    }

    .menu-name {
        font-size: 13.5px;
    }

    .menu-price {
        font-size: 14.5px;
    }

    .cart-head {
        padding: 15px;
    }

    .cart-foot {
        padding: 14px 15px 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .menu-card,
    .menu-photo-img,
    .pay-btn::after {
        transition: none !important;
    }
}

/* =================================================================
   Riwayat — bahasa visual yang sama dengan kasir
   ================================================================= */

.history {
    max-width: 1240px;
    padding: 28px 24px 52px;
    gap: 18px;
}

.history-head {
    align-items: flex-end;
    gap: 24px;
    margin-top: 2px;
}

.history-heading {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.history-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 1px;
    color: var(--brand);
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 2.4px;
    text-transform: uppercase;
}

.history-eyebrow::before {
    content: "";
    width: 22px;
    height: 1px;
    background: linear-gradient(90deg, var(--gold), transparent);
}

.history-head h1 {
    margin-bottom: 2px;
    font-size: 34px;
    line-height: 1.05;
    letter-spacing: -1.1px;
}

#history-subtitle {
    color: #8d7a67;
    font-size: 12px;
    letter-spacing: 0.1px;
}

.history-head-side {
    display: grid;
    justify-items: end;
    gap: 7px;
}

.range-label {
    color: #9a8570;
    font-size: 8.5px;
    font-weight: 800;
    letter-spacing: 1.8px;
    text-transform: uppercase;
}

.range-chips {
    gap: 3px;
    margin: 0;
    padding: 4px;
    border: 1px solid rgba(70, 48, 30, 0.08);
    border-radius: 13px;
    background: rgba(255, 253, 248, 0.6);
    box-shadow: 0 10px 26px -24px rgba(52, 35, 20, 0.45);
    backdrop-filter: blur(10px);
}

.range-chips .chip {
    padding: 8px 14px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    box-shadow: none;
    color: #7c6855;
    font-size: 12px;
}

.range-chips .chip:hover {
    background: rgba(255, 255, 255, 0.7);
    color: var(--brand);
}

.range-chips .chip.active {
    background: linear-gradient(135deg, #3b2418, #211812);
    color: #fff8ed;
    box-shadow: 0 6px 14px -10px rgba(36, 26, 21, 0.8);
}

/* ---------------------------- Filter ---------------------------- */

.history-filters {
    display: grid;
    grid-template-columns: minmax(230px, 1.3fr) minmax(120px, 0.62fr) minmax(120px, 0.62fr) minmax(130px, 0.62fr) auto;
    align-items: end;
    gap: 10px;
    padding: 14px;
    border-color: rgba(70, 48, 30, 0.09);
    border-radius: 18px;
    background: rgba(255, 253, 248, 0.78);
    box-shadow: 0 14px 34px -30px rgba(52, 35, 20, 0.5);
    backdrop-filter: blur(12px);
}

.history-filter-search {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.filter-label {
    color: #94806b;
    font-size: 8.5px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.history-search {
    flex: none;
    width: auto;
    min-width: 0;
    min-height: 39px;
    padding: 0 13px;
    border-color: rgba(70, 48, 30, 0.1);
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.65);
    box-shadow: none;
}

.history-search:focus-within {
    border-color: rgba(229, 165, 61, 0.65);
    background: #fffdf8;
    box-shadow: 0 0 0 4px rgba(229, 165, 61, 0.12);
}

.history-search input {
    padding: 11px 0;
    font-size: 12.5px;
}

.history-filters .field {
    flex: none;
    min-width: 0;
    gap: 5px;
}

.history-filters .field span {
    color: #94806b;
    font-size: 8.5px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.history-filters .field input,
.history-filters .field select {
    padding: 10px 11px;
    border-color: rgba(70, 48, 30, 0.1);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.68);
    font-size: 12.5px;
    font-weight: 600;
}

.history-filters .field input:focus,
.history-filters .field select:focus {
    border-color: rgba(229, 165, 61, 0.65);
    box-shadow: 0 0 0 4px rgba(229, 165, 61, 0.12);
}

.history-filters .btn {
    margin-left: 0;
    padding: 10px 15px;
    border-color: rgba(70, 48, 30, 0.12);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.5);
    font-size: 12.5px;
}

.history-filters .btn:hover {
    background: #fffdf8;
}

/* ---------------------------- Summary --------------------------- */

.history-summary {
    gap: 12px;
}

.summary-stat {
    position: relative;
    overflow: hidden;
    padding: 14px 16px 14px 18px;
    border-color: rgba(70, 48, 30, 0.08);
    border-radius: 16px;
    background: rgba(255, 253, 248, 0.8);
    box-shadow: 0 12px 30px -26px rgba(52, 35, 20, 0.45);
}

.summary-stat::before {
    content: "";
    position: absolute;
    top: 13px;
    bottom: 13px;
    left: 0;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--gold);
}

.summary-stat:nth-child(2)::before {
    background: var(--green);
}

.summary-stat:nth-child(3)::before {
    background: var(--danger);
}

.summary-stat span {
    color: #94806b;
    font-size: 8.5px;
    font-weight: 800;
    letter-spacing: 1.4px;
}

.summary-stat strong {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.8px;
    font-variant-numeric: tabular-nums;
}

.summary-stat:nth-child(2) strong {
    font-size: 20px;
}

/* ----------------------------- List ----------------------------- */

.history-list {
    gap: 10px;
}

.order-card {
    grid-template-columns: 40px minmax(0, 1.6fr) minmax(0, 0.9fr) auto;
    gap: 14px;
    padding: 14px 17px;
    border-color: rgba(70, 48, 30, 0.08);
    border-radius: 17px;
    background: rgba(255, 253, 248, 0.84);
    box-shadow: 0 12px 28px -26px rgba(52, 35, 20, 0.45);
    backdrop-filter: blur(10px);
}

.order-card:hover {
    transform: translateY(-2px);
    border-color: rgba(229, 165, 61, 0.48);
    box-shadow: 0 20px 38px -28px rgba(52, 35, 20, 0.5);
    background: #fffdfa;
}

.oc-icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(70, 48, 30, 0.06);
    border-radius: 12px;
    background: #f7efe3;
    color: #a47b47;
}

.oc-icon.paid {
    border-color: rgba(46, 125, 91, 0.08);
    background: rgba(46, 125, 91, 0.08);
    color: #3c7d5d;
}

.oc-icon.void {
    border-color: rgba(179, 38, 30, 0.08);
    background: rgba(179, 38, 30, 0.07);
    color: var(--danger);
}

.oc-invoice {
    color: #3a2b20;
    font-size: 14.5px;
    letter-spacing: 0.2px;
}

.status-badge {
    padding: 4px 9px;
    font-size: 9px;
    letter-spacing: 0.8px;
}

.status-badge.paid {
    border-color: rgba(46, 125, 91, 0.18);
    background: rgba(46, 125, 91, 0.08);
    color: #2e7d5b;
}

.status-badge.void {
    border-color: rgba(179, 38, 30, 0.18);
    background: rgba(179, 38, 30, 0.07);
}

.oc-meta {
    color: #8e7b67;
    font-size: 11.5px;
}

.oc-mid strong {
    color: #5b4838;
    font-size: 12.5px;
    font-weight: 650;
}

.oc-mid span {
    font-size: 11px;
}

.oc-total strong {
    color: var(--ink);
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -0.5px;
    font-variant-numeric: tabular-nums;
}

.oc-total span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--brand);
    font-size: 9.5px;
    letter-spacing: 1px;
}

.oc-total span::after {
    content: "→";
    font-size: 13px;
    transition: transform 0.15s ease;
}

.order-card:hover .oc-total span::after {
    transform: translateX(2px);
}

/* --------------------------- Empty state ------------------------ */

.history .empty-state {
    gap: 7px;
    padding: 56px 24px;
    border: 1px dashed rgba(229, 165, 61, 0.35);
    border-radius: 20px;
    background: rgba(255, 253, 248, 0.7);
}

.history .empty-state .empty-illustration {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    margin-bottom: 5px;
    border-radius: 50%;
    background: #f6ecdd;
    color: #a88353;
    box-shadow: inset 0 1px 0 #fff;
    font-size: 0;
}

.history .empty-state .empty-illustration svg {
    display: block;
}

.history .empty-state p {
    color: #5d4a39;
    font-size: 14px;
    font-weight: 700;
}

.history .empty-state small {
    color: var(--muted);
    font-size: 11.5px;
}

/* ----------------------------- Detail --------------------------- */

#detail-invoice {
    font-family: "Courier New", ui-monospace, monospace;
    font-size: 19px;
    letter-spacing: 0.2px;
}

.detail-meta {
    gap: 8px;
}

.detail-stat {
    gap: 2px;
    padding: 11px 13px;
    border-color: rgba(70, 48, 30, 0.07);
    border-radius: 12px;
    background: #f9f3e8;
}

.detail-stat span {
    color: #94806b;
    font-size: 8.5px;
    font-weight: 800;
    letter-spacing: 1.2px;
}

.detail-stat strong {
    font-size: 13.5px;
    font-weight: 650;
}

.detail-items {
    gap: 8px;
}

.detail-item {
    padding: 11px 13px;
    border-color: rgba(70, 48, 30, 0.08);
    border-radius: 13px;
    background: #fffdfa;
}

.di-top {
    font-size: 13.5px;
}

.di-top span {
    font-weight: 750;
    letter-spacing: -0.2px;
}

.di-sub {
    font-size: 10.5px;
}

.di-mods {
    color: #8f6b35;
    font-size: 11px;
}

.detail-totals {
    padding: 13px 15px;
    border-color: rgba(70, 48, 30, 0.07);
    border-radius: 14px;
    background: #faf3e7;
}

.detail-total-row {
    font-size: 12.5px;
}

.detail-total-row.grand {
    font-size: 17px;
    font-weight: 800;
}

.detail-void-note {
    border-radius: 12px;
    font-size: 12px;
}

/* --------------------------- Responsive ------------------------- */

@media (max-width: 900px) {
    .history {
        max-width: none;
        padding: 20px 14px 40px;
        gap: 15px;
    }

    .history-head {
        align-items: flex-start;
        gap: 14px;
    }

    .history-head h1 {
        font-size: 30px;
    }

    .history-head-side {
        justify-items: start;
    }

    .history-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .history-filters .field input,
    .history-filters .field select {
        min-width: 0;
    }

    .history-filter-search {
        grid-column: 1 / -1;
    }

    .history-search {
        width: 100%;
    }

    .history-filters .btn {
        grid-column: auto;
        width: 100%;
    }

    .history-summary {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }

    .order-card {
        grid-template-columns: 38px minmax(0, 1fr) auto;
        gap: 12px;
        padding: 13px 14px;
    }

    .oc-icon {
        grid-column: 1;
        grid-row: 1;
        width: 38px;
        height: 38px;
    }

    .oc-main {
        grid-column: 2 / 4;
        grid-row: 1;
    }

    .oc-mid {
        grid-column: 2;
        grid-row: 2;
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .oc-total {
        grid-column: 3;
        grid-row: 2;
    }
}

@media (max-width: 520px) {
    .history {
        padding: 16px 12px 32px;
    }

    .history-head h1 {
        font-size: 27px;
    }

    .history-head-side {
        width: 100%;
    }

    .range-chips {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        width: 100%;
    }

    .range-chips .chip {
        padding: 8px 6px;
        text-align: center;
    }

    .history-summary {
        gap: 6px;
    }

    .summary-stat {
        padding: 11px 9px 11px 13px;
        border-radius: 13px;
    }

    .summary-stat::before {
        top: 10px;
        bottom: 10px;
    }

    .summary-stat span {
        font-size: 7.5px;
        letter-spacing: 1px;
    }

    .summary-stat strong,
    .summary-stat:nth-child(2) strong {
        font-size: 17px;
    }

    .order-card {
        grid-template-columns: 34px minmax(0, 1fr) auto;
        gap: 10px;
        padding: 12px;
    }

    .oc-icon {
        width: 34px;
        height: 34px;
        border-radius: 10px;
    }

    .oc-invoice {
        font-size: 12.5px;
    }

    .oc-meta {
        font-size: 10.5px;
    }

    .oc-mid strong {
        font-size: 11.5px;
    }

    .oc-mid span {
        font-size: 10.5px;
    }

    .oc-total strong {
        font-size: 14.5px;
    }

    .oc-total span {
        font-size: 8.5px;
        letter-spacing: 0.7px;
    }

    .detail-meta {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }

    .detail-stat {
        padding: 9px 10px;
    }
}

@media (max-width: 360px) {
    .summary-stat {
        padding: 10px 7px 10px 11px;
    }

    .summary-stat span {
        font-size: 7px;
        letter-spacing: 0.7px;
    }

    .summary-stat strong,
    .summary-stat:nth-child(2) strong {
        font-size: 14px;
        letter-spacing: -0.4px;
    }

    .history-filters .field select {
        padding: 10px 8px;
        font-size: 11.5px;
    }

    .order-card {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .oc-icon {
        display: none;
    }

    .oc-main {
        grid-column: 1 / 3;
        grid-row: 1;
    }

    .oc-mid {
        grid-column: 1;
        grid-row: 2;
    }

    .oc-total {
        grid-column: 2;
        grid-row: 2;
    }
}

/* --------------------- Kirim struk digital --------------------- */

.share-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 4px 0 14px;
    padding: 10px 12px;
    border: 1px dashed var(--line);
    border-radius: 12px;
    background: rgba(245, 239, 228, 0.45);
}

.share-actions .share-label {
    color: var(--muted);
    font-size: 13px;
    margin-right: auto;
}

.share-actions .btn {
    flex: 0 0 auto;
    min-width: 0;
    padding: 8px 16px;
}

.share-form .field input {
    font-size: 16px;
}

/* ---------------------------- Komplimen ---------------------------- */

.ci-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.ci-comp {
    border: 1px solid var(--line);
    background: transparent;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.2px;
    padding: 4px 9px;
    border-radius: 999px;
    transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.ci-comp:hover {
    color: var(--ink);
    border-color: #cdb79c;
}

.ci-comp[aria-pressed="true"] {
    color: #8a5b13;
    border-color: rgba(202, 138, 4, 0.45);
    background: rgba(253, 230, 138, 0.32);
}

.ci-comp-badge {
    justify-self: start;
    padding: 1px 7px;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    color: #8a5b13;
    background: rgba(253, 230, 138, 0.42);
}

.cart-item.is-comp .ci-price s {
    color: var(--muted);
    font-size: 11.5px;
}

.cart-item.is-comp .ci-price strong {
    color: #8a5b13;
    font-size: 11.5px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.comp-note-field {
    gap: 5px;
}

.comp-note-field span {
    color: #8a5b13;
    font-weight: 700;
}

/* ------------------------ Pembatalan transaksi ------------------- */

.btn.danger {
    background: var(--danger);
    border-color: var(--danger);
    color: #fff;
}

.btn.danger:hover {
    background: #96201a;
    border-color: #96201a;
}

.btn.danger[disabled] {
    opacity: 0.65;
}

.detail-void {
    display: grid;
    gap: 6px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(179, 38, 30, 0.22);
    background: rgba(179, 38, 30, 0.06);
}

.detail-void.critical {
    border-color: rgba(180, 83, 9, 0.3);
    background: rgba(245, 158, 11, 0.1);
}

.detail-void-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    font-size: 13px;
}

.detail-void-head strong {
    font-weight: 700;
    color: var(--ink);
}

.detail-void-head span {
    color: var(--muted);
    font-size: 11.5px;
    white-space: nowrap;
}

.detail-void p {
    margin: 0;
    font-size: 13px;
    color: var(--ink);
    line-height: 1.45;
}

.detail-void-meta {
    display: grid;
    gap: 3px;
    font-size: 11.5px;
    color: var(--muted);
    line-height: 1.5;
}

.detail-void-meta strong {
    color: var(--ink);
}

.detail-item.is-comp {
    border-color: rgba(202, 138, 4, 0.35);
    background: rgba(253, 230, 138, 0.14);
}

.di-comp {
    margin-left: 6px;
    padding: 1px 7px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    color: #8a5b13;
    background: rgba(253, 230, 138, 0.55);
    vertical-align: middle;
}

.detail-total-row.comp span,
.detail-total-row.comp strong {
    color: #8a5b13;
}

.void-modal .modal-card {
    max-width: 520px;
}

.void-stage {
    display: grid;
    gap: 8px;
    border: none;
    padding: 0;
    margin: 0;
}

.void-stage legend {
    padding: 0;
    margin-bottom: 4px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    color: var(--muted);
}

.void-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 11px 13px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fffefa;
    cursor: pointer;
}

.void-option:has(input:checked) {
    border-color: rgba(179, 38, 30, 0.4);
    background: rgba(179, 38, 30, 0.05);
}

.void-option input {
    margin-top: 2px;
    accent-color: var(--danger);
}

.void-option span {
    display: grid;
    gap: 2px;
}

.void-option strong {
    font-size: 13.5px;
}

.void-option small {
    font-size: 11.5px;
    color: var(--muted);
    line-height: 1.45;
}

.void-warning {
    margin: 0;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(179, 38, 30, 0.07);
    border: 1px solid rgba(179, 38, 30, 0.18);
    color: #7f1d1d;
    font-size: 12px;
    line-height: 1.5;
}

.void-warning.critical {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(180, 83, 9, 0.28);
    color: #7c2d12;
}

#void-reason {
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    min-height: 62px;
}
