/****************************************************************************************
 * PymeSoft Framework - Autenticación
 * Archivo : ps-auth.css
 * Versión : 1.0.0
 ****************************************************************************************/

:root {
    --ps-red: #ed0016;
    --ps-red-dark: #c90011;
    --ps-blue: #061b3a;
    --ps-blue-soft: #0c3a72;
    --ps-bg: #edf2f7;
    --ps-border: #dce6f0;
    --ps-muted: #64748b;
    --ps-white: #ffffff;
}

* { box-sizing: border-box; }

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

.ps-auth-body {
    min-height: 100vh;
    margin: 0;
    background: var(--ps-bg);
    color: var(--ps-blue);
    font-family: "Segoe UI", Arial, sans-serif;
}

.ps-auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(380px, 1.05fr) minmax(430px, .95fr);
}

.ps-auth-visual {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    padding: clamp(42px, 7vw, 88px);
    background:
        radial-gradient(circle at 20% 20%, rgba(255,255,255,.11), transparent 32%),
        linear-gradient(145deg, #061b3a 0%, #0b2d59 48%, #ed0016 140%);
}

.ps-auth-visual::before,
.ps-auth-visual::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.12);
}

.ps-auth-visual::before {
    width: 420px;
    height: 420px;
    right: -120px;
    top: -90px;
}

.ps-auth-visual::after {
    width: 620px;
    height: 620px;
    left: -310px;
    bottom: -340px;
}

.ps-auth-visual__content {
    position: relative;
    z-index: 2;
    max-width: 620px;
    color: #fff;
}

.ps-auth-brandmark {
    margin-bottom: 20px;
    color: rgba(255,255,255,.75);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 4px;
}

.ps-auth-visual h1 {
    margin: 0 0 16px;
    font-size: clamp(44px, 5vw, 70px);
    font-weight: 900;
    line-height: .98;
    letter-spacing: -2px;
}

.ps-auth-visual p {
    max-width: 520px;
    margin: 0;
    color: rgba(255,255,255,.8);
    font-size: 18px;
    line-height: 1.6;
}

.ps-auth-badge {
    width: max-content;
    margin-top: 28px;
    padding: 9px 14px;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 999px;
    background: rgba(255,255,255,.08);
    backdrop-filter: blur(8px);
    font-size: 13px;
    font-weight: 800;
}

.ps-auth-badge i { margin-right: 7px; }

.ps-auth-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 36px;
    background: #f8fafc;
}

.ps-auth-card {
    width: min(100%, 480px);
    padding: 34px;
    border: 1px solid var(--ps-border);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 28px 75px rgba(15, 23, 42, .11);
}

.ps-auth-logo-wrap {
    min-height: 74px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.ps-auth-logo {
    display: block;
    max-width: 190px;
    max-height: 74px;
    object-fit: contain;
}

.ps-auth-heading { margin-bottom: 26px; }
.ps-auth-heading--center { text-align: center; }
.ps-auth-heading span {
    color: var(--ps-red);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 1.6px;
}
.ps-auth-heading h2 {
    margin: 5px 0 6px;
    color: var(--ps-blue);
    font-size: 32px;
    font-weight: 900;
}
.ps-auth-heading p {
    margin: 0;
    color: var(--ps-muted);
    font-size: 14px;
}

.ps-auth-field { margin-bottom: 17px; }
.ps-auth-field label {
    display: block;
    margin-bottom: 7px;
    color: var(--ps-blue);
    font-size: 13px;
    font-weight: 900;
}
.ps-auth-field label span { color: var(--ps-red); }

.ps-auth-input-wrap { position: relative; }
.ps-auth-input-wrap > i {
    position: absolute;
    top: 50%;
    left: 15px;
    z-index: 2;
    color: #94a3b8;
    transform: translateY(-50%);
}
.ps-auth-input-wrap input {
    width: 100%;
    height: 50px;
    padding: 0 46px;
    border: 2px solid var(--ps-border);
    border-radius: 12px;
    outline: 0;
    background: #fff;
    color: var(--ps-blue);
    font-size: 15px;
    font-weight: 750;
    transition: border-color .18s ease, box-shadow .18s ease;
}
.ps-auth-input-wrap input:focus {
    border-color: #0054b8;
    box-shadow: 0 0 0 4px rgba(0,84,184,.1);
}

.ps-auth-password-toggle {
    position: absolute;
    top: 50%;
    right: 9px;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #64748b;
    transform: translateY(-50%);
    cursor: pointer;
}
.ps-auth-password-toggle:hover,
.ps-auth-password-toggle:focus {
    background: #eef2f7;
    color: var(--ps-blue);
    outline: 0;
}

.ps-auth-options {
    display: flex;
    justify-content: space-between;
    margin: 4px 0 22px;
}
.ps-auth-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: var(--ps-muted);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}
.ps-auth-check input { accent-color: var(--ps-red); }

.ps-auth-submit {
    width: 100%;
    min-height: 50px;
    padding: 0 18px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--ps-red-dark), var(--ps-red));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-weight: 900;
    box-shadow: 0 12px 24px rgba(237,0,22,.2);
    cursor: pointer;
    transition: transform .16s ease, box-shadow .16s ease;
}
.ps-auth-submit:hover,
.ps-auth-submit:focus {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 16px 28px rgba(237,0,22,.25);
    outline: 0;
}
.ps-auth-submit:disabled {
    opacity: .7;
    cursor: wait;
    transform: none;
}

.ps-auth-footer {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #edf2f7;
    display: flex;
    justify-content: space-between;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 800;
}

.ps-auth-shell--password {
    display: block;
    background:
        radial-gradient(circle at top left, rgba(237,0,22,.08), transparent 35%),
        linear-gradient(160deg, #eef3f8 0%, #f8fafc 100%);
}
.ps-auth-panel--center { min-height: 100vh; }
.ps-auth-card--password { max-width: 520px; }
.ps-auth-lock-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 17px;
    border-radius: 20px;
    background: #fff1f2;
    color: var(--ps-red);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}
.ps-auth-user-summary {
    margin: 0 0 22px;
    padding: 13px 14px;
    border: 1px solid #e6edf5;
    border-radius: 13px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    gap: 12px;
}
.ps-auth-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--ps-blue);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
}
.ps-auth-user-summary strong,
.ps-auth-user-summary small { display: block; }
.ps-auth-user-summary small { color: var(--ps-muted); margin-top: 2px; }
.ps-auth-password-help {
    margin: 4px 0 20px;
    padding: 11px 12px;
    border-radius: 10px;
    background: #eff6ff;
    color: #1e4f91;
    font-size: 12px;
    font-weight: 700;
}
.ps-auth-password-help i { margin-right: 6px; }
.ps-auth-back-link {
    margin-top: 16px;
    color: #526274;
    display: block;
    text-align: center;
    font-size: 13px;
    font-weight: 800;
}

@media (max-width: 900px) {
    .ps-auth-shell { grid-template-columns: 1fr; }
    .ps-auth-visual { display: none; }
    .ps-auth-panel { min-height: 100vh; padding: 22px; }
}

@media (max-width: 520px) {
    .ps-auth-panel { padding: 14px; }
    .ps-auth-card { padding: 25px 20px; border-radius: 18px; }
    .ps-auth-heading h2 { font-size: 28px; }
}

/* -------------------------------------------------------------------------
   Ajustes v1.1 - mejor legibilidad + portada de acceso
   ------------------------------------------------------------------------- */
.ps-auth-heading span { font-size: 12px; }
.ps-auth-heading h2 { font-size: 35px; }
.ps-auth-heading p { font-size: 16px; line-height: 1.5; }
.ps-auth-field label { font-size: 14px; }
.ps-auth-input-wrap input { height: 54px; font-size: 16px; }
.ps-auth-check { font-size: 14px; }
.ps-auth-submit { min-height: 54px; font-size: 15px; }
.ps-auth-footer { font-size: 12px; }

.ps-auth-login-links {
    margin-top: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.ps-auth-login-links a {
    color: #0054b8;
    font-size: 13px;
    font-weight: 850;
    text-decoration: none;
}
.ps-auth-login-links a:hover { text-decoration: underline; }
.ps-auth-login-links i { margin: 0 4px; }

.ps-auth-entry {
    min-height: 100vh;
    padding: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 10% 10%, rgba(237,0,22,.08), transparent 30%),
        linear-gradient(145deg, #eef3f8 0%, #f8fafc 100%);
}
.ps-auth-entry__card {
    width: min(100%, 620px);
    padding: 36px;
    border: 1px solid var(--ps-border);
    border-radius: 26px;
    background: #fff;
    box-shadow: 0 28px 75px rgba(15,23,42,.12);
    text-align: center;
}
.ps-auth-entry__logo { max-width: 190px; max-height: 72px; object-fit: contain; }
.ps-auth-entry__eyebrow { display:block; margin-top:16px; color:var(--ps-red); font-size:12px; font-weight:950; letter-spacing:1.5px; }
.ps-auth-entry h1 { margin:5px 0 7px; color:var(--ps-blue); font-size:36px; font-weight:950; }
.ps-auth-entry p { margin:0 0 24px; color:var(--ps-muted); font-size:16px; }
.ps-auth-entry__actions { display:grid; gap:12px; text-align:left; }
.ps-auth-entry__button {
    min-height: 78px;
    padding: 14px 16px;
    border-radius: 15px;
    display:grid;
    grid-template-columns: 42px 1fr auto;
    align-items:center;
    gap:12px;
    text-decoration:none;
    transition:transform .16s ease, box-shadow .16s ease;
}
.ps-auth-entry__button:hover { transform:translateY(-1px); text-decoration:none; }
.ps-auth-entry__button > i:first-child { font-size:22px; text-align:center; }
.ps-auth-entry__button strong,.ps-auth-entry__button small { display:block; }
.ps-auth-entry__button strong { font-size:15px; font-weight:950; }
.ps-auth-entry__button small { margin-top:3px; font-size:12px; opacity:.78; }
.ps-auth-entry__button--primary { background:linear-gradient(135deg,var(--ps-red-dark),var(--ps-red)); color:#fff; box-shadow:0 12px 24px rgba(237,0,22,.18); }
.ps-auth-entry__button--primary:hover { color:#fff; box-shadow:0 16px 28px rgba(237,0,22,.24); }
.ps-auth-entry__button--secondary { border:2px solid #dce6f0; background:#f8fafc; color:#061b3a; }
.ps-auth-entry__button--secondary:hover { color:#061b3a; border-color:#b9cae0; box-shadow:0 12px 24px rgba(15,23,42,.07); }
.ps-auth-entry__footer { margin-top:22px; padding-top:15px; border-top:1px solid #edf2f7; color:#94a3b8; font-size:12px; font-weight:800; }

@media(max-width:600px){
    .ps-auth-entry{padding:16px;}
    .ps-auth-entry__card{padding:26px 20px;}
    .ps-auth-entry h1{font-size:31px;}
    .ps-auth-login-links{align-items:flex-start;flex-direction:column;}
}

/* v1.2 - Ajustes finales de acceso */
.ps-auth-heading span { font-size: 13px; }
.ps-auth-heading h2 { font-size: 35px; }
.ps-auth-heading p { font-size: 16px; }
.ps-auth-field label { font-size: 14px; }
.ps-auth-input-wrap input { height: 54px; font-size: 16px; }
.ps-auth-check { font-size: 14px; }
.ps-auth-submit { min-height: 54px; font-size: 16px; }
.ps-auth-footer { font-size: 12px; }
.ps-auth-direct-picking {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 15px;
    color: #526274;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}
.ps-auth-direct-picking:hover,
.ps-auth-direct-picking:focus { color: #0054b8; text-decoration: none; }
