/* ============================================================
   ADMIN PANEL — Premium SaaS Dashboard CSS
   Design: Modern Slate & Carmine Red, Glassmorphism, Soft Shadows
   ============================================================ */

/* Fonts loaded via <link> in HTML head for reliability */

:root {
    /* Main Brand Colors (Premium Minimalist SaaS) */
    --primary: #0F172A; /* Slate 900 for high-contrast primary text/elements */
    --primary-light: #334155; /* Slate 700 */
    --primary-dark: #000000;
    --primary-opacity: rgba(15, 23, 42, 0.04); /* Subtle hover */
    --accent: #2563EB; /* Elegant Blue for primary actions (vs older dark color) */
    --accent-hover: #1D4ED8;
    
    /* Text Colors on Primary */
    --on-primary: #ffffff;
    
    /* Backgrounds */
    --bg-main: #F8FAFC; /* Slate 50 - Very clean, slightly cool gray */
    --bg-card: #FFFFFF; /* Pure white for all surfaced elements */
    --bg-sidebar: #FFFFFF; /* Pure white sidebar */
    --bg-sidebar-hover: #F1F5F9; /* Slate 100 hover */
    --bg-subtle: #F1F5F9;
    --glass-bg: rgba(255, 255, 255, 0.9);
    
    /* Text Colors */
    --text-primary: #0F172A; /* Slate 900 */
    --text-secondary: #475569; /* Slate 600 */
    --text-muted: #94A3B8; /* Slate 400 */
    --text-sidebar: #64748B; /* Slate 500 */
    --text-sidebar-active: #0F172A; 
    
    /* Borders */
    --border: #E2E8F0; /* Slate 200 - Very subtle */
    --border-light: #F1F5F9;
    --border-glass: rgba(255, 255, 255, 0.8);
    
    /* Status Colors */
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    
    /* Layout Dimensions */
    --sidebar-width: 280px; /* Wider, airy sidebar */
    
    /* Border Radii - More rounded, friendly SaaS look */
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    
    /* Premium Ultra-light Soft Shadows (SaaS aesthetic) */
    --shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.04);
    --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.06), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.06), 0 4px 6px -4px rgba(15, 23, 42, 0.03);
    --shadow-float: 0 20px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
    --shadow-inset: inset 0 2px 4px 0 rgba(15, 23, 42, 0.04);
    
    /* Typography */
    --font-display: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    
    /* Animations */
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    background: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    letter-spacing: -0.01em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

/* ==================== LOGIN ==================== */
.login-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(-45deg, #FAF9F7, #F5F0EB, #EDDED0, #E8D5C4, #F0E6DC);
    background-size: 400% 400%;
    animation: gradientShift 12s ease infinite;
    padding: 20px;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: var(--radius-lg);
    padding: 48px 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-xl);
    text-align: center;
    animation: fadeUp 0.6s ease-out;
    border: 1px solid var(--border);
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-logo {
    font-size: 48px;
    margin-bottom: 12px;
}

.login-title {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-primary);
}

.login-subtitle {
    color: var(--text-secondary);
    font-size: 14px;
    margin: 4px 0 32px;
}

.login-form {
    text-align: left;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
    letter-spacing: 0.3px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group input[type="tel"],
.form-group input[type="url"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: var(--font-body);
    color: var(--text-primary);
    background: var(--bg-main);
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-opacity);
    outline: none;
}

.btn-login {
    width: 100%;
    padding: 12px;
    background: var(--bg-sidebar);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 8px;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.btn-login::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-light));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(28, 25, 23, 0.2);
}

.btn-login:hover::after {
    opacity: 1;
}

.btn-login span,
.btn-login {
    position: relative;
    z-index: 1;
}

.btn-login:active {
    transform: translateY(0);
    box-shadow: none;
}

.login-hint {
    text-align: center;
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 16px;
}

.login-hint a {
    color: var(--primary-dark);
    font-weight: 600;
}

/* Auth divider ("o") */
.auth-divider {
    display: flex;
    align-items: center;
    margin: 16px 0;
    gap: 12px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.auth-divider span {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Google Sign-In button */
.btn-google {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 11px 16px;
    background: white;
    border: 2px solid #D1D5DB;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    font-family: var(--font-body);
    transition: all var(--transition);
    letter-spacing: 0.2px;
}

.btn-google:hover {
    border-color: #4285F4;
    box-shadow: 0 2px 8px rgba(66, 133, 244, 0.15);
    transform: translateY(-1px);
}

.btn-google:active {
    transform: translateY(0);
}

.btn-google svg {
    flex-shrink: 0;
}

/* ==================== ADMIN LAYOUT ==================== */
.admin-panel {
    display: flex;
    min-height: 100vh;
}

/* ==================== SIDEBAR ==================== */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    transition: transform var(--transition);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px 18px 16px;
    border-bottom: 1px solid var(--border);
}

.sidebar-logo {
    font-size: 24px;
}

.sidebar-name {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border: none;
    background: none;
    color: var(--text-sidebar);
    font-size: 14px;
    font-family: var(--font-body);
    font-weight: 500;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    text-align: left;
    width: 100%;
    position: relative;
}

.nav-item:hover {
    background: var(--bg-sidebar-hover);
    color: var(--text-primary);
}

.nav-item.nav-locked {
    opacity: 0.5;
}

.nav-item.active {
    background: var(--primary-opacity);
    color: var(--accent);
    font-weight: 600;
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: -12px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 100%;
    border-radius: 0 4px 4px 0;
    background: var(--accent);
}

.nav-icon {
    font-size: 18px;
    flex-shrink: 0;
    color: var(--text-muted);
    transition: color 0.2s ease;
}

.nav-item:hover .nav-icon {
    color: var(--text-primary);
}

.nav-item.active .nav-icon {
    color: var(--accent);
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
}

.sidebar-plan {
    font-size: 11px;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    text-align: center;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    background: var(--primary);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.btn-logout {
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 500;
    border-radius: var(--radius-sm);
    cursor: pointer;
    width: 100%;
    font-family: var(--font-body);
    transition: all var(--transition);
}

.btn-logout:hover {
    border-color: var(--border-glass);
    background: var(--bg-card);
    color: var(--danger);
    box-shadow: var(--shadow-sm);
}

/* ==================== MOBILE HEADER ==================== */
.mobile-header {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 90;
}

.menu-toggle {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    color: var(--text-primary);
}

.mobile-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.mobile-avatar {
    font-size: 22px;
    cursor: pointer;
}

/* ==================== MAIN CONTENT ==================== */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 28px 32px;
    max-width: 1200px;
    background: var(--bg-main);
    min-height: 100vh;
}

.section {
    display: none;
    animation: sectionIn 0.3s ease-out;
}

@keyframes sectionIn {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.99);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.section.active {
    display: block;
}

.section-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 24px;
    gap: 16px;
    flex-wrap: wrap;
}

.section-title {
    font-family: var(--font-body);
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}

.section-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* ==================== BUTTONS ==================== */
.btn-primary {
    padding: 10px 20px;
    background: var(--primary);
    color: var(--on-primary) !important;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-body);
    transition: all var(--transition);
    letter-spacing: 0.3px;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    color: var(--on-primary) !important;
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: none;
    background: var(--primary-dark);
}

.btn-secondary {
    padding: 10px 20px;
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    font-family: var(--font-body);
    transition: all var(--transition);
    box-shadow: var(--shadow-sm);
}
    transition: all var(--transition);
    white-space: nowrap;
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 12px;
}

.period-select {
    padding: 8px 36px 8px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-family: var(--font-body);
    color: var(--text-primary);
    background: var(--bg-card);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2378716C' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

/* ==================== KPI CARDS ==================== */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.kpi-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px 20px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: all var(--transition);
}

.kpi-card:hover {
    box-shadow: var(--shadow-float);
    transform: translateY(-2px);
    border-color: var(--border);
}

.kpi-card.highlight {
    background: var(--bg-card);
    border-color: var(--border);
    box-shadow: 0 0 0 1px var(--primary-light) inset, var(--shadow-sm);
}

.kpi-card.highlight .kpi-value,
.kpi-card.highlight .kpi-label,
.kpi-card.highlight .kpi-icon i {
    color: var(--primary);
}

.kpi-card.highlight .kpi-label {
    color: var(--text-secondary);
}

.kpi-icon {
    font-size: 28px;
    flex-shrink: 0;
    margin-top: 2px;
}

.kpi-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.kpi-value {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.kpi-label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
    letter-spacing: 0.2px;
}

.kpi-trend {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.kpi-trend.up {
    color: var(--success);
}

.kpi-trend.down {
    color: var(--danger);
}

/* ==================== CHARTS ==================== */
.charts-row {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.chart-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    margin-bottom: 24px;
    transition: box-shadow var(--transition);
}

.chart-card:hover {
    box-shadow: var(--shadow-md);
}

.chart-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
    letter-spacing: 0.2px;
}

.chart-area {
    min-height: 200px;
}

/* Bar Chart */
.bar-chart {
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    height: 200px;
    gap: 8px;
    padding: 0 8px;
}

.bar-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.bar {
    width: 100%;
    max-width: 40px;
    background: var(--border);
    border-radius: 4px 4px 0 0;
    min-height: 8px;
    transition: height 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    animation: growBar 0.8s ease-out backwards;
}

.bar.accent {
    background: var(--primary);
}

@keyframes growBar {
    from {
        height: 0 !important;
    }
}

.bar-group span {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}

/* Top List */
.top-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.top-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-light);
}

.top-item:last-child {
    border-bottom: none;
}

.top-rank {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-main);
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.top-name {
    flex: 1;
    font-size: 13px;
    font-weight: 500;
}

.top-value {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary-dark);
}

/* Popular Grid */
.popular-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.popular-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: var(--bg-main);
    border-radius: var(--radius-sm);
}

.popular-emoji {
    font-size: 24px;
}

.popular-name {
    font-size: 13px;
    font-weight: 600;
    flex: 1;
}

.popular-count {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
}

/* ==================== MENU EDITOR ==================== */
.editor-categories {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.editor-cat-btn {
    padding: 8px 18px;
    border: 1.5px solid var(--border);
    border-radius: 24px;
    background: var(--bg-card);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    font-family: var(--font-body);
    transition: all var(--transition);
}

.editor-cat-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.editor-cat-btn.active {
    background: var(--text-primary);
    color: white;
    border-color: var(--text-primary);
}

/* Dishes List */
.dishes-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dish-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 18px;
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
}

.dish-row:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.dish-color {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    flex-shrink: 0;
}

.dish-info {
    flex: 1;
    min-width: 0;
}

.dish-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.dish-desc {
    font-size: 12px;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dish-price {
    font-size: 15px;
    font-weight: 700;
    color: var(--primary-dark);
    white-space: nowrap;
}

.dish-badges {
    display: flex;
    gap: 4px;
}

.dish-badge {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 12px;
    background: var(--bg-main);
    color: var(--text-secondary);
    font-weight: 500;
}

.dish-badge-sold {
    background: #FEF2F2;
    color: var(--danger);
    font-weight: 600;
}

/* Unavailable dish row */
.dish-row.dish-unavailable {
    opacity: 0.5;
    background: #FAFAF8;
}

.dish-row.dish-unavailable .dish-name {
    text-decoration: line-through;
    color: var(--text-muted);
}

/* Availability toggle switch */
.dish-avail-toggle {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
    flex-shrink: 0;
    cursor: pointer;
}

.dish-avail-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.dish-avail-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #D4D4D8;
    border-radius: 20px;
    transition: background 0.25s;
}

.dish-avail-slider::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    left: 2px;
    bottom: 2px;
    background: white;
    border-radius: 50%;
    transition: transform 0.25s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.dish-avail-toggle input:checked+.dish-avail-slider {
    background: var(--success);
}

.dish-avail-toggle input:checked+.dish-avail-slider::before {
    transform: translateX(16px);
}

/* Inline price editing */
.dish-price-cell {
    flex-shrink: 0;
}

.dish-price-editable {
    cursor: pointer;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    transition: background 0.2s;
}

.dish-price-editable:hover {
    background: var(--bg-subtle);
}

.dish-price-empty {
    color: var(--text-muted);
    font-style: italic;
    font-weight: 400;
    font-size: 12px;
}

.dish-actions {
    display: flex;
    gap: 6px;
}

.dish-action {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: var(--bg-main);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 14px;
    transition: all var(--transition);
}

.dish-action:hover {
    background: var(--border);
}

.dish-action.delete:hover {
    background: #FEE2E2;
}

/* ==================== AI IMPORT ==================== */
.ai-config-banner {
    margin-bottom: 24px;
}

.ai-config-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    color: var(--text-primary);
}

.ai-config-icon {
    font-size: 42px;
    margin-bottom: 12px;
}

.ai-config-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.ai-config-card p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 4px;
    line-height: 1.5;
}

.import-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.import-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.import-card:hover {
    border-color: var(--primary);
    border-style: solid;
    box-shadow: 0 8px 24px rgba(176, 141, 110, 0.12);
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.95);
}

.import-icon {
    font-size: 42px;
    margin-bottom: 12px;
}

.import-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.import-card p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.5;
}

.import-url-field {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-family: var(--font-body);
    color: var(--text-primary);
    background: var(--bg-main);
    margin-bottom: 12px;
    outline: none;
}

.import-url-field:focus {
    border-color: var(--primary);
}

/* AI Processing */
.ai-progress-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 40px;
    text-align: center;
    box-shadow: var(--shadow-md);
    max-width: 500px;
    margin: 0 auto;
}

.ai-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.ai-progress-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
}

.ai-progress-bar {
    height: 6px;
    background: var(--border-light);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 24px;
}

.ai-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: 3px;
    width: 0%;
    transition: width 0.5s ease;
}

.ai-steps {
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ai-step {
    font-size: 13px;
    color: var(--text-muted);
    padding: 6px 0;
}

.ai-step.done {
    color: var(--success);
}

.ai-step.active {
    color: var(--text-primary);
    font-weight: 600;
}

/* AI Results */
.ai-results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.ai-results-header h3 {
    font-size: 18px;
}

.ai-results-actions {
    display: flex;
    gap: 10px;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.toggle-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-subtle);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-primary);
    transition: all var(--transition);
}

.toggle-row:hover {
    border-color: var(--primary);
    background: var(--bg-card);
}

.toggle-row input[type="checkbox"] {
    accent-color: var(--primary);
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.toggle-row span {
    flex-grow: 1;
}

.settings-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.ai-dishes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
}

.ai-dish-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
}

.ai-dish-card:hover {
    box-shadow: var(--shadow-md);
}

.ai-dish-img {
    height: 120px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
}

.ai-dish-body {
    padding: 14px;
}

.ai-dish-body h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.ai-dish-body p {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.ai-dish-price {
    font-size: 15px;
    font-weight: 700;
    color: var(--primary-dark);
}

.ai-dish-tags {
    display: flex;
    gap: 4px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.ai-dish-tag {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 12px;
    background: var(--bg-main);
    color: var(--text-secondary);
}

/* ==================== UPSELLS ==================== */
.upsell-summary {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 16px;
    margin-bottom: 20px;
}

.upsell-big-card {
    background: var(--primary);
    border-radius: var(--radius-lg);
    padding: 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.upsell-big-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    margin-bottom: 8px;
}

.upsell-big-value {
    font-size: 36px;
    font-weight: 700;
    color: white;
    letter-spacing: -1px;
    line-height: 1.1;
}

.upsell-big-period {
    font-size: 12px;
    color: var(--primary-light);
    margin-top: 8px;
}

.upsell-breakdown {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

.upsell-type {
    display: flex;
    align-items: center;
    gap: 12px;
}

.upsell-type-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.upsell-type-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.upsell-type-name {
    font-size: 13px;
    font-weight: 600;
}

.upsell-type-value {
    font-size: 12px;
    color: var(--text-muted);
}

.upsell-type-pct {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary-dark);
}

/* ==================== QR CODES ==================== */
.qr-config {
    display: flex;
    gap: 16px;
    align-items: flex-end;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.form-group.inline {
    display: flex;
    flex-direction: column;
}

.qr-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.qr-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: all var(--transition);
}

.qr-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.qr-card canvas {
    margin-bottom: 10px;
}

.qr-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.qr-download {
    font-size: 12px;
    color: var(--primary);
    cursor: pointer;
    background: none;
    border: none;
    font-weight: 600;
    font-family: var(--font-body);
}

.qr-download:hover {
    text-decoration: underline;
}

/* ==================== SETTINGS ==================== */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.settings-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

.settings-card-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
}

.color-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.color-row input[type="color"] {
    width: 40px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    padding: 2px;
}

#color-preview {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    font-family: monospace;
}

.logo-upload {
    display: flex;
    align-items: center;
    gap: 14px;
}

.logo-preview {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    background: var(--bg-main);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
}

.logo-actions {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.toggle-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-light);
}

.toggle-row:last-of-type {
    border-bottom: none;
}

.toggle-row input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
    cursor: pointer;
}

.tag-sm {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    background: var(--primary);
    color: white;
    font-weight: 600;
    margin-left: auto;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Plan Card */
.plan-info {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.plan-badge {
    padding: 6px 14px;
    background: var(--primary);
    color: white;
    font-size: 12px;
    font-weight: 700;
    border-radius: var(--radius-sm);
    letter-spacing: 1px;
}

.plan-details {
    display: flex;
    flex-direction: column;
}

.plan-price {
    font-size: 18px;
    font-weight: 700;
}

.plan-next {
    font-size: 12px;
    color: var(--text-muted);
}

.plan-features {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

/* ==================== CHANNEL CARDS (Order Settings) ==================== */
.channel-card {
    background: var(--bg-main);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin-bottom: 12px;
    transition: all var(--transition);
}

.channel-card:hover {
    border-color: var(--border);
}

.channel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}

.channel-desc {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
}

.channel-config {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
}

/* ==================== PLAN GATE SYSTEM ==================== */
.channel-card {
    position: relative;
    overflow: hidden;
}

.plan-gate-badge {
    font-size: 9px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    flex-shrink: 0;
}

.plan-gate-badge.starter {
    background: #DBEAFE;
    color: #1E40AF;
}

.plan-gate-badge.pro {
    background: linear-gradient(135deg, #DBEAFE, #BFDBFE);
    color: #1D4ED8;
}

.plan-gate-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(2px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    z-index: 5;
    border-radius: var(--radius);
}

.plan-gate-overlay span {
    font-size: 28px;
}

.plan-gate-overlay p {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
}

/* ==================== PLAN TIER COMPARISON ==================== */
.plans-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 8px;
}

.plan-tier-card {
    background: var(--bg-main);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    transition: all var(--transition);
    position: relative;
}

.plan-tier-card:hover {
    border-color: var(--border);
    box-shadow: var(--shadow-md);
}

.plan-tier-card.active {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.1);
}

.plan-tier-card.recommended {
    border-color: var(--accent);
    background: linear-gradient(180deg, #F8FAFC 0%, var(--bg-main) 40%);
}

.plan-recommended-tag {
    position: absolute;
    top: -1px;
    right: 20px;
    background: linear-gradient(135deg, #F59E0B, #D97706);
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 0 0 8px 8px;
    letter-spacing: 0.3px;
}

.plan-tier-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 8px;
}

.plan-tier-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.plan-tier-price {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -1px;
}

.plan-tier-price small {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0;
}

.plan-tier-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 20px;
}

.plan-tier-features {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.plan-tier-features li {
    font-size: 13px;
    color: var(--text-primary);
    padding: 4px 0;
}

.plan-tier-features li.disabled {
    color: var(--text-muted);
    text-decoration: line-through;
    opacity: 0.6;
}

.plan-tier-features li.highlight {
    color: var(--accent);
    font-weight: 600;
}

.btn-plan {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-body);
    background: var(--bg-card);
    color: var(--text-secondary);
    transition: all var(--transition);
}

.btn-plan:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-plan.pro {
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    color: white;
    border-color: transparent;
}

.btn-plan.pro:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.btn-plan.current {
    background: var(--text-primary);
    color: white;
    border-color: var(--text-primary);
    cursor: default;
}

@media (max-width: 768px) {
    .plans-comparison {
        grid-template-columns: 1fr;
    }
}

/* ==================== MODAL ==================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(28, 25, 23, 0.4);
    backdrop-filter: blur(4px);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 560px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: fadeUp 0.3s ease-out;
}

.modal-card.large {
    max-width: 720px;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    background: var(--bg-card);
    z-index: 1;
}

.modal-header h2 {
    font-size: 18px;
    font-weight: 600;
}

.modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: var(--bg-main);
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    transition: background var(--transition);
}

.modal-close:hover {
    background: var(--border);
}

.modal-body {
    padding: 24px;
}

.modal-body .form-group {
    margin-bottom: 18px;
}

.modal-body textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: var(--font-body);
    color: var(--text-primary);
    background: var(--bg-main);
    min-height: 80px;
    resize: vertical;
    outline: none;
}

.modal-body textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(176, 141, 110, 0.12);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px;
    border-top: 1px solid var(--border-light);
}

/* Allergen Checkboxes in Modal */
.allergen-check-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.allergen-check {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: var(--bg-main);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 12px;
    transition: background var(--transition);
}

.allergen-check:hover {
    background: var(--border-light);
}

/* ==================== TOAST ==================== */
.admin-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--text-primary);
    color: white;
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    z-index: 300;
    animation: slideInRight 0.3s ease-out;
    max-width: 360px;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1024px) {
    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .charts-row {
        grid-template-columns: 1fr;
    }

    .popular-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .import-options {
        grid-template-columns: 1fr;
    }

    .upsell-summary {
        grid-template-columns: 1fr;
    }

    .settings-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .mobile-header {
        display: flex;
    }

    .main-content {
        margin-left: 0;
        padding: 16px;
    }

    .section-title {
        font-size: 22px;
    }

    .section-header {
        flex-direction: column;
    }

    .kpi-grid {
        grid-template-columns: 1fr 1fr;
    }

    .kpi-value {
        font-size: 20px;
    }

    .popular-grid {
        grid-template-columns: 1fr;
    }

    .qr-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .dish-row {
        flex-wrap: wrap;
    }

    .dish-price {
        order: -1;
    }

    .allergen-check-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .kpi-grid {
        grid-template-columns: 1fr;
    }

    .qr-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   ORDERS HISTORY — Filter, Table, KPI, Pagination
   ============================================================ */

.orders-filter-bar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    padding: 16px 20px;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 16px;
    align-items: flex-end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 120px;
}

.filter-group label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-input {
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-family: var(--font-body);
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: border-color var(--transition);
}

.filter-input:focus {
    outline: none;
    border-color: var(--primary);
}

.btn-secondary {
    padding: 8px 16px;
    border: 1px solid var(--primary);
    background: transparent;
    color: var(--primary);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-body);
    transition: all var(--transition);
}

.btn-secondary:hover {
    background: var(--primary);
    color: white;
}

.orders-kpi-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.order-kpi-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.order-kpi-icon {
    font-size: 28px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--bg-secondary);
}

.order-kpi-content {
    display: flex;
    flex-direction: column;
}

.order-kpi-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.order-kpi-label {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.orders-table-wrapper {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.orders-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.orders-table thead {
    background: var(--bg-secondary);
}

.orders-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--text-muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
}

.orders-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--bg-secondary);
    color: var(--text-primary);
    vertical-align: middle;
}

.orders-table tbody tr {
    transition: background var(--transition);
}

.orders-table tbody tr:hover {
    background: rgba(176, 141, 110, 0.04);
}

.orders-table .order-id-cell {
    font-weight: 600;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: var(--primary-dark);
}

.order-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.order-status-badge.new {
    background: #E8F4FD;
    color: #1976D2;
}

.order-status-badge.cooking {
    background: #FFF3E0;
    color: #E65100;
}

.order-status-badge.ready {
    background: #E8F5E9;
    color: #2E7D32;
}

.order-status-badge.delivered {
    background: #F3E5F5;
    color: #7B1FA2;
}

.order-status-badge.cancelled {
    background: #FFEBEE;
    color: #C62828;
}

.order-channel-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    background: var(--bg-secondary);
    color: var(--text-secondary);
}

.order-items-preview {
    max-width: 200px;
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.order-action-link {
    color: var(--primary);
    cursor: pointer;
    font-weight: 500;
    text-decoration: none;
    font-size: 12px;
    transition: color var(--transition);
}

.order-action-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.orders-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 16px;
}

.page-btn {
    padding: 6px 12px;
    border: 1px solid var(--border);
    background: white;
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 13px;
    font-family: var(--font-body);
    transition: all var(--transition);
}

.page-btn:hover {
    background: var(--bg-secondary);
}

.page-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Order Detail Modal */
.order-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

.order-detail-field {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.order-detail-field .field-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
}

.order-detail-field .field-value {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
}

.order-detail-items {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-top: 8px;
}

.order-detail-items table {
    width: 100%;
    border-collapse: collapse;
}

.order-detail-items th {
    background: var(--bg-secondary);
    padding: 8px 12px;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
}

.order-detail-items td {
    padding: 8px 12px;
    border-top: 1px solid var(--bg-secondary);
    font-size: 13px;
}

@media (max-width: 768px) {
    .orders-kpi-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .orders-filter-bar {
        flex-direction: column;
    }

    .filter-group {
        min-width: 100%;
    }

    .orders-table {
        font-size: 11px;
    }

    .orders-table th,
    .orders-table td {
        padding: 8px;
    }

    .order-detail-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   MULTI-MENU MANAGEMENT
   ============================================================ */

/* Menu Grid */
.menus-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 20px;
    margin-top: 8px;
}

.empty-menus {
    grid-column: 1 / -1;
    text-align: center;
    padding: 64px 24px;
    color: var(--text-muted);
}

.empty-menus h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 16px 0 8px;
}

.empty-menus p {
    margin-bottom: 20px;
}

/* Menu Card — Premium Design */
.menu-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.menu-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    opacity: 1;
    transition: opacity var(--transition);
}

.menu-card:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    transform: translateY(-3px);
    border-color: var(--primary-light);
}

.menu-card.inactive {
    opacity: 0.55;
}

.menu-card.inactive::before {
    opacity: 0.2;
    background: var(--text-muted);
}

.menu-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.menu-card-icon {
    font-size: 28px;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(120, 113, 108, 0.08), rgba(120, 113, 108, 0.04));
    border-radius: 14px;
    flex-shrink: 0;
    border: 1px solid var(--border-light);
}

.menu-card-info {
    flex: 1;
    min-width: 0;
}

.menu-card-name {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 2px 0;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.menu-card-type {
    font-size: 12px;
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.menu-card-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.5;
}

/* Stats Grid */
.menu-card-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}

.menu-stat {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: var(--bg-main);
    border-radius: 10px;
    border: 1px solid var(--border-light);
}

.menu-stat-value {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

.menu-stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.menu-stat.highlight {
    background: linear-gradient(135deg, #FEF3C7, #FDE68A);
    border-color: #F59E0B;
}

.menu-stat.highlight .menu-stat-label {
    color: #92400E;
    font-weight: 600;
}

/* Legacy meta support */
.menu-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.menu-card-meta span {
    font-size: 12px;
    color: var(--text-secondary);
    background: var(--bg-main);
    padding: 5px 12px;
    border-radius: 10px;
    white-space: nowrap;
    border: 1px solid var(--border-light);
    font-weight: 500;
}

.menu-default-badge {
    background: linear-gradient(135deg, #FEF3C7, #FDE68A) !important;
    color: #92400E !important;
    font-weight: 600 !important;
    border-color: #F59E0B !important;
}

.menu-card-tables {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 14px;
    padding: 8px 12px;
    background: var(--bg-main);
    border-radius: 10px;
    border: 1px solid var(--border-light);
}

.menu-card-tables em {
    color: var(--text-muted);
}

.table-tag {
    display: inline-block;
    background: var(--primary);
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 12px;
    margin: 2px 3px;
}

/* Actions — Organized Primary/Secondary */
.menu-card-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
}

.menu-actions-primary {
    display: flex;
    gap: 8px;
    flex: 1;
}

.btn-action-main {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    font-family: var(--font-body);
    white-space: nowrap;
}

.btn-action-main:first-child {
    background: var(--text-primary);
    color: white;
    border-color: var(--text-primary);
}

.btn-action-main:first-child:hover {
    background: #44403C;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-action-main:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
}

.menu-actions-secondary {
    display: flex;
    gap: 4px;
}

.btn-action-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-light);
    border-radius: 10px;
    background: var(--bg-main);
    font-size: 15px;
    cursor: pointer;
    transition: all var(--transition);
    padding: 0;
}

.btn-action-icon:hover {
    background: var(--bg-card);
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.btn-action-icon.btn-danger-icon:hover {
    border-color: #EF4444;
    background: #FEF2F2;
}

.btn-sm {
    font-size: 12px !important;
    padding: 6px 14px !important;
    border-radius: 10px !important;
}


/* Toggle Switch */
.menu-toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    cursor: pointer;
}

.menu-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    inset: 0;
    background: #D1D5DB;
    border-radius: 24px;
    transition: all 0.3s ease;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.menu-toggle-switch input:checked+.toggle-slider {
    background: var(--success);
}

.menu-toggle-switch input:checked+.toggle-slider::before {
    transform: translateX(20px);
}

/* ============================================================
   MENU MODAL EXTRAS
   ============================================================ */

.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.days-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.day-check {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    cursor: pointer;
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: all var(--transition);
    user-select: none;
}

.day-check:hover {
    background: var(--border-light);
}

.day-check:has(input:checked) {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.day-check input {
    display: none;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 16px;
    margin-top: 8px;
    border-top: 1px solid var(--border-light);
}

/* ============================================================
   QR TABLE-MENU ASSIGNMENT PANEL
   ============================================================ */

.assignment-panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
}

.assignment-header h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
}

.assignment-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.5;
}

.assignment-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 20px;
}

.assignment-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.assignment-actions-row {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

/* Table Selection Grid */
.table-select-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(48px, 1fr));
    gap: 6px;
}

.table-select-btn {
    width: 100%;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition);
}

.table-select-btn:hover {
    border-color: var(--primary);
    background: rgba(176, 141, 110, 0.05);
}

.table-select-btn.selected {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 2px 8px rgba(176, 141, 110, 0.3);
}

/* Menu Selection List */
.menu-select-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.menu-select-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
    user-select: none;
}

.menu-select-item:hover {
    border-color: var(--primary-light);
    background: rgba(176, 141, 110, 0.03);
}

.menu-select-item.selected {
    border-color: var(--primary);
    background: rgba(176, 141, 110, 0.06);
}

.menu-select-item input[type="checkbox"] {
    accent-color: var(--primary);
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.menu-select-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.menu-select-info {
    flex: 1;
    min-width: 0;
}

.menu-select-info strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
}

.menu-select-info small {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
}

.menu-select-status {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    background: #FEE2E2;
    color: #991B1B;
    flex-shrink: 0;
}

.menu-select-status.active {
    background: #DCFCE7;
    color: #166534;
}

.assignment-footer {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
}

.assignment-status {
    font-size: 13px;
    font-weight: 500;
}

/* Assignments Overview */
.assignments-overview {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
}

.assignments-table-wrap {
    overflow-x: auto;
}

.assignments-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.assignments-table th {
    text-align: left;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    padding: 10px 12px;
    border-bottom: 2px solid var(--border);
}

.assignments-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}

.assign-menu-tag {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    font-size: 11px;
    font-weight: 500;
    padding: 3px 10px;
    border-radius: 12px;
    margin: 2px 3px;
}

.qr-section-divider {
    margin-top: 8px;
    margin-bottom: 4px;
}

/* QR Menu Tags */
.qr-menus-label {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
    margin-top: 6px;
}

.qr-menu-tag {
    font-size: 10px;
    background: var(--border-light);
    color: var(--text-secondary);
    padding: 2px 8px;
    border-radius: 10px;
    white-space: nowrap;
}

/* ============================================================
   3D PHOTO UPLOAD
   ============================================================ */

.photo-upload-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
}

.photo-upload-section h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}

.photo-upload-section p {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.photo-drop-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 32px 16px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
    background: var(--border-light);
}

.photo-drop-zone.dragover {
    border-color: var(--primary) !important;
    background-color: rgba(17, 24, 39, 0.05) !important;
}

.photo-drop-zone .drop-icon {
    font-size: 36px;
    margin-bottom: 8px;
}

.photo-drop-zone .drop-text {
    font-size: 13px;
    color: var(--text-secondary);
}

.photo-drop-zone .drop-hint {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

.photo-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 8px;
    margin-top: 12px;
}

.photo-preview-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    background: var(--border-light);
}

.photo-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-preview-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 10px;
    cursor: pointer;
}

.ai-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s ease-in-out infinite;
    margin: 0 auto 16px auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.ai-progress-bar {
    background: var(--border-light);
    border-radius: 4px;
    overflow: hidden;
}

.ai-progress-fill {
    height: 100%;
    background: var(--primary);
    transition: width 0.3s ease;
}

.btn-camera-guide {
    display: none !important;
}

.ai-3d-status {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-top: 12px;
    font-size: 13px;
}

.ai-3d-status.processing {
    background: #FEF3C7;
    color: #92400E;
}

.ai-3d-status.ready {
    background: #DCFCE7;
    color: #166534;
}

.ai-3d-status.error {
    background: #FEE2E2;
    color: #991B1B;
}

.ai-3d-status .spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(146, 64, 14, 0.3);
    border-top-color: #92400E;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.btn-gen-3d {
    margin-top: 12px;
    background: linear-gradient(135deg, #6366F1, #8B5CF6);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-gen-3d:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* ============================================================
   RBAC — PIN OVERLAY
   ============================================================ */

.pin-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.pin-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 40px 32px;
    max-width: 380px;
    width: 90%;
    text-align: center;
    box-shadow: var(--shadow-lg);
    animation: pinSlideIn 0.3s ease;
}

@keyframes pinSlideIn {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.pin-card .pin-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.pin-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.pin-card p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.pin-input-row {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.pin-digit {
    width: 48px;
    height: 56px;
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-main);
    transition: all var(--transition);
}

.pin-digit:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(176, 141, 110, 0.15);
}

.pin-error {
    font-size: 12px;
    color: var(--danger);
    min-height: 18px;
    margin-bottom: 16px;
}

.pin-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

/* PIN Setup Wizard */
.pin-setup-card {
    max-width: 420px;
}

.pin-setup-icon {
    font-size: 56px;
    margin-bottom: 12px;
    animation: pinBounce 0.6s ease;
}

@keyframes pinBounce {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }

    60% {
        transform: scale(1.15);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.pin-setup-progress {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.pin-progress-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border);
    transition: all 0.3s ease;
}

.pin-progress-dot.active {
    background: var(--primary);
    transform: scale(1.3);
    box-shadow: 0 0 8px rgba(176, 141, 110, 0.4);
}

#btn-confirm-pin-setup:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pin-forgot:hover span {
    color: var(--primary);
}

/* User Management (Settings) */
.users-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.user-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--border-light);
    border-radius: var(--radius-sm);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.user-avatar.owner {
    background: var(--primary);
}

.user-avatar.manager {
    background: #6366F1;
}

.user-avatar.employee {
    background: #64748B;
}

.user-info {
    flex: 1;
}

.user-name {
    font-size: 14px;
    font-weight: 600;
}

.user-role {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ============================================================
   RESPONSIVE — NEW COMPONENTS
   ============================================================ */

@media (max-width: 768px) {
    .menus-grid {
        grid-template-columns: 1fr;
    }

    .menu-card-actions {
        gap: 4px;
    }

    .assignment-body {
        grid-template-columns: 1fr;
    }

    .form-row-2 {
        grid-template-columns: 1fr;
    }

    .pin-input-row {
        gap: 6px;
    }

    .pin-digit {
        width: 40px;
        height: 48px;
        font-size: 20px;
    }
}

/* ==================== THEME SELECTOR ==================== */
.theme-selector-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.theme-card {
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px;
    background: var(--bg-card);
    cursor: pointer;
    transition: all var(--transition);
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.theme-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.theme-card.active {
    border-color: var(--primary);
    background: rgba(176, 141, 110, 0.04);
    box-shadow: 0 0 0 3px rgba(176, 141, 110, 0.12);
}

.theme-preview {
    border-radius: var(--radius-md);
    overflow: hidden;
}

.theme-preview-bar {
    padding: 8px;
    border-radius: var(--radius-sm);
    min-height: 80px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.theme-preview-header {
    height: 8px;
    border-radius: 4px;
    width: 60%;
}

.theme-preview-card {
    padding: 8px;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.theme-preview-line {
    height: 4px;
    border-radius: 2px;
    width: 80%;
    opacity: 0.6;
}

.theme-preview-line.short {
    width: 50%;
    opacity: 0.4;
}

.theme-preview-accent {
    height: 6px;
    border-radius: 3px;
    width: 35%;
    margin-top: 4px;
}

.theme-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.theme-icon {
    font-size: 20px;
}

.theme-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.theme-desc {
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.theme-layout-badge {
    display: inline-block;
    padding: 2px 8px;
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 0.68rem;
    color: var(--text-tertiary);
    margin-top: 2px;
}

.theme-active-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    background: var(--primary);
    color: white;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 600;
    align-self: flex-start;
}

.theme-apply-btn {
    align-self: flex-start;
}

/* ==================== UPDATE BANNER ==================== */
.update-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 12px 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    animation: slideDown 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }

    to {
        transform: translateY(0);
    }
}

.update-banner-content {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 1200px;
    margin: 0 auto;
}

.update-banner-content .update-icon {
    font-size: 24px;
}

.update-banner-content div {
    flex: 1;
}

.update-banner-content strong {
    display: block;
    font-size: 0.9rem;
}

.update-banner-content p {
    font-size: 0.78rem;
    opacity: 0.9;
    margin-top: 2px;
}

.update-dismiss {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
    padding: 4px;
}

.update-dismiss:hover {
    opacity: 1;
}

@media (max-width: 768px) {
    .theme-selector-grid {
        grid-template-columns: 1fr;
    }

    .update-banner-content {
        flex-wrap: wrap;
    }
}

/* ==================== FUERA DE CARTA (SPECIALS) ==================== */
.specials-layout {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 24px;
    margin-top: 8px;
}

.specials-form-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
    padding: 28px;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.specials-form-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent-warm, #C19A6B), var(--primary-light, #D4B896));
}

.specials-form-title {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.specials-form-desc {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.55;
    margin-bottom: 20px;
}

.specials-form .form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.specials-active-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.specials-active-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px 14px;
    border-bottom: 1px solid var(--border-light);
}

.specials-active-header h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.specials-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    max-height: 500px;
}

.specials-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 48px 24px;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Special Item Card */
.special-item {
    background: var(--bg-main);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 10px;
    transition: all 0.2s ease;
    animation: specialSlideIn 0.3s ease;
}

@keyframes specialSlideIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.special-item:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.special-item:last-child {
    margin-bottom: 0;
}

.special-item-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.special-item-icon {
    font-size: 28px;
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border-radius: 10px;
    border: 1px solid var(--border-light);
}

.special-item-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.special-item-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
    line-height: 1.3;
}

.special-item-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.special-item-price {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--primary);
    white-space: nowrap;
    flex-shrink: 0;
}

.special-item-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border-light);
}

.special-item-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.special-tag {
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 20px;
    font-weight: 500;
    white-space: nowrap;
}

.special-tag.category {
    background: color-mix(in srgb, var(--primary) 12%, transparent);
    color: var(--primary-dark, var(--primary));
}

.special-tag.veggie {
    background: #e8f5e9;
    color: #2e7d32;
}

.special-tag.allergens {
    background: #fff3e0;
    color: #e65100;
}

.special-item-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.special-time {
    font-size: 0.72rem;
    color: var(--text-tertiary);
    white-space: nowrap;
}

.btn-icon-danger {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--text-tertiary);
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.btn-icon-danger:hover {
    background: #fef2f2;
    color: var(--danger);
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .specials-layout {
        grid-template-columns: 1fr;
    }

    .specials-form .form-row-2 {
        grid-template-columns: 1fr;
    }

    .specials-list {
        max-height: 350px;
    }
}

/* ==================== CAMERA GUIDE BUTTON ==================== */
.btn-camera-guide {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 20px;
    margin-top: 10px;
    background: linear-gradient(135deg, #1C1917 0%, #44403C 100%);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-body);
    transition: all var(--transition);
    letter-spacing: 0.3px;
}

.btn-camera-guide:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(28, 25, 23, 0.2);
}

/* ==================== CAMERA GUIDE OVERLAY ==================== */
.camera-guide-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: #0a0a0a;
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.camera-guide-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
}

.camera-guide-header h3 {
    color: white;
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.camera-guide-counter {
    color: var(--primary-light);
    font-size: 13px;
    font-weight: 600;
}

.camera-guide-close {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.camera-guide-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.camera-guide-tips {
    display: flex;
    gap: 12px;
    padding: 10px 16px;
    background: rgba(176, 141, 110, 0.12);
    overflow-x: auto;
}

.camera-tip {
    color: rgba(255, 255, 255, 0.85);
    font-size: 12px;
    white-space: nowrap;
    font-weight: 500;
}

/* Viewfinder */
.camera-viewfinder {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #000;
}

.camera-viewfinder video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.viewfinder-frame {
    position: absolute;
    inset: 15%;
    pointer-events: none;
}

.vf-corner {
    position: absolute;
    width: 32px;
    height: 32px;
    border-color: rgba(255, 255, 255, 0.7);
    border-style: solid;
}

.vf-corner.tl {
    top: 0;
    left: 0;
    border-width: 3px 0 0 3px;
    border-radius: 4px 0 0 0;
}

.vf-corner.tr {
    top: 0;
    right: 0;
    border-width: 3px 3px 0 0;
    border-radius: 0 4px 0 0;
}

.vf-corner.bl {
    bottom: 0;
    left: 0;
    border-width: 0 0 3px 3px;
    border-radius: 0 0 0 4px;
}

.vf-corner.br {
    bottom: 0;
    right: 0;
    border-width: 0 3px 3px 0;
    border-radius: 0 0 4px 0;
}

.vf-crosshair {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    transform: translate(-50%, -50%);
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
}

.vf-crosshair::before,
.vf-crosshair::after {
    content: '';
    position: absolute;
    background: rgba(255, 255, 255, 0.35);
}

.vf-crosshair::before {
    width: 1px;
    height: 12px;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
}

.vf-crosshair::after {
    width: 12px;
    height: 1px;
    left: -8px;
    top: 50%;
    transform: translateY(-50%);
}

.viewfinder-angle-label {
    position: absolute;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(8px);
    color: white;
    padding: 8px 20px;
    border-radius: 24px;
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
}

.viewfinder-tip {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(176, 141, 110, 0.85);
    color: white;
    padding: 8px 18px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
    max-width: 90%;
    text-align: center;
    white-space: nowrap;
}

/* Camera flash */
.camera-flash {
    position: absolute;
    inset: 0;
    background: white;
    opacity: 0.9;
    animation: flashAnim 0.3s ease-out forwards;
    pointer-events: none;
    z-index: 5;
}

@keyframes flashAnim {
    from {
        opacity: 0.9;
    }

    to {
        opacity: 0;
    }
}

/* Angle selector */
.camera-angle-selector {
    display: flex;
    gap: 4px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.8);
    overflow-x: auto;
}

.angle-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 8px 16px;
    border: 2px solid transparent;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.5);
    font-size: 11px;
    font-family: var(--font-body);
    cursor: pointer;
    transition: all 0.25s;
    flex-shrink: 0;
}

.angle-btn .angle-icon {
    font-size: 20px;
}

.angle-btn .angle-name {
    font-weight: 500;
}

.angle-btn .angle-status {
    display: none;
}

.angle-btn.current {
    border-color: var(--primary);
    background: rgba(176, 141, 110, 0.2);
    color: white;
}

.angle-btn.done {
    background: rgba(22, 163, 74, 0.15);
    border-color: rgba(22, 163, 74, 0.4);
    color: rgba(255, 255, 255, 0.85);
}

.angle-btn.done .angle-status {
    display: inline;
    color: #4ade80;
    font-weight: 700;
}

.angle-btn.pending {
    opacity: 0.5;
}

/* Camera actions */
.camera-actions {
    display: flex;
    gap: 12px;
    padding: 12px 16px 20px;
    background: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
}

.btn-camera-capture {
    padding: 14px 40px;
    background: white;
    color: #1C1917;
    border: none;
    border-radius: 40px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    font-family: var(--font-body);
    transition: all 0.2s;
    box-shadow: 0 4px 16px rgba(255, 255, 255, 0.2);
    animation: pulseBtnSlow 2s infinite;
}

@keyframes pulseBtnSlow {

    0%,
    100% {
        box-shadow: 0 4px 16px rgba(255, 255, 255, 0.2);
    }

    50% {
        box-shadow: 0 4px 24px rgba(255, 255, 255, 0.4);
    }
}

.btn-camera-capture:hover {
    transform: scale(1.05);
}

.btn-camera-skip {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    font-size: 13px;
    cursor: pointer;
    font-family: var(--font-body);
    transition: all 0.2s;
}

.btn-camera-skip:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* Camera fallback */
.camera-fallback {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    padding: 40px 20px;
}

.btn-camera-upload-fallback {
    padding: 12px 24px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-body);
    margin-top: 8px;
}

/* ==================== BANNER / HERO SETTINGS ==================== */
.banner-settings {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
    padding: 20px;
    margin-bottom: 20px;
}

.banner-settings h4 {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
}

.banner-preview {
    width: 100%;
    height: 160px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, #f5f0eb, #edded0);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 12px;
    position: relative;
}

.banner-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-preview-text {
    position: absolute;
    text-align: center;
    color: white;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.banner-preview-text h2 {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
}

.banner-preview-text p {
    font-size: 14px;
    opacity: 0.9;
}

.banner-upload-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: var(--bg-main);
    border: 1.5px dashed var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: all var(--transition);
    width: 100%;
    justify-content: center;
    font-family: var(--font-body);
}

.banner-upload-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* ==================== DISH DETAIL GRID ==================== */
.dish-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

@media (max-width: 480px) {
    .dish-detail-grid {
        grid-template-columns: 1fr;
    }
}

/* ==================== SUPPORT TICKETS ==================== */
.support-ticket-item {
    background: var(--bg-main);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    margin-bottom: 10px;
    transition: all var(--transition);
}

.support-ticket-item:hover {
    border-color: var(--primary-light);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.support-ticket-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.support-ticket-id {
    font-family: var(--font-mono, monospace);
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--primary);
    background: rgba(176, 141, 110, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
}

.support-ticket-cat {
    font-size: 0.72rem;
    color: var(--text-secondary);
    text-transform: capitalize;
}

.support-ticket-date {
    margin-left: auto;
    font-size: 0.68rem;
    color: var(--text-tertiary);
}

.support-ticket-subject {
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.support-ticket-msg {
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 6px;
}

.support-ticket-status {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 20px;
    background: rgba(61, 122, 74, 0.1);
    color: var(--success);
}

.support-ticket-status.pending {
    background: rgba(184, 134, 11, 0.1);
    color: var(--warning);
}

/* ==================== SUBSCRIPTION GATE ==================== */
#subscription-gate {
    padding: 16px;
    overflow-y: auto;
    align-items: flex-start;
    justify-content: center;
}

.subscription-gate-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 28px 20px;
    width: 100%;
    max-width: 620px;
    margin: 20px auto;
    box-shadow: var(--shadow-lg);
}

.subscription-gate-card .login-logo {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 8px;
}

.subscription-gate-card .login-title {
    font-size: 1.5rem;
    text-align: center;
}

.subscription-gate-card .login-subtitle {
    text-align: center;
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.trial-badge {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.12), rgba(76, 175, 80, 0.06));
    border: 1px solid rgba(76, 175, 80, 0.3);
    color: var(--success);
    text-align: center;
    padding: 10px 16px;
    border-radius: var(--radius-md);
    font-size: 0.82rem;
    font-weight: 600;
    margin: 12px 0 16px;
}

/* Plans grid — mobile-first: stack vertically */
.gate-plans {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0 0 16px;
}

.gate-plan-option {
    position: relative;
    display: block;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.25s ease;
    overflow: hidden;
}

.gate-plan-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.gate-plan-option.selected,
.gate-plan-option:hover {
    border-color: var(--primary);
    background: rgba(176, 141, 110, 0.05);
}

.gate-plan-option.selected {
    box-shadow: 0 0 0 2px rgba(176, 141, 110, 0.2);
}

.gate-recommended-badge {
    display: block;
    text-align: center;
    background: var(--primary);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 3px 0;
}

.gate-plan-inner {
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.gate-plan-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-primary);
    min-width: 70px;
}

.gate-plan-price {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary);
    font-family: var(--font-heading);
    white-space: nowrap;
}

.gate-plan-price span {
    font-size: 0.72rem;
    font-weight: 400;
    color: var(--text-secondary);
}

.gate-plan-annual {
    font-size: 0.7rem;
    color: var(--text-tertiary);
    white-space: nowrap;
}

.gate-plan-inner ul {
    list-style: none;
    padding: 0;
    margin: 0 0 0 auto;
    font-size: 0.72rem;
    color: var(--text-secondary);
    text-align: right;
}

.gate-plan-inner ul li {
    padding: 1px 0;
    white-space: nowrap;
}

.gate-plan-inner ul li::before {
    content: '✓ ';
    color: var(--success);
    font-weight: 700;
}

.gate-billing-toggle {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 16px;
}

.gate-toggle-option {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.gate-cancel-policy {
    background: rgba(176, 141, 110, 0.04);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 14px;
    margin: 0 0 12px;
}

.gate-cancel-policy h4 {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.gate-cancel-policy ul {
    list-style: none;
    padding: 0;
    margin: 0 0 8px;
}

.gate-cancel-policy ul li {
    font-size: 0.75rem;
    color: var(--text-secondary);
    padding: 3px 0;
    line-height: 1.4;
}

.gate-cancel-policy>p {
    font-size: 0.7rem;
    color: var(--text-tertiary);
    font-style: italic;
}

.gate-legal {
    margin: 10px 0;
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.gate-legal a {
    color: var(--primary);
    text-decoration: underline;
}

.gate-footer-note {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin-top: 10px;
}

/* Desktop: 3-column grid for plans */
@media (min-width: 641px) {
    #subscription-gate {
        align-items: center;
        padding: 24px;
    }

    .subscription-gate-card {
        padding: 36px 32px;
    }

    .gate-plans {
        flex-direction: row;
        gap: 12px;
    }

    .gate-plan-option {
        flex: 1;
    }

    .gate-plan-inner {
        flex-direction: column;
        text-align: center;
        padding: 16px 12px;
        gap: 4px;
    }

    .gate-plan-inner ul {
        text-align: left;
        margin: 6px 0 0;
    }
}

/* Extra small screens */
@media (max-width: 400px) {
    .subscription-gate-card {
        padding: 20px 14px;
    }

    .gate-plan-price {
        font-size: 1.2rem;
    }

    .trial-badge {
        font-size: 0.75rem;
        padding: 8px 12px;
    }
}

/* ==================== TRIAL COUNTDOWN BANNER ==================== */
.trial-countdown-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.08), rgba(76, 175, 80, 0.03));
    border: 1px solid rgba(76, 175, 80, 0.2);
    border-radius: var(--radius-md);
    padding: 12px 20px;
    margin-bottom: 20px;
    font-size: 0.85rem;
    color: var(--text-primary);
    flex-wrap: wrap;
}

.trial-banner-btn {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 6px 16px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
    transition: all var(--transition);
}

.trial-banner-btn:hover {
    background: var(--primary-dark, #8B6F55);
    transform: translateY(-1px);
}

/* Warning level (4-7 days) */
.trial-banner-warning {
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.10), rgba(255, 152, 0, 0.04));
    border-color: rgba(255, 152, 0, 0.35);
}

.trial-btn-warning {
    background: #E67E22;
}

.trial-btn-warning:hover {
    background: #D35400;
}

/* Urgent level (1-3 days) */
.trial-banner-urgent {
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.10), rgba(231, 76, 60, 0.04));
    border-color: rgba(231, 76, 60, 0.35);
    animation: urgentPulse 2s ease infinite;
}

.trial-btn-urgent {
    background: #E74C3C;
}

.trial-btn-urgent:hover {
    background: #C0392B;
}

/* Expired level */
.trial-banner-expired {
    background: linear-gradient(135deg, rgba(192, 57, 43, 0.12), rgba(192, 57, 43, 0.05));
    border-color: rgba(192, 57, 43, 0.4);
    animation: urgentPulse 3s ease infinite;
}

@keyframes urgentPulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.85;
    }
}

/* ==================== 3D MODEL HISTORY ==================== */
.models3d-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.models3d-header h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
}

.models3d-quota {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text-secondary);
}

.quota-bar {
    width: 120px;
    height: 8px;
    background: var(--border-light);
    border-radius: 4px;
    overflow: hidden;
}

.quota-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-radius: 4px;
    transition: width .4s ease;
}

.models3d-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.model3d-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all .2s;
}

.model3d-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.model3d-thumb {
    height: 120px;
    background: linear-gradient(135deg, #f0ebe4, #e8dfd4);
    display: flex;
    align-items: center;
    justify-content: center;
}

.model3d-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.model3d-icon {
    font-size: 48px;
}

.model3d-info {
    padding: 12px;
}

.model3d-info strong {
    display: block;
    font-size: 14px;
    margin-bottom: 4px;
}

.model3d-provider {
    display: inline-block;
    background: var(--primary-light);
    color: #fff;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.model3d-date {
    font-size: 11px;
    color: var(--text-muted);
    margin-left: 8px;
}

.model3d-actions {
    display: flex;
    gap: 4px;
    padding: 0 12px 12px;
}

.model3d-actions button {
    background: none;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 4px 10px;
    cursor: pointer;
    font-size: 13px;
    transition: all .15s;
}

.model3d-actions button:hover {
    background: var(--border-light);
}

/* ==================== QR ANALYTICS ==================== */
.qr-analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.qr-stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px;
    text-align: center;
}

.qr-stat-card.accent {
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(176, 141, 110, .06), rgba(176, 141, 110, .02));
}

.qr-stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.1;
}

.qr-stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.qr-analytics-charts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width:768px) {
    .qr-analytics-charts {
        grid-template-columns: 1fr;
    }
}

.qr-chart-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px;
}

.qr-chart-section h4 {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 12px;
}

.qr-bar-chart {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 80px;
    padding-top: 10px;
}

.qr-bar-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.qr-bar {
    background: linear-gradient(180deg, var(--primary), var(--primary-dark));
    border-radius: 4px 4px 0 0;
    width: 100%;
    min-width: 20px;
    transition: height .3s ease;
}

.qr-bar-col span {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 4px;
}

.qr-table-stats {
    width: 100%;
    font-size: 13px;
}

.qr-table-stats td {
    padding: 6px 8px;
    border-bottom: 1px solid var(--border-light);
}

.qr-table-stats td:last-child {
    text-align: right;
}

/* ==================== RESTAURANT SWITCHER ==================== */
.rest-switcher {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    margin: 0 8px 4px;
    background: rgba(255, 255, 255, .06);
    border-radius: var(--radius-sm);
}

.rest-switcher label {
    font-size: 11px;
    color: var(--text-sidebar);
    opacity: .7;
    white-space: nowrap;
}

.rest-switcher select {
    flex: 1;
    background: var(--bg-sidebar-hover);
    color: var(--text-sidebar);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 6px;
    padding: 5px 8px;
    font-size: 12px;
    font-family: inherit;
    cursor: pointer;
}

.rest-switcher select:focus {
    border-color: var(--primary);
    outline: none;
}

.btn-add-rest {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 6px;
    width: 28px;
    height: 28px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .15s;
}

.btn-add-rest:hover {
    background: var(--primary-light);
    transform: scale(1.1);
}

/* ==================== ADD RESTAURANT MODAL ==================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, .5);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    animation: fadeIn .2s;
}

.modal-content {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    width: 90%;
    box-shadow: var(--shadow-lg);
    animation: slideUp .25s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px 0;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--text-muted);
    padding: 4px;
}

.modal-body {
    padding: 20px 24px;
}

.modal-body .form-group {
    margin-bottom: 14px;
}

.modal-body .form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-secondary);
}

.modal-body .form-group input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
}

.modal-body .form-group input:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(176, 141, 110, .15);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px 20px;
}

.modal-footer .btn-secondary {
    background: var(--bg-main);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    cursor: pointer;
}

.modal-footer .btn-primary {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    cursor: pointer;
    font-weight: 600;
}

.modal-footer .btn-primary:hover {
    background: var(--primary-dark);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ==================== TRIAL BANNER ==================== */
.trial-banner {
    background: linear-gradient(135deg, #F59E0B, #D97706);
    padding: 10px 20px;
    position: sticky;
    top: 0;
    z-index: 100;
    animation: slideDown .4s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }

    to {
        transform: translateY(0);
    }
}

.trial-banner-content {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.trial-banner-icon {
    font-size: 20px;
}

.trial-banner-text {
    font-size: 13px;
    color: #1C1917;
    flex: 1;
}

.trial-banner-text strong {
    color: #000;
}

.trial-banner-cta {
    background: #1C1917;
    color: #F59E0B;
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: all .2s;
    white-space: nowrap;
}

.trial-banner-cta:hover {
    background: #000;
    transform: translateY(-1px);
}

.trial-banner-close {
    background: none;
    border: none;
    color: #1C1917;
    font-size: 16px;
    cursor: pointer;
    padding: 4px;
    opacity: .6;
    transition: opacity .2s;
}

.trial-banner-close:hover {
    opacity: 1;
}

.trial-banner.urgent {
    background: linear-gradient(135deg, #EF4444, #DC2626);
}

.trial-banner.urgent .trial-banner-text {
    color: #fff;
}

.trial-banner.urgent .trial-banner-text strong {
    color: #fff;
}

.trial-banner.urgent .trial-banner-close {
    color: #fff;
}

.trial-banner.urgent .trial-banner-cta {
    background: #fff;
    color: #DC2626;
}

/* ==================== EXPIRED OVERLAY ==================== */
.expired-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(10, 14, 23, .95);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn .3s ease;
}

.expired-content {
    text-align: center;
    max-width: 600px;
    padding: 40px;
}

.expired-icon {
    font-size: 60px;
    margin-bottom: 16px;
}

.expired-content h2 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #fff, #F59E0B);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.expired-content>p {
    color: #9CA3AF;
    font-size: 15px;
    margin-bottom: 32px;
}

.expired-plans {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.expired-plan-card {
    background: #1F2937;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    position: relative;
}

.expired-plan-card.featured {
    border-color: var(--primary, #B08D6E);
}

.expired-popular {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--primary, #B08D6E), #8B6F55);
    color: #fff;
    padding: 3px 12px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 700;
}

.expired-plan-card h3 {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 8px;
}

.expired-price {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 16px;
}

.expired-price span {
    font-size: 14px;
    color: #9CA3AF;
    font-weight: 400;
}

.expired-plan-card ul {
    list-style: none;
    margin-bottom: 20px;
}

.expired-plan-card li {
    font-size: 13px;
    color: #9CA3AF;
    padding: 4px 0;
}

.btn-expired-upgrade {
    width: 100%;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, .15);
    background: transparent;
    color: #fff;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all .2s;
}

.btn-expired-upgrade:hover {
    border-color: rgba(255, 255, 255, .3);
    background: rgba(255, 255, 255, .04);
}

.btn-expired-upgrade.pro {
    background: linear-gradient(135deg, var(--primary, #B08D6E), #8B6F55);
    border: none;
    box-shadow: 0 4px 20px rgba(176, 141, 110, .3);
}

.btn-expired-upgrade.pro:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(176, 141, 110, .4);
}

@media (max-width: 600px) {
    .expired-plans {
        grid-template-columns: 1fr;
    }
}

/* ==================== BILLING SETUP STEP ==================== */
.billing-trial-badge {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: linear-gradient(135deg, #ECFDF5, #D1FAE5);
    border: 1px solid #A7F3D0;
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-bottom: 20px;
    text-align: left;
}

.billing-trial-icon {
    font-size: 28px;
    flex-shrink: 0;
}

.billing-trial-badge strong {
    color: #065F46;
    font-size: 14px;
}

.billing-plan-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-main);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    margin-bottom: 20px;
}

.billing-plan-name {
    font-weight: 700;
    font-size: 15px;
    color: var(--text-primary);
}

.billing-plan-price {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.billing-security-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 11px;
    color: var(--text-tertiary);
    margin-top: 12px;
}

.billing-skip {
    text-align: center;
    margin-top: 12px;
    font-size: 13px;
}

.billing-skip a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.billing-skip a:hover {
    color: var(--primary);
}

#billing-data-form .form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

#billing-data-form .form-group {
    margin-bottom: 12px;
    text-align: left;
}

#billing-data-form label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    display: block;
}

#billing-data-form input {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: var(--font-body);
    transition: border-color 0.2s, box-shadow 0.2s;
    background: var(--bg-card);
}

#billing-data-form input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(176, 141, 110, 0.12);
}

@media (max-width: 480px) {
    #billing-data-form .form-row-2 {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   ONBOARDING WIZARD — First-time Menu Creation Guide
   ============================================================ */
.onboarding-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 12, 10, 0.65);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    opacity: 0;
    animation: ob-fadeIn 0.4s ease forwards;
    padding: 20px;
}

@keyframes ob-fadeIn {
    to {
        opacity: 1;
    }
}

.onboarding-card {
    background: var(--bg-card, #FFFFFF);
    border: 1px solid var(--border, #e5e0db);
    border-radius: 24px;
    width: 100%;
    max-width: 580px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.05);
    transform: scale(0.92) translateY(20px);
    animation: ob-slideUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.15s forwards;
    position: relative;
}

@keyframes ob-slideUp {
    to {
        transform: scale(1) translateY(0);
    }
}

.onboarding-card::-webkit-scrollbar {
    width: 4px;
}

.onboarding-card::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

/* Close / Skip button */
.ob-skip {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    color: var(--text-muted, #999);
    font-size: 0.78rem;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 20px;
    transition: all 0.2s;
    font-family: var(--font-body);
    z-index: 2;
}

.ob-skip:hover {
    background: var(--bg-subtle, #f5f3f0);
    color: var(--text-secondary);
}

/* Progress bar */
.ob-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 24px 32px 0;
}

.ob-progress-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border, #e5e0db);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ob-progress-dot.active {
    background: var(--primary, #B08D6E);
    transform: scale(1.3);
    box-shadow: 0 0 0 4px rgba(176, 141, 110, 0.2);
}

.ob-progress-dot.done {
    background: var(--success, #3D7A4A);
}

.ob-progress-line {
    width: 28px;
    height: 2px;
    background: var(--border, #e5e0db);
    transition: background 0.3s;
}

.ob-progress-line.done {
    background: var(--success, #3D7A4A);
}

/* Content area */
.ob-content {
    padding: 28px 36px 36px;
    text-align: center;
}

.ob-emoji {
    font-size: 3.5rem;
    margin-bottom: 16px;
    display: block;
    animation: ob-bounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes ob-bounce {
    0% {
        transform: scale(0) rotate(-15deg);
    }

    60% {
        transform: scale(1.2) rotate(5deg);
    }

    100% {
        transform: scale(1) rotate(0);
    }
}

.ob-title {
    font-family: var(--font-display, 'Playfair Display', serif);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: 0.01em;
}

.ob-subtitle {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.55;
    margin-bottom: 28px;
    max-width: 440px;
    margin-left: auto;
    margin-right: auto;
}

.ob-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 6px;
}

/* Step 1: Welcome CTA */
.ob-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 36px;
    background: linear-gradient(135deg, var(--primary, #B08D6E), var(--primary-dark, #8B6F55));
    color: #FFF;
    border: none;
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 700;
    font-family: var(--font-body);
    cursor: pointer;
    transition: all 0.25s;
    box-shadow: 0 4px 16px rgba(176, 141, 110, 0.35);
}

.ob-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(176, 141, 110, 0.45);
}

/* Step 2: Menu type grid */
.ob-type-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    text-align: left;
    margin-bottom: 8px;
}

.ob-type-card {
    padding: 16px;
    border: 2px solid var(--border, #e5e0db);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--bg-card, #FFF);
    position: relative;
    overflow: hidden;
}

.ob-type-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent-warm, #D4A574));
    opacity: 0;
    transition: opacity 0.25s;
}

.ob-type-card:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.ob-type-card:hover::before {
    opacity: 1;
}

.ob-type-card.selected {
    border-color: var(--primary);
    background: rgba(176, 141, 110, 0.06);
}

.ob-type-card.selected::before {
    opacity: 1;
}

.ob-type-icon {
    font-size: 1.8rem;
    margin-bottom: 6px;
}

.ob-type-name {
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.ob-type-desc {
    font-size: 0.72rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Step 3: Form fields */
.ob-form {
    text-align: left;
}

.ob-form .form-group {
    margin-bottom: 16px;
}

.ob-form label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.ob-form input,
.ob-form textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    font-size: 0.92rem;
    font-family: var(--font-body);
    color: var(--text-primary);
    background: var(--bg-card);
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.ob-form input:focus,
.ob-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(176, 141, 110, 0.12);
}

.ob-form textarea {
    resize: vertical;
    min-height: 60px;
}

.ob-form .ob-auto-hint {
    font-size: 0.72rem;
    color: var(--primary);
    margin-top: 4px;
}

/* Step 4: Import choice grid */
.ob-import-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    text-align: left;
}

.ob-import-card {
    padding: 20px 16px;
    border: 2px solid var(--border);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.25s;
    background: var(--bg-card);
    text-align: center;
}

.ob-import-card:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.ob-import-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

.ob-import-name {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-primary);
    margin-bottom: 3px;
}

.ob-import-desc {
    font-size: 0.7rem;
    color: var(--text-muted);
    line-height: 1.35;
}

.ob-import-card .ob-import-badge {
    display: inline-block;
    margin-top: 8px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 3px 10px;
    border-radius: 20px;
    background: rgba(176, 141, 110, 0.1);
    color: var(--primary);
}

/* Step 5: Celebration */
.ob-celebration {
    position: relative;
    overflow: hidden;
}

.ob-confetti {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    overflow: hidden;
}

.ob-confetti-piece {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 2px;
    opacity: 0;
    animation: ob-confetti-fall 2.5s ease-out forwards;
}

@keyframes ob-confetti-fall {
    0% {
        transform: translateY(-40px) rotate(0deg) scale(0);
        opacity: 1;
    }

    20% {
        opacity: 1;
        transform: translateY(10px) rotate(120deg) scale(1);
    }

    100% {
        transform: translateY(350px) rotate(720deg) scale(0.3);
        opacity: 0;
    }
}

.ob-success-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--success, #3D7A4A), #5ca66b);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    margin: 0 auto 20px;
    animation: ob-bounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 8px 24px rgba(61, 122, 74, 0.3);
}

.ob-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 24px;
    flex-wrap: wrap;
}

.ob-btn-secondary {
    padding: 12px 24px;
    background: var(--bg-subtle, #f5f3f0);
    color: var(--text-secondary);
    border: 1.5px solid var(--border);
    border-radius: 12px;
    font-size: 0.88rem;
    font-weight: 600;
    font-family: var(--font-body);
    cursor: pointer;
    transition: all 0.2s;
}

.ob-btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* Responsive */
@media (max-width: 520px) {
    .ob-content {
        padding: 20px 20px 28px;
    }

    .ob-title {
        font-size: 1.3rem;
    }

    .ob-type-grid {
        grid-template-columns: 1fr;
    }

    .ob-import-grid {
        grid-template-columns: 1fr;
    }

    .onboarding-card {
        max-width: 100%;
        border-radius: 18px;
    }
}

/* ==================== SUBSCRIPTION MANAGER ==================== */
.sub-current-plan {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #FAFAF9, #F5F5F4);
    border: 1.5px solid var(--border);
    border-radius: 16px;
    flex-wrap: wrap;
}

.sub-plan-info {
    flex: 1;
    min-width: 200px;
}

.sub-plan-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 4px;
}

.sub-plan-header h4 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.sub-plan-price {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    margin: 4px 0;
}

.sub-plan-price span {
    font-size: 14px;
    font-weight: 400;
    color: var(--text-secondary);
}

.sub-status-detail {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 4px 0 0;
}

.sub-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 700;
}

.sub-status-badge.trial {
    background: #DBEAFE;
    color: #1D4ED8;
}

.sub-status-badge.active {
    background: #D1FAE5;
    color: #065F46;
}

.sub-status-badge.expired {
    background: #FEF3C7;
    color: #92400E;
}

.sub-status-badge.suspended {
    background: #FEE2E2;
    color: #991B1B;
}

.sub-status-badge.inactive {
    background: #F3F4F6;
    color: #6B7280;
}

.sub-plan-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
}

/* Danger buttons */
.btn-danger-outline {
    padding: 8px 16px;
    background: transparent;
    color: #EF4444;
    border: 1.5px solid #EF4444;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-body);
    transition: all var(--transition);
}

.btn-danger-outline:hover {
    background: #FEF2F2;
    border-color: #DC2626;
    color: #DC2626;
}

/* ==================== SECTION PLAN GATE OVERLAY ==================== */
.section-plan-gate {
    position: relative;
    background: linear-gradient(135deg, #FAFAF9 0%, #F0EFEE 100%);
    border: 2px dashed var(--border);
    border-radius: 16px;
    padding: 48px 24px;
    text-align: center;
    margin-bottom: 20px;
}

.section-gate-content {
    max-width: 400px;
    margin: 0 auto;
}

.section-gate-content h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 12px 0 8px;
}

.section-gate-content p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
}

/* Plans comparison — 3 columns */
.plans-comparison {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

/* ============================================================
   RESPONSIVE DESIGN — Tablet, Phone, Small Phone
   ============================================================ */

/* ==================== TABLET (≤1024px) ==================== */
@media (max-width: 1024px) {
    :root {
        --sidebar-width: 0px;
    }

    /* Sidebar collapses to slide-out */
    .sidebar {
        transform: translateX(-100%);
        width: 260px;
        z-index: 1000;
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.3);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    /* Overlay when sidebar is open */
    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.4);
        z-index: 999;
    }

    .sidebar-overlay.active {
        display: block;
    }

    /* Admin panel stacks vertically on mobile */
    .admin-panel {
        flex-direction: column !important;
    }

    /* Show mobile header */
    .mobile-header {
        display: flex !important;
        width: 100% !important;
        flex-shrink: 0;
    }

    /* Main content full width */
    .main-content {
        margin-left: 0;
        padding: 20px 16px;
        max-width: 100%;
    }

    /* KPI grid 2 columns */
    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    /* Charts stack */
    .charts-row {
        grid-template-columns: 1fr;
    }

    /* Popular grid 2 columns */
    .popular-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Menu grid */
    .menu-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    }

    /* Plans comparison */
    .plans-comparison {
        grid-template-columns: 1fr;
    }

    /* Section header wrap */
    .section-header {
        flex-direction: column;
        gap: 12px;
    }

    .header-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    /* Orders table scroll */
    .orders-table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .orders-table-container table {
        min-width: 700px;
    }

    /* Settings grid */
    .settings-columns {
        grid-template-columns: 1fr;
    }

    /* Subscription gate */
    .subscription-gate-card {
        max-width: 100%;
    }

    .gate-plans {
        flex-direction: column;
    }

    /* QR analytics */
    .qr-analytics-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Model 3D grid */
    .models3d-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }

    /* Onboarding modal */
    .ob-overlay-content {
        max-width: 90vw;
        padding: 24px 20px;
    }

    /* Restaurant switcher */
    .restaurant-switcher {
        flex-wrap: wrap;
    }

    /* Table-menu assignments */
    .table-select-grid {
        grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
    }
}

/* ==================== PHONE (≤768px) ==================== */
@media (max-width: 768px) {

    /* Main content tighter */
    .main-content {
        padding: 16px 12px;
    }

    /* Section titles smaller */
    .section-title {
        font-size: 22px;
    }

    .section-subtitle {
        font-size: 13px;
    }

    /* KPI cards compact */
    .kpi-card {
        padding: 14px;
        gap: 10px;
    }

    .kpi-value {
        font-size: 20px;
    }

    .kpi-icon {
        font-size: 22px;
    }

    /* Chart card compact */
    .chart-card {
        padding: 16px;
    }

    .bar-chart {
        height: 150px;
    }

    /* Menu cards */
    .menu-grid {
        grid-template-columns: 1fr;
    }

    .menu-card {
        padding: 16px;
    }

    /* Dish modal full screen */
    #dish-modal,
    .modal-overlay {
        padding: 0;
    }

    #dish-modal .dish-modal-content,
    .modal-content {
        border-radius: 0;
        max-height: 100vh;
        height: 100%;
        max-width: 100%;
        margin: 0;
    }

    .dish-modal-content {
        padding: 20px 16px;
    }

    /* Dish form grid single col */
    .dish-form-grid {
        grid-template-columns: 1fr;
    }

    /* Allergen grid compact */
    .allergen-check-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Orders filters */
    .orders-filters {
        flex-direction: column;
        gap: 8px;
    }

    .orders-filters select,
    .orders-filters input {
        width: 100%;
    }

    /* Orders KPI row */
    .order-kpi-row,
    #orders-kpi-row {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .order-kpi-card {
        padding: 12px;
    }

    /* QR section */
    .qr-analytics-grid {
        grid-template-columns: 1fr 1fr;
    }

    .qr-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    }

    .qr-card {
        padding: 12px;
    }

    /* Settings */
    .branding-preview {
        flex-direction: column;
        align-items: flex-start;
    }

    /* Support ticket form */
    .support-form-grid {
        grid-template-columns: 1fr;
    }

    /* Subscription gate */
    #subscription-gate {
        padding: 12px 8px;
    }

    .subscription-gate-card {
        padding: 20px 14px;
    }

    .gate-plan-option {
        padding: 14px 12px;
    }

    /* Login card */
    .login-card {
        padding: 32px 24px;
    }

    .login-title {
        font-size: 22px;
    }

    .login-logo {
        font-size: 36px;
    }

    /* PIN overlay */
    .pin-overlay-content {
        max-width: 90vw;
        padding: 24px 16px;
    }

    /* Billing step */
    .billing-step-card {
        max-width: 100%;
        padding: 24px 16px;
    }

    .billing-form-grid {
        grid-template-columns: 1fr;
    }

    /* Restaurant detail modal */
    .detail-overlay {
        padding: 0;
    }

    .detail-content {
        border-radius: 0;
        height: 100%;
        max-height: 100vh;
    }

    /* User management */
    .user-list-grid {
        grid-template-columns: 1fr;
    }

    /* Channel settings */
    .channels-grid {
        grid-template-columns: 1fr;
    }

    /* Camera guide overlay */
    .camera-guide-overlay {
        padding: 12px;
    }

    .camera-guide-content {
        max-width: 100%;
        border-radius: 12px;
    }

    /* Table menu assignments */
    .table-menu-layout {
        flex-direction: column;
    }

    /* 3D models */
    .models3d-grid {
        grid-template-columns: 1fr 1fr;
    }

    /* Update banner */
    .trial-banner-content {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }

    /* Buttons stack on small screens */
    .header-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .header-actions .btn-primary,
    .header-actions .btn-secondary {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    /* Popular grid single */
    .popular-grid {
        grid-template-columns: 1fr;
    }

    /* Category pills scroll */
    .editor-categories {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 4px;
    }

    .editor-categories::-webkit-scrollbar {
        display: none;
    }

    .editor-cat-btn {
        flex-shrink: 0;
    }

    /* Specials */
    .special-card {
        padding: 12px;
    }

    .special-actions {
        flex-direction: column;
        gap: 6px;
    }
}

/* ==================== SMALL PHONE (≤480px) ==================== */
@media (max-width: 480px) {

    /* Even tighter spacing */
    .main-content {
        padding: 12px 8px;
    }

    /* KPI single column */
    .kpi-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .kpi-card {
        padding: 12px;
    }

    .kpi-value {
        font-size: 18px;
    }

    /* Section titles */
    .section-title {
        font-size: 18px;
    }

    /* Charts */
    .bar-chart {
        height: 120px;
    }

    /* Orders KPIs vertical */
    .order-kpi-row,
    #orders-kpi-row {
        grid-template-columns: 1fr;
    }

    /* QR cards smaller */
    .qr-grid {
        grid-template-columns: 1fr 1fr;
    }

    .qr-analytics-grid {
        grid-template-columns: 1fr;
    }

    /* 3D models single column */
    .models3d-grid {
        grid-template-columns: 1fr;
    }

    /* Login */
    .login-card {
        padding: 24px 16px;
    }

    .login-title {
        font-size: 18px;
        letter-spacing: 1px;
    }

    /* Subscription gate */
    .gate-plan-inner {
        padding: 12px;
    }

    .gate-plan-inner h3 {
        font-size: 15px;
    }

    /* Buttons */
    .btn-primary,
    .btn-secondary {
        padding: 8px 14px;
        font-size: 12px;
    }

    /* Mobile header compact */
    .mobile-header {
        padding: 10px 12px;
    }

    .mobile-title {
        font-size: 14px;
    }

    /* Allergens single col */
    .allergen-check-grid {
        grid-template-columns: 1fr;
    }

    /* Sidebar wider on small phones */
    .sidebar {
        width: 85vw;
    }

    /* Table select grid wrapping */
    .table-select-grid {
        display: flex !important;
        flex-wrap: wrap;
        gap: 6px;
    }

    .table-num-btn {
        min-width: 44px;
        min-height: 44px;
    }

    /* Period filter buttons wrap */
    .kpi-period-filters {
        flex-wrap: wrap !important;
    }

    /* Menu select items mobile */
    .menu-select-item {
        padding: 10px !important;
        gap: 8px !important;
    }

    .menu-select-icon {
        font-size: 20px !important;
    }

    /* Section content mobile padding */
    .section-content,
    .section {
        padding-left: 12px;
        padding-right: 12px;
    }

    /* Period select full width on mobile */
    .period-select {
        width: 100%;
    }

    /* Header actions stack */
    .section-header .header-actions {
        width: 100%;
    }
}

/* ============================================================
   UPGRADE MODAL — Premium plan comparison overlay
   ============================================================ */
.upgrade-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.upgrade-modal-content {
    background: var(--bg-primary, #FAFAF8);
    border-radius: 20px;
    padding: 40px 36px;
    max-width: 720px;
    width: 95vw;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(40px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.upgrade-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-muted, #999);
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.upgrade-close:hover {
    background: rgba(0, 0, 0, 0.06);
    color: var(--text-primary, #333);
}

.upgrade-header {
    text-align: center;
    margin-bottom: 28px;
}

.upgrade-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.upgrade-header h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary, #1A1613);
    margin-bottom: 8px;
}

.upgrade-header p {
    color: var(--text-muted, #8C8278);
    font-size: 0.92rem;
    line-height: 1.5;
    margin: 4px 0;
}

.upgrade-plans-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.upgrade-plan-card {
    border: 2px solid var(--border, #E8E4DE);
    border-radius: 16px;
    padding: 24px 16px;
    text-align: center;
    position: relative;
    transition: all 0.3s;
    background: var(--bg-primary, #fff);
}

.upgrade-plan-card.popular {
    border-color: var(--primary, #B08D6E);
    box-shadow: 0 8px 32px rgba(176, 141, 110, 0.15);
    transform: scale(1.03);
}

.upgrade-plan-card.current {
    opacity: 0.6;
}

.upgrade-popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary, #B08D6E);
    color: white;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.upgrade-plan-card h4 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.upgrade-price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary, #B08D6E);
    margin-bottom: 12px;
}

.upgrade-price span {
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--text-muted, #999);
}

.upgrade-plan-card ul {
    list-style: none;
    padding: 0;
    margin: 0 0 16px 0;
}

.upgrade-plan-card li {
    font-size: 0.82rem;
    color: var(--text-secondary, #666);
    padding: 4px 0;
}

.upgrade-btn {
    width: 100%;
    padding: 10px 16px;
    border: none;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--primary, #B08D6E);
    color: white;
}

.upgrade-btn:hover:not(:disabled) {
    background: var(--primary-dark, #8B6F55);
    transform: translateY(-1px);
}

.upgrade-btn.current {
    background: var(--border, #E8E4DE);
    color: var(--text-muted, #999);
    cursor: default;
}

.upgrade-btn.downgrade {
    background: transparent;
    color: var(--text-muted, #ccc);
    cursor: default;
}

.upgrade-footer {
    text-align: center;
}

.upgrade-footer a {
    color: var(--primary, #B08D6E);
    font-size: 0.85rem;
    text-decoration: none;
    font-weight: 500;
}

.upgrade-footer a:hover {
    text-decoration: underline;
}

/* --- Usage Progress Bars --- */
.usage-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.usage-bar-label {
    font-size: 0.8rem;
    color: var(--text-secondary, #666);
    min-width: 80px;
}

.usage-bar-track {
    flex: 1;
    height: 8px;
    background: var(--border, #E8E4DE);
    border-radius: 4px;
    overflow: hidden;
}

.usage-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s ease;
    background: var(--primary, #B08D6E);
}

.usage-bar-fill.warning {
    background: #F59E0B;
}

.usage-bar-fill.danger {
    background: #EF4444;
}

.usage-bar-count {
    font-size: 0.75rem;
    color: var(--text-muted, #999);
    min-width: 48px;
    text-align: right;
}

/* --- Trial Countdown Banner --- */
.trial-countdown-banner {
    background: linear-gradient(135deg, #FFF7ED, #FEF3C7);
    border: 1px solid #FCD34D;
    border-radius: 12px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    font-size: 0.88rem;
    color: #92400E;
}

.trial-banner-btn {
    background: #B08D6E;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}

.trial-banner-btn:hover {
    background: #8B6F55;
}

/* --- Plan Status Badge --- */
.plan-status-badge {
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
}

.plan-status-badge.trial {
    background: linear-gradient(135deg, #FFF7ED, #FEF3C7);
    color: #92400E;
    border: 1px solid #FCD34D;
}

.plan-status-badge.active {
    background: linear-gradient(135deg, #F0FFF4, #C6F6D5);
    color: #22543D;
    border: 1px solid #68D391;
}

.plan-status-badge.expired {
    background: linear-gradient(135deg, #FFF5F5, #FED7D7);
    color: #9B2C2C;
    border: 1px solid #FC8181;
}

/* Responsive upgrade modal */
@media (max-width: 768px) {
    .upgrade-plans-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .upgrade-plan-card.popular {
        transform: none;
    }

    .upgrade-modal-content {
        padding: 24px 16px;
    }

    .trial-countdown-banner {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
}

/* ==================== REVIEWS ADMIN ==================== */
.reviews-kpis {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.review-kpi {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.review-kpi-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.review-kpi-label {
    font-size: 0.78rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.review-filter-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.review-filter-select {
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-card);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.85rem;
    cursor: pointer;
}

.review-filter-select:focus {
    outline: none;
    border-color: var(--primary);
}

.reviews-admin-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.review-admin-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px 20px;
    transition: box-shadow 0.2s;
}

.review-admin-card:hover {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.review-admin-card.review-hidden {
    opacity: 0.5;
    border-style: dashed;
}

.review-admin-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 8px;
}

.review-admin-info {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
}

.review-admin-info strong {
    font-weight: 700;
    color: var(--text-primary);
}

.review-admin-stars {
    color: #F59E0B;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.review-admin-date {
    color: var(--text-secondary);
    font-size: 0.78rem;
}

.review-dish-tag {
    padding: 2px 8px;
    background: var(--bg-subtle, #f5f5f5);
    border-radius: 6px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.review-admin-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.review-admin-actions .btn-sm {
    padding: 6px 10px;
    font-size: 0.8rem;
    border-radius: 8px;
}

.review-admin-comment {
    font-size: 0.88rem;
    color: var(--text-primary);
    line-height: 1.5;
    margin: 0 0 6px;
}

.review-admin-reply {
    margin-top: 8px;
    padding: 10px 14px;
    background: rgba(176, 141, 110, 0.08);
    border-radius: 8px;
    border-left: 3px solid var(--primary);
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.review-admin-reply span {
    font-weight: 700;
    color: var(--primary);
}

@media (max-width: 768px) {
    .reviews-kpis {
        grid-template-columns: repeat(2, 1fr);
    }

    .review-filter-bar {
        flex-direction: column;
    }

    .review-admin-top {
        flex-direction: column;
    }
}

/* Fix empty subscription card gap in settings */
#subscription-manager-card:has(#subscription-manager-content:empty) {
    display: none !important;
}

#subscription-manager-content:empty {
    display: none;
}

/* Ensure clean background for main content */
.main-content {
    background: var(--bg-main) !important;
    background-image: none !important;
}

/* ============================================================
   CONTRAST-SAFE OVERRIDES
   These ensure text on white/light card backgrounds stays readable
   when the primary color is very light (yellow, pink, white etc).
   Uses --primary-text (auto-darkened) instead of --primary.
   --primary is preserved for sidebar, badges, icons, buttons bg.
   ============================================================ */

/* --- Card headings and section titles on white bg --- */
.admin-card h3,
.admin-card h4,
.settings-card h3,
.settings-card h4,
.section-title,
.card-header h3,
.card-header-title,
.page-title,
.stat-label,
.form-group>label {
    color: var(--primary-text);
}

/* --- KPI and stat values on white cards --- */
.kpi-value,
.stat-value,
.kpi-card .kpi-label,
.dash-stat-number {
    color: var(--primary-text);
}

/* --- Links and interactive text on white bg --- */
.admin-card a:not(.btn-primary):not(.btn-outline),
.settings-card a:not(.btn-primary):not(.btn-outline),
.table-link,
.text-link {
    color: var(--primary-text);
}

/* --- Form labels and field accents --- */
.form-group label,
.field-label,
.input-label {
    color: var(--primary-text);
}

/* --- Template selector active border --- */
.template-card.active {
    border-color: var(--primary);
}

/* --- Buttons with primary background --- keep text readable --- */
.btn-primary,
.btn-action,
[class*="btn-"] {
    /* Do NOT override these - they use background: var(--primary) + color: var(--on-primary) */
}

/* Buttons with primary bg must use --on-primary for text */
.btn-primary,
.tag-sm,
.plan-badge,
.ob-step-btn,
.settings-card .btn-primary,
.admin-card .btn-primary {
    color: var(--on-primary) !important;
}

/* --- Outline/ghost buttons on white bg --- */
.btn-outline {
    color: var(--primary-text);
    border-color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--on-primary);
}

/* --- Tab/pill active state on white bg --- */
.category-tab.active,
.tab-btn.active,
.filter-pill.active {
    background: var(--primary);
    color: var(--on-primary);
}

/* --- Toast/notification text --- */
.toast {
    color: var(--on-primary);
}

/* --- Sidebar: KEEP bright primary (dark background) --- */
.sidebar .nav-item.active,
.sidebar .nav-label,
.sidebar a.active {
    color: var(--primary) !important;
    /* keep bright on dark bg */
}

/* --- Plan badge in sidebar --- */
.sidebar .plan-upgrade-btn {
    background: var(--primary);
    color: var(--on-primary);
}

/* --- Trial banner text --- */
.trial-banner {
    color: var(--on-primary);
}

/* --- Fix icon colors in cards (should be decorative, use primary) --- */
.admin-card .icon,
.kpi-card .kpi-icon,
.dash-icon {
    color: var(--primary);
    /* icons are decorative, keep bright */
}

/* --- Toggle switch accent --- */
.toggle-switch input:checked+.toggle-slider {
    background: var(--primary);
}

/* --- Progress bars --- */
.progress-fill,
.usage-bar-fill {
    background: var(--primary);
}

/* --- Input focus ring --- */
input:focus,
textarea:focus,
select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb, 155, 123, 90), 0.15);
}

/* --- Menu/dish card price --- */
.dish-price {
    color: var(--primary-text);
    font-weight: 700;
}

/* --- Dropdown active item --- */
.dropdown-item.active,
.dropdown-item:hover {
    background: var(--primary-light);
    color: var(--primary-text);
}

/* --- Subscription/billing section --- */
.billing-amount,
.plan-name-display {
    color: var(--primary-text);
}

/* ==================== WIZARD STYLES ==================== */
.wizard-card {
    background: var(--bg-card);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 24px 20px;
    width: calc(50% - 10px);
    min-width: 200px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    text-align: center;
}

.wizard-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.06);
}

.wizard-card .wizard-icon {
    font-size: 40px;
    margin-bottom: 12px;
}

.wizard-card h3 {
    margin: 0 0 8px;
    font-size: 18px;
    color: var(--text-primary);
}

.wizard-card p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

.ai-wizard-card {
    background: linear-gradient(to bottom, var(--bg-card), rgba(176, 141, 110, 0.03));
    border-color: rgba(176, 141, 110, 0.3);
}

.ai-wizard-card:hover {
    box-shadow: 0 12px 24px rgba(176, 141, 110, 0.15);
}

.wizard-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: var(--on-primary);
    font-size: 10px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(176, 141, 110, 0.3);
}

@media (max-width: 480px) {
    .wizard-card {
        width: 100%;
    }
}

/* ==================== ADVANCED SETTINGS ACCORDION ==================== */
.advanced-settings {
    transition: all var(--transition);
}

.advanced-settings summary {
    list-style: none; /* Remove default triangle */
}

.advanced-settings summary::-webkit-details-marker {
    display: none; /* Remove Chrome native triangle */
}

/* Add custom icon rotation */
.advanced-settings[open] summary i {
    transform: rotate(90deg);
    transition: transform 0.2s ease;
}

.advanced-settings:not([open]) summary i {
    transform: rotate(0deg);
    transition: transform 0.2s ease;
}

/* Add slight hover effect to summary */
.advanced-settings summary:hover {
    background: rgba(0,0,0,0.02);
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

/* ==================== DATA TABLE FOR SUPERADMIN ==================== */
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; text-align: left; }
.data-table th { padding: 12px 16px; font-weight: 600; color: var(--text-secondary); border-bottom: 1px solid var(--border); white-space: nowrap; }
.data-table td { padding: 16px; border-bottom: 1px solid var(--border-light); color: var(--text-primary); vertical-align: middle; }
.data-table tbody tr { transition: background var(--transition); }
.data-table tbody tr:hover { background: var(--bg-main); }
.badge { display: inline-block; padding: 4px 10px; border-radius: 12px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.badge.active { background: #ECFDF5; color: var(--success); }
.badge.suspended { background: #FEF2F2; color: var(--danger); }
.badge.trial { background: #FFFBEB; color: var(--warning); }
.badge.starter { background: #F0FDF4; color: #16A34A; }
.badge.pro { background: #EFF6FF; color: var(--accent); }
.badge.enterprise { background: #FAF5FF; color: #9333EA; }
.form-input { width: 100%; padding: 10px 14px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-size: 14px; font-family: var(--font-body); color: var(--text-primary); background: var(--bg-card); transition: all var(--transition); outline: none; }
.form-input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-opacity); }
.toolbar { display: flex; gap: 12px; margin-bottom: 24px; align-items: center; }
 / *   = = = = = = = = = = = = = = = = = = = =   F A S E   8 :   U I / U X   P R E M I U M   O V E R R I D E S   = = = = = = = = = = = = = = = = = = = =   * / 
 
 / *   M o d a l s   R e f i n e d   * / 
 . m o d a l - o v e r l a y   { 
         b a c k g r o u n d :   r g b a ( 1 5 ,   2 3 ,   4 2 ,   0 . 5 )   ! i m p o r t a n t ; 
         b a c k d r o p - f i l t e r :   b l u r ( 8 p x )   ! i m p o r t a n t ; 
         - w e b k i t - b a c k d r o p - f i l t e r :   b l u r ( 8 p x )   ! i m p o r t a n t ; 
 } 
 
 . m o d a l - c o n t e n t   { 
         b o r d e r - r a d i u s :   1 6 p x   ! i m p o r t a n t ; 
         b o x - s h a d o w :   0   2 5 p x   5 0 p x   - 1 2 p x   r g b a ( 1 5 ,   2 3 ,   4 2 ,   0 . 2 5 )   ! i m p o r t a n t ; 
         b o r d e r :   1 p x   s o l i d   v a r ( - - b o r d e r )   ! i m p o r t a n t ; 
         m a x - w i d t h :   5 4 0 p x   ! i m p o r t a n t ; 
 } 
 
 . m o d a l - h e a d e r   { 
         p a d d i n g :   2 4 p x   2 8 p x   2 0 p x   ! i m p o r t a n t ; 
         b a c k g r o u n d :   v a r ( - - b g - c a r d )   ! i m p o r t a n t ; 
         b o r d e r - r a d i u s :   1 6 p x   1 6 p x   0   0   ! i m p o r t a n t ; 
 } 
 
 . m o d a l - t i t l e   { 
         f o n t - s i z e :   1 9 p x   ! i m p o r t a n t ; 
         l e t t e r - s p a c i n g :   - 0 . 4 p x   ! i m p o r t a n t ; 
 } 
 
 . m o d a l - b o d y   { 
         p a d d i n g :   2 8 p x   ! i m p o r t a n t ; 
 } 
 
 . m o d a l - f o o t e r   { 
         p a d d i n g :   2 0 p x   2 8 p x   ! i m p o r t a n t ; 
         b a c k g r o u n d :   v a r ( - - b g - m a i n )   ! i m p o r t a n t ; 
         b o r d e r - r a d i u s :   0   0   1 6 p x   1 6 p x   ! i m p o r t a n t ; 
 } 
 
 / *   F o r m s   R e f i n e d   ( G l a s s m o r p h i c )   * / 
 . f o r m - g r o u p   l a b e l   { 
         f o n t - w e i g h t :   6 0 0   ! i m p o r t a n t ; 
         c o l o r :   v a r ( - - t e x t - p r i m a r y )   ! i m p o r t a n t ; 
         l e t t e r - s p a c i n g :   0 . 2 p x   ! i m p o r t a n t ; 
 } 
 
 . f o r m - g r o u p   i n p u t [ t y p e = \  
 t e x t \ ] , 
 . f o r m - g r o u p   i n p u t [ t y p e = \ p a s s w o r d \ ] , 
 . f o r m - g r o u p   i n p u t [ t y p e = \ e m a i l \ ] , 
 . f o r m - g r o u p   i n p u t [ t y p e = \ n u m b e r \ ] , 
 . f o r m - g r o u p   i n p u t [ t y p e = \ t e l \ ] , 
 . f o r m - g r o u p   i n p u t [ t y p e = \ u r l \ ] , 
 . f o r m - g r o u p   s e l e c t , 
 . f o r m - g r o u p   t e x t a r e a   { 
         p a d d i n g :   1 2 p x   1 4 p x   ! i m p o r t a n t ; 
         b o r d e r - r a d i u s :   1 0 p x   ! i m p o r t a n t ; 
         b o x - s h a d o w :   i n s e t   0   1 p x   2 p x   r g b a ( 1 5 ,   2 3 ,   4 2 ,   0 . 0 2 )   ! i m p o r t a n t ; 
         f o n t - s i z e :   1 4 p x   ! i m p o r t a n t ; 
         c o l o r :   v a r ( - - t e x t - p r i m a r y )   ! i m p o r t a n t ; 
         b a c k g r o u n d - c o l o r :   v a r ( - - b g - c a r d )   ! i m p o r t a n t ; 
         b o r d e r :   1 p x   s o l i d   v a r ( - - b o r d e r )   ! i m p o r t a n t ; 
         t r a n s i t i o n :   a l l   0 . 2 5 s   e a s e   ! i m p o r t a n t ; 
 } 
 
 . f o r m - g r o u p   i n p u t : f o c u s , 
 . f o r m - g r o u p   s e l e c t : f o c u s , 
 . f o r m - g r o u p   t e x t a r e a : f o c u s   { 
         b o r d e r - c o l o r :   v a r ( - - a c c e n t )   ! i m p o r t a n t ; 
         b o x - s h a d o w :   0   0   0   3 p x   r g b a ( 3 7 ,   9 9 ,   2 3 5 ,   0 . 1 )   ! i m p o r t a n t ; 
         b a c k g r o u n d - c o l o r :   # f f f f f f   ! i m p o r t a n t ; 
 } 
 
 / *   S w i t c h e s   a n d   T o g g l e s   * / 
 . t o g g l e - r o w   { 
         b o r d e r - r a d i u s :   1 0 p x   ! i m p o r t a n t ; 
         p a d d i n g :   1 4 p x   1 6 p x   ! i m p o r t a n t ; 
         b a c k g r o u n d :   v a r ( - - b g - s u b t l e )   ! i m p o r t a n t ; 
         b o r d e r :   1 p x   s o l i d   v a r ( - - b o r d e r - l i g h t )   ! i m p o r t a n t ; 
         t r a n s i t i o n :   a l l   v a r ( - - t r a n s i t i o n )   ! i m p o r t a n t ; 
         m a r g i n - b o t t o m :   8 p x   ! i m p o r t a n t ; 
 } 
 . t o g g l e - r o w : h o v e r   { 
         b o r d e r - c o l o r :   v a r ( - - p r i m a r y )   ! i m p o r t a n t ; 
         b a c k g r o u n d :   v a r ( - - b g - c a r d )   ! i m p o r t a n t ; 
 } 
 
 / *   A d v a n c e d   S e t t i n g s   W r a p p e r   * / 
 d e t a i l s . a d v a n c e d - s e t t i n g s   { 
         b a c k g r o u n d :   v a r ( - - b g - s u b t l e )   ! i m p o r t a n t ; 
         b o r d e r - r a d i u s :   1 2 p x   ! i m p o r t a n t ; 
         b o r d e r :   1 p x   s o l i d   v a r ( - - b o r d e r - l i g h t )   ! i m p o r t a n t ; 
 } 
 
 d e t a i l s . a d v a n c e d - s e t t i n g s   >   s u m m a r y   { 
         f o n t - w e i g h t :   6 0 0   ! i m p o r t a n t ; 
         p a d d i n g :   1 4 p x   1 6 p x   ! i m p o r t a n t ; 
 } 
 
 d e t a i l s . a d v a n c e d - s e t t i n g s [ o p e n ]   >   s u m m a r y   { 
         b o r d e r - b o t t o m :   1 p x   s o l i d   v a r ( - - b o r d e r - l i g h t )   ! i m p o r t a n t ; 
 } 
  
 