:root {
    --blob-a: rgba(14, 165, 233, 0.2);
    --blob-b: rgba(79, 70, 229, 0.2);
}

/* ── Body ─────────────────────────────────────────────────────────────────── */
body {
    font-family: var(--font-primary);
    background: var(--clr-background);
    color: var(--clr-text-primary);
    min-height: 100dvh;
    overflow-x: hidden;
    display: block;
    padding: 0;
}

/* ── Root layout: split panel ─────────────────────────────────────────────── */
.login-root {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100dvh;
}

/* ════════════════════════════════════════════════════════════
   LEFT PANEL — Brand
════════════════════════════════════════════════════════════ */
.LogoDiv>.logo-name {
    font-size: 1.5rem;
}

.brand-panel {
    position: relative;
    background: linear-gradient(160deg, #0D1524 0%, #131F33 60%, #0a1520 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3rem 3.5rem;
    overflow: hidden;
    min-height: 100dvh;
}

.bp-brand {
    position: relative;
    z-index: 10;
}

/* Grid texture */
.bp-grid {
    position: absolute;
    inset: 0;
    z-index: 1;
    background-image:
        linear-gradient(rgba(49, 46, 129, 0.3) 1px, transparent 1px),
        linear-gradient(90deg, rgba(49, 46, 129, 0.3) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
}

/* Ambient blobs */
.bp-blob {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(70px);
}

.bp-blob--a {
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, var(--blob-a), transparent);
    top: -60px;
    right: -80px;
    animation: blobFloat 12s ease-in-out infinite;
}

.bp-blob--b {
    width: 260px;
    height: 260px;
    background: radial-gradient(circle, var(--blob-b), transparent);
    bottom: -40px;
    left: -60px;
    animation: blobFloat 16s ease-in-out infinite reverse;
}

@keyframes blobFloat {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(20px, 20px);
    }
}

/* Logo row */
.bp-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 3rem;
}

.bp-logo svg {
    flex-shrink: 0;
}

.bp-logo-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.bp-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: #E8EFF8;
    letter-spacing: -0.02em;
    line-height: 1;
}

.bp-name em {
    font-style: normal;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bp-tagline {
    font-size: 0.7rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.35);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* Headline */
.bp-headline {
    font-size: clamp(1.8rem, 2.8vw, 2.5rem);
    font-weight: 800;
    color: #E8EFF8;
    line-height: 1.2;
    letter-spacing: -0.03em;
    margin-bottom: 1.1rem;
}

.bp-hl {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bp-desc {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.45);
    line-height: 1.7;
    max-width: 360px;
    margin-bottom: 2rem;
}

/* Role pills */
.bp-roles {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.bp-role {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--c);
    background: color-mix(in srgb, var(--c) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--c) 25%, transparent);
    transition: var(--transition);
}

.bp-role:hover {
    background: color-mix(in srgb, var(--c) 20%, transparent);
}

.bp-role i {
    font-size: 0.7rem;
}

/* ════════════════════════════════════════════════════════════
   RIGHT PANEL — Form
════════════════════════════════════════════════════════════ */
.form-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--clr-background);
    padding: 2rem;
    min-height: 100dvh;
    position: relative;
}

.form-inner {
    width: 100%;
    max-width: 400px;
    animation: slideUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile logo */
.mobile-logo {
    display: none;
    margin-bottom: 2rem;
}

/* Header */
.form-header {
    margin-bottom: 2rem;
}

.form-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--clr-text-primary);
    margin-bottom: 0.4rem;
    line-height: 1.1;
}

.form-subtitle {
    font-size: 0.875rem;
    color: var(--clr-text-secondary);
}

/* Form */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    margin-bottom: 1.5rem;
    filter: none;
}

/* Field group */
.field-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.field-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--clr-text-secondary);
    letter-spacing: 0.01em;
}

.field-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.field-icon {
    position: absolute;
    left: 1rem;
    color: var(--clr-text-muted);
    font-size: 1rem;
    z-index: 2;
    pointer-events: none;
    transition: color 0.2s;
}

/* Focus — colour the icon */
.field-wrap:focus-within .field-icon {
    color: var(--clr-accent-primary);
}

.field-wrap input[type="email"],
.field-wrap input[type="password"],
.field-wrap input[type="text"] {
    width: 100%;
    padding: 0.9rem 0.9rem 0.9rem 2.8rem;
    font-size: 1rem;
}

/* Password toggle button */
.pw-toggle {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: var(--clr-text-muted);
    cursor: pointer;
    padding: 4px;
    font-size: 0.9rem;
    line-height: 1;
    transition: color 0.2s;
    z-index: 2;
}

.pw-toggle:hover {
    color: var(--clr-accent-primary);
}

/* Make password input not overlap with toggle */
.field-wrap input[type="password"],
.field-wrap input[type="text"] {
    padding-right: 2.8rem;
}

/* Submit button */
.login-button {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 1rem;
    background: var(--gradient);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: var(--font-primary);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    margin-top: 0.4rem;
    letter-spacing: 0.01em;
}

.login-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px var(--clr-shadow);
}

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

.login-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.button-text {
    position: relative;
    z-index: 1;
}

.btn-arrow {
    position: relative;
    z-index: 1;
    font-size: 0.8rem;
    transition: transform 0.2s;
}

.login-button:hover .btn-arrow {
    transform: translateX(4px);
}

/* Footer */
.form-footer {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid var(--clr-border);
}

.form-footer p {
    font-size: 0.875rem;
    color: var(--clr-text-secondary);
}

.signup-link {
    color: var(--clr-accent-primary);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
}

.signup-link:hover {
    color: var(--clr-accent-secondary);
}

/* ── Theme toggle placement override ──────────────────────────────────────── */
.theme-switcher {
    top: 1.2rem;
    right: 1.2rem;
    z-index: 200;
}

/* ═════════════════════════════════ RESPONSIVE ═════════════════════════════════ */
@media (max-width: 900px) {
    .login-root {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
    }

    .brand-panel {
        display: none;
    }

    .form-panel {
        min-height: 100dvh;
        padding: 5rem 1.5rem 2rem;
        align-items: flex-start;
    }

    .form-inner {
        max-width: 100%;
    }

    .mobile-logo {
        display: flex;
    }
}

@media (max-width: 850px) {
    main {
        padding-bottom: 0;
    }
}

@media (max-width: 480px) {
    .form-panel {
        padding: 4rem 1.2rem 1.5rem;
    }

    .form-title {
        font-size: 1.7rem;
    }
}

/* ── Dark mode extras ─────────────────────────────────────────────────────── */
[data-theme="dark"] .field-wrap input {
    background: var(--clr-background-alt);
    border-color: var(--clr-border);
}

[data-theme="dark"] .form-panel {
    background: var(--clr-background);
}