/* style_login.css (Login split like example) */

:root {
    --bg: #ffffff;
    --page: #f5f7fb;
    --text: #0f172a;
    --muted: #64748b;
    --border: #e2e8f0;
    --brand: #005587;
    --brand-dark: #003452;
    --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

* {
    box-sizing: border-box;
}
html,
body {
    height: 100%;
}
body {
    margin: 0;
    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Arial,
        sans-serif;
    background: var(--page);
    color: var(--text);
}

/* Layout */
.login-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px;
}

.login-layout {
    width: 100%;
    max-width: 1240px;
    min-height: 720px;
    display: grid;
    grid-template-columns: 520px 1fr;
    gap: 28px;
    align-items: stretch;
}

/* Left */
.login-left {
    display: flex;
    flex-direction: column;
    align-items: center; /* ← centra horizontalmente */
    padding-top: 40px;
    gap: 24px;
}

.login-brand {
    width: 100%;
    display: flex;
    justify-content: center; /* ← centra el logo */
}

.login-logo {
    width: 190px;
    height: auto;
    display: block;
}

.login-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow);
    padding: 26px;
    max-width: 480px; /* ← controla ancho visual del card */
}

.login-title {
    text-align: center;
    font-size: 22px;
    font-weight: 800;
    margin: 0 0 6px 0;
    margin-top: 10px;
}

.login-subtitle {
    text-align: center;
    margin: 0 0 10px 0;
    color: var(--muted);
    font-size: 13px;
}

/* Inputs */
.form-label {
    font-size: 12px;
    font-weight: 700;
    color: #111827;
}

.login-input {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 11px 12px;
    font-size: 14px;
    outline: none;
    box-shadow: none !important;
}

.login-input:focus {
    border-color: rgba(252, 71, 30, 0.55);
    box-shadow: 0 0 0 4px rgba(252, 71, 30, 0.1) !important;
}

.password-wrap {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    cursor: pointer;
}

.toggle-password:hover {
    background: rgba(15, 23, 42, 0.05);
}

.toggle-password .eye {
    display: block;
    width: 18px;
    height: 18px;
    margin: 0 auto;
    background: #94a3b8;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 5c-7.633 0-11 7-11 7s3.367 7 11 7 11-7 11-7-3.367-7-11-7Zm0 12a5 5 0 1 1 0-10 5 5 0 0 1 0 10Zm0-2.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5Z'/%3E%3C/svg%3E")
        no-repeat center / contain;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 5c-7.633 0-11 7-11 7s3.367 7 11 7 11-7 11-7-3.367-7-11-7Zm0 12a5 5 0 1 1 0-10 5 5 0 0 1 0 10Zm0-2.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5Z'/%3E%3C/svg%3E")
        no-repeat center / contain;
}

.toggle-password.is-on .eye {
    background: var(--brand);
}

/* Errors */
.field-error {
    margin-top: 6px;
    font-size: 12px;
    font-weight: 700;
    color: #ef4444;
    display: none;
}
.field-error.show {
    display: block;
}

.login-hint {
    margin-top: 6px;
    font-size: 12px;
    color: var(--muted);
}

.login-link {
    font-size: 12px;
    font-weight: 700;
    color: var(--brand);
    text-decoration: none;
}
.login-link:hover {
    color: var(--brand-dark);
}

.login-remember {
    font-size: 13px;
    color: var(--muted);
    font-weight: 600;
}

/* Button */
.login-btn {
    width: 100%;
    border: 0;
    border-radius: 10px;
    background: var(--brand);
    color: #fff;
    padding: 12px 14px;
    font-weight: 800;
    font-size: 14px;
    cursor: pointer;
    position: relative;
    transition:
        background 0.15s ease,
        transform 0.05s ease;
}

.login-btn:hover {
    background: var(--brand-dark);
}
.login-btn:active {
    transform: translateY(1px);
}

.login-btn.loading {
    pointer-events: none;
    opacity: 0.8;
}

.btn-text {
    transition: opacity 0.15s ease;
}
.btn-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: #fff;
    opacity: 0;
    animation: spin 1s linear infinite;
}
.login-btn.loading .btn-text {
    opacity: 0;
}
.login-btn.loading .btn-loader {
    opacity: 1;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.login-legal {
    margin-top: 16px;
    text-align: center;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}
.login-legal a {
    color: var(--brand);
    text-decoration: none;
    font-weight: 800;
}
.login-legal a:hover {
    color: var(--brand-dark);
}

/* Right hero */
.login-right {
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-hero {
    width: 100%;
    height: 100%;
    min-height: 720px;
    border-radius: 22px;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0) 35%,
        rgba(252, 71, 30, 0.15) 100%
    );
}

/* Responsive */
@media (max-width: 992px) {
    .login-layout {
        grid-template-columns: 1fr;
        max-width: 560px;
        min-height: auto;
    }
    .login-right {
        display: none;
    }
    .login-left {
        padding-left: 0;
    }
}
