/* =====================================================================
   auth/auth.css
   Estilos compartidos para login.php, olvido_password.php y
   cambiar_password.php. Reutiliza la paleta y el fondo de la web
   principal (cpd.avif + logo.png).
   ===================================================================== */

:root {
    --navy:       #003366;
    --navy-dark:  #001f3f;
    --orange:     #FF6600;
    --orange-dk:  #d65500;
    --text-main:  #2d3748;
    --text-light: #718096;
    --danger:     #b00020;
    --ok:         #0a7c2f;
    --radius:     14px;
    --shadow:     0 20px 50px rgba(0, 0, 0, 0.25);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    font-family: 'Segoe UI', system-ui, -apple-system, Arial, sans-serif;
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
}

body {
    position: relative;
    display: grid;
    place-items: center;
    padding: 2rem 1rem;
    background:
        linear-gradient(180deg, rgba(0, 20, 45, 0.70) 0%, rgba(0, 20, 45, 0.92) 100%),
        url('../cpd.avif') center/cover no-repeat fixed;
}

/* Tarjeta de cristal */
.auth-card {
    width: min(420px, 100%);
    background: rgba(255, 255, 255, 0.96);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 2.25rem 2rem 1.75rem;
    animation: fadeUp 0.4s ease both;
    backdrop-filter: blur(8px);
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Logo */
.auth-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 1.25rem;
}
.auth-logo img {
    height: 64px;
    width: auto;
    object-fit: contain;
}

/* Tipografia */
.auth-card h1 {
    margin: 0 0 1.25rem;
    font-size: 1.35rem;
    color: var(--navy);
    text-align: center;
    font-weight: 600;
}
.auth-card .meta {
    margin: -0.5rem 0 1rem;
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
}
.auth-card .hint {
    margin: 0.6rem 0 0;
    font-size: 0.85rem;
    color: var(--text-light);
    line-height: 1.45;
}

/* Inputs */
.auth-card label {
    display: block;
    margin: 0.85rem 0 0.3rem;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--navy-dark);
}
.auth-card input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]) {
    width: 100%;
    padding: 0.7rem 0.85rem;
    border: 1px solid #d0d7de;
    border-radius: 8px;
    font: inherit;
    background: #f8fafc;
    color: var(--text-main);
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.auth-card input:focus {
    outline: none;
    border-color: var(--orange);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(255, 102, 0, 0.18);
}
.auth-card input[readonly] {
    font-family: Consolas, 'Courier New', monospace;
    text-align: center;
    font-size: 1.05rem;
    letter-spacing: 0.05em;
    background: #fff8f0;
    border-color: var(--orange);
    color: var(--navy-dark);
    cursor: text;
}

/* Boton primario */
.auth-card button {
    margin-top: 1.4rem;
    width: 100%;
    padding: 0.8rem 1rem;
    background: var(--orange);
    color: #fff;
    border: 0;
    border-radius: 10px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
}
.auth-card button:hover {
    background: var(--orange-dk);
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(255, 102, 0, 0.25);
}
.auth-card button:active {
    transform: translateY(0);
    box-shadow: none;
}

/* Mensajes */
.auth-card .err {
    margin: 0.8rem 0 0;
    padding: 0.55rem 0.75rem;
    background: #fde8ea;
    border-left: 3px solid var(--danger);
    color: var(--danger);
    font-size: 0.9rem;
    border-radius: 6px;
}
.auth-card .ok {
    margin: 0.8rem 0 0;
    padding: 0.55rem 0.75rem;
    background: #e6f5ec;
    border-left: 3px solid var(--ok);
    color: var(--ok);
    font-size: 0.95rem;
    border-radius: 6px;
}

/* Enlaces inferiores */
.auth-card .links {
    margin-top: 1.2rem;
    text-align: center;
    font-size: 0.88rem;
}
.auth-card .links a {
    color: var(--navy);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s;
}
.auth-card .links a:hover {
    color: var(--orange);
    text-decoration: underline;
}
.auth-card .links .sep {
    color: #cbd5e0;
    margin: 0 0.4rem;
}

/* Pie con copyright sutil */
.auth-foot {
    position: fixed;
    bottom: 10px;
    left: 0;
    right: 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    pointer-events: none;
}
