/* Custom CSS for KOMAPOS Mobile Order */

:root {
    /* Color Tokens (HSL) */
    --primary-hue: 14;      /* Warm coral/orange for food */
    --primary: hsl(var(--primary-hue), 90%, 55%);
    --primary-hover: hsl(var(--primary-hue), 85%, 48%);
    --primary-light: hsl(var(--primary-hue), 90%, 96%);
    --primary-glow: hsla(var(--primary-hue), 90%, 55%, 0.15);
    
    --bg-app: hsl(215, 24%, 97%);
    --bg-card: hsl(0, 0%, 100%);
    --border: hsl(215, 16%, 90%);
    --text-main: hsl(215, 28%, 17%);
    --text-muted: hsl(215, 14%, 48%);
    
    --accent: hsl(38, 95%, 52%);          /* Yellow/Gold for warnings */
    --accent-soft: hsl(38, 95%, 95%);
    
    --success: hsl(142, 68%, 45%);         /* Green for completed */
    --success-soft: hsl(142, 68%, 95%);
    
    --info: hsl(200, 85%, 48%);            /* Blue for general info */
    --info-soft: hsl(200, 85%, 95%);
    
    --danger: hsl(354, 70%, 54%);          /* Red for cancellations/errors */
    --danger-soft: hsl(354, 70%, 96%);

    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.02), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.05), 0 2px 4px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 16px -6px rgba(0, 0, 0, 0.05);
    
    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-body);
    background-color: #f0f2f5;
    color: var(--text-main);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Desktop Mock Framework (Deactivated) */
.desktop-bg, .mobile-device, .device-status-bar, .device-home-indicator {
    display: none;
}

/* Responsive App Layout */
body {
    font-family: var(--font-body);
    background-color: #f0f2f5;
    color: var(--text-main);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    margin: 0;
}

/* Customer / Mobile-first Layout Container */
body:not(.dashboard-body) .app-container {
    width: 100%;
    max-width: 500px;
    height: 100vh;
    height: 100dvh;
    margin: 0 auto;
    background-color: var(--bg-app);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

/* Dashboard / Manager Layout Container */
body.dashboard-body .app-container {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    background-color: var(--bg-app);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

/* App Header styling */
.app-header {
    background-color: var(--bg-card);
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    z-index: 50;
}

body.dashboard-body .app-header {
    padding: 0;
    border-bottom: none;
}


.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-text {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 20px;
    letter-spacing: -0.5px;
    color: var(--text-main);
}

.logo-highlight {
    color: var(--primary);
}

.user-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background-color: var(--bg-app);
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
}

.user-badge i {
    font-size: 14px;
    color: var(--primary);
}

/* Navigation headers */
.nav-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 40;
}

.back-btn {
    color: var(--text-main);
    text-decoration: none;
    font-size: 16px;
    width: 32px;
    height: 32px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    background-color: var(--bg-app);
    transition: transform 0.2s, background-color 0.2s;
}

.back-btn:active {
    transform: scale(0.9);
    background-color: var(--border);
}

.nav-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 18px;
    color: var(--text-main);
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Scrollable main content */
.app-main-content {
    flex: 1;
    overflow-y: auto;
    position: relative;
    padding: 16px;
}

/* Message styling */
.messages-container {
    margin-bottom: 16px;
}

.message {
    padding: 12px;
    border-radius: 12px;
    margin-bottom: 8px;
    font-size: 13px;
    display: flex;
    align-items: center;
    animation: slideIn 0.3s ease;
}

.message.success {
    background-color: var(--success-soft);
    color: var(--success);
    border: 1px solid hsla(142, 68%, 45%, 0.15);
}

.message.error {
    background-color: var(--accent-soft);
    color: var(--primary);
    border: 1px solid hsla(14, 90%, 55%, 0.15);
}

/* 1. Shop List Screen */
.welcome-section {
    margin-bottom: 20px;
}

.welcome-section h1 {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 4px;
}

.welcome-section p {
    font-size: 13px;
    color: var(--text-muted);
}

.shops-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.shop-card-wrapper {
    background-color: var(--bg-card);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: transform 0.2s, box-shadow 0.2s;
    margin-bottom: 16px;
}

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

.shop-card {
    text-decoration: none;
    color: inherit;
    display: block;
}

.shop-card-image {
    height: 140px;
    position: relative;
    overflow: hidden;
}

.shop-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.shop-card:hover .shop-card-image img {
    transform: scale(1.05);
}

.shop-card-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 700;
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.shop-card-content {
    padding: 16px;
}

.shop-card-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-main);
}

.shop-card-desc {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.shop-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border);
    padding-top: 10px;
    font-size: 11px;
    color: var(--text-muted);
}

.allergy-summary-badge {
    color: var(--accent);
    background-color: var(--accent-soft);
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* 2. Shop Detail Screen */
.shop-hero {
    height: 200px;
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 16px;
    border: 1px solid var(--border);
}

.shop-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.shop-hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0) 100%);
    padding: 16px;
    color: white;
}

.shop-hero-title {
    font-size: 20px;
    font-weight: 800;
    text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

.detail-card {
    background-color: var(--bg-card);
    border-radius: 20px;
    padding: 16px;
    margin-bottom: 16px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.detail-card-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-card-title i {
    color: var(--primary);
}

.detail-card-body {
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-main);
}

.allergy-alert-card {
    background-color: var(--accent-soft);
    border: 1px solid hsla(38, 95%, 52%, 0.15);
    border-radius: 20px;
    padding: 16px;
    margin-bottom: 80px; /* leaves room for sticky CTA button */
    box-shadow: var(--shadow-sm);
}

.allergy-alert-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.allergy-alert-body {
    font-size: 12px;
    line-height: 1.6;
    color: hsl(38, 90%, 25%);
}

/* Sticky Action Button at the Bottom of screen */
.bottom-cta-container {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px 16px;
    background: linear-gradient(to top, var(--bg-app) 70%, transparent 100%);
    z-index: 100;
}

.btn-primary-sticky {
    background-color: var(--primary);
    color: white;
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
    border: none;
    border-radius: 16px;
    width: 100%;
    padding: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    box-shadow: 0 10px 20px -5px hsla(var(--primary-hue), 90%, 55%, 0.4);
    transition: background-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.btn-primary-sticky:active {
    transform: translateY(2px);
    background-color: var(--primary-hover);
    box-shadow: 0 5px 10px -2px hsla(var(--primary-hue), 90%, 55%, 0.3);
}

/* 3. Menu List & Order Selection Screen */
.menu-container {
    padding-bottom: 120px; /* Leaves space for floating basket */
}

.menu-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.menu-item-card {
    background-color: var(--bg-card);
    border-radius: 20px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    display: flex;
    overflow: hidden;
    height: 110px;
}

.menu-item-image {
    width: 100px;
    height: 100%;
    flex-shrink: 0;
}

.menu-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.menu-item-info {
    flex: 1;
    padding: 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.menu-item-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.menu-item-desc {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.4;
    height: 32px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 4px;
}

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

.menu-item-price {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 14px;
    color: var(--primary);
}

.menu-item-allergies {
    font-size: 10px;
    color: var(--accent);
    background-color: var(--accent-soft);
    padding: 1px 6px;
    border-radius: 4px;
    margin-left: 6px;
    display: inline-block;
}

/* Quantity Counter Interface */
.quantity-counter {
    display: flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    background-color: var(--bg-app);
}

.counter-btn {
    background: none;
    border: none;
    width: 26px;
    height: 26px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 12px;
    color: var(--text-main);
    transition: background-color 0.2s;
}

.counter-btn:active {
    background-color: var(--border);
}

.counter-value {
    width: 28px;
    border: none;
    background: none;
    text-align: center;
    font-family: var(--font-heading);
    font-size: 12px;
    font-weight: 700;
    color: var(--text-main);
    pointer-events: none; /* read-only via JS buttons */
}

/* Floating Order Summary Panel */
.basket-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px;
    background-color: var(--bg-card);
    border-top: 1px solid var(--border);
    box-shadow: 0 -10px 25px -10px rgba(0, 0, 0, 0.15);
    z-index: 100;
}

.basket-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

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

.basket-total {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 20px;
    color: var(--primary);
}

.btn-submit-order {
    background-color: var(--primary);
    color: white;
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 700;
    border: none;
    border-radius: 12px;
    width: 100%;
    padding: 14px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 6px 12px -3px hsla(var(--primary-hue), 90%, 55%, 0.3);
    transition: background-color 0.2s, transform 0.1s;
}

.btn-submit-order:active {
    transform: scale(0.98);
    background-color: var(--primary-hover);
}

.btn-submit-order:disabled {
    background-color: var(--border);
    color: var(--text-muted);
    box-shadow: none;
    cursor: not-allowed;
}

/* 4. Order Detail & Status Screen */
.receipt-card {
    background-color: var(--bg-card);
    border-radius: 20px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    padding: 20px;
    margin-bottom: 20px;
    position: relative;
}

.receipt-card::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 10px;
    background-image: radial-gradient(circle, var(--border) 4px, transparent 5px);
    background-size: 12px 12px;
    background-position: bottom;
}

.receipt-header {
    text-align: center;
    border-bottom: 1px dashed var(--border);
    padding-bottom: 14px;
    margin-bottom: 16px;
}

.receipt-success-icon {
    font-size: 32px;
    color: var(--success);
    margin-bottom: 8px;
    animation: scalePop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.receipt-order-id {
    font-family: var(--font-heading);
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.receipt-shop-name {
    font-size: 16px;
    font-weight: 700;
    margin-top: 4px;
}

.receipt-item-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    margin-bottom: 8px;
}

.receipt-item-name {
    color: var(--text-main);
    flex: 1;
}

.receipt-item-qty {
    color: var(--text-muted);
    margin: 0 12px;
}

.receipt-item-price {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--text-main);
}

.receipt-total-row {
    border-top: 1px solid var(--border);
    padding-top: 12px;
    margin-top: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.receipt-total-label {
    font-weight: 700;
    font-size: 14px;
}

.receipt-total-price {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 18px;
    color: var(--primary);
}

/* Order Status Timeline Tracker */
.status-tracker-card {
    background-color: var(--bg-card);
    border-radius: 20px;
    border: 1px solid var(--border);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
}

.tracker-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 16px;
}

.timeline {
    display: flex;
    justify-content: space-between;
    position: relative;
    padding-left: 0;
    margin: 20px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 10%;
    right: 10%;
    top: 11px; /* Center of the 24px node */
    height: 2px;
    background-color: var(--border);
    z-index: 1;
}

.timeline-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    flex: 1;
    z-index: 2;
    padding-bottom: 0;
}

.timeline-step:last-child {
    padding-bottom: 0;
}

.timeline-node {
    position: relative;
    left: 0;
    top: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: var(--bg-card);
    border: 2px solid var(--border);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    transition: border-color 0.3s, background-color 0.3s, color 0.3s;
    box-shadow: var(--shadow-sm);
}

.timeline-step.active .timeline-node {
    border-color: var(--primary);
    background-color: var(--primary-light);
    color: var(--primary);
    font-weight: 700;
}

.timeline-step.completed .timeline-node {
    border-color: var(--success);
    background-color: var(--success);
    color: white;
}

.timeline-step.completed .timeline-node::before {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
}

.timeline-content {
    padding-left: 0;
    margin-top: 8px;
    text-align: center;
}

.timeline-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    white-space: nowrap;
}

.timeline-step.active .timeline-label {
    color: var(--primary);
}

.timeline-step.completed .timeline-label {
    color: var(--success);
}

.timeline-desc {
    display: none;
}

.timeline-active-desc {
    background-color: var(--bg-app);
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 12px;
    color: var(--text-main);
    line-height: 1.5;
    margin-top: 16px;
    border-left: 4px solid var(--primary);
    animation: slideIn 0.3s ease;
}

.timeline-active-desc.completed {
    border-left-color: var(--success);
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scalePop {
    0% {
        transform: scale(0.6);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Toppings Styling */
.menu-item-group {
    background-color: var(--bg-card);
    border-radius: 20px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    margin-bottom: 16px;
}

.menu-item-group .menu-item-card {
    border: none;
    border-radius: 0;
    box-shadow: none;
}

.toppings-container {
    padding: 12px 16px;
    background-color: var(--primary-light);
    border-top: 1px dashed var(--border);
    animation: slideIn 0.2s ease-out;
}

.toppings-header {
    font-size: 11px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.toppings-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.topping-item {
    display: flex;
    align-items: center;
    font-size: 12px;
    color: var(--text-main);
    cursor: pointer;
    user-select: none;
    padding: 4px 0;
}

.topping-item input[type="checkbox"] {
    display: none; /* Hide default checkbox */
}

/* Custom Checkbox */
.topping-checkbox-custom {
    width: 16px;
    height: 16px;
    border: 2px solid var(--border);
    border-radius: 4px;
    margin-right: 8px;
    display: inline-block;
    position: relative;
    background-color: var(--bg-card);
    transition: border-color 0.2s, background-color 0.2s;
}

.topping-item input[type="checkbox"]:checked + .topping-checkbox-custom {
    border-color: var(--primary);
    background-color: var(--primary);
}

.topping-item input[type="checkbox"]:checked + .topping-checkbox-custom::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 8px;
    color: white;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.topping-name {
    flex: 1;
}

.topping-price {
    font-weight: 700;
    color: var(--text-muted);
}

.topping-item input[type="checkbox"]:checked ~ .topping-price {
    color: var(--primary);
}

/* Card admin actions inside list */
.shop-card-admin-action {
    background-color: var(--bg-app);
    border-top: 1px dashed var(--border);
}

.admin-dashboard-link {
    display: block;
    padding: 12px;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s;
}

.admin-dashboard-link:active {
    background-color: var(--primary-light);
    color: var(--primary);
}

/* Dashboard Tabs Navigation */
.dashboard-tabs {
    display: flex;
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 40;
    margin: -16px -16px 16px -16px; /* offset main padding */
}

.tab-btn {
    flex: 1;
    background: none;
    border: none;
    padding: 14px 0;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 13px;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    border-bottom: 2px solid transparent;
    transition: color 0.2s, border-color 0.2s;
    position: relative;
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.active-orders-badge {
    background-color: var(--primary);
    color: white;
    font-size: 9px;
    font-weight: 800;
    padding: 1px 6px;
    border-radius: 100px;
    position: absolute;
    top: 6px;
    right: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

/* Tab Panels */
.tab-panels {
    position: relative;
}

.tab-panel {
    display: none;
    animation: fadeIn 0.25s ease-in-out;
}

.tab-panel.active {
    display: block;
}

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

/* Dashboard Summary Cards */
.dashboard-stats-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.stat-card {
    background-color: var(--bg-card);
    border-radius: 16px;
    padding: 16px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.stat-card.sales {
    background: linear-gradient(135deg, hsl(var(--primary-hue), 90%, 96%) 0%, hsl(var(--primary-hue), 90%, 92%) 100%);
    border-color: hsla(var(--primary-hue), 90%, 55%, 0.12);
}

.stat-card-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.stat-card.sales .stat-card-label {
    color: hsl(var(--primary-hue), 80%, 35%);
}

.stat-card-value {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 800;
    color: var(--text-main);
}

.stat-card.sales .stat-card-value {
    color: var(--primary);
}

.stat-card-sub {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 2px;
}

.stat-card.sales .stat-card-sub {
    color: hsl(var(--primary-hue), 70%, 45%);
}

.stat-card-row {
    display: flex;
    gap: 12px;
}

.stat-card-row .stat-card {
    flex: 1;
}

/* Dashboard sections */
.dashboard-section {
    background-color: var(--bg-card);
    border-radius: 20px;
    padding: 16px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    margin-bottom: 16px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title i {
    color: var(--primary);
}

/* Product list progress bar metrics */
.product-stats-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.product-stat-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.product-stat-header {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
}

.stat-product-name {
    font-weight: 600;
    color: var(--text-main);
}

.topping-label-prefix {
    font-size: 9px;
    background-color: var(--accent-soft);
    color: var(--accent);
    padding: 1px 4px;
    border-radius: 3px;
    font-weight: 700;
}

.stat-product-qty {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-muted);
}

.product-stat-body {
    display: flex;
    align-items: center;
    gap: 12px;
}

.stat-progress-bar {
    flex: 1;
    height: 6px;
    background-color: var(--bg-app);
    border-radius: 100px;
    overflow: hidden;
}

.stat-progress-fill {
    height: 100%;
    background-color: var(--primary);
    border-radius: 100px;
    width: 0%;
    transition: width 0.8s cubic-bezier(0.1, 0.8, 0.2, 1);
}

.stat-product-revenue {
    font-family: var(--font-heading);
    font-size: 12px;
    font-weight: 700;
    width: 60px;
    text-align: right;
    color: var(--text-main);
}

.no-data-msg {
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
    padding: 24px 0;
}

/* Tab 2: Dashboard Orders management */
.dashboard-order-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.dashboard-order-card {
    background-color: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    padding: 16px;
    border-left: 4px solid var(--border);
}

.dashboard-order-card.status-ordered {
    border-left-color: var(--primary);
}
.dashboard-order-card.status-paid {
    border-left-color: var(--info);
}
.dashboard-order-card.status-cooking {
    border-left-color: var(--accent);
}
.dashboard-order-card.status-ready {
    border-left-color: var(--success);
}
.dashboard-order-card.status-completed {
    border-left-color: var(--text-muted);
}

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

.order-number {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 14px;
}

.order-status-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 100px;
}

.order-status-badge.status-ordered {
    background-color: var(--primary-light);
    color: var(--primary);
}
.order-status-badge.status-paid {
    background-color: var(--info-soft);
    color: var(--info);
}
.order-status-badge.status-cooking {
    background-color: var(--accent-soft);
    color: var(--accent);
}
.order-status-badge.status-ready {
    background-color: var(--success-soft);
    color: var(--success);
}
.order-status-badge.status-completed {
    background-color: var(--bg-app);
    color: var(--text-muted);
}
.order-status-badge.status-canceled {
    background-color: var(--danger-soft);
    color: var(--danger);
}

.order-time {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.order-details-divider {
    height: 1px;
    border-top: 1px dashed var(--border);
    margin: 8px 0;
}

.order-items-summary {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    color: var(--text-main);
}

.order-item-line {
    display: flex;
    justify-content: space-between;
}

.topping-bullet {
    color: var(--text-muted);
    margin-left: 8px;
}

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

.order-card-price {
    font-size: 12px;
    color: var(--text-muted);
}

.order-card-price span {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 14px;
    color: var(--primary);
}

.status-update-form {
    display: flex;
    align-items: center;
}

.status-select {
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background-color: var(--bg-app);
    font-size: 11px;
    font-weight: 600;
    color: var(--text-main);
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s;
}

.status-select:focus {
    border-color: var(--primary);
}

/* Tab 3: Management Form fields */
.settings-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    background-color: var(--bg-card);
    border-radius: 20px;
    padding: 16px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-main);
}

.form-control {
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background-color: var(--bg-app);
    font-size: 13px;
    color: var(--text-main);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
    background-color: var(--bg-card);
}

/* Logout Button in Header */
.logout-btn-header {
    color: var(--text-muted);
    font-size: 16px;
    width: 32px;
    height: 32px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    background-color: var(--bg-app);
    transition: transform 0.2s, background-color 0.2s;
    margin-left: auto;
}

.logout-btn-header:active {
    transform: scale(0.9);
    background-color: var(--border);
    color: var(--primary);
}

/* Manager Welcome Bar */
.manager-welcome-bar {
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 8px 16px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-align: center;
    margin: -16px -16px 16px -16px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.manager-welcome-bar i {
    color: var(--primary);
    margin-right: 4px;
}

/* Login Wrapper & Card */
.login-wrapper {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.login-card {
    background-color: var(--bg-card);
    border-radius: 24px;
    padding: 24px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
}

.login-header {
    text-align: center;
    margin-bottom: 20px;
}

.login-icon {
    font-size: 36px;
    color: var(--primary);
    margin-bottom: 12px;
}

.login-header h2 {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 6px;
}

.login-header p {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.5;
}

.login-error {
    background-color: var(--accent-soft);
    color: var(--primary);
    font-size: 12px;
    font-weight: 600;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid hsla(var(--primary-hue), 90%, 55%, 0.15);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.login-form-fields {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon i {
    position: absolute;
    left: 12px;
    color: var(--text-muted);
    font-size: 14px;
    pointer-events: none;
}

.form-control-icon {
    width: 100%;
    padding: 10px 14px 10px 34px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background-color: var(--bg-app);
    font-size: 13px;
    color: var(--text-main);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control-icon:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
    background-color: var(--bg-card);
}

.test-accounts-info {
    background-color: var(--bg-card);
    border: 1px dashed var(--border);
    border-radius: 16px;
    padding: 16px;
}

.test-accounts-info h3 {
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.test-accounts-info ul {
    list-style: none;
    padding-left: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.test-accounts-info li {
    font-size: 11px;
    color: var(--text-main);
    line-height: 1.4;
}

.test-accounts-info li strong {
    color: var(--primary);
}

/* Permission Denied / Error styling */
.error-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 50vh;
}

.error-card {
    background-color: var(--bg-card);
    border-radius: 24px;
    padding: 24px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    text-align: center;
    width: 100%;
}

.error-icon-container {
    width: 60px;
    height: 60px;
    background-color: var(--accent-soft);
    color: var(--primary);
    font-size: 28px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 16px auto;
    border: 1px solid hsla(var(--primary-hue), 90%, 55%, 0.1);
}

.error-card h2 {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 12px;
}

.error-details {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 20px;
}

.user-status-card {
    background-color: var(--bg-app);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px;
    margin-top: 14px;
    text-align: left;
}

.user-email-highlight {
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 6px;
}

.user-shop-association {
    font-size: 11px;
}

.shop-badge {
    background-color: var(--primary-light);
    color: var(--primary);
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 4px;
}

.shop-badge.none {
    background-color: var(--border);
    color: var(--text-muted);
}

.error-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-secondary-link {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 12px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 12px;
    transition: background-color 0.2s, color 0.2s;
}

.btn-secondary-link:active {
    background-color: var(--bg-app);
    color: var(--text-main);
}

/* Top Page Staff Login Card */
.top-staff-login-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 14px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    animation: slideIn 0.25s ease-out;
}

.staff-login-toggle {
    background: none;
    border: none;
    width: 100%;
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 4px 0;
    transition: color 0.2s;
}

.staff-login-toggle:active {
    color: var(--primary);
}

.staff-login-drawer {
    margin-top: 14px;
    animation: slideIn 0.2s ease-out;
}

.top-login-inline-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.inline-group {
    margin-bottom: 0;
}

.inline-btn {
    padding: 10px !important;
    font-size: 13px !important;
}

.login-hints {
    margin-top: 12px;
    border-top: 1px dashed var(--border);
    padding-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.login-hints span {
    font-size: 10px;
    color: var(--text-muted);
    line-height: 1.3;
}

.hint-title {
    font-weight: 700;
    color: var(--text-main) !important;
    margin-bottom: 2px;
}

/* Staff Logged in Banner info on Top */
.staff-logged-in-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 12px;
}

.staff-logged-in-info span i {
    color: var(--primary);
}

.staff-login-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn-dashboard-badge-link {
    background-color: var(--primary-light);
    color: var(--primary);
    font-weight: 700;
    font-family: var(--font-heading);
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: background-color 0.2s;
}

.btn-dashboard-badge-link:active {
    background-color: hsla(var(--primary-hue), 90%, 55%, 0.15);
}

.btn-logout-badge-link {
    color: var(--text-muted);
    font-weight: 600;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 8px;
    background-color: var(--bg-app);
    transition: background-color 0.2s;
}

.btn-logout-badge-link:active {
    background-color: var(--border);
}

/* ==========================================================================
   5-Tab Dashboard Layout & Elements (Split Pages)
   ========================================================================== */

/* Sticky Bottom Navigation Bar */
.dashboard-bottom-nav {
    position: sticky;
    bottom: -16px; /* Sticks to the bottom edge of the scroll content view */
    left: 0;
    right: 0;
    margin: 16px -16px -16px -16px; /* Offset parent padding (16px) to match edges */
    height: 64px;
    background-color: var(--bg-card);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 100;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.03);
}

.dashboard-bottom-nav .nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    height: 100%;
    transition: color 0.2s, transform 0.1s;
    position: relative;
}

.dashboard-bottom-nav .nav-item i {
    font-size: 18px;
}

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

.dashboard-bottom-nav .nav-item:active {
    transform: scale(0.95);
}

.dashboard-bottom-nav .nav-badge {
    position: absolute;
    top: 6px;
    right: 50%;
    transform: translateX(16px);
    background-color: var(--primary);
    color: white;
    font-size: 9px;
    font-weight: 800;
    min-width: 14px;
    height: 14px;
    border-radius: 7px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

/* --------------------------------------------------------------------------
   Cashier Register Styles
   -------------------------------------------------------------------------- */
.cashier-header {
    margin-bottom: 16px;
}

.cashier-unpaid-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cashier-order-card {
    background-color: var(--bg-card);
    border-radius: 20px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    padding: 16px;
    border-left: 4px solid var(--primary);
    transition: transform 0.2s;
}

.cashier-order-card:active {
    transform: scale(0.99);
}

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

.cashier-order-num {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 15px;
    color: var(--text-main);
}

.cashier-time {
    font-size: 11px;
    color: var(--text-muted);
}

.cashier-customer {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.cashier-items {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
    color: var(--text-main);
}

.cashier-item-line {
    display: flex;
    justify-content: space-between;
}

.c-item-name {
    font-weight: 500;
}

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

.cashier-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.cashier-price-tag {
    display: flex;
    flex-direction: column;
}

.cashier-price-tag .price-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.cashier-price-tag .price-amount {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 18px;
    color: var(--primary);
}

.btn-cashier-pay {
    background-color: var(--success);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 8px 16px;
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    box-shadow: 0 4px 10px -2px hsla(142, 68%, 45%, 0.3);
    transition: background-color 0.2s, transform 0.1s;
}

.btn-cashier-pay:active {
    transform: scale(0.97);
    background-color: hsl(142, 68%, 38%);
}

.cashier-history-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cashier-history-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--bg-app);
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 12px;
    border: 1px solid var(--border);
}

.history-order-id {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-main);
}

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

.history-price {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--primary);
}

.history-status-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 100px;
}

.history-status-badge.status-paid {
    background-color: var(--info-soft);
    color: var(--info);
}
.history-status-badge.status-cooking {
    background-color: var(--accent-soft);
    color: var(--accent);
}
.history-status-badge.status-ready {
    background-color: var(--success-soft);
    color: var(--success);
}
.history-status-badge.status-completed {
    background-color: var(--border);
    color: var(--text-muted);
}
.history-status-badge.status-canceled {
    background-color: var(--danger-soft);
    color: var(--danger);
}

/* --------------------------------------------------------------------------
   Pickup / Handover & Digital Signage Styles
   -------------------------------------------------------------------------- */
.dashboard-sub-tabs {
    display: flex;
    background-color: var(--bg-card);
    border-radius: 14px;
    padding: 4px;
    border: 1px solid var(--border);
    margin-bottom: 16px;
}

.sub-tab-btn {
    flex: 1;
    background: none;
    border: none;
    padding: 10px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 12px;
    color: var(--text-muted);
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    transition: background-color 0.2s, color 0.2s;
}

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

.pickup-ready-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.pickup-ready-card {
    background-color: var(--bg-card);
    border-radius: 20px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    padding: 16px;
    border-left: 4px solid var(--success);
}

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

.ready-num {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 15px;
    color: var(--text-main);
}

.ready-time {
    font-size: 11px;
    color: var(--text-muted);
}

.ready-customer {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.ready-items {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
    color: var(--text-main);
}

.ready-item-line {
    display: flex;
    justify-content: space-between;
}

.btn-handover-complete {
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 12px;
    width: 100%;
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 700;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    box-shadow: 0 4px 12px -2px hsla(var(--primary-hue), 90%, 55%, 0.3);
    transition: background-color 0.2s, transform 0.1s;
    margin-top: 8px;
}

.btn-handover-complete:active {
    transform: scale(0.98);
    background-color: var(--primary-hover);
}

/* Customer Signage View */
#panel-signage {
    background-color: #121214;
    border-radius: 24px;
    padding: 16px;
    color: #ffffff;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.6);
    min-height: 520px;
    display: flex;
    flex-direction: column;
}

.signage-header-banner {
    background: linear-gradient(135deg, var(--primary) 0%, hsl(var(--primary-hue), 90%, 45%) 100%);
    padding: 12px;
    border-radius: 12px;
    text-align: center;
    font-weight: 800;
    font-size: 16px;
    letter-spacing: 1px;
    margin-bottom: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.signage-board-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    flex: 1;
}

.signage-column {
    background-color: rgba(255, 255, 255, 0.04);
    border-radius: 16px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
}

.signage-col-title {
    font-size: 11px;
    font-weight: 700;
    padding: 6px;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
}

.ready-title {
    background-color: rgba(142, 68, 45, 0.15);
    color: var(--success);
    border: 1px solid rgba(142, 68, 45, 0.2);
}

.cooking-title {
    background-color: rgba(200, 85, 48, 0.15);
    color: var(--info);
    border: 1px solid rgba(200, 85, 48, 0.2);
}

.signage-numbers-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    overflow-y: auto;
    max-height: 320px;
}

.signage-number-badge {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 20px;
    padding: 10px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.signage-number-badge.ready {
    background-color: var(--success);
    color: white;
}

.signage-number-badge.ready.blinking {
    animation: signageBlink 1.2s infinite ease-in-out;
}

@keyframes signageBlink {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
        box-shadow: 0 0 12px var(--success);
    }
    50% {
        opacity: 0.6;
        transform: scale(0.96);
        box-shadow: 0 0 2px var(--success);
    }
}

.signage-number-badge.cooking {
    background-color: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.7);
    border: 1px dashed rgba(255, 255, 255, 0.15);
    font-size: 16px;
    padding: 8px;
}

.signage-empty-msg {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.4);
    text-align: center;
    padding: 20px 0;
    font-style: italic;
}

.signage-footer-hint {
    margin-top: auto;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
    line-height: 1.4;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 10px;
}

.signage-reload-indicator {
    font-size: 8px;
    color: rgba(255, 255, 255, 0.3);
    margin-top: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

/* --------------------------------------------------------------------------
   QR Code Scanner & Simulator Styles
   -------------------------------------------------------------------------- */
.qr-scanner-wrapper {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 14px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
    display: none; /* Hidden by default */
    animation: slideIn 0.25s ease-out;
}

.qr-preview-area {
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    background-color: #1a1a1c;
    position: relative;
    border: 1px solid var(--border);
}

.qr-simulator-box {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed var(--border);
    display: flex;
    gap: 8px;
    align-items: center;
}

#qr-reader {
    border: none !important;
}

#qr-reader__scan_region {
    background-color: #1a1a1c;
}

#qr-reader img {
    display: none; /* Hide default placeholder image */
}

/* --------------------------------------------------------------------------
   Header Dropdown Menu Styles (Top-Right Navigation Selector)
   -------------------------------------------------------------------------- */
.header-menu-container {
    position: relative;
    display: inline-block;
}

.header-menu-btn {
    color: var(--primary);
    background-color: var(--primary-light);
    border: 1px solid hsla(var(--primary-hue), 90%, 55%, 0.15);
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 700;
    padding: 6px 10px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s, border-color 0.2s;
    outline: none;
    height: 34px;
}

.header-menu-btn:hover {
    background-color: hsla(var(--primary-hue), 90%, 55%, 0.1);
}

.header-menu-btn:active {
    transform: scale(0.97);
    background-color: hsla(var(--primary-hue), 90%, 55%, 0.15);
}

.header-menu-btn i {
    font-size: 14px;
}

.header-menu-btn .toggle-arrow {
    font-size: 9px;
    color: var(--text-muted);
    margin-left: 2px;
    transition: transform 0.2s;
}

.header-menu-badge-count {
    background-color: var(--primary);
    color: white;
    font-size: 8px;
    font-weight: 800;
    min-width: 14px;
    height: 14px;
    border-radius: 7px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 0 4px;
    box-shadow: var(--shadow-sm);
}

.header-dropdown-menu {
    position: absolute;
    top: 40px;
    right: 0;
    width: 170px;
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    display: none; /* Controlled via JS ('flex' / 'none') */
    flex-direction: column;
    padding: 8px 0;
    z-index: 200;
    animation: dropdownFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    text-decoration: none;
    color: var(--text-main);
    font-size: 13.5px;
    font-weight: 700;
    transition: background-color 0.15s, color 0.15s;
    cursor: pointer;
}

.dropdown-item i {
    font-size: 15px;
    width: 18px;
    text-align: center;
    color: var(--text-muted);
}

.dropdown-item:hover, .dropdown-item:active {
    background-color: var(--bg-app);
    color: var(--primary);
}

.dropdown-item:hover i {
    color: var(--primary);
}

.dropdown-item.active {
    color: var(--primary);
    background-color: var(--primary-light);
}

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

.dropdown-item.logout {
    color: var(--text-muted);
    font-weight: 600;
}

.dropdown-item.logout i {
    color: var(--text-muted);
}

.dropdown-item.logout:hover {
    color: var(--primary);
    background-color: var(--accent-soft);
}

.dropdown-item.logout:hover i {
    color: var(--primary);
}

.dropdown-item .item-badge {
    margin-left: auto;
    background-color: var(--primary);
    color: white;
    font-size: 8px;
    font-weight: 800;
    min-width: 14px;
    height: 14px;
    border-radius: 7px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 4px;
    box-shadow: var(--shadow-sm);
}

.dropdown-divider {
    height: 1px;
    background-color: var(--border);
    margin: 4px 0;
}

/* ==========================================================================
   Product Management Settings Section
   ========================================================================== */
.settings-items-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 16px;
}

.settings-item-card {
    background-color: var(--bg-card);
    border-radius: 20px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

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

.settings-item-header h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.form-row .form-group {
    margin-bottom: 0;
}

.flex-1 {
    flex: 1;
    min-width: 150px;
}

.flex-2 {
    flex: 2;
    min-width: 200px;
}

.btn-delete-item {
    background-color: hsla(14, 90%, 55%, 0.1);
    color: var(--primary);
    border: none;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-delete-item:active {
    background-color: hsla(14, 90%, 55%, 0.2);
    transform: scale(0.97);
}

.btn-save-item {
    background-color: var(--primary-light);
    color: var(--primary);
    border: none;
    border-radius: 10px;
    padding: 10px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    margin-top: 8px;
}

.btn-save-item:active {
    background-color: hsla(var(--primary-hue), 90%, 55%, 0.15);
    transform: scale(0.99);
}

/* Toggle Switch Style */
.toggle-switch-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
}

.toggle-switch-input {
    display: none;
}

.toggle-switch-slider {
    position: relative;
    width: 44px;
    height: 24px;
    background-color: var(--border);
    border-radius: 12px;
    transition: background-color 0.2s;
}

.toggle-switch-slider::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: white;
    top: 2px;
    left: 2px;
    transition: transform 0.2s, background-color 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.toggle-switch-input:checked + .toggle-switch-slider {
    background-color: var(--primary);
}

.toggle-switch-input:checked + .toggle-switch-slider::before {
    transform: translateX(20px);
}

/* Customer Menu Sold Out Styles */
.sold-out-badge {
    background-color: var(--border);
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 8px;
    user-select: none;
    display: inline-block;
}

.menu-item-card.sold-out {
    opacity: 0.65;
}

/* Shopping Cart Styles */
.cart-action-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-add-to-cart-action {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px hsla(var(--primary-hue), 90%, 55%, 0.2);
}

.btn-add-to-cart-action:hover:not(:disabled) {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-add-to-cart-action:active:not(:disabled) {
    transform: scale(0.95);
    background-color: var(--primary-hover);
}

.btn-add-to-cart-action:disabled {
    background-color: hsl(215, 16%, 90%);
    color: hsl(215, 14%, 60%);
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

.cart-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 95;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(2px);
}

.cart-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.cart-details-panel {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--bg-card);
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    padding: 20px 20px 130px 20px; /* leaves room for sticky footer */
    z-index: 96;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.15);
    max-height: 75%;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.cart-details-panel.active {
    transform: translateY(0);
}

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

.cart-details-header h3 {
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-main);
}

.cart-details-header h3 i {
    color: var(--primary);
}

.btn-close-cart {
    background: none;
    border: none;
    font-size: 18px;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: color 0.2s;
}

.btn-close-cart:active {
    color: var(--text-main);
}

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

.basket-info {
    display: flex;
    flex-direction: column;
}

.basket-count-badge {
    background-color: var(--primary-light);
    color: var(--primary);
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 100px;
    border: 1px solid hsla(var(--primary-hue), 90%, 55%, 0.15);
    align-self: flex-start;
    margin-top: 2px;
}

@keyframes bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.bounce-animation {
    animation: bounce 0.3s ease;
}

/* Handover Screen Preparing Cards */
.pickup-preparing-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.pickup-preparing-card {
    background-color: var(--bg-card);
    border-radius: 20px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    padding: 16px;
    border-left: 4px solid var(--info);
}
