/* Auth pages (login / register) — Institutional Financial Intelligence.
   Layout split (55% visual / 45% form) and panel padding come from the
   design system layer in css/theme/brand-system.css; this file styles the
   contents of each panel. The visual panel is illustration only, no copy. */

* { box-sizing: border-box; }

body {
    font-family: var(--font-ui);
    background: var(--surface);
    color: var(--text);
    min-height: 100vh;
    margin: 0;
}

.serif { font-family: var(--font-display); }

.auth-card {
    width: 100%;
    min-height: 100vh;
    background: var(--surface);
}

/* ---------- Form panel ---------- */

.form-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--surface);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-icon {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--blue-600), var(--teal-500));
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 16.2px;
    flex: none;
}

.brand-name {
    font-family: var(--font-display);
    font-size: 16.2px;
    font-weight: 700;
    color: var(--heading);
    letter-spacing: -0.01em;
}

h1.title {
    margin: 0 0 8px;
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--heading);
    letter-spacing: -0.02em;
}

.subtitle {
    margin: 0 0 32px;
    max-width: 420px;
    color: var(--text-secondary);
    font-size: 13.5px;
    line-height: 24px;
}

.row-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.forgot-link {
    font-size: 11.7px;
    font-weight: 600;
    color: var(--brand-primary);
    text-decoration: none;
}

.forgot-link:hover { text-decoration: underline; }

/* ---------- Floating label field ---------- */

.floating-group {
    position: relative;
    margin-bottom: 18px;
}

.floating-group .icon-left {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 13.5px;
    transition: color .18s ease;
    z-index: 2;
}

.floating-group .icon-right {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    color: var(--text-muted);
    font-size: 13.5px;
    cursor: pointer;
    background: none;
    border: none;
    border-radius: var(--radius-sm);
    padding: 0;
    z-index: 2;
}

.floating-group .icon-right:hover { color: var(--brand-primary); background: var(--bg-soft); }

.form-control-custom {
    width: 100%;
    padding: 22px 48px 8px 44px;
    border-radius: var(--radius-md);
    border: 1px solid #CBD7E5;
    background: var(--surface);
    font-family: inherit;
    font-size: 12.6px;
    color: var(--text);
    outline: none;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.form-control-custom::placeholder { color: transparent; }

.form-control-custom:focus {
    border-color: var(--blue-500);
    box-shadow: 0 0 0 3px rgba(47, 107, 255, .12);
}

select.form-control-custom { padding-top: 20px; }

.floating-label {
    position: absolute;
    left: 44px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12.6px;
    color: var(--text-muted);
    pointer-events: none;
    transition: top .18s ease, font-size .18s ease, color .18s ease;
}

.form-control-custom:focus + .floating-label,
.form-control-custom:not(:placeholder-shown) + .floating-label,
select.form-control-custom:valid + .floating-label {
    top: 15px;
    font-size: 11px;
    font-weight: 600;
    color: var(--brand-primary);
}

.form-control-custom:focus ~ .icon-left { color: var(--brand-primary); }

/* ---------- Submit ---------- */

.btn-signin {
    width: 100%;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 18px;
    border: none;
    border-radius: var(--radius-md);
    background: var(--brand-primary);
    color: #fff;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background .18s ease, transform .18s ease, box-shadow .18s ease;
}

.btn-signin:hover {
    background: var(--brand-primary-hover);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(33, 87, 229, .24);
}

.btn-signin:disabled { opacity: .7; cursor: not-allowed; transform: none; }

.btn-spinner {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2.5px solid rgba(255, 255, 255, .4);
    border-top-color: #fff;
    animation: spin .7s linear infinite;
    display: none;
    flex: none;
}

.btn-signin.is-submitting .btn-spinner { display: inline-block; }

@keyframes spin { to { transform: rotate(360deg); } }

.footer-note {
    margin-top: 28px;
    text-align: center;
    font-size: 11.7px;
    color: var(--text-secondary);
}

.footer-note a { color: var(--brand-primary); font-weight: 600; text-decoration: none; }
.footer-note a:hover { text-decoration: underline; }

/* ---------- Visual panel (illustration only) ---------- */

.visual-panel {
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: linear-gradient(155deg, #0B3A80 0%, #06245C 48%, #063E4C 100%);
}

/* Real photography carries the panel; a brand scrim keeps the navy/teal tone
   and guarantees contrast for anything laid over it. */
.visual-photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.visual-scrim {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(165deg, rgba(11, 58, 128, .86) 0%, rgba(6, 36, 92, .84) 50%, rgba(6, 62, 76, .88) 100%);
    pointer-events: none;
}

.visual-wave {
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: auto;
}

/* Copy overlay — used on the register panel; the login panel stays wordless. */
.visual-copy {
    position: relative;
    z-index: 1;
    align-self: end;
    max-width: 460px;
    margin: 0 clamp(36px, 5vw, 72px) clamp(56px, 9vh, 96px);
    color: #fff;
}

.visual-label {
    display: inline-block;
    margin-bottom: 14px;
    padding: 5px 12px;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, .12);
    color: #A7DCD9;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.visual-title {
    margin: 0 0 12px;
    font-family: var(--font-display);
    font-size: 27px;
    line-height: 40px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #fff;
}

.quote-text {
    margin: 0;
    color: rgba(255, 255, 255, .82);
    font-size: 13.5px;
    line-height: 24px;
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
    .form-panel { justify-content: flex-start; }
    .subtitle { margin-bottom: 26px; }
}
