/* Google Font: Mitr and Sarabun for Thai readability */
@import url('https://fonts.googleapis.com/css2?family=Mitr:wght@400;500;600&family=Sarabun:wght@400;500;600;700&display=swap');

:root {
    /* Color System: Coconut Garden (เขียวมะพร้าว ครีม น้ำตาลไม้) */
    --primary: #2e7d32;      /* Coconut Leaf Green */
    --primary-hover: #1b5e20;
    --primary-light: #e8f5e9;
    --primary-bg: #f1f8e9;
    --accent: #f57c00;       /* Coconut shell orange/brown */
    --accent-light: #fff3e0;
    --accent-hover: #e65100;
    --bg: #f5f6f1;           /* Cream light background */
    --surface: #ffffff;
    --text: #2c3e50;
    --text-muted: #7f8c8d;
    --border: #e2e8f0;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.12);
    --border-radius: 16px;
    --font-primary: 'Sarabun', sans-serif;
    --font-heading: 'Mitr', sans-serif;
    
    /* Font Sizing Optimized for Elderly Mobile Use */
    --font-size-base: 20px;
    --font-size-title: 25px;
    --font-size-hero: 32px;
}

/* High Contrast Mode overrides */
body.high-contrast {
    --primary: #1b5e20;
    --primary-light: #ffffff;
    --primary-bg: #ffffff;
    --bg: #ffffff;
    --surface: #ffffff;
    --text: #000000;
    --text-muted: #111111;
    --border: #000000;
    --shadow-sm: none;
    --shadow-md: none;
    --shadow-lg: none;
}

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

/* Centered Mobile App Shell Container */
body {
    font-family: var(--font-primary);
    font-size: var(--font-size-base);
    color: var(--text);
    background-color: #e2e8f0; /* Grey background outside the app frame */
    line-height: 1.4;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    max-width: 600px; /* Force mobile app width on desktop */
    margin: 0 auto;
    position: relative;
    box-shadow: 0 0 30px rgba(0,0,0,0.15);
    background-color: var(--bg);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 500;
    margin-bottom: 0.4em;
}

/* App Header Styling (Compact Mobile Header) */
.app-header {
    background-color: var(--primary);
    color: white;
    padding: 10px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 100;
    height: 70px;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-logo {
    font-size: 2.2rem;
    line-height: 1;
}

.brand-name {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: bold;
    display: block;
    line-height: 1.2;
}

.brand-clock {
    font-size: 0.75rem;
    font-family: monospace;
    opacity: 0.85;
    display: block;
}

.header-actions {
    display: flex;
    gap: 10px;
}

.btn-icon-header {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-icon-header:active {
    background-color: rgba(255, 255, 255, 0.35);
}

/* Base Button Styling (Big & Tap Friendly) */
button, .btn {
    font-family: var(--font-primary);
    font-size: var(--font-size-base);
    font-weight: 600;
    padding: 14px 22px;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.15s ease;
    user-select: none;
    min-height: 54px; /* standard mobile tap height */
}

button:active, .btn:active {
    transform: scale(0.97);
}

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

.btn-primary:hover {
    background-color: var(--primary-hover);
}

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

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

.btn-light {
    background-color: var(--surface);
    color: var(--text);
    border: 2px solid var(--border);
}

.btn-danger {
    background-color: #e53935;
    color: white;
}

/* Main Container Layout */
.app-container {
    padding: 16px;
    padding-bottom: 95px; /* Leave space for bottom nav bar */
    flex-grow: 1;
}

/* Tab Screens visibility */
.app-screen {
    display: none;
}

.app-screen.active {
    display: block;
    animation: fadeIn 0.2s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- SCREEN 1: POS PRODUCTS TAB --- */
/* Category tabs scroll horizontally */
.category-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
    overflow-x: auto;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
}

.category-tabs::-webkit-scrollbar {
    height: 4px;
}

.btn-category {
    padding: 10px 18px;
    border-radius: 25px;
    background-color: var(--surface);
    border: 2px solid var(--border);
    color: var(--text);
    white-space: nowrap;
    font-family: var(--font-heading);
    font-size: 0.9em;
    min-height: 44px;
}

.btn-category.active {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

/* POS Item Grid */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
    gap: 12px;
}

/* POS Item Card */
.menu-item-card {
    background-color: var(--surface);
    border-radius: var(--border-radius);
    border: 2px solid var(--border);
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all 0.15s ease;
    user-select: none;
    position: relative;
    overflow: hidden;
}

.menu-item-card:active {
    transform: scale(0.96);
    border-color: var(--primary);
}

.menu-item-emoji {
    font-size: 2.6rem;
    margin-bottom: 5px;
    line-height: 1;
}

.menu-item-name {
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 0.85em;
    color: var(--text);
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.8em;
}

.menu-item-price {
    font-size: 1em;
    font-weight: 700;
    color: var(--accent);
    margin-top: auto;
}

.menu-item-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    background-color: var(--primary);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8em;
    box-shadow: var(--shadow-sm);
}

/* --- SCREEN 2: CART TAB --- */
.cart-panel {
    background-color: var(--surface);
    border-radius: var(--border-radius);
    border: 2px solid var(--border);
    padding: 16px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--border);
    padding-bottom: 12px;
    margin-bottom: 12px;
}

.cart-title {
    font-family: var(--font-heading);
    font-size: var(--font-size-title);
}

.cart-items {
    overflow-y: auto;
    margin-bottom: 15px;
}

/* Cart Item Row */
.cart-item {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.cart-item-emoji {
    font-size: 1.6rem;
}

.cart-item-info {
    display: flex;
    flex-direction: column;
    padding-right: 5px;
}

.cart-item-name {
    font-weight: 600;
    font-size: 0.85em;
    line-height: 1.2;
}

.cart-item-price-unit {
    font-size: 0.75em;
    color: var(--text-muted);
}

.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 6px;
}

.qty-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    font-size: 1.1em;
    padding: 0;
    min-height: 38px;
}

.qty-number {
    font-weight: 700;
    width: 25px;
    text-align: center;
    font-size: 0.9em;
}

.cart-item-total {
    font-weight: 700;
    color: var(--text);
    min-width: 65px;
    text-align: right;
    font-size: 0.9em;
    line-height: 1.2;
}

/* Cart Empty State */
.cart-empty {
    text-align: center;
    padding: 40px 10px;
    color: var(--text-muted);
}

.cart-empty-emoji {
    font-size: 3.5rem;
    margin-bottom: 10px;
    opacity: 0.6;
}

/* Cart Footer Calculations */
.cart-totals {
    border-top: 2px solid var(--border);
    padding-top: 12px;
    margin-bottom: 15px;
}

.totals-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.totals-row.grand-total {
    font-family: var(--font-heading);
    font-size: calc(var(--font-size-base) * 1.1);
    color: var(--primary);
    font-weight: 700;
    border-top: 1px dashed var(--border);
    padding-top: 8px;
    margin-top: 8px;
}

.grand-total-amount {
    color: var(--accent);
}

.cart-actions {
    display: grid;
    grid-template-columns: 1fr 1.8fr;
    gap: 10px;
}

.btn-checkout {
    font-family: var(--font-heading);
}

/* --- PAYMENT MODAL DIALOG --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 600px;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
    z-index: 2000;
    display: none;
    align-items: flex-end; /* Pop from bottom on mobile */
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background-color: var(--surface);
    border-radius: 24px 24px 0 0;
    width: 100%;
    max-height: 94vh;
    box-shadow: var(--shadow-lg);
    border: 3px solid var(--primary);
    border-bottom: none;
    overflow-y: auto;
    animation: modalSlideUp 0.3s cubic-bezier(0.1, 0.8, 0.3, 1);
}

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

/* Sweetness Selection Styles */
.sweetness-options-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 20px;
}

.btn-sweetness {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    border-radius: 16px;
    padding: 16px 20px;
    font-size: 1.25rem;
    font-weight: 700;
    transition: all 0.15s ease;
    box-shadow: var(--shadow-sm);
    min-height: 65px;
    border: 2.5px solid var(--border);
}

.sweetness-100 {
    background-color: #ffe0b2;
    color: #e65100;
    border-color: #ffb74d;
}
.sweetness-100:active {
    background-color: #ffcc80;
}

.sweetness-50 {
    background-color: #c8e6c9;
    color: #1b5e20;
    border-color: #81c784;
}
.sweetness-50:active {
    background-color: #a5d6a7;
}

.sweetness-0 {
    background-color: #e0f7fa;
    color: #006064;
    border-color: #4dd0e1;
}
.sweetness-0:active {
    background-color: #b2ebf2;
}

.sweetness-actions {
    padding: 0 20px 20px;
}

.btn-cancel-sweetness {
    width: 100%;
    min-height: 55px;
}

.cart-item-sweetness {
    display: inline-block;
    font-size: 0.75em;
    color: var(--accent);
    background-color: var(--accent-light);
    border: 1.5px solid var(--border);
    padding: 2px 8px;
    border-radius: 20px;
    margin-top: 4px;
    font-weight: bold;
    width: fit-content;
}

/* High contrast overrides for sweetness elements */
body.high-contrast .btn-sweetness,
body.high-contrast .cart-item-sweetness {
    background-color: white !important;
    color: black !important;
    border: 3px solid black !important;
    box-shadow: none !important;
}

.modal-header {
    background-color: var(--primary);
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.1rem;
}

.modal-close {
    background: transparent;
    color: white;
    font-size: 1.3em;
    padding: 4px 10px;
    border-radius: 50%;
}

.payment-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    padding: 15px;
}

/* Left part of payment: Amounts display & visual cash helper */
.payment-summary {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.summary-card {
    background-color: var(--bg);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 12px;
}

.summary-label {
    font-size: 0.75em;
    color: var(--text-muted);
    font-weight: bold;
}

.summary-value {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text);
}

.summary-value.total-to-pay {
    color: var(--primary);
}

.summary-value.change-due {
    color: var(--accent);
}

/* Quick Cash Received Buttons */
.quick-cash-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 5px;
}

/* Right part of payment: Numpad */
.numpad-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.numpad-display {
    background-color: #2c3e50;
    color: #2ecc71;
    font-family: 'Courier New', monospace;
    font-size: 2.2rem;
    font-weight: 700;
    padding: 8px 16px;
    border-radius: 12px;
    text-align: right;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.numpad-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.numpad-btn {
    font-size: 1.4rem;
    height: 55px;
    border-radius: 12px;
    background-color: #f8f9fa;
    border: 2px solid #dee2e6;
    color: #495057;
    font-weight: bold;
    min-height: 55px;
}

.numpad-btn:active {
    background-color: #e9ecef;
}

.numpad-btn.btn-clear {
    background-color: #ffebee;
    color: #c62828;
    border-color: #ffcdd2;
}

/* Visual Cash Change Helper Box */
.cash-helper-box {
    border-top: 2px dashed var(--border);
    padding-top: 15px;
    margin-top: 5px;
}

.cash-helper-title {
    font-family: var(--font-heading);
    font-size: 0.9em;
    margin-bottom: 8px;
}

.cash-visuals {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 65px;
    align-items: center;
    background-color: var(--primary-bg);
    border-radius: 12px;
    padding: 10px;
    border: 1px solid var(--primary-light);
}

/* Individual bill/coin icons */
.cash-bill, .cash-coin {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-family: var(--font-heading);
    color: white;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.3);
    box-shadow: 0 3px 5px rgba(0,0,0,0.15);
}

.cash-bill {
    width: 75px;
    height: 40px;
    border-radius: 5px;
    border: 1.5px solid rgba(255,255,255,0.4);
    font-size: 0.95rem;
}

.cash-bill::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    right: 3px;
    bottom: 3px;
    border: 1px dashed rgba(255,255,255,0.3);
    border-radius: 2px;
}

.cash-bill-1000 { background-color: #b0bec5; color: #37474f; }
.cash-bill-500  { background-color: #ce93d8; color: #4a148c; }
.cash-bill-100  { background-color: #ef9a9a; color: #b71c1c; }
.cash-bill-50   { background-color: #80deea; color: #006064; }
.cash-bill-20   { background-color: #a5d6a7; color: #1b5e20; }

.cash-coin {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    font-size: 0.85rem;
    border: 2px solid;
}

.cash-coin-10 {
    background-color: #ffb74d;
    border-color: #cfd8dc;
    color: #4e342e;
    width: 40px;
    height: 40px;
}
.cash-coin-5 {
    background-color: #b0bec5;
    border-color: #90a4ae;
    color: #263238;
}
.cash-coin-2 {
    background-color: #ffe082;
    border-color: #ffb700;
    color: #5d4037;
}
.cash-coin-1 {
    background-color: #cfd8dc;
    border-color: #b0bec5;
    color: #37474f;
    width: 34px;
    height: 34px;
}

.cash-count-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #d32f2f;
    color: white;
    font-family: var(--font-primary);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 8px;
}

.payment-actions {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 12px;
    padding: 0 15px 20px;
}

/* --- SCREEN 3: MENU MANAGEMENT --- */
.menu-editor-layout {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.editor-card {
    background-color: var(--surface);
    border-radius: var(--border-radius);
    border: 2px solid var(--border);
    padding: 16px;
    box-shadow: var(--shadow-sm);
}

.editor-card-title {
    font-family: var(--font-heading);
    font-size: var(--font-size-title);
    margin-bottom: 12px;
    border-bottom: 2px solid var(--border);
    padding-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-group {
    margin-bottom: 15px;
}

.form-label {
    display: block;
    font-weight: bold;
    margin-bottom: 6px;
    font-size: 0.9em;
}

.form-control {
    width: 100%;
    font-family: var(--font-primary);
    font-size: var(--font-size-base);
    padding: 10px 14px;
    border-radius: 12px;
    border: 2px solid var(--border);
    background-color: var(--bg);
    outline: none;
    min-height: 48px;
}

.form-control:focus {
    border-color: var(--primary);
    background-color: white;
}

/* Selectable Emojis List in Editor */
.emoji-selector {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    max-height: 120px;
    overflow-y: auto;
    padding: 4px;
    border: 2px solid var(--border);
    border-radius: 12px;
    background-color: var(--bg);
}

.emoji-option {
    font-size: 1.8rem;
    height: 48px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background-color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.emoji-option.selected {
    border: 3px solid var(--primary);
    background-color: var(--primary-light);
}

/* Table of Current Items in Editor */
.editor-list-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85em;
}

.editor-list-table th, .editor-list-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 2px solid var(--border);
}

.editor-list-table th {
    background-color: var(--primary-light);
    font-family: var(--font-heading);
}

.table-emoji {
    font-size: 1.8rem;
}

.table-actions {
    display: flex;
    gap: 6px;
}

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

/* --- SCREEN 4: REPORTS --- */
.reports-layout {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Report summary blocks */
.report-cards-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.report-summary-card {
    background-color: var(--surface);
    border-radius: var(--border-radius);
    border: 2px solid var(--border);
    padding: 15px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 15px;
}

.report-card-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
}

.report-card-icon.accent {
    background-color: var(--accent-light);
    color: var(--accent);
}

.report-card-info {
    display: flex;
    flex-direction: column;
}

.report-card-label {
    font-size: 0.8em;
    color: var(--text-muted);
    font-weight: bold;
}

.report-card-value {
    font-family: var(--font-heading);
    font-size: 1.15em;
    font-weight: 700;
    color: var(--text);
}

/* Chart and Tables grid */
.report-details-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.report-section {
    background-color: var(--surface);
    border-radius: var(--border-radius);
    border: 2px solid var(--border);
    padding: 16px;
    box-shadow: var(--shadow-sm);
}

.report-section-title {
    font-family: var(--font-heading);
    font-size: var(--font-size-title);
    margin-bottom: 12px;
    border-bottom: 2px solid var(--border);
    padding-bottom: 8px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
}

.report-section-title-text {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Simple CSS-based bar chart */
.chart-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chart-bar-row {
    display: grid;
    grid-template-columns: 110px 1fr 50px;
    align-items: center;
    gap: 8px;
    font-size: 0.8em;
}

.chart-bar-label {
    font-weight: bold;
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chart-bar-wrapper {
    height: 26px;
    background-color: var(--bg);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border);
}

.chart-bar-fill {
    height: 100%;
    background-color: var(--primary);
    border-radius: 6px;
    transition: width 0.6s cubic-bezier(0.1, 0.8, 0.3, 1);
    width: 0;
}

.chart-bar-value {
    font-weight: 700;
    color: var(--accent);
}

/* Transaction History Table styling */
.history-table-container {
    overflow-x: auto;
    max-height: 300px;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8em;
}

.history-table th, .history-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.history-table th {
    background-color: var(--bg);
    font-family: var(--font-heading);
    position: sticky;
    top: 0;
    z-index: 10;
}

.history-items-list {
    font-size: 0.9em;
    color: var(--text-muted);
}

/* Success Overlay (Receipt Popup at success checkout) */
.success-overlay {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 600px;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.75);
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 15px;
}

.success-overlay.active {
    display: flex;
}

.receipt-card {
    background-color: #ffffff;
    color: #000000;
    width: 100%;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    padding: 20px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 1rem;
    line-height: 1.3;
    border: 2px dashed #000000;
    animation: successScale 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.2);
}

.receipt-header {
    text-align: center;
    border-bottom: 1px dashed #000000;
    padding-bottom: 10px;
    margin-bottom: 10px;
}

.receipt-shopname {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 3px;
}

.receipt-item-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
}

.receipt-totals {
    border-top: 1px dashed #000000;
    padding-top: 8px;
    margin-top: 10px;
}

.receipt-totals-row {
    display: flex;
    justify-content: space-between;
    font-weight: bold;
    margin-bottom: 4px;
}

.receipt-totals-row.grand {
    font-size: 1.2rem;
    border-top: 1px dashed #000000;
    padding-top: 6px;
    margin-top: 6px;
}

.receipt-footer {
    text-align: center;
    margin-top: 15px;
    border-top: 1px dashed #000000;
    padding-top: 10px;
    font-size: 0.9em;
}

.receipt-footer-button-container {
    margin-top: 15px;
    display: flex;
    justify-content: center;
}

/* ==================== BOTTOM TAB BAR NAVIGATION ==================== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 600px;
    height: 75px;
    background-color: var(--surface);
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-top: 2px solid var(--border);
    z-index: 1000;
    box-shadow: 0 -4px 10px rgba(0,0,0,0.05);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    flex: 1;
    height: 100%;
    padding: 5px 0;
    font-size: 0.75rem;
    font-weight: bold;
    gap: 3px;
    min-height: auto; /* reset base button minheight */
    border-radius: 0;
}

.nav-item.active {
    color: var(--primary);
}

.nav-icon {
    font-size: 1.55rem;
    line-height: 1;
}

.nav-badge {
    position: absolute;
    top: -8px;
    right: -14px;
    background-color: #d32f2f;
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    width: 19px;
    height: 19px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1.5px 3px rgba(0,0,0,0.25);
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
