/* =====================================================================
   HotelWork - Hoja de estilos principal
   TFG ASIR - Pedro Rodriguez Garcia
   Paleta corporativa: azules y neutros (acorde a la memoria 5.1)
   ===================================================================== */

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, Verdana, sans-serif;
    background: #f4f6f9;
    color: #2b2f38;
    line-height: 1.5;
}

a { color: #1f4e79; text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { color: #1f4e79; margin-top: 0; }

/* ---------- Pantalla de login ---------- */
.login-body {
    background: linear-gradient(135deg, #1f4e79, #2d72b8);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.login-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 40px 30px;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.18);
}
.login-title {
    text-align: center;
    margin-bottom: 4px;
    font-size: 1.8rem;
}
.login-subtitle {
    text-align: center;
    color: #707684;
    margin-top: 0;
    margin-bottom: 24px;
    font-size: 0.9rem;
}

/* ---------- Cabecera del menú ---------- */
.cabecera {
    background: #1f4e79;
    color: #ffffff;
    padding: 14px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}
.cabecera h1 { color: #ffffff; font-size: 1.3rem; margin: 0; }
.cabecera .usuario { font-size: 0.95rem; }
.cabecera a {
    color: #ffffff;
    margin-left: 16px;
    font-weight: 600;
}
.cabecera h1 .logo-link {
    color: #ffffff;
    text-decoration: none;
    margin-left: 0;
    transition: opacity .15s ease;
}
.cabecera h1 .logo-link:hover {
    opacity: 0.85;
    text-decoration: none;
}
.cabecera .usuario .user-link {
    color: #ffffff;
    margin-left: 0;
    text-decoration: none;
    border-bottom: 1px dashed rgba(255,255,255,0.45);
    transition: border-color .15s ease;
}
.cabecera .usuario .user-link:hover {
    border-bottom-color: #ffffff;
    text-decoration: none;
}

/* ---------- Contenedor principal ---------- */
.contenedor {
    max-width: 1100px;
    margin: 24px auto;
    padding: 0 16px;
}

/* ---------- Tarjetas de menú ---------- */
.menu-tarjetas {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    list-style: none;
    padding: 0;
    margin: 0;
}
.menu-tarjetas li a {
    display: block;
    background: #ffffff;
    border-radius: 8px;
    padding: 18px 20px;
    text-align: center;
    color: #1f4e79;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    transition: transform .15s ease, box-shadow .15s ease;
}
.menu-tarjetas li a:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.10);
    text-decoration: none;
}

/* ---------- Formularios ---------- */
form label {
    display: block;
    margin-top: 12px;
    font-weight: 600;
    font-size: 0.92rem;
}
form input[type=text],
form input[type=email],
form input[type=password],
form input[type=date],
form input[type=time],
form input[type=number],
form input[type=file],
form select,
form textarea {
    width: 100%;
    padding: 10px 12px;
    margin-top: 4px;
    border: 1px solid #cfd6df;
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: inherit;
    background: #ffffff;
}
form textarea { resize: vertical; min-height: 80px; }
form input:focus, form select:focus, form textarea:focus {
    outline: none;
    border-color: #2d72b8;
    box-shadow: 0 0 0 3px rgba(45,114,184,0.15);
}

/* ---------- Botones ---------- */
.btn {
    display: inline-block;
    padding: 10px 18px;
    border: 0;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 14px;
    text-decoration: none;
    transition: opacity .15s ease;
}
.btn:hover { opacity: .9; }
.btn-primario   { background: #1f4e79; color: #ffffff; }
.btn-secundario { background: #6c757d; color: #ffffff; }
.btn-aprobar    { background: #2e7d32; color: #ffffff; }
.btn-rechazar   { background: #c62828; color: #ffffff; }
.btn-pequeno    { padding: 5px 10px; font-size: 0.85rem; margin: 2px; }

/* ---------- Tablas ---------- */
.tabla {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    border-radius: 8px;
    overflow: hidden;
}
.tabla th, .tabla td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #eef0f4;
}
.tabla th {
    background: #1f4e79;
    color: #ffffff;
    font-weight: 600;
    font-size: 0.92rem;
}
.tabla tbody tr:hover { background: #f7f9fc; }

/* ---------- Estados ---------- */
.estado {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}
.estado-Pendiente,
.estado-AprobadaJefe,
.estado-EncargadoOK { background: #fff3cd; color: #8a6100; }
.estado-EnProceso   { background: #d8ecf6; color: #155a78; }
.estado-Aprobada,
.estado-Aceptado,
.estado-Aprobado,
.estado-Resuelta    { background: #d4edda; color: #1e6b30; }
.estado-Rechazada,
.estado-Rechazado,
.estado-Anulado     { background: #f8d7da; color: #842029; }

/* ---------- Alertas ---------- */
.alerta {
    padding: 12px 14px;
    margin: 12px 0;
    border-radius: 6px;
    font-size: 0.95rem;
}
.alerta-ok    { background: #d4edda; color: #1e6b30; border: 1px solid #b8dec1; }
.alerta-error { background: #f8d7da; color: #842029; border: 1px solid #f1b0b6; }
.alerta-info  { background: #d8ecf6; color: #155a78; border: 1px solid #b6d8e7; }

/* ---------- Responsivo ---------- */
@media (max-width: 600px) {
    .cabecera { flex-direction: column; align-items: flex-start; }
    .cabecera a { margin: 8px 16px 0 0; }
    .tabla, .tabla thead, .tabla tbody, .tabla tr, .tabla th, .tabla td {
        display: block;
    }
    .tabla thead { display: none; }
    .tabla tr { margin-bottom: 12px; border: 1px solid #e3e7ee; border-radius: 6px; }
    .tabla td  { border-bottom: 1px dashed #eef0f4; }
    .tabla td:before {
        content: attr(data-label);
        font-weight: 600;
        display: inline-block;
        width: 130px;
        color: #1f4e79;
    }
}
