:root {
    --navy-950: #071b2d;
    --navy-900: #0b253b;
    --navy-800: #123957;

    --blue-600: #1769e0;
    --blue-500: #2680eb;
    --blue-100: #eaf3ff;

    --green-600: #198754;
    --green-100: #e9f7ef;

    --red-600: #b42318;
    --red-100: #fef0ef;

    --amber-100: #fff8e5;

    --slate-900: #182230;
    --slate-700: #344054;
    --slate-600: #475467;
    --slate-500: #667085;
    --slate-300: #d0d5dd;
    --slate-200: #e4e7ec;
    --slate-100: #f2f4f7;

    --white: #ffffff;

    --shadow:
        0 18px 50px
        rgba(15, 23, 42, 0.10);

    --radius-large: 22px;
    --radius-medium: 12px;
}


* {
    box-sizing: border-box;
}


html {
    min-height: 100%;
}


body {
    margin: 0;
    min-height: 100vh;

    font-family:
        Inter,
        "Segoe UI",
        Roboto,
        Arial,
        sans-serif;

    color: var(--slate-900);

    background:
        linear-gradient(
            135deg,
            #f4f8fc 0%,
            #eef4fa 100%
        );
}


button,
input {
    font: inherit;
}


a {
    color: inherit;
}


.page-shell {
    min-height: 100vh;
}


.setup-layout {
    min-height: 100vh;

    display: grid;

    grid-template-columns:
        minmax(320px, 0.9fr)
        minmax(500px, 1.1fr);
}


.setup-brand {
    padding:
        clamp(40px, 7vw, 90px);

    display: flex;
    flex-direction: column;
    justify-content: center;

    color: var(--white);

    background:
        radial-gradient(
            circle at top left,
            #174b70,
            transparent 55%
        ),
        linear-gradient(
            150deg,
            var(--navy-900),
            var(--navy-950)
        );
}


.brand-mark {
    width: 62px;
    height: 62px;

    display: grid;
    place-items: center;

    margin-bottom: 32px;

    border:
        1px solid
        rgba(255, 255, 255, 0.18);

    border-radius: 16px;

    background:
        rgba(255, 255, 255, 0.10);

    font-size: 30px;
    font-weight: 800;
}


.eyebrow {
    margin:
        0 0 10px;

    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;

    color: var(--blue-500);
}


.setup-brand .eyebrow {
    color: #8ec5ff;
}


.setup-brand h1 {
    margin: 0;

    max-width: 620px;

    font-size:
        clamp(42px, 5vw, 68px);

    line-height: 1.02;

    letter-spacing: -0.04em;
}


.setup-brand h1 span {
    display: block;

    margin-top: 8px;

    color: #a9d5ff;
}


.brand-description {
    max-width: 560px;

    margin:
        24px 0 40px;

    font-size: 18px;
    line-height: 1.7;

    color:
        rgba(255, 255, 255, 0.78);
}


.security-summary {
    display: grid;
    gap: 16px;

    max-width: 580px;
}


.security-summary div {
    padding: 18px;

    border:
        1px solid
        rgba(255, 255, 255, 0.10);

    border-radius: 14px;

    background:
        rgba(255, 255, 255, 0.06);
}


.security-summary strong,
.security-summary span {
    display: block;
}


.security-summary strong {
    margin-bottom: 5px;
}


.security-summary span {
    color:
        rgba(255, 255, 255, 0.67);

    line-height: 1.5;
}


.setup-card {
    width:
        min(640px, calc(100% - 40px));

    margin: auto;

    padding:
        clamp(28px, 5vw, 54px);

    border:
        1px solid var(--slate-200);

    border-radius:
        var(--radius-large);

    background:
        var(--white);

    box-shadow:
        var(--shadow);
}


.card-heading {
    margin-bottom: 30px;
}


.card-heading h2 {
    margin:
        0 0 8px;

    font-size: 30px;
    letter-spacing: -0.025em;
}


.card-heading p {
    margin: 0;

    color: var(--slate-600);

    line-height: 1.6;
}


.field-row {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 16px;
}


.field-group {
    margin-bottom: 19px;
}


.field-group label {
    display: block;

    margin-bottom: 7px;

    color: var(--slate-700);

    font-size: 14px;
    font-weight: 700;
}


.optional {
    margin-left: 4px;

    color: var(--slate-500);

    font-size: 12px;
    font-weight: 500;
}


.field-group input {
    width: 100%;
    min-height: 46px;

    padding: 10px 13px;

    border:
        1px solid
        var(--slate-300);

    border-radius:
        var(--radius-medium);

    outline: none;

    background:
        var(--white);

    color:
        var(--slate-900);

    transition:
        border-color 120ms ease,
        box-shadow 120ms ease;
}


.field-group input:focus {
    border-color:
        var(--blue-500);

    box-shadow:
        0 0 0 4px
        rgba(38, 128, 235, 0.13);
}


.help-text {
    margin:
        6px 0 0;

    color: var(--slate-500);

    font-size: 12px;
    line-height: 1.5;
}


.field-error {
    margin-top: 6px;

    color: var(--red-600);

    font-size: 12px;
    line-height: 1.45;
}


.form-alert,
.flash {
    margin-bottom: 20px;

    padding: 13px 15px;

    border-radius:
        var(--radius-medium);

    font-size: 14px;
}


.form-alert {
    border:
        1px solid #f1b7b2;

    color:
        var(--red-600);

    background:
        var(--red-100);
}


.form-alert p {
    margin: 0;
}


.flash-container {
    position: fixed;

    z-index: 10;

    top: 20px;
    right: 20px;

    width:
        min(420px, calc(100% - 40px));
}


.flash-success {
    border:
        1px solid #a9dfbe;

    color:
        var(--green-600);

    background:
        var(--green-100);

    box-shadow:
        var(--shadow);
}


.primary-button,
.secondary-button {
    min-height: 48px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border: 0;

    border-radius:
        var(--radius-medium);

    cursor: pointer;

    text-decoration: none;

    font-weight: 750;
}


.primary-button {
    width: 100%;

    padding: 12px 18px;

    color:
        var(--white);

    background:
        var(--blue-600);

    box-shadow:
        0 10px 20px
        rgba(23, 105, 224, 0.18);
}


.primary-button:hover {
    background:
        #135dca;
}


.secondary-button {
    padding:
        11px 18px;

    color:
        var(--blue-600);

    background:
        var(--blue-100);
}


.local-notice {
    margin-top: 24px;

    padding: 15px;

    border-radius:
        var(--radius-medium);

    background:
        var(--slate-100);
}


.local-notice strong,
.local-notice span {
    display: block;
}


.local-notice strong {
    margin-bottom: 4px;

    font-size: 13px;
}


.local-notice span {
    color:
        var(--slate-600);

    font-size: 12px;
    line-height: 1.5;
}


.center-panel {
    min-height: 100vh;

    display: grid;
    place-items: center;

    padding: 30px;
}


.success-card,
.error-card {
    width:
        min(620px, 100%);

    padding:
        clamp(30px, 6vw, 55px);

    text-align: center;

    border:
        1px solid var(--slate-200);

    border-radius:
        var(--radius-large);

    background:
        var(--white);

    box-shadow:
        var(--shadow);
}


.success-icon {
    width: 64px;
    height: 64px;

    display: grid;
    place-items: center;

    margin:
        0 auto 22px;

    border-radius: 50%;

    color:
        var(--green-600);

    background:
        var(--green-100);

    font-size: 30px;
    font-weight: 800;
}


.success-card h1,
.error-card h1 {
    margin:
        0 0 14px;

    font-size: 32px;
}


.success-card > p,
.error-card > p {
    color:
        var(--slate-600);

    line-height: 1.65;
}


.success-details {
    display: grid;
    grid-template-columns:
        repeat(3, 1fr);

    gap: 10px;

    margin:
        28px 0;
}


.success-details div {
    padding: 14px 10px;

    border-radius: 12px;

    background:
        var(--slate-100);
}


.success-details span,
.success-details strong {
    display: block;
}


.success-details span {
    margin-bottom: 5px;

    color:
        var(--slate-500);

    font-size: 11px;
}


.success-details strong {
    font-size: 13px;
}


.next-phase-note {
    margin-top: 24px;

    padding: 15px;

    border-radius: 12px;

    background:
        var(--blue-100);
}


.error-code {
    margin-bottom: 12px;

    color:
        var(--blue-600);

    font-size: 52px;
    font-weight: 900;

    letter-spacing: -0.05em;
}


@media (max-width: 900px) {

    .setup-layout {
        grid-template-columns: 1fr;
    }


    .setup-brand {
        min-height: auto;

        padding: 44px 28px;
    }


    .setup-brand h1 {
        font-size: 42px;
    }


    .security-summary {
        display: none;
    }


    .setup-card {
        margin:
            28px auto;

        width:
            min(
                620px,
                calc(100% - 30px)
            );
    }

}


@media (max-width: 560px) {

    .field-row,
    .success-details {
        grid-template-columns: 1fr;
    }


    .setup-brand h1 {
        font-size: 35px;
    }


    .setup-card {
        padding: 25px 20px;
    }

}
/* ==========================================================
   PHASE 2C — AUTHENTICATION
   ========================================================== */

.auth-layout {
    min-height: 100vh;

    display: grid;

    grid-template-columns:
        minmax(340px, 0.95fr)
        minmax(500px, 1.05fr);
}


.auth-brand {
    padding:
        clamp(40px, 7vw, 90px);

    display: flex;
    flex-direction: column;
    justify-content: center;

    color: var(--white);

    background:
        radial-gradient(
            circle at top left,
            #174b70,
            transparent 55%
        ),
        linear-gradient(
            150deg,
            var(--navy-900),
            var(--navy-950)
        );
}


.auth-brand h1 {
    margin: 0;

    font-size:
        clamp(40px, 5vw, 64px);

    line-height: 1.04;

    letter-spacing: -0.04em;
}


.auth-brand h1 span {
    display: block;

    margin-top: 8px;

    color: #a9d5ff;
}


.auth-card-small {
    width:
        min(620px, 100%);
}


.flash-warning {
    border:
        1px solid #f5d484;

    color: #8a5a00;

    background:
        var(--amber-100);

    box-shadow:
        var(--shadow);
}


.flash-danger,
.flash-error {
    border:
        1px solid #f1b7b2;

    color:
        var(--red-600);

    background:
        var(--red-100);

    box-shadow:
        var(--shadow);
}


.danger-button {
    min-height: 44px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding:
        10px 16px;

    border: 0;

    border-radius:
        var(--radius-medium);

    cursor: pointer;

    color: var(--red-600);

    background: var(--red-100);

    font-weight: 750;
}


.dashboard-shell {
    min-height: 100vh;

    padding:
        clamp(24px, 4vw, 52px);

    background:
        var(--slate-100);
}


.dashboard-topbar {
    max-width: 1280px;

    margin:
        0 auto 28px;

    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}


.dashboard-topbar h1 {
    margin: 0;

    font-size: 34px;
}


.dashboard-user {
    display: flex;
    align-items: center;
    gap: 12px;
}


.dashboard-user > div {
    text-align: right;
}


.dashboard-user strong,
.dashboard-user span {
    display: block;
}


.dashboard-user span {
    margin-top: 3px;

    color: var(--slate-500);

    font-size: 12px;
}


.dashboard-placeholder {
    max-width: 1280px;

    margin: auto;

    padding:
        clamp(30px, 5vw, 60px);

    border:
        1px solid var(--slate-200);

    border-radius:
        var(--radius-large);

    background:
        var(--white);

    box-shadow:
        var(--shadow);

    text-align: center;
}


.dashboard-placeholder > p {
    color:
        var(--slate-600);
}


.profile-details {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 12px;

    margin:
        30px 0;
}


.profile-details div {
    padding: 16px;

    border-radius: 12px;

    background:
        var(--slate-100);

    text-align: left;
}


.profile-details span,
.profile-details strong {
    display: block;
}


.profile-details span {
    margin-bottom: 5px;

    color:
        var(--slate-500);

    font-size: 12px;
}


.profile-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;

    gap: 10px;
}


.profile-actions form,
.dashboard-user form {
    margin: 0;
}


@media (max-width: 900px) {

    .auth-layout {
        grid-template-columns: 1fr;
    }


    .auth-brand {
        min-height: auto;

        padding: 44px 28px;
    }


    .auth-brand h1 {
        font-size: 40px;
    }


    .auth-brand .security-summary {
        display: none;
    }


    .dashboard-topbar {
        align-items: flex-start;
        flex-direction: column;
    }


    .dashboard-user {
        width: 100%;

        flex-wrap: wrap;
    }


    .dashboard-user > div {
        margin-right: auto;

        text-align: left;
    }

}


@media (max-width: 560px) {

    .profile-details {
        grid-template-columns: 1fr;
    }

}