/* =========================================
   PALETA DE COLORES Y VARIABLES
   ========================================= */
:root {
    --rosa-principal: #d1a7a7;
    --rosa-claro: #fdf2f2;
    --rosa-hover: #c49595;
    --blanco: #ffffff;
    --gris-fondo: #f9f9f9;
    --texto-oscuro: #4a4a4a;
    --texto-suave: #888888;
    --error: #dc3545;
    --exito: #28a745;
    --shadow: 0 10px 30px rgba(0,0,0,0.05);
}

/* =========================================
   RESET Y BASE
   ========================================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--gris-fondo);
    color: var(--texto-oscuro);
    line-height: 1.6;
    min-height: 100vh;
}

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

/* =========================================
   LAYOUT DE AUTENTICACIÓN (Login, Registro, Verificar)
   ========================================= */
.login-container {
    display: flex;
    flex-direction: column; 
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

/* Logo encima de la tarjeta */
.logo {
    text-align: center;
    margin-bottom: 40px;
    width: 100%;
}

.logo h1 {
    font-size: clamp(2.5rem, 8vw, 3.5rem);
    color: var(--rosa-principal);
    letter-spacing: 8px;
    font-weight: 300;
    text-transform: uppercase;
    margin: 0;
    line-height: 1;
}

.logo h2 {
    font-size: 1.2rem;
    color: var(--rosa-principal);
    letter-spacing: 4px;
    font-weight: 400;
    text-transform: uppercase;
    margin-top: 10px;
}


/* Tarjeta Blanca de Formulario */
.auth-form {
    background: var(--blanco);
    padding: 50px 40px;
    border-radius: 20px;
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 450px;
    text-align: center;
}

.auth-form h2 {
    font-size: 1.4rem;
    color: #444;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* =========================================
   FORMULARIOS E INPUTS
   ========================================= */
.input-group {
    text-align: left;
    margin-bottom: 25px;
}

.input-group label {
    display: block;
    font-size: 0.85rem;
    color: #999;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

input[type="tel"],
input[type="text"],
input[type="email"],
input[type="date"],
input[type="number"] {
    width: 100%;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 10px;
    background-color: #fcfcfc;
    font-size: 1rem;
    color: var(--texto-oscuro);
    transition: all 0.3s ease;
}

input:focus {
    outline: none;
    border-color: var(--rosa-principal);
    background-color: #fff;
    box-shadow: 0 0 0 3px var(--rosa-claro);
}

/* Botón Principal (Píldora) */
.btn-primary {
    width: 100%;
    padding: 18px;
    background-color: var(--rosa-principal);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary:hover {
    background-color: var(--rosa-hover);
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(209, 167, 167, 0.3);
}

/* =========================================
   PÁGINA DE SELECCIÓN DE SERVICIOS
   ========================================= */
.header-app {
    text-align: center;
    padding: 40px 20px;
}

.header-app h1 {
    font-size: 1.8rem;
    color: var(--texto-oscuro);
    font-weight: 300;
    margin-bottom: 10px;
}

.servicios-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-top: 20px;
}

.card-servicio {
    background: var(--blanco);
    border: 1px solid #efefef;
    border-radius: 15px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    text-decoration: none;
}

.card-servicio:hover {
    border-color: var(--rosa-principal);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transform: scale(1.01);
}

.servicio-info h3 {
    font-size: 1.1rem;
    color: var(--texto-oscuro);
    margin-bottom: 4px;
    text-align: left;
}

.duracion {
    color: var(--rosa-principal);
    font-weight: bold;
    font-size: 0.9rem;
}

.btn-seleccionar {
    background: transparent;
    border: 1px solid var(--rosa-principal);
    color: var(--rosa-principal);
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.85rem;
    transition: all 0.3s;
}

.btn-seleccionar:hover {
    background: var(--rosa-principal);
    color: white;
}

/* =========================================
   CALENDARIO Y HORARIOS
   ========================================= */
.grid-horas {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 20px;
}

.btn-hora {
    background: var(--blanco);
    border: 1px solid #eee;
    padding: 15px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    text-align: center;
    transition: all 0.2s;
}

.btn-hora:hover {
    border-color: var(--rosa-principal);
    background-color: var(--rosa-claro);
    color: var(--rosa-principal);
}

/* =========================================
   FEEDBACK Y MENSAJES
   ========================================= */
.error-msg {
    color: var(--error);
    background: #f8d7da;
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

/* =========================================
   UTILIDADES / FOOTER
   ========================================= */
.footer-links {
    margin-top: 40px;
    text-align: center;
    padding-bottom: 40px;
}

.footer-links a {
    color: var(--texto-suave);
    text-decoration: none;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--rosa-principal);
    text-decoration: underline;
}

/* Estilos para el Panel de Administración */
.admin-table-wrapper {
    background: var(--blanco);
    padding: 20px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.admin-table th, .admin-table td {
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.admin-table th {
    text-transform: uppercase;
    font-size: 0.8rem;
    color: var(--texto-suave);
    letter-spacing: 1px;
}

.badge {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: bold;
}

.status-pre-reserva .badge {
    background-color: #fff3cd;
    color: #856404;
}

.status-confirmada .badge {
    background-color: #d4edda;
    color: #155724;
}

.btn-cancelar {
    background: none;
    border: 1px solid #ff4d4d;
    color: #ff4d4d;
    padding: 5px 10px;
    border-radius: 15px;
    cursor: pointer;
    font-size: 0.75rem;
}

.btn-cancelar:hover {
    background: #ff4d4d;
    color: white;
}

/* Contenedor de acciones en la tabla */
.actions-cell {
    display: flex;
    gap: 10px;        /* Espacio exacto entre botones */
    flex-wrap: wrap;   /* Si no caben, se bajan solos (responsive) */
    justify-content: flex-start;
    align-items: center;
}

/* Ajuste para que los botones tipo enlace se vean igual que los botones normales */
.btn-seleccionar, .btn-cancelar {
    display: inline-block;
    text-decoration: none;
    text-align: center;
    white-space: nowrap;
    font-size: 0.8rem;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-cancelar {
    background: transparent;
    border: 1px solid #ff4d4d;
    color: #ff4d4d;
}

.btn-cancelar:hover {
    background: #ff4d4d;
    color: white;
}

/* Sección de mis citas en Servicios.php */
.mis-citas-section {
    margin-bottom: 40px;
}

.sub-titulo {
    font-size: 0.9rem;
    color: var(--texto-suave);
    text-align: left;
    margin-bottom: 15px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.mis-citas-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cita-item {
    background: #fff;
    border-left: 4px solid var(--rosa-principal);
    padding: 15px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.02);
}

.cita-fecha {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 50px;
    border-right: 1px solid #eee;
    padding-right: 15px;
}

.cita-fecha .dia {
    font-weight: bold;
    color: var(--texto-oscuro);
}

.cita-fecha .hora {
    font-size: 0.8rem;
    color: var(--rosa-principal);
}

.cita-detalle {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.estado-tag {
    font-size: 0.7rem;
    font-weight: bold;
    padding: 2px 8px;
    border-radius: 10px;
    width: fit-content;
    text-transform: uppercase;
}

.estado-tag.pre-reserva { background: #fff3cd; color: #856404; }
.estado-tag.cita { background: #d4edda; color: #155724; }

/* Contenedor ancho para el calendario */
.container-wide {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.nav-semana {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
}

.semana-actual {
    font-weight: bold;
    font-size: 1.2rem;
    color: var(--rosa-principal);
}

.btn-nav {
    background: white;
    padding: 8px 15px;
    border-radius: 20px;
    text-decoration: none;
    color: var(--texto-oscuro);
    border: 1px solid #ddd;
}

/* Cuadrícula de 6 columnas (Lunes a Sábado) */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr); /* Cambiado de 7 a 6 */
    gap: 10px;
    margin-top: 30px;
}

/* Ajuste opcional para que se vea mejor en pantallas medianas */
@media (max-width: 1200px) {
    .calendar-grid {
        grid-template-columns: repeat(3, 1fr); /* 2 filas de 3 días */
    }
}

@media (max-width: 768px) {
    .calendar-grid {
        grid-template-columns: 1fr; /* 1 columna en móvil */
    }
}

.calendar-day {
    background: #fdfdfd;
    border: 1px solid #eee;
    border-radius: 10px;
    min-height: 400px;
}

.calendar-day.hoy {
    border-color: var(--rosa-principal);
    background-color: var(--rosa-claro);
}

.day-header {
    background: #f4f4f4;
    padding: 10px;
    text-align: center;
    border-bottom: 1px solid #eee;
    border-radius: 10px 10px 0 0;
}

.day-header strong { display: block; text-transform: uppercase; font-size: 0.8rem; }

/* Tarjetas de citas dentro del calendario */
.cita-card {
    background: white;
    margin: 8px;
    padding: 10px;
    border-radius: 8px;
    border-left: 4px solid #ccc;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    font-size: 0.85rem;
}

.cita-card.pre-reserva { border-left-color: #ffc107; }
.cita-card.cita { border-left-color: #28a745; }

.cita-hora {
    font-weight: bold;
    color: var(--rosa-principal);
    display: block;
    margin-bottom: 5px;
}

.cita-info strong { display: block; color: #333; }
.cita-info small { display: block; color: #777; line-height: 1.2; margin-top: 2px; }
.tel { color: var(--rosa-hover) !important; font-size: 0.75rem; }

.cita-status {
    margin-top: 5px;
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: bold;
    opacity: 0.7;
}

.no-citas {
    text-align: center;
    color: #ccc;
    font-size: 0.8rem;
    margin-top: 20px;
}

/* Responsive: en móvil se vuelve lista */
@media (max-width: 1000px) {
    .calendar-grid { grid-template-columns: 1fr; }
    .calendar-day { min-height: auto; margin-bottom: 15px; }
}

.badge-groupon {
    display: inline-block;
    background-color: #84b613; /* Verde Groupon */
    color: white;
    padding: 3px 8px;
    border-radius: 5px;
    font-weight: bold;
    font-size: 0.75rem;
    margin-top: 5px;
/*    text-transform: uppercase; */
}

/* Contenedor de acciones rápidas */
.admin-quick-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Estilo base de los botones de acción */
.btn-action {
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
    padding: 12px 20px;
    border-radius: 12px;
    text-decoration: none;
    color: var(--texto-oscuro);
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border: 1px solid #eee;
    transition: all 0.3s ease;
}

.btn-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
    border-color: var(--rosa-principal);
    color: var(--rosa-principal);
}

/* Botón activo (donde estamos ahora) */
.btn-action.active {
    background: var(--rosa-principal);
    color: white;
    border-color: var(--rosa-principal);
}

/* Botón deshabilitado o futuro */
.btn-action.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: #f9f9f9;
}

.btn-disabled {
    background-color: #ccc !important;
    cursor: not-allowed;
    border-color: #bbb !important;
}

.btn-action .icon {
    font-size: 1.2rem;
}

/* Ajuste para móviles */
@media (max-width: 600px) {
    .admin-quick-actions {
        flex-direction: column;
    }
    .btn-action {
        width: 100%;
        justify-content: center;
    }
}

.nota-citas {
    margin-top: 15px;
    font-size: 0.85rem;
    color: var(--texto-suave);
    text-align: center;
    background: #ebf176; /* Un tono muy suave de rosa/alerta */
    padding: 10px;
    border-radius: 8px;
    line-height: 1.4;
}

.nota-citas strong {
    color: var(--rosa-principal);
}

/* Resaltado para pre-reservas en el calendario */

.btn-confirmar-mini:hover {
    background-color: #b0e6bc !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}