/* =========================================
   PALETA DE COLORES Y VARIABLES
   ========================================= */
:root {
    --rosa-suave: #fce4ec;
    --rosa-medio: #f06292;
    --morado-principal: #9c27b0;
    --morado-oscuro: #6a1b9a;
    --lavanda-fondo: #f3e5f5;
    --blanco: #ffffff;
    --texto: #4a148c;
    --verde-exito: #27ae60;
}

/* =========================================
   BASE DE LA PÁGINA (FONDO INTEGRADO)
   ========================================= */
body {
    background-image: url("fondo de pagina.jpg"); 
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    font-family: 'Segoe UI', Arial, sans-serif;
    color: var(--texto);
    margin: 0;
    padding: 10px; 
    display: flex;
    justify-content: center;
    align-items: center; 
    min-height: 100vh;
    box-sizing: border-box;
}

/* =========================================
   CONTENEDOR PRINCIPAL
   ========================================= */
.container {
    background-color: rgba(252, 228, 236, 0.95); 
    width: 100%;
    max-width: 500px; 
    /* Ajustado para que el banner no tenga espacio arriba */
    padding: 0 0 30px 0; 
    border-radius: 25px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    position: relative;
    box-sizing: border-box;
    text-align: center;
    /* Recorta la imagen en las esquinas redondeadas */
    overflow: hidden; 
}

/* =========================================
   LOGO / BANNER SUPERIOR (RE-AJUSTADO)
   ========================================= */
.logo-banner {
    width: 100%;
    /* Altura controlada para que no se vea inmenso */
    height: 160px;          
    display: block;
    /* object-fit evita que la imagen se estire feo, la recorta para encajar */
    object-fit: cover;      
    object-position: center;
    border-bottom: 2px solid var(--rosa-suave);
}

/* Ajuste de separación después del banner */
.container > div:first-of-type {
    margin-top: 20px !important;
}

/* =========================================
   BOTONES MENÚ PRINCIPAL
   ========================================= */
.menu-principal {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

.btn-menu {
    background-color: var(--morado-principal);
    color: white;
    padding: 15px 20px; 
    width: 100%;       
    max-width: 100%;  
    margin: 8px auto;     
    border-radius: 12px;
    font-weight: bold;
    text-decoration: none;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    transition: 0.3s;
    font-size: 1rem;
    border: none; 
    cursor: pointer;
    font-family: inherit;
    box-sizing: border-box;
}

.btn-menu:hover {
    background-color: var(--morado-oscuro);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(156, 39, 176, 0.3);
}

/* --- CLASE ESPECIAL "CONFIRMAR TURNO" --- */
.btn-estrecho {
    width: fit-content !important; 
    min-width: auto !important;    
    padding-left: 25px !important; 
    padding-right: 25px !important;
}

/* Botón Admin */
.btn-admin-home {
    display: inline-flex;
    background-color: var(--rosa-medio);
    color: white;
    text-decoration: none;
    padding: 8px 20px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: bold;
    margin-top: 15px;
    transition: 0.3s;
    opacity: 0.9;
}

/* =========================================
   PANEL DE GESTIÓN (TAL CUAL LO TENÍAS)
   ========================================= */
.grid-acciones {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 20px;
    margin-bottom: 20px;
    justify-items: center;
}

.btn-accion-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--blanco);
    color: var(--morado-principal);
    padding: 15px 10px;
    width: 100%;
    max-width: 120px;
    height: 90px;
    border-radius: 18px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.75rem;
    border: 2px solid var(--rosa-suave);
    transition: 0.3s;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}

/* =========================================
   FORMULARIOS Y TABLAS (TAL CUAL LO TENÍAS)
   ========================================= */
input, select, textarea {
    width: 100%;
    padding: 12px;
    margin-top: 5px;
    border: 2px solid var(--rosa-suave);
    border-radius: 12px;
    box-sizing: border-box;
    font-size: 16px;
    color: var(--texto);
}

.table-wrapper {
    width: 100%;
    overflow-x: auto;
    margin-top: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 12px 8px;
    text-align: left;
    border-bottom: 1px solid var(--rosa-suave);
    font-size: 0.85rem;
}

/* =========================================
   FOOTER
   ========================================= */
footer {
    margin-top: 25px;
    padding: 0 20px;
    font-size: 0.75rem;
    color: var(--morado-principal);
    opacity: 0.9;
    font-weight: bold;
}

/* Responsive */
@media (max-width: 480px) {
    .container { 
        width: 95%; 
    }
    .logo-banner {
        height: 130px; /* Un poco más bajito en celulares */
    }
    .btn-menu { width: 100%; max-width: 100%; font-size: 1.1rem; } 
    h1 { font-size: 1.6rem; }
}