/* =========================================================
   LOGIN — Centered card layout
   Sumarte · Design System v3
   ========================================================= */

/* ── Body ─────────────────────────────────────────────── */
html:has(.login-body) {
    overflow-x: clip;
}

.login-body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: linear-gradient(145deg, #0e2d52 0%, #17437e 60%, #1a6cb8 100%);
    font-family: 'Arteixo Sans', 'Open Sans', sans-serif;
}

/* ── Wrapper ──────────────────────────────────────────── */
.login-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Left brand panel — not used in this layout */
.login-brand {
    display: none !important;
}

/* =========================================================
   FORM PANEL
   ========================================================= */
.login-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.25rem;
    background: transparent;
    position: relative;
}

.login-panel > *:not(.login-brand-decoration) {
    position: relative;
    z-index: 2;
}

/* ── Logo ─────────────────────────────────────────────── */
.login-mobile-logo {
    display: block;
    width: 260px;
    filter: brightness(0) invert(1);
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 2;
}

/* ── Decorative circles ───────────────────────────────── */
.login-brand-decoration {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.decoration-circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
}

.decoration-circle.c1 {
    width: 340px;
    height: 340px;
    bottom: -80px;
    right: -80px;
    animation: float 7s ease-in-out infinite;
}

.decoration-circle.c2 {
    width: 200px;
    height: 200px;
    top: -40px;
    right: 60px;
    background: rgba(255, 255, 255, 0.04);
    animation: float 9s ease-in-out infinite reverse;
}

.decoration-circle.c3 {
    width: 120px;
    height: 120px;
    top: 55%;
    left: -30px;
    background: rgba(71, 161, 255, 0.1);
    animation: float 6s ease-in-out infinite 1s;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-18px); }
}

/* =========================================================
   FORM CARD
   ========================================================= */
.login-form-wrap {
    width: 100%;
    max-width: 400px;
    background: #ffffff;
    border-radius: 16px;
    padding: 2rem 1.75rem;
    box-shadow: 0 8px 32px rgba(10, 30, 70, 0.25);
    position: relative;
    z-index: 2;
}

/* ── Header ───────────────────────────────────────────── */
.login-form-header {
    margin-bottom: 1rem;
}

.login-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #17437e;
    margin: 0 0 0.4rem;
    line-height: 1.2;
}

.login-subtitle {
    font-size: 0.9rem;
    color: #64748b;
    margin: 0;
}

/* ── Label ────────────────────────────────────────────── */
.login-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.4rem;
    letter-spacing: 0.01em;
}

/* ── Input group ──────────────────────────────────────── */
.login-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.login-input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #17437e;
    font-size: 0.9rem;
    pointer-events: none;
    z-index: 1;
}

.login-control {
    width: 100%;
    height: 46px;
    padding: 0 42px 0 40px;
    border: 1.5px solid #cdd8e8;
    border-radius: 8px;
    font-size: 0.92rem;
    font-family: 'Arteixo Sans', 'Open Sans', sans-serif;
    color: #1e293b;
    background: #f8fafc;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    appearance: none;
    -webkit-appearance: none;
}

.login-control:focus {
    outline: none;
    border-color: #17437e;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(23, 67, 126, 0.12);
}

.login-control::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

/* Select2 inside login */
.login-input-group .select2-container {
    width: 100% !important;
}

.login-input-group .select2-container .select2-selection--single {
    height: 46px;
    border: 1.5px solid #cdd8e8;
    border-radius: 8px;
    background: #f8fafc;
    padding-left: 40px;
    display: flex;
    align-items: center;
}

.login-input-group .select2-container--default.select2-container--focus .select2-selection--single,
.login-input-group .select2-container--default.select2-container--open .select2-selection--single {
    border-color: #17437e;
    box-shadow: 0 0 0 3px rgba(23, 67, 126, 0.12);
}

.login-input-group .select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #1e293b;
    font-size: 0.92rem;
    line-height: 44px;
    padding-left: 0;
}

.login-input-group .select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: #94a3b8;
}

/* ── Eye / password toggle ────────────────────────────── */
.login-eye-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1;
    transition: color 0.2s;
    z-index: 1;
}

.login-eye-btn:hover {
    color: #17437e;
}

/* ── Links ────────────────────────────────────────────── */
.login-link-sm {
    font-size: 0.82rem;
    font-weight: 600;
    color: #17437e;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.2s;
}

.login-link-sm:hover {
    color: #1a6cb8;
    text-decoration: underline;
}

/* ── Primary button ───────────────────────────────────── */
.btn-login {
    width: 100%;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    background: linear-gradient(135deg, #17437e 0%, #1a6cb8 100%);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: 'Arteixo Sans', 'Open Sans', sans-serif;
    letter-spacing: 0.03em;
    cursor: pointer;
    transition: background 0.22s, box-shadow 0.22s, transform 0.15s;
    position: relative;
    overflow: hidden;
}

.btn-login:hover {
    background: linear-gradient(135deg, #0a2847 0%, #17437e 100%);
    box-shadow: 0 6px 20px rgba(23, 67, 126, 0.35);
    transform: translateY(-1px);
}

.btn-login:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(23, 67, 126, 0.2);
}

.btn-login-icon {
    font-size: 0.85rem;
    transition: transform 0.2s;
}

.btn-login:hover .btn-login-icon {
    transform: translateX(3px);
}

/* ── Secondary / back button ──────────────────────────── */
.btn-login-secondary {
    width: 100%;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: transparent;
    color: #17437e;
    border: 1.5px solid #cdd8e8;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    font-family: 'Arteixo Sans', 'Open Sans', sans-serif;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.btn-login-secondary:hover {
    background: #f0f5fa;
    border-color: #17437e;
    color: #0a2847;
}

/* ── Invalid feedback ─────────────────────────────────── */
.login-form-wrap .invalid-feedback {
    font-size: 0.78rem;
    font-weight: 600;
    color: #dc3545;
    margin-top: 0.3rem;
}

/* =========================================================
   LOADER OVERLAY
   ========================================================= */
.login-loader {
    position: fixed;
    inset: 0;
    background: rgba(14, 45, 82, 0.65);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-loader-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.login-loader-inner img {
    width: 230px;
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

.login-spinner {
    width: 58px;
    height: 58px;
    border: 8px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 0.95s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* =========================================================
   ACTIVATE ACCOUNT SECTION
   ========================================================= */
.activate-account-page .activate-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e2e8f0;
    border-top-color: #17437e;
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
    margin: 0 auto 1.25rem;
}
.activate-account-page .activate-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1.25rem;
}
.activate-account-page .activate-icon.success {
    background: #dcfce7;
    color: #16a34a;
}
.activate-account-page .activate-icon.danger {
    background: #fee2e2;
    color: #dc2626;
}
.activate-account-page #resultState .login-title { margin-bottom: 0.5rem; }


/* =========================================================
   MESSAGE SECTION
   ========================================================= */
#messageSection {
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    z-index: 1050;
}

#messageSection .alert {
    border-radius: 0;
    margin: 0;
}

/* =========================================================
   RESPONSIVE — small screens
   ========================================================= */
@media (max-width: 575.98px) {
    .login-panel {
        padding: 1.25rem 0.75rem;
        justify-content: center;
    }

    .login-form-header {
        margin-bottom: 1rem;
    }

    .login-form-wrap {
        padding: 1.5rem 1.25rem;
    }

    .login-title {
        font-size: 1.4rem;
    }
}
