
body {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Noto Sans SC', sans-serif;
    height: 100%;
    overflow-x: hidden;
    width: 100%;
}   

/* Estilos del Panel de Administración */
.admin-header {
    margin-bottom: 0 !important;
    padding-bottom: 1rem !important;
}

.admin-nav {
    display: flex !important;
    gap: 0.5rem !important;
    margin-top: 0.5rem !important;
}

.admin-nav-button {
    flex: 1 !important;
    text-align: center !important;
}

.admin-content {
    margin-top: 0.5rem !important;
    padding-top: 0 !important;
    position: relative !important;
    z-index: 1 !important;
}

.orders-filters {
    margin-bottom: 1rem !important;
    padding-bottom: 1rem !important;
}

.orders-list {
    margin-top: 0 !important;
    padding-top: 1rem !important;
}

/* Diseño de elementos del menú de administración para mejor visualización móvil */
.menu-item {
    display: flex !important;
    flex-direction: column !important;
    height: auto !important;
}

.menu-item .menu-item-info {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
}

.admin-dish-actions {
    display: flex !important;
    gap: 0.5rem !important;
    margin-top: 1rem !important;
    padding-top: 0.5rem !important;
}

.admin-dish-button {
    flex: 1 !important;
    padding: 0.75rem !important;
    border: none !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    font-size: 0.85rem !important;
    font-family: 'Noto Sans SC', sans-serif !important;
    min-height: 44px !important; /* Mejor objetivo táctil */
}

.edit-dish-button {
    background: #2196F3 !important;
    color: white !important;
}

.edit-dish-button:hover {
    background: #1976D2 !important;
}

.delete-dish-button {
    background: #f44336 !important;
    color: white !important;
}

.delete-dish-button:hover {
    background: #d32f2f !important;
}

/* Ajustes específicos para móviles */
@media (max-width: 768px) {
.admin-dish-actions {
    flex-direction: column !important;
    gap: 0.5rem !important;
}
.admin-dish-button {
    font-size: 0.9rem !important;
    padding: 1rem !important;
}
}


* {
    box-sizing: border-box;
}

html {
    height: 100%;
    overflow-x: hidden;
    width: 100%;
}

.app-container {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

/* Pantalla principal */
.home-screen {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    position: relative;
    background: linear-gradient(135deg, #8B0000 0%, #DC143C 100%);
    overflow: hidden;
}

.home-screen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('img/portal.png');
    background-size: cover;
    background-position: center;
    filter: blur(8px);
    opacity: 0.4;
    z-index: 0;
}

.home-content {
    position: relative;
    z-index: 1;
    text-align: center;
    width: 100%;
    max-width: 600px;
}

.restaurant-title {
    font-size: 3rem;
    font-weight: 700;
    color: #FFD700;
    margin-bottom: 3rem;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
}

.button-group {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
}

.main-button {
    background: rgba(255, 255, 255, 0.95);
    border: none;
    padding: 1.5rem 2rem;
    font-size: 1.5rem;
    font-weight: 500;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    font-family: 'Noto Sans SC', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.main-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    background: rgba(255, 255, 255, 1);
}

.main-button:active {
    transform: translateY(-1px);
}

.main-button img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

/* Pantalla de menú */
.menu-screen {
    display: none;
    flex: 1;
    flex-direction: column;
    background: #F5F5F5;
}

.menu-screen.active {
    display: flex;
}

.menu-header {
    background: linear-gradient(135deg, #8B0000 0%, #DC143C 100%);
    color: white;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

.menu-header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.menu-header-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 0.5rem;
}

.order-id-header {
    font-size: 0.65rem;
    opacity: 0.85;
    margin-bottom: 0.15rem;
    white-space: nowrap;
}

.order-id-header-value {
    font-family: monospace;
    font-size: 0.6rem;
    opacity: 0.75;
    word-break: break-all;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.back-button {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.back-button:hover {
    background: rgba(255, 255, 255, 0.3);
}

.menu-title {
    font-size: 1.5rem;
    font-weight: 700;
    flex: 1;
}

.cart-button {
    background: #FFD700;
    border: none;
    color: #8B0000;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.cart-button:hover {
    background: #FFC700;
    transform: scale(1.05);
}

.cart-count {
    background: #8B0000;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.menu-content {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    margin-top: 70px;
}

.menu-content .menu-grid {
    display: block;
}

.category-section .menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.menu-item {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.menu-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.menu-item-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.menu-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.menu-item-info {
    padding: 1rem;
    position: relative;
}

.menu-item-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 0.5rem;
}

.menu-item-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #DC143C;
    margin-bottom: 1rem;
}

.menu-item-badge {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #FFD700;
    color: #8B0000;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

.add-button {
    width: 100%;
    background: #8B0000;
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.3s ease;
    font-family: 'Noto Sans SC', sans-serif;
}

.add-button:hover {
    background: #A00000;
}

.add-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.add-dish-item {
    background: white;
    border: 3px dashed #8B0000;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

.add-dish-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border-color: #DC143C;
}

.add-dish-icon {
    font-size: 4rem;
    color: #8B0000;
    margin-bottom: 1rem;
}

.add-dish-text {
    font-size: 1.2rem;
    font-weight: 700;
    color: #8B0000;
}

/* Pantalla de carrito */
.cart-screen {
    display: none;
    flex: 1;
    flex-direction: column;
    background: #F5F5F5;
}

.cart-screen.active {
    display: flex;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    padding-bottom: 0.5rem;
    margin-top: 70px;
    margin-bottom: 140px;
}

.cart-item {
    background: white;
    border-radius: 8px;
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.cart-item:last-child {
    margin-bottom: 0;
}

.cart-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-weight: 700;
    color: #333;
    margin-bottom: 0.15rem;
    font-size: 0.95rem;
}

.cart-item-price {
    color: #666;
    font-size: 0.8rem;
}

.cart-item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.5rem;
    border-top: 1px solid #f0f0f0;
}

.cart-item-total {
    font-size: 1rem;
    font-weight: 700;
    color: #DC143C;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quantity-button {
    background: #8B0000;
    color: white;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.quantity-button:hover {
    background: #A00000;
}

.quantity {
    font-weight: 700;
    font-size: 0.95rem;
    min-width: 25px;
    text-align: center;
}

.cart-summary {
    background: white;
    padding: 1rem 1.5rem;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

.order-id {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 0.75rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #666;
    text-align: center;
}

.order-id-label {
    font-weight: 700;
    color: #333;
    margin-bottom: 0.25rem;
}

.order-id-value {
    font-family: monospace;
    font-size: 0.8rem;
    word-break: break-all;
    color: #8B0000;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    font-size: 1.3rem;
    font-weight: 700;
}

.confirm-button {
    width: 100%;
    background: #FFD700;
    color: #8B0000;
    border: none;
    padding: 0.85rem;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Noto Sans SC', sans-serif;
}

.confirm-button:hover {
    background: #FFC700;
    transform: scale(1.02);
}

.confirm-button:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.empty-cart {
    text-align: center;
    padding: 3rem 1.5rem;
    color: #666;
}

.empty-cart-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

/* Footer */
.footer {
    background: #333;
    color: white;
    padding: 1.5rem;
    text-align: center;
}

/* Ocultar footer */
    .menu-screen.active ~ .footer,
.cart-screen.active ~ .footer {
    display: none;
}

.footer-info {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.footer-icon {
    font-size: 1.2rem;
}

/* Carrito flotante */
.floating-cart {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #FFD700;
    color: #8B0000;
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    transition: all 0.3s ease;
}

.floating-cart:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.floating-cart.show {
    display: flex;
}

.floating-cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #8B0000;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
}

/* Secciones de categorías */
.category-section {
    margin-bottom: 2rem;
}

.category-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #8B0000;
    margin-bottom: 1rem;
    padding: 0.5rem 0;
    border-bottom: 2px solid #FFD700;
}

/* Notificación emergente */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #333;
    color: white;
    padding: 1rem 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    opacity: 0;
    transition: all 0.3s ease;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* Estado de carga */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Inicio de sesión de administrador */
.admin-login-screen {
    display: none;
    flex: 1;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    background: linear-gradient(135deg, #1a1a1a 0%, #333333 100%);
}

.admin-login-screen.active {
    display: flex;
}

.login-box {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.login-title {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 2rem;
    text-align: center;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.login-input {
    padding: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    font-family: 'Noto Sans SC', sans-serif;
    transition: border-color 0.3s ease;
}

.login-input:focus {
    outline: none;
    border-color: #FFD700;
}

.login-button {
    background: #8B0000;
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.3s ease;
    font-family: 'Noto Sans SC', sans-serif;
}

.login-button:hover {
    background: #A00000;
}

.login-error {
    color: #DC143C;
    text-align: center;
    font-size: 0.9rem;
    display: none;
}

.login-error.show {
    display: block;
}

/* Panel de administración */
.admin-screen {
    display: none;
    flex: 1;
    flex-direction: column;
    background: #F5F5F5;
}

.admin-screen.active {
    display: flex;
}

.admin-header {
    background: linear-gradient(135deg, #1a1a1a 0%, #333333 100%);
    color: white;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

.admin-nav {
    display: flex;
    gap: 1rem;
    flex: 1;
    justify-content: center;
}

.admin-nav-button {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid transparent;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-family: 'Noto Sans SC', sans-serif;
}

.admin-nav-button:hover {
    background: rgba(255, 255, 255, 0.2);
}

.admin-nav-button.active {
    background: #FFD700;
    color: #1a1a1a;
    border-color: #FFD700;
}

.admin-content {
    flex: 1;
    overflow-y: visible;
    padding: 1rem;
    margin-top: 80px;
    min-height: calc(100vh - 80px);
}

/* Sección de pedidos */
.orders-filters {
    background: white;
    padding: 1rem;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 80px; /* justo debajo del header */
    left: 0;
    right: 0;
    z-index: 200;
    max-height: 60vh; 
    overflow-y: auto;
}

.orders-content {
    padding-top: 200px; /* deja espacio para el filtro fijo */
    padding-bottom: 80px; /* deja espacio para la paginación fija */

}

.orders-content {
    max-height: calc(100vh - 200px);
    overflow-y: auto;
    padding: 0 1rem;
}

.filter-dropdown {
    margin-bottom: 1rem;
}

.filter-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Noto Sans SC', sans-serif;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.filter-select:focus {
    outline: none;
    border-color: #8B0000;
}

.filter-tabs {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.5rem;
    margin-bottom: 1rem;
}

@media (max-width: 768px) {
.filter-tabs {
    grid-template-columns: repeat(2, 1fr);
}
}

.filter-tab {
    background: #f0f0f0;
    border: none;
    padding: 0.75rem 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-family: 'Noto Sans SC', sans-serif;
    font-size: 0.9rem;
}

.filter-tab:hover {
    background: #e0e0e0;
}

.filter-tab.active {
    background: #8B0000;
    color: white;
}

.date-filters {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.date-input {
    padding: 0.5rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.85rem;
    font-family: 'Noto Sans SC', sans-serif;
}

.orders-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 120px;
}

.order-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 5px solid #ccc;
}

.order-card.new {
    border-left-color: #4CAF50;
    background: #f1f8f4;
}

.order-card.completed {
    border-left-color: #999;
    background: #f5f5f5;
    opacity: 0.8;
}

.order-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.order-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.order-id-display {
    font-family: monospace;
    font-size: 0.85rem;
    color: #666;
}

.order-type-badge {
    background: #8B0000;
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.order-items-preview {
    color: #666;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.order-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.order-total-display {
    font-size: 1.3rem;
    font-weight: 700;
    color: #DC143C;
    white-space: nowrap;
    overflow: visible;
    flex-shrink: 0;
}

.order-time {
    font-size: 0.85rem;
    color: #999;
    flex-shrink: 0;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    background: white;
    padding: 0.75rem 1rem;
    border-top: 1px solid #ddd;
    position: fixed; /* Fijo abajo */
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 150;
}

.pagination-button {
    background: #8B0000;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s ease;
    font-family: 'Noto Sans SC', sans-serif;
}

.pagination-button:hover:not(:disabled) {
    background: #A00000;
}

.pagination-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.pagination-info {
    font-weight: 600;
    color: #333;
}

/* Modal de detalle de pedido */
.order-detail-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.order-detail-modal.show {
    display: flex;
}

.order-detail-content {
    background: white;
    border-radius: 20px;
    max-width: 600px;
    width: 100%;
    max-height: 90%;
    overflow-y: auto;
    position: relative;
}

.order-detail-header {
    background: linear-gradient(135deg, #8B0000 0%, #DC143C 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 20px 20px 0 0;
    position: relative;
}

.order-detail-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.order-detail-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.order-detail-body {
    padding: 1.5rem;
}

.order-detail-section {
    margin-bottom: 1.5rem;
}

.order-detail-label {
    font-weight: 700;
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.order-detail-value {
    color: #666;
    font-size: 1rem;
}

.order-items-detail {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1rem;
}

.order-item-detail {
    padding: 0.75rem 0;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
}

.order-item-detail:last-child {
    border-bottom: none;
}

.complete-order-button {
    width: 100%;
    background: #4CAF50;
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.3s ease;
    font-family: 'Noto Sans SC', sans-serif;
}

.complete-order-button:hover {
    background: #45a049;
}

.complete-order-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Sección de platos */
.dishes-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-top: 1rem;
}

.add-dish-button {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background 0.3s ease;
    font-family: 'Noto Sans SC', sans-serif;
}

.add-dish-button:hover {
    background: #45a049;
}

.dishes-by-category {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.admin-category-section {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.admin-category-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #8B0000;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #FFD700;
}

.admin-dishes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

@media (max-width: 768px) {
.admin-dishes-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
}

.admin-dish-card {
    margin-bottom: 1rem;
}

.admin-dish-actions {
    flex-direction: row !important;
    gap: 0.75rem !important;
}

.admin-dish-button {
    flex: 1 !important;
    min-height: 48px !important;
    font-size: 1rem !important;
    padding: 0.875rem !important;
}
}

@media (max-width: 480px) {
.admin-dish-actions {
    flex-direction: column !important;
    gap: 0.5rem !important;
}

.admin-dish-button {
    width: 100% !important;
}
}

.admin-dish-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.admin-dish-image {
    width: 100%;
    height: 150px;
    border-radius: 8px;
    overflow: hidden;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.admin-dish-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.admin-dish-name {
    font-weight: 700;
    color: #333;
    text-align: center;
}

.admin-dish-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: #DC143C;
    text-align: center;
}

.admin-dish-actions {
    display: flex;
    gap: 0.5rem;
}

.admin-dish-button {
    flex: 1;
    padding: 0.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Noto Sans SC', sans-serif;
}

.edit-dish-button {
    background: #2196F3;
    color: white;
}

.edit-dish-button:hover {
    background: #1976D2;
}

.delete-dish-button {
    background: #f44336;
    color: white;
}

.delete-dish-button:hover {
    background: #d32f2f;
}

/* Modal de edición de plato */
.dish-edit-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.dish-edit-modal.show {
    display: flex;
}

.dish-edit-content {
    background: white;
    border-radius: 20px;
    max-width: 500px;
    width: 100%;
    max-height: 90%;
    overflow-y: auto;
}

.dish-edit-header {
    background: linear-gradient(135deg, #8B0000 0%, #DC143C 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 20px 20px 0 0;
    position: relative;
}

.dish-edit-title {
    font-size: 1.5rem;
    font-weight: 700;
}

.dish-edit-body {
    padding: 1.5rem;
}

.dish-edit-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-weight: 700;
    color: #333;
    font-size: 0.9rem;
}

.form-input {
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Noto Sans SC', sans-serif;
    transition: border-color 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: #FFD700;
}

.form-select {
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Noto Sans SC', sans-serif;
    background: white;
    cursor: pointer;
}

.image-preview {
    width: 100%;
    height: 200px;
    border: 2px dashed #e0e0e0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #f8f9fa;
}

.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.image-preview-placeholder {
    color: #999;
    text-align: center;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.form-button {
    flex: 1;
    padding: 1rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Noto Sans SC', sans-serif;
}

.save-button {
    background: #4CAF50;
    color: white;
}

.save-button:hover {
    background: #45a049;
}

.cancel-button {
    background: #f0f0f0;
    color: #333;
}

.cancel-button:hover {
    background: #e0e0e0;
}

/* Modal de plato */
.dish-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.dish-modal.show {
    display: flex;
}

.dish-modal-content {
    background: white;
    border-radius: 20px;
    max-width: 500px;
    width: 100%;
    max-height: 90%;
    overflow-y: auto;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
from {
    transform: translateY(50px);
    opacity: 0;
}
to {
    transform: translateY(0);
    opacity: 1;
}
}

.dish-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background 0.3s ease;
}

.dish-modal-close:hover {
    background: rgba(0, 0, 0, 0.7);
}

.dish-modal-image {
    width: 100%;
    max-height: 70vh;/* limita a la altura de pantalla */
    background: #000;/* opcional: fondo neutro en vez de amarillo */
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px 20px 0 0;
    overflow: hidden;
}

.dish-modal-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.dish-modal-info {
    padding: 2rem;
}

.dish-modal-name {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 1rem;
}

.dish-modal-price {
    font-size: 2rem;
    font-weight: 700;
    color: #DC143C;
    margin-bottom: 2rem;
}

.dish-modal-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.dish-modal-quantity {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
}

.dish-modal-button {
    background: #8B0000;
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.dish-modal-button:hover {
    background: #A00000;
}

.dish-modal-quantity-text {
    font-size: 2rem;
    font-weight: 700;
    min-width: 60px;
    text-align: center;
}

.dish-modal-add {
    width: 100%;
    background: #FFD700;
    color: #8B0000;
    border: none;
    padding: 1.2rem;
    border-radius: 12px;
    font-size: 1.3rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Noto Sans SC', sans-serif;
}

.dish-modal-add:hover {
    background: #FFC700;
    transform: scale(1.02);
}

/* Responsivo */
@media (max-width: 768px) {
.restaurant-title {
    font-size: 2rem;
}

.main-button {
    font-size: 1.2rem;
    padding: 1.2rem 1.5rem;
    min-height: 56px;
}

.category-section .menu-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.menu-item-image {
    height: 140px;
}

.menu-item-name {
    font-size: 1rem;
}

.menu-item-price {
    font-size: 1.2rem;
}

.floating-cart {
    width: 70px;
    height: 70px;
    font-size: 1.5rem;
    bottom: 1.5rem;
    right: 1.5rem;
}

.floating-cart-count {
    width: 26px;
    height: 26px;
    font-size: 0.8rem;
}

.category-title {
    font-size: 1.3rem;
}

.dish-modal-image {
    height: 200px;
}

.dish-modal-info {
    padding: 1.5rem;
}

.dish-modal-name {
    font-size: 1.4rem;
}

.dish-modal-price {
    font-size: 1.4rem;
}

.dish-modal-button {
    width: 48px;
    height: 48px;
    font-size: 1.2rem;
}

.dish-modal-add {
    padding: 1rem;
    font-size: 1.1rem;
    min-height: 56px;
}

.filter-tabs {
    grid-template-columns: 1fr 1fr !important;
    gap: 0.5rem;
}

.filter-tab {
    padding: 0.75rem 0.5rem;
    font-size: 0.85rem;
}

.orders-filters {
    position: fixed !important;
    top: 80px !important;
    max-height: 50vh !important;
    overflow-y: auto !important;
}

.admin-dishes-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1rem;
}
}

@media (max-width: 480px) {
.category-section .menu-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.menu-item-image {
    height: 120px;
}

.dish-modal-image {
    height: 180px;
}

.filter-tabs {
    grid-template-columns: 1fr !important;
}

.admin-dishes-grid {
    grid-template-columns: 1fr !important;
}

.admin-dish-actions {
    flex-direction: column !important;
}
}

@media (max-width: 414px) {
.home-content {
    max-width: 100%;
    padding: 1rem;
}

.restaurant-title {
    font-size: 1.8rem;
    margin-bottom: 2rem;
}

.button-group {
    gap: 1rem;
}

.main-button {
    font-size: 1rem;
    padding: 1rem 1.2rem;
    min-height: 50px;
}

.main-button img {
    width: 30px;
    height: 30px;
}

.menu-header {
    padding: 0.75rem;
}

.menu-title {
    font-size: 1.2rem;
}

.cart-button {
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
}

.menu-content {
    padding: 1rem 0.75rem;
    margin-top: 60px;
}

.category-section .menu-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.menu-item {
    border-radius: 12px;
}

.menu-item-image {
    height: 100px;
}

.menu-item-info {
    padding: 0.75rem;
}

.menu-item-name {
    font-size: 0.9rem;
}

.menu-item-price {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.cart-items {
    padding: 1rem 0.75rem;
    margin-top: 60px;
    margin-bottom: 120px;
}

.cart-item {
    padding: 0.5rem;
}

.cart-item-name {
    font-size: 0.85rem;
}

.cart-item-price {
    font-size: 0.75rem;
}

.cart-summary {
    padding: 0.75rem 1rem;
}

.cart-total {
    font-size: 1.1rem;
}

.confirm-button {
    padding: 0.75rem;
    font-size: 1rem;
    min-height: 48px;
}

.footer {
    padding: 1rem 0.75rem;
}

.footer-info {
    font-size: 0.9rem;
}

.floating-cart {
    width: 55px;
    height: 55px;
    font-size: 1.2rem;
    bottom: 1rem;
    right: 1rem;
}

.floating-cart-count {
    width: 22px;
    height: 22px;
    font-size: 0.7rem;
}

.dish-modal-content {
    max-width: 95%;
    margin: 0 auto;
}

.dish-modal-image {
    height: 150px;
}

.dish-modal-info {
    padding: 1.2rem;
}

.dish-modal-name {
    font-size: 1.2rem;
}

.dish-modal-price {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

.dish-modal-button {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
}

.dish-modal-add {
    padding: 0.9rem;
    font-size: 1rem;
    min-height: 48px;
}

.customer-info-content {
    max-width: 95%;
    margin: 0 auto;
}

.customer-info-body {
    padding: 1.2rem;
}

    .form-group input,
.form-group textarea {
    font-size: 0.95rem;
    padding: 0.6rem;
}

.customer-info-submit {
    padding: 0.9rem;
    font-size: 1rem;
    min-height: 48px;
}
}

@media (max-width: 360px) {
.category-section .menu-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

.restaurant-title {
    font-size: 1.6rem;
}

.main-button {
    font-size: 0.95rem;
    padding: 0.9rem 1rem;
}

.menu-item-image {
    height: 90px;
}

.dish-modal-image {
    height: 120px;
}

.floating-cart {
    width: 50px;
    height: 50px;
    font-size: 1.1rem;
}

.floating-cart-count {
    width: 20px;
    height: 20px;
    font-size: 0.65rem;
}
}

@media (min-width: 769px) and (max-width: 1024px) {
.category-section .menu-grid {
    grid-template-columns: repeat(3, 1fr);
}

.floating-cart {
    width: 75px;
    height: 75px;
    font-size: 1.6rem;
}

.floating-cart-count {
    width: 28px;
    height: 28px;
    font-size: 0.85rem;
}
}

@media (min-width: 1025px) {
.category-section .menu-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.floating-cart {
    width: 80px;
    height: 80px;
    font-size: 1.8rem;
}

.floating-cart-count {
    width: 30px;
    height: 30px;
    font-size: 0.9rem;
}
}

/* Modal de información del cliente */
.customer-info-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.customer-info-modal.show {
    display: flex;
}

.customer-info-content {
    background: white;
    border-radius: 20px;
    max-width: 500px;
    width: 100%;
    max-height: 90%;
    overflow-y: auto;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

.customer-info-header {
    background: linear-gradient(135deg, #8B0000 0%, #DC143C 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 20px 20px 0 0;
    position: relative;
}

.customer-info-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.customer-info-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.customer-info-body {
    padding: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
    width: 100%;
}

.form-group label {
    font-weight: 700;
    color: #333;
    font-size: 0.9rem;
}

    .form-group input,
.form-group textarea {
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Noto Sans SC', sans-serif;
    transition: border-color 0.3s ease;
    width: 100%;
    box-sizing: border-box;
}

    .form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #FFD700;
}

.error-message {
    color: orange;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    display: none;
}

.customer-info-submit {
    width: 100%;
    background: #4CAF50;
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.3s ease;
    font-family: 'Noto Sans SC', sans-serif;
    margin-top: 1rem;
}

.customer-info-submit:hover {
    background: #45a049;
}


/* LAYOUT ESTABLE PARA ADMIN (PEDIDOS + PLATOS) */

/* 1. El body no tiene scroll propio en admin */
body.admin-mode {
    overflow: hidden;
}

/* 2. La pantalla de admin ocupa toda la ventana y es la que scrollea */
.admin-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
}

/* 3. El header se queda arriba dentro de admin-screen (ya está fixed visualmente) */
.admin-header {
    position: relative; 
    z-index: 120;
}

/* 4. El contenido de admin scrollea, barra completa visible bajo el header */
.admin-content {
    flex: 1;
    margin-top: 0;
    padding-top: 0;
    overflow-y: auto;
}

/* 5. Ajustes para que no haya huecos en pedidos ni en platos */
.orders-filters {
    position: static;
    margin-top: 0;
}

.orders-content {
    padding-top: 0rem;
    padding-bottom: 6rem;
    max-height: none;
    overflow-y: visible;
}

#dishesSection {
    margin-top: 0;
    padding-bottom: 2rem;
}

/* Ajuste scroll modal Editar Plato */

.dish-edit-content {
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.dish-edit-form {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

/* solo scrollea el cuerpo del formulario */
.dish-edit-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 1.5rem 1.5rem 0.75rem;
}

/* botones fijos al final del modal, con un poco de aire */
.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: 0.75rem 1.5rem 1.25rem;
    border-top: 1px solid #eee;
}

.dish-edit-title {
    font-size: 1.8rem;
    font-weight: 700;
}

/* la vista previa con altura controlada */
.image-preview {
    width: 100%;
    height: 220px;
    max-height: 220px;
    border: 2px dashed #e0e0e0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #f8f9fa;
}

.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}


/* Oculta las pantallas solo cuando NO tienen la clase .active */
    .admin-login-screen:not(.active),
.admin-screen:not(.active) {
    display: none;
}

.orders-content {
    padding-top: 0 !important;   /* antes 200px/220px en móvil */
}

/* Que la lista empiece justo debajo de los filtros */
.orders-list {
    margin-top: 0 !important;
}


@media (max-width: 768px) {
.orders-filters {
    margin-top: 0 !important;      /* que no se suba bajo el header */
}

.orders-content {
    padding-top: 0.75rem !important;  /* espacio entre filtros y lista */
}

.orders-list {
    margin-top: 0 !important;
}
}

/* Separar un poco más el primer pedido del filtro */
.orders-list {
    margin-top: 0.9rem !important;   /* ~14px */
}

/* En móvil igual, para asegurarnos de que pisa todo lo anterior */
@media (max-width: 768px) {
.orders-list {
    margin-top: 0.9rem !important;
}
}

/* Separar bien los filtros de la primera tarjeta en móvil */
@media (max-width: 768px) {
.orders-filters {
    margin-bottom: 1.25rem !important; /* algo más de separación abajo */
}

.orders-list {
    margin-top: 1.25rem !important;  /* empuja las tarjetas hacia abajo */
}
}

/* Evita espacio en blanco bajo el footer en móviles */
html, body {
    height: 100%;
}

.app-container {
    min-height: 100vh; /* asegura que ocupe solo la altura visible */
    display: flex;
    flex-direction: column;
}

.footer {
    margin-top: auto; /* empuja el footer al final sin dejar espacio extra */
}



/* MODAL IMAGEN AMPLIADA */

.image-viewer-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 3000;
    align-items: center;
    justify-content: center;
}

.image-viewer-modal.show {
    display: flex;
}

.image-viewer-content {
    position: relative;
    width: 90vw;
    height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-viewer-content img {
    width: 100%;
    height: auto;
    max-height: 100%;
    display: block;
    object-fit: contain;
}

.image-viewer-close {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
}
