/* ==========================================================================
   Acceso a la aplicación de gestión
   ========================================================================== */

:root {
    --ink: #102433;
    --ink-2: #334155;
    --muted: #64748b;
    --line: #dbe4ea;
    --brand: #0d9488;
    --brand-dark: #04211e;
    --bad: #b42342;
    --shadow: 0 24px 70px -18px rgba(4, 33, 30, .55);
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--ink);
    background:
        radial-gradient(900px 500px at 15% 10%, rgba(45, 212, 191, .22), transparent 60%),
        radial-gradient(760px 540px at 90% 90%, rgba(20, 184, 166, .16), transparent 55%),
        linear-gradient(150deg, #0b2530 0%, #0d3340 48%, #071b24 100%);
    background-attachment: fixed;
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 18px 20px 54px;
}

.login-wrap { width: min(420px, 100%); }

.login-card {
    background: #fff;
    border-radius: 18px;
    padding: 28px 30px 24px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, .7);
    animation: enter .28s ease-out;
}

@keyframes enter {
    from { opacity: 0; transform: translateY(10px) scale(.99); }
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 18px;
    border-bottom: 1px solid #eef3f6;
}

.login-mark {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    color: var(--brand-dark);
    background: linear-gradient(145deg, #5eead4, #2dd4bf 55%, #0d9488);
    box-shadow: 0 8px 18px -6px rgba(13, 148, 136, .65);
    flex: none;
}

.login-mark svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.login-brand div { display: flex; flex-direction: column; line-height: 1.2; }
.login-brand strong { font-size: 18px; letter-spacing: .1px; }
.login-brand span {
    font-size: 10.5px;
    color: var(--muted);
    letter-spacing: .7px;
    text-transform: uppercase;
    margin-top: 2px;
}

.login-head { margin: 22px 0 18px; }
.login-head h1 { margin: 0; font-size: 24px; letter-spacing: -.4px; }
.login-head p { margin: 6px 0 0; font-size: 13px; line-height: 1.5; color: var(--muted); }

.login-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.login-field label { font-size: 11.5px; font-weight: 650; color: var(--ink-2); }

.login-field input {
    height: 44px;
    padding: 0 13px;
    border: 1px solid var(--line);
    border-radius: 10px;
    font-size: 14px;
    color: var(--ink);
    background: #fbfdfe;
    outline: none;
    transition: border-color .15s, box-shadow .15s, background .15s;
}

.login-field input:focus {
    border-color: #2dd4bf;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(45, 212, 191, .18);
}

.login-error {
    margin: 0 0 13px;
    padding: 9px 11px;
    border-radius: 8px;
    background: #fff1f4;
    border: 1px solid #f6c9d4;
    color: var(--bad);
    font-size: 12px;
    line-height: 1.4;
}

.login-submit {
    position: relative;
    width: 100%;
    height: 44px;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(145deg, #14b8a6, #0d9488);
    color: #fff;
    font-size: 14px;
    font-weight: 650;
    letter-spacing: .2px;
    cursor: pointer;
    box-shadow: 0 10px 22px -10px rgba(13, 148, 136, .9);
    transition: transform .12s, box-shadow .15s, opacity .15s;
}

.login-submit:hover { transform: translateY(-1px); box-shadow: 0 14px 26px -10px rgba(13, 148, 136, .95); }
.login-submit:active { transform: translateY(0); }
.login-submit:disabled { cursor: progress; opacity: .7; }

.login-spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, .45);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .7s linear infinite;
    position: absolute;
    right: 14px;
    top: 14px;
}

.login-submit.is-loading .login-spinner { display: block; }

@keyframes spin { to { transform: rotate(360deg); } }

.login-hint {
    margin: 18px 0 0;
    padding-top: 15px;
    border-top: 1px solid #eef3f6;
    color: var(--muted);
    font-size: 11.5px;
    line-height: 1.5;
    text-align: center;
}

.login-hint b { color: var(--ink-2); font-weight: 650; }

.login-cookies {
    display: flex;
    gap: 9px;
    margin: 14px 0 0;
    padding: 11px 12px;
    border: 1px solid #e6eef2;
    border-radius: 10px;
    background: #f7fafb;
    color: var(--muted);
    font-size: 10.5px;
    line-height: 1.5;
}

.login-cookies svg {
    width: 16px;
    height: 16px;
    flex: none;
    margin-top: 1px;
    fill: none;
    stroke: var(--brand);
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ---------- Firma de la aplicación (esquina inferior izquierda) ---------- */

.app-signature {
    position: fixed;
    left: 14px;
    bottom: 12px;
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding: 6px 10px 6px 9px;
    border-left: 2px solid rgba(45, 212, 191, .75);
    border-radius: 4px 8px 8px 4px;
    background: rgba(4, 21, 27, .55);
    backdrop-filter: blur(4px);
    color: #d7e9ee;
    pointer-events: none;
    user-select: none;
    line-height: 1.3;
}

.app-signature-title { font-size: 10.5px; font-weight: 700; letter-spacing: .2px; }
.app-signature-author { font-size: 9.5px; font-weight: 500; letter-spacing: .35px; color: #8fb9c4; }

@media (max-width: 560px) {
    .app-signature {
        left: 8px;
        bottom: 8px;
        padding: 4px 8px 4px 7px;
    }
    .app-signature-title { font-size: 9.5px; }
    .app-signature-author { font-size: 8.5px; }
}

@media (max-width: 460px) {
    body { padding: 12px 12px 56px; }
    .login-card { padding: 22px 20px 20px; border-radius: 15px; }
    .login-head h1 { font-size: 21px; }
}
