/* Estilos para el Panel de Administración */

/* Login Screen */
.login-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.login-container {
    background: var(--color-white);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 90%;
}

.login-container h2 {
    color: var(--color-secondary);
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
}

.login-note {
    margin-top: 1rem;
    font-size: 0.85rem;
    color: #666;
    text-align: center;
    font-style: italic;
}

/* Admin Panel */
.admin-panel {
    min-height: 100vh;
    background: var(--color-light);
}

.admin-header {
    background: var(--color-white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 1.5rem 0;
    margin-bottom: 2rem;
}

.admin-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.admin-header h1 {
    color: var(--color-primary);
    font-size: 1.8rem;
    margin: 0;
}

.admin-header-actions {
    display: flex;
    gap: 1rem;
}

/* Tabs */
.admin-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid #e0e0e0;
}

.tab-btn {
    padding: 1rem 2rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-family: var(--font-primary);
    font-size: 1rem;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: var(--transition);
}

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

.tab-btn.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Admin Section Header */
.admin-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.admin-section-header h2 {
    color: var(--color-secondary);
    font-size: 2rem;
    margin: 0;
}

/* Productos Admin Grid */
.productos-admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.producto-admin-card {
    background: var(--color-white);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.producto-admin-card:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-5px);
}

.producto-admin-imagen {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 1rem;
    background: var(--color-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
}

.producto-admin-imagen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.producto-admin-info h3 {
    color: var(--color-secondary);
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.producto-admin-info p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.producto-admin-precio {
    color: var(--color-primary);
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.producto-admin-acciones {
    display: flex;
    gap: 0.5rem;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-danger {
    background: #dc3545;
    color: var(--color-white);
    border: none;
}

.btn-danger:hover {
    background: #c82333;
}

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

.btn-edit:hover {
    background: var(--color-secondary);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10001;
    overflow-y: auto;
    padding: 2rem 0;
}

.modal.active {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.modal-content {
    background: var(--color-white);
    border-radius: 20px;
    padding: 2rem;
    max-width: 800px;
    width: 90%;
    margin: 2rem auto;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e0e0e0;
}

.modal-header h2 {
    color: var(--color-secondary);
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.modal-close:hover {
    background: #f0f0f0;
    color: var(--color-dark);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group small {
    display: block;
    margin-top: 0.3rem;
    color: #666;
    font-size: 0.85rem;
}

.opciones-section {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: var(--color-light);
    border-radius: 10px;
}

.opciones-section h4 {
    color: var(--color-secondary);
    margin-bottom: 0.5rem;
}

.opciones-help {
    background: #e8f4f8;
    padding: 0.8rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 4px solid var(--color-primary);
}

.opciones-help small {
    color: #555;
    line-height: 1.5;
}

.opciones-section h4 {
    color: var(--color-secondary);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.opciones-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1rem;
}

.opcion-item {
    display: grid;
    grid-template-columns: 2fr 1.5fr 1fr auto;
    gap: 1rem;
    align-items: end;
    padding: 1rem;
    background: var(--color-white);
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.opcion-field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.opcion-field label {
    font-size: 0.85rem;
    color: #666;
    font-weight: 600;
}

.opcion-item input {
    padding: 0.7rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: var(--font-primary);
    transition: var(--transition);
}

.opcion-item input:focus {
    outline: none;
    border-color: var(--color-primary);
}

.opcion-item input.opcion-multiplicador {
    border-color: #ffa500;
}

.opcion-item input.opcion-multiplicador:focus {
    border-color: #ff8c00;
}

.opcion-item input.opcion-precio {
    border-color: #4caf50;
}

.opcion-item input.opcion-precio:focus {
    border-color: #45a049;
}

.btn-eliminar-opcion {
    padding: 0.7rem 1rem;
    background: #dc3545;
    color: var(--color-white);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    align-self: end;
    transition: var(--transition);
}

.btn-eliminar-opcion:hover {
    background: #c82333;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid #e0e0e0;
}

/* Pedidos List */
.pedidos-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.pedido-card {
    background: var(--color-white);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.pedido-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e0e0e0;
}

.pedido-info h3 {
    color: var(--color-secondary);
    margin-bottom: 0.5rem;
}

.pedido-info p {
    color: #666;
    margin: 0.3rem 0;
}

.pedido-estado {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

.pedido-estado.pendiente {
    background: #fff3cd;
    color: #856404;
}

.pedido-estado.procesando {
    background: #d1ecf1;
    color: #0c5460;
}

.pedido-estado.completado {
    background: #d4edda;
    color: #155724;
}

.pedido-productos {
    margin-top: 1rem;
}

.pedido-producto-item {
    padding: 1rem;
    background: var(--color-light);
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.pedido-producto-item p {
    margin: 0.3rem 0;
    color: #666;
}

/* Responsive */
@media (max-width: 768px) {
    .admin-header-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .admin-section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .productos-admin-grid {
        grid-template-columns: 1fr;
    }

    .opcion-item {
        grid-template-columns: 1fr;
    }

    .modal-content {
        padding: 1.5rem;
    }
}

