:root {
    --primary: #10b981;
    --primary-hover: #0d9668;
    --primary-dark: #059669;
    --primary-light: #34d399;
    --pub-primary: #10b981;
    --pub-font: 'Outfit', sans-serif;
    --bg-main: #fcfdfe;
    --bg-dark: #0f172a;
    --sidebar-bg: #1e293b;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --card-bg: rgba(255, 255, 255, 0.8);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.3);
    
    /* Sombras refinadas */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.05), 0 4px 6px -2px rgba(0,0,0,0.02);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.05), 0 10px 10px -5px rgba(0,0,0,0.02);
    
    /* Estados */
    --status-active-bg: #ecfdf5;
    --status-active-text: #065f46;
    --status-inactive-bg: #f1f5f9;
    --status-inactive-text: #475569;
    --status-suspended-bg: #fef2f2;
    --status-suspended-text: #991b1b;
    --status-trial-bg: #fffbeb;
    --status-trial-text: #92400e;

    /* Temas Vista Pública */
    --pub-bg: #ffffff;
    --pub-text: #111827;
    --pub-text-muted: #6b7280;
    --pub-card-bg: #ffffff;
    --pub-card-border: #f3f4f6;
    --pub-pill-bg: #f3f4f6;
    --pub-pill-text: #4b5563;
    --pub-header-bg: #f9fafb;
    --pub-separator: #e5e7eb;
}

.dark-theme {
    --pub-bg: #11181c; /* Antracita elegante */
    --pub-text: #eceef0;
    --pub-text-muted: #889096;
    --pub-card-bg: #1a1d1e;
    --pub-card-border: #2a2e30;
    --pub-pill-bg: #2a2e30;
    --pub-pill-text: #889096;
    --pub-header-bg: #1a1d1e;
    --pub-separator: #2a2e30;
    --scrollbar-bg: #1a1d1e;
    --scrollbar-thumb: #3a3f42;
}

.warm-theme {
    --pub-bg: #faf6f1; /* Crema cálido */
    --pub-text: #3d3a36;
    --pub-text-muted: #7a756d;
    --pub-card-bg: #ffffff;
    --pub-card-border: #e8e2da;
    --pub-pill-bg: #f0ebe3;
    --pub-pill-text: #5a554d;
    --pub-header-bg: #f5f0e8;
    --pub-separator: #e8e2da;
}

/* Scrollbar oscuro para modo claro */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

/* Scrollbar oscuro para modo oscuro */
.dark-theme::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.dark-theme::-webkit-scrollbar-track {
    background: var(--scrollbar-bg, #1a1d1e);
}

.dark-theme::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb, #3a3f42);
    border-radius: 4px;
}

.dark-theme {
    scrollbar-width: thin;
    scrollbar-color: #3a3f42 #1a1d1e;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background: #f8fafc;
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

body.hide-decorative-bg,
body.hide-decorative-bg::before,
body.hide-decorative-bg::after {
    background: var(--pub-bg) !important;
    background-image: none !important;
    opacity: 1 !important;
}

body.hide-decorative-bg #app {
    display: block;
    justify-content: unset;
}

body.hide-decorative-bg .content {
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
}

body.hide-decorative-bg .public-menu-container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

/* Fondo Premium Evolucionado (Auras & Grain) */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #f8fafc;
    background-image: 
        radial-gradient(at 20% 20%, rgba(16, 185, 129, 0.15) 0px, transparent 40%),
        radial-gradient(at 80% 10%, rgba(245, 158, 11, 0.12) 0px, transparent 40%),
        radial-gradient(at 50% 50%, rgba(59, 130, 246, 0.08) 0px, transparent 50%),
        radial-gradient(at 10% 80%, rgba(16, 185, 129, 0.1) 0px, transparent 40%),
        radial-gradient(at 90% 90%, rgba(245, 158, 11, 0.08) 0px, transparent 40%);
    z-index: -2;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.03;
    z-index: -1;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

@keyframes auraFloat {
    0% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(2%, 3%) scale(1.05); }
    66% { transform: translate(-1%, 2%) scale(0.95); }
    100% { transform: translate(0, 0) scale(1); }
}

.hero {
    position: relative;
    animation: auraFloat 15s ease-in-out infinite alternate;
}

h1, h2, h3, h4 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

#app {
    display: flex;
    min-height: 100vh;
    width: 100%;
    justify-content: center;
    overflow-x: hidden;
}

/* Estructura con Sidebar Flotante */
.has-sidebar {
    display: flex;
    padding: 20px;
    gap: 20px;
    background: #f1f5f9;
    min-height: 100vh;
    overflow-x: hidden;
    width: 100%;
}

.main-container {
    flex: 1;
    overflow-x: hidden;
    min-width: 0;
}

.content {
    overflow-x: hidden;
    width: 100%;
}

.sidebar {
    width: 280px;
    background: var(--sidebar-bg);
    color: white;
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    border-radius: 24px;
    box-shadow: var(--shadow-xl);
    height: calc(100vh - 40px);
    position: sticky;
    top: 20px;
    z-index: 100;
}

.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    margin-bottom: 20px;
    background: transparent;
}

.nav-bar-container {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 12px;
    box-shadow: var(--shadow-md);
}

.nav-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.nav-row-bottom {
    justify-content: center;
    gap: 12px;
}

.nav-controls {
    display: flex;
    gap: 10px;
}

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

.nav-restaurant-name {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-main);
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-links {
    display: flex;
    gap: 20px;
    align-items: center;
}

.mobile-menu-btn-nav {
    display: none;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: color 0.2s;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary);
}

.nav-btn-primary {
    background: var(--primary) !important;
    color: white !important;
    padding: 10px 18px !important;
    border-radius: 12px !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3) !important;
}

.nav-btn-primary:hover, .nav-btn-primary.active {
    background: #059669 !important;
    color: white !important;
    transform: translateY(-1px);
}

.nav-btn-secondary {
    background: var(--card-bg) !important;
    color: var(--text-main) !important;
    border: 1px solid var(--border) !important;
    padding: 10px 18px !important;
    border-radius: 12px !important;
    font-weight: 500 !important;
}

.nav-btn-secondary:hover, .nav-btn-secondary.active {
    background: var(--primary) !important;
    color: white !important;
    border-color: var(--primary) !important;
}

.nav-link span {
    margin-left: 6px;
}

.sidebar-logo {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.logo-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
}

.logo-circle img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.btn-logout {
    background: var(--primary);
    color: white;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    text-decoration: none;
    font-weight: 700;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    flex: 1;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 14px 20px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    border-radius: 16px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
}

.menu-item:hover {
    background: rgba(255,255,255,0.05);
    color: white;
    transform: translateX(5px);
}

.menu-item.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 10px 15px -3px rgba(16, 185, 129, 0.3);
}

.menu-item i {
    width: 20px;
}

.content {
    flex: 1;
    width: 100%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#app:not(.has-sidebar) .content {
    padding: 40px;
}

#app.has-sidebar {
    justify-content: flex-start;
}

.has-sidebar .content {
    margin: 0;
}

.page-header {
    margin-bottom: 30px;
}

.config-list {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
}

.config-item {
    padding: 25px 30px;
    border-bottom: 1px solid var(--border);
    display: flex;
    gap: 25px;
    transition: background 0.2s;
    cursor: pointer;
}

.config-item:hover {
    background: #fafafa;
}

.config-item-icon {
    width: 45px;
    height: 45px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--sidebar-active);
}

.form-card {
    background: white;
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.modal-scroll {
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.9rem;
}

input[type="text"], input[type="email"], input[type="password"], textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    outline: none;
}

.btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    text-decoration: none;
}

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

.btn-primary:hover {
    background: var(--primary-hover);
}

.glass {
    background: rgba(255,255,255,0.8);
    border: 1px solid var(--border);
}

.phone-mockup {
    width: 375px;
    height: 700px;
    background: var(--pub-bg);
    border: 12px solid #111;
    border-radius: 40px;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
    color: var(--pub-text);
    font-family: var(--pub-font);
}

.phone-header {
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.phone-logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: white;
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: var(--shadow);
    padding: 5px;
}

.phone-content {
    padding: 60px 20px 20px;
    text-align: center;
}

.flag-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.flag-btn {
    padding: 8px 15px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.flag-btn.active {
    border-color: var(--primary);
    background: #ecfdf5;
}

.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 10px;
}

.tab-btn {
    padding: 8px 16px;
    border: none;
    background: none;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-muted);
    border-radius: 8px;
}

.tab-btn.active {
    background: #f1f5f9;
    color: var(--primary);
}

.allergen-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
}

.allergen-card {
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
}

.icon-label {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 14px;
}

.category-pills {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    padding: 15px 0;
    scrollbar-width: none;
}

.pill {
    padding: 12px 24px;
    border-radius: 50px;
    border: 1px solid var(--pub-separator);
    background: var(--pub-card-bg);
    color: var(--pub-text);
    white-space: nowrap;
    font-size: 0.9rem;
    font-weight: 800;
    font-family: var(--pub-font);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.pill.active {
    background: var(--pub-text);
    color: var(--pub-bg);
    border-color: var(--pub-text);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateY(-1px);
}

.pill:not(.active):hover {
    background: var(--pub-pill-bg);
    border-color: var(--pub-text);
}

.category-tabs-container::-webkit-scrollbar {
    display: none;
}

.dish-list-item {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid var(--pub-separator);
}

.dish-info { flex: 1; }
.dish-img-thumb {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    object-fit: cover;
}

.dish-title { font-size: 1.1rem; margin-bottom: 4px; }
.dish-desc { font-size: 0.8rem; color: #666; margin-bottom: 8px; }

.lang-dropdown {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    padding: 10px;
    width: 200px;
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
}

.floating-lang-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--pub-card-bg);
    color: var(--pub-text);
    padding: 8px 15px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--pub-card-border);
    cursor: pointer;
    z-index: 150;
    font-weight: 700;
    font-size: 0.9rem;
}

.floating-lang-dropdown {
    position: absolute;
    top: 65px;
    right: 20px;
    background: var(--pub-card-bg);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    width: 140px;
    z-index: 160;
    overflow: hidden;
    border: 1px solid var(--pub-card-border);
}

.floating-lang-option {
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 0.9rem;
    color: var(--pub-text);
}

.floating-lang-option:hover {
    background: #f8fafc;
}

.floating-lang-option:not(:last-child) {
    border-bottom: 1px solid #f1f5f9;
}

.profile-btn {
    width: 100%;
    padding: 18px 25px;
    background: var(--pub-card-bg);
    border: 1px solid var(--pub-card-border);
    border-radius: 12px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 800;
    font-size: 1rem;
    color: var(--pub-text);
    cursor: pointer;
    transition: all 0.2s;
}

.profile-btn:hover {
    background: var(--pub-pill-bg);
}

.action-btns {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    margin-top: 30px;
}

.action-btn {
    padding: 12px;
    border: 1px solid var(--pub-text);
    border-radius: 10px;
    background: var(--pub-bg);
    color: var(--pub-text);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}

.social-icons-footer {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    padding-bottom: 20px;
}

.social-icons-footer i {
    width: 20px;
    height: 20px;
    cursor: pointer;
    color: var(--pub-text);
}

.info-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    color: var(--pub-text-muted);
    font-size: 0.95rem;
    margin-top: 15px;
}

.hero {
    min-height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: var(--main-bg);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

.search-container {
    padding: 10px 20px;
}

.search-input {
    width: 100%;
    padding: 12px 15px;
    border-radius: 12px;
    border: 1px solid var(--pub-separator);
    background: var(--pub-card-bg);
    color: var(--pub-text);
    font-size: 0.9rem;
    outline: none;
    transition: all 0.2s;
}

.search-input:focus {
    border-color: var(--primary);
}

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

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

.loader-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.loader {
    width: 50px;
    height: 50px;
    border: 4px solid #e2e8f0;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

@media print {
    body * { visibility: hidden; }
    .print-only, .print-only * { visibility: visible; }
    .print-only {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        background: white !important;
        color: black !important;
        font-family: 'Outfit', sans-serif;
        padding: 20px !important;
    }
    .print-dish-item {
        page-break-inside: avoid;
        border-bottom: 1px solid #ccc;
        padding-bottom: 15px;
        margin-bottom: 15px;
        display: flex;
        gap: 15px;
    }
    .print-dish-img {
        width: 80px;
        height: 80px;
        object-fit: cover;
        border-radius: 8px;
        flex-shrink: 0;
    }
    .print-dish-title {
        font-weight: 700;
        font-size: 1.2rem;
        margin: 0;
        display: flex;
        justify-content: space-between;
    }
    .print-dish-desc {
        font-size: 0.9rem;
        color: #444;
        margin-top: 5px;
    }
    .print-category-title {
        font-size: 1.8rem;
        font-weight: 800;
        margin-top: 30px;
        margin-bottom: 15px;
        border-bottom: 2px solid black;
        padding-bottom: 5px;
        page-break-after: avoid;
    }
    .print-only .form-card,
    .print-only .page-header,
    .print-only .sidebar,
    .print-only .top-nav {
        display: none !important;
    }
}

/* Sidebar Mobile Styles */
.mobile-menu-btn {
    display: none;
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1001;
    width: 44px;
    height: 44px;
    background: var(--sidebar-bg);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s;
}

.mobile-menu-btn:hover {
    transform: scale(1.05);
    background: var(--primary);
}

.mobile-menu-btn i {
    width: 24px;
    height: 24px;
}

.mobile-close-btn {
    display: none;
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 10px;
    color: white;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.mobile-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

@media screen and (max-width: 1024px) {
    .mobile-close-btn {
        display: flex;
    }
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    backdrop-filter: blur(4px);
}

.sidebar-overlay.active {
    display: block;
}

@media screen and (max-width: 1024px) {
    .sidebar {
        width: 280px;
        height: 100vh;
        position: fixed;
        top: 0;
        left: 0;
        right: auto;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 999;
        padding: 80px 20px 30px;
        background: var(--sidebar-bg);
        border-radius: 0;
        overflow-y: auto;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .sidebar-logo {
        display: none;
    }

    .mobile-menu-btn {
        display: none !important;
    }

    .has-sidebar {
        padding: 0;
    }

    .content {
        padding: 10px 15px 20px !important;
    }

    .page-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 15px;
    }

    .page-header > div:first-child {
        width: 100%;
    }

    .page-header > div:last-child,
    .page-header > div:only-child {
        width: 100%;
        flex-wrap: wrap;
    }

    .page-header h1 {
        font-size: 1.6rem !important;
        line-height: 1.3;
    }
}

@media screen and (max-width: 768px) {
    .sidebar {
        width: 85%;
        max-width: 300px;
    }

    .content {
        padding: 75px 12px 20px !important;
    }

    .page-header h1 {
        font-size: 1.4rem !important;
    }

    .page-header p {
        font-size: 0.85rem !important;
    }

    .page-header .btn {
        width: 100%;
        justify-content: center;
        padding: 12px 16px;
        font-size: 0.9rem;
    }

    .page-header > div:last-child,
    .page-header > div:only-child {
        display: flex;
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }

    .page-header > div:last-child .btn,
    .page-header > div:only-child .btn {
        width: 100%;
    }

    .page-header > div:last-child {
        flex-direction: row !important;
        flex-wrap: wrap;
    }

    .page-header > div:last-child .btn {
        flex: 1;
        min-width: 140px;
    }

    /* Dashboard Responsive */
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }

    .metric-card {
        padding: 16px !important;
    }

    .metric-value {
        font-size: 1.6rem !important;
    }

    .metric-label {
        font-size: 0.75rem !important;
    }

    /* SaaS Table Responsive */
    .saas-table-container {
        margin: 15px -12px !important;
        border-radius: 0 !important;
        border-left: none !important;
        border-right: none !important;
    }

    .saas-table {
        font-size: 0.8rem !important;
    }

    .saas-table th {
        padding: 10px 8px !important;
        font-size: 0.65rem !important;
        white-space: nowrap;
    }

    .saas-table td {
        padding: 12px 8px !important;
    }

    .saas-table .badge {
        font-size: 0.65rem !important;
        padding: 3px 6px !important;
    }

    /* Form Cards */
    .form-card {
        padding: 16px !important;
        margin: 0 -12px !important;
        border-radius: 16px !important;
    }

    /* Search & Filters Mobile */
    .saas-table-container > div:first-child {
        flex-direction: column !important;
        gap: 10px !important;
        padding: 12px !important;
    }

    .saas-table-container > div:first-child > div:first-child {
        width: 100% !important;
    }

    .saas-table-container > div:first-child > div:last-child {
        width: 100% !important;
        flex-wrap: wrap;
    }

    .saas-table-container > div:first-child .search-input {
        width: 100% !important;
    }

    /* Alerts */
    .alert-strip {
        padding: 10px 12px !important;
        font-size: 0.8rem !important;
    }

    /* Grid Layouts */
    .has-sidebar > div[style*="grid"] {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    /* Restaurant Detail Tabs */
    .saas-tabs {
        overflow-x: auto;
        gap: 15px !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 5px;
    }

    .saas-tabs::-webkit-scrollbar {
        display: none;
    }

    /* Top Nav Mobile */
    .nav-bar-container {
        padding: 10px 12px !important;
        border-radius: 16px !important;
        gap: 10px !important;
    }

    .nav-row-top {
        gap: 10px !important;
    }

    .nav-controls {
        gap: 6px !important;
    }

    .nav-controls .btn {
        padding: 8px !important;
        position: relative !important;
        z-index: 1002 !important;
        background: white !important;
    }

    .mobile-menu-btn-nav {
        display: flex !important;
    }

    .nav-restaurant-name {
        max-width: 80px !important;
        font-size: 0.75rem !important;
    }

    .nav-row-bottom {
        gap: 8px !important;
    }

    .nav-link {
        padding: 10px 14px !important;
        border-radius: 12px !important;
        font-size: 0.85rem !important;
    }

    .nav-link span {
        display: inline !important;
    }

    .nav-btn-primary, .nav-btn-secondary {
        padding: 12px 20px !important;
        font-size: 0.9rem !important;
    }

    /* Sidebar Mobile - overlay solo cuando esté activo */
    .sidebar-overlay {
        display: none !important;
    }
    .sidebar-overlay.active {
        display: block !important;
    }

    .saas-tab-btn {
        white-space: nowrap;
        padding: 10px 12px !important;
        font-size: 0.85rem !important;
    }

    /* Category Items - usando nuevas clases */
    .category-card {
        padding: 14px !important;
    }

    .category-header {
        gap: 10px !important;
        margin-bottom: 14px !important;
    }

    .category-days {
        gap: 4px !important;
    }

    .day-toggle {
        padding: 3px 4px !important;
    }

    .day-toggle span {
        font-size: 0.6rem !important;
    }

    /* Dish Grid */
    .dishes-grid {
        gap: 8px !important;
    }

    .dish-item {
        padding: 10px !important;
    }

    /* Quick Access Buttons */
    .form-card .btn {
        width: 100%;
        justify-content: space-between;
        padding: 16px 20px !important;
    }

    /* QR Page */
    .qr-grid {
        grid-template-columns: 1fr !important;
    }

    /* Sidebar Menu Items */
    .menu-item {
        padding: 14px 16px !important;
        font-size: 0.9rem !important;
    }

    .menu-item i {
        width: 20px !important;
    }

    /* Tabs Selector */
    .saas-tabs[style*="display: inline-flex"] {
        width: 100%;
        overflow-x: auto;
        display: flex !important;
        -webkit-overflow-scrolling: touch;
    }

    .saas-tabs[style*="display: inline-flex"] .saas-tab-btn {
        padding: 8px 14px !important;
        font-size: 0.8rem !important;
    }

    /* Config Items */
    .config-item {
        padding: 15px !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
    }

    /* Action Buttons */
    .action-btns {
        grid-template-columns: 1fr !important;
        gap: 8px !important;
    }

    .action-btn {
        padding: 14px 16px !important;
        font-size: 0.85rem !important;
    }

    /* Profile Buttons */
    .profile-btn {
        padding: 14px 16px !important;
        font-size: 0.9rem !important;
    }

    /* Allergen Grid */
    .allergen-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }

    .allergen-card {
        padding: 8px !important;
        font-size: 0.75rem !important;
    }

    /* Public Menu */
    .public-menu-container {
        padding: 0 !important;
        margin: 0 !important;
        font-family: var(--pub-font);
    }

    .public-menu-container .dish-list-item {
        padding: 12px 15px !important;
    }

    .floating-lang-btn {
        top: 70px !important;
        right: 12px !important;
        padding: 8px 12px !important;
        font-size: 0.8rem !important;
    }

    .floating-lang-dropdown {
        top: 115px !important;
        right: 12px !important;
        width: 130px !important;
    }

    .phone-mockup {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        min-height: 100vh !important;
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }

    /* Comparison Table */
    .comparison-table {
        display: block;
        overflow-x: auto;
    }

    .comparison-table th,
    .comparison-table td {
        padding: 12px 15px !important;
        font-size: 0.8rem !important;
    }

    /* Dashboard Mobile */
    .dashboard-header {
        gap: 12px;
    }

    .dashboard-header h1 {
        font-size: 1.5rem;
    }

    .dashboard-header .btn {
        width: 100%;
        justify-content: center;
    }

    .dashboard-visits .form-card {
        padding: 25px 20px;
    }

    .visits-number {
        font-size: 2.5rem;
    }

    .visits-label {
        font-size: 0.9rem;
    }

    .quick-action-btn {
        padding: 14px;
        gap: 10px;
    }

    .quick-action-btn i:first-child {
        width: 22px;
        height: 22px;
    }

    .quick-action-btn span {
        font-size: 0.9rem;
    }

    /* Landing */
    .landing-section {
        padding: 40px 15px !important;
    }

    .landing-card {
        padding: 25px !important;
    }

    /* Buttons */
    .btn {
        padding: 10px 16px;
        font-size: 0.85rem;
        min-height: 44px;
    }

    .btn i {
        width: 18px;
        height: 18px;
    }

    /* Tabs Pills */
    .pill {
        padding: 8px 14px !important;
        font-size: 0.8rem !important;
    }

    /* Dish List */
    .dish-list-item {
        flex-direction: column !important;
        gap: 10px !important;
    }

    .dish-img-thumb {
        width: 100% !important;
        height: 150px !important;
        margin-left: 0 !important;
    }

    .dish-title {
        font-size: 1rem !important;
    }

    .dish-desc {
        font-size: 0.8rem !important;
    }

    /* Search Input */
    .search-container {
        padding: 10px 12px !important;
    }

    .search-input {
        padding: 10px 12px !important;
        font-size: 16px !important;
    }
}

/* Menu Manager Responsive */
.menu-manager-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 15px !important;
    margin-bottom: 20px !important;
}

.dashboard-header {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.dashboard-header h1 {
    font-size: 1.8rem;
}

.dashboard-visits {
    margin-bottom: 20px;
}

.dashboard-visits .form-card {
    padding: 30px;
    text-align: center;
}

.visits-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 8px;
}

.visits-label {
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 600;
}

.dashboard-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dashboard-actions h3 {
    margin-bottom: 5px;
}

.quick-action-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.95rem;
    font-weight: 500;
    text-align: left;
    width: 100%;
    min-height: 56px;
}

.quick-action-btn:hover {
    background: #f8fafc;
    border-color: var(--primary);
    transform: translateX(4px);
}

.quick-action-btn i:first-child {
    width: 24px;
    height: 24px;
    color: var(--primary);
    flex-shrink: 0;
}

.quick-action-btn span {
    flex: 1;
    font-weight: 600;
}

.quick-action-btn i:last-child {
    width: 20px;
    height: 20px;
    color: var(--text-muted);
}

.menu-manager-actions {
    display: flex;
    gap: 10px;
    width: 100%;
    flex-wrap: wrap;
}

.menu-manager-actions .btn {
    flex: 1;
    min-width: 120px;
    justify-content: center;
}

.day-filter-tabs {
    display: flex;
    gap: 6px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.day-filter-tabs::-webkit-scrollbar {
    display: none;
}

.day-tab-btn {
    padding: 10px 16px;
    font-weight: 600;
    text-transform: capitalize;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 8px;
    font-size: 0.85rem;
    white-space: nowrap;
    transition: all 0.2s;
    min-height: 44px;
}

.day-tab-btn.active {
    background: var(--primary);
    color: white;
}

.day-tab-btn:not(.active):hover {
    background: #f1f5f9;
}

.categories-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.category-card {
    padding: 16px !important;
    margin: 0 !important;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.category-header {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
    width: 100%;
}

.category-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
}

.category-title-row h3 {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.category-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    width: 100%;
}

.category-days {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    padding: 8px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.day-toggle {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 4px 6px;
    border-radius: 6px;
    background: var(--bg-secondary);
    transition: all 0.2s;
}

.day-toggle input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary);
    margin: 0;
}

.day-toggle:has(input:checked) {
    background: var(--primary);
    color: white;
}

.day-toggle:has(input:checked) span {
    color: white;
}

.day-toggle input[type="checkbox"]:checked {
    background: var(--primary);
}

.btn-sm {
    padding: 8px 12px;
    font-size: 0.8rem;
    min-height: 40px;
}

.btn-sm i {
    width: 16px;
    height: 16px;
}

.btn-sm span {
    display: inline;
}

.btn-danger {
    color: #ef4444 !important;
    border-color: #fecaca !important;
}

.btn-danger:hover {
    background: #fef2f2 !important;
}

.dishes-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dish-item {
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: move;
    transition: all 0.2s;
}

.dish-item:hover {
    background: #f8fafc;
    border-color: var(--primary);
}

.dish-thumb {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    cursor: pointer;
}

.delete-dish-btn {
    width: 36px;
    height: 36px;
    padding: 0;
    display: grid;
    place-items: center;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    color: #ef4444;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s;
}

.delete-dish-btn:hover {
    background: #ef4444;
    color: white;
    border-color: #ef4444;
}

.delete-dish-btn i {
    width: 18px;
    height: 18px;
}

.dish-info {
    flex: 1;
    cursor: pointer;
    min-width: 0;
}

.dish-info h4 {
    margin: 0;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dish-info p {
    margin: 4px 0 0;
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 700;
}

/* Reorder buttons for mobile */
.category-reorder-btns {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.reorder-btn {
    width: 32px;
    height: 24px;
    padding: 0;
    display: grid;
    place-items: center;
    background: #f1f5f9;
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.2s;
}

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

/* Show/hide based on screen size */
@media (min-width: 769px) {
    .desktop-only {
        display: block;
    }
    .mobile-only {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }
    .mobile-only {
        display: flex !important;
    }
}

@media (max-width: 768px) {
    .menu-manager-actions .btn {
        min-width: 100px;
    }
    
    .menu-manager-actions .btn i {
        margin-right: 0;
    }
    
    .day-tab-btn {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
    
    .category-card {
        padding: 14px !important;
    }
    
    .dishes-grid {
        gap: 8px;
    }
    
    .dish-item {
        padding: 10px;
    }
    
    .dish-thumb {
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 480px) {
    .menu-manager-actions {
        flex-direction: column;
    }
    
    .menu-manager-actions .btn {
        width: 100%;
        justify-content: center;
    }
    
    .category-actions {
        width: 100%;
    }
    
    .category-actions .btn {
        flex: 1;
        justify-content: center;
    }
    
    .btn-sm span {
        display: none;
    }
    
    .btn-sm {
        padding: 10px;
    }
}

/* Modal Overlay - Mobile First */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: flex-end;
    z-index: 2000;
    padding: 0;
}

.dish-editor-modal {
    background: white;
    width: 100%;
    max-width: 100%;
    max-height: 95vh;
    border-radius: 20px 20px 0 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
    background: white;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
}

.btn-close {
    width: 36px;
    height: 36px;
    border: none;
    background: #f1f5f9;
    border-radius: 10px;
    cursor: pointer;
    display: grid;
    place-items: center;
}

.btn-close:hover {
    background: #e2e8f0;
}

.btn-close i {
    width: 18px;
    height: 18px;
}

.modal-tabs {
    display: flex;
    gap: 6px;
    padding: 10px 15px;
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
    flex-shrink: 0;
    background: white;
    -webkit-overflow-scrolling: touch;
}

.modal-tabs::-webkit-scrollbar {
    display: none;
}

.modal-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 10px 8px;
    border: none;
    background: #f8fafc;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    min-height: 44px;
    transition: all 0.2s;
    color: var(--text-muted);
}

.modal-tab.active {
    background: var(--primary);
    color: white;
}

.modal-tab:not(.active):hover {
    background: #e2e8f0;
}

.modal-tab i {
    width: 16px;
    height: 16px;
}

.modal-body {
    padding: 15px;
    overflow-y: auto;
    flex: 1;
    -webkit-overflow-scrolling: touch;
}

.modal-footer {
    padding: 12px 15px;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
    background: white;
}

.dish-editor-modal {
    background: white;
    width: 100%;
    max-width: 100%;
    max-height: 95vh;
    border-radius: 24px 24px 0 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.btn-full {
    width: 100%;
    justify-content: center;
    padding: 14px;
    font-size: 1rem;
}

/* Dish Editor Fields */
.dish-editor-fields {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.dish-editor-options {
    margin-top: 20px;
}

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

.section-label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.availability-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.day-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    min-height: 40px;
}

.day-toggle input:checked + span {
    color: var(--primary);
}

.day-toggle input:checked + span::after {
    content: '✓';
    margin-left: 4px;
}

.visible-section {
    margin-top: 10px;
}

.upload-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.image-upload-area {
    border: 2px dashed var(--border);
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.image-upload-area:hover {
    border-color: var(--primary);
    background: #f0fdf4;
}

.image-upload-area input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.image-upload-area span {
    display: block;
    margin-top: 10px;
    font-weight: 600;
    color: var(--text-muted);
}

.dish-image-preview {
    margin-top: 20px;
    text-align: center;
    position: relative;
    display: inline-block;
}

.dish-image-preview img {
    width: 120px;
    height: 120px;
    border-radius: 12px;
    object-fit: cover;
}

@media (min-width: 768px) {
    .dish-image-preview img {
        width: 180px;
        height: 180px;
    }
}

/* Tag Grid for Allergens and Labels */
.tag-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.tag-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 50px;
}

.tag-item:hover {
    background: #f8fafc;
}

.tag-item.active {
    border-color: var(--primary);
    background: #ecfdf5;
}

.tag-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #eee;
    display: grid;
    place-items: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.tag-name {
    font-size: 0.85rem;
    font-weight: 600;
}

/* Super Admin Dashboard Mobile */
.super-admin-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
}

.super-admin-actions {
    width: 100%;
    flex-direction: column;
}

.super-admin-actions .btn {
    width: 100%;
    justify-content: center;
}

/* Desktop styles for modal */
@media (min-width: 769px) {
    .modal-overlay {
        align-items: center;
        padding: 20px;
    }
    
    .dish-editor-modal {
        max-width: 500px;
        border-radius: 24px;
        max-height: 90vh;
    }
    
    .modal-tabs {
        overflow-x: visible;
    }
    
    .modal-tab {
        flex: none;
        padding: 10px 20px;
    }
    
    .dish-editor-fields {
        flex-direction: row;
    }
    
    .dish-editor-fields .input-group:first-child {
        flex: 3;
    }
    
    .dish-editor-fields .input-group:last-child {
        flex: 1;
    }
    
    .availability-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }
    
    .tag-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Super Admin Dashboard */
.sa-header {
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.sa-title h1 {
    font-size: 1.6rem;
}

.sa-title p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.sa-actions {
    display: flex;
    gap: 10px;
    width: 100%;
}

.btn-sm-full {
    flex: 1;
    justify-content: center;
    padding: 10px 16px;
}

.metric-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.metric-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: grid;
    place-items: center;
}

.sa-content-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sa-filters {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box i {
    position: absolute;
    left: 12px;
    color: var(--text-muted);
}

.search-box .search-input {
    padding-left: 40px;
}

.filter-select {
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: white;
    font-size: 0.9rem;
}

.desktop-table {
    display: block;
}

.mobile-list {
    display: none;
}

/* Restaurant Cards for Mobile */
.restaurants-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rest-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 15px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.rest-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.rest-card-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.rest-card-info h4 {
    margin: 0;
    font-size: 1rem;
}

.plan-badge {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--primary);
    background: #ecfdf5;
    padding: 3px 8px;
    border-radius: 6px;
}

.rest-card-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.rest-card-stats > div {
    display: flex;
    flex-direction: column;
}

.rest-card-stats span {
    font-weight: 700;
    font-size: 1rem;
}

.rest-card-stats small {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.rest-card-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.rest-card-actions .btn {
    flex: 1;
    justify-content: center;
    min-width: 100px;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 6px;
}

.btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    display: grid;
    place-items: center;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-icon:hover {
    background: #f8fafc;
    border-color: var(--primary);
}

.btn-icon i {
    width: 16px;
    height: 16px;
}

.btn-icon-danger {
    width: 40px;
    height: 40px;
    padding: 0;
    display: grid;
    place-items: center;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 10px;
    cursor: pointer;
    color: #ef4444;
    transition: all 0.2s;
    position: absolute;
    top: 10px;
    right: 10px;
}

.btn-icon-danger:hover {
    background: #ef4444;
    color: white;
}

.btn-icon-danger i {
    width: 18px;
    height: 18px;
}

/* Alerts */
.alerts-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.alert-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
}

.alert-item div {
    display: flex;
    flex-direction: column;
}

.alert-item strong {
    font-weight: 600;
}

.alert-item span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.alert-success {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    font-size: 0.9rem;
}

.alert-success i {
    width: 18px;
    height: 18px;
}

.chart-container {
    height: 180px;
}

/* Desktop */
@media (min-width: 1024px) {
    .sa-content-grid {
        flex-direction: row;
    }
    
    .sa-table-section {
        flex: 2;
    }
    
    .sa-sidebar {
        flex: 1;
        display: flex;
        flex-direction: column;
        gap: 20px;
    }
    
    .sa-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-end;
    }
    
    .sa-actions {
        width: auto;
    }
    
    .btn-sm-full {
        flex: none;
    }
    
    .sa-filters {
        flex-direction: row;
    }
    
    .search-box {
        flex: 1;
    }
    
    .filter-select {
        width: auto;
        min-width: 140px;
    }
    
    .desktop-table {
        display: block;
    }
    
    .mobile-list {
        display: none;
    }
    
    .rest-card-actions .btn {
        flex: none;
    }
}

@media (max-width: 768px) {
    .sa-header h1 {
        font-size: 1.4rem;
    }
    
    .sa-title h1 {
        font-size: 1.4rem;
    }
    
    .sa-title p {
        font-size: 0.85rem;
    }
    
    .sa-actions {
        flex-direction: column;
    }
    
    .btn-sm-full {
        padding: 12px;
    }
    
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .metric-card {
        padding: 14px !important;
    }
    
    .metric-value {
        font-size: 1.5rem !important;
    }
    
    .metric-label {
        font-size: 0.7rem !important;
    }
    
    .desktop-table {
        display: none;
    }
    
    .mobile-list {
        display: flex;
    }
    
    .sa-sidebar .form-card {
        margin-bottom: 0;
    }
    
    .chart-container {
        height: 150px;
    }
}

@media (max-width: 480px) {
    .metrics-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 10px !important;
    }
    
    .metric-card {
        padding: 12px !important;
    }
    
    .metric-icon {
        display: none;
    }
    
    .rest-card-stats {
        gap: 15px;
    }
    
    .rest-card-actions {
        flex-direction: column;
    }
    
    .rest-card-actions .btn {
        width: 100%;
    }
}

/* Stats Row - Super Admin */
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.stat-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    border: 1px solid var(--border);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.stat-icon i {
    width: 24px;
    height: 24px;
}

.stat-green .stat-icon {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.stat-blue .stat-icon {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.stat-red .stat-icon {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.stat-info {
    flex: 1;
    min-width: 0;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1;
}

.stat-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-top: 4px;
}

.stat-sub {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-top: 4px;
}

.stat-up {
    color: #10b981;
}

@media (max-width: 1024px) {
    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .stats-row {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    
    .stat-card {
        padding: 15px;
        gap: 12px;
    }
    
    .stat-icon {
        width: 40px;
        height: 40px;
    }
    
    .stat-icon i {
        width: 20px;
        height: 20px;
    }
    
    .stat-value {
        font-size: 1.4rem;
    }
    
    .stat-label {
        font-size: 0.75rem;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .btn,
    .menu-item,
    .config-item,
    .pill,
    .profile-btn,
    .action-btn,
    .tab-btn,
    .allergen-card,
    .lang-option,
    .floating-lang-option,
    .saas-tab-btn,
    .mobile-menu-btn,
    .modal-tab,
    .day-tab-btn,
    .tag-item,
    .rest-card,
    .quick-action-btn {
        min-height: 44px;
    }

    .tab-btn,
    .pill,
    .saas-tab-btn,
    .modal-tab {
        padding: 10px 14px;
    }

    body {
        -webkit-tap-highlight-color: transparent;
    }
}

/* Force no horizontal scroll on mobile */
@media (max-width: 768px) {
    * {
        max-width: 100vw !important;
    }
    
    html, body {
        overflow-x: hidden !important;
    }
    
    #app {
        overflow-x: hidden !important;
    }
    
    .has-sidebar {
        overflow-x: hidden !important;
    }
    
    .main-container {
        overflow-x: hidden !important;
    }
    
    .content {
        overflow-x: hidden !important;
    }
    
    .page-header {
        overflow-x: hidden !important;
        max-width: 100% !important;
    }
    
    .categories-grid,
    .category-card,
    .category-header,
    .category-actions,
    .dishes-grid,
    .dish-item,
    .dish-info,
    .sa-content-grid,
    .sa-table-section,
    .sa-filters,
    .restaurants-list,
    .sa-sidebar {
        max-width: 100% !important;
        overflow-x: hidden !important;
    }
    
    /* Force buttons to stay within bounds */
    .btn {
        max-width: 100% !important;
        white-space: normal !important;
    }
    
    /* Force inputs to stay within bounds */
    input, select, textarea {
        max-width: 100% !important;
    }
}

/* Print Template Selection */
.print-template-card:hover {
    border-color: var(--primary) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}


