/* =============================================
   CSS CUSTOM PROPERTIES - DESIGN SYSTEM
   ============================================= */
:root {
    /* === ZENSO-INSPIRED LIGHT DESIGN SYSTEM === */

    /* Color Palette - Teal & Modern */
    --primary-bg-start: #F4FAFB;     /* Teal mist - very light teal backgrounds */
    --primary-bg-end: #E8F4F6;       /* Teal surface - subtle teal for primary areas */
    --secondary-bg: #C0DEE5;         /* Light teal - for secondary backgrounds, cards */
    --accent-color: #2D6B73;         /* Medium teal - for accent buttons, highlights */
    --dark-base: #003B46;            /* Very dark teal - for headers, primary text */
    --light-surface: #E8F5F7;        /* Light blue surface - softer than pure white */
    --surface-light: #F4FAFB;        /* Teal mist - subtle backgrounds */
    --surface-medium: #E8F4F6;       /* Teal surface - medium surface */
    --text-primary: #003B46;         /* Very dark teal - primary text */
    --text-secondary: #07575B;       /* Dark teal - secondary text */
    --text-muted: #2D6B73;           /* Medium teal - muted text */
    --text-light: #F4FAFB;           /* Teal mist for light text */

    /* Teal Color System */
    --teal-very-dark: #003B46;       /* Very dark teal - headers, primary text */
    --teal-dark: #07575B;            /* Dark teal - secondary backgrounds */
    --teal-medium: #2D6B73;          /* Medium teal - interactive elements */
    --teal-light: #C0DEE5;           /* Light teal - subtle backgrounds */
    --teal-surface: #E8F4F6;         /* Teal surface - card backgrounds */
    --teal-mist: #F4FAFB;            /* Teal mist - very subtle backgrounds */
    --teal-hover: #4A949E;           /* Teal hover - intermediate for hover states */
    --teal-focus: #7BB8C3;           /* Teal focus - focus indicators */

    /* Semantic Colors */
    --success: #10B981;              /* Soft green for success */
    --warning: #F59E0B;              /* Warm amber for warning */
    --error: #EF4444;                /* Soft red for error */
    --info: #3B82F6;                 /* Subtle blue for info */

    /* Sharp Edge Design System - Clean Borders */
    --radius-none: 0px;             /* Primary containers */
    --radius-small: 2px;            /* Small elements */
    --radius-medium: 4px;           /* Interactive elements */
    --radius-large: 6px;            /* Cards and modals */

    /* 3-Level Elevation System - Clean Shadows */
    --elevation-1: 0 1px 3px rgba(0, 0, 0, 0.08);   /* Subtle lift */
    --elevation-2: 0 4px 12px rgba(0, 0, 0, 0.12);  /* Standard lift */
    --elevation-3: 0 8px 24px rgba(0, 0, 0, 0.16);  /* High lift */

    /* Interactive States */
    --hover-opacity: 0.08;
    --active-opacity: 0.12;
    --focus-ring: 0 0 0 3px rgba(15, 164, 175, 0.3);

    /* Spacing - 8-Point Grid System */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;

    /* Typography Scale */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Smoked Glass Effects - Performance Optimized */
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-bg-hover: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    --glass-blur: blur(6px);
    --glass-blur-light: blur(3px);
    --glass-blur-heavy: blur(8px);

    /* Teal-Based Background Color Palette */
    --bg-warm: #F4FAFB;              /* Teal mist - warm sections */
    --bg-cool: #E8F4F6;              /* Teal surface - cool sections */
    --bg-sage: #F0F8F9;              /* Light teal variant - special sections */
    --bg-cream: #F7FBFC;             /* Very light teal - coffee/dessert sections */
    --bg-neutral: #F4FAFB;           /* Teal mist - default sections */

    /* Enhanced Interactive Colors */
    --interactive-bg: #E8F4F6;       /* Teal surface for interactive backgrounds */
    --interactive-hover: #C0DEE5;    /* Light teal for hover states */
    --border-soft: #C0DEE5;          /* Light teal border color */
    --border-medium: #7BB8C3;        /* Teal focus for medium borders */
}

/* === DARK MODE DESIGN TOKENS === */
body.dark-mode {
    --primary-bg-start: #001A1F;     /* Near-black teal for dark mode backgrounds */
    --primary-bg-end: #003B46;       /* Very dark teal for dark mode gradients */
    --secondary-bg: #07575B;         /* Dark teal for contrast */
    --accent-color: #61A4AD;         /* Original medium teal for accents */
    --light-surface: #001A1F;        /* Near-black teal surface */
    --surface-light: #003B46;        /* Very dark teal light surface */
    --surface-medium: #07575B;       /* Dark teal medium surface */
    --text-primary: #C0DEE5;         /* Light teal for primary text */
    --text-secondary: #7BB8C3;       /* Teal focus for secondary text */
    --text-muted: #61A4AD;           /* Original medium teal for muted text */

    /* Dark mode teal system */
    --teal-very-dark: #001A1F;       /* Near-black for dark mode */
    --teal-dark: #003B46;            /* Original very dark becomes dark */
    --teal-medium: #1E5A63;          /* Darker medium teal */
    --teal-light: #61A4AD;           /* Original medium becomes light */
    --teal-surface: #07575B;         /* Dark teal for surfaces */
    --teal-mist: #003B46;            /* Very dark teal for mist */
    --teal-hover: #2D6B73;           /* Original medium for hover */
    --teal-focus: #61A4AD;           /* Original medium for focus */

    /* Dark mode elevation with adjusted opacity */
    --elevation-1: 0 1px 3px rgba(0, 0, 0, 0.3);
    --elevation-2: 0 4px 12px rgba(0, 0, 0, 0.4);
    --elevation-3: 0 8px 24px rgba(0, 0, 0, 0.5);

    /* Dark mode focus ring */
    --focus-ring: 0 0 0 3px rgba(59, 130, 246, 0.6);

    /* Dark mode glass effects */
    --glass-bg: rgba(31, 41, 55, 0.75);
    --glass-bg-hover: rgba(31, 41, 55, 0.85);
    --glass-border: rgba(75, 85, 99, 0.3);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);

    /* Dark mode teal backgrounds */
    --bg-warm: #003B46;              /* Very dark teal for warm background */
    --bg-cool: #07575B;              /* Dark teal for cool background */
    --bg-sage: #1E5A63;              /* Medium dark teal for sage background */
    --bg-cream: #264B52;             /* Teal variant for cream background */
    --bg-neutral: #003B46;           /* Very dark teal for neutral background */

    /* Dark mode interactive colors */
    --interactive-bg: #07575B;       /* Dark teal interactive background */
    --interactive-hover: #1E5A63;    /* Medium dark teal hover state */
    --border-soft: #2D6B73;          /* Medium teal soft border */
    --border-medium: #61A4AD;        /* Original medium teal for borders */
}

/* === MODERN CARD DESIGN SYSTEM === */
.card {
    background: var(--bg-cool);
    border-radius: var(--radius-large);
    box-shadow: var(--elevation-2);
    padding: var(--space-lg);
    margin-bottom: var(--space-md);
    border: 1px solid var(--border-soft);
    transition: var(--transition-normal);
}

.card:hover {
    background: var(--interactive-hover);
    box-shadow: var(--elevation-3);
    transform: translateY(-2px);
}

/* Context-based card variations */
.card.warm {
    background: var(--bg-warm);
}

.card.cool {
    background: var(--bg-cool);
}

.card.sage {
    background: var(--bg-sage);
}

.card.cream {
    background: var(--bg-cream);
}

.card-header {
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--surface-medium);
}

.card-title {
    font-size: var(--text-xl);
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.card-subtitle {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin: var(--space-xs) 0 0 0;
}

.card-body {
    padding: 0;
}

.card-section {
    margin-bottom: var(--space-lg);
}

.card-section:last-child {
    margin-bottom: 0;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, #E8F5F7 0%, rgba(192, 222, 229, 0.6) 100%);
    min-height: 100vh;
    color: var(--text-primary);
    position: relative;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: var(--space-lg);
    transition: max-width var(--transition-normal);
    position: relative;
    z-index: auto;
}

.container.full-width {
    max-width: none;
    width: 100%;
}

.main-content {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    transition: all 0.3s ease;
}

.header {
    background: rgba(192, 222, 229, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(192, 222, 229, 0.4);
    padding: var(--space-lg);
    border-radius: var(--radius-none);
    box-shadow: var(--elevation-2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-lg);
    position: relative;
    z-index: 10;
    transition: var(--transition-normal);
}

.header h1 {
    color: var(--text-primary);
    font-size: var(--text-3xl);
    font-weight: 600;
    letter-spacing: -0.025em;
}

.header-controls {
    display: flex;
    gap: var(--space-sm);
}

.toolbar {
    background: rgba(192, 222, 229, 0.2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(192, 222, 229, 0.3);
    padding: var(--space-md);
    border-radius: var(--radius-none);
    box-shadow: var(--elevation-1);
    margin-bottom: var(--space-lg);
    display: flex;
    gap: var(--space-md);
    align-items: center;
    position: relative;
    z-index: 10;
    transition: var(--transition-normal);
}

.logo-controls {
    display: flex;
    gap: var(--space-sm);
    align-items: center;
}

/* =============================================
   SHARED DROPDOWN STYLES
   ============================================= */

/* Base dropdown container class - shared by all dropdowns */
.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(192, 222, 229, 0.6);
    border-radius: var(--radius-medium);
    box-shadow: 0 8px 32px rgba(0, 59, 70, 0.15), 0 2px 8px rgba(0, 59, 70, 0.1);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: var(--space-md);
    margin-top: var(--space-xs);
    color: var(--text-primary);
    transition: var(--transition-normal);
}

.dropdown:hover {
    background: var(--glass-bg-hover);
}

/* Dark mode for dropdowns */
.dark-mode .dropdown {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

/* Base dropdown option class - shared by all dropdown items */
.dropdown-option {
    cursor: pointer;
    border: 1px solid rgba(192, 222, 229, 0.4);
    border-radius: var(--radius-small);
    padding: var(--space-sm);
    text-align: center;
    transition: var(--transition-fast);
    background: rgba(255, 255, 255, 0.5);
    color: var(--text-primary);
}

.dark-mode .dropdown-option {
    background: rgba(245, 247, 250, 0.08);
    border: 2px solid rgba(245, 247, 250, 0.2);
    color: #F5F7FA;  /* Light text for dark background */
}

.dropdown-option:hover {
    border-color: var(--teal-medium);
    box-shadow: 0 2px 8px rgba(45, 107, 115, 0.2);
    background: rgba(192, 222, 229, 0.3);
    transform: translateY(-1px);
}

.dropdown-option:hover span,
.dropdown-option:hover small {
    color: #0A1A2F;  /* Keep text dark on hover */
}

.dropdown-option.selected,
.dropdown-option.active {
    border-color: var(--teal-medium);
    background: rgba(192, 222, 229, 0.4);
    box-shadow: 0 0 0 2px rgba(45, 107, 115, 0.3);
}

/* Text styles for dropdown options */
.dropdown-option span,
.dropdown-option label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #0A1A2F;
}

.dropdown-option small {
    font-size: 11px;
    opacity: 0.7;
    color: #2A3B52;
}

/* Dark mode text colors */
.dark-mode .dropdown-option span,
.dark-mode .dropdown-option label {
    color: #F5F7FA;
}

.dark-mode .dropdown-option small {
    color: rgba(245, 247, 250, 0.7);
}

/* =============================================
   WELCOME MODAL & ONBOARDING STYLES
   ============================================= */

.welcome-modal {
    z-index: 10000;
}

.welcome-content {
    max-width: 900px;
    width: 90vw;
    max-height: 85vh;
    overflow-y: auto;
    background: var(--light-surface);
    border: 1px solid var(--secondary-bg);
    border-radius: var(--radius-none);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.welcome-header {
    text-align: center;
    padding: 30px 40px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, #003135 0%, #024950 50%, #0FA4AF 100%);
    color: #AFDDE5;
}

.welcome-logo {
    margin-bottom: 20px;
}

.welcome-header h2 {
    font-size: 32px;
    font-weight: 600;
    color: #FFFFFF;
    margin-bottom: 10px;
}

.welcome-subtitle {
    font-size: 16px;
    color: #AFDDE5;
    margin: 0;
}

.welcome-body {
    padding: 0;
    min-height: 400px;
}

.welcome-step {
    display: none;
    padding: 40px;
    animation: fadeIn 0.3s ease-in-out;
}

.welcome-step.active {
    display: block;
}

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

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

.step-icon {
    font-size: 48px;
    color: #964734;
    margin-bottom: 20px;
}

.step-content h3 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.step-content p {
    font-size: 16px;
    color: #7f8c8d;
    margin-bottom: 30px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.template-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.template-option {
    background: rgba(255, 255, 255, 0.7);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-none);
    padding: 24px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;

}

.template-option:hover {
    border-color: #0FA4AF;
    box-shadow: 0 8px 25px rgba(15, 164, 175, 0.25);
    transform: translateY(-4px);
}

.template-option.selected {
    border-color: #0FA4AF;
    background: rgba(15, 164, 175, 0.1);
    box-shadow: 0 0 0 3px rgba(15, 164, 175, 0.2);
}

.template-preview {
    font-size: 40px;
    color: #0FA4AF;
    margin-bottom: 16px;
}

.template-info h4 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.template-info p {
    font-size: 14px;
    color: #7f8c8d;
    margin: 0;
}

.style-preview {
    display: flex;
    gap: 40px;
    align-items: center;
    justify-content: center;
    margin-top: 30px;
    flex-wrap: wrap;
}

.preview-phone {
    background: #333;
    border-radius: 20px;
    padding: 20px 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    position: relative;
}

.phone-screen {
    width: 250px;
    height: 400px;
    background: #E8F5F7;
    border-radius: 18px;
    overflow: hidden;
    position: relative;
}

.menu-preview {
    padding: 20px;
    height: 100%;
    font-family: inherit;
}

.preview-header h4 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
    text-align: center;
}

.preview-section {
    margin-bottom: 20px;
}

.preview-section h5 {
    font-size: 16px;
    font-weight: 600;
    color: #34495e;
    margin-bottom: 10px;
    border-bottom: 1px solid #ecf0f1;
    padding-bottom: 5px;
}

.preview-item {
    display: flex;
    flex-direction: column;
    padding: 8px 0;
    border-bottom: 1px solid #f8f9fa;
}

.preview-item span:first-child {
    color: var(--text-primary);
    font-weight: 500;
}

.preview-item span:last-child {
    color: #964734;
    font-weight: 600;
}

.style-options {
    flex: 1;
    min-width: 300px;
}

.style-option-group {
    margin-bottom: 30px;
}

.style-option-group h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.background-previews,
.color-previews {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.bg-option,
.color-option {
    cursor: pointer;
    text-align: center;
    transition: transform 0.2s ease;
}

.bg-option:hover,
.color-option:hover {
    transform: scale(1.05);
}

.bg-preview {
    width: 60px;
    height: 40px;
    border-radius: var(--radius-small);
    margin-bottom: 5px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: border-color 0.2s ease;
}

.solid-bg {
    background: linear-gradient(45deg, #f8f9fa, #e9ecef) !important;
}

.bg-option.selected .bg-preview {
    border-color: #0FA4AF;
}

.bg-option span,
.color-option span {
    font-size: 12px;
    color: #7f8c8d;
    font-weight: 500;
}

.color-swatches {
    display: flex;
    gap: 2px;
    margin-bottom: 5px;
    justify-content: center;
}

.swatch {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.tip-item {
    display: flex;
    gap: 15px;
    text-align: left;
    padding: 20px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-medium);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.tip-icon {
    font-size: 24px;
    color: #0FA4AF;
    flex-shrink: 0;
    width: 40px;
    text-align: center;
}

.tip-content h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.tip-content p {
    font-size: 14px;
    color: #7f8c8d;
    margin: 0;
    line-height: 1.4;
}

.welcome-footer {
    padding: 20px 40px 30px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.step-indicators {
    display: flex;
    gap: 10px;
}

.step-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(127, 140, 141, 0.3);
    cursor: pointer;
    transition: all 0.2s ease;
}

.step-indicator.active {
    background: #0FA4AF;
    transform: scale(1.2);
}

.welcome-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* =============================================
   EMPTY STATE STYLES
   ============================================= */

.empty-state {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    text-align: center;
    padding: 60px 40px;
}

.empty-state-content {
    max-width: 500px;
}

.empty-state-icon {
    font-size: 72px;
    color: #0FA4AF;
    margin-bottom: 24px;
    opacity: 0.9;
    line-height: 1;
}

.empty-state h2 {
    font-size: 28px;
    font-weight: 600;
    color: #F5F7FA;
    margin-bottom: 12px;
}

.dark-mode .empty-state h2 {
    color: #F5F7FA;
}

.empty-state p {
    font-size: 16px;
    color: rgba(245, 247, 250, 0.8);
    margin-bottom: 30px;
    line-height: 1.5;
}

.empty-state-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.quick-tips {
    padding: 15px 20px;
    background: rgba(255, 76, 41, 0.1);
    border: 1px solid rgba(255, 76, 41, 0.2);
    border-radius: var(--radius-medium);
    margin-top: 30px;
}

.quick-tips p {
    font-size: 14px;
    color: rgba(245, 247, 250, 0.9);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.quick-tips i {
    color: var(--accent-color);
}

/* =============================================
   IMPROVED TOOLBAR STYLES
   ============================================= */

.primary-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.primary-actions .btn {
    position: relative;
}

/* =============================================
   CONTEXTUAL TIPS
   ============================================= */

.contextual-tips {
    position: absolute;
    z-index: 9999;
    background: rgba(30, 40, 55, 0.95);

    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-medium);
    padding: 15px 20px;
    max-width: 300px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    animation: tooltipFadeIn 0.3s ease-out;
    display: none; /* Hide by default, show only when content is added */
}

@keyframes tooltipFadeIn {
    from { 
        opacity: 0; 
        transform: translateY(10px) scale(0.95); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0) scale(1); 
    }
}

.tip-content {
    position: relative;
}

.tip-arrow {
    position: absolute;
    top: -6px;
    left: 20px;
    width: 12px;
    height: 12px;
    background: rgba(30, 40, 55, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-bottom: none;
    border-right: none;
    transform: rotate(45deg);
}

.tip-title {
    font-size: 14px;
    font-weight: 600;
    color: #F5F7FA;
    margin-bottom: 5px;
}

.tip-description {
    font-size: 13px;
    color: rgba(245, 247, 250, 0.8);
    margin: 0;
    line-height: 1.4;
}

.tip-close {
    position: absolute;
    top: -5px;
    right: -5px;
    background: rgba(255, 76, 41, 0.2);
    border: 1px solid rgba(255, 76, 41, 0.3);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #F5F7FA;
    font-size: 10px;
    transition: all 0.2s ease;
}

.tip-close:hover {
    background: rgba(255, 76, 41, 0.4);
    transform: scale(1.1);
}

/* =============================================
   ENHANCED BUTTON STYLES
   ============================================= */

.btn-large {
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 14px;
    min-width: 200px;
    justify-content: center;
}

.btn-large i {
    margin-right: 8px;
}

/* Dark mode adjustments for welcome modal */
.dark-mode .welcome-content {
    background: rgba(30, 40, 55, 0.95);
    border: 1px solid rgba(245, 247, 250, 0.2);
}

.dark-mode .welcome-header h2,
.dark-mode .step-content h3,
.dark-mode .template-info h4,
.dark-mode .tip-content h4,
.dark-mode .style-option-group h4 {
    color: #F5F7FA;
}

.dark-mode .welcome-subtitle {
    color: #AFDDE5;
}

.dark-mode .step-content p,
.dark-mode .template-info p,
.dark-mode .tip-content p,
.dark-mode .bg-option span,
.dark-mode .color-option span {
    color: rgba(245, 247, 250, 0.7);
}

.dark-mode .template-option,
.dark-mode .tip-item {
    background: rgba(245, 247, 250, 0.08);
    border: 1px solid rgba(245, 247, 250, 0.2);
}

.dark-mode .welcome-header {
    background: linear-gradient(135deg, #003135 0%, #024950 50%, #0FA4AF 100%);
    border-color: rgba(245, 247, 250, 0.2);
}

.dark-mode .welcome-footer {
    border-color: rgba(245, 247, 250, 0.2);
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .welcome-content {
        width: 95vw;
        max-height: 90vh;
    }
    
    .welcome-header {
        padding: 20px 20px 15px;
    }
    
    .welcome-step {
        padding: 30px 20px;
    }
    
    .welcome-footer {
        padding: 15px 20px 20px;
        flex-direction: column;
        gap: 20px;
    }
    
    .template-options {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .style-preview {
        flex-direction: column;
        gap: 30px;
    }
    
    .tips-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .empty-state {
        padding: 40px 20px;
    }
    
    .empty-state-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-large {
        min-width: 250px;
    }
}

/* =============================================
   LOADING STATES & MICRO-INTERACTIONS
   ============================================= */

/* Button loading state */
.btn.loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: button-spin 0.8s linear infinite;
}

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

/* Enhanced button micro-interactions */
.btn {
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transition: width 0.6s ease, height 0.6s ease;
    transform: translate(-50%, -50%);
    z-index: 0;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

.btn > * {
    position: relative;
    z-index: 1;
}

/* Success animation */
@keyframes successPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.btn.success {
    animation: successPulse 0.3s ease-out;
}

/* Form input focus enhancements */
input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
textarea:focus,
select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(45, 107, 115, 0.2);
    border-color: var(--teal-medium);
    background: rgba(255, 255, 255, 0.9);
}

/* Loading spinner for content areas */
.loading-spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--accent-color);
    animation: spin 1s ease-in-out infinite;
}

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

.content-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    gap: 10px;
    color: rgba(245, 247, 250, 0.7);
    font-size: 14px;
}

/* Save indicator enhancements */
.change-indicator {
    position: relative;
    overflow: hidden;
}

.change-indicator.saving {
    color: #f39c12;
}

.change-indicator.saved {
    color: var(--success);
    animation: savedPulse 0.5s ease-out;
}

.change-indicator.error {
    color: #e74c3c;
    animation: errorShake 0.5s ease-out;
}

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

@keyframes errorShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-2px); }
    75% { transform: translateX(2px); }
}

/* Enhanced modal transitions */
.modal {

    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    visibility: hidden;
}

.modal.show {
    opacity: 1;
    visibility: visible;
}

.modal.show .modal-content {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.modal-content {
    transform: scale(0.95) translateY(-20px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Progress indicators */
.progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin: 10px 0;
}

.progress-fill {
    height: 100%;
    background: var(--accent-color);
    border-radius: 2px;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: progressShine 2s ease-in-out infinite;
}

@keyframes progressShine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Notification toast system */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10001;
    max-width: 350px;
}

.toast {
    background: rgba(30, 40, 55, 0.95);

    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-medium);
    padding: 16px 20px;
    margin-bottom: 10px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 12px;
}

.toast.show {
    transform: translateX(0);
}

.toast.success {
    border-left: 4px solid var(--success);
}

.toast.error {
    border-left: 4px solid #e74c3c;
}

.toast.info {
    border-left: 4px solid var(--primary-bg-end);
}

.toast.warning {
    border-left: 4px solid #f39c12;
}

.toast-icon {
    font-size: 20px;
    flex-shrink: 0;
    line-height: 1;
}

.toast.success .toast-icon {
    color: var(--success);
}

.toast.error .toast-icon {
    color: #e74c3c;
}

.toast.info .toast-icon {
    color: var(--primary-bg-end);
}

.toast.warning .toast-icon {
    color: #f39c12;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-size: 15px;
    font-weight: 700;
    color: #F5F7FA;
    margin-bottom: 3px;
    letter-spacing: -0.01em;
}

.toast-message {
    font-size: 14px;
    color: rgba(245, 247, 250, 0.85);
    line-height: 1.5;
    font-weight: 400;
}

.toast-close {
    background: none;
    border: none;
    color: rgba(245, 247, 250, 0.6);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.toast-close:hover {
    color: #F5F7FA;
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.1);
    border-radius: 50%;
}

/* Enhanced section and item animations */
.section {
    animation: slideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section.removing {
    animation: slideOut 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes slideOut {
    to {
        opacity: 0;
        transform: translateX(-100%);
        height: 0;
        margin: 0;
        padding: 0;
    }
}

/* Menu item hover enhancements */
.menu-item {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.menu-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.menu-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: linear-gradient(90deg, var(--accent-color), transparent);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-item:hover::before {
    width: 4px;
}

/* Improved focus indicators for accessibility */
.btn:focus,
input:focus,
textarea:focus,
select:focus,
[tabindex]:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(255, 76, 41, 0.2);
}

/* Skip to content link for screen readers */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #000;
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 10002;
    border-radius: 4px;
    transition: top 0.3s ease;
}

.skip-link:focus {
    top: 6px;
}

/* Enhanced visual hierarchy */
.header-left h1 {
    position: relative;
}

.header-left h1::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.header:hover .header-left h1::after {
    width: 100%;
}

/* Menu statistics and insights */
.menu-stats {
    background: rgba(255, 255, 255, 0.1);

    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-medium);
    padding: 16px 20px;
    margin: 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-stats:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.stat-item {
    text-align: center;
    flex: 1;
}

.stat-number {
    font-size: 24px;
    font-weight: 600;
    color: var(--accent-color);
    display: block;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 12px;
    color: rgba(245, 247, 250, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-item:not(:last-child) {
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

/* Enhanced dropdown animations */
.dropdown {
    opacity: 0;
    transform: translateY(-10px) scale(0.95);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.dropdown.show {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* Progressive disclosure animations */
.advanced-controls {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.advanced-controls.hidden {
    opacity: 0.5;
    pointer-events: none;
    filter: grayscale(1);
}

.advanced-controls.revealed {
    opacity: 1;
    pointer-events: auto;
    filter: grayscale(0);
    animation: revealControls 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* =============================================
   ENHANCED MOBILE & TABLET RESPONSIVENESS
   ============================================= */

/* Tablet optimizations */
@media (max-width: 1024px) and (min-width: 769px) {
    .container {
        padding: 16px;
    }
    
    .header {
        padding: 16px 20px;
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .header-controls {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .toolbar {
        flex-wrap: wrap;
        gap: 8px;
        padding: 14px;
    }
    
    .primary-actions {
        flex-wrap: wrap;
    }
    
    /* Improved touch targets for tablets */
    .btn {
        min-height: 44px;
        padding: 12px 20px;
    }
    
    .btn-small {
        min-height: 36px;
        padding: 8px 16px;
    }
    
    /* Better dropdown sizing for tablets */
    .dropdown {
        max-width: 90vw;
    }
    
    .background-dropdown {
        min-width: 400px;
        width: auto;
    }
    
    .template-options {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    }
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .container {
        padding: 12px;
    }
    
    .header {
        padding: 12px 16px;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .header-left {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }
    
    .header-left h1 {
        font-size: 20px;
    }
    
    .header-left h1 img {
        height: 24px;
    }
    
    .current-menu-info {
        flex: 1;
        text-align: center;
        margin: 0 15px;
    }
    
    .current-menu-name {
        font-size: 14px;
    }
    
    .menu-status-row {
        margin-top: 4px;
    }
    
    .menu-status,
    .change-indicator {
        font-size: 11px;
    }
    
    .header-controls {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .save-controls {
        display: flex;
        gap: 8px;
    }
    
    .toolbar {
        flex-direction: column;
        gap: 12px;
        padding: 12px;
    }
    
    .primary-actions {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .toolbar > div:not(.primary-actions) {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        justify-content: center;
    }
    
    .publish-group {
        width: 100%;
        display: flex;
        gap: 8px;
        justify-content: center;
    }
    
    /* Mobile-first button sizing */
    .btn {
        min-height: 48px; /* Better touch targets */
        padding: 12px 18px;
        font-size: 14px;
    }
    
    .btn-small {
        min-height: 40px;
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .btn-large {
        min-height: 52px;
        padding: 16px 24px;
        font-size: 16px;
        min-width: 280px;
    }
    
    /* Mobile menu container adjustments */
    .main-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .menu-container {
        padding: 16px;
        border-radius: var(--radius-small);
    }
    
    .menu-container.with-side-preview {
        margin-right: 0;
        margin-bottom: 20px;
    }
    
    /* Mobile dropdown improvements */
    .dropdown {
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        max-width: 95vw;
        max-height: 80vh;
        overflow-y: auto;
        z-index: 10001;
    }
    
    .background-dropdown {
        width: 90vw;
        min-width: auto;
        padding: 16px;
    }
    
    .background-image-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }
    
    .dropdown-option.background-option {
        max-width: none !important;
    }
    
    .background-option img {
        width: 80px;
        height: 60px;
    }
    
    /* Mobile modal improvements */
    .modal-content {
        margin: 20px;
        width: calc(100vw - 40px);
        max-width: none;
        max-height: calc(100vh - 40px);
        overflow-y: auto;
    }
    
    .modal-header {
        padding: 16px 20px;
    }
    
    .modal-body {
        padding: 16px 20px;
    }
    
    .modal-actions {
        padding: 16px 20px;
        flex-direction: column;
        gap: 12px;
    }
    
    .modal-actions .btn {
        width: 100%;
        justify-content: center;
    }
    
    /* Mobile section improvements */
    .section-header {
        flex-wrap: wrap;
        gap: 10px;
        padding: 12px 16px;
    }
    
    .section-title {
        font-size: 16px;
        flex: 1;
        min-width: 0;
    }
    
    .section-controls {
        flex-shrink: 0;
    }
    
    /* Mobile menu item improvements */
    .menu-item {
        padding: 12px 16px;
        border-radius: var(--radius-small);
    }
    
    .menu-item input {
        font-size: 14px;
        padding: 10px 12px;
    }
    
    .item-controls {
        flex-wrap: wrap;
        gap: 6px;
    }
    
    /* Mobile empty state */
    .empty-state {
        padding: 30px 20px;
        min-height: 300px;
    }
    
    .empty-state-icon {
        font-size: 48px;
        margin-bottom: 16px;
    }
    
    .empty-state h2 {
        font-size: 22px;
        margin-bottom: 10px;
    }
    
    .empty-state p {
        font-size: 14px;
        margin-bottom: 20px;
    }
    
    .empty-state-actions {
        flex-direction: column;
        gap: 12px;
        align-items: center;
    }
    
    .quick-tips {
        margin-top: 20px;
        padding: 12px 16px;
    }
    
    .quick-tips p {
        font-size: 13px;
        flex-direction: column;
        text-align: center;
        gap: 6px;
    }
    
    /* Mobile toast notifications */
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .toast {
        margin-bottom: 8px;
    }
    
    .toast-title {
        font-size: 13px;
    }
    
    .toast-message {
        font-size: 12px;
    }
    
    /* Mobile contextual tips */
    .contextual-tips {
        position: fixed !important;
        bottom: 20px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        top: auto !important;
        max-width: calc(100vw - 40px);
    }
    
    .tip-arrow {
        display: none;
    }
    
    /* Mobile sidebar improvements */
    .sidebar {
        width: 100vw;
        max-width: 320px;
    }
    
    .sidebar-overlay {
        display: block;
    }
    
    /* Mobile preview improvements */
    .side-preview-panel {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        z-index: 10000;
        background: rgba(0, 0, 0, 0.9);
        padding: 20px;
        display: flex;
        flex-direction: column;
    }
    
    .side-preview-controls {
        margin-bottom: 20px;
        color: white;
    }
    
    .smartphone-frame {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Mobile form improvements */
    .form-group {
        margin-bottom: 16px;
    }
    
    .form-group label {
        font-size: 14px;
        margin-bottom: 6px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 12px 16px;
        border-radius: var(--radius-small);
        min-height: 48px;
        width: 100%;
        box-sizing: border-box;
    }
    
    /* Mobile navigation improvements */
    .main-layout {
        margin-left: 0 !important;
        width: 100% !important;
    }
}

/* Small mobile phones */
@media (max-width: 480px) {
    .container {
        padding: 8px;
    }
    
    .header {
        padding: 8px 12px;
    }
    
    .header-left h1 {
        font-size: 16px;
    }
    
    .header-left h1 img {
        height: 20px;
    }
    
    .toolbar {
        padding: 8px;
    }
    
    .btn {
        font-size: 13px;
        padding: 10px 14px;
    }
    
    .btn-large {
        min-width: 240px;
        font-size: 15px;
    }
    
    .menu-container {
        padding: 12px;
    }
    
    .empty-state {
        padding: 20px 12px;
    }
    
    .empty-state h2 {
        font-size: 20px;
    }
    
    .empty-state p {
        font-size: 13px;
    }
    
    .background-image-grid {
        grid-template-columns: 1fr 1fr !important;
    }
    
    .background-option img {
        width: 60px;
        height: 45px;
    }
    
    .template-options {
        grid-template-columns: 1fr;
    }
    
    .style-preview {
        flex-direction: column;
        gap: 20px;
    }
    
    .preview-phone {
        transform: scale(0.9);
    }
}

/* Landscape mobile optimizations */
@media (max-height: 500px) and (orientation: landscape) {
    .welcome-content {
        max-height: 95vh;
    }
    
    .welcome-header {
        padding: 15px 20px 10px;
    }
    
    .welcome-step {
        padding: 20px;
    }
    
    .welcome-footer {
        padding: 10px 20px 15px;
    }
    
    .tips-grid {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }
    
    .template-options {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }
}

/* High DPI / Retina display optimizations */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .loading-spinner {
        border-width: 2px;
    }
    
    .progress-bar {
        height: 3px;
    }
    
    .btn:focus,
    input:focus,
    textarea:focus,
    select:focus {
        outline-width: 1px;
    }
}

/* Dark mode mobile adjustments */
@media (max-width: 768px) {
    .dark-mode .header {
        background: rgba(30, 40, 55, 0.95);
    }
    
    .dark-mode .toolbar {
        background: rgba(30, 40, 55, 0.95);
    }
    
    .dark-mode .menu-container {
        background: rgba(30, 40, 55, 0.9);
    }
    
    .dark-mode .modal-content {
        background: rgba(20, 30, 45, 0.98);
    }
    
    .dark-mode .dropdown {
        background: rgba(20, 30, 45, 0.98);
    }
}

/* Print styles for accessibility */
@media print {
    .header,
    .toolbar,
    .sidebar,
    .contextual-tips,
    .toast-container,
    .modal,
    .welcome-modal {
        display: none !important;
    }
    
    .menu-container {
        background: #E8F5F7 !important;
        border: 1px solid #ccc !important;
        box-shadow: none !important;
        padding: 20px !important;
        margin: 0 !important;
    }
    
    .section {
        break-inside: avoid;
        margin-bottom: 20px;
    }
    
    .menu-item {
        break-inside: avoid;
    }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .loading-spinner {
        animation: none;
        border-top-color: transparent;
    }
    
    .progress-fill::after {
        animation: none;
    }
}

/* =============================================
   SPECIFIC DROPDOWN STYLES
   ============================================= */

.background-controls {
    position: relative;
    display: flex;
    gap: 8px;
    align-items: center;
}

.background-dropdown {
    /* Extends .dropdown base class */
    min-width: 520px;
    width: 520px;
    padding: 20px;
}

.background-image-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr 1fr !important;
    grid-gap: 12px !important;
    margin-top: 12px;
    width: 100% !important;
    max-width: 480px !important;
}

.dropdown-option.background-option {
    /* Override all conflicting styles with higher specificity */
    width: auto !important;
    height: auto !important;
    max-width: 150px !important;
    padding: 8px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    box-sizing: border-box !important;
    border-radius: 8px !important;
    margin: 0 !important;
}

.background-option img {
    width: 100px;
    height: 75px;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.background-option .no-background {
    width: 100px;
    height: 75px;
    border: 2px dashed rgba(10, 26, 47, 0.4);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.dark-mode .background-option .no-background {
    border-color: rgba(245, 247, 250, 0.4);
    background: rgba(245, 247, 250, 0.05);
}

.background-option span {
    font-size: 11px;
    font-weight: 500;
    text-align: center;
    margin-top: 6px;
    line-height: 1.2;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.background-section {
    margin-bottom: 15px;
}

.background-section:last-child {
    margin-bottom: 0;
}

.background-section label {
    font-weight: 600;
    font-size: 12px;
    color: #0A1A2F;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    display: block;
}

.background-image-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 10px;
}

.background-option {
    /* Extends .dropdown-option base class */
    padding: 8px;
}

/* Hover state handled by .dropdown-option:hover */

/* Selected state handled by .dropdown-option.selected */

.background-option img {
    width: 100%;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 4px;
}

.background-option .no-background {
    width: 100%;
    height: 60px;
    border: 2px dashed #ccc;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
    color: #999;
    font-size: 24px;
}

.background-option span {
    font-size: 11px;
    color: #0A1A2F;
    display: block;
    font-weight: 500;
}

/* Recent Backgrounds Grid */
.recent-backgrounds-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 8px;
}

.recent-background-option {
    position: relative;
    aspect-ratio: 3/4;
    border: 2px solid #ddd;
    border-radius: var(--radius-small);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #f5f5f5;
}

.recent-background-option:hover {
    border-color: var(--primary-bg-end);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.recent-background-option.selected {
    border-color: var(--primary-bg-end);
    background: rgba(52, 152, 219, 0.1);
    box-shadow: 0 0 0 1px rgba(52, 152, 219, 0.4);
}

.recent-background-option img {
    width: 100%;
    height: 80%;
    object-fit: cover;
}

.recent-background-option .filename {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 4px 6px;
    font-size: 10px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Dark mode styles for recent backgrounds */
.dark-mode .recent-background-option {
    border-color: #555;
    background: #2a2a2a;
}

.dark-mode .recent-background-option:hover {
    border-color: var(--primary-bg-end);
}

.dark-mode .recent-background-option.selected {
    border-color: var(--primary-bg-end);
    background: #3a3a3a;
    box-shadow: 0 0 0 1px rgba(52, 152, 219, 0.4);
}

/* Custom Upload Styles */
.custom-upload-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

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

.upload-info small {
    color: #666;
    font-size: 10px;
}

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

.upload-filename {
    font-size: 11px;
    color: #666;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.upload-preview {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #f9f9f9;
}

.upload-preview img {
    max-width: 100px;
    max-height: 60px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.btn-small {
    font-size: 11px;
    padding: 4px 8px;
}

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

.btn-success:hover {
    background-color: #218838;
}

.color-picker-group {
    display: flex;
    gap: 8px;
    align-items: center;
}

#background-color-picker {
    width: 50px;
    height: 35px;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 2px;
    cursor: pointer;
}

.btn {
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--surface-medium);
    border-radius: var(--radius-medium);
    cursor: pointer;
    font-size: var(--text-sm);
    font-weight: var(--font-weight-medium);
    transition: var(--transition-fast);
    display: inline-flex;
    background: var(--light-surface);
    position: relative;
    overflow: hidden;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    text-decoration: none;
    color: var(--text-primary);
    min-height: 40px;
    white-space: nowrap;
    box-shadow: var(--elevation-1);
}

/* Button base interactions */
.btn:hover {
    background: var(--surface-light);
    border-color: var(--accent-color);
    box-shadow: var(--elevation-2);
    transform: translateY(-1px);
}

.btn:focus {
    outline: none;
    box-shadow: var(--focus-ring);
}

.btn:active {
    transform: translateY(0);
    box-shadow: var(--elevation-1);
}

/* Button Hierarchy - Teal Palette */
.btn-primary {
    background: var(--teal-medium);
    color: white;
    border: 1px solid var(--teal-medium);
    box-shadow: var(--elevation-1);
}

.btn-primary:hover {
    background: var(--teal-dark);
    border-color: var(--teal-dark);
    box-shadow: var(--elevation-2);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--teal-light);
    color: var(--teal-very-dark);
    border: 1px solid var(--teal-light);
}

.btn-secondary:hover {
    background: var(--teal-medium);
    color: white;
    border-color: var(--teal-medium);
}

.btn-success {
    background: var(--teal-medium);
    color: white;
    border: 1px solid var(--teal-medium);
}

.btn-success:hover {
    background: var(--teal-dark);
    border-color: var(--teal-dark);
}

.btn-success:disabled {
    background: var(--neutral-medium);
    color: var(--text-tertiary);
    cursor: not-allowed;
    border-color: var(--neutral-medium);
}


.btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-danger {
    background: var(--error);
    color: white;
    border: 1px solid var(--error);
}

.btn-danger:hover {
    background: #7a3729;
    border-color: #7a3729;
}

/* Additional Button Variants for Teal System */
.btn-outline {
    background: transparent;
    color: var(--teal-medium);
    border: 2px solid var(--teal-medium);
}

.btn-outline:hover {
    background: var(--teal-medium);
    color: white;
}

.btn-ghost {
    background: transparent;
    color: var(--teal-dark);
    border: 1px solid transparent;
}

.btn-ghost:hover {
    background: var(--teal-mist);
    border-color: var(--teal-light);
}

.btn-accent {
    background: linear-gradient(135deg, var(--teal-light), var(--teal-medium));
    color: var(--teal-very-dark);
    border: 1px solid var(--teal-light);
}

.btn-accent:hover {
    background: linear-gradient(135deg, var(--teal-medium), var(--teal-dark));
    color: white;
    border-color: var(--teal-medium);
}

.menu-container {
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(192, 222, 229, 0.5);
    border-radius: var(--radius-medium);
    box-shadow: 0 8px 32px 0 rgba(0, 59, 70, 0.08), inset 0 0 0 1px rgba(192, 222, 229, 0.2);
    min-height: 400px;
    padding: 20px;
    flex: 1;
    transition: all 0.3s ease;
    width: 100%;
}

.menu-container.with-side-preview {
    margin-right: 440px;
    width: auto;
}

.main-content.no-preview {
    justify-content: center;
}

.main-content.no-preview .menu-container {
    max-width: 1200px;
    width: 100%;
}

.side-preview-panel {
    width: 400px;
    background: #E8F5F7;
    border-left: 1px solid #e8e9ea;
    box-shadow: -2px 0 10px rgba(0,0,0,0.05);
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    opacity: 1;
    transform: translateX(0);
    z-index: 100;
    display: flex;
    flex-direction: column;
}

.side-preview-panel.hidden {
    opacity: 0;
    transform: translateX(100%);
    pointer-events: none;
}

.side-preview-controls {
    padding: 15px 20px;
    display: flex;
    gap: 10px;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    border-bottom: 1px solid #e8e9ea;
}

.side-preview-controls h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.side-preview-controls div {
    display: flex;
    gap: 8px;
}

.side-preview-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 20px;
    background: transparent;
    position: relative;
}

.smartphone-frame {
    width: 300px;
    height: 600px;
    background: linear-gradient(145deg, #2c3e50, #34495e);
    border-radius: 25px;
    padding: 12px;
    position: relative;
    box-shadow:
        0 4px 20px rgba(0,0,0,0.15),
        inset 0 1px 2px rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.smartphone-screen {
    width: 100%;
    height: 100%;
    background: #000;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    transition: all 0.3s ease;
}

.smartphone-screen.refreshing {
    animation: screenRefresh 0.6s ease-in-out;
}

@keyframes screenRefresh {
    0% { 
        opacity: 1; 
        transform: scale(1);
    }
    25% { 
        opacity: 0.3; 
        transform: scale(0.98);
    }
    50% { 
        opacity: 0.1; 
        transform: scale(0.96);
    }
    75% { 
        opacity: 0.5; 
        transform: scale(0.98);
    }
    100% { 
        opacity: 1; 
        transform: scale(1);
    }
}

.side-preview-panel .smartphone-notch {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 16px;
    background: #000;
    border-radius: 0 0 10px 10px;
    z-index: 10;
}

.side-preview-panel .smartphone-content {
    width: 100%;
    height: 100%;
    background: #E8F5F7;
    overflow-y: auto;
    overflow-x: hidden;
    border-radius: 18px;
    position: relative;
}

.side-preview-panel .preview-content {
    padding: 15px 15px 80px 15px;
    min-height: 100%;
    background: transparent;
    font-size: 11px;
    line-height: 1.4;
}

.side-preview-panel .preview-menu-container {
    display: flex !important;
    flex-direction: column;
    gap: 20px;
}

#preview-modal .preview-menu-container {
    display: flex !important;
    flex-direction: column;
    gap: 25px;
    max-width: 100%;
    margin: 0;
}

.side-preview-panel .preview-menu-title {
    font-size: 18px;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.side-preview-panel .preview-menu-subtitle {
    font-size: 10px;
    margin-bottom: 15px;
}

.side-preview-panel .preview-section h2 {
    font-size: 14px;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 2px solid var(--primary-bg-end);
}

.side-preview-panel .preview-section-description {
    font-size: 11px;
    color: var(--text-muted, #666);
    text-align: center;
    margin: -5px 0 8px 0;
    line-height: 1.4;
    font-style: italic;
}

.side-preview-panel .preview-item {
    display: flex;
    flex-direction: column;
    padding: 8px 0;
    border-bottom: 1px dotted #d5d6d7;
}

.side-preview-panel .preview-item-title {
    font-size: 16px;
    margin-bottom: 4px;
    display: flex !important;
    color: var(--primary-text-color, var(--text-primary));
    justify-content: space-between !important;
    align-items: baseline;
    width: 100% !important;
    gap: 10px; /* Add space between text and price */
}

.side-preview-panel .preview-title-text {
    font-weight: 700; /* Bold for prominent */
    flex: 1 !important;
    color: var(--primary-text-color, var(--text-primary));
}

.side-preview-panel .preview-title-price {
    color: var(--accent-color, var(--success));
    font-weight: 700;
    text-align: right !important;
    flex-shrink: 0 !important;
    justify-self: end !important;
    min-width: fit-content !important;
    white-space: nowrap !important; /* Prevent price from wrapping */
}

.side-preview-panel .preview-data-cell.preview-price-cell {
    text-align: right !important;
    color: var(--accent-color, var(--success));
    font-weight: 600;
    justify-self: end !important;
    margin-left: auto;
    grid-column: -1; /* Always place in last column */
}

.side-preview-panel .preview-column-header.preview-price-header {
    text-align: right !important;
    justify-self: end !important;
    grid-column: -1; /* Always place in last column */
}

.side-preview-panel .preview-item-data {
    font-size: 10px;
    gap: 8px;
}

/* Collapsible Navigation Bar - Fixed to Phone Screen */
.preview-navigation {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 30;
    pointer-events: none;
}

/* Modal preview navigation positioning (inside phone frame) */
#preview-modal .preview-navigation {
    bottom: 60px;
    left: 25px;
    right: 25px;
}

#preview-modal .nav-tab {
    bottom: 20px;
}

#preview-modal .nav-dock-container {
    padding: 0 15px;
}

/* Side preview navigation adjustments */
.side-preview-panel .preview-navigation {
    bottom: 10px;
    left: 10px;
    right: 10px;
}

/* Fixed-width phone background optimization */
#preview-modal #preview-content {
    width: 345px !important;
    height: 782px !important;
    background-attachment: scroll !important;
    background-size: contain !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    overflow-y: auto !important;
    padding: 20px !important;
    box-sizing: border-box !important;
    /* Hide scrollbar while keeping scroll functionality */
    scrollbar-width: none !important; /* Firefox */
    -ms-overflow-style: none !important; /* IE and Edge */
}

#preview-modal #preview-content::-webkit-scrollbar {
    display: none !important; /* Chrome, Safari, and Opera */
}

#preview-modal .smartphone-content {
    width: 345px !important;
    height: 782px !important;
    background-size: contain !important; /* Scale entire image to fit phone screen */
    background-position: top center !important;
    background-repeat: no-repeat !important;
    background-attachment: local !important; /* Scroll with content like mobile */
    overflow-y: auto !important;
    /* Hide scrollbar while keeping scroll functionality */
    scrollbar-width: none !important; /* Firefox */
    -ms-overflow-style: none !important; /* IE and Edge */
}

#preview-modal .smartphone-content::-webkit-scrollbar {
    display: none !important; /* Chrome, Safari, and Opera */
}

/* Remove background from other elements in modal */
#preview-modal .smartphone-content,
#preview-modal .preview-menu-container {
    background-image: none !important;
}

#preview-modal #preview-content {
    width: 345px !important;
    min-height: 782px !important;
    background-size: contain !important; /* Scale entire image to fit phone screen */
    background-position: top center !important;
    background-repeat: no-repeat !important;
    background-attachment: local !important; /* Scroll with content like mobile */
}

.side-preview-panel .smartphone-content {
    background-attachment: scroll !important;
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
}

.nav-tab {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    background: transparent;
    backdrop-filter: none;
    color: white;
    padding: 8px 16px;
    border-radius: 20px 20px 8px 8px;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: none;
    pointer-events: all;
    z-index: 25;
}

.nav-tab:hover {
    background: transparent;
    transform: translateX(-50%) translateY(-2px);
    box-shadow: none;
}

.nav-dock-container {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: transparent;
    backdrop-filter: none;
    border-top: none;
    padding: 12px 12px 40px;
    transform: translateY(100%);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    pointer-events: all;
}

.nav-dock-container.expanded {
    transform: translateY(0);
}

.nav-dock {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 6px;
    padding: 8px 0;
    flex-wrap: wrap;
}

.nav-dock-item {
    min-width: 60px;
    height: 40px;
    padding: 6px 12px;
    background: transparent;
    border-radius: var(--radius-none);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
    box-shadow: none;
    text-align: center;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-dock-item:hover {
    transform: scale(1.2) translateY(-6px);
    background: transparent;
    color: white;
    box-shadow: none;
}

.nav-dock-item.active {
    transform: scale(1.1);
    background: transparent;
    color: white;
    box-shadow: none;
}

/* Elegant Scrollable Bar Style */
.nav-scrollbar {
    display: block;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    padding: 8px 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.nav-scrollbar::-webkit-scrollbar {
    display: none;
}

.nav-scrollbar-content {
    display: inline-flex;
    gap: 8px;
    padding: 0 4px;
}

.nav-scrollbar-item {
    background: linear-gradient(145deg, #f8f9fa, #e9ecef);
    border: 1px solid #dee2e6;
    border-radius: var(--radius-none);
    padding: 8px 16px;
    font-size: 10px;
    font-weight: 500;
    color: #495057;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.nav-scrollbar-item:hover {
    background: linear-gradient(145deg, var(--primary-bg-end), #2980b9);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.nav-scrollbar-item.active {
    background: linear-gradient(145deg, var(--primary-bg-end), #2980b9);
    color: white;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.2);
}

/* Smooth scroll behavior for sections */
.side-preview-panel .preview-section {
    scroll-margin-top: 20px;
}

/* Publish Modal Styles */
#publish-modal .modal-content {
    max-width: 600px;
}

.publish-step {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e9ecef;
}

.publish-step:last-of-type {
    border-bottom: none;
}

.url-input-group {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 5px;
}

.url-prefix {
    background: #f8f9fa;
    padding: 10px 12px;
    color: #6c757d;
    font-weight: 500;
    border-right: 1px solid #ddd;
    white-space: nowrap;
}

.url-input-group input {
    border: none;
    padding: 10px 12px;
    flex: 1;
    font-size: 14px;
    margin-bottom: 0;
}

.url-input-group input:focus {
    outline: none;
    box-shadow: none;
}

.url-input-group:focus-within {
    border-color: var(--primary-bg-end);
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.1);
}

.validation-message {
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 13px;
    margin-top: 5px;
    display: none;
}

.validation-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.validation-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

.validation-message.checking {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
    display: block;
}

.publish-preview {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
}

.publish-preview h3 {
    margin: 0 0 10px 0;
    color: var(--text-primary);
    font-size: 16px;
}

.preview-url {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    background: #E8F5F7;
    border-radius: 4px;
    border: 1px solid #dee2e6;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: #495057;
}

.preview-url i {
    color: var(--primary-bg-end);
}

/* Published Menu Styles */
.published-menu-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    padding-bottom: 100px;
    min-height: 100vh;
    /* Allow background to be applied via JavaScript */
}

/* Ensure alignment consistency in published menus */
.published-menu-container .preview-data-cell,
.published-menu-container .preview-column-header {
    text-align: left !important; /* Default left alignment for published menus */
}

/* Maintain price column right alignment in published menus */
.published-menu-container .preview-data-cell.preview-price-cell,
.published-menu-container .preview-data-cell[data-column*="price" i],
.published-menu-container .preview-data-cell[data-column*="cost" i],
.published-menu-container .preview-data-cell[data-column*="$" i] {
    text-align: right !important;
}

.published-menu-container .preview-column-header.preview-price-header,
.published-menu-container .preview-column-header[data-column*="price" i],
.published-menu-container .preview-column-header[data-column*="cost" i],
.published-menu-container .preview-column-header[data-column*="$" i] {
    text-align: right !important;
}

.published-menu-container .preview-menu-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid #ecf0f1;
}

.published-menu-container .preview-menu-container {
    display: flex !important;
    flex-direction: column !important;
    gap: 40px !important;
    max-width: 800px !important;
    margin: 0 auto !important;
    grid-template-columns: none !important;
}

.published-menu-container .preview-section {
    scroll-margin-top: 20px;
}

@media (max-width: 768px) {
    .published-menu-container {
        padding: 15px;
        padding-bottom: 100px;
    }
    
    .published-menu-container .preview-menu-container {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    /* Mobile background optimization */
    .published-menu-container,
    .smartphone-content,
    .preview-content,
    #preview-content {
        background-size: cover !important;
        background-position: center center !important;
        background-repeat: no-repeat !important;
        background-attachment: scroll !important;
    }
    
    /* Ensure background adapts to mobile viewport */
    .published-menu-container[style*="background-image"] {
        min-height: 100vh;
        background-size: cover !important;
    }
}

.smartphone-content {
    width: 100%;
    height: 100%;
    background: #E8F5F7;
    overflow-y: auto;
    overflow-x: hidden;
    border-radius: var(--radius-none);
    position: relative;
}

.menu-section {
    border: 1px solid rgba(192, 222, 229, 0.4);
    border-radius: var(--radius-medium);
    margin-bottom: 22px; /* Reduced by 30% from 32px */
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 4px 16px rgba(0, 59, 70, 0.05), inset 0 0 0 1px rgba(192, 222, 229, 0.1);
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

/* Menu section type variations */
.menu-section[data-type="food"],
.menu-section[data-type="appetizers"],
.menu-section[data-type="entrees"],
.menu-section[data-type="desserts"] {
    background: var(--bg-warm);
}

.menu-section[data-type="drinks"],
.menu-section[data-type="wine"],
.menu-section[data-type="cocktails"],
.menu-section[data-type="beer"] {
    background: var(--bg-cool);
}

.menu-section[data-type="specials"],
.menu-section[data-type="seasonal"] {
    background: var(--bg-sage);
}

.menu-section[data-type="coffee"],
.menu-section[data-type="tea"] {
    background: var(--bg-cream);
}

/* Fallback color rotation for sections without specific types */
.menu-section:nth-child(4n+1):not([data-type]) {
    background: var(--bg-warm);
}

.menu-section:nth-child(4n+2):not([data-type]) {
    background: var(--bg-cool);
}

.menu-section:nth-child(4n+3):not([data-type]) {
    background: var(--bg-sage);
}

.menu-section:nth-child(4n+4):not([data-type]) {
    background: var(--bg-cream);
}

/* Remove glassmorphism overlay for sharp edge design */

.menu-section:hover {
    transform: translateY(-1px);
    box-shadow: var(--elevation-3);
    border-color: var(--accent-color);
}

.menu-section.dragging {
    opacity: 0.75;
    transform: rotate(2deg);
}

.section-header {
    background: linear-gradient(135deg, var(--teal-medium), var(--teal-dark));
    color: #FFFFFF;
    padding: 20px 24px;
    border-radius: var(--radius-medium) var(--radius-medium) 0 0;
    border-bottom: 1px solid var(--border-soft);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: move;
    font-weight: var(--font-weight-semibold);
    transition: var(--transition-fast);
    min-height: 60px;
    box-shadow: 0 2px 8px rgba(0, 59, 70, 0.15);
}

.section-header:hover {
    background: linear-gradient(135deg, var(--teal-dark), var(--teal-very-dark));
    box-shadow: 0 4px 12px rgba(0, 59, 70, 0.25);
}

/* Dynamic section header coloring based on section type */
.section-header[data-type="appetizers"],
.section-header[data-type="starters"] {
    background: linear-gradient(135deg, var(--teal-light), var(--teal-medium));
    color: var(--teal-very-dark);
}

.section-header[data-type="appetizers"]:hover,
.section-header[data-type="starters"]:hover {
    background: linear-gradient(135deg, var(--teal-medium), var(--teal-dark));
    color: #FFFFFF;
}

.section-header[data-type="entrees"],
.section-header[data-type="mains"],
.section-header[data-type="main-courses"] {
    background: linear-gradient(135deg, var(--teal-medium), var(--teal-dark));
    color: #FFFFFF;
}

.section-header[data-type="entrees"]:hover,
.section-header[data-type="mains"]:hover,
.section-header[data-type="main-courses"]:hover {
    background: linear-gradient(135deg, var(--teal-dark), var(--teal-very-dark));
}

.section-header[data-type="desserts"],
.section-header[data-type="sweets"] {
    background: linear-gradient(135deg, var(--teal-dark), var(--teal-very-dark));
    color: var(--teal-light);
}

.section-header[data-type="desserts"]:hover,
.section-header[data-type="sweets"]:hover {
    background: linear-gradient(135deg, var(--teal-very-dark), #001A1F);
    color: var(--teal-light);
}

.section-header[data-type="beverages"],
.section-header[data-type="drinks"],
.section-header[data-type="cocktails"],
.section-header[data-type="wine"],
.section-header[data-type="beer"] {
    background: linear-gradient(135deg, var(--teal-light), var(--teal-medium));
    color: var(--teal-very-dark);
}

.section-header[data-type="beverages"]:hover,
.section-header[data-type="drinks"]:hover,
.section-header[data-type="cocktails"]:hover,
.section-header[data-type="wine"]:hover,
.section-header[data-type="beer"]:hover {
    background: linear-gradient(135deg, var(--teal-medium), var(--teal-dark));
    color: #FFFFFF;
}

.section-header[data-type="specials"],
.section-header[data-type="featured"] {
    background: linear-gradient(135deg, var(--teal-very-dark), var(--teal-dark));
    color: var(--teal-light);
    border: 2px solid var(--teal-medium);
}

.section-header[data-type="specials"]:hover,
.section-header[data-type="featured"]:hover {
    background: linear-gradient(135deg, #001A1F, var(--teal-very-dark));
    color: var(--teal-light);
    border-color: var(--teal-light);
}

.section-title {
    font-size: 20px;
    font-weight: 700;
    color: #FFFFFF;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.section-description {
    font-size: 15px;
    color: #FFFFFF;
    opacity: 0.95;
    margin-top: 6px;
    line-height: 1.5;
    font-weight: 400;
    letter-spacing: 0.01em;
}

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

.section-controls button {
    background: var(--interactive-bg);
    border: 1px solid var(--border-soft);
    color: var(--text-primary);
    padding: 10px 16px;
    border-radius: var(--radius-small);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 600;
    min-height: 36px;
    display: flex;
    align-items: center;
    gap: 6px;
    letter-spacing: 0.02em;
}

/* Make icons in section control buttons much darker for better visibility */
.section-controls button i,
.section-controls button .fas {
    color: var(--text-primary) !important;
    opacity: 1 !important;
}

.section-controls button:hover {
    background: var(--interactive-hover);
    transform: translateY(-2px);
    box-shadow: var(--elevation-2);
    border-color: var(--border-medium);
}

.section-controls button:hover i,
.section-controls button:hover .fas {
    color: #1a1a1a !important;  /* Even darker on hover */
}

.section-content {
    padding: 28px;
    background: rgba(255, 255, 255, 0.12);

    -webkit-/* backdrop-filter removed for performance */
    border-radius: 0 0 16px 16px;
    position: relative;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow: hidden;
}

/* Section collapse/expand functionality */
.section-title-area {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    transition: all 0.2s ease;
}

.section-title-area:hover .section-title {
    transform: translateX(2px);
    transition: transform 0.2s ease;
}

.section-collapse-toggle {
    background: none;
    border: none;
    color: #FFFFFF;
    cursor: pointer;
    padding: var(--space-xs);
    border-radius: var(--radius-small);
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
}

.section-collapse-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #FFFFFF;
    transform: scale(1.05);
}

.section-collapse-toggle i {
    transition: transform var(--transition-fast);
    font-size: 16px;
    line-height: 1;
    font-weight: 600;
}

.menu-section.collapsed .section-content {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    opacity: 0;
}

/* Expand/Collapse All buttons styling */
.section-collapse-controls {
    display: flex;
    gap: var(--space-xs);
    align-items: center;
}

.section-collapse-controls .btn-small {
    padding: 6px 12px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.column-headers {
    display: grid;
    gap: 12px;
    margin-bottom: 20px;
    margin-top: 8px; /* Add small space after section header */
    padding: 18px;
    background: rgba(255, 255, 255, 0.25);

    -webkit-/* backdrop-filter removed for performance */
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-small);
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.column-header {
    font-weight: 700;
    color: var(--text-primary);
    padding: 12px 16px;
    background: #E8F5F7;
    border-radius: 6px;
    border: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
    min-height: 44px;
    font-size: 16px;
    letter-spacing: -0.01em;
    text-transform: uppercase;
    font-size: 13px;
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

.column-header:hover {
    border-color: var(--primary-bg-end);
    box-shadow: 0 2px 4px rgba(15, 164, 175, 0.15);
    background: linear-gradient(135deg, #ffffff 0%, #f8fdff 100%);
}

.column-name {
    flex: 1;
    cursor: pointer;
    padding: 2px 4px;
    white-space: nowrap;
    min-width: 0;
    max-width: calc(100% - 76px);
    overflow: hidden;
    text-overflow: ellipsis;
    border-radius: 3px;
    transition: background-color 0.2s ease;
}

.column-name:hover {
    background-color: rgba(15, 164, 175, 0.12);
    border-radius: 4px;
    transform: translateX(2px);
    transition: all 0.2s ease;
}

.column-controls {
    display: flex;
    gap: 4px;
    align-items: center;
    flex-shrink: 0;
    margin-left: 8px;
    min-width: 68px;
    width: 68px;
    position: relative;
    z-index: 1;
    justify-content: flex-end;
}

.column-controls i {
    padding: 4px;
    border-radius: 3px;
    cursor: pointer;
    color: #7f8c8d;
    transition: all 0.2s ease;
    font-size: 12px;
    min-width: 24px;
    min-height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.column-controls i:hover {
    color: var(--text-primary);
    background-color: rgba(0,0,0,0.08);
    transform: scale(1.1);
}

.column-edit:hover {
    color: var(--primary-bg-end);
}

.column-delete:hover {
    color: #e74c3c;
}

.add-column-header {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Add Column button in column header area (old style - may be removed) */
.add-column-header .add-column-btn {
    padding: 10px 14px;
    background: #E8F5F7;
    border: 2px dashed #bdc3c7;
    color: #5a6c7d;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    align-self: center;
}

.add-column-header .add-column-btn:hover {
    background: linear-gradient(135deg, #f0f8ff 0%, #e6f5f7 100%);
    border-color: #0FA4AF;
    color: #024950;
    border-style: solid;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(15, 164, 175, 0.1);
}

/* Add Column button in section header - inherits from section-controls button styles */
.section-controls .add-column-btn {
    /* Button inherits base styles from .section-controls button */
    /* No additional styles needed as it matches edit/delete buttons */
}

.column-header.dragging {
    opacity: 0.5;
}

.menu-items {
    display: grid;
    gap: 16px;
}

.menu-item {
    display: grid;
    gap: 12px;
    padding: 20px 60px 20px 50px; /* Extra left padding for drag handle, extra right padding for vertical buttons */
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-radius: 10px;
    border: 1px solid rgba(192, 222, 229, 0.3);
    transition: all 0.2s ease;
    margin-bottom: 14px;
    position: relative;
    box-shadow:
        0 2px 12px rgba(0, 59, 70, 0.06),
        0 1px 4px rgba(0, 59, 70, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.menu-item:hover {
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.28);
    transform: translateX(2px);
    box-shadow:
        0 3px 16px rgba(0, 0, 0, 0.12),
        0 1px 6px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* Menu Item Drag Handle */
.menu-item-drag-handle {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    background: linear-gradient(135deg,
        rgba(15, 164, 175, 0.08) 0%,
        rgba(2, 73, 80, 0.12) 100%);
    border-right: 1px solid rgba(15, 164, 175, 0.2);
    border-radius: 10px 0 0 10px;
    transition: all 0.2s ease;
    color: rgba(2, 73, 80, 0.5);
    font-size: 16px;
    user-select: none;
    z-index: 10; /* Ensure drag handle appears above row backgrounds */
    /* Textured pattern using repeating gradient */
    background-image:
        repeating-linear-gradient(
            0deg,
            rgba(15, 164, 175, 0.1) 0px,
            transparent 1px,
            transparent 4px,
            rgba(15, 164, 175, 0.1) 5px
        ),
        linear-gradient(135deg,
            rgba(15, 164, 175, 0.08) 0%,
            rgba(2, 73, 80, 0.12) 100%);
}

.menu-item-drag-handle:hover {
    background: linear-gradient(135deg,
        rgba(15, 164, 175, 0.15) 0%,
        rgba(2, 73, 80, 0.2) 100%);
    background-image:
        repeating-linear-gradient(
            0deg,
            rgba(15, 164, 175, 0.15) 0px,
            transparent 1px,
            transparent 4px,
            rgba(15, 164, 175, 0.15) 5px
        ),
        linear-gradient(135deg,
            rgba(15, 164, 175, 0.15) 0%,
            rgba(2, 73, 80, 0.2) 100%);
    border-right-color: rgba(15, 164, 175, 0.4);
    color: rgba(2, 73, 80, 0.8);
    cursor: grab;
}

.menu-item-drag-handle:active {
    cursor: grabbing;
    background: linear-gradient(135deg,
        rgba(15, 164, 175, 0.2) 0%,
        rgba(2, 73, 80, 0.25) 100%);
    background-image:
        repeating-linear-gradient(
            0deg,
            rgba(15, 164, 175, 0.2) 0px,
            transparent 1px,
            transparent 4px,
            rgba(15, 164, 175, 0.2) 5px
        ),
        linear-gradient(135deg,
            rgba(15, 164, 175, 0.2) 0%,
            rgba(2, 73, 80, 0.25) 100%);
    color: rgba(2, 73, 80, 1);
}

.menu-item.sortable-ghost .menu-item-drag-handle {
    opacity: 0.5;
}

.menu-item.sortable-chosen .menu-item-drag-handle {
    background: linear-gradient(135deg,
        rgba(15, 164, 175, 0.25) 0%,
        rgba(2, 73, 80, 0.3) 100%);
    color: rgba(2, 73, 80, 1);
}

/* Visible textured drag handle for two-row layouts */
.menu-item.two-row .menu-item-drag-handle {
    background: linear-gradient(135deg,
        rgba(175, 221, 229, 0.15) 0%,
        rgba(15, 164, 175, 0.12) 100%);
    background-image:
        repeating-linear-gradient(
            90deg,
            rgba(15, 164, 175, 0.15) 0px,
            transparent 1px,
            transparent 3px,
            rgba(15, 164, 175, 0.15) 4px
        ),
        repeating-linear-gradient(
            0deg,
            rgba(15, 164, 175, 0.12) 0px,
            transparent 1px,
            transparent 3px,
            rgba(15, 164, 175, 0.12) 4px
        ),
        linear-gradient(135deg,
            rgba(175, 221, 229, 0.15) 0%,
            rgba(15, 164, 175, 0.12) 100%);
    border-right: 1px solid rgba(15, 164, 175, 0.25);
    color: rgba(2, 73, 80, 0.7);
    z-index: 15; /* Above row backgrounds */
}

.menu-item.two-row .menu-item-drag-handle:hover {
    background: linear-gradient(135deg,
        rgba(175, 221, 229, 0.25) 0%,
        rgba(15, 164, 175, 0.2) 100%);
    background-image:
        repeating-linear-gradient(
            90deg,
            rgba(15, 164, 175, 0.2) 0px,
            transparent 1px,
            transparent 3px,
            rgba(15, 164, 175, 0.2) 4px
        ),
        repeating-linear-gradient(
            0deg,
            rgba(15, 164, 175, 0.18) 0px,
            transparent 1px,
            transparent 3px,
            rgba(15, 164, 175, 0.18) 4px
        ),
        linear-gradient(135deg,
            rgba(175, 221, 229, 0.25) 0%,
            rgba(15, 164, 175, 0.2) 100%);
    border-right-color: rgba(15, 164, 175, 0.4);
    color: rgba(2, 73, 80, 1);
}

.menu-item.two-row .menu-item-drag-handle:active {
    background: linear-gradient(135deg,
        rgba(175, 221, 229, 0.35) 0%,
        rgba(15, 164, 175, 0.28) 100%);
    background-image:
        repeating-linear-gradient(
            90deg,
            rgba(15, 164, 175, 0.25) 0px,
            transparent 1px,
            transparent 3px,
            rgba(15, 164, 175, 0.25) 4px
        ),
        repeating-linear-gradient(
            0deg,
            rgba(15, 164, 175, 0.22) 0px,
            transparent 1px,
            transparent 3px,
            rgba(15, 164, 175, 0.22) 4px
        ),
        linear-gradient(135deg,
            rgba(175, 221, 229, 0.35) 0%,
            rgba(15, 164, 175, 0.28) 100%);
    border-right-color: rgba(15, 164, 175, 0.5);
    color: rgba(2, 73, 80, 1);
}

.menu-item input {
    padding: 12px 14px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: var(--radius-small);
    font-size: 14px;
    background: rgba(255, 255, 255, 0.85);

    -webkit-/* backdrop-filter removed for performance */
    transition: all 0.2s ease;
    color: #1a202c;
    font-weight: 400;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
    min-height: 42px;
}

.menu-item input:focus {
    outline: none;
    border-color: #0FA4AF;
    background: rgba(255, 255, 255, 0.95);
    box-shadow:
        0 0 0 3px rgba(15, 164, 175, 0.15),
        inset 0 1px 3px rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
}

.menu-item input:hover:not(:focus) {
    border-color: rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.06);
}

.add-item-btn {
    margin-top: 24px;
    width: 100%;
    padding: 14px;
    background: #f8f9fa;
    border: 2px dashed #bdc3c7;
    color: #5a6c7d;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
}

.add-item-btn:hover {
    background: linear-gradient(135deg, #f0f8ff 0%, #e6f5f7 100%);
    border-color: #0FA4AF;
    color: #024950;
    border-style: solid;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(15, 164, 175, 0.1);
}

.modal {
    display: none;
    position: fixed;
    z-index: 11000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    margin: 5% auto;
    padding: 0;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-large);
    width: 95%;
    max-width: 1400px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--glass-shadow);
    transition: var(--transition-normal);
}

/* Enhanced Auth Modal Styling */
.modal-content.auth-modal {
    max-width: 480px;
    margin: 8% auto;
    padding: var(--space-2xl);
    border-radius: var(--radius-large);
    box-shadow: var(--elevation-3);
}

#section-modal .modal-content {
    max-width: 700px;
}

#preview-modal .modal-content {
    background: var(--light-surface);
    border-radius: 0;
    width: 380px;
    height: 812px;
    max-height: 90vh;
    margin: 2% auto;
    padding: 0;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

.smartphone-frame {
    width: 375px;
    height: 812px;
    background: linear-gradient(145deg, #2c3e50, #34495e);
    border-radius: 35px;
    padding: 15px;
    position: relative;
    box-shadow:
        0 0 0 3px #333,
        inset 0 2px 4px rgba(255, 255, 255, 0.1),
        0 25px 80px rgba(0, 0, 0, 0.4);
}

/* Fixed width for modal preview phone frame */
#preview-modal .smartphone-frame {
    width: 375px !important;
    height: 812px !important;
}

#preview-modal .smartphone-screen {
    width: 345px !important;
    height: 782px !important;
}

#preview-modal .smartphone-content {
    width: 345px !important;
    height: 782px !important;
}

.smartphone-screen {
    width: 100%;
    height: 100%;
    background: #000;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
}

.smartphone-notch {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 140px;
    height: 25px;
    background: #000;
    border-radius: 0 0 15px 15px;
    z-index: 10;
}

.smartphone-content {
    width: 100%;
    height: 100%;
    background: #E8F5F7;
    overflow-y: auto;
    overflow-x: hidden;
    border-radius: var(--radius-none);
    position: relative;
}

/* =============================================
   SIDEBAR READABILITY IMPROVEMENTS
   ============================================= */

/* Enhanced Sidebar Background for Better Readability */
.smartphone-content .sidebar,
.preview-modal .sidebar,
#preview-modal .sidebar {
    background: linear-gradient(180deg,
        rgba(0, 49, 53, 0.98) 0%,
        rgba(2, 73, 80, 0.95) 100%) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-right: 1px solid rgba(15, 164, 175, 0.25);
}

/* Improved Text Contrast - Light Mode */
.smartphone-content .sidebar *,
.preview-modal .sidebar *,
#preview-modal .sidebar * {
    color: #AFDDE5 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Section Headers with Better Visibility */
.sidebar .section-header,
.smartphone-content .section-header,
.preview-modal .section-header {
    background: rgba(15, 164, 175, 0.15) !important;
    padding: 12px 16px !important;
    border-radius: 8px !important;
    margin: 8px !important;
    border: 1px solid rgba(175, 221, 229, 0.2) !important;
    color: #ffffff !important;
    font-weight: 600 !important;
}

/* Menu and Setting Items */
.sidebar .menu-item,
.sidebar .setting-item,
.smartphone-content .menu-item,
.smartphone-content .setting-item {
    color: #AFDDE5 !important;
    padding: 10px 16px !important;
    margin: 4px 8px !important;
    border-radius: 6px !important;
    transition: all 0.2s ease !important;
}

.sidebar .menu-item:hover,
.sidebar .setting-item:hover {
    background: rgba(15, 164, 175, 0.2) !important;
    transform: translateX(4px);
}

/* User Info Section Enhancement */
.sidebar .user-info,
.smartphone-content .user-info {
    background: rgba(175, 221, 229, 0.1) !important;
    padding: 16px !important;
    border-bottom: 1px solid rgba(15, 164, 175, 0.2) !important;
}

.sidebar .user-name,
.smartphone-content .user-name {
    color: #ffffff !important;
    font-weight: 600 !important;
    font-size: 16px !important;
}

.sidebar .user-email,
.smartphone-content .user-email {
    color: #AFDDE5 !important;
    font-size: 13px !important;
    margin-top: 4px !important;
}

/* Sign Out Button with Terracotta Accent */
.sidebar .sign-out-btn,
.smartphone-content .sign-out-btn {
    background: rgba(150, 71, 52, 0.15) !important;
    color: #AFDDE5 !important;
    border: 1px solid rgba(150, 71, 52, 0.3) !important;
    padding: 10px 16px !important;
    margin: 8px !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    transition: all 0.2s ease !important;
}

.sidebar .sign-out-btn:hover,
.smartphone-content .sign-out-btn:hover {
    background: rgba(150, 71, 52, 0.25) !important;
    border-color: rgba(150, 71, 52, 0.5) !important;
    transform: scale(1.02);
}

/* Icons Enhancement */
.sidebar i,
.smartphone-content .sidebar i {
    color: #0FA4AF !important;
    margin-right: 8px;
}

/* Toggle Switches */
.sidebar .toggle-switch,
.smartphone-content .toggle-switch {
    background: rgba(15, 164, 175, 0.2) !important;
    border: 1px solid rgba(175, 221, 229, 0.3) !important;
}

.sidebar .toggle-switch.active,
.smartphone-content .toggle-switch.active {
    background: #0FA4AF !important;
}

/* Timestamp Footer */
.sidebar .timestamp,
.smartphone-content .timestamp {
    color: #AFDDE5 !important;
    font-size: 11px !important;
    padding: 12px !important;
    border-top: 1px solid rgba(15, 164, 175, 0.2) !important;
    background: rgba(0, 49, 53, 0.5) !important;
}

/* Auth Modal Header */
.auth-modal .modal-header {
    padding: 0;
    border-bottom: none;
    text-align: center;
    margin-bottom: var(--space-xl);
}

.auth-modal .modal-header h2 {
    font-size: var(--text-2xl);
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 var(--space-xs) 0;
    line-height: 1.3;
}

.auth-modal .modal-subtitle {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin: 0;
    font-weight: 400;
}

.auth-modal .close {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    color: var(--text-muted);
    font-size: 24px;
    font-weight: 400;
    cursor: pointer;
    transition: var(--transition-fast);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-medium);
}

.auth-modal .close:hover {
    color: var(--text-primary);
    background: var(--surface-light);
}

/* Default Modal Header (for other modals) */
.modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#preview-modal .modal-header {
    position: absolute;
    top: -50px;
    right: 10px;
    background: transparent;
    border: none;
    padding: 0;
    z-index: 20;
}

#preview-modal .close {
    color: #fff;
    font-size: 24px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

#preview-modal .close:hover {
    color: #ddd;
}

.modal-header h2 {
    margin: 0;
    color: var(--text-primary);
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #333;
}

/* Auth Modal Body */
.auth-modal .modal-body {
    padding: 0;
}

.auth-form {
    width: 100%;
}

.form-group {
    margin-bottom: var(--space-lg);
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    margin-bottom: var(--space-xs);
    font-weight: 500;
    font-size: var(--text-sm);
    color: var(--text-primary);
}

.form-group input {
    width: 100%;
    padding: var(--space-md);
    border: 1px solid var(--surface-medium);
    border-radius: var(--radius-medium);
    font-size: var(--text-base);
    color: var(--text-primary);
    background: var(--light-surface);
    transition: var(--transition-fast);
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: var(--focus-ring);
}

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

/* Auth Form Elements */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: var(--space-lg) 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    cursor: pointer;
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin: 0;
    accent-color: var(--accent-color);
}

.forgot-link {
    color: var(--accent-color);
    text-decoration: none;
    font-size: var(--text-sm);
    font-weight: 500;
    transition: var(--transition-fast);
}

.forgot-link:hover {
    color: var(--secondary-bg);
    text-decoration: underline;
}

.auth-divider {
    margin: var(--space-xl) 0;
    text-align: center;
    position: relative;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--surface-medium);
    z-index: 1;
}

.auth-divider span {
    background: var(--light-surface);
    padding: 0 var(--space-md);
    color: var(--text-muted);
    font-size: var(--text-sm);
    position: relative;
    z-index: 2;
}

.auth-footer {
    margin-top: var(--space-xl);
    text-align: center;
}

.auth-footer p {
    color: var(--text-secondary);
    font-size: var(--text-sm);
}

.auth-footer a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Auth Button Styles */
.btn-full {
    width: 100%;
    margin-bottom: var(--space-md);
}

.btn-full:last-child {
    margin-bottom: 0;
}

.auth-form .btn-primary {
    padding: var(--space-md) var(--space-lg);
    font-size: var(--text-base);
    font-weight: 500;
    border-radius: var(--radius-medium);
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--secondary-bg) 100%);
    border: none;
    color: var(--light-surface);
    box-shadow: var(--elevation-2);
    transition: var(--transition-fast);
    cursor: pointer;
}

.auth-form .btn-primary:hover {
    background: linear-gradient(135deg, var(--secondary-bg) 0%, var(--accent-color) 100%);
    box-shadow: var(--elevation-3);
    transform: translateY(-1px);
}

.btn-google {
    padding: var(--space-md) var(--space-lg);
    font-size: var(--text-base);
    font-weight: 500;
    border-radius: var(--radius-medium);
    background: var(--light-surface);
    border: 1px solid var(--surface-medium);
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
}

.btn-google:hover {
    background: var(--surface-light);
    border-color: var(--accent-color);
    box-shadow: var(--elevation-1);
}

.btn-google i {
    color: #4285f4;
    font-size: var(--text-lg);
}

/* Dark Mode Auth Modal */
body.dark-mode .auth-modal .modal-content {
    background: var(--light-surface);
    border-color: var(--surface-medium);
}

body.dark-mode .auth-divider::before {
    background: var(--surface-medium);
}

body.dark-mode .auth-divider span {
    background: var(--light-surface);
}

body.dark-mode .btn-google {
    background: var(--surface-light);
    border-color: var(--surface-medium);
    color: var(--text-primary);
}

body.dark-mode .btn-google:hover {
    background: var(--surface-medium);
    border-color: var(--accent-color);
}

/* Default Modal Body (for other modals) */
.modal-body {
    padding: 20px;
}

.modal-body label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-body input,
.modal-body select {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-small);
    font-size: 14px;
    background: var(--bg-neutral);
    color: var(--text-primary);
    transition: var(--transition-normal);
}

.modal-body input:focus,
.modal-body select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: var(--focus-ring);
    background: var(--light-surface);
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    justify-content: flex-end;
}

.column-builder-item {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    align-items: center;
}

.column-builder-item input {
    flex: 1;
    margin-bottom: 0;
}

/* Make Add Column button more prominent */
#add-custom-column {
    margin-top: 15px;
    background-color: #0FA4AF;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.2s ease;
}

#add-custom-column:hover {
    background-color: #024950;
}

#add-custom-column i {
    font-size: 16px;
}

.help-text {
    font-size: 12px;
    color: #7f8c8d;
    margin: 5px 0 0 0;
    font-style: italic;
}

#title-columns-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 10px 0;
}

.title-column-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    transition: background-color 0.2s ease;
    border-radius: 4px;
    margin: 2px 0;
}

.title-column-item:hover {
    background-color: rgba(52, 152, 219, 0.05);
}

.title-column-item input[type="checkbox"] {
    margin: 0;
    width: auto;
}

.title-column-item label {
    margin: 0;
    font-weight: normal;
    cursor: pointer;
    flex: 1;
}

.title-drag-handle {
    cursor: move;
    color: #bdc3c7;
    padding: 2px 4px;
    font-size: 12px;
}

.title-drag-handle:hover {
    color: #7f8c8d;
}

.drag-handle {
    cursor: grab;
    color: #374151;
    padding: 12px 10px;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-size: 18px;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    min-height: 36px;
    position: relative;
    user-select: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    outline: none;
}

.drag-handle:focus {
    outline: 2px solid #0ea5e9;
    outline-offset: 2px;
    background: rgba(255, 255, 255, 0.95);
    border-color: #0ea5e9;
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.1);
}

.drag-handle[aria-pressed="true"] {
    background: #0ea5e9;
    color: white;
    transform: scale(0.95);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.drag-handle:hover {
    color: #0ea5e9;
    background: rgba(255, 255, 255, 1);
    border-color: #0ea5e9;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.2);
    cursor: grab;
}

.drag-handle:active {
    cursor: grabbing;
    transform: scale(0.95);
    background: #0ea5e9;
    color: white;
    border-color: #0ea5e9;
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.4);
}

.sortable-ghost {
    opacity: 0.75;
}

.sortable-chosen {
    opacity: 0.8;
}

.menu-item.dragging {
    opacity: 0.75;
    transform: rotate(1deg);
}

/* Menu item action buttons in sidebar */
.menu-actions {
    display: flex;
    gap: 4px;
    align-items: center;
}

.menu-action, .btn-small {
    padding: 4px 6px;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    color: #95a5a6;
    font-size: 12px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    opacity: 1;
}

.menu-action:hover, .btn-small:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--primary-bg-end);
    transform: scale(1.1);
}

.btn-danger:hover {
    color: #e74c3c !important;
}

/* Add New Menu button */
.add-menu-item {
    margin-bottom: 10px;
}

.add-menu-content {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(52, 152, 219, 0.1);
    border: 2px dashed var(--primary-bg-end);
    border-radius: var(--radius-small);
    color: var(--primary-bg-end);
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

.add-menu-content:hover {
    background: rgba(52, 152, 219, 0.2);
    border-color: #2980b9;
    color: #2980b9;
    transform: translateY(-1px);
}

/* Sidebar footer for sign-out */
.sidebar-footer {
    margin-top: auto;
    padding: 20px 12px 16px 12px;
    border-top: 1px solid rgba(192, 222, 229, 0.3);
    background: rgba(0, 59, 70, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 12px 12px 0 0;
    margin-left: 8px;
    margin-right: 8px;
}

.sidebar-footer .setting-item {
    background: rgba(150, 71, 52, 0.2);
    border-radius: 8px;
    transition: all 0.2s ease;
    border: 1px solid rgba(150, 71, 52, 0.3);
}

.sidebar-footer .setting-item:hover {
    background: rgba(150, 71, 52, 0.4);
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(150, 71, 52, 0.3);
}

/* System Updated Info */
.system-updated-info {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: rgba(2, 73, 80, 0.4);
    border-radius: 8px;
    margin-top: 10px;
    color: #AFDDE5;
    font-size: 12px;
    border: 1px solid rgba(175, 221, 229, 0.2);
}

.system-updated-info i {
    font-size: 16px;
    margin-right: 10px;
    color: var(--primary-bg-end);
}

.system-updated-details {
    display: flex;
    flex-direction: column;
}

.system-updated-label {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 10px;
    color: #95a5a6;
    margin-bottom: 2px;
}

.system-updated-time {
    font-size: 13px;
    color: #ecf0f1;
    font-weight: 500;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #7f8c8d;
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 20px;
    display: block;
}

.preview-content {
    padding: 30px;
    font-family: 'Georgia', 'Times New Roman', serif;
    background: transparent;
    min-height: 80vh;
    line-height: 1.6;
}

#preview-modal .preview-content {
    padding: 20px 15px;
    min-height: 100%;
    background: transparent;
    font-size: 14px;
}

.preview-menu-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

#preview-modal .preview-menu-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
    max-width: 100%;
    margin: 0;
}

.preview-section {
    /* Glass effect matching navigation style */
    background: rgba(255, 255, 255, 0.25) !important;
    backdrop-filter: blur(10px) !important;
    border-radius: var(--radius-none);
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    opacity: 0;
    transform: translateY(40px) scale(0.95);
    /* Enhanced text shadow for better readability */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

#preview-modal .preview-section {
    /* Glass effect matching navigation style for modal */
    background: rgba(255, 255, 255, 0.25) !important;
    backdrop-filter: blur(10px) !important;
    padding: 20px 15px;
    border-radius: var(--radius-medium);
    margin-bottom: 5px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    /* Enhanced text shadow for modal */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.preview-section.section-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.preview-section.section-exiting {
    opacity: 0;
    transform: translateY(-30px) scale(0.92);
    transition: all 0.6s cubic-bezier(0.4, 0.0, 0.6, 1);
}

.preview-section.section-exiting-down {
    opacity: 0;
    transform: translateY(30px) scale(0.92);
    transition: all 0.6s cubic-bezier(0.4, 0.0, 0.6, 1);
}

.preview-section.section-hidden {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
}

.preview-section:hover {
    transform: translateY(-2px) scale(1.02);
    background: rgba(255, 255, 255, 0.3) !important;
    backdrop-filter: blur(12px) !important;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

#preview-modal .preview-section:hover {
    background: rgba(255, 255, 255, 0.3) !important;
    backdrop-filter: blur(12px) !important;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.preview-section h2 {
    color: var(--header-color, var(--text-primary));
    font-size: 28px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--primary-bg-end);
    letter-spacing: 1px;
    text-transform: uppercase;
    /* Enhanced text contrast */
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    text-rendering: optimizeLegibility;
}

.preview-section-description {
    font-size: 16px;
    color: var(--text-muted, #666);
    text-align: center;
    margin: -15px 0 20px 0;
    line-height: 1.5;
    font-style: italic;
}

#preview-modal .preview-section h2 {
    font-size: 22px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-bg-end);
    letter-spacing: 0.5px;
    /* Enhanced text contrast for modal */
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    text-rendering: optimizeLegibility;
}

/* Enhanced text readability for all preview content */
.preview-section,
#preview-modal .preview-section {
    /* Force stronger text contrast */
    color: var(--dark-base);
    font-weight: 500;
}

.preview-section * {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.preview-item-title,
.preview-column-header,
.preview-data-cell {
    font-weight: 600;
    color: var(--dark-base) !important;
}

.preview-price-cell,
.preview-title-price {
    font-weight: 700;
    color: var(--text-primary) !important;
}

.preview-items {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.preview-item {
    display: flex;
    flex-direction: column;
    padding: 18px 0;
    border-bottom: 1px dotted #d5d6d7;
    transition: background-color 0.2s ease;
}

.preview-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.preview-item:hover {
    background-color: rgba(52, 152, 219, 0.02);
    border-radius: 6px;
    padding-left: 8px;
    padding-right: 8px;
    margin-left: -8px;
    margin-right: -8px;
}

.preview-item-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
    letter-spacing: 0.3px;
}

.preview-item-description {
    font-size: 14px;
    color: var(--secondary-text-color);
    font-style: italic;
    margin-bottom: 8px;
    line-height: 1.5;
}

.preview-item-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.preview-item-info {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
    font-size: 13px;
    color: #7f8c8d;
}

.preview-item-info span {
    padding: 3px 8px;
    background: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

.preview-item-price {
    font-weight: 700;
    color: var(--accent-color, var(--success));
    font-size: 16px;
    letter-spacing: 0.5px;
    text-align: right !important;
    margin-left: auto;
    justify-self: end;
    flex-shrink: 0;
}

/* Column headers now use liquid glass effect - see end of file */
    padding: 4px 0;
}

.preview-item-title {
    display: flex !important;
    justify-content: space-between !important;
    align-items: baseline;
    color: var(--primary-text-color, var(--text-primary));
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
    letter-spacing: 0.3px;
    width: 100% !important;
    gap: 15px; /* Add space between text and price */
}

.preview-title-text {
    flex: 1 !important;
    font-weight: 700; /* Bold for prominent */
    color: var(--primary-text-color, var(--text-primary));
    text-align: left !important; /* Explicitly left-align */
}

.preview-title-price {
    color: var(--accent-color, var(--success));
    font-weight: 700;
    text-align: right !important;
    flex-shrink: 0 !important; /* Prevent shrinking */
    justify-self: end !important; /* For grid layouts */
    min-width: fit-content !important; /* Ensure it maintains its width */
    white-space: nowrap !important; /* Prevent price from wrapping */
}

/* Enhanced styling for title column text - ensures bold formatting */
.title-column-text {
    font-weight: 700 !important; /* Bold for prominent */
    color: var(--primary-text-color, var(--text-primary)) !important;
}

/* Enhanced styling for prices when they're in the title/prominent position */
.title-price-right {
    color: var(--accent-color, var(--success)) !important;
    font-weight: 700 !important;
    text-align: right !important;
    flex-shrink: 0 !important;
    justify-self: end !important;
    min-width: fit-content !important;
    white-space: nowrap !important;
    margin-left: auto !important; /* Push to the right */
}

/* Improved styling for preview item titles with prices */
.preview-item-title.has-price {
    display: flex !important;
    justify-content: space-between !important;
    align-items: baseline !important;
    width: 100% !important;
    gap: 15px !important;
}

/* Container for all secondary data within an item - ensures proper containment */
.preview-item-secondary-container {
    position: relative;
    width: 100%;
    contain: layout style;
    margin-top: 2.5px;
}

/* Secondary data styling - shows underneath the prominent line */
.preview-item-secondary {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 4px;
    font-size: 14px;
    color: var(--secondary-text-color, #6c757d);
    line-height: 1.4;
    position: relative;
    width: 100%;
}

.preview-secondary-data {
    font-size: 13px;
    color: var(--secondary-text-color, #6c757d);
    display: inline-block;
    /* Removed background, padding, border, and backdrop-filter */
    margin-right: 12px;  /* Add spacing between items */
    font-weight: 400;  /* Lighter weight for non-prominent data */
    white-space: nowrap;
}

/* Long secondary data that takes its own line */
.preview-secondary-long {
    white-space: normal;
    word-wrap: break-word;
    flex: 1 1 100%;
    min-width: 100%;
}

/* Inline description styling */
.preview-description-inline {
    font-size: 13px;
    color: var(--secondary-text-color, #6c757d);
    font-style: italic;
    /* Removed background, padding, border, and backdrop-filter */
    margin-right: 12px;  /* Add spacing between items */
}

/* Ensure proper spacing and flow */
.preview-item-secondary > span:not(:last-child) {
    margin-right: 8px;
}

/* Description when it gets its own line */
.preview-item-description {
    font-size: 13px;
    color: var(--secondary-text-color);
    font-style: italic;
    margin-top: 4px;
    line-height: 1.3;
}

.preview-item-data {
    display: grid;
    gap: 10px; /* Match column headers gap */
    align-items: center;
    margin-top: 8px;
    padding: 0 16px; /* Match column headers horizontal padding */
    grid-auto-columns: 1fr; /* Default equal columns */
}

.preview-data-cell {
    font-size: 14px;
    color: var(--primary-text-color, var(--text-primary));
    text-align: left !important; /* Default left alignment for all columns */
    padding: 8px 12px; /* Match column header padding */
    border: 1px solid transparent; /* Match column header border width */
    border-radius: var(--radius-small); /* Match column header border radius */
}

.preview-data-cell.preview-price-cell {
    text-align: right !important; /* Ensure price cells are always right-aligned */
    color: var(--accent-color, var(--success));
    font-weight: 600;
    justify-self: end !important; /* For grid layouts */
    margin-left: auto; /* For flex layouts */
    grid-column: -1; /* Always place in last column */
}

.preview-column-header.preview-price-header {
    text-align: right !important;
    justify-self: end !important; /* For grid layouts */
    grid-column: -1; /* Always place in last column */
}

/* Enhanced preview column headers */
.preview-column-headers {
    display: grid;
    gap: 10px;
    margin-bottom: 12px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    border: 1px solid var(--border-color, #e0e0e0);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.preview-column-header {
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--header-color, var(--text-primary));
    text-align: left !important; /* Default left alignment for all column headers */
    padding: 6px 8px;
    background: linear-gradient(135deg,
        var(--primary-bg-start, #f8fdff) 0%,
        var(--primary-bg-end, #f0f9ff) 100%);
    border: 1px solid var(--border-color, rgba(15, 164, 175, 0.2));
    border-radius: var(--radius-small, 4px);
    transition: all 0.2s ease;
}

/* Override for price headers in tabular layout */
.preview-column-headers .preview-column-header.preview-price-header {
    text-align: right !important;
    justify-self: end !important;
    grid-column: -1;
}

/* Additional price column detection using data attributes and content */
.preview-data-cell[data-column*="price" i],
.preview-data-cell[data-column*="cost" i],
.preview-data-cell[data-column*="$" i] {
    text-align: right !important;
    color: var(--accent-color, var(--success));
    font-weight: 600;
    justify-self: end !important;
    margin-left: auto;
}

.preview-column-header[data-column*="price" i],
.preview-column-header[data-column*="cost" i],
.preview-column-header[data-column*="$" i] {
    text-align: right !important;
    justify-self: end !important;
}

/* Catch-all price detection by content (starts with $ or contains price words) */
.preview-data-cell:is([data-column*="price" i], [data-column*="cost" i], [data-column*="$" i]),
.preview-data-cell.preview-price-cell {
    text-align: right !important;
    justify-self: end !important;
}

.preview-column-header:is([data-column*="price" i], [data-column*="cost" i], [data-column*="$" i]),
.preview-column-header.preview-price-header {
    text-align: right !important;
    justify-self: end !important;
}

/* Tabular section styling */
.preview-section.tabular-section .preview-items {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.preview-item.tabular-item {
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding-bottom: 8px;
}

.preview-item.tabular-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.preview-data-cell.preview-hidden {
    display: none;
}

.preview-menu-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid #ecf0f1;
}

#preview-modal .preview-menu-header {
    margin-bottom: 25px;
    padding-bottom: 20px;
}

.preview-menu-title {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
    letter-spacing: 2px;
}

#preview-modal .preview-menu-title {
    font-size: 26px;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.preview-menu-subtitle {
    font-size: 16px;
    color: #7f8c8d;
    font-style: italic;
}

#preview-modal .preview-menu-subtitle {
    font-size: 14px;
    color: var(--secondary-text-color) !important;
}

#preview-modal .preview-item-description {
    color: var(--secondary-text-color) !important;
}

#preview-modal .preview-secondary-data {
    color: var(--secondary-text-color) !important;
}

#preview-modal .preview-description-inline {
    color: var(--secondary-text-color) !important;
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header {
        flex-direction: column;
        gap: 15px;
    }
    
    .header-controls {
        width: 100%;
        justify-content: center;
    }
    
    .modal-content {
        width: 95%;
        margin: 5% auto;
    }
    
    .main-content {
        flex-direction: column;
    }
    
    .live-preview-panel {
        width: 100%;
        position: relative;
        top: 0;
        max-height: 500px;
        order: -1;
    }
    
    .live-preview-container {
        max-height: 400px;
        padding: 15px;
    }
    
    .smartphone-frame-mini {
        width: 200px;
        height: 360px;
    }
    
    .preview-content {
        padding: 20px 15px;
    }
    
    .preview-menu-container {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .preview-section {
        padding: 20px 15px;
    }
    
    .preview-section h2 {
        font-size: 24px;
        margin-bottom: 20px;
    }
    
    .preview-menu-title {
        font-size: 28px;
        letter-spacing: 1px;
    }
    
    .preview-item-details {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .preview-item-price {
        align-self: flex-end !important;
        text-align: right !important;
        margin-left: auto;
        width: 100%;
        justify-self: end;
    }
    
    /* Responsive column headers - preserve grid structure but make mobile-friendly */
    .preview-column-headers {
        gap: 6px;
        padding: 8px 10px;
        overflow-x: auto;
        /* Allow horizontal scrolling on small screens */
        min-height: 40px;
    }

    .preview-column-header {
        font-size: 11px;
        padding: 4px 6px;
        text-align: left !important; /* Left alignment for mobile headers */
        white-space: nowrap;
        min-width: 60px; /* Ensure readable minimum width */
        /* Glass effect preserved from main styles */
    }

    .preview-item-data {
        gap: 6px;
        padding: 0 10px;
        overflow-x: auto;
        /* Match header scrolling behavior */
    }

    .preview-data-cell {
        font-size: 12px;
        padding: 6px;
        white-space: nowrap;
        min-width: 60px; /* Match header minimum width */
    }
    
    /* Remove duplicate item-data rules - handled above */
    .preview-data-cell {
        border: 1px solid transparent; /* Match border for consistency */
        border-radius: 6px; /* Slightly smaller radius for mobile */
    }
    
    .preview-data-cell.preview-price-cell {
        text-align: right !important; /* Ensure price cells are right-aligned on mobile */
        justify-self: end !important; /* Force right alignment in grid */
        margin-left: auto; /* Force right alignment in flex */
        grid-column: -1 !important; /* Always place in last column on mobile */
    }
    
    .preview-column-header.preview-price-header,
    .preview-column-header[data-column*="price" i],
    .preview-column-header[data-column*="cost" i],
    .preview-column-header[data-column*="$" i] {
        text-align: right !important;
        justify-self: end !important;
        grid-column: -1 !important; /* Always place in last column on mobile */
    }

    /* Ensure published menu mobile alignment */
    .published-menu-container .preview-data-cell {
        text-align: left !important;
    }

    .published-menu-container .preview-data-cell.preview-price-cell,
    .published-menu-container .preview-data-cell[data-column*="price" i] {
        text-align: right !important;
        justify-self: end !important;
    }

    .published-menu-container .preview-column-header {
        text-align: left !important;
    }

    .published-menu-container .preview-column-header.preview-price-header,
    .published-menu-container .preview-column-header[data-column*="price" i] {
        text-align: right !important;
        justify-self: end !important;
    }
    
    .preview-item-title {
        flex-direction: row; /* Keep horizontal layout on mobile */
        justify-content: space-between;
        align-items: baseline;
        width: 100%;
        gap: 8px; /* Smaller gap on mobile */
    }

    /* Mobile styles for secondary data */
    .preview-item-secondary {
        gap: 8px; /* Smaller gap on mobile */
        margin-top: 2.5px;
        font-size: 12px;
        flex-direction: column; /* Stack items vertically on very small screens */
    }

    .preview-secondary-data {
        font-size: 12px;
        padding: 2px 6px;
        border-radius: 3px;
        font-weight: 400;  /* Maintain lighter weight on mobile */
    }

    .preview-description-inline {
        font-size: 12px;
        padding: 2px 6px;
        border-radius: 3px;
    }

    .preview-item-description {
        font-size: 12px;
        padding: 3px 6px;
        margin-top: 3px;
    }

    /* On mobile, allow more flexible wrapping for better readability */
    @media (max-width: 400px) {
        .preview-item-secondary {
            flex-direction: row; /* Return to row layout but with more wrapping */
        }

        .preview-secondary-data {
            flex: 0 1 auto;
            white-space: normal;
            word-break: break-word;
        }
    }
    
    .preview-title-price {
        text-align: right !important;
        flex-shrink: 0;
        white-space: nowrap;
        min-width: fit-content;
    }
}

/* Additional responsive behavior for very small screens */
@media (max-width: 480px) {
    /* For 4+ columns on small screens, enable horizontal scroll */
    .preview-column-headers.grid-4,
    .preview-column-headers.grid-5 {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }

    .preview-column-headers.grid-4 .preview-column-header,
    .preview-column-headers.grid-5 .preview-column-header {
        min-width: 70px; /* Slightly larger minimum for readability */
    }

    .preview-item-data.grid-4,
    .preview-item-data.grid-5 {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }

    .preview-item-data.grid-4 .preview-data-cell,
    .preview-item-data.grid-5 .preview-data-cell {
        min-width: 70px;
    }
}

    /* Mobile responsive grid overrides - force single column layout for many columns */
    .column-headers.grid-4,
    .column-headers.grid-5,
    .menu-items .grid-4,
    .menu-items .grid-5 {
        grid-template-columns: 1fr auto !important;
        gap: 4px;
    }

    /* Adjust minimum widths for 2-3 column layouts on mobile */
    .column-headers.grid-2,
    .menu-items .grid-2 {
        grid-template-columns: repeat(2, minmax(100px, auto)) auto;
    }

    .column-headers.grid-3,
    .menu-items .grid-3 {
        grid-template-columns: repeat(3, minmax(80px, auto)) auto;
    }

    /* Ensure touch-friendly button sizes */
    .item-controls button {
        min-width: 40px !important;
        min-height: 40px !important;
        padding: 8px !important;
        font-size: 12px;
    }

    /* Better mobile input sizing */
    .menu-item input[type="text"],
    .column-header input[type="text"] {
        min-width: 50px !important;
        font-size: 14px;
        padding: 8px 6px;
    }

    /* Improve mobile scrolling */
    .menu-item,
    .column-headers {
        overflow-x: auto;
        scrollbar-width: thin;
    }

    /* Hide grid guides on mobile for cleaner look */
    .grid-guide {
        display: none !important;
    }

    /* Prevent horizontal overflow on mobile */
    .container,
    .main-content,
    .section {
        max-width: 100vw;
        overflow-x: hidden;
    }

    /* Better mobile section spacing */
    .section {
        margin: 10px 0;
        padding: 15px 10px;
    }

    /* Mobile-friendly modal sizing */
    .modal-content {
        width: 95vw !important;
        max-width: 95vw !important;
        margin: 2.5vh auto !important;
    }
}

.section-type-badge {
    background: rgba(255,255,255,0.2);
    color: #FFFFFF;
    padding: 4px 8px;
    border-radius: var(--radius-medium);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* Extra small mobile devices */
@media (max-width: 480px) {
    /* Force all multi-column grids to single column on very small screens */
    .column-headers.grid-2,
    .column-headers.grid-3,
    .column-headers.grid-4,
    .column-headers.grid-5,
    .menu-items .grid-2,
    .menu-items .grid-3,
    .menu-items .grid-4,
    .menu-items .grid-5 {
        grid-template-columns: 1fr auto !important;
        gap: 2px;
    }

    /* Stack column headers vertically */
    .column-header {
        margin-bottom: 4px;
        padding: 6px 4px;
        font-size: 12px;
    }

    /* Larger touch targets for very small screens */
    .item-controls button {
        min-width: 44px !important;
        min-height: 44px !important;
    }

    /* Better text input sizing */
    .menu-item input[type="text"],
    .column-header input[type="text"] {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 10px 8px;
    }
}

.item-controls,
.item-actions {
    display: flex;
    gap: 4px;
    align-items: center;
    padding: 4px;
}

/* Vertical layout for buttons on the right side */
.item-controls.vertical,
.item-actions.vertical {
    flex-direction: column;
    justify-content: center;
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10; /* Ensure action buttons appear above row backgrounds */
}

/* For two-row layout, adjust positioning */
.menu-item.two-row {
    position: relative;
}

.menu-item.two-row .item-actions.vertical {
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
}

.item-controls button,
.item-actions button {
    padding: 6px 8px;
    font-size: 14px;
    min-width: 32px;
    min-height: 32px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.item-controls .btn-secondary,
.item-actions .btn-secondary {
    background: var(--accent-color) !important;
    color: white !important;
}

.item-controls .btn-secondary:hover,
.item-actions .btn-secondary:hover {
    background: #0c8a94 !important;
    transform: scale(1.05);
}

.item-controls .btn-danger,
.item-actions .btn-danger {
    background: var(--error) !important;
    color: white !important;
}

.item-controls .btn-danger:hover,
.item-actions .btn-danger:hover {
    background: #b54438 !important;
    transform: scale(1.05);
}

/* Grid classes for column headers (includes space for add column button) */
.column-headers.grid-1 { grid-template-columns: minmax(150px, auto) auto; }
.column-headers.grid-2 { grid-template-columns: repeat(2, minmax(120px, auto)) auto; }
.column-headers.grid-3 { grid-template-columns: repeat(3, minmax(100px, auto)) auto; }
.column-headers.grid-4 { grid-template-columns: repeat(4, minmax(85px, auto)) auto; }
.column-headers.grid-5 { grid-template-columns: repeat(5, minmax(75px, auto)) auto; }

/* Preview column headers use the same grid system */
.preview-column-headers.grid-1 { grid-template-columns: minmax(150px, auto) auto; }
.preview-column-headers.grid-2 { grid-template-columns: repeat(2, minmax(120px, auto)) auto; }
.preview-column-headers.grid-3 { grid-template-columns: repeat(3, minmax(100px, auto)) auto; }
.preview-column-headers.grid-4 { grid-template-columns: repeat(4, minmax(85px, auto)) auto; }
.preview-column-headers.grid-5 { grid-template-columns: repeat(5, minmax(75px, auto)) auto; }

/* Grid classes for menu items (includes space for action buttons) */
.menu-items .grid-1 { grid-template-columns: minmax(150px, auto) auto; }
.menu-items .grid-2 { grid-template-columns: repeat(2, minmax(120px, auto)) auto; }
.menu-items .grid-3 { grid-template-columns: repeat(3, minmax(100px, auto)) auto; }
.menu-items .grid-4 { grid-template-columns: repeat(4, minmax(85px, auto)) auto; }
.menu-items .grid-5 { grid-template-columns: repeat(5, minmax(75px, auto)) auto; }

/* Preview item data uses the same grid system (no action buttons in preview) */
.preview-item-data.grid-1 { grid-template-columns: minmax(150px, 1fr); }
.preview-item-data.grid-2 { grid-template-columns: repeat(2, minmax(120px, 1fr)); }
.preview-item-data.grid-3 { grid-template-columns: repeat(3, minmax(100px, 1fr)); }
.preview-item-data.grid-4 { grid-template-columns: repeat(4, minmax(85px, 1fr)); }
.preview-item-data.grid-5 { grid-template-columns: repeat(5, minmax(75px, 1fr)); }

/* Two-row layout classes for column headers */
.column-headers.two-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
    margin-top: 8px; /* Small space after section header */
    padding: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    position: relative;
}

.column-headers.two-row .row-header {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 14px 16px;
    background: var(--header-bg, #f8f9fa);
    border-radius: 10px;
    border: 2px solid var(--border-color, #e0e0e0);
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
    position: relative;
    min-height: 56px;
    margin: 0;
}

/* Container for column headers and add button */
.column-headers.two-row .column-headers-container {
    display: flex;
    gap: 10px;
    align-items: center;
    flex: 1;
}

.column-headers.two-row .column-headers-inner {
    display: flex;
    gap: 10px;
    flex: 1;
    flex-wrap: wrap;
}

.column-headers.two-row .row-header.primary-row {
    background: linear-gradient(135deg, var(--primary-row-bg, #f0f9ff) 0%, #e0f2fe 100%);
    border-color: var(--primary-row-border, #0ea5e9);
    box-shadow: 0 2px 4px rgba(14, 165, 233, 0.08);
}

.column-headers.two-row .row-header.secondary-row {
    background: linear-gradient(135deg, var(--secondary-row-bg, #fef7f0) 0%, #fed7aa 100%);
    border-color: var(--secondary-row-border, #f97316);
    box-shadow: 0 2px 4px rgba(249, 115, 22, 0.08);
}

.column-headers.two-row .row-header .row-label {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-primary, #374151);
    margin-right: 16px;
    min-width: 72px;
    padding-right: 10px;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    display: flex;
    align-items: center;
    gap: 6px;
    position: relative;
}

.column-headers.two-row .row-header .row-label::before {
    content: '';
    width: 4px;
    height: 24px;
    border-radius: 2px;
    flex-shrink: 0;
}

.column-headers.two-row .row-header.primary-row .row-label::before {
    background: var(--primary-row-border, #0ea5e9);
}

.column-headers.two-row .row-header.secondary-row .row-label::before {
    background: var(--secondary-row-border, #f97316);
}

.column-headers.two-row .row-header .row-label::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 60%;
    background-color: rgba(0, 0, 0, 0.15);
    border-radius: 0.5px;
}

.column-headers.two-row .row-header.primary-row .row-label {
    color: var(--primary-row-border, #0ea5e9);
    font-weight: 800;          /* Stronger weight for prominence */
}

.column-headers.two-row .row-header.secondary-row .row-label {
    color: var(--secondary-row-border, #f97316);
    font-weight: 700;
}

.column-headers.two-row .column-header {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #E8F5F7;
    border-radius: 6px;
    border: 1px solid #dee2e6;
    transition: all 0.2s ease;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.01em;
    text-transform: uppercase;
    font-size: 13px;
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

/* Two-row layout classes for menu items */
.menu-items .menu-item.two-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 0 60px 0 48px; /* Left padding for drag handle, right padding for vertical buttons */
    background: transparent;
    position: relative;
    border: none;
    border-radius: 0;
    margin-bottom: 6px;
}

.menu-items .menu-item.two-row .menu-item-row {
    display: grid; /* Changed from flex to grid to work with inline grid-template-columns */
    gap: 8px;
    align-items: center;
    padding: 8px 12px;
    position: relative;
    width: 100%;
}

.menu-items .menu-item.two-row .menu-item-row.primary-row {
    padding: 8px 12px;
    margin-bottom: 4px;
    display: grid;
    position: relative;
    z-index: 1;
}

.menu-items .menu-item.two-row .menu-item-row.primary-row::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    background: var(--primary-row-bg, #f0f9ff);
    border: 2px solid var(--primary-row-border, #0ea5e9);
    border-radius: 8px;
    z-index: -1;
}

.menu-items .menu-item.two-row .menu-item-row.secondary-row {
    padding: 8px 12px;
    display: grid;
    position: relative;
    z-index: 1;
}

.menu-items .menu-item.two-row .menu-item-row.secondary-row::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    background: var(--secondary-row-bg, #fef7f0);
    border: 2px solid var(--secondary-row-border, #f97316);
    border-radius: 8px;
    z-index: -1;
}

.menu-items .menu-item.two-row .row-label-spacer {
    width: 80px;
    flex-shrink: 0;
}

.menu-items .menu-item.two-row .menu-item-input {
    width: 100%;
    min-width: 0;
    /* Match column header styling */
    padding: 12px 16px;
    background: #E8F5F7;
    border-radius: 6px;
    border: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
    min-height: 44px;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.4;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.menu-items .menu-item.two-row .menu-item-input:focus {
    outline: none;
    border-color: var(--primary-bg-end);
    box-shadow: 0 2px 4px rgba(15, 164, 175, 0.15);
    background: linear-gradient(135deg, #ffffff 0%, #f8fdff 100%);
}

.menu-items .menu-item.two-row .menu-item-input:hover:not(:focus) {
    border-color: var(--primary-bg-end);
    box-shadow: 0 2px 4px rgba(15, 164, 175, 0.15);
    background: linear-gradient(135deg, #ffffff 0%, #f8fdff 100%);
}

.menu-items .menu-item.two-row .item-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border-color, #e0e0e0);
}

/* Responsive design for two-row layout */
@media (max-width: 768px) {
    .column-headers.two-row .row-header {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .column-headers.two-row .row-header .row-label {
        margin-right: 16px;
        min-width: 64px;
        font-size: 0.85rem;
    }

    .menu-items .menu-item.two-row .menu-item-row {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .menu-items .menu-item.two-row .row-label-spacer {
        min-width: auto;
        margin-bottom: 4px;
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .column-headers.two-row .row-header {
        grid-template-columns: auto auto auto;
        justify-content: start;
        gap: 15px;
    }

    .menu-items .menu-item.two-row .menu-item-row {
        grid-template-columns: auto auto auto;
        justify-content: start;
        gap: 15px;
    }

    /* Tablet alignment rules */
    .preview-data-cell,
    .preview-column-header {
        text-align: left !important; /* Default left alignment for tablet */
    }

    /* Maintain price alignment on tablet */
    .preview-data-cell.preview-price-cell,
    .preview-data-cell[data-column*="price" i],
    .preview-data-cell[data-column*="cost" i],
    .preview-data-cell[data-column*="$" i] {
        text-align: right !important;
        justify-self: end !important;
    }

    .preview-column-header.preview-price-header,
    .preview-column-header[data-column*="price" i],
    .preview-column-header[data-column*="cost" i],
    .preview-column-header[data-column*="$" i] {
        text-align: right !important;
        justify-self: end !important;
    }

    /* Ensure published menu tablet alignment */
    .published-menu-container .preview-data-cell {
        text-align: left !important;
    }

    .published-menu-container .preview-data-cell.preview-price-cell,
    .published-menu-container .preview-data-cell[data-column*="price" i] {
        text-align: right !important;
        justify-self: end !important;
    }

    .published-menu-container .preview-column-header {
        text-align: left !important;
    }

    .published-menu-container .preview-column-header.preview-price-header,
    .published-menu-container .preview-column-header[data-column*="price" i] {
        text-align: right !important;
        justify-self: end !important;
    }
}

@media (min-width: 1024px) {
    .column-headers.two-row .row-header.primary-row {
        grid-template-columns: auto auto auto auto auto;
        justify-content: start;
        gap: 20px;
    }

    .column-headers.two-row .row-header.secondary-row {
        grid-template-columns: auto 1fr auto;
    }

    .menu-items .menu-item.two-row .menu-item-row.primary-row {
        grid-template-columns: auto auto auto auto;
        justify-content: start;
        gap: 20px;
    }

    .menu-items .menu-item.two-row .menu-item-row.secondary-row {
        grid-template-columns: auto auto;
        justify-content: start;
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .column-headers.two-row .row-header .row-label {
        margin-right: 12px;
        min-width: 56px;
        font-size: 0.8rem;
    }
}

/* Dark mode support for two-row layout */
.dark-mode .column-headers.two-row .row-header {
    background: var(--dark-header-bg, #374151);
    border-color: var(--dark-border-color, #4b5563);
    color: var(--dark-text-primary, #f9fafb);
}

.dark-mode .column-headers.two-row .row-header.primary-row {
    background: var(--dark-primary-row-bg, #1e3a8a);
    border-color: var(--dark-primary-row-border, #3b82f6);
}

.dark-mode .column-headers.two-row .row-header.secondary-row {
    background: var(--dark-secondary-row-bg, #9a3412);
    border-color: var(--dark-secondary-row-border, #ea580c);
}

.dark-mode .menu-items .menu-item.two-row {
    background: transparent;
    border-color: transparent;
    color: var(--dark-text-primary, #f9fafb);
}

.dark-mode .menu-items .menu-item.two-row .menu-item-row.primary-row {
    background: var(--dark-primary-row-bg, #1e3a8a);
    border-top: 2px solid var(--dark-primary-row-border, #3b82f6);
    border-bottom: 1px solid var(--dark-primary-row-border, #3b82f6);
    border-left: none;
    border-right: none;
}

.dark-mode .menu-items .menu-item.two-row .menu-item-row.secondary-row {
    background: var(--dark-secondary-row-bg, #9a3412);
    border-top: 2px solid var(--dark-secondary-row-border, #ea580c);
    border-bottom: 1px solid var(--dark-secondary-row-border, #ea580c);
    border-left: none;
    border-right: none;
}

.dark-mode .menu-items .menu-item.two-row .item-actions {
    border-top-color: var(--dark-border-color, #4b5563);
}

.dark-mode .menu-items .menu-item.two-row .menu-item-input {
    background: var(--dark-card-bg, #374151);
    border-color: var(--dark-border-color, #4b5563);
    color: var(--dark-text-primary, #f9fafb);
}

.dark-mode .menu-items .menu-item.two-row .menu-item-input:focus {
    border-color: #3b82f6;
    background: var(--dark-card-bg, #374151);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.dark-mode .menu-items .menu-item.two-row .menu-item-input:hover:not(:focus) {
    border-color: var(--dark-border-color, #6b7280);
    background: var(--dark-card-bg, #374151);
}

/* Add column wrapper positioning */
.add-column-wrapper {
    display: inline-flex;
    align-items: center;
}

/* Add column wrapper for two-row layout */
.add-column-wrapper.two-row {
    display: flex;
    justify-content: center;
    padding: 16px 0 8px 0;
    border-top: 1px solid var(--border-color, #e0e0e0);
    margin-top: 8px;
}

.add-column-wrapper.two-row .add-column-header {
    margin: 0;
}

.dark-mode .add-column-wrapper.two-row {
    border-top-color: var(--dark-border-color, #4b5563);
}

/* Navigation Styles */
.preview-navigation {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 30;
    pointer-events: none;
}

.nav-tab {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: transparent;
    backdrop-filter: none;
    color: white;
    padding: 12px 20px;
    border-radius: var(--radius-medium);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: none;
    pointer-events: all;
    z-index: 35;
    border: none;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 80px;
    text-align: center;
    justify-content: center;
}

.nav-tab:hover {
    background: transparent;
    transform: translateX(-50%) translateY(-4px);
    box-shadow: none;
}

.nav-dock-container {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: transparent;
    backdrop-filter: none;
    border-top: none;
    padding: 15px 15px 50px;
    transform: translateY(100%);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    pointer-events: all;
    z-index: 30;
}

.nav-dock-container.expanded {
    transform: translateY(0);
}

.nav-dock {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 8px;
    padding: 10px 0;
    flex-wrap: wrap;
    max-width: 600px;
    margin: 0 auto;
}

.nav-dock-item {
    min-width: 80px;
    height: 50px;
    padding: 8px 16px;
    background: transparent;
    border-radius: var(--radius-medium);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
    box-shadow: none;
    text-align: center;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-dock-item:hover {
    transform: scale(1.1) translateY(-4px);
    background: transparent;
    color: white;
    box-shadow: none;
}

.nav-dock-item.active {
    transform: scale(1.05);
    background: transparent;
    color: white;
    box-shadow: none;
}

/* Published menu navigation (fixed to viewport instead of container) */
body .preview-navigation {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

/* Ensure published menu content has enough bottom padding */
.published-menu-container .preview-menu-container {
    padding-bottom: 100px;
}

/* Disabled path input styling */
#menu-url-path:disabled {
    background-color: #f8f9fa;
    color: #6c757d;
    cursor: not-allowed;
    opacity: 0.8;
}

#check-availability {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Sidebar Styles */
.sidebar {
    position: fixed;
    left: -320px;
    top: 0;
    width: 320px;
    height: 100vh;
    background: linear-gradient(180deg,
        rgba(0, 59, 70, 0.98) 0%,
        rgba(7, 87, 91, 0.96) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: #ffffff;
    z-index: 10500;
    transition: left 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 4px 0 32px rgba(0, 59, 70, 0.3);
    border-right: 1px solid rgba(192, 222, 229, 0.2);
    pointer-events: auto;
    overflow-y: auto;
}

.sidebar.open {
    left: 0;
}

.sidebar * {
    pointer-events: auto;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    z-index: 10499;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(192, 222, 229, 0.4);
    background: rgba(0, 59, 70, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    /* Improved avatar background with terracotta accent */
    background: linear-gradient(135deg, #0FA4AF 0%, #964734 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #FFFFFF;
    border: 2px solid rgba(175, 221, 229, 0.4);
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 4px;
    color: #FFFFFF;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.user-email {
    font-size: 13px;
    color: #C0DEE5;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    opacity: 0.9;
}

.sidebar-close {
    background: none;
    border: none;
    color: #AFDDE5;
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.sidebar-close:hover {
    color: #FFFFFF;
    background: rgba(150, 71, 52, 0.3);
    transform: scale(1.1);
}

.sidebar-content {
    padding: 0;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 120px);
}

.sidebar-section {
    margin-bottom: 8px;
}

.sidebar-section:not(:first-child) {
    margin-top: 8px;
}

.section-header {
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    background: rgba(45, 107, 115, 0.2);
    border: 1px solid rgba(192, 222, 229, 0.2);
    border-radius: 8px;
    margin: 0 12px 4px 12px;
    color: #ffffff;
    font-weight: 600;
}

.section-header:hover {
    background: rgba(45, 107, 115, 0.3);
    border-color: rgba(192, 222, 229, 0.3);
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(0, 59, 70, 0.2);
}

.section-header i:first-child {
    width: 20px;
    text-align: center;
    color: #0FA4AF;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.section-header span {
    flex: 1;
    font-weight: 500;
    font-size: 14px;
    color: #FFFFFF;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.section-toggle {
    transition: transform 0.2s ease;
    font-size: 12px;
    color: #AFDDE5;
}

.section-header.collapsed .section-toggle {
    transform: rotate(-90deg);
}

.section-content {
    max-height: 50000px;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                padding 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    padding-top: 0;
    padding-bottom: 0;
}

.section-content.collapsed {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
}

.menu-item, .setting-item {
    padding: 12px 20px 12px 52px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    margin: 2px 12px;
    color: #FFFFFF;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.menu-item:hover, .setting-item:hover {
    background: rgba(45, 107, 115, 0.25);
    transform: translateX(4px);
    box-shadow: 0 2px 12px rgba(0, 59, 70, 0.3);
    border-left: 3px solid var(--teal-light);
}

.menu-item.active {
    background: linear-gradient(90deg, rgba(45, 107, 115, 0.4), rgba(192, 222, 229, 0.2));
    border-left: 4px solid var(--teal-medium);
    transform: translateX(4px);
    box-shadow: 0 2px 16px rgba(45, 107, 115, 0.4);
    font-weight: 600;
}

.menu-item i, .setting-item i {
    width: 18px;
    text-align: center;
    color: #C0DEE5;
    font-size: 16px;
}

.menu-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.menu-name {
    font-weight: 500;
    margin-bottom: 2px;
    transition: background-color 0.2s ease;
    padding: 2px 4px;
    border-radius: 3px;
    margin-left: -4px;
}

.menu-name:hover {
    background-color: rgba(15, 164, 175, 0.1);
    cursor: pointer;
}

.menu-meta {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    display: flex;
    gap: 8px;
}

.menu-actions {
    display: flex;
    gap: 4px;
    opacity: 1;
    transition: opacity 0.2s ease;
}

.item-controls.menu-actions {
    opacity: 1 !important;
}

.menu-item:hover .menu-actions {
    opacity: 1;
}

.menu-action {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #444;
    font-size: 12px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.menu-action:hover {
    color: #333;
    background: rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 0, 0, 0.2);
}

.dark-mode .menu-action {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.85);
}

.dark-mode .menu-action:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.new-menu-item {
    padding: 12px 20px 12px 52px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: background 0.2s ease;
    font-size: 13px;
    color: var(--primary-bg-end);
    border: 1px dashed rgba(52, 152, 219, 0.3);
    margin: 8px 20px;
    border-radius: 6px;
}

.new-menu-item:hover {
    background: rgba(52, 152, 219, 0.1);
    border-color: rgba(52, 152, 219, 0.5);
}

.new-menu-item i {
    width: 16px;
    text-align: center;
}

.menu-limit-notice {
    padding: 16px 20px;
    margin: 8px 20px;
    border-radius: 6px;
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid rgba(231, 76, 60, 0.2);
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
}

.menu-limit-notice i {
    display: block;
    font-size: 20px;
    margin-bottom: 8px;
    color: #e74c3c;
}

.menu-limit-notice span {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 4px;
}

.menu-limit-notice small {
    display: block;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
}

/* Main Layout Adjustments */
.main-layout {
    transition: margin-left 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    z-index: auto;
}

.sidebar.open ~ .main-layout {
    margin-left: 320px;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #E8F5F7;
    padding: 15px 20px;
    border-bottom: 1px solid #ecf0f1;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

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

.sidebar-toggle {
    padding: 8px 12px;
    font-size: 16px;
}

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

.current-menu-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
    transition: background-color 0.2s ease;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
}

.current-menu-name:hover {
    background-color: rgba(15, 164, 175, 0.1);
}

.menu-name-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rename-menu-btn {
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
    opacity: 0.7;
}

.rename-menu-btn:hover {
    opacity: 1;
    background-color: rgba(15, 164, 175, 0.1);
}

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

/* Menu name in header-controls styling */
.header-controls .current-menu-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-right: 20px;
    padding: 4px 12px;
    background-color: rgba(15, 164, 175, 0.08);
    border-radius: 6px;
    border: 1px solid rgba(15, 164, 175, 0.2);
}

.header-controls .current-menu-name {
    font-size: 13px;
}

.header-controls .menu-status-row {
    font-size: 10px;
}

.menu-status-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.menu-status {
    font-size: 11px;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.menu-status.published {
    color: var(--success);
}

.menu-status.draft {
    color: #f39c12;
}

.change-indicator {
    font-size: 10px;
    display: flex;
    align-items: center;
    gap: 3px;
    transition: all 0.3s ease;
}

.change-indicator.saved {
    color: var(--success);
}

.change-indicator.unsaved {
    color: #e74c3c;
    animation: pulse 2s infinite;
}

.change-indicator.saving {
    color: var(--primary-bg-end);
}

.change-indicator.needs-publish {
    color: #f39c12;
}

.change-indicator.draft-saved {
    color: #3498db;
    font-weight: 600;
}

/* Highlight publish button when there are unpublished changes */
#publish-menu.has-changes {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.6; }
    100% { opacity: 1; }
}

.publish-group {
    display: flex;
    gap: 8px;
    align-items: center;
}

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

/* Discard Modal Styles */
.discard-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 20px 0;
}

.discard-option {
    width: 100%;
}

.btn-large {
    width: 100%;
    padding: 16px 20px;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 15px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    color: #495057;
    transition: all 0.2s ease;
}

.btn-large:hover {
    background: #e9ecef;
    border-color: #007bff;
    color: #007bff;
}

.btn-large i {
    font-size: 20px;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.button-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.button-title {
    font-weight: 600;
    font-size: 14px;
}

.button-subtitle {
    font-size: 12px;
    color: #6c757d;
    font-weight: normal;
}

.btn-warning {
    background-color: var(--warning); /* Rust/terracotta */
    border-color: var(--warning);
    color: white;
}

.btn-warning:hover {
    background-color: #7a3729; /* Darker rust */
    border-color: #7a3729;
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        width: 280px;
        left: -280px;
    }
    
    .sidebar.open ~ .main-layout {
        margin-left: 0;
    }
    
    .header-left h1 {
        display: none;
    }

    /* Adjust menu name styling on mobile */
    .header-controls .current-menu-info {
        margin-right: 10px;
        padding: 2px 8px;
    }

    .header-controls .current-menu-name {
        font-size: 12px;
    }

    .header-controls .menu-status-row {
        font-size: 9px;
        gap: 4px;
    }

    .rename-menu-btn {
        padding: 2px 4px;
    }
}

/* Logo Styles */
.menu-logo {
    display: block;
    width: 60vw;
    max-width: 60vw;
    height: auto;
    margin: 0 auto 20px auto;
    border-radius: var(--radius-small);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    object-fit: contain;
}

.menu-logo.small {
    width: 45vw;
    max-width: 45vw;
}

.menu-logo.medium {
    width: 60vw;
    max-width: 60vw;
}

.menu-logo.large {
    width: 75vw;
    max-width: 75vw;
}

/* Preview Modal specific logo sizing - fixed pixel sizes for phone frame */
#preview-modal .menu-logo {
    width: 60%;
    max-width: 207px; /* 60% of 345px phone width */
    max-height: 120px;
    height: auto;
    margin: 0 auto 15px auto;
    object-fit: contain;
}

#preview-modal .menu-logo.small {
    width: 45% !important;
    max-width: 155px !important; /* 45% of 345px phone width */
    max-height: 80px !important;
}

#preview-modal .menu-logo.medium {
    width: 60% !important;
    max-width: 207px !important; /* 60% of 345px phone width */
    max-height: 120px !important;
}

#preview-modal .menu-logo.large {
    width: 75% !important;
    max-width: 259px !important; /* 75% of 345px phone width */
    max-height: 150px !important;
}

/* Desktop overrides for reasonable max sizes */
@media (min-width: 769px) {
    .menu-logo {
        width: auto;
        max-width: 300px;
        max-height: 180px;
    }
    
    .menu-logo.small {
        max-width: 200px;
        max-height: 120px;
    }
    
    .menu-logo.medium {
        max-width: 300px;
        max-height: 180px;
    }
    
    .menu-logo.large {
        max-width: 400px;
        max-height: 240px;
    }
}

/* Logo controls in editor */
.logo-controls {
    position: relative;
    display: flex;
    gap: 8px;
    align-items: center;
}

.logo-dropdown {
    /* Extends .dropdown base class */
    min-width: 300px;
}

.logo-section {
    margin-bottom: 15px;
}

.logo-section:last-child {
    margin-bottom: 0;
}

.logo-section label {
    font-weight: 600;
    font-size: 12px;
    color: #0A1A2F;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    display: block;
}

.logo-upload-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.logo-thumbnail {
    width: 80px;
    height: 80px;
    border: 2px solid #e0e0e0;
    border-radius: var(--radius-small);
    overflow: hidden;
    position: relative;
    background: #f9f9f9;
}

.logo-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.remove-thumbnail-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 10px;
}

.remove-thumbnail-btn:hover {
    background: #dc3545;
}

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

.size-option {
    /* Extends .dropdown-option base class */
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 8px;
}

/* Hover state handled by .dropdown-option:hover */

/* Active state handled by .dropdown-option.active */

.size-option i {
    font-size: 16px;
    color: #0A1A2F;
    margin-bottom: 4px;
}

.size-option span {
    font-size: 12px;
    font-weight: 600;
    color: #0A1A2F;
    margin-bottom: 2px;
}

.size-option small {
    font-size: 10px;
    color: #2A3B52;
    opacity: 0.7;
}

.logo-preview {
    max-width: 120px;
    max-height: 80px;
    border: 2px dashed #ddd;
    border-radius: var(--radius-small);
    padding: 10px;
    background: #f9f9f9;
    text-align: center;
    margin: 10px 0;
}

.logo-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.logo-placeholder {
    color: #999;
    font-size: 14px;
    padding: 20px;
}

.logo-size-controls {
    display: flex;
    gap: 5px;
    margin-top: 10px;
    align-items: center;
}

.logo-size-btn {
    padding: 4px 8px;
    border: 1px solid #ddd;
    background: #E8F5F7;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.logo-size-btn.active {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

/* Glass Effect for Menu Sections - Matching Navigation Style */
.preview-section {
    background: rgba(255, 255, 255, 0.25) !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-none);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.preview-section:hover {
    background: rgba(255, 255, 255, 0.3) !important;
    backdrop-filter: blur(12px) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

/* Column Headers with Liquid Glass Effect */
.preview-column-headers {
    display: grid;
    gap: 10px;
    margin-bottom: 15px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.2);

    -webkit-/* backdrop-filter removed for performance */
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: var(--radius-medium);
    box-shadow: 0 4px 16px rgba(31, 38, 135, 0.1),
                0 0 0 1px rgba(255, 255, 255, 0.15);
}

.preview-column-header {
    font-weight: 600;
    color: var(--text-primary);
    text-align: left !important; /* Default left alignment for liquid glass headers */
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.25);

    -webkit-/* backdrop-filter removed for performance */
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-small);
    box-shadow: 0 2px 8px rgba(31, 38, 135, 0.08);
    transition: all 0.2s ease;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.preview-column-header:hover {

    -webkit-/* backdrop-filter removed for performance */
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(31, 38, 135, 0.15);
}

.preview-price-header {
    color: var(--accent-color, var(--success));
    font-weight: 700;
    text-align: right; /* Ensure price headers are right-aligned */
}

/* Modal sections also get glass effect */
.modal .preview-section {
    background: rgba(255, 255, 255, 0.25) !important;
    backdrop-filter: blur(10px) !important;
}

.modal .preview-column-headers {
    background: rgba(255, 255, 255, 0.18);

    -webkit-/* backdrop-filter removed for performance */
}

.modal .preview-column-header {
    background: rgba(255, 255, 255, 0.22);

    -webkit-/* backdrop-filter removed for performance */
}

/* Font Family Controls */
.font-controls {
    position: relative;
    display: inline-block;
}

.font-dropdown {
    /* Extends .dropdown base class */
    min-width: 280px;
}

.font-section label {
    display: block;
    font-weight: 600;
    color: #0A1A2F;
    margin-bottom: 10px;
    font-size: 14px;
}

.font-family-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.font-option {
    /* Extends .dropdown-option base class */
    padding: 12px 15px;
}

/* Hover state handled by .dropdown-option:hover */

/* Selected state handled by .dropdown-option.selected */

.font-option span {
    display: block;
    font-size: 16px;
    font-weight: 500;
    color: #0A1A2F;
    margin-bottom: 2px;
}

.font-option small {
    color: #7f8c8d;
    font-size: 12px;
    font-style: italic;
}

/* Color Palette Controls */
.color-controls {
    position: relative;
    display: inline-block;
}

.color-dropdown {
    /* Extends .dropdown base class */
    min-width: 320px;
}

.color-section label {
    display: block;
    font-weight: 600;
    color: #0A1A2F;
    margin-bottom: 12px;
    font-size: 14px;
}

.color-palette-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.palette-option {
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: var(--radius-small);
    cursor: pointer;
    transition: all 0.2s ease;
    background: #E8F5F7;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.palette-option:hover {
    border-color: var(--primary-bg-end);
    background: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.15);
}

.palette-option.selected {
    border-color: var(--primary-bg-end);
    background: #e3f2fd;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.palette-preview {
    display: flex;
    gap: 2px;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.color-swatch {
    width: 16px;
    height: 16px;
    flex: 1;
}

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

.palette-name {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 13px;
    margin-bottom: 2px;
}

.palette-info small {
    color: #7f8c8d;
    font-size: 11px;
    font-style: italic;
}

/* Global price alignment rule - catch-all */
[class*="price"], [data-type*="price"], .price, .Price {
    text-align: right !important;
    margin-left: auto;
    justify-self: end !important;
    flex-shrink: 0;
    grid-column: -1; /* Always place price elements in last column */
}

/* Dark Mode Toggle Switch */
.toggle-switch {
    position: relative;
    width: 44px;
    height: 22px;
    margin-left: auto;
}

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

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

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 2px;
    background-color: #E8F5F7;
    transition: 0.3s;
    border-radius: 50%;
}

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

input:checked + .slider:before {
    transform: translateX(22px);
}

#dark-mode-toggle {
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

#dark-mode-toggle:hover {
    background-color: rgba(52, 152, 219, 0.1);
}

/* Dark Mode Styles - Only affects editor UI, NOT preview areas */
body.dark-mode {
    background-color: var(--primary-bg-start);
    color: var(--text-primary);
}

.dark-mode .container {
    background-color: var(--primary-bg-start);
}

.dark-mode .header {
    background: var(--light-surface);
    border-bottom: 1px solid var(--surface-medium);
    box-shadow: var(--elevation-2);
}

.dark-mode .header h1 {
    color: var(--text-primary);
}

.dark-mode .current-menu-name {
    color: var(--text-primary);
}

.dark-mode .toolbar {
    background: var(--light-surface);
    border-bottom: 1px solid var(--surface-medium);
    box-shadow: var(--elevation-2);
}

.dark-mode .menu-container {
    background: var(--light-surface);
    box-shadow: var(--elevation-2);
}

/* Updated dark mode styles using design tokens */
.dark-mode .menu-section {
    background: var(--light-surface);
    border-color: var(--surface-medium);
}

.dark-mode .menu-section:hover {
    border-color: var(--accent-color);
}

.dark-mode .section-header {
    background: var(--surface-light);
    color: var(--text-primary);
}

.dark-mode .section-content {
    background: var(--light-surface);
}

.dark-mode .column-headers {
    background: var(--surface-light);
    border: 1px solid var(--surface-medium);
}

.dark-mode .column-header {
    background: var(--light-surface);
    border: 1px solid var(--surface-medium);
    color: var(--text-primary);
}

.dark-mode .column-header:hover {
    border-color: var(--primary-bg-end);
}

.dark-mode .menu-item {
    background: var(--light-surface);
}

.dark-mode .menu-item:hover {
    border-color: var(--surface-medium);
    background: rgba(2, 73, 80, 0.5);
}

.dark-mode .menu-item input {
    background: var(--surface-light);
    border: 1px solid var(--surface-medium);
    color: var(--text-primary);
}

.dark-mode .menu-item input:focus {
    border-color: var(--primary-bg-end);
    background: var(--primary-bg-start);
}

.dark-mode .menu-item input:hover {
    border-color: var(--accent-color);
}

.dark-mode .add-item-btn {
    background: var(--surface-light);
    border: 2px dashed var(--surface-medium);
    color: var(--text-secondary);
}

.dark-mode .add-item-btn:hover {
    background: var(--primary-bg-start);
    border-color: var(--accent-color);
    color: var(--text-primary);
}

.dark-mode .add-column-header .add-column-btn {
    background: var(--surface-light);
    border: 2px dashed var(--surface-medium);
    color: var(--text-secondary);
}

.dark-mode .add-column-header .add-column-btn:hover {
    background: var(--primary-bg-start);
    border-color: var(--accent-color);
    color: var(--text-primary);
}

/* Dark mode for Add Column button in section header */
.dark-mode .section-controls .add-column-btn {
    /* Inherits from .dark-mode .section-controls button */
}

/* Dark mode - Ensure icons remain visible */
.dark-mode .section-controls button i,
.dark-mode .section-controls button .fas {
    color: var(--text-primary) !important;
    opacity: 1 !important;
}

.dark-mode .section-controls button:hover i,
.dark-mode .section-controls button:hover .fas {
    color: #ffffff !important;
}

.dark-mode .modal-content {
    background-color: var(--light-surface);
    color: var(--text-primary);
}

.dark-mode .modal-header {
    border-bottom: 1px solid var(--surface-medium);
}

.dark-mode .modal-header h2 {
    color: var(--text-primary);
}

.dark-mode .modal-body label {
    color: var(--text-primary);
}

.dark-mode .modal-body input,
.dark-mode .modal-body select {
    background: var(--surface-light);
    border: 1px solid var(--surface-medium);
    color: var(--text-primary);
}

.dark-mode .modal-body input:focus,
.dark-mode .modal-body select:focus {
    border-color: var(--primary-bg-end);
    background: var(--primary-bg-start);
}

/* Dark mode for dropdowns now handled by .dark-mode .dropdown */

/* Dark mode for options now handled by .dark-mode .dropdown-option */
.dark-mode .palette-option,
.dark-mode .theme-option {
    background: rgba(245, 247, 250, 0.08);
    border: 2px solid rgba(245, 247, 250, 0.2);
    color: #F5F7FA;
}

/* Hover states now handled by .dropdown-option:hover */
.dark-mode .palette-option:hover,
.dark-mode .theme-option:hover {
    border-color: var(--accent-color);
    background: rgba(255, 76, 41, 0.1);
}

.dark-mode .logo-section label,
.dark-mode .background-section label,
.dark-mode .font-section label,
.dark-mode .color-section label,
.dark-mode .navigation-section label {
    color: var(--text-primary);
}

.dark-mode .palette-name,
.dark-mode .theme-name {
    color: #f0f0f0 !important;
}

/* Dark mode text colors for specific option types */
.dark-mode .size-option span,
.dark-mode .size-option i,
.dark-mode .font-option span,
.dark-mode .background-option span {
    color: #F5F7FA;
}

.dark-mode .size-option small {
    color: rgba(245, 247, 250, 0.7);
}

.dark-mode .palette-option small,
.dark-mode .theme-option small,
.dark-mode .font-option small {
    color: #b0b0b0 !important;
}

/* === ADD COLUMN MODAL STYLES === */

.preset-columns-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 20px;
}

.preset-column-option {
    cursor: pointer;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    padding: 12px 8px;
    text-align: center;
    transition: all 0.2s ease;
    background: #E8F5F7;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.preset-column-option:hover {
    border-color: #007bff;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.15);
}

.preset-column-option.selected {
    border-color: #007bff;
    background: #f0f8ff;
}

.preset-column-option i {
    font-size: 18px;
    color: #666;
}

.preset-column-option span {
    font-size: 12px;
    color: #333;
    font-weight: 500;
}

.custom-column-section {
    border-top: 1px solid #eee;
    padding-top: 20px;
    margin-top: 10px;
}

.custom-column-section h3 {
    margin-bottom: 10px;
    color: #333;
    font-size: 14px;
}

.custom-column-input {
    display: flex;
    gap: 8px;
    align-items: center;
}

.custom-column-input input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.column-options-section h3 {
    margin-bottom: 10px;
    color: #333;
    font-size: 14px;
}

/* Dark mode styles for add column modal */
.dark-mode .preset-column-option {
    background: var(--light-surface);
    border: 2px solid var(--surface-medium);
}

.dark-mode .preset-column-option:hover {
    border-color: var(--primary-bg-end);
    background: var(--surface-light);
}

.dark-mode .preset-column-option.selected {
    border-color: var(--primary-bg-end);
    background: var(--primary-bg-start);
}

/* Dark mode selected states for all dropdown options */
/* Selected states now handled by .dropdown-option.selected */
.dark-mode .palette-option.selected,
.dark-mode .theme-option.selected {
    border-color: var(--accent-color);
    background: rgba(255, 76, 41, 0.15);
    box-shadow: 0 0 0 2px rgba(255, 76, 41, 0.3);
}

.dark-mode .theme-option.selected .theme-preview {
    background: rgba(45, 45, 45, 0.3);
    border-color: rgba(52, 152, 219, 0.4);
}

.dark-mode .preset-column-option i {
    color: var(--text-secondary);
}

.dark-mode .preset-column-option span {
    color: var(--text-primary);
}

.dark-mode .custom-column-section {
    border-top-color: var(--surface-medium);
}

.dark-mode .custom-column-section h3,
.dark-mode .column-options-section h3 {
    color: var(--text-primary);
}

.dark-mode .custom-column-input input {
    background: var(--light-surface);
    border: 1px solid var(--surface-medium);
    color: var(--text-primary);
}

/* === SUCCESS MODAL STYLES === */

.success-modal-content {
    max-width: 500px;
    text-align: center;
}

.success-header {
    background: linear-gradient(135deg, var(--success), #2ecc71);
    color: white;
    border-radius: 12px 12px 0 0;
    padding: 25px 20px 20px;
    position: relative;
}

.success-icon {
    margin-bottom: 10px;
}

.success-icon i {
    font-size: 48px;
    color: white;
    opacity: 0.9;
}

.success-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
}

.success-header .close {
    color: white;
    opacity: 0.8;
}

.success-header .close:hover {
    opacity: 1;
}

.success-body {
    padding: 25px;
}

.success-body p {
    font-size: 16px;
    color: #333;
    margin-bottom: 20px;
    line-height: 1.5;
}

.success-url-section {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: var(--radius-small);
    padding: 15px;
    margin: 20px 0;
    text-align: left;
}

.success-url-section label {
    display: block;
    font-weight: 500;
    color: #495057;
    margin-bottom: 8px;
    font-size: 14px;
}

.success-url {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #E8F5F7;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 10px 12px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 14px;
}

.success-url i {
    color: #6c757d;
}

.success-url span {
    flex: 1;
    color: #495057;
    word-break: break-all;
}

.modal-actions {
    margin-top: 25px;
    display: flex;
    gap: 10px;
    justify-content: center;
}

/* Dark mode styles for success modal */
.dark-mode .success-body p {
    color: var(--text-primary);
}

.dark-mode .success-url-section {
    background: var(--light-surface);
    border-color: var(--surface-medium);
}

.dark-mode .success-url-section label {
    color: var(--text-primary);
}

.dark-mode .success-url {
    background: var(--surface-light);
    border-color: var(--surface-medium);
}

.dark-mode .success-url span {
    color: var(--text-primary);
}

.dark-mode .success-url i {
    color: var(--text-secondary);
}

.dark-mode #background-color-picker {
    border: 1px solid var(--surface-medium);
}

.dark-mode .url-input-group {
    border: 1px solid var(--surface-medium);
}

.dark-mode .url-prefix {
    background: var(--surface-light);
    border-right: 1px solid var(--surface-medium);
    color: var(--text-secondary);
}

.dark-mode .publish-preview {
    background: var(--surface-light);
    border: 1px solid var(--surface-medium);
}

.dark-mode .preview-url {
    background: var(--light-surface);
    border: 1px solid var(--surface-medium);
    color: var(--text-primary);
}

.dark-mode .discard-options .btn-large {
    background: var(--surface-light);
    border: 2px solid var(--surface-medium);
    color: var(--text-primary);
}

.dark-mode .discard-options .btn-large:hover {
    background: var(--primary-bg-start);
    border-color: var(--primary-bg-end);
    color: var(--primary-bg-end);
}

/* Force preview areas to always use light mode appearance */
.dark-mode .side-preview-panel {
    background-color: #f8f9fa !important;
    border-color: #dee2e6 !important;
}

.dark-mode .side-preview-controls {
    background-color: #ffffff !important;
    color: #333333 !important;
    border-bottom: 1px solid #dee2e6 !important;
}

.dark-mode .side-preview-controls h3 {
    color: #333333 !important;
}

.dark-mode .side-preview-controls .btn {
    background-color: #ffffff !important;
    color: #333333 !important;
    border: 1px solid #dee2e6 !important;
}

/* Dark Mode Sidebar Improvements */
.dark-mode .sidebar {
    /* Enhanced dark mode gradient with deeper teal tones */
    background: linear-gradient(180deg, #024950 0%, #003135 100%);
    border-right: 1px solid rgba(175, 221, 229, 0.1);
}

.dark-mode .sidebar-header {
    background: rgba(0, 49, 53, 0.8);
    border-bottom: 1px solid rgba(175, 221, 229, 0.2);
}

.dark-mode .user-avatar {
    background: linear-gradient(135deg, #0FA4AF 0%, #964734 100%);
    border: 2px solid rgba(175, 221, 229, 0.3);
}

.dark-mode .user-name {
    color: #FFFFFF;
}

.dark-mode .user-email {
    color: #AFDDE5;
}

.dark-mode .sidebar-close {
    color: #AFDDE5;
}

.dark-mode .sidebar-close:hover {
    color: #FFFFFF;
    background: rgba(150, 71, 52, 0.4);
}

.dark-mode .section-header {
    background: rgba(15, 164, 175, 0.2);
}

.dark-mode .section-header:hover {
    background: rgba(15, 164, 175, 0.3);
}

.dark-mode .section-header i:first-child {
    color: #0FA4AF;
}

.dark-mode .section-header span {
    color: #FFFFFF;
}

.dark-mode .section-toggle {
    color: #AFDDE5;
}

.dark-mode .menu-item,
.dark-mode .setting-item {
    color: #FFFFFF;
}

.dark-mode .menu-item:hover,
.dark-mode .setting-item:hover {
    background: rgba(2, 73, 80, 0.5);
}

.dark-mode .menu-item.active {
    background: linear-gradient(90deg, rgba(15, 164, 175, 0.4), rgba(150, 71, 52, 0.3));
    border-left: 4px solid #0FA4AF;
}

.dark-mode .menu-item i,
.dark-mode .setting-item i {
    color: #AFDDE5;
}

.dark-mode .sidebar-footer {
    background: rgba(0, 49, 53, 0.5);
    border-top: 1px solid rgba(175, 221, 229, 0.15);
}

.dark-mode .sidebar-footer .setting-item {
    background: rgba(150, 71, 52, 0.3);
    border: 1px solid rgba(150, 71, 52, 0.4);
}

.dark-mode .sidebar-footer .setting-item:hover {
    background: rgba(150, 71, 52, 0.5);
}

.dark-mode .system-updated-info {
    background: rgba(2, 73, 80, 0.5);
    color: #AFDDE5;
    border: 1px solid rgba(175, 221, 229, 0.15);
}

/* Phone Preview Modal Sidebar Enhancements */
#preview-modal .sidebar {
    background: linear-gradient(180deg, #003135 0%, #024950 100%);
    border-right: 2px solid rgba(175, 221, 229, 0.2);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.3);
}

#preview-modal .sidebar-header {
    background: rgba(0, 49, 53, 0.9);
    border-bottom: 2px solid rgba(175, 221, 229, 0.3);
    backdrop-filter: blur(10px);
}

#preview-modal .section-header {
    background: rgba(15, 164, 175, 0.2);
    border: 1px solid rgba(15, 164, 175, 0.3);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

#preview-modal .section-header:hover {
    background: rgba(15, 164, 175, 0.3);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 2px 8px rgba(15, 164, 175, 0.2);
}

#preview-modal .menu-item,
#preview-modal .setting-item {
    background: rgba(2, 73, 80, 0.1);
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

#preview-modal .menu-item:hover,
#preview-modal .setting-item:hover {
    background: rgba(2, 73, 80, 0.4);
    border: 1px solid rgba(175, 221, 229, 0.2);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.2);
}

#preview-modal .menu-item.active {
    background: linear-gradient(90deg, rgba(15, 164, 175, 0.4), rgba(150, 71, 52, 0.3));
    border: 1px solid #0FA4AF;
    box-shadow: 0 3px 15px rgba(15, 164, 175, 0.4);
}

#preview-modal .sidebar-footer {
    background: rgba(0, 49, 53, 0.6);
    border-top: 2px solid rgba(175, 221, 229, 0.2);
    backdrop-filter: blur(10px);
}

#preview-modal .sidebar-footer .setting-item {
    background: rgba(150, 71, 52, 0.3);
    border: 2px solid rgba(150, 71, 52, 0.4);
}

#preview-modal .sidebar-footer .setting-item:hover {
    background: rgba(150, 71, 52, 0.5);
    border: 2px solid rgba(150, 71, 52, 0.6);
    box-shadow: 0 3px 12px rgba(150, 71, 52, 0.4);
}

/* Dark mode enhancements for preview modal */
.dark-mode #preview-modal .sidebar {
    background: linear-gradient(180deg, #024950 0%, #003135 100%);
    border-right: 2px solid rgba(175, 221, 229, 0.15);
}

.dark-mode #preview-modal .sidebar-header {
    background: rgba(0, 49, 53, 0.9);
    border-bottom: 2px solid rgba(175, 221, 229, 0.2);
}

.dark-mode #preview-modal .section-header {
    background: rgba(15, 164, 175, 0.25);
    border: 1px solid rgba(15, 164, 175, 0.4);
}

.dark-mode #preview-modal .section-header:hover {
    background: rgba(15, 164, 175, 0.35);
}

.dark-mode #preview-modal .menu-item:hover,
.dark-mode #preview-modal .setting-item:hover {
    background: rgba(2, 73, 80, 0.6);
}

.dark-mode #preview-modal .sidebar-footer {
    background: rgba(0, 49, 53, 0.7);
    border-top: 2px solid rgba(175, 221, 229, 0.15);
}

/* Accessibility and Focus States */
.sidebar *:focus {
    outline: 2px solid #0FA4AF;
    outline-offset: 2px;
    border-radius: 4px;
}

.sidebar-close:focus,
.section-header:focus,
.menu-item:focus,
.setting-item:focus {
    outline: 2px solid #0FA4AF;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(15, 164, 175, 0.3);
}

.dark-mode .sidebar *:focus,
.dark-mode .sidebar-close:focus,
.dark-mode .section-header:focus,
.dark-mode .menu-item:focus,
.dark-mode .setting-item:focus {
    outline: 2px solid #AFDDE5;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(175, 221, 229, 0.3);
}

/* Improved smartphone content area for sidebar visibility */
#preview-modal .smartphone-content {
    background-color: #FFFFFF !important;
    border: 2px solid rgba(0, 49, 53, 0.1);
    box-shadow: inset 0 0 0 1px rgba(175, 221, 229, 0.2);
}

.dark-mode #preview-modal .smartphone-content {
    background-color: #FFFFFF !important;
    border: 2px solid rgba(2, 73, 80, 0.3);
    box-shadow: inset 0 0 0 1px rgba(175, 221, 229, 0.1);
}

.dark-mode .smartphone-frame {
    background: linear-gradient(145deg, #2c3e50, #34495e) !important;
}

.dark-mode .smartphone-screen {
    background-color: #ffffff !important;
}

.dark-mode .smartphone-content,
.dark-mode .preview-content,
.dark-mode .side-preview-content {
    background-color: #ffffff !important;
    color: #333333 !important;
}

/* =============================================
   DARK MODE SIDEBAR IMPROVEMENTS
   ============================================= */

/* Dark Mode Sidebar Background */
.dark-mode .smartphone-content .sidebar,
.dark-mode .preview-modal .sidebar,
.dark-mode #preview-modal .sidebar {
    background: linear-gradient(180deg,
        rgba(2, 73, 80, 0.98) 0%,
        rgba(0, 49, 53, 0.96) 100%) !important;
    border-right: 1px solid rgba(175, 221, 229, 0.15);
}

/* Dark Mode Sidebar Text - Enhanced Contrast */
.dark-mode .smartphone-content .sidebar *,
.dark-mode .preview-modal .sidebar *,
.dark-mode #preview-modal .sidebar * {
    color: #AFDDE5 !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* Dark Mode Section Headers */
.dark-mode .sidebar .section-header,
.dark-mode .smartphone-content .section-header,
.dark-mode .preview-modal .section-header {
    background: rgba(15, 164, 175, 0.2) !important;
    border: 1px solid rgba(175, 221, 229, 0.15) !important;
    color: #ffffff !important;
}

/* Dark Mode Menu Items Hover */
.dark-mode .sidebar .menu-item:hover,
.dark-mode .sidebar .setting-item:hover,
.dark-mode .smartphone-content .menu-item:hover,
.dark-mode .smartphone-content .setting-item:hover {
    background: rgba(15, 164, 175, 0.25) !important;
}

/* Dark Mode User Info */
.dark-mode .sidebar .user-info,
.dark-mode .smartphone-content .user-info {
    background: rgba(15, 164, 175, 0.08) !important;
    border-bottom: 1px solid rgba(175, 221, 229, 0.15) !important;
}

/* Dark Mode User Name */
.dark-mode .sidebar .user-name,
.dark-mode .smartphone-content .user-name {
    color: #ffffff !important;
}

/* Dark Mode Sign Out Button */
.dark-mode .sidebar .sign-out-btn,
.dark-mode .smartphone-content .sign-out-btn {
    background: rgba(150, 71, 52, 0.2) !important;
    border: 1px solid rgba(150, 71, 52, 0.4) !important;
}

.dark-mode .sidebar .sign-out-btn:hover,
.dark-mode .smartphone-content .sign-out-btn:hover {
    background: rgba(150, 71, 52, 0.3) !important;
    border-color: rgba(150, 71, 52, 0.6) !important;
}

/* Dark Mode Toggle Switches */
.dark-mode .sidebar .toggle-switch,
.dark-mode .smartphone-content .toggle-switch {
    background: rgba(15, 164, 175, 0.15) !important;
    border: 1px solid rgba(175, 221, 229, 0.2) !important;
}

/* Dark Mode Timestamp */
.dark-mode .sidebar .timestamp,
.dark-mode .smartphone-content .timestamp {
    background: rgba(2, 73, 80, 0.6) !important;
    border-top: 1px solid rgba(175, 221, 229, 0.15) !important;
}

/* Ensure all content within preview areas uses light mode colors, but exclude color palette elements */
.dark-mode .preview-content *:not(.preview-section h2):not(.preview-item-title):not(.preview-item-description):not(.preview-price-cell):not(.preview-title-price):not(.preview-menu-title):not(.preview-menu-subtitle):not(.preview-column-header):not(.preview-data-cell):not(.preview-title-text):not(.title-column-text):not(.title-price-right):not(.preview-secondary-data):not(.preview-description-inline),
.dark-mode .smartphone-content *:not(.preview-section h2):not(.preview-item-title):not(.preview-item-description):not(.preview-price-cell):not(.preview-title-price):not(.preview-menu-title):not(.preview-menu-subtitle):not(.preview-column-header):not(.preview-data-cell):not(.preview-title-text):not(.title-column-text):not(.title-price-right):not(.preview-secondary-data):not(.preview-description-inline),
.dark-mode .side-preview-content *:not(.preview-section h2):not(.preview-item-title):not(.preview-item-description):not(.preview-price-cell):not(.preview-title-price):not(.preview-menu-title):not(.preview-menu-subtitle):not(.preview-column-header):not(.preview-data-cell):not(.preview-title-text):not(.title-column-text):not(.title-price-right):not(.preview-secondary-data):not(.preview-description-inline) {
    color: inherit !important;
    background-color: transparent !important;
}

/* Allow color palette elements to use their applied colors even in dark mode - higher specificity */
.dark-mode .preview-section h2[style*="color"] {
    color: unset !important;
}
.dark-mode .preview-item-title[style*="color"],
.dark-mode .preview-item-description[style*="color"],
.dark-mode .preview-price-cell[style*="color"], 
.dark-mode .preview-title-price[style*="color"],
.dark-mode .preview-menu-title[style*="color"],
.dark-mode .preview-menu-subtitle[style*="color"],
.dark-mode .preview-column-header[style*="color"],
.dark-mode .preview-data-cell[style*="color"],
.dark-mode .preview-title-text[style*="color"],
.dark-mode .title-column-text[style*="color"],
.dark-mode .title-price-right[style*="color"],
.dark-mode .preview-secondary-data[style*="color"],
.dark-mode .preview-description-inline[style*="color"] {
    color: unset !important;
}

/* Navigation in preview should also be light */
.dark-mode .preview-navigation {
    background-color: transparent !important;
    color: #333333 !important;
}

.dark-mode .nav-tab,
.dark-mode .nav-dock-container,
.dark-mode .nav-dock {
    background-color: transparent !important;
    color: #333333 !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .color-dropdown {
        min-width: 280px;
        left: -140px; /* Center on mobile */
    }
    
    .color-palette-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    /* Global price alignment for mobile */
    [class*="price"], [data-type*="price"], .price, .Price {
        text-align: right !important;
        margin-left: auto;
        justify-self: end !important;
        align-self: flex-end !important;
        width: auto;
        display: inline-block;
        grid-column: -1 !important; /* Always place price elements in last column on mobile */
    }
}

/* Navigation Controls */
.navigation-controls {
    position: relative;
    display: inline-block;
}

.navigation-dropdown {
    /* Extends .dropdown base class */
    min-width: 320px;
}

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

.navigation-section:last-child {
    margin-bottom: 0;
}

.navigation-section label {
    display: block;
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 12px;
    font-size: 14px;
}

.navigation-theme-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.theme-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-small);
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--input-background);
}

.theme-option:hover {
    border-color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.theme-option.selected {
    border-color: var(--primary-bg-end);
    background: #e3f2fd;
    box-shadow: 0 0 0 1px rgba(52, 152, 219, 0.2);
}

.theme-option.selected .theme-preview {
    background: rgba(248, 249, 250, 0.3);
    border-color: rgba(52, 152, 219, 0.3);
}

.theme-preview {
    width: 60px;
    height: 40px;
    border-radius: 6px;
    overflow: hidden;
    background: #f8f9fa;
    position: relative;
    border: 1px solid #e9ecef;
    flex-shrink: 0;
}

.nav-demo {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
}

.demo-tab {
    background: var(--accent-color, var(--success));
    color: white;
    font-size: 8px;
    font-weight: 600;
    text-align: center;
    padding: 2px 0;
    flex-shrink: 0;
}

.demo-dock {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 4px;
}

.demo-item {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary-text-color, var(--text-primary));
    opacity: 0.7;
}

/* Modern Theme Demo */
.modern-demo {
    background: linear-gradient(135deg, var(--background-color, #ffffff) 0%, var(--secondary-text-color, #5a6c7d) 100%);
}

.modern-demo .demo-tab {
    background: var(--accent-color, var(--success));
    border-radius: 0;
}

.modern-demo .demo-item {
    background: var(--primary-text-color, var(--text-primary));
    border-radius: 2px;
}

/* Glass Theme Demo */
.glass-demo {
    background: linear-gradient(135deg, var(--background-color, #ffffff) 0%, var(--accent-color, var(--success)) 100%);

}

.glass-demo .demo-tab {
    background: rgba(255, 255, 255, 0.2);

    color: var(--primary-text-color, var(--text-primary));
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.glass-demo .demo-item {
    background: rgba(255, 255, 255, 0.4);

    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Minimal Theme Demo */
.minimal-demo {
    background: var(--background-color, #ffffff);
    border: 1px solid var(--border-color, #e9ecef);
}

.minimal-demo .demo-tab {
    background: transparent;
    color: var(--primary-text-color, var(--text-primary));
    border-bottom: 1px solid var(--border-color, #e9ecef);
}

.minimal-demo .demo-item {
    background: transparent;
    border: 1px solid var(--primary-text-color, var(--text-primary));
    border-radius: 0;
}

.theme-info {
    flex: 1;
}

.theme-name {
    font-weight: 500;
    color: var(--text-color);
    display: block;
    margin-bottom: 4px;
}

.theme-info small {
    color: var(--text-muted);
    font-size: 12px;
}

/* Navigation Theme Styles for Actual Preview */
.preview-navigation.theme-modern,
body .preview-navigation.theme-modern {
    background: transparent;
    border-top: none;
}

.preview-navigation.theme-modern .nav-tab,
body .preview-navigation.theme-modern .nav-tab {
    background: var(--nav-accent-color, var(--success)) !important;
    color: white !important;
    border-radius: 12px !important;
    font-weight: 600;
    min-width: 80px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.preview-navigation.theme-modern .nav-dock {
    background: transparent;
}

.preview-navigation.theme-modern .nav-dock-item {
    background: var(--nav-primary-color, var(--text-primary)) !important;
    color: white !important;
    border-radius: 12px !important;
    min-width: 80px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.preview-navigation.theme-glass,
body .preview-navigation.theme-glass {
    background: transparent;
    backdrop-filter: none;
    border-top: none;
}

.preview-navigation.theme-glass .nav-tab,
body .preview-navigation.theme-glass .nav-tab {
    background: rgba(255, 255, 255, 0.2) !important;
    backdrop-filter: blur(10px) !important;
    color: var(--nav-primary-color, var(--text-primary)) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 12px !important;
    min-width: 80px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.preview-navigation.theme-glass .nav-dock {
    background: transparent;
    backdrop-filter: none;
    border-radius: var(--radius-none);
    border: none;
}

.preview-navigation.theme-glass .nav-dock-item {
    background: rgba(255, 255, 255, 0.3) !important;
    backdrop-filter: blur(5px) !important;
    color: var(--nav-primary-color, var(--text-primary)) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 12px !important;
    min-width: 80px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.preview-navigation.theme-minimal,
body .preview-navigation.theme-minimal {
    background: transparent;
    border-top: none;
}

.preview-navigation.theme-minimal .nav-tab,
body .preview-navigation.theme-minimal .nav-tab {
    background: var(--nav-background-color, #ffffff) !important;
    color: var(--nav-primary-color, var(--text-primary)) !important;
    border: 1px solid var(--nav-primary-color, var(--text-primary)) !important;
    border-radius: 12px !important;
    min-width: 80px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.preview-navigation.theme-minimal .nav-dock {
    background: transparent;
}

.preview-navigation.theme-minimal .nav-dock-item {
    background: var(--nav-background-color, #ffffff) !important;
    color: var(--nav-primary-color, var(--text-primary)) !important;
    border: 1px solid var(--nav-primary-color, var(--text-primary)) !important;
    border-radius: 12px !important;
    min-width: 80px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
/* Hide file input elements that should be triggered by buttons */
#import-file,
#logo-file-input,
#background-upload {
    display: none !important;
}

/* === DRAG-AND-DROP COLUMN PROMINENCE INTERFACE === */

.prominence-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 15px 0;
    min-height: 200px;
}

.prominence-section {
    border: 2px dashed rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    padding: 16px;
    background: linear-gradient(145deg, #fafafa 0%, #f5f5f5 100%);
    transition: all 0.3s ease;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.04);
    position: relative;
    min-height: 140px;
    overflow: hidden;
}

.prominence-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: transparent;
    transition: all 0.3s ease;
}

.prominence-section:hover {
    border-color: #0ea5e9;
    background: linear-gradient(145deg, #f0f9ff 0%, #e0f2fe 100%);
    box-shadow: inset 0 1px 3px rgba(14, 165, 233, 0.08), 0 2px 8px rgba(14, 165, 233, 0.1);
}

.prominence-section:hover::before,
.prominence-section:focus-within::before {
    background: linear-gradient(90deg, #0ea5e9, #06b6d4);
}

.prominence-section:focus-within {
    border-color: #0ea5e9;
    background: linear-gradient(145deg, #f0f9ff 0%, #e0f2fe 100%);
    box-shadow: inset 0 1px 3px rgba(14, 165, 233, 0.08), 0 2px 8px rgba(14, 165, 233, 0.1), 0 0 0 4px rgba(14, 165, 233, 0.1);
}

.prominence-section.drag-over {
    border-color: #0ea5e9;
    border-style: solid;
    background: linear-gradient(145deg, #dbeafe 0%, #bfdbfe 100%);
    box-shadow: 0 4px 16px rgba(14, 165, 233, 0.25), inset 0 2px 4px rgba(14, 165, 233, 0.1);
    transform: scale(1.02);
}

.prominence-section.drag-over::before {
    background: linear-gradient(90deg, #3b82f6, #1d4ed8);
    height: 4px;
}

.prominence-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e0e0e0;
}

.prominence-header i {
    color: #0FA4AF;
    font-size: 16px;
}

.prominence-header span {
    font-weight: 600;
    color: #024950;
    font-size: 14px;
}

.prominence-header small {
    color: #666;
    font-size: 12px;
    margin-left: auto;
}

.columns-drop-zone {
    min-height: 120px;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
    align-items: flex-start;
    align-content: flex-start;
}

.columns-drop-zone.empty {
    display: flex;
    align-items: center;
    justify-content: center;
    font-style: italic;
    color: #999;
}

.columns-drop-zone.empty::before {
    content: "Drop columns here or press Enter to select";
    display: flex;
    align-items: center;
    gap: 8px;
    font-style: italic;
    color: #6b7280;
}

.columns-drop-zone.empty::after {
    content: "📂";
    font-size: 18px;
}

.column-drag-item {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    cursor: grab;
    transition: all 0.2s ease;
    user-select: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
    margin: 4px;
    max-width: none;
    width: auto;
    min-height: 48px;
    position: relative;
    font-size: 14px;
}

.column-drag-item:hover {
    background: linear-gradient(145deg, #f8f9fa 0%, #f1f3f4 100%);
    border-color: #0ea5e9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.15), 0 2px 6px rgba(0, 0, 0, 0.1);
}

.column-drag-item:active,
.column-drag-item.dragging {
    cursor: grabbing;
    transform: rotate(2deg) scale(1.05);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25), 0 4px 12px rgba(14, 165, 233, 0.15);
    z-index: 1000;
    border-color: #0ea5e9;
    background: linear-gradient(145deg, #ffffff 0%, #f0f9ff 100%);
}

.column-drag-item.dragging .drag-handle {
    background: #0ea5e9;
    color: white;
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.4);
}

.column-drag-item:focus-within {
    outline: 2px solid #0ea5e9;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.1);
}

.column-drag-item .drag-handle {
    color: #6b7280;
    font-size: 16px;
    cursor: grab;
    padding: 6px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    min-height: 32px;
    backdrop-filter: blur(4px);
    outline: none;
}

.column-drag-item .drag-handle:hover {
    color: #374151;
    background: rgba(255, 255, 255, 1);
    transform: scale(1.08);
    border-color: rgba(0, 0, 0, 0.12);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.column-drag-item .drag-handle:focus {
    outline: 2px solid #0ea5e9;
    outline-offset: 2px;
    background: rgba(255, 255, 255, 1);
    border-color: #0ea5e9;
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.1);
}

.column-drag-item .drag-handle:active {
    cursor: grabbing;
    transform: scale(1.02);
    background: #0ea5e9;
    color: white;
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.3);
}

.column-drag-item .column-name {
    flex: 1;
    font-weight: 600;
    color: #374151;
    margin-right: auto;
    text-transform: capitalize;
    letter-spacing: 0.01em;
    line-height: 1.4;
}

.column-drag-item .column-badge {
    background: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%);
    color: white;
    padding: 5px 12px;
    border-radius: 16px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 2px 4px rgba(14, 165, 233, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.prominent-section .column-drag-item .column-badge {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    box-shadow: 0 2px 4px rgba(249, 115, 22, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.standard-section .column-drag-item .column-badge {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
    box-shadow: 0 2px 4px rgba(100, 116, 139, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Sortable.js specific styles */
.sortable-ghost {
    opacity: 0.4;
    background: #e6f9fb !important;
    border: 2px dashed #0FA4AF !important;
}

.sortable-chosen {
    cursor: grabbing !important;
}

.sortable-drag {
    background: #E8F5F7 !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3) !important;
    transform: rotate(5deg) !important;
    border: 2px solid #0FA4AF !important;
}

/* Animation for successful drops */
.drop-success {
    animation: dropSuccess 0.4s ease-out;
}

@keyframes dropSuccess {
    0% {
        transform: scale(1);
        background: #e6f9fb;
    }
    50% {
        transform: scale(1.05);
        background: #0FA4AF;
        color: white;
    }
    100% {
        transform: scale(1);
        background: #E8F5F7;
        color: inherit;
    }
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    #section-modal .modal-content {
        max-width: 95vw;
    }

    .prominence-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .prominence-section {
        padding: 10px;
    }

    .column-drag-item {
        padding: 12px;
        font-size: 16px; /* Larger touch targets on mobile */
    }

    .column-drag-item .drag-handle {
        font-size: 16px;
    }
}

/* Dark mode support */
.dark-mode .prominence-section {
    background: #2a2a2a;
    border-color: #444;
}

.dark-mode .prominence-section:hover {
    background: #1a2830;
    border-color: #0FA4AF;
}

.dark-mode .prominence-header {
    border-bottom-color: #444;
}

.dark-mode .prominence-header span {
    color: #AFDDE5;
}

.dark-mode .column-drag-item {
    background: #333;
    border-color: #555;
    color: #fff;
}

.dark-mode .column-drag-item:hover {
    background: #404040;
    border-color: #0FA4AF;
}

.dark-mode .column-drag-item .column-name {
    color: #fff;
}

/* =============================================
   PERFORMANCE OPTIMIZATIONS
   ============================================= */

/* Mobile-first glassmorphism optimization */
@media (max-width: 768px) {
    .dropdown,
    .modal-content,
    .sidebar {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        background: var(--light-surface) !important;
    }

    body.dark-mode .dropdown,
    body.dark-mode .modal-content,
    body.dark-mode .sidebar {
        background: var(--surface-light) !important;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .dropdown,
    .modal-content,
    .sidebar {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }
}

/* High-end devices can use enhanced glass effects */
@media (min-width: 1024px) and (prefers-reduced-motion: no-preference) {
    .dropdown {
        backdrop-filter: var(--glass-blur);
        -webkit-backdrop-filter: var(--glass-blur);
    }

    .modal-content {
        backdrop-filter: var(--glass-blur-light);
        -webkit-backdrop-filter: var(--glass-blur-light);
    }

    .sidebar {
        backdrop-filter: var(--glass-blur-heavy);
        -webkit-backdrop-filter: var(--glass-blur-heavy);
    }
}
