/* ============================================================
   FLOURAL POS — Artfully Baked
   Forest Moss Green · Creamy Vanilla · Warm Gold · Blush Clay
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,300&family=DM+Mono:wght@400;500&display=swap');

:root {
    --forest: #1A6847;
    --forest-2: #1e4a2e;
    --moss: #6E7D5E;
    --vanilla: #F7F3E8;
    --gold: #C5A572;
    --gold-deep: #B8954F;
    --clay: #D1A7A0;
    --charcoal: #3C3529;

    --bg-primary: #0e2218;
    --bg-secondary: #132b1f;
    --bg-card: #1a3628;
    --bg-input: #1f3f2e;
    --bg-header: rgba(14, 34, 24, 0.92);

    --text-primary: #F7F3E8;
    --text-secondary: #b8c9b0;
    --text-muted: #5a7a64;
    --text-on-accent: #0e2218;

    --accent: #C5A572;
    --accent-hover: #B8954F;
    --accent-light: rgba(197, 165, 114, 0.12);
    --accent-dim: rgba(197, 165, 114, 0.07);

    --success: #4a8c5c;
    --success-bg: rgba(74, 140, 92, 0.14);
    --warning: #C5A572;
    --warning-bg: rgba(197, 165, 114, 0.14);
    --danger: #c0705a;
    --danger-bg: rgba(192, 112, 90, 0.14);
    --info: #5a8a7a;
    --info-bg: rgba(90, 138, 122, 0.14);
    --orange: #C5A572;
    --orange-bg: rgba(197, 165, 114, 0.14);

    --border: rgba(197, 165, 114, 0.14);
    --border-light: rgba(197, 165, 114, 0.28);
    --border-focus: rgba(197, 165, 114, 0.6);

    --shadow: 0 1px 4px rgba(0, 0, 0, 0.5), 0 4px 16px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.55), 0 20px 56px rgba(0, 0, 0, 0.4);

    --radius: 10px;
    --radius-sm: 7px;
    --radius-lg: 16px;
    --radius-round: 50%;

    --font: 'DM Sans', -apple-system, sans-serif;
    --font-mono: 'DM Mono', monospace;

    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    --transition: all 0.18s var(--ease);

    --header-height: 52px;
    --bottom-nav-height: 60px;
    --cart-bar-height: 54px;
}

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

html {
    font-size: 16px;
    -webkit-tap-highlight-color: transparent;
    text-rendering: optimizeLegibility;
}

body {
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    font-weight: 400;
    letter-spacing: -0.01em;
}

a {
    color: var(--accent);
    text-decoration: none;
}

img {
    max-width: 100%;
}

.hidden {
    display: none !important;
}

.mb-3 {
    margin-bottom: 12px;
}

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

.text-muted {
    color: var(--text-muted);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.06);
    }
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-3px);
    }

    75% {
        transform: translateX(3px);
    }
}

@keyframes popIn {
    from {
        opacity: 0;
        transform: scale(0.94);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.screen {
    display: none;
    min-height: 100vh;
}

.screen.active {
    display: flex;
}

.content-screen {
    display: none;
    flex-direction: column;
    padding: 14px 12px;
    padding-bottom: calc(var(--bottom-nav-height) + 16px);
    overflow-y: auto;
    height: calc(100vh - var(--header-height) - var(--bottom-nav-height));
    animation: fadeIn 0.22s var(--ease);
}

.content-screen.active {
    display: flex;
}

/* LOGIN */
.login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 32px 24px;
    max-width: 400px;
    margin: 0 auto;
    background: radial-gradient(ellipse 60% 40% at 50% 30%, rgba(197, 165, 114, 0.07) 0%, transparent 70%);
}

.login-logo {
    width: 120px;
    height: auto;
    margin-bottom: 20px;
    filter: drop-shadow(0 4px 20px rgba(197, 165, 114, 0.2));
}

.login-title {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 32px;
}

.login-subtitle {
    display: none;
}

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

#login-form {
    width: 100%;
}

/* FORMS */
.form-group {
    margin-bottom: 14px;
}

.form-group label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.input,
input[type="text"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="email"],
textarea,
select {
    width: 100%;
    padding: 11px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 15px;
    transition: var(--transition);
    outline: none;
    -webkit-appearance: none;
}

.input:focus,
input:focus,
textarea:focus,
select:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(197, 165, 114, 0.1);
    background: var(--bg-secondary);
}

.input::placeholder {
    color: var(--text-muted);
}

.input-sm {
    padding: 8px 10px;
    font-size: 13px;
}

select option {
    background: var(--bg-secondary);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
}

/* BUTTONS */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 11px 18px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    min-height: 42px;
    text-decoration: none;
    white-space: nowrap;
    letter-spacing: -0.01em;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: white;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.btn:active::after {
    opacity: 0.05;
}

.btn:active {
    transform: scale(0.98);
}

.btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    transform: none;
}

.btn-primary {
    background: var(--accent);
    color: var(--text-on-accent);
    border-color: var(--accent);
    font-weight: 700;
}

.btn-primary:hover:not(:disabled) {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}

.btn-success {
    background: var(--success);
    color: white;
    border-color: var(--success);
}

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

.btn-warning {
    background: var(--warning);
    color: var(--text-on-accent);
    border-color: var(--warning);
}

.btn-outline {
    background: transparent;
    border-color: var(--border-light);
    color: var(--text-secondary);
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-dim);
}

.btn-block {
    width: 100%;
}

.btn-lg {
    padding: 14px 22px;
    font-size: 15px;
    font-weight: 700;
    border-radius: var(--radius);
    letter-spacing: 0.04em;
}

.btn-sm {
    padding: 7px 12px;
    font-size: 12px;
    min-height: 32px;
}

/* HEADER */
#app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
    background: var(--bg-header);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
}

#app-content {
    margin-top: var(--header-height);
    overflow: hidden;
}

.header-left,
.header-right {
    display: flex;
    align-items: center;
    gap: 2px;
}

.header-center {
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.1em;
    color: var(--accent);
    text-transform: uppercase;
}

.header-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    padding: 8px;
    cursor: pointer;
    min-width: 40px;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    position: relative;
    transition: var(--transition);
}

.header-btn:hover {
    color: var(--accent);
    background: var(--accent-dim);
}

.badge-btn {
    position: relative;
}

.badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: var(--accent);
    color: var(--text-on-accent);
    font-size: 10px;
    font-weight: 700;
    font-family: var(--font-mono);
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
}

/* SIDE MENU */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 200;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.side-menu {
    position: fixed;
    top: 0;
    left: -276px;
    width: 276px;
    height: 100vh;
    background: var(--bg-secondary);
    z-index: 300;
    transition: left 0.28s var(--ease);
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border);
}

.side-menu.open {
    left: 0;
}

.side-menu-header {
    padding: 20px 18px 16px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
}

.side-menu-header::before {
    content: 'Floural';
    font-family: 'Georgia', serif;
    font-style: italic;
    font-size: 22px;
    color: var(--accent);
    flex: 1;
}

#side-menu-user {
    display: none;
}

.side-menu-header .role-badge {
    background: var(--accent-light);
    color: var(--accent);
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border: 1px solid rgba(197, 165, 114, 0.25);
}

.side-menu-list {
    list-style: none;
    flex: 1;
    overflow-y: auto;
    padding: 6px 0;
}

.side-menu-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
    color: var(--text-secondary);
    position: relative;
}

.side-menu-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 20%;
    bottom: 20%;
    width: 2px;
    background: var(--accent);
    border-radius: 0 2px 2px 0;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.side-menu-list li:hover {
    background: var(--accent-dim);
    color: var(--vanilla);
}

.side-menu-list li.active {
    color: var(--accent);
    background: var(--accent-dim);
}

.side-menu-list li.active::before {
    opacity: 1;
}

.side-menu-list li svg {
    width: 16px;
    height: 16px;
    stroke-width: 1.75;
    opacity: 0.75;
    flex-shrink: 0;
}

.side-menu-footer {
    padding: 14px 18px;
    border-top: 1px solid var(--border);
}

/* DROPDOWN */
.dropdown-menu {
    position: fixed;
    top: calc(var(--header-height) + 6px);
    right: 8px;
    z-index: 150;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    min-width: 210px;
    animation: popIn 0.18s var(--ease);
}

.dropdown-header {
    padding: 14px 16px 4px;
    font-weight: 600;
    font-size: 14px;
    color: var(--vanilla);
}

.dropdown-subheader {
    padding: 0 16px 10px;
    color: var(--text-muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.dropdown-menu hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 2px 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 11px 16px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 13px;
    text-align: left;
    cursor: pointer;
    font-family: var(--font);
    transition: var(--transition);
}

.dropdown-item:hover {
    background: var(--accent-dim);
    color: var(--vanilla);
}

.dropdown-item.danger {
    color: var(--danger);
}

.dropdown-item svg {
    width: 15px;
    height: 15px;
    opacity: 0.7;
}

/* BOTTOM NAV */
#bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: var(--bottom-nav-height);
    display: flex;
    align-items: stretch;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
}

.nav-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: var(--font);
    cursor: pointer;
    padding: 8px 4px;
    transition: var(--transition);
    position: relative;
}

.nav-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 30%;
    right: 30%;
    height: 2px;
    background: var(--accent);
    border-radius: 2px 2px 0 0;
    opacity: 0;
    transition: opacity 0.18s ease;
}

.nav-btn.active {
    color: var(--accent);
}

.nav-btn.active::after {
    opacity: 1;
}

.nav-icon {
    font-size: 20px;
    line-height: 1;
}

.nav-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.03em;
}

/* CATEGORY TABS */
.category-tabs {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 4px 0 8px;
    flex-shrink: 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.category-tabs::-webkit-scrollbar {
    display: none;
}

.category-tab {
    flex-shrink: 0;
    padding: 8px 18px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 24px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    min-height: 36px;
}

.category-tab:hover {
    border-color: var(--border-light);
    color: var(--text-secondary);
}

.category-tab.active {
    background: var(--accent);
    color: var(--text-on-accent);
    border-color: var(--accent);
    font-weight: 600;
}

/* MENU GRID */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 4px 0;
    overflow-y: auto;
    align-content: start;
    grid-auto-rows: minmax(90px, auto);

}

.menu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    padding: 10px 6px;
    text-align: center;
    user-select: none;
    min-height: 90px;
}

.menu-item:active {
    transform: scale(0.96);
}

.menu-item:hover {
    border-color: rgba(197, 165, 114, 0.3);
    background: var(--bg-input);
}

.menu-item.in-cart {
    border-color: var(--accent);
    background: var(--accent-dim);
}

.menu-item-code {
    font-size: 18px;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 0.02em;
    font-family: var(--font-mono);
}

.menu-item-name {
    font-size: 10px;
    color: var(--text-muted);
    line-height: 1.3;
    max-height: 2.6em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.menu-item-price {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

.menu-item-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--accent);
    color: var(--text-on-accent);
    width: 22px;
    height: 22px;
    border-radius: 11px;
    font-size: 11px;
    font-weight: 800;
    font-family: var(--font-mono);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: popIn 0.2s var(--ease);
}

/* CART BAR */
.cart-bar {
    position: fixed;
    bottom: var(--bottom-nav-height);
    left: 0;
    right: 0;
    z-index: 90;
    height: var(--cart-bar-height);
    padding: 0 16px;
    background: var(--accent);
    color: var(--text-on-accent);
    display: flex;
    align-items: center;
    justify-content: space-between;
    animation: slideUp 0.25s var(--ease);
}

#cart-summary {
    font-weight: 600;
    font-size: 13px;
}

.cart-bar-btn {
    background: rgba(0, 0, 0, 0.15);
    border: none;
    color: var(--text-on-accent);
    font-size: 18px;
    width: 34px;
    height: 34px;
    border-radius: 17px;
    cursor: pointer;
}

/* CART */
.cart-items-list {
    flex: 1;
    overflow-y: auto;
}

.cart-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 13px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 7px;
}

.cart-item-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-item-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--vanilla);
}

.cart-item-subtotal {
    font-weight: 700;
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 14px;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cart-item-controls .qty-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text-primary);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.cart-item-controls .qty-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.cart-item-controls .qty-display {
    font-size: 15px;
    font-weight: 700;
    min-width: 24px;
    text-align: center;
    font-family: var(--font-mono);
}

.cart-item-controls .btn-delete {
    color: var(--danger);
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    padding: 6px;
    opacity: 0.6;
}

.cart-item-controls .btn-delete:hover {
    opacity: 1;
}

.cart-item-controls .btn-note {
    color: var(--info);
    background: none;
    border: none;
    font-size: 14px;
    cursor: pointer;
    padding: 6px;
    opacity: 0.6;
}

.cart-totals {
    padding: 14px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    margin: 8px 0;
}

.cart-totals .total-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    margin-bottom: 5px;
    color: var(--text-secondary);
}

.cart-totals .total-row.grand {
    font-size: 17px;
    font-weight: 700;
    color: var(--vanilla);
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}

.cart-totals .total-row.grand span:last-child {
    color: var(--accent);
    font-family: var(--font-mono);
}

.cart-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 8px;
}

/* SCREEN HEADERS */
.screen-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    flex-shrink: 0;
}

.screen-header h2 {
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--vanilla);
}

.btn-back {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
    min-width: 36px;
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.btn-back:hover {
    color: var(--accent);
    background: var(--accent-dim);
}

.screen-desc {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 12px;
}

.screen-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.search-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-shrink: 0;
}

.search-bar .input {
    flex: 1;
}

/* ── CASH CALCULATOR — full-screen fixed layout, no scroll ── */
#screen-cash-calc.active {
    display: flex;
    flex-direction: column;
    height: calc(100vh - var(--header-height));
    overflow: hidden;
    /* prevent any scroll */
    padding: 0;
    /* remove content-screen default padding */
    padding-bottom: 0 !important;
}

/* Custom header row: back | total | confirm */
.calc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    flex-shrink: 0;
    border-bottom: 1px solid var(--border);
}

.calc-header-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.calc-header-total {
    font-size: 18px;
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--accent);
}

.calc-header-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* ✅ confirm button in header */
.calc-confirm-btn {
    background: none;
    border: 2px solid var(--border);
    color: var(--text-muted);
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
}

.calc-confirm-btn:not(:disabled) {
    border-color: var(--success);
    color: var(--success);
    background: var(--success-bg);
}

.calc-confirm-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Amount display */
#screen-cash-calc .calc-display {
    padding: 12px 14px;
    margin: 8px 10px 0;
    flex-shrink: 0;
}

#screen-cash-calc .calc-input-display {
    font-size: 26px;
}

/* Discount + table row */
.calc-meta-row {
    display: flex;
    gap: 8px;
    padding: 6px 10px;
    flex-shrink: 0;
}

.calc-meta-field {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.calc-meta-field label {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* Packaging indicator */
.calc-packaging-indicator {
    margin: 0 10px 2px;
    padding: 6px 12px;
    background: var(--accent-dim);
    border: 1px solid rgba(197, 165, 114, 0.3);
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
    flex-shrink: 0;
}

/* Numpad — flex: 1 so it fills remaining space */
#screen-cash-calc .calc-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
    padding: 6px 10px 10px;
    flex: 1;
    /* fill remaining vertical space */
    min-height: 0;
    /* allow shrinking */
}

/* Buttons stretch to fill grid rows */
#screen-cash-calc .calc-btn {
    min-height: unset;
    height: 100%;
    /* fill grid cell height */
    font-size: 18px;
}

/* Keep the packaging button icon+label readable */
#screen-cash-calc .calc-btn.packaging {
    font-size: 13px;
    flex-direction: column;
    gap: 2px;
}

#screen-cash-calc .calc-btn.packaging small {
    font-size: 9px;
    font-family: var(--font);
}

/* Remove bottom-nav offset since this screen uses full height */
@media (max-width: 1023px) {
    #screen-cash-calc.active {
        height: calc(100vh - var(--header-height) - var(--bottom-nav-height));
    }
}

/* PAYMENT */
.payment-total-display {
    text-align: center;
    padding: 24px 16px;
    font-size: 32px;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 20px;
    font-family: var(--font-mono);
}

.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.payment-method-btn {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    min-height: 58px;
}

.payment-method-btn:hover {
    border-color: var(--accent);
    background: var(--accent-dim);
}

.pm-icon {
    color: var(--accent);
}

.pm-icon svg {
    width: 22px;
    height: 22px;
}

.pm-label {
    font-size: 15px;
    font-weight: 600;
    color: var(--vanilla);
}

.qris-container {
    text-align: center;
    padding: 24px 16px;
}

.qris-placeholder {
    width: 180px;
    height: 180px;
    margin: 20px auto;
    background: var(--vanilla);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--charcoal);
    font-size: 13px;
    font-weight: 600;
}

.qris-total {
    font-size: 26px;
    font-weight: 700;
    margin: 16px 0;
    font-family: var(--font-mono);
    color: var(--accent);
}

.qris-instruction {
    color: var(--text-muted);
    font-size: 13px;
}

.transfer-container {
    padding: 16px;
}

.bank-options {
    display: flex;
    gap: 10px;
    margin: 12px 0;
}

.bank-btn {
    flex: 1;
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-align: center;
    cursor: pointer;
    color: var(--text-secondary);
    font-family: var(--font);
    font-size: 13px;
    transition: var(--transition);
}

.bank-btn.selected {
    border-color: var(--accent);
    background: var(--accent-dim);
    color: var(--accent);
}

.transfer-total {
    text-align: center;
    font-size: 26px;
    font-weight: 700;
    margin: 16px 0;
    font-family: var(--font-mono);
    color: var(--accent);
}

.dp-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dp-total {
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    color: var(--accent);
    font-family: var(--font-mono);
}

.dp-presets {
    display: flex;
    gap: 6px;
}

.dp-preset {
    flex: 1;
    padding: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font);
    min-height: 40px;
    font-size: 13px;
    transition: var(--transition);
}

.dp-preset.active {
    background: var(--accent);
    color: var(--text-on-accent);
    border-color: var(--accent);
}

.dp-method-options {
    display: flex;
    gap: 6px;
}

.dp-method-btn {
    flex: 1;
    padding: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-weight: 500;
    cursor: pointer;
    font-family: var(--font);
    min-height: 40px;
    font-size: 13px;
    transition: var(--transition);
}

.dp-method-btn.selected {
    background: var(--accent-dim);
    color: var(--accent);
    border-color: rgba(197, 165, 114, 0.35);
}

/* SUCCESS */
.success-container {
    text-align: center;
    padding: 40px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.success-icon svg {
    width: 52px;
    height: 52px;
    stroke-width: 1.5;
    color: var(--success);
}

.success-details {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 18px;
    width: 100%;
    text-align: left;
    border: 1px solid var(--border);
}

.success-details .detail-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 13px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
}

.success-details .detail-row:last-child {
    border-bottom: none;
}

.success-details .detail-row.highlight {
    font-weight: 700;
    color: var(--success);
    font-size: 15px;
}

.success-actions {
    width: 100%;
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* FILTER TABS */
.filter-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 12px;
    flex-shrink: 0;
}

.filter-tab {
    flex: 1;
    padding: 9px 8px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-weight: 500;
    font-size: 12px;
    cursor: pointer;
    text-align: center;
    min-height: 38px;
    font-family: var(--font);
    transition: var(--transition);
    letter-spacing: 0.03em;
}

.filter-tab:hover {
    border-color: var(--border-light);
    color: var(--text-secondary);
}

.filter-tab.active {
    background: var(--accent-dim);
    color: var(--accent);
    border-color: rgba(197, 165, 114, 0.35);
    font-weight: 600;
}

/* ORDERS */
.orders-list {
    flex: 1;
    overflow-y: auto;
}

.order-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    margin-bottom: 8px;
    transition: var(--transition);
}

.order-card:hover {
    border-color: var(--border-light);
}

.order-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.order-card-number {
    font-weight: 600;
    font-size: 14px;
    font-family: var(--font-mono);
    color: var(--vanilla);
}

.order-card-status {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    letter-spacing: 0.04em;
}

.order-card-status.pending {
    background: var(--orange-bg);
    color: var(--orange);
}

.order-card-status.paid {
    background: var(--success-bg);
    color: var(--success);
}

.order-card-status.completed {
    background: var(--info-bg);
    color: var(--info);
}

.order-card-info {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.order-card-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

/* HUB */
.hub-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.hub-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 24px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: var(--transition);
    min-height: 110px;
}

.hub-card:hover {
    border-color: rgba(197, 165, 114, 0.35);
    background: var(--bg-input);
    transform: translateY(-1px);
}

.hub-card:active {
    transform: scale(0.98);
}

.hub-card svg {
    width: 26px;
    height: 26px;
    stroke-width: 1.5;
    color: var(--accent);
}

.hub-label {
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    color: var(--text-secondary);
}

/* LIST */
.list-container {
    flex: 1;
    overflow-y: auto;
}

.list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 6px;
    cursor: pointer;
    transition: var(--transition);
    min-height: 50px;
}

.list-item:hover {
    border-color: var(--border-light);
}

.list-item.settings-item:hover {
    border-color: rgba(197, 165, 114, 0.3);
    background: var(--accent-dim);
}

.list-item-main {
    flex: 1;
}

.list-item-title {
    font-weight: 500;
    font-size: 14px;
    color: var(--vanilla);
}

.list-item-subtitle {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.list-item-right {
    text-align: right;
    flex-shrink: 0;
}

.list-item-value {
    font-weight: 600;
    font-size: 13px;
    font-family: var(--font-mono);
    color: var(--accent);
}

.stock-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 4px;
    margin-right: 6px;
}

.stock-indicator.ok {
    background: var(--success);
}

.stock-indicator.warning {
    background: var(--warning);
}

.stock-indicator.low {
    background: var(--danger);
}

.stock-indicator.expired {
    background: var(--danger);
    animation: pulse 1.2s infinite;
}

/* SUMMARY */
.summary-bar {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.summary-card {
    flex: 1;
    min-width: 90px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 10px;
    text-align: center;
}

.summary-card .s-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.summary-card .s-value {
    font-size: 17px;
    font-weight: 700;
    margin-top: 4px;
    font-family: var(--font-mono);
    color: var(--accent);
}

/* REPORTS */
.report-content {
    flex: 1;
    overflow-y: auto;
}

.report-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    margin-bottom: 10px;
}

.report-section h3 {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
}

.report-row {
    display: flex;
    justify-content: space-between;
    padding: 7px 0;
    font-size: 13px;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
}

.report-row:last-child {
    border-bottom: none;
}

.report-row .report-val {
    font-family: var(--font-mono);
    color: var(--vanilla);
}

.report-row.total {
    font-weight: 700;
    border-top: 1px solid var(--border-light);
    padding-top: 10px;
    margin-top: 4px;
    color: var(--accent);
}

/* MODAL */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 500;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.modal-content {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    border: 1px solid var(--border);
    border-bottom: none;
    width: 100%;
    max-width: 500px;
    max-height: 88vh;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 18px 14px;
    animation: slideUp 0.28s var(--ease);
}

.modal-content::before {
    content: '';
    display: block;
    width: 32px;
    height: 3px;
    background: var(--border-light);
    border-radius: 2px;
    margin: 0 auto 16px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.modal-header h3 {
    font-size: 15px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    color: var(--vanilla);
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
    padding: 6px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--accent-dim);
    color: var(--accent);
}

.modal-body .form-group {
    margin-bottom: 10px;
}

.modal-body .form-group label {
    font-size: 11px;
}

.modal-body .input {
    padding: 9px 12px;
    font-size: 14px;
    min-height: 38px;
}

.modal-actions {
    display: flex;
    gap: 6px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.modal-actions .btn {
    flex: 1;
    min-width: 80px;
    padding: 10px;
    font-size: 13px;
}

.recipe-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    margin-bottom: 4px;
    font-size: 13px;
    border: 1px solid var(--border);
}

.recipe-row .recipe-name {
    flex: 1;
    font-weight: 500;
    color: var(--text-secondary);
}

.recipe-row .recipe-qty {
    width: 56px;
    text-align: center;
    font-family: var(--font-mono);
    color: var(--accent);
}

.recipe-row .recipe-del {
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
    font-size: 14px;
    padding: 4px;
    opacity: 0.6;
}

.recipe-row .recipe-del:hover {
    opacity: 1;
}

/* TOAST */
.toast {
    position: fixed;
    bottom: calc(var(--bottom-nav-height) + 72px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-card);
    color: var(--vanilla);
    padding: 11px 20px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 500;
    z-index: 1000;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    animation: popIn 0.22s var(--ease);
    max-width: calc(100vw - 32px);
    white-space: nowrap;
}

.toast.success {
    border-color: rgba(74, 140, 92, 0.5);
    color: var(--success);
}

.toast.error {
    border-color: rgba(192, 112, 90, 0.5);
    color: var(--danger);
}

.alert {
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    margin-top: 12px;
}

.alert-error {
    background: var(--danger-bg);
    color: var(--danger);
    border: 1px solid rgba(192, 112, 90, 0.3);
}

.search-results {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    max-height: 200px;
    overflow-y: auto;
    margin-top: 4px;
}

.search-result-item {
    padding: 11px 14px;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    min-height: 42px;
    display: flex;
    align-items: center;
    color: var(--text-secondary);
    transition: var(--transition);
}

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

.search-result-item:hover {
    background: var(--accent-dim);
    color: var(--accent);
}

.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 36px;
    margin-bottom: 10px;
    opacity: 0.4;
}

.empty-state-text {
    font-size: 13px;
}

.shelf-actions,
.packaging-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 10px;
}

/* CALCULATOR BASE STYLES */
.calc-display {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.calc-total-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 4px;
}

.calc-input-display {
    font-size: 30px;
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--vanilla);
    text-align: right;
}

.calc-change {
    font-size: 15px;
    font-weight: 600;
    margin-top: 8px;
    font-family: var(--font-mono);
    text-align: right;
}

.calc-change.positive {
    color: var(--success);
}

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

.calc-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}

.calc-btn {
    min-height: 58px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 20px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    font-family: var(--font-mono);
    background: none;
    color: var(--vanilla);
}

.calc-btn:active {
    transform: scale(0.96);
}

.calc-btn.num {
    background: var(--bg-card);
    color: var(--vanilla);
}

.calc-btn.num:hover {
    background: var(--bg-input);
}

.calc-btn.action {
    background: var(--bg-secondary);
    color: var(--text-secondary);
}

.calc-btn.clear {
    background: var(--danger-bg);
    color: var(--danger);
    border-color: rgba(192, 112, 90, 0.2);
}

.calc-btn.pas {
    background: var(--success-bg);
    color: var(--success);
    border-color: rgba(74, 140, 92, 0.2);
    font-size: 18px;
    gap: 2px;
}

.calc-btn.pas small {
    font-size: 9px;
    font-family: var(--font);
}

.calc-btn.packaging {
    background: var(--accent-light);
    color: var(--accent);
    border-color: rgba(197, 165, 114, 0.2);
    font-size: 14px;
    gap: 2px;
}

.calc-btn.packaging small {
    font-size: 9px;
    font-family: var(--font);
}

@media (min-width: 768px) {
    .menu-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
    }

    .hub-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .modal-content {
        max-width: 480px;
        border-radius: var(--radius-lg);
        margin: auto;
        border: 1px solid var(--border);
    }

    .modal-content::before {
        display: none;
    }

    .modal-overlay {
        align-items: center;
    }
}

@media (min-width: 1024px) {
    .menu-grid {
        grid-template-columns: repeat(5, 1fr);

    }

    .content-screen {
        max-width: 860px;
        margin-left: auto;
        margin-right: auto;
    }

    #bottom-nav {
        display: none;
    }

    .content-screen {
        padding-bottom: 16px;
        height: calc(100vh - var(--header-height));
    }

    .cart-bar {
        bottom: 0;
    }
}

#screen-pos {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding-bottom: 0;
}

#pos-categories {
    flex-shrink: 0;
}

#pos-grid {
    overflow-y: auto;
    align-content: start;
    grid-auto-rows: minmax(90px, auto);
    padding-bottom: calc(var(--cart-bar-height) + 8px);
}

/* ── POS grid dead-zone fix ── */
#screen-pos {
    display: flex;
    flex-direction: column;
    height: calc(100vh - var(--header-height) - var(--bottom-nav-height));
    overflow: hidden;
    padding: 0 !important;
    padding-bottom: 0 !important;
}

#pos-categories {
    flex-shrink: 0;
    padding: 4px 12px 0;
}

#pos-grid {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    padding: 4px 12px;
    padding-bottom: 8px;
    align-content: start;
    grid-auto-rows: minmax(90px, auto);
    /* Only add cart-bar clearance when cart bar is visible */
}

#pos-grid.cart-visible {
    padding-bottom: calc(var(--cart-bar-height) + 8px);
}

/* ── Success screen: scrollable, clears bottom nav ── */
#screen-success {
    overflow-y: auto !important;
    padding-bottom: 80px !important;
}

#screen-success .success-container {
    min-height: unset;
    padding-bottom: 24px;
}

/* ── detail-divider & section-label used in bayar sisa ── */
.detail-divider {
    border-top: 1px dashed var(--border);
    margin: 10px 0;
}

.detail-section-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

/* ── Cart screen: sticky footer layout ── */
#screen-cart {
    display: none;
    flex-direction: column;
    height: calc(100vh - var(--header-height) - var(--bottom-nav-height));
    overflow: hidden;
    padding: 14px 12px 0;
}

#screen-cart.active {
    display: flex;
}

#screen-cart .cart-items-list {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

#screen-cart .cart-totals {
    flex-shrink: 0;
}

#screen-cart .cart-actions {
    flex-shrink: 0;
    padding: 8px 0 12px;
}

/* ── Cart header: small title + inline summary ── */
#screen-cart .screen-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

#screen-cart .screen-header h2 {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

#cart-header-summary {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    text-align: right;
    line-height: 1.4;
}

/* ── Hide totals card ── */
#screen-cart .cart-totals {
    display: none !important;
}