@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap'); 

:root {     
    --primary: #e31a22;          /* Rojo Rappi / Food Service */     
    --primary-hover: #c41219;     
    --primary-light: #fff0f1;     
    --accent-yellow: #ffc700;    /* Amarillo Destacado */     
    --accent-yellow-hover: #e0b000;     
    --secondary: #111827;     
    --secondary-hover: #1f2937;     
    --accent: #10b981;     
    --warning: #f59e0b;     
    --bg-main: #f9fafb;     
    --card-bg: #ffffff;     
    --text-dark: #111827;     
    --text-muted: #6b7280;     
    --border-color: #e5e7eb;     
    --radius-sm: 8px;     
    --radius-md: 14px;     
    --radius-lg: 20px;     
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);     
    --shadow-md: 0 10px 25px -5px rgba(227, 26, 34, 0.1);     
    --shadow-glow: 0 8px 20px rgba(227, 26, 34, 0.25); 
}

*, *::before, *::after {     
    margin: 0;     
    padding: 0;     
    box-sizing: border-box;     
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif; 
}

body {     
    background-color: var(--bg-main);     
    color: var(--text-dark);     
    line-height: 1.6;     
    -webkit-font-smoothing: antialiased; 
}

/* Header Superior y Navegacion */ 
.header-main, .navbar {     
    background: rgba(255, 255, 255, 0.98);     
    backdrop-filter: blur(12px);     
    border-bottom: 2px solid var(--accent-yellow);     
    padding: 1rem 2rem;     
    position: sticky;     
    top: 0;     
    z-index: 1000;     
    display: flex;     
    justify-content: space-between;     
    align-items: center; 
}

.navbar-container {     
    width: 100%;     
    max-width: 1200px;     
    margin: 0 auto;     
    display: flex;     
    justify-content: space-between;     
    align-items: center; 
}

.logo, .navbar-brand {     
    font-size: 1.4rem;     
    font-weight: 800;     
    color: var(--text-dark);     
    text-decoration: none;     
    display: flex;     
    align-items: center;     
    gap: 0.6rem; 
}

.logo-icon {     
    background: var(--primary);     
    color: #ffffff;     
    width: 38px;     
    height: 38px;     
    border-radius: var(--radius-sm);     
    display: flex;     
    align-items: center;     
    justify-content: center;     
    font-size: 1.1rem;     
    box-shadow: 0 4px 10px rgba(227, 26, 34, 0.3); 
}

.logo-text .highlight {     
    color: var(--primary); 
}

.user-status {     
    display: flex;     
    align-items: center;     
    gap: 0.5rem;     
    font-size: 0.85rem;     
    font-weight: 600;     
    color: var(--text-muted);     
    background: var(--bg-main);     
    padding: 0.4rem 0.8rem;     
    border-radius: 20px;     
    border: 1px solid var(--border-color); 
}

.status-dot {     
    width: 8px;     
    height: 8px;     
    background-color: var(--accent);     
    border-radius: 50%;     
    display: inline-block; 
}

.nav-links {     
    list-style: none;     
    display: flex;     
    gap: 1rem;     
    align-items: center; 
}

/* Hero / Banner Principal */ 
.hero-brand {     
    max-width: 1200px;     
    margin: 2rem auto;     
    padding: 2.5rem;     
    background: linear-gradient(135deg, #ffffff 0%, #fff0f1 100%);     
    border-radius: var(--radius-lg);     
    border: 1px solid var(--border-color);     
    box-shadow: var(--shadow-md);     
    display: grid;     
    grid-template-columns: 1.2fr 0.8fr;     
    gap: 2rem;     
    align-items: center; 
}

.badge-tag {     
    display: inline-flex;     
    align-items: center;     
    gap: 0.4rem;     
    background: var(--accent-yellow);     
    color: #000000;     
    padding: 0.4rem 0.9rem;     
    border-radius: 20px;     
    font-size: 0.85rem;     
    font-weight: 700;     
    margin-bottom: 1rem; 
}

.hero-content h1 {     
    font-size: 2.3rem;     
    font-weight: 800;     
    line-height: 1.25;     
    margin-bottom: 1rem; 
}

.brand-accent {     
    color: var(--primary); 
}

.hero-content p {     
    color: var(--text-muted);     
    font-size: 1.05rem;     
    margin-bottom: 1.8rem; 
}

.hero-buttons {     
    display: flex;     
    gap: 1rem; 
}

.hero-stats-grid {     
    display: flex;     
    flex-direction: column;     
    gap: 1.2rem; 
}

.stat-card {     
    background: #ffffff;     
    padding: 1.2rem 1.5rem;     
    border-radius: var(--radius-md);     
    border: 1px solid var(--border-color);     
    display: flex;     
    align-items: center;     
    gap: 1.2rem;     
    box-shadow: var(--shadow-sm); 
}

.stat-icon-wrapper {     
    width: 50px;     
    height: 50px;     
    background: var(--primary-light);     
    color: var(--primary);     
    border-radius: 50%;     
    display: flex;     
    align-items: center;     
    justify-content: center;     
    font-size: 1.3rem; 
}

.stat-info h3 {     
    font-size: 1.6rem;     
    font-weight: 800;     
    color: var(--text-dark);     
    line-height: 1; 
}

.stat-info p {     
    font-size: 0.85rem;     
    color: var(--text-muted);     
    margin-top: 0.2rem; 
}

/* Layout General y Menu Lateral */ 
.app-layout {     
    max-width: 1200px;     
    margin: 2rem auto;     
    padding: 0 1.5rem;     
    display: grid;     
    grid-template-columns: 260px 1fr;     
    gap: 2rem; 
}

.sidebar {     
    background: var(--card-bg);     
    border: 1px solid var(--border-color);     
    border-radius: var(--radius-md);     
    padding: 1.2rem;     
    height: fit-content; 
}

.sidebar-nav {     
    display: flex;     
    flex-direction: column;     
    gap: 0.4rem; 
}

.nav-item {     
    display: flex;     
    align-items: center;     
    gap: 0.8rem;     
    padding: 0.8rem 1rem;     
    color: var(--text-muted);     
    text-decoration: none;     
    font-weight: 600;     
    border-radius: var(--radius-sm);     
    transition: all 0.2s ease; 
}

.nav-item:hover, .nav-item.active {     
    background: var(--primary-light);     
    color: var(--primary); 
}

/* Tarjetas e Interacciones */ 
.content-header h2 {     
    font-size: 1.6rem;     
    font-weight: 700; 
}

.content-header p {     
    color: var(--text-muted);     
    margin-bottom: 1.5rem; 
}

.cards-grid, .grid-cards {     
    display: grid;     
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));     
    gap: 1.5rem; 
}

.card, .card-interactive {     
    background: var(--card-bg);     
    border: 1px solid var(--border-color);     
    border-radius: var(--radius-md);     
    padding: 1.5rem;     
    position: relative;     
    box-shadow: var(--shadow-sm);     
    transition: transform 0.25s ease, box-shadow 0.25s ease; 
}

.card-interactive:hover, .card:hover {     
    transform: translateY(-4px);     
    box-shadow: var(--shadow-md); 
}

.card-badge {     
    position: absolute;     
    top: 1.2rem;     
    right: 1.2rem;     
    background: var(--accent-yellow);     
    color: #000000;     
    font-size: 0.75rem;     
    font-weight: 700;     
    padding: 0.2rem 0.6rem;     
    border-radius: 12px; 
}

.card-icon {     
    font-size: 1.8rem;     
    color: var(--primary);     
    margin-bottom: 1rem; 
}

.card-interactive h3, .card-title {     
    font-size: 1.2rem;     
    font-weight: 700;     
    margin-bottom: 0.5rem; 
}

.card-interactive p {     
    color: var(--text-muted);     
    font-size: 0.9rem;     
    margin-bottom: 1.2rem; 
}

.card-link {     
    color: var(--primary);     
    text-decoration: none;     
    font-weight: 700;     
    font-size: 0.9rem;     
    display: inline-flex;     
    align-items: center;     
    gap: 0.4rem;     
    transition: gap 0.2s ease; 
}

.card-link:hover {     
    gap: 0.7rem; 
}

/* Botones Base */ 
.btn {     
    display: inline-flex;     
    align-items: center;     
    justify-content: center;     
    padding: 0.75rem 1.4rem;     
    border-radius: var(--radius-sm);     
    border: none;     
    font-weight: 700;     
    font-size: 0.95rem;     
    cursor: pointer;     
    text-decoration: none;     
    transition: all 0.25s ease;     
    gap: 0.5rem; 
}

.btn-primary {     
    background: var(--primary);     
    color: #ffffff;     
    box-shadow: var(--shadow-glow); 
}

.btn-primary:hover {     
    background: var(--primary-hover);     
    transform: translateY(-2px); 
}

.btn-secondary {     
    background-color: var(--accent-yellow);     
    color: #000000; 
}

.btn-secondary:hover {     
    background-color: var(--accent-yellow-hover);     
    transform: translateY(-2px); 
}

.btn-outline {     
    background-color: transparent;     
    border: 1.5px solid var(--border-color);     
    color: var(--text-dark); 
}

.btn-outline:hover {     
    background-color: var(--primary-light);     
    border-color: var(--primary);     
    color: var(--primary); 
}

/* Formularios y Vistas Internas */ 
.container {     
    max-width: 1200px;     
    margin: 2.5rem auto;     
    padding: 0 1.5rem; 
}

.auth-container {     
    max-width: 480px;     
    margin: 3rem auto;     
    padding: 0 1.5rem; 
}

.form-group {     
    margin-bottom: 1.2rem; 
}

.form-group label {     
    display: block;     
    margin-bottom: 0.4rem;     
    font-weight: 600;     
    font-size: 0.9rem; 
}

.form-control {     
    width: 100%;     
    padding: 0.8rem 1rem;     
    border: 1.5px solid var(--border-color);     
    border-radius: var(--radius-sm);     
    font-size: 0.95rem;     
    background-color: #fafafa; 
}

.form-control:focus {     
    outline: none;     
    border-color: var(--primary);     
    background-color: #ffffff; 
}

.badge {     
    display: inline-block;     
    padding: 0.35rem 0.8rem;     
    border-radius: 30px;     
    font-size: 0.78rem;     
    font-weight: 700;     
    text-transform: uppercase; 
}

.badge-libre { background: #d1fae5; color: #065f46; } 
.badge-ocupada { background: #ffe4e6; color: #9f1239; } 
.badge-reservada { background: #fef3c7; color: #92400e; } 

.alert {     
    padding: 1rem 1.2rem;     
    border-radius: var(--radius-sm);     
    margin-bottom: 1.5rem;     
    font-weight: 600; 
}

.alert-danger { background: #ffe4e6; color: #9f1239; border: 1px solid #fecdd3; } 
.alert-success { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; } 

/* Adaptabilidad Movil */ 
@media (max-width: 768px) {     
    .hero-brand {         
        grid-template-columns: 1fr;         
        padding: 1.5rem;     
    }     
    .app-layout {         
        grid-template-columns: 1fr;     
    } 
}

/* Correcci n vital para blindar y forzar la tipograf a de los iconos FontAwesome en m viles y PC */ 
i.fas, i.far, i.fab, i.fa-solid, i.fa-regular, i.fa-brands, [class^="fa-"], [class*=" fa-"] {     
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands", "Font Awesome 5 Free", sans-serif !important;     
    font-weight: 900 !important; 
}

/* Ajustes transversales para pantallas pequeñas y táctiles. */
html { overflow-x: hidden; overflow-x: clip; }
body { min-width: 0; overflow-x: hidden; overflow-x: clip; }
body.modal-abierto { overflow: hidden; }
.sound-toggle,
.panel-notice {
    max-width: calc(100vw - 1rem);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.panel-notice {
    overflow-wrap: anywhere;
    white-space: normal;
}
img, svg, video, canvas { max-width: 100%; height: auto; }
input, select, textarea, button { max-width: 100%; }
table { max-width: 100%; }
.navbar-brand { min-width: 0; }
.navbar-brand .logo-text { min-width: 0; overflow-wrap: anywhere; }
.card, .card-interactive, .hero-brand, .app-layout, .container { min-width: 0; }

/* Los modales se generan también por AJAX. Estas reglas evitan que sus
   controles fijos creen desplazamiento horizontal en teléfonos. */
.modal-modificar-pedido {
    overflow-x: hidden;
    overscroll-behavior: contain;
    isolation: isolate;
}

.modal-modificar-pedido > div {
    display: block;
    visibility: visible;
    opacity: 1;
    width: min(100%, 650px);
    max-width: 650px;
    max-height: calc(100dvh - 2rem) !important;
    overflow-x: hidden;
    overflow-y: auto;
}

.modal-modificar-pedido .fila-producto-edicion {
    grid-template-columns: minmax(0, 1fr) minmax(65px, 90px) 40px !important;
}

.modal-modificar-pedido .fila-producto-edicion > *,
.modal-modificar-pedido select,
.modal-modificar-pedido input,
.modal-modificar-pedido textarea,
.modal-modificar-pedido button {
    min-width: 0;
    max-width: 100%;
}

.mesero-tabs {
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: thin;
}

.mesero-tabs .tab-btn {
    flex: 0 0 auto;
    white-space: nowrap;
}

/* Los nombres de categorías y productos pueden ser largos en restaurantes
   reales. Sin min-width:0 un flex/grid hijo fuerza el ancho de toda la página
   y, en móvil, el modal termina mostrando solo su fondo oscurecido. */
.menu-category-header,
.product-option-row,
.modal-modificar-pedido .fila-agregar-producto {
    min-width: 0;
}
.menu-category-header > span:first-child,
.product-option-row > div:first-child {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.menu-category-header > span:last-child {
    flex: 0 0 auto;
}
.product-option-row > div:last-child {
    min-width: 0;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .header-main, .navbar {
        padding: .75rem 1rem;
        gap: .7rem;
        flex-wrap: wrap;
    }
    .logo, .navbar-brand { font-size: 1.05rem; gap: .45rem; }
    .logo-icon { width: 34px; height: 34px; flex: 0 0 34px; }
    .nav-links { width: 100%; justify-content: flex-end; gap: .5rem; flex-wrap: wrap; }
    .nav-links .btn { padding: .55rem .8rem; font-size: .82rem; }
    .container { width: 100%; margin: 1.25rem auto; padding: 0 .85rem; }
    .app-layout { margin: 1.25rem auto; padding: 0 .85rem; gap: 1rem; }
    .hero-brand { margin: 1rem .85rem; padding: 1.25rem; gap: 1rem; }
    .hero-content h1 { font-size: clamp(1.55rem, 7vw, 2rem); }
    .hero-buttons { flex-direction: column; }
    .hero-buttons .btn { width: 100%; }
    .cards-grid, .grid-cards { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
    .card, .card-interactive { padding: 1rem; }
    .content-header h2 { font-size: 1.3rem; }
    .btn { min-height: 42px; padding: .65rem .9rem; }
}

@media (max-width: 480px) {
    .header-main, .navbar { align-items: flex-start; }
    .navbar-brand { width: 100%; }
    .nav-links { justify-content: space-between; }
    .nav-links li { min-width: 0; }
    .nav-links li > span { display: block; max-width: 58vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    h1 { font-size: 1.65rem; line-height: 1.2; }
    h2 { font-size: 1.35rem; line-height: 1.25; }
    .form-control { font-size: 16px; }
    .stat-card { padding: .85rem; gap: .75rem; }
    .stat-info h3 { font-size: 1.2rem; overflow-wrap: anywhere; }

    .navbar-brand { font-size: .92rem; line-height: 1.2; gap: .35rem; }
    .navbar-brand .logo-icon { width: 32px; height: 32px; flex-basis: 32px; font-size: .95rem; }
    .nav-links { gap: .35rem; }
    .nav-links > li:first-child { font-size: .78rem; max-width: 30vw; }
    .nav-links .btn { padding: .5rem .65rem; font-size: .78rem; }
    .mesero-tabs .tab-btn { padding: .6rem .75rem; font-size: .82rem; }

    .modal-modificar-pedido {
        align-items: flex-start !important;
        padding: .5rem !important;
    }

    .modal-modificar-pedido > div {
        width: 100%;
        max-height: calc(100dvh - 1rem) !important;
        padding: .9rem !important;
        border-radius: 10px;
    }

    .modal-modificar-pedido .fila-producto-edicion {
        grid-template-columns: minmax(0, 1fr) 64px 34px !important;
        gap: .35rem !important;
    }

    .modal-modificar-pedido .fila-agregar-producto {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) 64px 42px;
        gap: .4rem !important;
    }

    .modal-modificar-pedido .fila-agregar-producto .nueva-categoria {
        grid-column: 1 / -1;
        width: 100% !important;
    }

    .modal-modificar-pedido .fila-agregar-producto .nuevo-producto {
        grid-column: 1;
        width: 100% !important;
    }

    .modal-modificar-pedido .fila-agregar-producto .nueva-cantidad {
        grid-column: 2;
        width: 100% !important;
    }

    .modal-modificar-pedido .fila-agregar-producto > button {
        grid-column: 3;
        width: 100%;
    }

    .menu-category-header { gap: .6rem; align-items: flex-start; }
    .menu-category-header > span:last-child { padding-top: .1rem; }
    .product-option-row { align-items: flex-start; gap: .55rem; flex-wrap: wrap; }
    .product-option-row > div:first-child { flex: 1 1 100%; padding-right: 0 !important; }
    .product-option-row > div:last-child { width: 100%; justify-content: space-between; }

    .modal-modificar-pedido .fila-botones-modal {
        flex-direction: column !important;
    }

    .modal-modificar-pedido .fila-botones-modal .btn {
        width: 100%;
    }
}
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap'); 

:root {     
    --primary: #e31a22;          /* Rojo Rappi / Food Service */     
    --primary-hover: #c41219;     
    --primary-light: #fff0f1;     
    --accent-yellow: #ffc700;    /* Amarillo Destacado */     
    --accent-yellow-hover: #e0b000;     
    --secondary: #111827;     
    --secondary-hover: #1f2937;     
    --accent: #10b981;     
    --warning: #f59e0b;     
    --bg-main: #f9fafb;     
    --card-bg: #ffffff;     
    --text-dark: #111827;     
    --text-muted: #6b7280;     
    --border-color: #e5e7eb;     
    --radius-sm: 8px;     
    --radius-md: 14px;     
    --radius-lg: 20px;     
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);     
    --shadow-md: 0 10px 25px -5px rgba(227, 26, 34, 0.1);     
    --shadow-glow: 0 8px 20px rgba(227, 26, 34, 0.25); 
}

*, *::before, *::after {     
    margin: 0;     
    padding: 0;     
    box-sizing: border-box;     
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif; 
}

body {     
    background-color: var(--bg-main);     
    color: var(--text-dark);     
    line-height: 1.6;     
    -webkit-font-smoothing: antialiased; 
}

/* Header Superior y Navegacion */ 
.header-main, .navbar {     
    background: rgba(255, 255, 255, 0.98);     
    backdrop-filter: blur(12px);     
    border-bottom: 2px solid var(--accent-yellow);     
    padding: 1rem 2rem;     
    position: sticky;     
    top: 0;     
    z-index: 1000;     
    display: flex;     
    justify-content: space-between;     
    align-items: center; 
}

.navbar-container {     
    width: 100%;     
    max-width: 1200px;     
    margin: 0 auto;     
    display: flex;     
    justify-content: space-between;     
    align-items: center; 
}

.logo, .navbar-brand {     
    font-size: 1.4rem;     
    font-weight: 800;     
    color: var(--text-dark);     
    text-decoration: none;     
    display: flex;     
    align-items: center;     
    gap: 0.6rem; 
}

.logo-icon {     
    background: var(--primary);     
    color: #ffffff;     
    width: 38px;     
    height: 38px;     
    border-radius: var(--radius-sm);     
    display: flex;     
    align-items: center;     
    justify-content: center;     
    font-size: 1.1rem;     
    box-shadow: 0 4px 10px rgba(227, 26, 34, 0.3); 
}

.logo-text .highlight {     
    color: var(--primary); 
}

.user-status {     
    display: flex;     
    align-items: center;     
    gap: 0.5rem;     
    font-size: 0.85rem;     
    font-weight: 600;     
    color: var(--text-muted);     
    background: var(--bg-main);     
    padding: 0.4rem 0.8rem;     
    border-radius: 20px;     
    border: 1px solid var(--border-color); 
}

.status-dot {     
    width: 8px;     
    height: 8px;     
    background-color: var(--accent);     
    border-radius: 50%;     
    display: inline-block; 
}

.nav-links {     
    list-style: none;     
    display: flex;     
    gap: 1rem;     
    align-items: center; 
}

/* Hero / Banner Principal */ 
.hero-brand {     
    max-width: 1200px;     
    margin: 2rem auto;     
    padding: 2.5rem;     
    background: linear-gradient(135deg, #ffffff 0%, #fff0f1 100%);     
    border-radius: var(--radius-lg);     
    border: 1px solid var(--border-color);     
    box-shadow: var(--shadow-md);     
    display: grid;     
    grid-template-columns: 1.2fr 0.8fr;     
    gap: 2rem;     
    align-items: center; 
}

.badge-tag {     
    display: inline-flex;     
    align-items: center;     
    gap: 0.4rem;     
    background: var(--accent-yellow);     
    color: #000000;     
    padding: 0.4rem 0.9rem;     
    border-radius: 20px;     
    font-size: 0.85rem;     
    font-weight: 700;     
    margin-bottom: 1rem; 
}

.hero-content h1 {     
    font-size: 2.3rem;     
    font-weight: 800;     
    line-height: 1.25;     
    margin-bottom: 1rem; 
}

.brand-accent {     
    color: var(--primary); 
}

.hero-content p {     
    color: var(--text-muted);     
    font-size: 1.05rem;     
    margin-bottom: 1.8rem; 
}

.hero-buttons {     
    display: flex;     
    gap: 1rem; 
}

.hero-stats-grid {     
    display: flex;     
    flex-direction: column;     
    gap: 1.2rem; 
}

.stat-card {     
    background: #ffffff;     
    padding: 1.2rem 1.5rem;     
    border-radius: var(--radius-md);     
    border: 1px solid var(--border-color);     
    display: flex;     
    align-items: center;     
    gap: 1.2rem;     
    box-shadow: var(--shadow-sm); 
}

.stat-icon-wrapper {     
    width: 50px;     
    height: 50px;     
    background: var(--primary-light);     
    color: var(--primary);     
    border-radius: 50%;     
    display: flex;     
    align-items: center;     
    justify-content: center;     
    font-size: 1.3rem; 
}

.stat-info h3 {     
    font-size: 1.6rem;     
    font-weight: 800;     
    color: var(--text-dark);     
    line-height: 1; 
}

.stat-info p {     
    font-size: 0.85rem;     
    color: var(--text-muted);     
    margin-top: 0.2rem; 
}

/* Layout General y Menu Lateral */ 
.app-layout {     
    max-width: 1200px;     
    margin: 2rem auto;     
    padding: 0 1.5rem;     
    display: grid;     
    grid-template-columns: 260px 1fr;     
    gap: 2rem; 
}

.sidebar {     
    background: var(--card-bg);     
    border: 1px solid var(--border-color);     
    border-radius: var(--radius-md);     
    padding: 1.2rem;     
    height: fit-content; 
}

.sidebar-nav {     
    display: flex;     
    flex-direction: column;     
    gap: 0.4rem; 
}

.nav-item {     
    display: flex;     
    align-items: center;     
    gap: 0.8rem;     
    padding: 0.8rem 1rem;     
    color: var(--text-muted);     
    text-decoration: none;     
    font-weight: 600;     
    border-radius: var(--radius-sm);     
    transition: all 0.2s ease; 
}

.nav-item:hover, .nav-item.active {     
    background: var(--primary-light);     
    color: var(--primary); 
}

/* Tarjetas e Interacciones */ 
.content-header h2 {     
    font-size: 1.6rem;     
    font-weight: 700; 
}

.content-header p {     
    color: var(--text-muted);     
    margin-bottom: 1.5rem; 
}

.cards-grid, .grid-cards {     
    display: grid;     
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));     
    gap: 1.5rem; 
}

.card, .card-interactive {     
    background: var(--card-bg);     
    border: 1px solid var(--border-color);     
    border-radius: var(--radius-md);     
    padding: 1.5rem;     
    position: relative;     
    box-shadow: var(--shadow-sm);     
    transition: transform 0.25s ease, box-shadow 0.25s ease; 
}

.card-interactive:hover, .card:hover {     
    transform: translateY(-4px);     
    box-shadow: var(--shadow-md); 
}

.card-badge {     
    position: absolute;     
    top: 1.2rem;     
    right: 1.2rem;     
    background: var(--accent-yellow);     
    color: #000000;     
    font-size: 0.75rem;     
    font-weight: 700;     
    padding: 0.2rem 0.6rem;     
    border-radius: 12px; 
}

.card-icon {     
    font-size: 1.8rem;     
    color: var(--primary);     
    margin-bottom: 1rem; 
}

.card-interactive h3, .card-title {     
    font-size: 1.2rem;     
    font-weight: 700;     
    margin-bottom: 0.5rem; 
}

.card-interactive p {     
    color: var(--text-muted);     
    font-size: 0.9rem;     
    margin-bottom: 1.2rem; 
}

.card-link {     
    color: var(--primary);     
    text-decoration: none;     
    font-weight: 700;     
    font-size: 0.9rem;     
    display: inline-flex;     
    align-items: center;     
    gap: 0.4rem;     
    transition: gap 0.2s ease; 
}

.card-link:hover {     
    gap: 0.7rem; 
}

/* Botones Base */ 
.btn {     
    display: inline-flex;     
    align-items: center;     
    justify-content: center;     
    padding: 0.75rem 1.4rem;     
    border-radius: var(--radius-sm);     
    border: none;     
    font-weight: 700;     
    font-size: 0.95rem;     
    cursor: pointer;     
    text-decoration: none;     
    transition: all 0.25s ease;     
    gap: 0.5rem; 
}

.btn-primary {     
    background: var(--primary);     
    color: #ffffff;     
    box-shadow: var(--shadow-glow); 
}

.btn-primary:hover {     
    background: var(--primary-hover);     
    transform: translateY(-2px); 
}

.btn-secondary {     
    background-color: var(--accent-yellow);     
    color: #000000; 
}

.btn-secondary:hover {     
    background-color: var(--accent-yellow-hover);     
    transform: translateY(-2px); 
}

.btn-outline {     
    background-color: transparent;     
    border: 1.5px solid var(--border-color);     
    color: var(--text-dark); 
}

.btn-outline:hover {     
    background-color: var(--primary-light);     
    border-color: var(--primary);     
    color: var(--primary); 
}

/* Formularios y Vistas Internas */ 
.container {     
    max-width: 1200px;     
    margin: 2.5rem auto;     
    padding: 0 1.5rem; 
}

.auth-container {     
    max-width: 480px;     
    margin: 3rem auto;     
    padding: 0 1.5rem; 
}

.form-group {     
    margin-bottom: 1.2rem; 
}

.form-group label {     
    display: block;     
    margin-bottom: 0.4rem;     
    font-weight: 600;     
    font-size: 0.9rem; 
}

.form-control {     
    width: 100%;     
    padding: 0.8rem 1rem;     
    border: 1.5px solid var(--border-color);     
    border-radius: var(--radius-sm);     
    font-size: 0.95rem;     
    background-color: #fafafa; 
}

.form-control:focus {     
    outline: none;     
    border-color: var(--primary);     
    background-color: #ffffff; 
}

.badge {     
    display: inline-block;     
    padding: 0.35rem 0.8rem;     
    border-radius: 30px;     
    font-size: 0.78rem;     
    font-weight: 700;     
    text-transform: uppercase; 
}

.badge-libre { background: #d1fae5; color: #065f46; } 
.badge-ocupada { background: #ffe4e6; color: #9f1239; } 
.badge-reservada { background: #fef3c7; color: #92400e; } 

.alert {     
    padding: 1rem 1.2rem;     
    border-radius: var(--radius-sm);     
    margin-bottom: 1.5rem;     
    font-weight: 600; 
}

.alert-danger { background: #ffe4e6; color: #9f1239; border: 1px solid #fecdd3; } 
.alert-success { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; } 

/* Adaptabilidad Movil */ 
@media (max-width: 768px) {     
    .hero-brand {         
        grid-template-columns: 1fr;         
        padding: 1.5rem;     
    }     
    .app-layout {         
        grid-template-columns: 1fr;     
    } 
}

/* Correcci n vital para blindar y forzar la tipograf a de los iconos FontAwesome en m viles y PC */ 
i.fas, i.far, i.fab, i.fa-solid, i.fa-regular, i.fa-brands, [class^="fa-"], [class*=" fa-"] {     
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands", "Font Awesome 5 Free", sans-serif !important;     
    font-weight: 900 !important; 
}
    /* =========================================================
   ACCESO A LOS MÓDULOS
   ========================================================= */

.module-cards {
    align-items: stretch;
}


/* Tarjetas de Restaurante, Mesero y Domiciliario */

.module-card {
    display: flex;
    flex-direction: column;
    min-height: 330px;
}


/* Iconos */

.module-card .card-icon {
    font-size: 2.5rem;
    margin-top: 0.5rem;
    margin-bottom: 1rem;
}


/* Títulos */

.module-card h3 {
    margin-top: 0;
    margin-bottom: 0.7rem;
}


/* Descripción */

.module-card p {
    flex: 1;
    line-height: 1.6;
}


/* Botones */

.module-button {
    width: 100%;
    justify-content: center;
    text-align: center;
    text-decoration: none;
    margin-top: 1rem;
}


/* Efecto al pasar el mouse */

.module-button:hover {
    transform: translateY(-2px);
}


/* =========================================================
   ADAPTACIÓN PARA CELULARES
   ========================================================= */

@media (max-width: 768px) {

    .module-cards {
        grid-template-columns: 1fr;
    }

    .module-card {
        min-height: auto;
    }


}

/* Acceso centrado cuando la sección no usa menú lateral. */
/* v1002: reglas fuera del bloque de iconos para evitar anidamiento */
.login-section-layout {
    display: block;
    max-width: 920px;
}

.login-section-header {
    text-align: center;
}

.login-section-cards {
    display: flex;
    justify-content: center;
}

.login-section-cards .card-interactive {
    width: min(100%, 420px);
    box-sizing: border-box;
}

/* Panel de administración: tablas de personal legibles y adaptables. */
.admin-users-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
    align-items: start;
}

.admin-role-card {
    min-width: 0;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 12px;
    padding: 1rem;
    background: #fff;
    overflow: hidden;
}

.admin-role-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin: 0 0 .75rem;
    font-size: 1.05rem;
}

.admin-role-title > span:first-child {
    min-width: 0;
    overflow-wrap: anywhere;
}

.admin-role-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.admin-role-table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;
    font-size: .92rem;
}

.admin-role-table th,
.admin-role-table td {
    padding: .7rem .6rem;
    vertical-align: top;
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.35;
    border-bottom: 1px solid #e5e7eb;
}

.admin-role-table thead th {
    background: #f8fafc;
    color: var(--text-dark);
    font-size: .78rem;
    letter-spacing: .02em;
    text-transform: uppercase;
    border-top: 1px solid #e5e7eb;
}

.admin-role-table th + th,
.admin-role-table td + td {
    border-left: 1px solid #eef0f3;
}

.admin-role-table tbody tr:last-child td {
    border-bottom: 0;
}

.admin-role-table tbody tr:hover td {
    background: #fffafa;
}

.admin-role-table th:nth-child(1),
.admin-role-table td:nth-child(1) { width: 31%; }

.admin-role-table th:nth-child(2),
.admin-role-table td:nth-child(2) { width: 48%; }

.admin-role-table th:nth-child(3),
.admin-role-table td:nth-child(3) { width: 22%; text-align: center; }

.admin-role-table th:nth-child(3) { white-space: nowrap; }

@media (max-width: 640px) {
    .admin-users-grid { grid-template-columns: 1fr; }
    .admin-role-table th,
    .admin-role-table td { font-size: .86rem; }
}

/* Endurecimiento responsive final para módulos que generan contenido dinámico. */
.kds-grid,
.cocina-pedidos-grid,
.gasto-form,
.modal-cobro-caja-contenido { min-width: 0; }

#modalAgregarProducto,
.modal-modificar-pedido,
#modal-cobro-caja { width: 100%; box-sizing: border-box; }

.kds-card,
.cocina-pedidos-grid > *,
.modal-cobro-caja-contenido { overflow-wrap: anywhere; }

@media (max-width: 640px) {
    .container,
    .app-layout,
    .card,
    .kds-grid,
    .cocina-pedidos-grid { min-width: 0; max-width: 100%; }

    .kds-grid,
    .cocina-pedidos-grid { grid-template-columns: minmax(0, 1fr) !important; }

    .kds-card { min-width: 0; overflow: hidden; }
    .kds-card .kds-header { flex-wrap: wrap; }
    .kds-card span { min-width: 0; overflow-wrap: anywhere; }

    .gasto-form { grid-template-columns: minmax(0, 1fr) !important; }
    .gasto-form label { min-width: 0 !important; width: 100%; }
    .gasto-form button { width: 100%; }

    #modal-cobro-caja {
        align-items: flex-start !important;
        overflow-y: auto;
        padding: .5rem !important;
    }
    #modal-cobro-caja .modal-cobro-caja-contenido {
        width: 100%;
        max-width: 430px;
        max-height: calc(100vh - 1rem);
        max-height: calc(100dvh - 1rem);
        overflow-y: auto;
        padding: 1rem !important;
    }
    #modal-cobro-caja .modal-cobro-caja-acciones {
        flex-direction: column;
    }
    #modal-cobro-caja .modal-cobro-caja-acciones .btn {
        width: 100%;
        flex: 1 1 auto !important;
    }

    #modalRolTemporalUsuario > form,
    #modalCambioPassword > form {
        max-height: calc(100vh - 1rem);
        max-height: calc(100dvh - 1rem);
        overflow-y: auto;
    }

    #modalAgregarProducto > div {
        max-height: calc(100vh - 1rem);
        max-height: calc(100dvh - 1rem);
        overflow-y: auto;
        padding: 1rem !important;
    }
    #modalAgregarProducto > div > div:last-child {
        flex-direction: column;
    }
    #modalAgregarProducto > div > div:last-child .btn { width: 100%; }
    .product-option-row > div:first-child { min-width: 0; overflow-wrap: anywhere; }
    .product-option-row > div:last-child { flex-wrap: wrap; justify-content: flex-end; }

    .admin-section form[style*="min-width:220px"],
    form[style*="min-width:240px"] { min-width: 0 !important; width: 100%; }
    label[style*="min-width:220px"],
    label[style*="min-width:240px"] { min-width: 0 !important; width: 100%; }
    details form[style*="width:260px"] {
        width: min(260px, calc(100vw - 2rem)) !important;
        max-width: calc(100vw - 2rem);
    }

    .stat-card,
    .module-card { min-width: 0 !important; }
    .stat-info { min-width: 0; }
    .stat-info h3,
    .stat-info p { overflow-wrap: anywhere; word-break: break-word; }
}

@media (max-width: 380px) {
    .navbar,
    .header-main { padding: .6rem .65rem; }
    .navbar-brand { font-size: clamp(.76rem, 3.6vw, .88rem); gap: .3rem; }
    .navbar-brand .logo-icon { width: 30px; height: 30px; flex-basis: 30px; font-size: .86rem; }
    .nav-links .btn { padding: .45rem .55rem; font-size: .75rem; }
    .container { padding-left: .55rem; padding-right: .55rem; }
    .card { padding: .8rem !important; }
}

/* Ajuste responsive v2: el encabezado móvil debe ocupar espacio real en el
   documento. Antes permanecía sticky y, al envolver el nombre del restaurante,
   podía cubrir el título y los controles del panel. */
body.modal-abierto .sound-toggle { display: none !important; }

@media (max-width: 640px) {
    html, body { width: 100%; min-width: 0; overflow-x: hidden; }

    .navbar,
    .header-main {
        position: relative !important;
        inset: auto !important;
        width: 100%;
        min-height: 0;
        height: auto;
        display: flex;
        flex-direction: column;
        align-items: stretch !important;
        justify-content: flex-start;
        gap: .65rem !important;
        padding: .75rem .8rem .8rem !important;
        box-sizing: border-box;
    }

    .navbar-brand {
        width: 100% !important;
        max-width: 100%;
        min-width: 0;
        flex: 0 0 auto;
        align-items: center;
        font-size: clamp(.82rem, 4vw, 1.05rem) !important;
        line-height: 1.15;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .navbar-brand .logo-icon {
        flex: 0 0 34px;
        width: 34px;
        height: 34px;
    }

    .nav-links {
        width: 100% !important;
        min-width: 0;
        margin: 0;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        flex-wrap: wrap;
        gap: .4rem !important;
    }

    .nav-links > li { min-width: 0; flex: 0 0 auto; }
    .nav-links > li:first-child { margin-right: auto; max-width: 55vw; }
    .nav-links .btn { white-space: nowrap; }

    .container {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0;
        margin-top: 1rem !important;
        padding-left: .75rem !important;
        padding-right: .75rem !important;
        box-sizing: border-box;
    }

    .sound-toggle {
        z-index: 9000 !important;
        right: .5rem !important;
        bottom: calc(env(safe-area-inset-bottom) + .5rem) !important;
        max-width: calc(100vw - 1rem);
        padding: .55rem .7rem !important;
        font-size: .75rem !important;
    }

    .modal-modificar-pedido {
        align-items: flex-start !important;
        justify-content: flex-start !important;
        padding: .5rem !important;
        overflow-y: auto !important;
        overscroll-behavior: contain;
    }

    .modal-modificar-pedido > div {
        box-sizing: border-box;
        width: 100% !important;
        min-width: 0;
        height: auto;
        min-height: 0;
        margin: 0 auto;
        max-height: calc(100vh - 1rem) !important;
        max-height: calc(100dvh - 1rem) !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
    }
}

@media (max-width: 380px) {
    .navbar,
    .header-main { padding: .6rem .65rem .7rem !important; }
    .navbar-brand { font-size: clamp(.76rem, 3.6vw, .9rem) !important; }
    .navbar-brand .logo-icon { width: 30px; height: 30px; flex-basis: 30px; }
    .nav-links .btn { padding: .45rem .55rem; font-size: .75rem; }
}
