/* ==========================================================================
   BlucherCAT — Login Page
   ========================================================================== */

/* ── Reset / Base ── */
*, *::before, *::after { box-sizing: border-box; }

.login-body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: var(--bc-bg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    display: flex;
    align-items: stretch;
}

/* ── Wrapper ── */
.login-wrapper {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* ── Brand Panel (left) ── */
.login-brand-panel {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: var(--bg-gradiente-onyx);
}


/* Geometric decorative background */
.login-brand-book {
    position: absolute;
    width: 88%;
    max-width: 500px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.login-brand-geo {
    position: absolute;
    inset: 0;
    /* Soft radial glows */
    background:
        radial-gradient(ellipse 70% 55% at 75% 15%, rgba(127, 187, 221, 0.13) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 20% 85%, rgba(0, 30, 70, 0.5) 0%, transparent 55%);
}

/* Ring 1 — large, top-right */
.login-brand-geo::before {
    content: '';
    position: absolute;
    width: 480px;
    height: 480px;
    border-radius: 50%;
    border: 1px solid rgba(127, 187, 221, 0.12);
    top: -160px;
    right: -140px;
}

/* Ring 2 — medium, bottom-left */
.login-brand-geo::after {
    content: '';
    position: absolute;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    border: 1px solid rgba(127, 187, 221, 0.09);
    bottom: -80px;
    left: -60px;
}

/* ── Form Panel (right) ── */
.login-form-panel {
    width: 35%;
    min-height: 100vh;
    flex-shrink: 0;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 40px;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.06);
}

.login-form-container {
    width: 100%;
    max-width: 360px;
}

/* ── Form Header ── */
.login-form-logo {
    display: none; /* visible only on mobile */
}

.login-form-logo img {
    width: 160px;
}

/* ── Inline logo above title (desktop) ── */
.login-inline-logo {
    margin-bottom: 28px;
    display: none;
}

@media (min-width: 901px) {
    .login-inline-logo {
        display: block;
    }
}

.login-inline-logo img {
    width: 150px;
    /* Convert white SVG to brand blue */
    filter: brightness(0) saturate(100%) invert(17%) sepia(91%) saturate(700%) hue-rotate(195deg) brightness(95%) contrast(102%);
}

.login-form-header {
    margin-bottom: 28px;
}

.login-form-header h2 {
    margin: 0 0 6px;
    font-size: 1.5rem;
    font-weight: var(--bc-font-weight-bolder);
    color: var(--bc-primary);
    letter-spacing: -0.01em;
}

.login-form-header p {
    margin: 0;
    font-size: var(--bc-font-size);
    color: var(--bc-text-muted);
}

/* ── Field ── */
.login-field {
    margin-bottom: 20px;
}

.login-field label {
    display: block;
    font-size: 0.8125rem;
    font-weight: var(--bc-font-weight-medium);
    color: var(--bc-text);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* The group itself is the visual "input box" */
.login-input-group {
    display: flex;
    align-items: center;
    height: 46px;
    border: 1.5px solid var(--bc-border);
    border-radius: var(--bc-radius);
    background: var(--bc-bg-white);
    transition: var(--bc-transition);
    padding: 0 12px 0 14px;
    gap: 8px;
}

.login-input-group:focus-within {
    border-color: var(--bc-primary);
    box-shadow: 0 0 0 3px rgba(0, 68, 124, 0.10);
}

.login-input-group > i {
    color: var(--bc-text-muted);
    font-size: 0.875rem;
    flex-shrink: 0;
    pointer-events: none;
}

.login-input-group input {
    flex: 1;
    height: 100%;
    padding: 0;
    border: none;
    background: transparent;
    font-size: var(--bc-font-size);
    color: var(--bc-text);
    outline: none;
    min-width: 0;
    box-shadow: none;
}

.login-input-group input:focus {
    border: none;
    box-shadow: none;
    outline: none;
}

.login-input-group input::placeholder {
    color: var(--bc-text-light);
}

.login-pwd-toggle {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: var(--bc-text-muted);
    font-size: 0.875rem;
    line-height: 1;
    flex-shrink: 0;
    transition: color 0.15s ease;
    display: flex;
    align-items: center;
}

.login-pwd-toggle:hover {
    color: var(--bc-primary);
}

/* ── Captcha ── */
.login-captcha {
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

/* ── Submit Button ── */
.login-submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 46px;
    background: var(--bc-primary);
    color: #fff;
    border: none;
    border-radius: var(--bc-radius);
    font-size: var(--bc-font-size);
    font-weight: var(--bc-font-weight-bold);
    cursor: pointer;
    transition: var(--bc-transition);
    letter-spacing: 0.01em;
}

.login-submit-btn:hover {
    background: var(--bc-primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--bc-shadow-md);
}

.login-submit-btn:active {
    transform: translateY(0);
}

/* ── Validation errors ── */
.login-field-error {
    margin-top: 6px;
    font-size: 0.8rem;
    color: var(--bc-danger);
}

.login-error-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    background: var(--bc-danger-bg);
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: var(--bc-radius);
    color: var(--bc-danger);
    font-size: var(--bc-font-size);
    margin-bottom: 20px;
}

/* ── Footer link ── */
.login-footer {
    margin-top: 24px;
    text-align: center;
    font-size: var(--bc-font-size);
    color: var(--bc-text-muted);
}

.login-footer a {
    color: var(--bc-primary);
    font-weight: var(--bc-font-weight-medium);
    text-decoration: none;
    transition: var(--bc-transition);
}

.login-footer a:hover {
    color: var(--bc-primary-hover);
    text-decoration: underline;
}

/* ── Responsive ── */
@media (max-width: 900px) {
    .login-wrapper {
        flex-direction: column;
    }
    .login-brand-panel {
        display: none;
    }
    .login-form-panel {
        width: 100%;
        min-height: 100vh;
        box-shadow: none;
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        padding: 0;
    }
    .login-form-logo {
        display: flex;
        align-items: center;
        justify-content: center;
        background: var(--bc-primary);
        padding: 28px 24px;
        width: 100%;
        flex-shrink: 0;
    }
    .login-form-logo img {
        width: 160px;
        max-width: 60%;
    }
    .login-form-container {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
        max-width: 460px;
        margin: 0 auto;
        width: 100%;
        padding: 36px 24px 48px;
    }
}

@media (max-width: 480px) {
    .login-form-container {
        padding: 28px 20px 40px;
    }
}
