:root {
    --navy: #101b32;
    --navy-light: #172744;
    --blue: #2864dc;
    --blue-hover: #1e50b8;
    --text: #172033;
    --muted: #758198;
    --border: #e2e7ef;
    --surface: #ffffff;
    --background: #f4f6fa;
    --success: #16845b;
    --danger: #bd3442;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

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

button,
input {
    font: inherit;
}

.auth-layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.brand-panel {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 64px 9%;
    color: #ffffff;
    background:
        radial-gradient(circle at 15% 15%, rgba(47, 105, 210, .30), transparent 35%),
        radial-gradient(circle at 90% 85%, rgba(32, 76, 151, .35), transparent 38%),
        linear-gradient(145deg, #101b32 0%, #142746 100%);
}

.brand-panel::after {
    content: "";
    position: absolute;
    width: 480px;
    height: 480px;
    right: -260px;
    top: -180px;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 50%;
    box-shadow:
        0 0 0 45px rgba(255,255,255,.025),
        0 0 0 90px rgba(255,255,255,.02);
}

.brand-content {
    width: 100%;
    max-width: 560px;
    position: relative;
    z-index: 1;
}

.brand-mark {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(145deg, #4385f5, #2055bc);
    color: #ffffff;
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -1px;
    box-shadow: 0 8px 24px rgba(0,0,0,.18);
}

.brand-heading {
    margin-top: 70px;
}

.eyebrow {
    display: block;
    color: #477ce0;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2px;
}

.brand-heading .eyebrow {
    color: #8eb4ff;
}

.brand-heading h1 {
    margin: 18px 0;
    font-size: clamp(42px, 5vw, 64px);
    line-height: 1.06;
    letter-spacing: -2.5px;
    font-weight: 750;
}

.brand-heading p {
    max-width: 430px;
    color: #b8c6dc;
    font-size: 16px;
    line-height: 1.8;
}

.brand-features {
    display: grid;
    gap: 25px;
    margin-top: 62px;
}

.feature {
    display: flex;
    align-items: center;
    gap: 17px;
}

.feature-icon {
    width: 43px;
    height: 43px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255,255,255,.13);
    border-radius: 12px;
    background: rgba(255,255,255,.06);
    color: #8eb4ff;
    font-size: 23px;
}

.feature strong,
.feature small {
    display: block;
}

.feature strong {
    font-size: 14px;
    font-weight: 650;
}

.feature small {
    margin-top: 5px;
    color: #9eacc2;
    font-size: 12px;
}

.brand-footer {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 75px;
    padding-top: 22px;
    border-top: 1px solid rgba(255,255,255,.12);
    color: #91a2bc;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
}

.form-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 55px 9%;
    background: #ffffff;
}

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

.mobile-brand {
    display: none;
    align-items: center;
    gap: 12px;
    margin-bottom: 48px;
    font-weight: 750;
    color: var(--navy);
}

.mobile-brand .brand-mark {
    width: 42px;
    height: 42px;
    font-size: 15px;
}

.form-heading {
    margin-bottom: 34px;
}

.form-heading h2,
.success-view h2 {
    margin: 13px 0 9px;
    color: var(--navy);
    font-size: 32px;
    letter-spacing: -1px;
}

.form-heading p,
.success-view p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
}

.field {
    margin-bottom: 22px;
}

.field label {
    display: block;
    margin-bottom: 9px;
    color: #344057;
    font-size: 13px;
    font-weight: 650;
}

.field input {
    width: 100%;
    height: 49px;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    outline: none;
    background: #ffffff;
    color: var(--text);
    font-size: 14px;
    transition: border-color .2s, box-shadow .2s;
}

.field input::placeholder {
    color: #a5afbf;
}

.field input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(40,100,220,.11);
}

.password-wrapper {
    position: relative;
}

.password-wrapper input {
    padding-right: 66px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: var(--blue);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.primary-button,
.secondary-button {
    width: 100%;
    min-height: 49px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s, transform .2s;
}

.primary-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 0;
    background: var(--blue);
    color: #ffffff;
    box-shadow: 0 5px 14px rgba(40,100,220,.18);
}

.primary-button:hover {
    background: var(--blue-hover);
}

.primary-button:active {
    transform: translateY(1px);
}

.primary-button:disabled {
    opacity: .65;
    cursor: not-allowed;
}

.secondary-button {
    margin-top: 12px;
    border: 1px solid var(--border);
    background: #ffffff;
    color: #526078;
}

.secondary-button:hover {
    background: #f5f7fb;
}

.button-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,.4);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin .7s linear infinite;
}

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

.security-note {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    margin-top: 29px;
    padding: 15px;
    border: 1px solid #e8edf5;
    border-radius: 8px;
    background: #f8faff;
    color: #78859a;
    font-size: 11px;
    line-height: 1.6;
}

.security-icon {
    color: var(--blue);
    font-size: 17px;
}

.password-guidance {
    margin: -5px 0 22px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
}

.alert {
    margin-bottom: 22px;
    padding: 12px 14px;
    border: 1px solid #f0c7cc;
    border-radius: 8px;
    background: #fff5f6;
    color: var(--danger);
    font-size: 13px;
    line-height: 1.5;
}

.alert.success {
    border-color: #bce5d4;
    background: #f0fbf6;
    color: var(--success);
}

[hidden] {
    display: none !important;
}

.success-view {
    text-align: center;
}

.success-mark {
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    margin: 0 auto 25px;
    border-radius: 50%;
    background: #e9f8f1;
    color: var(--success);
    font-size: 30px;
    font-weight: 700;
}

.success-view .eyebrow {
    color: var(--success);
}

.success-view .primary-button {
    margin-top: 30px;
}

.form-footer {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 65px;
    padding-top: 20px;
    border-top: 1px solid #edf0f5;
    color: #99a3b3;
    font-size: 10px;
}

@media (max-width: 900px) {
    .auth-layout {
        grid-template-columns: 42% 58%;
    }

    .brand-panel {
        padding: 45px 9%;
    }

    .brand-heading h1 {
        font-size: 43px;
    }

    .brand-heading p {
        font-size: 14px;
    }

    .form-panel {
        padding: 45px 8%;
    }
}

@media (max-width: 650px) {
    .auth-layout {
        display: block;
    }

    .brand-panel {
        display: none;
    }

    .form-panel {
        min-height: 100vh;
        padding: 35px 25px;
    }

    .form-container {
        max-width: 440px;
    }

    .mobile-brand {
        display: flex;
    }

    .form-heading h2 {
        font-size: 29px;
    }

    .form-footer {
        margin-top: 48px;
        flex-wrap: wrap;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }
}


/* ===== SAFETRAQ PREMIUM LOGIN WORDMARK ===== */
.brand-heading .eyebrow {
    display: none !important;
}

.brand-heading h1 {
    font-family: "Sora", "Arial", sans-serif !important;
    font-size: clamp(3.5rem, 6vw, 5.3rem);
    font-weight: 800;
    line-height: 0.98;
    letter-spacing: -0.065em;
    text-transform: uppercase;
    color: #ffffff;
    text-shadow: 0 3px 15px rgba(0, 0, 0, 0.12);
    margin-top: 0;
}

.mobile-brand span {
    font-family: "Sora", "Arial", sans-serif;
    font-weight: 800;
    letter-spacing: -0.035em;
}

/* ===== REFINED SAFETRAQ WORDMARK SPACING ===== */
.brand-heading h1 {
    letter-spacing: 0.025em !important;
    line-height: 1.08;
}

.mobile-brand span {
    letter-spacing: 0.025em;
}

/* ===== OFFICIAL SAFETRAQ LOGIN LOGO ===== */

.safetraq-logo {
    display: block;
    width: 100%;
    max-width: 490px;
    height: auto;
    object-fit: contain;
    background: #ffffff;
    border-radius: 10px;
}

.brand-heading {
    margin-top: 30px;
}

.brand-heading h1 {
    display: none !important;
}

.mobile-brand {
    display: none;
    justify-content: center;
    margin-bottom: 38px;
}

.mobile-brand .safetraq-logo {
    max-width: 340px;
}

@media (max-width: 900px) {
    .brand-content {
        max-width: 100%;
    }

    .brand-heading {
        margin-top: 25px;
    }

    .safetraq-logo {
        max-width: 420px;
    }
}

@media (max-width: 650px) {
    .mobile-brand {
        display: flex;
    }

    .mobile-brand .safetraq-logo {
        max-width: 320px;
    }
}


/* ===== SAFETRAQ FULL-WIDTH BRANDING ===== */

@media (min-width: 651px) {
    .brand-panel {
        padding-left: 5%;
        padding-right: 5%;
    }

    .brand-content {
        width: 100%;
        max-width: none;
    }

    .brand-content > .safetraq-logo {
        width: 100%;
        max-width: none;
        height: auto;
        display: block;
        border-radius: 12px;
    }
}

