/* ── AquiCargo Custom Login Page ──────────────────────────────────────────── */
/* Replaces WP default login with a split-panel professional layout.          */
/* Left: dark navy panel with value prop + rotating social proof.             */
/* Right: clean white form, minimal, trustworthy.                             */

/* ── Reset WP login defaults ─────────────────────────────────────────────── */
html { height: 100%; }

body.aqc-login-page {
    background: #000C25;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    display: flex;
    flex-direction: row-reverse; /* panel injected after #login, reverse puts it left */
    align-items: stretch;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

/* ── Left panel ──────────────────────────────────────────────────────────── */
.aqc-login-panel {
    width: 42%;
    min-height: 100vh;
    background: linear-gradient(160deg, #000C25 0%, #0B1D3A 60%, #120a2e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 40px;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

/* Subtle geometric background decoration */
.aqc-login-panel::before {
    content: '';
    position: absolute;
    top: -80px; right: -80px;
    width: 320px; height: 320px;
    border-radius: 50%;
    background: rgba(175,7,18,.08);
    pointer-events: none;
}
.aqc-login-panel::after {
    content: '';
    position: absolute;
    bottom: -60px; left: -60px;
    width: 240px; height: 240px;
    border-radius: 50%;
    background: rgba(29,78,216,.06);
    pointer-events: none;
}

.aqc-login-panel__inner {
    max-width: 340px;
    width: 100%;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* Logo */
.aqc-login-panel__logo {
    font-size: 24px;
    font-weight: 900;
    color: #fff;
    text-decoration: none;
    letter-spacing: -.03em;
}
.aqc-login-panel__logo span { color: #FF3B30; }

/* Headline */
.aqc-login-panel__headline h1 {
    font-size: 32px;
    font-weight: 900;
    color: #fff;
    margin: 0 0 10px;
    letter-spacing: -.03em;
    line-height: 1.1;
}
.aqc-login-panel__headline p {
    font-size: 15px;
    color: rgba(255,255,255,.55);
    margin: 0;
    line-height: 1.6;
}

/* Trust badges */
.aqc-login-panel__badges {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.aqc-login-panel__badges span {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255,255,255,.65);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Rotating quote */
.aqc-login-panel__quote {
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.08);
    border-left: 3px solid #AF0712;
    border-radius: 0 8px 8px 0;
    padding: 16px 18px;
    position: relative;
}
.aqc-login-panel__quote-text {
    font-size: 13px;
    color: rgba(255,255,255,.80);
    line-height: 1.6;
    font-style: italic;
    margin: 0 0 10px;
    min-height: 60px;
    transition: opacity .4s ease;
}
.aqc-login-panel__quote-role {
    font-size: 11px;
    font-weight: 700;
    color: rgba(255,255,255,.35);
    letter-spacing: .05em;
    text-transform: uppercase;
}

/* Footer links */
.aqc-login-panel__footer {
    font-size: 13px;
    color: rgba(255,255,255,.35);
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.aqc-login-panel__footer a {
    color: #AF0712;
    text-decoration: none;
    font-weight: 700;
    font-size: 13px;
}
.aqc-login-panel__footer a:hover { text-decoration: underline; }

/* ── Right panel: WP login form ───────────────────────────────────────────── */
#login {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #F8FAFC;
    padding: 48px 32px;
    min-height: 100vh;
}

/* Hide WP logo — we show our own in the left panel */
#login h1 a {
    display: none;
}

/* Form container */
#loginform,
#lostpasswordform,
#registerform {
    background: #fff;
    border: 1.5px solid #E5E7EB;
    border-radius: 16px;
    padding: 36px 36px 28px;
    box-shadow: 0 4px 24px rgba(0,0,0,.06);
    width: 100%;
    max-width: 380px;
    box-sizing: border-box;
    margin-top: 0 !important;
}

/* Form heading — inject via CSS content */
#loginform::before {
    content: 'Iniciar sesión';
    display: block;
    font-size: 22px;
    font-weight: 900;
    color: #000C25;
    letter-spacing: -.02em;
    margin-bottom: 24px;
}

/* Labels */
#loginform label,
#lostpasswordform label {
    font-size: 13px;
    font-weight: 700;
    color: #374151;
    margin-bottom: 6px;
    display: block;
}

/* Inputs */
#loginform input[type="text"],
#loginform input[type="password"],
#loginform input[type="email"],
#lostpasswordform input[type="text"],
#lostpasswordform input[type="email"] {
    width: 100% !important;
    box-sizing: border-box;
    padding: 11px 14px;
    font-size: 15px;
    border: 1.5px solid #E5E7EB;
    border-radius: 8px;
    outline: none;
    transition: border-color .2s;
    background: #fff;
    color: #111827;
    height: auto;
}
#loginform input[type="text"]:focus,
#loginform input[type="password"]:focus,
#lostpasswordform input[type="text"]:focus {
    border-color: #000C25;
    box-shadow: 0 0 0 3px rgba(0,12,37,.08);
}

/* Submit button */
#loginform input[type="submit"],
#lostpasswordform input[type="submit"],
.button-primary {
    width: 100% !important;
    background: linear-gradient(135deg, #AF0712, #FF3B30) !important;
    border: none !important;
    border-radius: 8px !important;
    color: #fff !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    padding: 13px !important;
    cursor: pointer !important;
    transition: opacity .15s !important;
    height: auto !important;
    text-shadow: none !important;
    box-shadow: 0 2px 8px rgba(175,7,18,.25) !important;
    margin-top: 8px;
}
#loginform input[type="submit"]:hover,
#lostpasswordform input[type="submit"]:hover {
    opacity: .9 !important;
}

/* Remember me */
#loginform .forgetmenot {
    margin-bottom: 0;
}
#loginform .forgetmenot label {
    font-size: 13px;
    font-weight: 400;
    color: #6B7280;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Login form footer links */
#nav, #backtoblog {
    text-align: center;
    margin-top: 16px;
}
#nav a, #backtoblog a {
    font-size: 13px;
    color: #6B7280;
    text-decoration: none;
}
#nav a:hover, #backtoblog a:hover { color: #AF0712; }

/* Error / notice messages */
#login_error,
.message {
    background: #FEF2F2;
    border: 1px solid #FECACA;
    border-radius: 8px;
    color: #991B1B;
    font-size: 13px;
    padding: 12px 16px;
    margin-bottom: 16px;
    max-width: 380px;
    width: 100%;
    box-sizing: border-box;
}
.message {
    background: #EFF6FF;
    border-color: #BFDBFE;
    color: #1E40AF;
}

/* Small lock badge below form */
#loginform::after {
    content: '🔒 Conexión cifrada · AquiCargo © 2026';
    display: block;
    font-size: 11px;
    color: #9CA3AF;
    text-align: center;
    margin-top: 20px;
}

/* ── Responsive — stack on mobile ────────────────────────────────────────── */
@media (max-width: 768px) {
    body.aqc-login-page {
        /* column (not column-reverse): panel uses order:-1 to appear first.
           column-reverse + html{height:100%} pushes panel above the viewport. */
        flex-direction: column;
    }
    .aqc-login-panel {
        order: -1;          /* render panel above #login regardless of DOM order */
        width: 100%;
        box-sizing: border-box;
        min-height: auto;
        padding: 32px 24px;
    }
    .aqc-login-panel__quote { display: none; }
    .aqc-login-panel__headline h1 { font-size: 24px; }
    #login {
        order: 1;
        min-height: auto;
        padding: 32px 20px;
    }
}
