* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #172737;
    --bg-secondary: #002337;
    --bg-card: rgba(23, 39, 55, 0.9);
    --text-primary: #ffffff;
    --text-secondary: #a0b8c8;
    --accent: #008EA6;
    --accent-hover: #00658F;
    --accent-light: #4DADAC;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --border: rgba(0, 142, 166, 0.2);
    --shadow: rgba(0, 0, 0, 0.4);
    --shadow-lg: rgba(0, 0, 0, 0.6);
    --gradient-primary: linear-gradient(135deg, #4DADAC 0%, #008EA6 50%, #00658F 100%);
    --gradient-accent: linear-gradient(135deg, #4DADAC 0%, #008EA6 50%, #00658F 100%);
    --gradient-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

:root[data-theme="light"] {
    --bg-primary: #f0f7fa;
    --bg-secondary: #e8f4f8;
    --bg-card: rgba(255, 255, 255, 0.95);
    --text-primary: #172737;
    --text-secondary: #4a6b7a;
    --accent: #008EA6;
    --accent-hover: #00658F;
    --accent-light: #4DADAC;
    --border: rgba(0, 142, 166, 0.15);
    --shadow: rgba(0, 0, 0, 0.08);
    --shadow-lg: rgba(0, 0, 0, 0.12);
}

:root[data-theme="light"] body {
    background: linear-gradient(180deg, #f0f7fa 0%, #e8f4f8 100%);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(180deg, #172737 0%, #002337 100%);
    color: var(--text-primary);
    min-height: 100vh;
    padding: 12px;
    line-height: 1.4;
    transition: background-color 0.3s, color 0.3s;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
}

/* Welcome Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    margin: 5% auto;
    padding: 56px 48px;
    border: 1px solid var(--border);
    border-radius: 24px;
    width: 90%;
    max-width: 680px;
    max-height: 90vh;
    box-shadow: 0 25px 50px -12px var(--shadow-lg);
    animation: slideIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-accent);
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.close {
    color: var(--text-secondary);
    float: right;
    font-size: 28px;
    font-weight: 300;
    cursor: pointer;
    transition: all 0.3s;
    line-height: 1;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.close:hover {
    color: var(--text-primary);
    background: var(--bg-secondary);
}

.welcome-content {
    text-align: center;
    position: relative;
}

.welcome-icon {
    margin: 0 auto 24px;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-accent);
    border-radius: 20px;
    color: white;
    animation: iconPulse 2s ease-in-out infinite;
    box-shadow: 0 10px 30px rgba(0, 142, 166, 0.4);
}

@keyframes iconPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 15px 40px rgba(99, 102, 241, 0.6);
    }
}

.welcome-icon svg {
    width: 40px;
    height: 40px;
}

.welcome-title {
    margin-bottom: 20px;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 2.5em;
    font-weight: 800;
    letter-spacing: -0.02em;
    animation: titleFadeIn 0.8s ease-out 0.2s both;
}

:root:not([data-theme="light"]) .welcome-title {
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: #ffffff;
    background-clip: unset;
    color: #ffffff;
}

@keyframes titleFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.welcome-text {
    font-size: 1.1em;
    margin-bottom: 32px;
    color: var(--text-secondary);
    font-weight: 400;
    line-height: 1.8;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
    animation: textFadeIn 0.8s ease-out 0.4s both;
}

@keyframes textFadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.welcome-features {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 40px;
    flex-wrap: wrap;
    animation: featuresFadeIn 0.8s ease-out 0.6s both;
}

@keyframes featuresFadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 20px;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border);
    min-width: 140px;
    transition: all 0.3s;
}

.feature-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px var(--shadow);
    border-color: var(--accent-light);
}

.feature-icon {
    font-size: 2em;
    line-height: 1;
}

.feature-item span:not(.feature-icon) {
    font-size: 0.9em;
    font-weight: 500;
    color: var(--text-primary);
}

.btn-primary {
    background: var(--gradient-accent);
    color: white;
    padding: 16px 40px;
    border: none;
    border-radius: 12px;
    font-size: 1.05em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 25px -5px rgba(0, 142, 166, 0.4);
    letter-spacing: 0.01em;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    animation: buttonFadeIn 0.8s ease-out 0.8s both;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

@keyframes buttonFadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px -5px rgba(0, 142, 166, 0.5);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary svg {
    transition: transform 0.3s;
}

.btn-primary:hover svg {
    transform: translateX(4px);
}

/* Header */
.header {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 20px 25px -5px var(--shadow), 0 10px 10px -5px var(--shadow);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-accent);
    animation: gradientShift 3s ease infinite;
    background-size: 200% 100%;
}

.header-logo-section {
    text-align: center;
    margin-bottom: 8px;
}

.logo-container {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.logo-img {
    max-height: 40px;
    height: auto;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    transition: all 0.3s;
    display: block;
    margin: 0 auto;
    opacity: 1;
}

/* Ensure logo is visible */
.logo-container {
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-title-section {
    text-align: center;
    margin-bottom: 32px;
}

.header-location-filter {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.header-location-filter label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9em;
}

.header-location-filter select {
    padding: 10px 14px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 0.9em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 180px;
}

.header-location-filter select:hover,
.header-location-filter select:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 142, 166, 0.1);
    background: var(--bg-primary);
}

.header-content h1 {
    font-size: 1.6em;
    margin-bottom: 2px;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    font-weight: 800;
    letter-spacing: -0.02em;
}

:root:not([data-theme="light"]) .header-content h1 {
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: #ffffff;
    background-clip: unset;
    color: #ffffff;
}

.page-subtitle {
    font-size: 0.85em;
    font-weight: 500;
    color: var(--text-secondary);
    text-align: center;
    margin: 0;
    letter-spacing: 0.02em;
}

.header-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
}

.stat-card {
    background: var(--bg-secondary);
    padding: 16px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid var(--border);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-accent);
    transform: scaleX(0);
    transition: transform 0.3s;
}

.stat-card:hover::before {
    transform: scaleX(1);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px var(--shadow), 0 10px 10px -5px var(--shadow);
    border-color: var(--accent-light);
}

.stat-label {
    display: block;
    font-size: 0.75em;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.stat-value {
    display: block;
    font-size: 1.7em;
    font-weight: 700;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

:root:not([data-theme="light"]) .stat-value {
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: #ffffff;
    background-clip: unset;
    color: #ffffff;
}

.stat-card-large {
    background: var(--bg-secondary);
    padding: 18px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid var(--border);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.stat-card-large::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-accent);
    transform: scaleX(0);
    transition: transform 0.3s;
}

.stat-card-large:hover::before {
    transform: scaleX(1);
}

.stat-card-large:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px var(--shadow), 0 10px 10px -5px var(--shadow);
    border-color: var(--accent-light);
}

/* Location Selector */
.location-selector {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    padding: 24px;
    border-radius: 16px;
    margin-bottom: 32px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 10px 15px -3px var(--shadow), 0 4px 6px -2px var(--shadow);
}

.location-selector label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.05em;
}

.location-selector select {
    flex: 1;
    max-width: 320px;
    padding: 14px 18px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Inter', sans-serif;
}

.location-selector select:hover,
.location-selector select:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Two Column Layout */
.two-column-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    margin-bottom: 14px;
}

.column-left,
.column-right {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Mobile order classes */
.mobile-order-1 { order: 1; }
.mobile-order-2 { order: 2; }
.mobile-order-3 { order: 3; }
.mobile-order-4 { order: 4; }
.mobile-order-5 { order: 5; }
.mobile-order-6 { order: 6; }
.mobile-order-7 { order: 7; }
.mobile-order-8 { order: 8; }
.mobile-order-9 { order: 9; }
.mobile-order-10 { order: 10; }

/* Sections */
.section {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 0;
    box-shadow: 0 20px 25px -5px var(--shadow), 0 10px 10px -5px var(--shadow);
    border: 1px solid var(--border);
    transition: all 0.3s;
}

.section:hover {
    box-shadow: 0 25px 30px -5px var(--shadow), 0 15px 15px -5px var(--shadow);
}

.section-title {
    font-size: 1.4em;
    margin-bottom: 14px;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    border-bottom: 2px solid var(--border);
    padding-bottom: 10px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

:root:not([data-theme="light"]) .section-title {
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: #ffffff;
    background-clip: unset;
    color: #ffffff;
}

.chart-container {
    position: relative;
    height: 340px;
    margin-top: 12px;
}

/* Receptions Stats */
.receptions-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}

/* Section Tabs */
.section-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 8px 16px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.9em;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
}

.tab-btn:hover {
    background: var(--bg-primary);
    border-color: var(--accent-light);
    transform: translateY(-2px);
}

.tab-btn.active {
    background: var(--gradient-accent);
    border-color: transparent;
    color: white;
    box-shadow: 0 10px 25px -5px rgba(0, 142, 166, 0.4);
    font-weight: 600;
}

/* Products List */
.products-list {
    margin-top: 12px;
}

.list-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 24px;
    background: var(--bg-secondary);
    border-radius: 16px;
    border: 1px solid var(--border);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.list-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--gradient-accent);
    transform: scaleY(0);
    transition: transform 0.3s;
}

.list-item:hover::before {
    transform: scaleY(1);
}

.list-item:hover {
    transform: translateX(8px);
    box-shadow: 0 10px 25px -5px var(--shadow), 0 4px 6px -2px var(--shadow);
    border-color: var(--accent-light);
}

.list-rank {
    min-width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-accent);
    color: white;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.15em;
    box-shadow: 0 4px 14px 0 rgba(0, 142, 166, 0.4);
}

.list-content {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}

.list-name {
    font-size: 0.95em;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
    line-height: 1.4;
}

.list-subtitle {
    font-size: 0.8em;
    color: var(--text-secondary);
    margin-top: 6px;
    font-weight: 400;
}

.expand-toggle {
    transition: all 0.3s ease;
}

.expand-toggle:hover {
    opacity: 1 !important;
    background: var(--bg-secondary);
    border-color: var(--accent) !important;
    transform: translateY(-2px);
}

.waiter-value-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.waiter-value-item:last-child {
    margin-bottom: 0;
}

.waiter-label {
    font-size: 0.9em;
    color: var(--text-secondary);
    min-width: 90px;
    font-weight: 500;
}

.list-value {
    font-size: 1.125em;
    font-weight: 600;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

:root:not([data-theme="light"]) .list-value {
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: #ffffff;
    background-clip: unset;
    color: #ffffff;
}

/* Percentage Badge */
.percentage-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.875em;
    font-weight: 600;
    margin-left: 8px;
    white-space: nowrap;
}

.percentage-badge.header-badge {
    font-size: 0.6em;
    padding: 3px 6px;
    font-weight: 500;
}

.percentage-badge.positive {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.percentage-badge.negative {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Theme Toggle */
.theme-toggle {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 100;
}

.theme-btn {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 14px 24px;
    border-radius: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1em;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 25px -5px var(--shadow), 0 4px 6px -2px var(--shadow);
    font-family: 'Inter', sans-serif;
}

.theme-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px -5px var(--shadow), 0 6px 8px -2px var(--shadow);
    border-color: var(--accent);
}

#themeIcon {
    font-size: 1.25em;
}

/* Desktop: Two Column Layout */
@media (min-width: 1024px) {
    .two-column-layout {
        grid-template-columns: 1fr 1fr;
        gap: 14px;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 8px;
        line-height: 1.5;
    }

    .container {
        padding: 0;
    }

    .header {
        padding: 16px 12px;
        margin-bottom: 12px;
        border-radius: 16px;
    }

    .header-logo-section {
        margin-bottom: 16px;
    }

    .header-title-section {
        margin-bottom: 12px;
    }

    .header-location-filter {
        margin-bottom: 12px;
        gap: 8px;
    }

    .header-location-filter label {
        font-size: 0.85em;
    }

    .header-location-filter select {
        padding: 8px 12px;
        font-size: 0.85em;
        min-width: 160px;
        border-radius: 10px;
    }

    .header-content h1 {
        font-size: 1.5em;
        margin-bottom: 4px;
    }

    .header-content p {
        font-size: 0.85em;
    }

    .logo-img {
        max-height: 40px;
        max-width: 160px;
    }

    .header-stats {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .stat-card, .stat-card-large {
        padding: 12px;
        border-radius: 12px;
    }

    .stat-label {
        font-size: 0.75em;
        margin-bottom: 6px;
    }

    .stat-value {
        font-size: 1.3em;
        line-height: 1.3;
    }

    .percentage-badge {
        font-size: 0.65em;
        padding: 3px 6px;
        margin-left: 4px;
    }

    .percentage-badge.header-badge {
        font-size: 0.6em;
        padding: 2px 5px;
    }

    .chart-container {
        height: 320px;
        margin-top: 12px;
        padding: 4px;
    }

    .two-column-layout {
        grid-template-columns: 1fr;
        gap: 12px;
        display: flex;
        flex-direction: column;
    }

    .column-left,
    .column-right {
        gap: 12px;
        display: contents;
    }

    /* Location-specific sections on mobile */
    #locationSpecificSections .two-column-layout {
        grid-template-columns: 1fr;
        gap: 12px;
        display: flex;
        flex-direction: column;
    }

    #locationSpecificSections .column-left,
    #locationSpecificSections .column-right {
        gap: 12px;
        display: contents;
    }

    .section {
        padding: 16px 12px;
        margin-bottom: 0;
        border-radius: 14px;
    }

    .section-title {
        font-size: 1.2em;
        margin-bottom: 12px;
    }

    .modal-content {
        padding: 32px 20px;
        margin: 10px auto;
        max-height: calc(100vh - 20px);
        width: 95%;
        border-radius: 16px;
    }
    
    .modal {
        padding: 10px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .welcome-content h1 {
        font-size: 1.75em;
        margin-bottom: 16px;
    }
    
    .welcome-content p {
        font-size: 0.9em;
        margin-bottom: 20px;
    }
    
    .welcome-features {
        gap: 12px;
        margin-bottom: 24px;
    }
    
    .feature-item {
        padding: 12px 16px;
        font-size: 0.85em;
    }
    
    .feature-icon {
        width: 32px;
        height: 32px;
    }

    .list-container {
        gap: 8px;
    }

    .list-item {
        padding: 10px 12px;
        border-radius: 10px;
    }

    .list-rank {
        width: 28px;
        height: 28px;
        font-size: 0.9em;
        min-width: 28px;
    }

    .list-name {
        font-size: 0.85em;
    }

    .list-content {
        gap: 6px;
    }

    .list-value {
        width: 100%;
        font-size: 0.8em;
        flex-wrap: wrap;
        line-height: 1.4;
    }

    .list-subtitle {
        font-size: 0.75em;
    }

    .waiter-value-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .waiter-label {
        font-size: 0.8em;
    }

    .section-tabs {
        gap: 6px;
        margin-bottom: 12px;
    }

    .tab-btn {
        padding: 8px 12px;
        font-size: 0.85em;
        border-radius: 8px;
    }

    .location-filter {
        padding: 10px 12px;
        font-size: 0.85em;
    }

    .receptions-stats {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .theme-toggle {
        top: 8px;
        right: 8px;
    }

    .theme-btn {
        padding: 10px 14px;
        font-size: 0.85em;
        border-radius: 12px;
        width: auto;
        height: auto;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    body {
        padding: 6px;
    }

    .header {
        padding: 12px 10px;
        margin-bottom: 10px;
    }

    .header-title-section {
        margin-bottom: 10px;
    }

    .header-location-filter {
        margin-bottom: 10px;
        gap: 6px;
    }

    .header-location-filter select {
        padding: 7px 10px;
        font-size: 0.8em;
        min-width: 140px;
    }

    .header-content h1 {
        font-size: 1.3em;
    }

    .header-content p {
        font-size: 0.8em;
    }

    .logo-img {
        max-height: 35px;
        max-width: 140px;
    }

    .header-stats {
        gap: 6px;
    }

    .stat-card, .stat-card-large {
        padding: 10px;
    }

    .stat-label {
        font-size: 0.7em;
        margin-bottom: 4px;
    }

    .stat-value {
        font-size: 1.15em;
    }

    .percentage-badge {
        font-size: 0.6em;
        padding: 2px 5px;
    }

    .percentage-badge.header-badge {
        font-size: 0.55em;
        padding: 2px 4px;
    }

    .chart-container {
        height: 280px;
        margin-top: 10px;
        padding: 2px;
    }

    .section {
        padding: 12px 10px;
        margin-bottom: 10px;
        border-radius: 12px;
    }

    .section-title {
        font-size: 1.1em;
        margin-bottom: 10px;
    }

    .list-container {
        gap: 6px;
    }

    .list-item {
        padding: 8px 10px;
    }

    .list-rank {
        width: 24px;
        height: 24px;
        font-size: 0.85em;
        min-width: 24px;
    }

    .list-name {
        font-size: 0.8em;
    }

    .list-value {
        font-size: 0.75em;
    }

    .section-tabs {
        gap: 4px;
        margin-bottom: 10px;
    }

    .tab-btn {
        padding: 6px 10px;
        font-size: 0.8em;
    }

    .theme-toggle {
        top: 6px;
        right: 6px;
    }

    .theme-btn {
        padding: 8px 12px;
        font-size: 0.8em;
    }

    /* Location-specific sections on small mobile */
    #locationSpecificSections .two-column-layout {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    #locationSpecificSections .column-left,
    #locationSpecificSections .column-right {
        gap: 10px;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    body {
        padding: 8px;
    }

    .header {
        padding: 16px 12px;
    }

    .header-content h1 {
        font-size: 1.5em;
    }

    .header-content p {
        font-size: 0.85em;
    }

    .logo-img {
        max-height: 40px;
        max-width: 150px;
    }

    .stat-card, .stat-card-large {
        padding: 12px;
    }

    .stat-value {
        font-size: 1.3em;
    }

    .chart-container {
        height: 350px;
        padding: 4px;
    }

    .section {
        padding: 16px 12px;
    }

    .section-title {
        font-size: 1.2em;
        margin-bottom: 16px;
    }

    .list-item {
        padding: 12px;
    }

    .list-name {
        font-size: 0.9em;
    }

    .list-value {
        font-size: 0.85em;
    }

    .percentage-badge {
        font-size: 0.65em;
        padding: 3px 6px;
    }

    .theme-btn {
        padding: 12px 18px;
        font-size: 0.9em;
    }
}

/* Loading Animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

.loading {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Selection */
::selection {
    background: rgba(99, 102, 241, 0.3);
    color: var(--text-primary);
}
