/* =================================================================== */
/* PayTable 2025 Branding                                              */
/* =================================================================== */

/* Font Definitions */
@font-face {
    font-family: 'Poppins';
    src: url('../branding/2025/fonts/poppins/Poppins-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Poppins';
    src: url('../branding/2025/fonts/poppins/Poppins-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Poppins';
    src: url('../branding/2025/fonts/poppins/Poppins-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Poppins';
    src: url('../branding/2025/fonts/poppins/Poppins-ExtraBold.ttf') format('truetype');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Geoform';
    src: url('../branding/2025/fonts/geoform/Geoform-Light-BF6556c6e751770.otf') format('opentype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Geoform';
    src: url('../branding/2025/fonts/geoform/Geoform-BF6556c6e73002d.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Geoform';
    src: url('../branding/2025/fonts/geoform/Geoform-Medium-BF6556c6e620ac4.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Geoform';
    src: url('../branding/2025/fonts/geoform/Geoform-Bold-BF6556c6e7190d1.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Geoform';
    src: url('../branding/2025/fonts/geoform/Geoform-ExtraBold-BF6556c6e755e60.otf') format('opentype');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Montserrat';
    src: url('../branding/2025/fonts/montserrat/Montserrat-VariableFont_wght.ttf') format('truetype-variations');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

/* CSS Custom Properties - Essential Variables Only */
:root {
    /* PayTable 2025 Brand Colors */
    --pt-navy: #000075;
    --pt-navy-light: #1a1a8f;
    --pt-navy-dark: #000052;
    --pt-coral: #ec607e;
    --pt-coral-light: #f08098;
    --pt-coral-dark: #d94d6a;

    /* PayTable 2025 Brand Fonts */
    --pt-font-logo: 'Poppins', sans-serif;
    --pt-font-heading: 'Geoform', sans-serif;
    --pt-font-body: 'Montserrat', sans-serif;

    /* Colors - Updated to 2025 branding */
    --primary-color: #000075;
    --primary-hover: #1a1a8f;
    --primary-color-dark: #000052;
    --secondary-color: #ec607e;
    --secondary-hover: #d94d6a;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;

    /* Background Colors */
    --background-color: #f8fafc;
    --surface-color: #ffffff;
    --border-color: #e2e8f0;

    /* Text Colors */
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --text-black: #000000;

    /* Modal specific colors for high contrast */
    --modal-bg: #ffffff;
    --modal-text: #000000;
    --modal-text-secondary: #374151;
    --modal-border: #d1d5db;
    --modal-input-bg: #ffffff;
    --modal-input-border: #9ca3af;
    --modal-header-bg: #f9fafb;
    --modal-footer-bg: #f9fafb;

    /* Spacing - Reduced for compact design */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 0.75rem;
    --spacing-lg: 1rem;
    --spacing-xl: 1.25rem;

    /* Border Radius - Sharp corners for cards */
    --radius-sm: 0;
    --radius-md: 0;
    --radius-lg: 0;
    --radius-xl: 0;
    /* Keep small radius for buttons and inputs */
    --radius-button: 0.5rem;
    --radius-input: 0.375rem;

    /* Touch Targets */
    --touch-target-min: 40px;
    --touch-target-lg: 48px;
    --touch-target-xl: 56px;

    /* Shadows */
    --shadow-sm: 0 2px 4px 0 rgb(0 0 0 / 0.08);
    --shadow-md: 0 4px 8px -2px rgb(0 0 0 / 0.12);
    --shadow-lg: 0 8px 16px -4px rgb(0 0 0 / 0.16);
    --shadow-xl: 0 16px 32px -8px rgb(0 0 0 / 0.20);

    /* Transitions */
    --transition-base: 0.2s ease;
    --transition-slow: 0.3s ease;
}

/* Dark mode variables */
@media (prefers-color-scheme: dark) {
    :root {
        --background-color: #0f172a;
        --surface-color: #1e293b;
        --border-color: #334155;
        --text-primary: #f1f5f9;
        --text-secondary: #cbd5e1;
        --text-muted: #64748b;
        --text-black: #ffffff;

        /* Modal dark mode - maintaining high contrast */
        --modal-bg: #1f2937;
        --modal-text: #ffffff;
        --modal-text-secondary: #d1d5db;
        --modal-border: #4b5563;
        --modal-input-bg: #374151;
        --modal-input-border: #6b7280;
        --modal-header-bg: #111827;
        --modal-footer-bg: #111827;
    }
}

/* Legacy font - keeping for backward compatibility */
@font-face {
    font-family: 'PayTableFontStd'; 
    src: url('../fonts/neulis-neue/NeulisAlt-Regular.otf');
}

/* Base Styles */
html, body {
    font-family: var(--pt-font-body), 'PayTableFontStd', sans-serif;
    background-color: var(--background-color);
    color: var(--text-primary);
    font-size: 16px;
    line-height: 1.5;
}

/* Loading Progress - Required for Blazor */
.loading-progress {
    position: relative;
    display: block;
    width: 6rem;
    height: 6rem;
    margin: 15vh auto 1rem auto;
}

.loading-progress circle {
    fill: none;
    stroke: #e0e0e0;
    stroke-width: 0.6rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.loading-progress circle:last-child {
    stroke: #1b6ec2;
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    font-size: 1.125rem;
    inset: calc(15vh + 3.25rem) 0 auto 0.2rem;
}

.loading-progress-text:after {
    content: var(--blazor-load-percentage-text, "Loading");
}

/* Error UI - Required for Blazor */
#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 1rem 1.5rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
    font-size: 1rem;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 1.25rem;
}

/* Modal High Contrast Styles */
.modal {
    color: var(--modal-text);
}

/* Note: Shadow moved from .modal-dialog to .modal-content to prevent vertical shadow extension */

.modal-content {
    background-color: var(--modal-bg) !important;
    border: 2px solid var(--modal-border);
    border-radius: var(--radius-button);
    color: var(--modal-text) !important;
    /* Shadow on modal-content, not modal-dialog - prevents vertical shadow extending beyond modal */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Modal Header */
.modal-header {
    background-color: var(--modal-header-bg) !important;
    border-bottom: 0px solid var(--modal-border);
    padding: var(--spacing-lg);
    color: var(--modal-text) !important;
    display: flex;
    justify-content: space-between;
    align-items: start;
    /* Match top corners of modal-content */
    border-radius: calc(var(--radius-button) - 2px) calc(var(--radius-button) - 2px) 0 0;
}

.modal-title {
    color: var(--modal-text) !important;
    font-size: 1.5rem;
    font-weight: 700;
    flex: 1;
    margin: 0;
}

.modal-header .btn-close {
    filter: invert(1);
    opacity: 0.8;
}

.modal-header .btn-close:hover {
    opacity: 1;
}

/* Modal Close Button */
.btn-close-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #dc3545;
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    font-size: 16px;
    flex-shrink: 0;
    margin-left: auto;
}

.btn-close-circle:hover {
    background-color: #c82333;
    transform: scale(1.1);
}

.btn-close-circle:active {
    transform: scale(0.95);
}

.btn-close-circle i {
    margin: 0;
    line-height: 1;
}

/* Modal Body */
.modal-body {
    background-color: var(--modal-bg) !important;
    padding: var(--spacing-lg);
    color: var(--modal-text) !important;
    /* Bottom corners for modals without footer */
    border-radius: 0 0 calc(var(--radius-button) - 2px) calc(var(--radius-button) - 2px);
}

/* When modal has footer, body shouldn't have bottom radius */
.modal-body:has(+ .modal-footer) {
    border-radius: 0;
}

/* Modal Footer */
.modal-footer {
    background-color: var(--modal-footer-bg) !important;
    border-top: 2px solid var(--modal-border);
    padding: var(--spacing-lg);
    gap: var(--spacing-sm);
    color: var(--modal-text) !important;
    /* Match bottom corners of modal-content */
    border-radius: 0 0 calc(var(--radius-button) - 2px) calc(var(--radius-button) - 2px);
}

/* Modal Labels - High Contrast */
.modal label,
.modal .form-label,
.modal .bb-form-label,
.modal .blazor-bootstrap label,
.modal-body label,
.modal-content label,
.modal fieldset legend {
    color: var(--modal-text) !important;
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: var(--spacing-xs);
    display: block;
}

/* Modal Form Controls - High Contrast */
.modal .form-control,
.modal .form-select,
.modal .blazor-bootstrap .form-control,
.modal .blazor-bootstrap .form-select,
.modal input[type="text"],
.modal input[type="email"],
.modal input[type="password"],
.modal input[type="number"],
.modal input[type="tel"],
.modal input[type="url"],
.modal input[type="search"],
.modal input[type="date"],
.modal input[type="time"],
.modal input[type="datetime-local"],
.modal textarea,
.modal select {
    background-color: var(--modal-input-bg) !important;
    border: 2px solid var(--modal-input-border) !important;
    border-radius: var(--radius-md);
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: 1rem;
    color: var(--modal-text) !important;
    min-height: var(--touch-target-min);
    transition: border-color var(--transition-base);
}

.modal .form-control:focus,
.modal .form-select:focus,
.modal input:focus,
.modal textarea:focus,
.modal select:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 0.25rem rgba(59, 130, 246, 0.25) !important;
    outline: none !important;
    background-color: var(--modal-input-bg) !important;
    color: var(--modal-text) !important;
}

.modal .form-control::placeholder,
.modal input::placeholder,
.modal textarea::placeholder {
    color: var(--modal-text-secondary) !important;
    opacity: 0.7;
}

/* Modal Text Areas */
.modal textarea.form-control,
.modal textarea {
    min-height: 100px;
    resize: vertical;
}

/* Modal Select Options */
.modal select option,
.modal .form-select option {
    background-color: var(--modal-input-bg) !important;
    color: var(--modal-text) !important;
}

/* Modal Checkboxes and Radio Buttons */
.modal .form-check {
    margin-bottom: var(--spacing-md);
}

.modal .form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    margin-top: 0.125rem;
    background-color: var(--modal-input-bg) !important;
    border: 2px solid var(--modal-input-border) !important;
}

.modal .form-check-input:checked {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

.modal .form-check-input:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 0.25rem rgba(59, 130, 246, 0.25) !important;
}

.modal .form-check-label {
    color: var(--modal-text) !important;
    font-weight: 500;
    margin-left: var(--spacing-xs);
    font-size: 1rem;
}

/* Modal Input Groups */
.modal .input-group-text {
    background-color: var(--modal-header-bg) !important;
    border: 2px solid var(--modal-input-border) !important;
    color: var(--modal-text) !important;
    font-weight: 500;
}

/* Modal Buttons */
.modal .btn {
    min-height: var(--touch-target-min);
    font-weight: 600;
    border-radius: var(--radius-button);
    padding: var(--spacing-sm) var(--spacing-lg);
    font-size: 1rem;
    border: 2px solid transparent;
    transition: all var(--transition-base);
}

.modal .btn-primary {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: white !important;
}

.modal .btn-primary:hover,
.modal .btn-primary:focus {
    background-color: var(--primary-hover) !important;
    border-color: var(--primary-hover) !important;
    color: white !important;
}

.modal .btn-secondary {
    background-color: var(--modal-input-bg) !important;
    border-color: var(--modal-input-border) !important;
    color: var(--modal-text) !important;
}

.modal .btn-secondary:hover,
.modal .btn-secondary:focus {
    background-color: var(--modal-header-bg) !important;
    border-color: var(--modal-text-secondary) !important;
    color: var(--modal-text) !important;
}

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

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

/* Modal Validation Messages */
.modal .text-danger,
.modal .invalid-feedback,
.modal .field-validation-error {
    color: var(--danger-color) !important;
    font-size: 0.875rem;
    font-weight: 500;
    margin-top: var(--spacing-xs);
    display: block;
}

.modal .text-success,
.modal .valid-feedback,
.modal .field-validation-valid {
    color: var(--success-color) !important;
    font-size: 0.875rem;
    font-weight: 500;
    margin-top: var(--spacing-xs);
    display: block;
}

.modal .text-warning {
    color: var(--warning-color) !important;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Modal Required Field Indicators */
.modal .required::after,
.modal .form-label.required::after {
    content: ' *';
    color: var(--danger-color) !important;
    font-weight: bold;
}

/* Modal Help Text */
.modal .form-text,
.modal .help-text,
.modal .text-muted {
    color: var(--modal-text-secondary) !important;
    font-size: 0.875rem;
    margin-top: var(--spacing-xs);
    font-weight: 400;
}

/* Modal Fieldsets and Legends */
.modal fieldset {
    border: 2px solid var(--modal-border);
    border-radius: var(--radius-button);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    background-color: var(--modal-bg);
}

.modal legend {
    color: var(--modal-text) !important;
    font-weight: 600;
    font-size: 1.125rem;
    padding: 0 var(--spacing-sm);
    background-color: var(--modal-bg);
}

/* Modal Tables */
.modal table {
    color: var(--modal-text) !important;
}

.modal table th {
    background-color: var(--modal-header-bg) !important;
    color: var(--modal-text) !important;
    border-color: var(--modal-border) !important;
}

.modal table td {
    color: var(--modal-text) !important;
    border-color: var(--modal-border) !important;
}

/* Modal Lists */
.modal ul,
.modal ol,
.modal li {
    color: var(--modal-text) !important;
}

/* Modal Paragraphs and Text */
.modal p,
.modal span,
.modal div:not(.btn):not(.form-control):not(.input-group-text) {
    color: var(--modal-text) !important;
}

/* Modal Alerts */
.modal .alert {
    border: 2px solid;
    border-radius: var(--radius-button);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    font-weight: 500;
}

.modal .alert-danger {
    background-color: #fef2f2 !important;
    border-color: #fecaca !important;
    color: #dc2626 !important;
}

.modal .alert-success {
    background-color: #f0fdf4 !important;
    border-color: #bbf7d0 !important;
    color: #16a34a !important;
}

.modal .alert-warning {
    background-color: #fffbeb !important;
    border-color: #fed7aa !important;
    color: #d97706 !important;
}

.modal .alert-info {
    background-color: #eff6ff !important;
    border-color: #bfdbfe !important;
    color: #2563eb !important;
}

/* Dark mode alert adjustments */
@media (prefers-color-scheme: dark) {
    .modal .alert-danger {
        background-color: #450a0a !important;
        border-color: #dc2626 !important;
        color: #fca5a5 !important;
    }

    .modal .alert-success {
        background-color: #064e3b !important;
        border-color: #16a34a !important;
        color: #86efac !important;
    }

    .modal .alert-warning {
        background-color: #451a03 !important;
        border-color: #d97706 !important;
        color: #fbbf24 !important;
    }

    .modal .alert-info {
        background-color: #1e3a8a !important;
        border-color: #2563eb !important;
        color: #93c5fd !important;
    }
}

/* Restaurant Cards - Modern Design */
.restaurant-card {
    background: var(--surface-color);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: all var(--transition-slow);
}

.restaurant-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.restaurant-card-header {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #475569 100%);
    color: white;
    padding: var(--spacing-lg);
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.restaurant-header-icon {
    width: var(--touch-target-lg);
    height: var(--touch-target-lg);
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    backdrop-filter: blur(10px);
    flex-shrink: 0;
}

.restaurant-header-content {
    flex-grow: 1;
}

.restaurant-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
}

.btn-edit-restaurant {
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--touch-target-min);
    height: var(--touch-target-min);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all var(--transition-base);
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    backdrop-filter: blur(10px);
}

.btn-edit-restaurant:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.05);
}

.restaurant-card-body {
    padding: var(--spacing-lg);
}

.restaurant-image-container {
    width: 100%;
    height: 200px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: var(--spacing-lg);
    border: 1px solid var(--border-color);
}

.restaurant-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.restaurant-card:hover .restaurant-image {
    transform: scale(1.02);
}

/* Logo Image Styles */
.logo-image-container {
    width: 128px;
    height: 128px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: var(--spacing-sm);
    border: 2px solid var(--border-color);
    background: var(--background-color);
}

.logo-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
}

.logo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    color: var(--text-muted);
    background: var(--background-color);
}

.logo-placeholder i {
    font-size: 2rem;
    opacity: 0.5;
}

.logo-placeholder span {
    font-size: 0.75rem;
    font-weight: 500;
}

.form-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0;
    margin-bottom: var(--spacing-sm);
    font-style: italic;
}

.form-section {
    margin-bottom: var(--spacing-lg);
}

.form-label {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: var(--spacing-xs);
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.form-control {
    background-color: var(--surface-color);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-input);
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: 1rem;
    color: var(--text-primary);
    min-height: var(--touch-target-min);
    transition: border-color var(--transition-base);
    width: 100%;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(59, 130, 246, 0.25);
    outline: none;
}

.form-control::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

.file-upload-container {
    margin-top: var(--spacing-sm);
}

.info-field {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.info-label {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.info-value {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.5;
}

.info-value.featured {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.info-value.description {
    line-height: 1.6;
    color: var(--text-secondary);
}

.info-value.contact {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    color: var(--text-primary);
}

.info-value.contact i {
    color: var(--primary-color);
    font-size: 0.875rem;
}

.info-value.link a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-base);
}

.info-value.link a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.loading-placeholder {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.placeholder-line {
    height: 1rem;
    background: linear-gradient(90deg, var(--border-color) 25%, var(--background-color) 50%, var(--border-color) 75%);
    background-size: 200% 100%;
    border-radius: var(--radius-md);
    animation: shimmer 1.5s infinite;
    width: 100%;
}

.placeholder-line.small {
    width: 60%;
}

.placeholder-line.medium {
    width: 80%;
}

.placeholder-line.large {
    height: 1.5rem;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.form-actions {
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--border-color);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    min-height: var(--touch-target-min);
    font-weight: 600;
    border-radius: var(--radius-button);
    padding: var(--spacing-sm) var(--spacing-lg);
    font-size: 1rem;
    border: 2px solid transparent;
    transition: all var(--transition-base);
    cursor: pointer;
    text-decoration: none;
}

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

.btn-primary:hover:not(:disabled) {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-spinner {
    width: 1rem;
    height: 1rem;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Validation Messages */
.validation-message {
    color: var(--danger-color);
    font-size: 0.75rem;
    font-weight: 500;
    margin-top: var(--spacing-xs);
    display: block;
}

/* Menu Creation Card */
.menu-creation-card {
    background: var(--surface-color);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: all var(--transition-slow);
    max-width: 400px;
    margin: 0 auto;
}

.menu-creation-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.creation-card-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
    padding: var(--spacing-lg);
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    justify-content: center;
}

.creation-header-icon {
    width: var(--touch-target-lg);
    height: var(--touch-target-lg);
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    backdrop-filter: blur(10px);
    flex-shrink: 0;
}

.creation-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
    text-align: center;
}

.creation-card-body {
    padding: var(--spacing-lg);
}

.creation-actions-grid {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
}

.creation-action-compact {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    background: var(--background-color);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-base);
    min-height: var(--touch-target-lg);
}

.creation-action-compact:hover {
    background: var(--surface-color);
    border-color: var(--primary-color);
    transform: translateX(2px);
    box-shadow: var(--shadow-md);
}

/* Adjust modal backdrop for better visual separation */
.modal-backdrop {
    background-color: rgba(0, 0, 0, 0.5);
}

.action-icon-wrapper {
    width: var(--touch-target-min);
    height: var(--touch-target-min);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: white;
    flex-shrink: 0;
}

.action-icon-menu {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
}

.action-icon-category {
    background: linear-gradient(135deg, var(--warning-color) 0%, #b45309 100%);
}

.action-icon-item {
    background: linear-gradient(135deg, var(--success-color) 0%, #047857 100%);
}

.action-content-compact {
    flex-grow: 1;
}

.action-title-compact {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.action-arrow {
    color: var(--text-muted);
    font-size: 1.25rem;
    transition: all var(--transition-base);
    flex-shrink: 0;
}

.creation-action-compact:hover .action-arrow {
    color: var(--primary-color);
    transform: translateX(2px);
}

.creation-quick-actions {
    display: flex;
    justify-content: space-between;
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
    background: var(--background-color);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.quick-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--touch-target-xl);
    height: var(--touch-target-xl);
    border-radius: var(--radius-lg);
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    font-size: 1.5rem;
    color: white;
    position: relative;
    overflow: hidden;
}

.quick-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.quick-action-menu {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
}

.quick-action-category {
    background: linear-gradient(135deg, var(--warning-color) 0%, #b45309 100%);
}

.quick-action-item {
    background: linear-gradient(135deg, var(--success-color) 0%, #047857 100%);
}

/* Menu Display Card - Compact Design */
.menu-display-card {
    background: var(--surface-color);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.display-card-header {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #475569 100%);
    color: white;
    padding: var(--spacing-lg);
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.display-header-icon {
    width: var(--touch-target-lg);
    height: var(--touch-target-lg);
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    backdrop-filter: blur(10px);
    flex-shrink: 0;
}

.display-header-content {
    flex-grow: 1;
}

.display-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
}

.display-card-body {
    padding: var(--spacing-md);
}

.modern-tabs-container {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.menu-tab-section {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--surface-color);
}

.menu-tab-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md);
    background: var(--background-color);
    cursor: pointer;
    transition: all var(--transition-base);
    border-bottom: 1px solid var(--border-color);
    min-height: var(--touch-target-lg);
}

.menu-tab-header:hover {
    background: var(--surface-color);
}

.menu-tab-info {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    flex-grow: 1;
}

.menu-tab-icon {
    width: var(--touch-target-min);
    height: var(--touch-target-min);
    background: var(--primary-color);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.125rem;
    flex-shrink: 0;
}

.menu-tab-content {
    flex-grow: 1;
    min-width: 0;
}

.menu-tab-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.menu-tab-description {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin: var(--spacing-xs) 0 0 0;
}

.menu-tab-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    flex-shrink: 0;
}

/* Edit Buttons - Cohesive Color Scheme */
.btn-edit-menu,
.btn-edit-category {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all var(--transition-base);
    font-size: 0.875rem;
    background: var(--surface-color);
    color: var(--text-secondary);
}

.btn-edit-menu:hover,
.btn-edit-category:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: scale(1.05);
    box-shadow: var(--shadow-sm);
}

.menu-expand-indicator,
.category-expand-indicator {
    transition: transform var(--transition-slow);
    color: var(--text-secondary);
    font-size: 1.125rem;
}

.menu-expand-indicator.expanded,
.category-expand-indicator.expanded {
    transform: rotate(180deg);
}

.menu-tab-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-slow);
}

.menu-tab-content.expanded {
    max-height: 3000px;
}

.categories-container {
    padding: var(--spacing-sm);
}

.category-section {
    margin-bottom: var(--spacing-md);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--background-color);
    cursor: pointer;
    transition: all var(--transition-base);
    min-height: var(--touch-target-min);
}

.category-header:hover {
    background: var(--surface-color);
}

.category-info {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    flex-grow: 1;
}

.category-icon {
    width: 32px;
    height: 32px;
    background: var(--warning-color);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    flex-shrink: 0;
}

.category-content {
    flex-grow: 1;
    min-width: 0;
}

.category-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.category-description {
    color: var(--text-secondary);
    font-size: 0.75rem;
    margin: var(--spacing-xs) 0 0 0;
}

.category-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    flex-shrink: 0;
}

.category-items-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-slow);
}

.category-items-content.expanded {
    max-height: 2000px;
}

.menu-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
    padding: 1rem 0;
}

.menu-item-wrapper {
    width: 100%;
    height: 100%;
}

.menu-item-wrapper .modern-menu-item-card {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.empty-category-state,
.empty-menu-state {
    text-align: center;
    padding: var(--spacing-lg);
    color: var(--text-muted);
}

.empty-category-icon,
.empty-menu-icon {
    font-size: 2rem;
    margin-bottom: var(--spacing-sm);
}

.empty-category-text,
.empty-menu-text {
    margin: 0;
    font-size: 0.875rem;
}

/* Modern Alerts - Compact */
.modern-alert {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
    margin-top: var(--spacing-sm);
    font-size: 0.875rem;
}

.alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
}

.alert-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #16a34a;
}

.alert-icon {
    font-size: 1rem;
}

.alert-content {
    font-weight: 500;
}

/* Menu Item Card - Compact */
.modern-menu-item-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-slow);
    box-shadow: var(--shadow-sm);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.modern-menu-item-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.menu-item-image-container {
    position: relative;
    height: 120px;
    overflow: hidden;
}

.menu-item-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.modern-menu-item-card:hover .menu-item-image {
    transform: scale(1.05);
}

.menu-item-image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--background-color) 0%, var(--border-color) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 2rem;
}

.menu-item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-slow);
}

.modern-menu-item-card:hover .menu-item-overlay {
    opacity: 1;
}

.edit-overlay-btn {
    width: var(--touch-target-lg);
    height: var(--touch-target-lg);
    background: var(--primary-color);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.125rem;
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-lg);
}

.edit-overlay-btn:hover {
    background: var(--primary-hover);
    transform: scale(1.1);
}

.menu-item-card-body {
    padding: var(--spacing-md);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.menu-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--spacing-sm);
}

.menu-item-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.3;
    flex-grow: 1;
    margin-right: var(--spacing-sm);
}

.menu-item-price {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--success-color);
    flex-shrink: 0;
}

.menu-item-description {
    color: var(--text-secondary);
    font-size: 0.75rem;
    line-height: 1.4;
    margin: 0 0 var(--spacing-sm) 0;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.menu-item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    gap: var(--spacing-sm);
}

.menu-item-category {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    color: var(--text-muted);
    font-size: 0.625rem;
    background: var(--background-color);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: 9999px;
    border: 1px solid var(--border-color);
    flex-shrink: 0;
}

/* Responsive Design - Compact */
@media (max-width: 768px) {
    .menu-items-grid {
        grid-template-columns: 1fr;
    }

    .creation-action-compact {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-md);
        padding: var(--spacing-md);
    }

    .menu-tab-header,
    .category-header {
        flex-direction: column;
        gap: var(--spacing-sm);
        text-align: center;
        padding: var(--spacing-md);
    }

    .menu-tab-info,
    .category-info {
        flex-direction: column;
        text-align: center;
    }

    .display-card-body,
    .restaurant-card-body {
        padding: var(--spacing-sm);
    }

    .restaurant-card-header {
        flex-direction: column;
        gap: var(--spacing-sm);
        text-align: center;
    }
}

/* Focus styles for accessibility */
.creation-action-compact:focus,
.menu-tab-header:focus,
.category-header:focus,
.btn-edit-menu:focus,
.btn-edit-category:focus,
.btn-edit-restaurant:focus,
.form-control:focus,
.btn:focus,
.modal .form-control:focus,
.modal .form-select:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Utility Classes */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* original css */

.personalization-container {
    padding: 1rem;
    background-color: #160B33;
    color: #fff;
    border-radius: 0.25rem;
}
@media (prefers-color-scheme: light) {
    .personalization-container {
        background-color: #94a3b8;
    }
}
.modification-container {
    padding: 1rem;
    background-color: #1b6ec2;
    color: #fff;
    border-radius: 0.75rem;
}
@media (prefers-color-scheme: dark) {
    .modification-container {
        background-color: #1b6ec2;
    }
}

.card-img-top {
    width: 100%;
    /*height: 15vh;*/
    height: 150px;
    object-fit: cover;
}
.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #1b6ec2;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

code {
    color: #c02d76;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

.navbar-color {
    background-color: #160B33;
}

.header-logo-img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.navbar-brand {
    color: #fff;
} 

.nav-link {
    color: #9d9fa6;
}

.navbar-nav .nav-link.active {
    color: #ffffff;
}

/* ===== ORDER MODALS SHARED STYLES ===== */

/* Base Modal Styles */
.modal-xl {
    max-width: 1200px;
}

/* ===== CREATE ORDER MODAL STYLES ===== */

/* Menu Search */
.menu-search .input-group {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.input-group-text {
    background-color: #e9ecef;
    border: 2px solid #ced4da;
    color: #495057;
    font-weight: 500;
}

/* Category Sections */
.category-section {
    margin-bottom: 2rem;
}

.category-title {
    color: #212529;
    border-bottom: 3px solid #e9ecef;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
    font-size: 1.1rem;
}

/* Menu Items Grid - Compact for Admin */
.menu-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.75rem;
    padding: 0.5rem 0;
}

.menu-item-card {
    border: 2px solid #dee2e6;
    border-radius: 0;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #ffffff;
    color: #212529;
}

.menu-item-card:hover {
    border-color: #0066cc;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    transform: translateY(-1px);
    background: #f8faff;
}

.menu-item-card .item-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.menu-item-card .item-name {
    font-weight: 600;
    color: #212529;
    font-size: 0.95rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
    line-height: 1.3;
    text-align: center;
}

/* No Menu Items State */
.no-menu-items {
    text-align: center;
    color: #495057;
    font-weight: 600;
    padding: 3rem;
    background: #f8f9fa;
    border-radius: 0;
    border: 2px solid #e9ecef;
}

.no-menu-items i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.6;
}

/* Order Summary */
.order-summary {
    background: #f8f9fa;
    border-radius: 0;
    padding: 1rem;
    height: fit-content;
    position: sticky;
    top: 20px;
    border: 2px solid #dee2e6;
    color: #212529;
}

.summary-title {
    color: #212529;
    border-bottom: 3px solid #dee2e6;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
    font-size: 1.1rem;
}

.order-items {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 1rem;
}

.order-item {
    background: #ffffff;
    border: 2px solid #dee2e6;
    border-radius: 0;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    color: #212529;
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.item-header .item-name {
    font-weight: 700;
    color: #212529;
}

.item-header .item-price {
    font-weight: 700;
    color: #198754;
}

.item-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quantity {
    min-width: 30px;
    text-align: center;
    font-weight: 700;
    color: #212529;
    background: #e9ecef;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    border: 1px solid #ced4da;
}

.item-customizations {
    margin-bottom: 0.5rem;
}

.customization {
    display: inline-block;
    background: #e9ecef;
    color: #495057;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    margin-right: 0.25rem;
    margin-bottom: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid #ced4da;
    transition: all var(--transition-base);
}

@media (prefers-color-scheme: dark) {
    .customization {
        background: #343a40;
        color: #e9ecef;
        border-color: #495057;
    }
}

.empty-order {
    text-align: center;
    color: #495057;
    padding: 2rem;
    background: #ffffff;
    border-radius: 0;
    border: 2px solid #dee2e6;
    font-weight: 600;
}

.empty-order i {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    opacity: 0.6;
}

.order-totals {
    border-top: 3px solid #dee2e6;
    padding-top: 1rem;
    background: #e8f5e8;
    margin: -1rem;
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 0;
}

.total-items, .total-price {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    color: #155724;
    font-weight: 600;
}

.total-price {
    font-size: 1.2rem;
    font-weight: 700;
}

/* ===== TAB SELECTION CONTROLS ===== */

/* Container for panel header controls */
.panel-header-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto;
    flex-wrap: wrap;
}

/* Tab selection dropdown */
.tab-select {
    min-width: 200px;
    max-width: 280px;
    padding: 0.375rem 0.75rem;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    background: #ffffff;
    color: #212529;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.tab-select:focus {
    outline: none;
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.tab-select:hover {
    border-color: #adb5bd;
}

/* Customer name inputs */
.customer-name-input {
    width: 120px;
    padding: 0.375rem 0.5rem;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    background: #ffffff;
    color: #212529;
    font-size: 0.9rem;
    font-weight: 500;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.customer-name-input:focus {
    outline: none;
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.customer-name-input::placeholder {
    color: #6c757d;
    font-weight: 400;
}

/* Table label */
.table-label {
    font-weight: 600;
    color: #495057;
    font-size: 0.95rem;
    white-space: nowrap;
}

/* Dark mode for tab selection controls */
@media (prefers-color-scheme: dark) {
    .tab-select {
        background: #2c3034;
        border-color: #495057;
        color: #f8f9fa;
    }

    .tab-select:focus {
        border-color: #0d6efd;
    }

    .tab-select:hover {
        border-color: #6c757d;
    }

    .customer-name-input {
        background: #2c3034;
        border-color: #495057;
        color: #f8f9fa;
    }

    .customer-name-input:focus {
        border-color: #0d6efd;
    }

    .customer-name-input::placeholder {
        color: #ced4da;
    }

    .table-label {
        color: #ced4da;
    }
}

/* Responsive adjustments for tab selection */
@media (max-width: 768px) {
    .panel-header-controls {
        width: 100%;
        justify-content: flex-start;
        margin-left: 0;
        margin-top: 0.5rem;
    }

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

    .customer-name-input {
        width: 100px;
    }
}

@media (max-width: 576px) {
    .panel-header-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    .tab-select {
        min-width: unset;
        max-width: unset;
        width: 100%;
    }

    .customer-name-input {
        width: 100%;
    }
}

/* Table Number Input */
.table-number-input {
    display: inline-block;
    width: 70px;
    padding: 0.25rem 0.5rem;
    margin-left: 0.5rem;
    border: 2px solid #dee2e6;
    border-radius: 4px;
    background: #ffffff;
    color: #212529;
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
    transition: border-color 0.2s;
}

.table-number-input:focus {
    outline: none;
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Dark mode for table number input */
@media (prefers-color-scheme: dark) {
    .table-number-input {
        background: #2c3034;
        border-color: #495057;
        color: #f8f9fa;
    }

    .table-number-input:focus {
        border-color: #0d6efd;
    }
}

/* High contrast mode */
@media (prefers-contrast: more) {
    .table-number-input {
        border-width: 3px;
    }
}

/* ===== ITEM CUSTOMIZATION MODAL STYLES ===== */

/* Item Preview */
.item-preview {
    margin-bottom: 1rem;
}

.item-preview .item-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 6px;
    border: 2px solid #e9ecef;
}

.price {
    font-weight: 700;
    color: #198754;
    font-size: 1.2rem;
    background: #e8f5e8;
    padding: 0.5rem;
    border-radius: 4px;
    border: 2px solid #c3e6cb;
}

/* Customizations Section */
.customizations-section {
    margin-bottom: 1.5rem;
}

.modifier-category {
    border: 2px solid #dee2e6;
    border-radius: 0;
    padding: 1rem;
    background: #f8f9fa;
    color: #212529;
    margin-bottom: 1rem;
}

.modifier-category .category-title {
    color: #495057;
    font-weight: 700;
    margin-bottom: 1rem;
    border-bottom: 2px solid #dee2e6;
    padding-bottom: 0.5rem;
    font-size: 1rem;
}

.modifier-item {
    background: #ffffff;
    border: 2px solid #e9ecef;
    border-radius: 0;
    padding: 1rem;
    color: #212529;
    margin-bottom: 0.5rem;
}

.modifier-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.modifier-name {
    font-weight: 700;
    color: #212529;
}

.modifier-price {
    color: #198754;
    font-weight: 700;
    font-size: 0.9rem;
    background: #e8f5e8;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    border: 1px solid #c3e6cb;
}

.modifier-description {
    color: #495057;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.modifier-options {
    margin-top: 0.5rem;
}

.form-check {
    margin-bottom: 0.5rem;
}

.form-check-label {
    color: #212529;
    font-weight: 500;
}

.option-price {
    color: #198754;
    font-weight: 700;
    font-size: 0.85rem;
    margin-left: 0.5rem;
    background: #e8f5e8;
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
    border: 1px solid #c3e6cb;
}

/* Quantity Section */
.quantity-section {
    margin-bottom: 1.5rem;
}

.quantity-display {
    font-size: 1.2rem;
    font-weight: 700;
    min-width: 40px;
    text-align: center;
    color: #212529;
    background: #f8f9fa;
    padding: 0.5rem;
    border-radius: 0;
    border: 2px solid #dee2e6;
}

/* Total Section */
.total-section {
    background: #e8f5e8;
    padding: 1.5rem;
    border-radius: 0;
    margin-top: 1rem;
    text-align: right;
    border: 2px solid #c3e6cb;
}

.total-section .total-price {
    font-size: 1.4rem;
    color: #155724;
    font-weight: 700;
}

/* ===== FORM CONTROLS ===== */
.form-control {
    background-color: #ffffff;
    border: 2px solid #ced4da;
    color: #212529;
    font-weight: 500;
}

.form-control:focus {
    background-color: #ffffff;
    border-color: #0d6efd;
    color: #212529;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.form-control::placeholder {
    color: #6c757d;
    opacity: 0.8;
    font-weight: 500;
}

.form-check-input {
    width: 1.25em;
    height: 1.25em;
    border: 2px solid #6c757d;
    background-color: #ffffff;
}

.form-check-input:checked {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.form-check-input:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* ===== DARK MODE STYLES ===== */
@media (prefers-color-scheme: dark) {
    /* Modal Base */
    .modal-content {
        background-color: #212529;
        color: #f8f9fa;
        border: 2px solid #495057;
    }

    .modal-header, .modal-footer {
        background-color: #343a40;
        border-color: #495057;
    }

    .modal-title {
        color: #f8f9fa;
    }

    /* Search and Categories */
    .input-group-text {
        background-color: #495057;
        border-color: #6c757d;
        color: #f8f9fa;
    }

    .category-title {
        color: #f8f9fa;
        border-bottom-color: #495057;
    }

    /* Menu Items - Dark Mode */
    .menu-item-card {
        border-color: #495057;
        background: #2c3034;
        color: #f8f9fa;
    }

    .menu-item-card:hover {
        border-color: #0d6efd;
        box-shadow: 0 2px 8px rgba(255,255,255,0.08);
        background: #363b41;
    }

    .menu-item-card .item-name {
        color: #f8f9fa;
    }

    .price {
        color: #20c997;
        background: #1a4d3a;
        border-color: #2d5a44;
    }

    /* No Items State */
    .no-menu-items {
        color: #ced4da;
        background: #343a40;
        border-color: #495057;
    }

    /* Order Summary */
    .order-summary {
        background: #343a40;
        border-color: #495057;
        color: #f8f9fa;
    }

    .summary-title {
        color: #f8f9fa;
        border-bottom-color: #495057;
    }

    .order-item {
        background: #2c3034;
        border-color: #495057;
        color: #f8f9fa;
    }

    .item-header .item-name {
        color: #f8f9fa;
    }

    .item-header .item-price {
        color: #20c997;
    }

    .quantity {
        color: #f8f9fa;
        background: #495057;
        border-color: #6c757d;
    }

    .quantity-display {
        color: #f8f9fa;
        background: #343a40;
        border-color: #495057;
    }

    .customization {
        background: #495057;
        color: #ced4da;
        border-color: #6c757d;
    }

    .empty-order {
        color: #ced4da;
        background: #2c3034;
        border-color: #495057;
    }

    .order-totals {
        border-top-color: #495057;
        background: #1a4d3a;
        color: #20c997;
    }

    .total-items, .total-price {
        color: #20c997;
    }

    .total-section {
        background: #1a4d3a;
        border-color: #2d5a44;
    }

    .total-section .total-price {
        color: #20c997;
    }

    /* Modifiers */
    .modifier-category {
        border-color: #495057;
        background: #343a40;
        color: #f8f9fa;
    }

    .modifier-category .category-title {
        color: #f8f9fa;
        border-bottom-color: #495057;
    }

    .modifier-item {
        background: #2c3034;
        border-color: #495057;
        color: #f8f9fa;
    }

    .modifier-name {
        color: #f8f9fa;
    }

    .modifier-price, .option-price {
        color: #20c997;
        background: #1a4d3a;
        border-color: #2d5a44;
    }

    .modifier-description {
        color: #ced4da;
    }

    .form-check-label {
        color: #f8f9fa;
    }

    /* Form Controls */
    .form-control {
        background-color: #2c3034;
        border-color: #495057;
        color: #f8f9fa;
    }

    .form-control:focus {
        background-color: #2c3034;
        border-color: #0d6efd;
        color: #f8f9fa;
    }

    .form-control::placeholder {
        color: #ced4da;
    }

    .form-check-input {
        background-color: #2c3034;
        border-color: #6c757d;
    }

    .text-muted {
        color: #ced4da !important;
    }

    hr {
        border-color: #495057;
    }
}

/* ===== HIGH CONTRAST MODE ===== */
@media (prefers-contrast: more) {
    .menu-item-card,
    .order-summary,
    .order-item,
    .modifier-category,
    .modifier-item,
    .total-section,
    .form-control,
    .modal-content {
        border-width: 3px;
    }

    .category-title,
    .summary-title,
    .order-totals {
        border-bottom-width: 4px;
    }

    .item-image {
        border-width: 3px;
    }
}
/* ===== MODIFIER OPTIONS GRID STYLES ===== */

.modifier-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.option-container {
    background: #ffffff;
    border: 2px solid #dee2e6;
    border-radius: 0;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
}

.option-container:hover {
    border-color: #0066cc;
    background: #f8f9ff;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 102, 204, 0.1);
}

.option-container.selected {
    border-color: #0066cc;
    background: #e7f3ff;
    box-shadow: 0 0 0 2px rgba(0, 102, 204, 0.2);
}

.option-container.selected::after {
    content: '✓';
    position: absolute;
    top: 8px;
    right: 8px;
    color: #0066cc;
    font-weight: 700;
    font-size: 1.1rem;
}

.option-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.option-name {
    font-weight: 600;
    color: #212529;
    font-size: 0.95rem;
    line-height: 1.3;
    word-wrap: break-word;
    hyphens: auto;
}

.option-container .option-price {
    color: #198754;
    font-weight: 700;
    font-size: 0.85rem;
    background: #e8f5e8;
    padding: 0.15rem 0.4rem;
    border-radius: 0;
    border: 1px solid #c3e6cb;
    margin-top: 0.25rem;
}

/* ===== DARK MODE STYLES FOR MODIFIER OPTIONS ===== */
@media (prefers-color-scheme: dark) {
    .option-container {
        background: #2c3034;
        border-color: #495057;
    }

    .option-container:hover {
        border-color: #0d6efd;
        background: #1a1d23;
        box-shadow: 0 2px 8px rgba(13, 110, 253, 0.2);
    }

    .option-container.selected {
        border-color: #0d6efd;
        background: #1a2332;
        box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.3);
    }

    .option-container.selected::after {
        color: #66b3ff;
    }

    .option-name {
        color: #f8f9fa;
    }

    .option-container .option-price {
        color: #20c997;
        background: #1a4d3a;
        border-color: #2d5a44;
    }
}

/* ===== HIGH CONTRAST MODE FOR MODIFIER OPTIONS ===== */
@media (prefers-contrast: more) {
    .option-container {
        border-width: 3px;
    }

    .option-container.selected {
        box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.4);
    }

    .option-container .option-price {
        border-width: 2px;
    }
}

/* ===== RESPONSIVE GRID FOR SMALL SCREENS ===== */
@media (max-width: 576px) {
    .modifier-options-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .option-container {
        min-height: 60px;
        padding: 0.75rem;
    }

    .option-name {
        font-size: 0.9rem;
    }

    .option-container .option-price {
        font-size: 0.8rem;
    }
}

@media (max-width: 768px) and (min-width: 577px) {
    .modifier-options-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}


/* ===== ORDER CARD STYLES ===== */
.order-card {
    background: #ffffff;
    border: 2px solid #e9ecef;
    border-radius: 0;
    border-bottom: 3px solid var(--pt-coral, #ec607e);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    min-width: 256px;
    width: 320px;
    max-width: 400px;
    height: 100%;
    max-height: calc(100vh - 250px);
    padding: 1.25rem;
    margin: 0;
    box-sizing: border-box;
}

.order-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    border-color: #007bff;
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #f8f9fa;
    flex-shrink: 0;
}

.order-header h4 {
    margin: 0;
    color: #495057;
    font-size: 1.4rem;
    font-weight: 600;
}

.order-time {
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: 500;
}

.order-items {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 1rem;
    padding-right: 0.5rem;
    min-height: 0;
    max-height: calc(100vh - 400px);
}

.order-items::-webkit-scrollbar {
    width: 4px;
}

.order-items::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
}

.order-items::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 2px;
}

.order-item {
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 0;
    border-left: 4px solid #007bff;
}

.item-name {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 1rem;
    color: #212529;
    flex-wrap: wrap;
}

.quantity {
    background: #007bff;
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 0;
    font-size: 0.8rem;
    font-weight: 700;
    min-width: fit-content;
    flex-shrink: 0;
}

.item-price {
    margin-left: auto;
    font-weight: 700;
    color: #28a745;
    font-size: 1rem;
    flex-shrink: 0;
}

.customizations {
    margin-top: 0.5rem;
    padding-left: 0.75rem;
}

.customization {
    margin-bottom: 0.5rem;
}

.customization-name {
    font-weight: 600;
    color: #495057;
    font-size: 0.9rem;
}

.modifier-options {
    margin-left: 1rem;
    margin-top: 0.25rem;
}

.modifier-option {
    display: inline-block;
    background: #e9ecef;
    padding: 0.2rem 0.5rem;
    margin: 0.1rem 0.2rem 0.1rem 0;
    border-radius: 0;
    font-size: 0.8rem;
    color: #495057;
}

.option-price {
    color: #28a745;
    font-weight: 600;
    margin-left: 0.25rem;
}

.order-footer {
    flex-shrink: 0;
    padding-top: 0.75rem;
    border-top: 2px solid #f8f9fa;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.order-total {
    font-size: 1.2rem;
    font-weight: 700;
    color: #212529;
}

.order-status-completed {
    background: #d4edda;
    color: #155724;
    padding: 0.4rem 0.8rem;
    border-radius: 0;
    font-weight: 600;
    font-size: 0.9rem;
    border: 1px solid #c3e6cb;
    flex-shrink: 0;
}

.order-status-pending {
    background: #fff3cd;
    color: #856404;
    padding: 0.4rem 0.8rem;
    border-radius: 0;
    font-weight: 600;
    font-size: 0.9rem;
    border: 1px solid #ffeaa7;
    flex-shrink: 0;
}

.order-actions-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1050;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.order-actions-modal.show {
    opacity: 1;
    visibility: visible;
}

/* Order actions modal specific content - uses scoped selector to avoid overriding global .modal-content */
.order-actions-modal .modal-content {
    background: white;
    padding: 2rem;
    border-radius: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    min-width: 300px;
}

.order-actions-modal .modal-content h5 {
    margin: 0 0 1.5rem 0;
    font-size: 1.3rem;
    font-weight: 600;
    color: #212529;
    text-align: center;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.action-buttons .btn {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    border: none;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
    transform: translateY(-1px);
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #545b62;
    transform: translateY(-1px);
}

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1040;
}
/* Responsive adjustments to ensure 40px buffer */
@media (max-width: 1200px) {
    .order-card {
        width: 280px;
        min-width: 224px;
        max-height: calc(100vh - 230px);
    }

    .order-items {
        max-height: calc(100vh - 380px);
    }
}

@media (max-width: 768px) {
    .order-card {
        width: 240px;
        min-width: 200px;
        padding: 1rem;
        max-height: calc(100vh - 200px);
    }

    .order-items {
        max-height: calc(100vh - 350px);
    }

    .order-header h4 {
        font-size: 1.2rem;
    }

    .item-name {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .item-price {
        margin-left: 0;
    }
}

@media (max-width: 480px) {
    .order-card {
        width: 224px;
        min-width: 176px;
        max-height: calc(100vh - 180px);
    }

    .order-items {
        max-height: calc(100vh - 330px);
    }
}

/* Dark Mode Styles */
@media (prefers-color-scheme: dark) {
    .order-card {
        background: #2c3034;
        border-color: #495057;
        color: #f8f9fa;
    }

    .order-card:hover {
        border-color: #0d6efd;
        box-shadow: 0 8px 20px rgba(255, 255, 255, 0.1);
    }

    .order-header {
        border-bottom-color: #495057;
    }

    .order-header h4 {
        color: #f8f9fa;
    }

    .order-time {
        color: #ced4da;
    }

    .order-item {
        background: #495057;
        border-left-color: #0d6efd;
    }

    .item-name {
        color: #f8f9fa;
    }

    .item-price {
        color: #20c997;
    }

    .customization-name {
        color: #ced4da;
    }

    .modifier-option {
        background: #6c757d;
        color: #ced4da;
    }

    .option-price {
        color: #20c997;
    }

    .order-footer {
        border-top-color: #495057;
    }

    .order-total {
        color: #f8f9fa;
    }

    .order-status-completed {
        background: #0a3622;
        color: #d4edda;
        border-color: #157347;
    }

    .order-status-pending {
        background: #664d03;
        color: #fff3cd;
        border-color: #b58900;
    }

    /* Order actions modal - scoped to avoid overriding global .modal-content dark mode */
    .order-actions-modal .modal-content {
        background: #2c3034;
        color: #f8f9fa;
    }

    .order-actions-modal .modal-content h5 {
        color: #f8f9fa;
    }
}

/* ===== DARK MODE STYLES FOR ORDER CARD ===== */
@media (prefers-color-scheme: dark) {
    /* Order Card Base */
    .order-card {
        background: #2c3034;
        border-color: #495057;
        color: #f8f9fa;
    }

    .order-card:hover {
        border-color: #0d6efd;
        box-shadow: 0 4px 8px rgba(255,255,255,0.1);
    }

    /* Order Header */
    .order-header {
        border-bottom-color: #495057;
    }

    .order-header h4 {
        color: #f8f9fa;
    }

    .order-time {
        color: #ced4da;
        background: #495057;
        border-color: #6c757d;
    }

    /* Order Items */
    .order-item {
        border-bottom-color: #495057;
    }

    .item-name {
        color: #f8f9fa;
    }

    .quantity {
        color: #ffffff;
        background: #0d6efd;
    }

    .item-price {
        color: #20c997;
        background: #1a4d3a;
    }

    /* Customizations */
    .customization-name {
        color: #ced4da;
    }

    .modifier-option {
        background: #495057;
        border-color: #6c757d;
        color: #ced4da;
    }

    .option-price {
        color: #20c997;
    }
    
    /* Order Footer */
    .order-footer {
        border-top-color: #3d4449;
    }

    .order-total {
        color: #d4edda;
        background: #0f5132;
        border-color: #146c43;
    }

    .order-total:hover {
        background: #134a2f;
        border-color: #115c3a;
        transform: translateY(-1px);
    }

    /* Order Status */
    .order-status-pending {
        background: #664d03;
        color: #fff3cd;
        border-color: #b58900;
    }

    .order-status-completed {
        background: #0a3622;
        color: #d4edda;
        border-color: #157347;
    }

    /* Order Actions Modal */
    .order-actions-modal .modal-content {
        background: #2c3034;
        border-color: #495057;
        color: #f8f9fa;
    }

    .order-actions-modal .modal-content h5 {
        color: #f8f9fa;
    }

    /* Action Buttons remain the same for consistency */
    .btn-primary:hover,
    .btn-success:hover,
    .btn-secondary:hover {
        box-shadow: 0 2px 4px rgba(255,255,255,0.1);
    }
}

/* ===== HIGH CONTRAST MODE FOR ORDER CARD ===== */
@media (prefers-contrast: more) {
    .order-card {
        border-width: 3px;
    }

    .order-header {
        border-bottom-width: 3px;
    }

    .order-footer {
        border-top-width: 3px;
    }

    .order-time,
    .quantity,
    .item-price,
    .order-total,
    .order-status-pending,
    .order-status-completed {
        border-width: 2px;
    }

    .order-actions-modal .modal-content {
        border-width: 3px;
    }

    .action-buttons .btn {
        border-width: 3px;
    }
}

/************ INACTIVE ITEM FOR ITEMCUSTOMIZATIONMODAL ******************/
.inactive-item {
    opacity: 0.6;
    pointer-events: auto;
}

.inactive-item .modal-body {
    position: relative;
}

.inactive-item .modal-body::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(128, 128, 128, 0.3);
    pointer-events: none;
    z-index: 1;
}

.inactive-warning {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 0.375rem;
    padding: 0.75rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    z-index: 2;
}

.inactive-badge {
    background-color: #dc3545;
    color: white;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    margin-left: 0.5rem;
    font-weight: normal;
}

.option-container.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.option-container.disabled:hover {
    background-color: transparent;
    border-color: initial;
}

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

@media (prefers-color-scheme: dark) {
    .inactive-warning {
        background-color: #2d1b1f;
        color: #f8d7da;
        border-color: #842029;
    }
}

/* ===== SLIDE-IN PANEL STYLES ===== */

/* Base Order Panel - CreateOrderCard */
.order-panel {
    position: fixed;
    top: 0;
    left: 72px; /* Sidebar width */
    right: 0;
    bottom: 0;
    background: var(--modal-bg);
    z-index: 100;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
}

.order-panel.active {
    transform: translateX(0);
}

/* Customization Panel - ItemCustomizationModal (sits on top) */
.customization-panel {
    position: fixed;
    top: 0;
    left: 72px; /* Sidebar width */
    right: 0;
    bottom: 0;
    background: var(--modal-bg);
    z-index: 110; /* Higher than order-panel */
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.2);
}

.customization-panel.active {
    transform: translateX(0);
}

/* Panel Header */
.panel-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: var(--modal-header-bg);
    border-bottom: 2px solid var(--modal-border);
    flex-shrink: 0;
}

.panel-back-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid var(--modal-border);
    background: var(--modal-bg);
    color: var(--modal-text);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.panel-back-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: scale(1.05);
}

.panel-back-btn i {
    font-size: 1.25rem;
}

.panel-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--modal-text);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

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

/* Panel Body */
.panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

/* Panel Footer */
.panel-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: var(--modal-footer-bg);
    border-top: 2px solid var(--modal-border);
    flex-shrink: 0;
}

/* CreateOrderCard specific layout */
.panel-content-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 1.5rem;
    height: 100%;
}

.menu-section {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.menu-categories {
    flex: 1;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.summary-section {
    display: flex;
    flex-direction: column;
}

.summary-section .order-summary {
    position: sticky;
    top: 0;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

/* ItemCustomizationModal specific layout */
.customization-content {
    max-width: 800px;
    margin: 0 auto;
}

.item-preview {
    margin-bottom: 1.5rem;
}

.preview-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1.5rem;
    align-items: start;
}

.preview-image-container {
    width: 200px;
    height: 150px;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid var(--modal-border);
}

.preview-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.preview-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--modal-text);
    margin: 0;
}

.preview-description {
    color: var(--modal-text-secondary);
    font-size: 1rem;
    margin: 0;
    line-height: 1.5;
}

.preview-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: #198754;
    background: #e8f5e8;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    display: inline-block;
    width: fit-content;
    border: 2px solid #c3e6cb;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--modal-text);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.modifier-category-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--modal-text-secondary);
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--modal-border);
}

/* Quantity controls - larger for panel */
.quantity-section {
    margin: 1.5rem 0;
    padding: 1rem;
    background: var(--modal-header-bg);
    border-radius: 12px;
    border: 2px solid var(--modal-border);
}

.quantity-controls-large {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
}

.quantity-controls-large .btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.quantity-display-large {
    font-size: 2rem;
    font-weight: 700;
    min-width: 80px;
    text-align: center;
    color: var(--modal-text);
}

/* Total section for customization panel */
.total-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, #e8f5e8 0%, #d4edda 100%);
    border-radius: 12px;
    border: 2px solid #c3e6cb;
    margin-top: 1.5rem;
}

.total-label {
    font-size: 1.25rem;
    font-weight: 600;
    color: #155724;
}

.total-amount {
    font-size: 2rem;
    font-weight: 700;
    color: #155724;
}

/* ===== PANEL RESPONSIVE STYLES ===== */
@media (max-width: 992px) {
    .panel-content-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .summary-section .order-summary {
        position: relative;
        max-height: none;
    }

    .preview-grid {
        grid-template-columns: 1fr;
    }

    .preview-image-container {
        width: 100%;
        height: 200px;
    }
}

@media (max-width: 768px) {
    .order-panel,
    .customization-panel {
        left: 0; /* Full width on mobile */
    }

    .panel-header {
        padding: 1rem;
    }

    .panel-body {
        padding: 1rem;
    }

    .panel-footer {
        padding: 1rem;
        flex-direction: column;
    }

    .panel-footer .btn {
        width: 100%;
    }

    .quantity-controls-large .btn {
        width: 48px;
        height: 48px;
    }

    .quantity-display-large {
        font-size: 1.5rem;
        min-width: 60px;
    }
}

/* ===== PANEL DARK MODE STYLES ===== */
@media (prefers-color-scheme: dark) {
    .order-panel,
    .customization-panel {
        box-shadow: -4px 0 30px rgba(0, 0, 0, 0.4);
    }

    .preview-price {
        color: #20c997;
        background: #1a4d3a;
        border-color: #2d5a44;
    }

    .total-section {
        background: linear-gradient(135deg, #1a4d3a 0%, #0a3622 100%);
        border-color: #2d5a44;
    }

    .total-label,
    .total-amount {
        color: #20c997;
    }
}

/* ===== PANEL REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
    .order-panel,
    .customization-panel,
    .menu-item-panel {
        transition: none;
    }

    .panel-back-btn {
        transition: none;
    }
}

/* ===== MENU ITEM EDIT PANEL STYLES ===== */

.menu-item-panel {
    position: fixed;
    top: 0;
    left: 72px; /* Sidebar width */
    right: 0;
    bottom: 0;
    background: var(--modal-bg);
    z-index: 100;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
}

.menu-item-panel.active {
    transform: translateX(0);
}

/* Two-column grid layout */
.edit-item-grid {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 2rem;
    height: 100%;
    min-height: 0;
}

.basic-info-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow-y: auto;
    padding-right: 1rem;
}

.customizations-section {
    display: flex;
    flex-direction: column;
    overflow: visible;
}

.section-header {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--modal-text);
    margin: 0 0 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--modal-border);
}

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

.section-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.section-header-row .section-header {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

/* Form Fields */
.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.field-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--modal-text);
}

.field-dropdown-toggle {
    width: 100%;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    text-align: left !important;
    padding: 0.5rem 0.75rem !important;
}

.field-dropdown-toggle i {
    font-size: 0.75rem;
    opacity: 0.6;
}

.placeholder-text {
    color: var(--modal-text-secondary);
    opacity: 0.7;
}

/* Image Upload */
.image-upload-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
}

.item-preview-image {
    width: 100%;
    max-width: 280px;
    height: 180px;
    object-fit: cover;
    border-radius: 12px;
    border: 2px solid var(--modal-border);
}

.image-placeholder {
    width: 100%;
    max-width: 280px;
    height: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--modal-header-bg);
    border: 2px dashed var(--modal-border);
    border-radius: 12px;
    color: var(--modal-text-secondary);
}

.image-placeholder i {
    font-size: 2.5rem;
    opacity: 0.5;
}

.btn-upload-image {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--primary-color);
    color: white;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-upload-image:hover {
    background: var(--primary-color-dark);
    transform: translateY(-1px);
}

/* Price Input */
.price-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.price-input-wrapper .price-symbol {
    position: absolute;
    left: 12px;
    color: var(--modal-text-secondary);
    font-weight: 600;
}

.price-input-wrapper .price-input,
.price-input-wrapper .form-control {
    padding-left: 28px;
}

.price-input-wrapper-sm {
    position: relative;
    display: flex;
    align-items: center;
}

.price-input-wrapper-sm .price-symbol {
    position: absolute;
    left: 10px;
    color: var(--modal-text-secondary);
    font-weight: 600;
    font-size: 0.875rem;
}

.price-input-wrapper-sm .form-control {
    padding-left: 24px;
}

/* Add Customization Button */
.btn-add-customization {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-add-customization:hover {
    background: var(--primary-color-dark);
    transform: translateY(-1px);
}

/* Modifiers List */
.modifiers-list {
    flex: 1;
    overflow: visible;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-right: 0.5rem;
}

.empty-modifiers {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    background: var(--modal-header-bg);
    border: 2px dashed var(--modal-border);
    border-radius: 0;
    text-align: center;
    color: var(--modal-text-secondary);
}

.empty-modifiers i {
    font-size: 3rem;
    opacity: 0.4;
    margin-bottom: 1rem;
}

.empty-modifiers p {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    color: var(--modal-text);
}

.empty-modifiers span {
    font-size: 0.875rem;
}

/* Modifier Card */
.modifier-card {
    background: var(--modal-bg);
    border: 2px solid var(--modal-border);
    border-radius: 0;
    overflow: visible;
}

.modifier-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--modal-header-bg);
    border-bottom: 1px solid var(--modal-border);
}

.modifier-name-input {
    flex: 1;
    border: none !important;
    background: transparent !important;
    font-size: 1rem;
    font-weight: 600;
    color: var(--modal-text);
    padding: 0.25rem 0.5rem !important;
}

.modifier-name-input:focus {
    outline: none;
    background: var(--modal-bg) !important;
    border-radius: 4px;
}

.btn-remove-modifier {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid #dc3545;
    border-radius: 6px;
    color: #dc3545;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-remove-modifier:hover {
    background: #dc3545;
    color: white;
}

.modifier-card-body {
    padding: 1rem;
}

.modifier-fields-row {
    display: grid;
    grid-template-columns: 1fr 1fr 120px;
    gap: 1rem;
    margin-bottom: 1rem;
}

.modifier-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.modifier-field label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--modal-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.modifier-field .field-hint {
    font-size: 0.7rem;
    color: var(--modal-text-secondary);
    opacity: 0.8;
}

.modifier-field-price {
    max-width: 120px;
}

/* Allow dropdown menus to escape modifier containers */
.modifier-field .dropdown-menu.show {
    z-index: 1050;
}

.modifier-card-body {
    overflow: visible;
}

.modifier-action-toggle,
.modifier-category-toggle {
    width: 100%;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    text-align: left !important;
    padding: 0.375rem 0.625rem !important;
    font-size: 0.875rem !important;
    border-radius: 0 !important;
}

.modifier-action-toggle i,
.modifier-category-toggle i {
    font-size: 0.625rem;
    opacity: 0.6;
}

/* Fix dropdown menu alignment in modifier fields */
.modifier-field .dropdown {
    position: relative;
}

.modifier-field .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 2px;
    border-radius: 0;
    min-width: 100%;
}

/* Modifier Options Section */
.modifier-options-section {
    background: var(--modal-header-bg);
    border-radius: 0;
    padding: 0.75rem;
}

.options-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.options-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--modal-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.btn-add-option {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.625rem;
    background: transparent;
    border: 1px solid var(--primary-color);
    border-radius: 0;
    color: var(--primary-color);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.options-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.option-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: var(--modal-bg);
    border: 1px solid var(--modal-border);
    border-radius: 0;
}

.option-name-input {
    flex: 1;
    padding: 0.375rem 0.625rem !important;
    font-size: 0.875rem !important;
    border: 1px solid var(--modal-border) !important;
    border-radius: 0 !important;
}

.option-price-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 90px;
}

.price-symbol-sm {
    position: absolute;
    left: 8px;
    color: var(--modal-text-secondary);
    font-size: 0.75rem;
    font-weight: 600;
}

.option-price-input {
    width: 100%;
    padding: 0.375rem 0.625rem 0.375rem 20px !important;
    font-size: 0.875rem !important;
    border: 1px solid var(--modal-border) !important;
    border-radius: 4px !important;
}

.btn-remove-option {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 4px;
    color: #dc3545;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-remove-option:hover {
    background: #dc3545;
    color: white;
}

.no-options-hint {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem;
    background: var(--modal-bg);
    border-radius: 6px;
    font-size: 0.8rem;
    color: var(--modal-text-secondary);
}

.no-options-hint i {
    color: var(--primary-color);
}

/* Panel Footer for Edit Menu Item */
.menu-item-panel .panel-footer {
    justify-content: space-between;
}

.footer-right-actions {
    display: flex;
    gap: 1rem;
}

/* ===== MENU ITEM PANEL RESPONSIVE ===== */
@media (max-width: 1200px) {
    .edit-item-grid {
        grid-template-columns: 320px 1fr;
        gap: 1.5rem;
    }

    .modifier-fields-row {
        grid-template-columns: 1fr 1fr;
    }

    .modifier-field-price {
        grid-column: span 2;
        max-width: none;
    }
}

@media (max-width: 992px) {
    .edit-item-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .basic-info-section {
        padding-right: 0;
    }

    .modifier-fields-row {
        grid-template-columns: 1fr;
    }

    .modifier-field-price {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    .menu-item-panel {
        left: 0; /* Full width on mobile */
    }

    .menu-item-panel .panel-footer {
        flex-direction: column;
        gap: 0.75rem;
    }

    .footer-right-actions {
        flex-direction: column;
        width: 100%;
    }

    .footer-right-actions .btn {
        width: 100%;
    }

    .menu-item-panel .panel-footer .btn-danger {
        width: 100%;
    }

    .option-row {
        flex-wrap: wrap;
    }

    .option-name-input {
        flex: 1 1 100%;
    }

    .option-price-wrapper {
        flex: 1;
    }
}

/* ===== MENU ITEM PANEL DARK MODE ===== */
@media (prefers-color-scheme: dark) {
    .menu-item-panel {
        box-shadow: -4px 0 30px rgba(0, 0, 0, 0.4);
    }

    .modifier-name-input:focus {
        background: var(--modal-header-bg) !important;
    }

    .btn-upload-image:hover {
        background: var(--primary-color);
        opacity: 0.9;
    }
}

/* ===== COMPACT CARD HEADER STYLES ===== */
/* Matches Config.razor section-header style for consistency */

.card-header-compact {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.card-header-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: #212529;
}

.card-header-title i {
    color: #0d6efd;
    font-size: 1.25rem;
}

.btn-edit-card {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all var(--transition-base);
    font-size: 0.875rem;
    background: var(--surface-color);
    color: var(--text-secondary);
}

.btn-edit-card:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: scale(1.05);
    box-shadow: var(--shadow-sm);
}

/* Dark mode for compact card headers */
@media (prefers-color-scheme: dark) {
    .card-header-compact {
        background: #343a40;
        border-bottom-color: #495057;
    }

    .card-header-title {
        color: #ffffff;
    }

    .card-header-title i {
        color: #6ea8fe;
    }

    .btn-edit-card {
        background: #2c3034;
        border-color: #495057;
        color: #ced4da;
    }

    .btn-edit-card:hover {
        background: var(--primary-color);
        border-color: var(--primary-color);
        color: white;
    }
}

/* ===== BRANDING COLORS SECTION ===== */

.branding-section {
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
    margin-top: 0.5rem;
}

.branding-section .section-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

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

.badge-locked {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-left: auto;
}

.color-display-row {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.color-item {
    flex: 1;
    min-width: 140px;
}

.color-preview-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.25rem;
}

.color-swatch {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.color-hex {
    font-family: monospace;
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.color-input-row {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.color-input-group {
    flex: 1;
    min-width: 180px;
}

.color-picker-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.color-picker {
    width: 48px;
    height: 38px;
    padding: 2px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    background: var(--surface-color);
}

.color-picker::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-picker::-webkit-color-swatch {
    border: none;
    border-radius: 4px;
}

.color-hex-input {
    flex: 1;
    font-family: monospace;
    text-transform: uppercase;
}

.branding-note {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 0.75rem;
    background: rgba(13, 110, 253, 0.08);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.branding-note i {
    color: var(--primary-color);
    margin-top: 2px;
}

/* Branding section dark mode */
@media (prefers-color-scheme: dark) {
    .branding-section {
        border-top-color: var(--border-color);
    }
    
    .badge-locked {
        background: rgba(255, 255, 255, 0.1);
        color: #adb5bd;
    }
    
    .color-swatch {
        border-color: rgba(255, 255, 255, 0.2);
    }
    
    .color-picker {
        border-color: rgba(255, 255, 255, 0.2);
        background: var(--surface-color);
    }
    
    .branding-note {
        background: rgba(110, 168, 254, 0.1);
    }
}

/* ===== FEATURE FLAGS CARD ===== */

.feature-flags-card {
    background: var(--surface-color);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.feature-flags-card .card-body {
    padding: 1.25rem;
}

.feature-flags-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.feature-flag-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.feature-info {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    flex: 1;
}

.feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--primary-color);
    color: white;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.feature-icon.whatsapp {
    background: #25D366;
}

.feature-details {
    flex: 1;
}

.feature-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.feature-description {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.feature-toggle {
    flex-shrink: 0;
    margin-left: 1rem;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 28px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

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

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

.toggle-switch input:disabled + .toggle-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

.ultra-admin-note {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 0.75rem;
    background: rgba(111, 66, 193, 0.1);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: #6f42c1;
}

.ultra-admin-note i {
    font-size: 1rem;
}

.loading-state {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    color: var(--text-secondary);
}

/* Feature flags dark mode */
@media (prefers-color-scheme: dark) {
    .feature-flag-item {
        background: rgba(255, 255, 255, 0.05);
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    .toggle-slider {
        background-color: #555;
    }
    
    .ultra-admin-note {
        background: rgba(111, 66, 193, 0.2);
        color: #b794f6;
    }
}

/* ===== VIEW TOGGLE BUTTONS - 2025 BRANDING ===== */
/* Global override for Bootstrap btn-primary in view-toggle */

.view-toggle .btn-primary {
    background-color: var(--pt-navy, #000075) !important;
    border-color: var(--pt-navy, #000075) !important;
    color: white !important;
}

.view-toggle .btn-primary:hover {
    background-color: #000060 !important;
    border-color: #000060 !important;
}

.view-toggle .btn-outline-primary {
    color: var(--pt-navy, #000075) !important;
    border-color: var(--pt-navy, #000075) !important;
    background-color: transparent !important;
}

.view-toggle .btn-outline-primary:hover {
    background-color: rgba(0, 0, 117, 0.1) !important;
    color: var(--pt-navy, #000075) !important;
}

.view-toggle .btn:focus,
.view-toggle .btn:focus-visible {
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(0, 0, 117, 0.25) !important;
}

.view-toggle .btn-primary:focus,
.view-toggle .btn-primary:focus-visible {
    background-color: var(--pt-navy, #000075) !important;
    border-color: var(--pt-navy, #000075) !important;
}

/* Restaurant Selector in Feature Flags Card */
.restaurant-selector {
    margin-bottom: 1.25rem;
}

.restaurant-selector .selector-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.restaurant-selector .form-label {
    margin-bottom: 0;
    font-weight: 500;
    color: var(--text-primary);
}

.btn-reload {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: var(--surface-color);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

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

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

.selected-restaurant-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: rgba(13, 110, 253, 0.08);
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    font-weight: 500;
    color: var(--text-primary);
}

.selected-restaurant-info i {
    color: var(--primary-color);
}

.selected-restaurant-info .restaurant-address {
    margin-left: auto;
    font-weight: 400;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
    gap: 0.75rem;
}

.empty-state i {
    font-size: 2rem;
    opacity: 0.5;
}

/* Dark mode for restaurant selector */
@media (prefers-color-scheme: dark) {
    .btn-reload {
        background: rgba(255, 255, 255, 0.05);
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    .btn-reload:hover {
        background: var(--primary-color);
        border-color: var(--primary-color);
    }
    
    .selected-restaurant-info {
        background: rgba(110, 168, 254, 0.1);
    }
}

/* ===== EDIT MENU ITEM MODAL ENHANCEMENTS ===== */

/* Sharp borders for basic info section elements */
.basic-info-section .form-control,
.basic-info-section .field-dropdown-toggle,
.basic-info-section .dropdown-menu,
.basic-info-section .image-placeholder,
.basic-info-section .item-preview-image {
    border-radius: 0 !important;
}

.basic-info-section .btn-upload-image {
    border-radius: 0;
}

.basic-info-section .image-actions .btn-remove-image {
    border-radius: 0;
}

/* Active toggle sharp corners */
.active-toggle-container {
    border-radius: 0 !important;
}

.active-toggle-container .toggle-track {
    border-radius: 0 !important;
}

.active-toggle-container .toggle-thumb {
    border-radius: 0 !important;
}

/* Modifier dropdown menu alignment fix */
.modifier-fields-row .modifier-field .dropdown {
    position: relative;
}

.modifier-fields-row .modifier-field .dropdown-menu {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: auto !important;
    margin-top: 2px !important;
    min-width: 100% !important;
    border-radius: 0 !important;
    z-index: 1060 !important;
}

/* Ensure dropdown toggle has sharp corners */
.modifier-action-toggle,
.modifier-category-toggle {
    border-radius: 0 !important;
}

/* Sharp corners for all modifier section elements */
.modifier-card {
    border-radius: 0 !important;
}

.modifier-options-section {
    border-radius: 0 !important;
}

.option-row {
    border-radius: 0 !important;
}

.option-name-input,
.option-price-input {
    border-radius: 0 !important;
}

.btn-add-option {
    border-radius: 0 !important;
}

.no-options-hint {
    border-radius: 0 !important;
}

/* Ensure dropdowns in modifiers don't get clipped */
.modifier-card-body {
    overflow: visible !important;
}

.modifiers-list {
    overflow: visible !important;
}

.customizations-section {
    overflow: visible !important;
}

/* Panel body should allow overflow for dropdowns */
.menu-item-panel .panel-body {
    overflow-x: hidden;
    overflow-y: auto;
}

/* Textarea styling for description field */
.basic-info-section textarea.form-control {
    border-radius: 0 !important;
    min-height: 80px;
    resize: vertical;
}