:root {
    --accent: #c9622f;
    --accent-soft: color-mix(in srgb, #c9622f 13%, #fffdfa);
    --bg: #f6f1ea;
    --card-bg: #ffffff;
    --panel-bg: #fffdfa;
    --text: #2e2823;
    --text-light: #6b6157;
    --text-muted: #8a7f73;
    --text-faint: #a8998a;
    --border: #ece4d9;
    --border-light: #f0e8dc;
    --shadow-sm: 0 6px 16px -12px rgba(60, 40, 20, 0.45);
    --shadow-md: 0 12px 24px -12px rgba(60, 40, 20, 0.45);
    --shadow-lg: 0 30px 60px -30px rgba(80, 50, 20, 0.35);
    --radius-sm: 12px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
}

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

body {
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: transparent;
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type=number] {
    -moz-appearance: textfield;
}

.hidden {
    display: none !important;
}

/* Login Screen */
.overlay {
    position: fixed;
    inset: 0;
    background: radial-gradient(125% 120% at 50% -10%, #fff7ef 0%, #f6f1ea 58%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 24px;
}

.login-container {
    width: 100%;
    max-width: 382px;
    background: var(--panel-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 42px 36px;
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.logo {
    width: 60px;
    height: 60px;
    border-radius: 18px;
    background: var(--accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 22px;
    margin: 0 auto;
    box-shadow: 0 12px 24px -10px var(--accent);
}

.login-container h1 {
    font-size: 24px;
    font-weight: 800;
    margin: 20px 0 6px;
    letter-spacing: -0.01em;
}

.login-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 700;
    margin: 0 0 26px;
}

.login-container input {
    width: 100%;
    padding: 15px 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 16px;
    font-family: inherit;
    font-weight: 600;
    background: #fff;
    color: var(--text);
    outline: none;
    text-align: center;
    margin-bottom: 12px;
    transition: border-color 0.2s;
}

.login-container input:focus {
    border-color: var(--accent);
}

.login-container button {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: var(--radius-md);
    background: var(--accent);
    color: #fff;
    font-weight: 800;
    font-size: 16px;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 12px 24px -10px var(--accent);
    transition: background 0.2s, transform 0.1s;
}

.login-container button:hover {
    background: #b8552a;
}

.login-container button:active {
    transform: scale(0.98);
}

.login-container button:disabled {
    background: #dcae93;
    cursor: wait;
}

.error {
    color: #d2563f;
    font-size: 13px;
    font-weight: 700;
    margin-top: 12px;
}

/* Header */
header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
    background: var(--panel-bg);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 13px;
}

.logo-sm {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    background: var(--accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 16px;
    letter-spacing: -0.02em;
    box-shadow: 0 6px 14px -6px var(--accent);
}

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

.app-name {
    font-weight: 800;
    font-size: 18px;
    letter-spacing: -0.01em;
}

.app-subtitle {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 700;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.sync-status {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
}

.sync-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #3f9d6b;
}

.sync-dot.syncing {
    background: #e0a33a;
}

#logout-btn {
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text-light);
    font-weight: 700;
    font-size: 13px;
    padding: 9px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s;
}

#logout-btn:hover {
    background: #f6f1ea;
}

/* Event Banner */
.event-banner {
    padding: 8px 24px;
    background: var(--accent-soft);
    border-bottom: 1px solid var(--border);
    text-align: center;
    flex-shrink: 0;
}

.event-name-text {
    font-weight: 700;
    font-size: 14px;
    color: var(--accent);
    letter-spacing: 0.02em;
}

/* Category Bar */
.category-bar {
    padding: 13px 24px;
    background: var(--panel-bg);
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
    flex-shrink: 0;
}

.chips {
    display: flex;
    gap: 8px;
}

.chip {
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text-light);
    font-weight: 700;
    font-size: 14px;
    padding: 9px 16px;
    border-radius: 999px;
    cursor: pointer;
    white-space: nowrap;
    font-family: inherit;
    transition: all 0.2s;
}

.chip:hover {
    background: #f6f1ea;
}

.chip.active {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 800;
}

/* Main Layout */
.main-layout {
    display: flex;
    flex: 1;
    min-height: 0;
    position: relative;
}

main {
    flex: 1;
    overflow-y: auto;
    padding: 22px 24px 44px;
}

.state-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 16px;
    gap: 16px;
    color: var(--text-faint);
    font-weight: 700;
}

.spinner {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.empty-icon {
    width: 66px;
    height: 66px;
    border-radius: 20px;
    background: #f3ece1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-title {
    font-weight: 800;
    color: var(--text-light);
    font-size: 15px;
}

.empty-text {
    font-size: 13px;
    color: var(--text-faint);
    max-width: 240px;
    line-height: 1.5;
    font-weight: 600;
    text-align: center;
}

.accent-btn {
    padding: 13px 22px;
    border: none;
    border-radius: var(--radius-md);
    background: var(--accent);
    color: #fff;
    font-weight: 800;
    font-size: 15px;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 8px 18px -8px var(--accent);
    transition: background 0.2s, transform 0.1s;
}

.accent-btn:hover {
    background: #b8552a;
}

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

/* Items Grid */
.category-group {
    margin-bottom: 26px;
}

.category-title {
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: #b3a48f;
    margin-bottom: 13px;
}

.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
    gap: 14px;
}

.item-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
    min-height: 170px;
    border: 2px solid #efe7db;
    box-shadow: var(--shadow-sm);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

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

.item-card.has-items {
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
}

.item-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    min-width: 26px;
    height: 26px;
    padding: 0 7px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-weight: 800;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px -3px var(--accent);
    z-index: 2;
}

.item-image {
    width: 100%;
    max-width: 150px;
    margin: 0 auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    object-position: center;
    border-radius: var(--radius-md);
    background: #f3ece1;
    display: block;
}

.item-image-placeholder {
    width: 100%;
    max-width: 150px;
    margin: 0 auto;
    aspect-ratio: 1 / 1;
    border-radius: var(--radius-md);
    background: repeating-linear-gradient(135deg, #f3ece1, #f3ece1 8px, #efe6d8 8px, #efe6d8 16px);
    display: flex;
    align-items: flex-end;
    padding: 8px;
}

.item-image-placeholder span {
    font: 700 9px/1.2 ui-monospace, monospace;
    letter-spacing: 0.05em;
    color: #b3a691;
    text-transform: uppercase;
}

.item-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.item-name {
    font-weight: 700;
    font-size: 15px;
    line-height: 1.25;
}

.item-price {
    font-weight: 700;
    font-size: 14px;
    color: var(--text-muted);
}

.item-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: auto;
}

.qty-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
    line-height: 1;
    transition: transform 0.1s;
}

.qty-btn:active {
    transform: scale(0.9);
}

.qty-btn.minus {
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text);
}

.qty-btn.plus {
    border: none;
    background: var(--accent);
    color: #fff;
    box-shadow: 0 6px 12px -6px var(--accent);
}

.qty-display {
    font-weight: 800;
    font-size: 16px;
    min-width: 22px;
    text-align: center;
}

/* Order Panel */
.order-panel {
    width: 384px;
    flex-shrink: 0;
    background: var(--panel-bg);
    border-left: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.panel-header {
    padding: 18px 24px 12px;
    flex-shrink: 0;
}

.panel-handle {
    width: 44px;
    height: 5px;
    border-radius: 3px;
    background: #e2d8c9;
    margin: 0 auto 14px;
    cursor: pointer;
    display: none;
}

.panel-header-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
}

.panel-title {
    font-size: 19px;
    font-weight: 800;
}

.item-count {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 0 24px;
    min-height: 0;
}

.cart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 54px 16px;
    gap: 14px;
}

.cart-empty-icon {
    width: 66px;
    height: 66px;
    border-radius: 20px;
    background: #f3ece1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-empty-icon::after {
    content: '';
    width: 26px;
    height: 26px;
    border: 2.5px solid #c9bca9;
    border-radius: 8px;
}

.cart-empty-title {
    font-weight: 800;
    color: var(--text-light);
    font-size: 15px;
}

.cart-empty-text {
    font-size: 13px;
    color: var(--text-faint);
    max-width: 210px;
    line-height: 1.5;
    font-weight: 600;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 0;
    border-bottom: 1px solid var(--border-light);
}

.cart-item-info {
    flex: 1;
    min-width: 0;
}

.cart-item-name {
    font-weight: 700;
    font-size: 14px;
}

.cart-item-total {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 700;
}

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

.cart-btn {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.1s;
}

.cart-btn:active {
    transform: scale(0.9);
}

.cart-btn.minus {
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text);
}

.cart-btn.plus {
    border: none;
    background: var(--accent);
    color: #fff;
}

.cart-qty {
    font-weight: 800;
    min-width: 18px;
    text-align: center;
    font-size: 15px;
}

.panel-footer {
    padding: 18px 24px 22px;
    border-top: 1px solid var(--border);
    background: var(--panel-bg);
    flex-shrink: 0;
}

.subtotal-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: var(--text-light);
    font-weight: 700;
    margin-bottom: 15px;
}

.subtotal-row span:last-child {
    font-weight: 800;
    color: var(--text);
}

.tip-section {
    margin-bottom: 16px;
}

.tip-label {
    font-size: 12px;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-bottom: 9px;
    display: block;
}

.tip-controls {
    display: flex;
    gap: 8px;
}

.tip-chips {
    display: flex;
    gap: 8px;
}

.tip-chip {
    padding: 10px 12px;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text-light);
    font-weight: 700;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    transition: all 0.2s;
}

.tip-chip:hover {
    background: #f6f1ea;
}

.tip-chip.active {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 800;
}

.tip-custom {
    position: relative;
    flex: 1;
}

.tip-currency {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-faint);
    font-weight: 700;
    pointer-events: none;
}

.tip-custom input {
    width: 100%;
    padding: 10px 12px 10px 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    background: #fff;
    color: var(--text);
    outline: none;
    transition: border-color 0.2s;
}

.tip-custom input:focus {
    border-color: var(--accent);
}

.total-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 13px 0 16px;
    border-top: 1px dashed #e2d8c9;
}

.total-row span:first-child {
    font-size: 16px;
    font-weight: 800;
}

.total-row span:last-child {
    font-size: 29px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

#submit-btn {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 16px;
    font-family: inherit;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    background: #eadfce;
    color: #bcae9a;
    transition: all 0.2s;
}

#submit-btn:not(:disabled) {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 12px 22px -10px var(--accent);
}

#submit-btn:not(:disabled):hover {
    background: #b8552a;
}

#submit-btn:not(:disabled):active {
    transform: scale(0.98);
}

/* Backdrop */
.backdrop {
    position: fixed;
    inset: 0;
    background: rgba(40, 28, 18, 0.42);
    z-index: 250;
}

/* Mini Bar (Mobile) */
.mini-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 200;
    background: var(--panel-bg);
    border-top: 1px solid var(--border);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    box-shadow: 0 -8px 24px -12px rgba(60, 40, 20, 0.25);
}

.mini-bar-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.mini-count {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
}

.mini-total {
    font-size: 21px;
    font-weight: 800;
    letter-spacing: -0.01em;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--text);
    color: #fff;
    padding: 14px 22px;
    border-radius: var(--radius-md);
    font-weight: 800;
    font-size: 14px;
    box-shadow: 0 14px 30px -10px rgba(40, 40, 40, 0.45);
    animation: rise 0.3s ease;
    z-index: 1000;
    max-width: 90vw;
    text-align: center;
}

.toast.success {
    background: #3f9d6b;
}

.toast.error {
    background: #d2563f;
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translate(-50%, 12px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

/* Responsive */
@media (max-width: 1023px) {
    .order-panel {
        width: 320px;
    }
}

@media (max-width: 759px) {
    header {
        padding: 12px 16px;
    }

    .sync-status {
        display: none;
    }

    .category-bar {
        padding: 12px 16px;
    }

    main {
        padding: 18px 16px 116px;
    }

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

    .item-card {
        padding: 12px;
        min-height: 150px;
    }

    .item-image,
    .item-image-placeholder {
        max-width: 120px;
    }

    .order-panel {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 84vh;
        background: var(--panel-bg);
        border-top: 1px solid var(--border);
        border-radius: 24px 24px 0 0;
        z-index: 300;
        box-shadow: 0 -20px 50px -20px rgba(60, 40, 20, 0.35);
        transform: translateY(110%);
        transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
        max-width: 100%;
    }

    .order-panel.open {
        transform: translateY(0);
    }

    .panel-handle {
        display: block;
    }

    .event-banner {
        padding: 7px 16px;
    }
    .event-name-text {
        font-size: 13px;
    }
}

/* Customer Name Section */
.customer-section {
    margin-bottom: 16px;
}

.customer-label {
    font-size: 12px;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-bottom: 9px;
    display: block;
}

#customer-name-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    background: #fff;
    color: var(--text);
    outline: none;
    transition: border-color 0.2s;
}

#customer-name-input:focus {
    border-color: var(--accent);
}

.payment-type-section {
    margin-bottom: 16px;
}

.payment-type-label {
    font-size: 12px;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-bottom: 9px;
    display: block;
}

#payment-type-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    background: #fff;
    color: var(--text);
    outline: none;
    transition: border-color 0.2s;
}

#payment-type-input:focus {
    border-color: var(--accent);
}

/* Price Modal */
.price-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.price-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(40, 28, 18, 0.42);
}

.price-modal-content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 360px;
    background: var(--panel-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    box-shadow: var(--shadow-lg);
}

.price-modal-title {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 8px;
}

.price-modal-item-name {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 700;
    margin-bottom: 20px;
}

.price-modal-input-wrapper {
    position: relative;
    margin-bottom: 24px;
}

.price-modal-currency {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-weight: 700;
    font-size: 16px;
    pointer-events: none;
}

#price-modal-input {
    width: 100%;
    padding: 14px 14px 14px 32px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 18px;
    font-weight: 700;
    font-family: inherit;
    background: #fff;
    color: var(--text);
    outline: none;
    transition: border-color 0.2s;
}

#price-modal-input:focus {
    border-color: var(--accent);
}

.price-modal-actions {
    display: flex;
    gap: 12px;
}

.price-modal-btn {
    flex: 1;
    padding: 13px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

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

.price-modal-btn.cancel {
    background: #f3ece1;
    color: var(--text-light);
}

.price-modal-btn.cancel:hover {
    background: #e8dfd2;
}

.price-modal-btn.save {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 8px 18px -8px var(--accent);
}

.price-modal-btn.save:hover {
    background: #b8552a;
}

/* One-Off Items */
.item-card.one-off {
    border-style: dashed;
}

.add-btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--accent);
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 6px 12px -6px var(--accent);
    transition: background 0.2s, transform 0.1s;
    margin-top: auto;
}

.add-btn:hover {
    background: #b8552a;
}

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

.item-controls.one-off-added {
    justify-content: flex-end;
    gap: 12px;
}

.one-off-label {
    font-size: 12px;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Price Override */
.item-price {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s;
}

.item-price:hover {
    color: var(--accent);
}

.item-price:hover .price-edit-icon {
    opacity: 1;
}

.price-edit-icon {
    font-size: 12px;
    opacity: 0.4;
    transition: opacity 0.2s;
}

.item-price.overridden {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 4px 8px;
    margin: -4px -8px;
    border-radius: 8px;
    transition: background-color 0.2s;
}

.item-price.overridden:hover {
    background-color: rgba(201, 98, 47, 0.1);
}

.item-price.overridden:hover .new-price {
    color: var(--accent);
}

.item-price.overridden .original-price {
    text-decoration: line-through;
    color: var(--text-faint);
    font-size: 12px;
    font-weight: 600;
}

.item-price.overridden .new-price {
    color: #3f9d6b;
    font-weight: 800;
    transition: color 0.2s;
}

.item-price.overridden .price-edit-icon {
    position: absolute;
    top: 4px;
    right: 4px;
    opacity: 0.6;
}

/* Payment QR Section */
.payment-qr-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px dashed #e2d8c9;
}

.payment-qr-label {
    font-size: 12px;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-bottom: 10px;
    text-align: center;
}

.payment-qr-buttons {
    display: flex;
    gap: 10px;
}

.payment-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 12px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

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

.venmo-btn {
    background: #008CFF;
    color: white;
}

.venmo-btn:not(:disabled):hover {
    background: #007AE6;
    transform: translateY(-1px);
}

.cashapp-btn {
    background: #00D632;
    color: white;
}

.cashapp-btn:not(:disabled):hover {
    background: #00BF2C;
    transform: translateY(-1px);
}

/* QR Modal */
.qr-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(40, 28, 18, 0.6);
    backdrop-filter: blur(4px);
}

.qr-modal-content {
    background: var(--panel-bg);
    border-radius: 24px;
    padding: 32px;
    max-width: 360px;
    width: 100%;
    box-shadow: 0 20px 60px -10px rgba(0, 0, 0, 0.3);
    position: relative;
}

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

.qr-modal-header h3 {
    font-size: 20px;
    font-weight: 800;
    margin: 0;
}

.qr-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background 0.2s;
}

.qr-modal-close:hover {
    background: rgba(0, 0, 0, 0.05);
}

.qr-modal-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

#qr-code-container {
    background: white;
    padding: 16px;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

#qr-code-container img {
    display: block;
}

.qr-amount {
    font-size: 32px;
    font-weight: 800;
    color: var(--text);
}

.qr-instructions {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 600;
    text-align: center;
}

.qr-submit-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    font-family: inherit;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--accent);
    color: white;
    margin-top: 8px;
}

.qr-submit-btn:hover {
    background: var(--accent-dark, #a84f24);
    transform: translateY(-1px);
}

.qr-submit-btn:active {
    transform: translateY(0);
}

/* Update Notification */
.update-notification {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

.update-notification-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    max-width: 800px;
    margin: 0 auto;
}

.update-notification-content span {
    font-weight: 600;
    font-size: 14px;
}

.update-reload-btn {
    background: white;
    color: #667eea;
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.update-reload-btn:hover {
    background: #f0f0f0;
    transform: scale(1.05);
}

.update-dismiss-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.update-dismiss-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}
