/* =====================================================
   1️⃣ VARIABLES
   ===================================================== */

:root {
    --login-bg-gradient: linear-gradient(135deg, #2563eb, #1e40af);

    --card-bg: #ffffff;
    --card-radius: 16px;
    --card-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);

    --input-border: #d1d5db;
    --input-radius: 10px;

    --primary: #2563eb;
    --primary-hover: #1e40af;

    --text-muted: #6b7280;
    --error: #dc2626;
}

/* =====================================================
   2️⃣ BASE
   ===================================================== */

body {
    margin: 0;
    font-family: system-ui, sans-serif;
    background: var(--login-bg-gradient);
}

/* =====================================================
   3️⃣ LAYOUT
   ===================================================== */

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;

    height: 100vh;
    padding: 1rem;
}

/* =====================================================
   4️⃣ CARD
   ===================================================== */

.login-card {
    width: 100%;
    max-width: 360px;

    padding: 2rem;

    background: var(--card-bg);
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);

    text-align: center;

    animation: fadeInUp 0.4s ease;
}

.login-card h1 {
    margin-bottom: 0.5rem;
}

.login-card p {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

/* =====================================================
   5️⃣ INPUTS
   ===================================================== */

.login-card input {
    width: 100%;
    padding: 0.8rem;
    margin-top: 1rem;

    border-radius: var(--input-radius);
    border: 1px solid var(--input-border);

    font-size: 0.95rem;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.login-card input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* =====================================================
   6️⃣ BUTTON
   ===================================================== */

.login-card button {
    width: 100%;
    margin-top: 1.5rem;
    padding: 0.8rem;

    border: none;
    border-radius: var(--input-radius);

    background: var(--primary);
    color: #ffffff;

    font-size: 1rem;
    font-weight: 500;

    cursor: pointer;

    transition:
        background 0.2s ease,
        transform 0.1s ease,
        box-shadow 0.2s ease;
}

.login-card button:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.login-card button:active {
    transform: translateY(0);
}

/* =====================================================
   7️⃣ ERROR MESSAGE
   ===================================================== */

#error {
    margin-top: 1rem;
    color: var(--error);
    font-size: 0.9rem;
}

/* =====================================================
   8️⃣ ANIMATIONS
   ===================================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =====================================================
   GestionManager v2 — anadidos del login
   ===================================================== */

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.login-card .subtitulo { margin-bottom: 18px; }

.mensaje-error {
  min-height: 20px;
  margin-top: 12px;
  color: #dc2626;
  font-size: 14px;
}

.login-container .version {
  margin-top: 16px;
  text-align: center;
  font-size: 12px;
  opacity: .5;
}

#btnEntrar:disabled { opacity: .6; cursor: progress; }
