: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;
}

.theme-switcher {
    top: 1.2rem;
    right: 1.2rem;
    z-index: 200;
}

/* ════════════════════════════════════════════════════════════
   SPLIT LAYOUT
════════════════════════════════════════════════════════════ */
.signup-root {
    display: grid;
    grid-template-columns: 400px 1fr;
    min-height: 100dvh;
}

/* ════════════════════════════════════════════════════════════
   LEFT — Brand panel
════════════════════════════════════════════════════════════ */
.brand-panel {
    position: sticky;
    top: 0;
    height: 100dvh;
    background: linear-gradient(160deg, #0D1524 0%, #131F33 55%, #0a1a2e 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3rem 2.5rem;
    overflow: hidden;
}

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

.bp-blob {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(72px);
}

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

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

@keyframes blobFloat {

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

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

.bp-inner {
    position: relative;
    z-index: 1;
}

.bp-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 2.5rem;
}

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

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

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

.bp-headline {
    font-size: clamp(1.5rem, 2vw, 2rem);
    font-weight: 800;
    color: #E8EFF8;
    line-height: 1.2;
    letter-spacing: -0.03em;
    margin-bottom: 0.9rem;
}

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

.bp-desc {
    font-size: 0.84rem;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.38);
    max-width: 320px;
    margin-bottom: 2rem;
}

.bp-steps {
    display: flex;
    flex-direction: column;
    margin-bottom: 2rem;
}

.bp-step {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bp-step-line {
    width: 2px;
    height: 22px;
    background: rgba(255, 255, 255, 0.1);
    margin-left: 14px;
}

.bp-step-num {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    flex-shrink: 0;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
}

.bp-step-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.bp-step-text strong {
    font-size: 0.82rem;
    color: #E8EFF8;
    font-weight: 700;
}

.bp-step-text span {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.34);
}

.bp-roles {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

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

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

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

/* ════════════════════════════════════════════════════════════
   RIGHT — Form panel
════════════════════════════════════════════════════════════ */
.form-panel {
    background: var(--clr-background);
    min-height: 100dvh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.form-scroll {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 2.5rem;
}

.form-inner {
    width: 100%;
    /* max-width: 640px; */
    animation: slideUp 0.4s 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;
    align-items: center;
    gap: 10px;
    margin-bottom: 2rem;
    font-size: 1rem;
    color: var(--clr-text-primary);
    font-weight: 600;
}

.mobile-logo strong {
    color: var(--clr-accent-primary);
}

/* ════════════════════════════════════════════════════════════
   PAGE HEADER — no box, just clean typography
════════════════════════════════════════════════════════════ */
.form-header {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--clr-border);
}

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

.form-subtitle {
    font-size: 0.9rem;
    color: var(--clr-text-secondary);
    line-height: 1.5;
}

/* ════════════════════════════════════════════════════════════
   FORM — no outer box.
   Sections are the boxes. The form itself is just a stack.
════════════════════════════════════════════════════════════ */
#signupForm {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
    /* breathing room between the section cards */
    filter: none;
    /* cancel main.css drop-shadow */
    padding: 0;
}

/* ════════════════════════════════════════════════════════════
   SECTION CARDS — each section is its own elevated box
════════════════════════════════════════════════════════════ */
.form-section {
    background: var(--clr-background-alt);
    border: 1px solid var(--clr-border);
    border-radius: 18px;
    padding: 0;
    overflow: visible;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
    box-shadow: 0 2px 12px var(--clr-shadow);
}

.form-section:focus-within {
    border-color: rgba(0, 123, 255, 0.3);
    box-shadow: 0 4px 24px rgba(0, 123, 255, 0.09);
}

/* ── Section title row — the coloured header strip of each card ───────────── */
.section-title-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem 1.75rem 1.25rem;
    position: relative;
}

/* Coloured left accent bar */
.section-title-row::before {
    content: '';
    position: absolute;
    left: 0;
    top: 20%;
    bottom: 20%;
    width: 4px;
    border-radius: 0 4px 4px 0;
    background: var(--gradient);
}

/* Icon badge */
.section-icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    flex-shrink: 0;
    background: color-mix(in srgb, var(--ic) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--ic) 22%, transparent);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ic);
    font-size: 1rem;
    transition: var(--transition);
}

.form-section:focus-within .section-icon-wrap {
    background: color-mix(in srgb, var(--ic) 18%, transparent);
}

.section-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--clr-text-primary);
    letter-spacing: -0.01em;
    margin: 0 0 2px;
    line-height: 1.2;
}

.section-sub {
    font-size: 0.78rem;
    color: var(--clr-text-muted);
    margin: 0;
    line-height: 1;
}

/* "X of 3" badge — pushed to the right */
.section-badge {
    margin-left: auto;
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--clr-accent-primary);
    background: rgba(0, 123, 255, 0.08);
    border: 1px solid rgba(0, 123, 255, 0.18);
    padding: 3px 10px;
    border-radius: 99px;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

/* ── Section body — the fields live here ─────────────────────────────────── */
.form-section>.field-grid,
.form-section>.field-group,
.form-section>.password-strength,
.form-section>.password-warning {
    padding-left: 1.75rem;
    padding-right: 1.75rem;
}

#DateOfBirth {
    padding: 12px 1rem 12px 1rem;
    border: 1px solid var(--clr-border);
    border-radius: 10px;
    font-size: 1.1rem;
    transition: var(--transition);
    font-family: var(--font-primary);
    font-weight: 500;
    color: var(--clr-text-primary);
    background: var(--clr-background);
}

#DateOfBirth:focus {
    outline: none;
    border-color: var(--clr-accent-primary);
    box-shadow: 0 0 0 2px var(--clr-accent-primary);
}

/* Last child gets bottom padding */
.form-section>*:last-child {
    padding-bottom: 1.75rem;
    margin-bottom: 0;
}

/* Every field container in the section body — vertical rhythm */
.form-section>.field-grid {
    margin-top: 0;
}

.form-section>.field-group {
    margin-top: 0;
}

/* ════════════════════════════════════════════════════════════
   FIELD GRID
════════════════════════════════════════════════════════════ */
.field-grid {
    display: grid;
    gap: 1rem;
    padding-top: 0;
}

.field-grid+.field-grid,
.field-group+.field-grid,
.field-grid+.field-group {
    margin-top: 1rem;
}

.col-2 {
    grid-template-columns: 1fr 1fr;
}

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

/* Spacing when a lone field-group follows something inside a section */
.field-mt {
    margin-top: 1rem;
}

/* Label */
.field-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--clr-text-secondary);
    display: flex;
    align-items: center;
    gap: 3px;
    padding-left: 2px;
}

.req {
    color: var(--clr-danger);
    font-size: 0.75rem;
    line-height: 1;
}

/* Hint under a field */
.field-hint {
    font-size: 0.75rem;
    color: var(--clr-text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 3px;
    padding-left: 2px;
}

.field-hint i {
    font-size: 0.68rem;
    color: var(--clr-info);
}

/* ════════════════════════════════════════════════════════════
   FIELD WRAP — icon positioning only.
   main.css owns all input visuals. We only add left-padding.
════════════════════════════════════════════════════════════ */
.field-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

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

.field-wrap:focus-within .field-icon {
    color: var(--clr-accent-primary);
}

/* Push input text right to clear icon */
.field-wrap>input {
    padding-left: 2.75rem !important;
    width: 100%;
}

/* Push password text away from eye toggle too */
.field-wrap.password>input {
    padding-right: 2.75rem !important;
}

/* Eye toggle — script.js targets '.password i.fa-eye' — class must stay */
.pw-eye {
    position: absolute;
    right: 14px;
    color: var(--clr-text-muted);
    font-size: 0.95rem;
    cursor: pointer;
    z-index: 3;
    transition: color 0.2s ease;
}

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

/* ════════════════════════════════════════════════════════════
   CUSTOM SELECT — main.css owns the animation entirely.
   We only ensure full width inside its .field-group.
════════════════════════════════════════════════════════════ */
.field-group .custom-select-container {
    width: 100%;
}

/* ════════════════════════════════════════════════════════════
   PASSWORD STRENGTH
════════════════════════════════════════════════════════════ */
.password-strength {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.6rem 0.9rem;
    background: var(--clr-background);
    border: 1px solid var(--clr-border);
    border-radius: 9px;
    font-size: 0.82rem;
    margin-top: 0.85rem;
}

.strength-label {
    color: var(--clr-text-secondary);
    font-weight: 600;
    min-width: 56px;
}

.strength-text {
    font-weight: 700;
    min-width: 62px;
    text-align: right;
}

.strength-bar {
    flex: 1;
    height: 5px;
    background: var(--clr-border);
    border-radius: 99px;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    width: 0%;
    border-radius: 99px;
    transition: width 0.35s ease, background-color 0.35s ease;
}

/* ════════════════════════════════════════════════════════════
   PASSWORD WARNING
════════════════════════════════════════════════════════════ */
.password-warning {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: rgba(220, 53, 69, 0.07);
    border: 1px solid rgba(220, 53, 69, 0.22);
    border-radius: 10px;
    color: var(--clr-danger);
    font-size: 0.85rem;
    font-weight: 500;
    margin-top: 0.7rem;
    animation: fadeInUp 0.25s ease;
}

.password-warning.hidden {
    display: none;
}

.password-warning i {
    flex-shrink: 0;
    font-size: 0.95rem;
}

.password-warning a {
    color: var(--clr-accent-primary);
    text-decoration: underline;
    cursor: pointer;
    font-weight: 600;
    margin-left: auto;
    white-space: nowrap;
    transition: color 0.2s;
}

.password-warning a:hover {
    color: var(--clr-accent-secondary);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

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

/* ════════════════════════════════════════════════════════════
   SUBMIT BUTTON
════════════════════════════════════════════════════════════ */
input[type="submit"]#submitBtn {
    width: 100%;
    padding: 1.05rem 1.5rem;
    background: var(--gradient);
    color: #fff;
    border: none;
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 700;
    font-family: var(--font-primary);
    cursor: pointer;
    letter-spacing: 0.02em;
    transition: var(--transition);
    box-shadow: 0 4px 22px rgba(0, 123, 255, 0.3);
}

input[type="submit"]#submitBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 123, 255, 0.42);
}

input[type="submit"]#submitBtn:active {
    transform: translateY(0);
}

input[type="submit"]#submitBtn:disabled {
    opacity: 0.62;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ════════════════════════════════════════════════════════════
   FOOTER — "Already have an account?"
════════════════════════════════════════════════════════════ */
footer.switch {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.35rem;
    padding-top: 1.1rem;
    border-top: 1px solid var(--clr-border);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--clr-text-secondary);
    margin: 0;
}

footer.switch button {
    color: var(--clr-accent-primary);
    font-weight: 700;
    background: transparent;
    border: none;
    font-family: var(--font-primary);
    font-size: inherit;
    cursor: pointer;
    transition: color 0.2s;
}

footer.switch button:hover {
    color: var(--clr-accent-secondary);
    text-decoration: underline;
}

/* ════════════════════════════════════════════════════════════
   PASSWORD GENERATOR DIALOG
════════════════════════════════════════════════════════════ */
.password-generator-dialog {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(5px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.password-generator-dialog.active {
    display: flex;
}

.dialog-content {
    background: var(--clr-background-alt);
    border-radius: 16px;
    padding: 2rem;
    width: 90%;
    max-width: 540px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.22);
    animation: slideUp 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.dialog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.dialog-header h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--clr-text-primary);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.dialog-header h3 i {
    color: var(--clr-accent-primary);
}

.close-dialog {
    background: none;
    border: none;
    color: var(--clr-text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.close-dialog:hover {
    color: var(--clr-danger);
}

.generated-password {
    background: var(--clr-background);
    border: 2px solid var(--clr-border);
    border-radius: 12px;
    padding: 1.4rem;
    margin: 1.5rem 0;
    font-size: 1.2rem;
    font-weight: 600;
    font-family: var(--font-primary);
    text-align: center;
    word-break: break-all;
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.generated-password:hover {
    border-color: var(--clr-accent-primary);
    box-shadow: var(--card-shadow);
}

.dialog-actions {
    display: flex;
    gap: 0.9rem;
}

.dialog-actions button {
    flex: 1;
    padding: 0.85rem;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.95rem;
    font-family: var(--font-primary);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: var(--transition);
    min-height: 50px;
}

.generate-btn {
    background: var(--clr-accent-primary);
    color: #fff;
    box-shadow: 0 4px 14px rgba(0, 123, 255, 0.28);
}

.generate-btn:hover {
    background: #0069D9;
    transform: translateY(-2px);
}

.use-btn {
    background: var(--clr-accent-secondary);
    color: #fff;
    box-shadow: 0 4px 14px rgba(40, 167, 69, 0.28);
}

.use-btn:hover {
    background: #218838;
    transform: translateY(-2px);
}


/* ════════════════════════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════════════════════════ */
@media (max-width: 960px) {
    .signup-root {
        grid-template-columns: 1fr;
    }

    .brand-panel {
        display: none;
    }

    .form-scroll {
        padding: 1.5rem;
    }

    .mobile-logo {
        display: flex;
    }
}

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

@media (max-width: 640px) {
    .col-2 {
        grid-template-columns: 1fr;
    }

    .form-scroll {
        padding: 4.5rem 0.85rem 3rem;
    }

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

    .form-section {
        border-radius: 14px;
    }

    .section-title-row {
        padding: 1.25rem 1.25rem 1rem;
        gap: 0.75rem;
    }

    .form-section>.field-grid,
    .form-section>.field-group,
    .form-section>.password-strength,
    .form-section>.password-warning {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    .form-section>*:last-child {
        padding-bottom: 1.25rem;
    }

    .section-badge {
        display: none;
    }

    .dialog-actions {
        flex-direction: column;
    }

    .dialog-content {
        padding: 1.4rem;
        width: 95%;
    }
}