/* Authentication Pages (Login & Register) CSS */

:root {
    --sst-blue: #123f6d;
    --sst-red: #e8334f;
    --sst-green: #087a16;
    --sst-border: #1c86ff;
    --sst-text: #263447;
    --sst-muted: #6c7888;
    --primary-blue: #0b2756;
    --primary-red: #de243b;
    --text-dark: #333;
    --text-light: #666;
    --bg-light: #f8f9fa;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.trust-login-page {
    --primary-blue: #0b2756;
    --primary-red: #de243b;
    --text-dark: #333;
    --text-light: #666;
    --bg-light: #f8f9fa;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    background-color: var(--bg-light);
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

body.portal-body {
    margin: 0;
    min-height: 100vh;
    color: var(--sst-text);
    background: #f7fbff;
    font-family: Arial, Helvetica, sans-serif;
}

.trust-login-page * {
    box-sizing: border-box;
}

.topbar {
    display: flex;
    justify-content: center;
    gap: 32px;
    padding: 10px 16px;
    color: #fff;
    background: #18384c;
    font-size: 13px;
    font-weight: 700;
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    max-width: 1120px;
    margin: 0 auto;
    padding: 16px 24px;
    background: #fff;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--sst-blue);
    font-size: 20px;
    font-weight: 800;
    text-decoration: none;
}

.brand img {
    width: 72px;
    height: 72px;
}

.navlinks {
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: 14px;
    font-weight: 700;
}

.navlinks a,
.navlinks button {
    color: #4c5867;
    text-decoration: none;
}

.navlinks button {
    border: 0;
    background: transparent;
    cursor: pointer;
    font-weight: 700;
}

.join-link {
    padding: 12px 18px;
    color: #fff !important;
    background: var(--sst-green);
    border-radius: 6px;
}

.portal-main {
    min-height: calc(100vh - 250px);
    padding: 44px 18px 72px;
}

.auth-shell {
    max-width: 930px;
    margin: 0 auto;
}

.auth-shell-narrow {
    max-width: 520px;
}

.form-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 24px 60px rgba(26, 60, 92, .12);
    padding: 34px;
    border: 2px solid var(--sst-border);
}

.form-heading {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 28px;
}

.form-heading img {
    width: 76px;
    height: 76px;
}

.form-heading h1 {
    margin: 0;
    color: #5b6470;
    font-size: 28px;
    font-weight: 500;
}

.form-heading p,
.dashboard-head p,
.footer p {
    margin: 4px 0 0;
    color: var(--sst-muted);
}

.portal-form {
    display: grid;
    gap: 16px;
}

.field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.field-grid.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.portal-form label,
.portal-form fieldset {
    min-width: 0;
}

.portal-form label > span,
.portal-form legend {
    display: block;
    margin-bottom: 7px;
    color: #53606f;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.portal-form input,
.portal-form select,
.portal-form textarea {
    box-sizing: border-box;
    width: 100%;
    min-height: 46px;
    padding: 11px 14px;
    color: #253244;
    background: #fff;
    border: 1px solid var(--sst-border);
    border-radius: 4px;
    outline: none;
}

.portal-form textarea {
    min-height: 84px;
    resize: vertical;
}

.portal-form input[readonly] {
    background: #e8ecf1;
}

.portal-form small {
    display: block;
    margin-top: 6px;
    color: var(--sst-red);
    font-size: 12px;
    font-weight: 700;
}

.portal-form fieldset {
    padding: 0;
    border: 0;
}

.radio-row,
.check-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 4px 0;
}

.radio-row input,
.check-row input {
    width: 16px;
    min-height: 16px;
}

.check-row span {
    margin: 0 !important;
}

.verify-btn,
.primary-btn {
    min-height: 44px;
    color: #fff;
    background: var(--sst-green);
    border: 0;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 800;
    text-transform: uppercase;
}

.sponsor-status {
    min-height: 18px;
    margin: -8px 0 0;
    color: var(--sst-blue);
    font-size: 13px;
    font-weight: 700;
}

.signin-strip,
.flash {
    max-width: 930px;
    margin: 18px auto 0;
    padding: 16px 24px;
    background: #fff;
    border: 2px solid #18a535;
    border-radius: 8px;
    color: var(--sst-muted);
}

.signin-strip a {
    color: #6b1da5;
    font-weight: 800;
    text-decoration: none;
}

/* Trust Login Page Specific Styles */

.main-container {
    display: flex;
    flex: 1;
    overflow: hidden;
    background-image: radial-gradient(#e0e0e0 1px, transparent 1px);
    background-size: 20px 20px;
}

.left-panel {
    position: relative;
    z-index: 2;
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: white;
    text-align: center;
    background:
        radial-gradient(circle at 12% 12%, rgba(255, 255, 255, .08), transparent 26%),
        linear-gradient(145deg, #0b2756 0%, #0d3c83 58%, #de243b 140%);
    border-top-right-radius: 150px;
    border-bottom-right-radius: 150px;
    box-shadow: 10px 0 30px rgba(0, 0, 0, .1);
}

.right-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: white;
}

.logo-container img {
    width: 150px;
    height: 150px;
    margin-bottom: 20px;
    padding: 8px;
    object-fit: contain;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 16px 38px rgba(0, 0, 0, .18);
}

.left-panel h1 {
    margin: 0 0 15px;
    font-size: 2rem;
    line-height: 1.28;
    letter-spacing: 0;
}

.left-panel h1 .highlight {
    color: var(--primary-red);
}

.divider {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.divider::before,
.divider::after {
    content: "";
    width: 50px;
    height: 1px;
    margin: 0 10px;
    background: white;
    opacity: .5;
}

.login-card {
    width: min(100%, 560px);
    padding: clamp(30px, 5vw, 58px);
    background: rgba(255, 255, 255, .92);
    border: 1px solid rgba(255, 255, 255, .9);
    border-radius: 32px;
    box-shadow: 0 34px 80px rgba(23, 47, 86, .16);
    animation: loginFadeUp .55s ease both;
}

.login-card-heading {
    margin-bottom: 34px;
    text-align: center;
}

.login-card-heading h2 {
    margin: 0;
    color: #09285c;
    font-size: clamp(30px, 3vw, 42px);
    line-height: 1.15;
}

.login-card-heading span {
    display: block;
    width: 58px;
    height: 4px;
    margin: 18px auto;
    background: var(--primary-red);
    border-radius: 999px;
}

.login-card-heading p {
    margin: 0;
    color: #5f6776;
    font-size: 18px;
}

.floating-field {
    position: relative;
    display: block;
    margin-top: 20px;
}

.floating-field input {
    box-sizing: border-box;
    width: 100%;
    height: 66px;
    padding: 24px 58px 10px 68px;
    color: #14223a;
    background: #fff;
    border: 1px solid #d6dce6;
    border-radius: 9px;
    outline: none;
    box-shadow: 0 8px 18px rgba(16, 35, 68, .1);
    font-size: 17px;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.floating-field input:focus {
    border-color: #174f9e;
    box-shadow: 0 0 0 4px rgba(18, 63, 109, .12), 0 12px 28px rgba(16, 35, 68, .14);
    transform: translateY(-1px);
}

.floating-field > span {
    position: absolute;
    left: 68px;
    top: 22px;
    color: #8a93a3;
    font-size: 17px;
    pointer-events: none;
    transition: top .18s ease, font-size .18s ease, color .18s ease;
}

.floating-field input:focus + span,
.floating-field input:not(:placeholder-shown) + span {
    top: 8px;
    color: #0b2452;
    font-size: 12px;
    font-weight: 800;
}

.floating-field > svg {
    position: absolute;
    left: 22px;
    top: 21px;
    width: 26px;
    height: 26px;
    fill: none;
    stroke: #657083;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
}

.password-toggle {
    position: absolute;
    right: 18px;
    top: 19px;
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    padding: 0;
    color: #657083;
    background: transparent;
    border: 0;
    cursor: pointer;
}

.password-toggle svg {
    width: 26px;
    height: 26px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.field-error {
    display: block;
    margin: 8px 0 0 4px;
    color: var(--primary-red);
    font-size: 13px;
    font-weight: 700;
}

.login-options {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    margin: 24px 0 28px;
    color: #11233f;
    font-size: 16px;
}

.remember-box {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.remember-box input {
    width: 22px;
    height: 22px;
    accent-color: var(--primary-red);
}

.login-options a,
.login-register-link a {
    color: #003e9d;
    font-weight: 700;
    text-decoration: none;
}

.login-options a:hover,
.login-register-link a:hover {
    color: var(--primary-red);
    text-decoration: underline;
}

.login-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    width: 100%;
    height: 68px;
    color: #fff;
    background: linear-gradient(100deg, #073985 0%, #7f3574 52%, #ff3045 100%);
    border: 0;
    border-radius: 9px;
    box-shadow: 0 14px 28px rgba(232, 51, 79, .22);
    cursor: pointer;
    font-size: 18px;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
    transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}

.login-submit:hover {
    transform: translateY(-2px);
    filter: saturate(1.06);
    box-shadow: 0 18px 36px rgba(18, 63, 109, .22), 0 12px 30px rgba(232, 51, 79, .2);
}

.login-submit svg {
    width: 28px;
    height: 28px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.login-separator {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 18px;
    margin: 28px 0;
    color: #7c8491;
}

.login-separator span {
    height: 1px;
    background: #dfe5ee;
}

.google-login {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    width: 100%;
    height: 60px;
    color: #263447;
    background: #fff;
    border: 1px solid #d6dce6;
    border-radius: 8px;
    box-shadow: 0 8px 18px rgba(16, 35, 68, .08);
    cursor: pointer;
    font-size: 18px;
}

.google-login strong {
    color: #4285f4;
    font-size: 27px;
}

.login-register-link {
    margin: 34px 0 0;
    color: #6a7280;
    font-size: 17px;
    text-align: center;
}

.login-register-link a {
    color: var(--primary-red);
    text-decoration: underline;
}

.login-footer {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 7.5vw;
    color: rgba(255, 255, 255, .82);
    background: #082b66;
}

.trust-login-footer {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 15px 40px;
    color: white;
    background: var(--primary-blue);
    border-top: 1px solid rgba(255, 255, 255, .1);
    font-size: .8rem;
}

.trust-login-footer .security {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Registration Wizard Styles */

.step-indicator {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
    justify-content: center;
}

.step {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e0e7ff;
    color: #0b2756;
    font-weight: 700;
    font-size: 14px;
}

.step.active {
    background: linear-gradient(135deg, #0b2756 0%, #de243b 100%);
    color: white;
}

.step.completed {
    background: #10b981;
    color: white;
}

.step-pill {
    display: inline-block;
    margin-bottom: 18px;
    padding: 10px 14px;
    background: rgba(13, 44, 111, .08);
    color: var(--primary-blue);
    font-size: .82rem;
    font-weight: 700;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.section-title {
    display: block;
    margin-bottom: 18px;
    color: #0d3060;
    font-size: .95rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.form-section-hidden {
    display: none;
}

.field-note {
    margin-top: 14px;
    color: #43526a;
    font-size: .9rem;
    line-height: 1.5;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--primary-blue);
    font-size: .9rem;
    font-weight: 700;
}

.input-wrapper {
    position: relative;
}

.trust-login-page .input-wrapper > i {
    position: absolute;
    top: 50%;
    color: #999;
    transform: translateY(-50%);
}

.input-wrapper .left-icon {
    left: 15px;
}

.input-wrapper .right-icon {
    right: 15px;
}

.input-wrapper input {
    width: 100%;
    padding: 12px 44px;
    color: var(--text-dark);
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    outline: none;
    font-size: .9rem;
    transition: border-color .3s, box-shadow .3s, transform .3s;
}

.input-wrapper input:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 4px rgba(11, 39, 86, .08);
    transform: translateY(-1px);
}

.password-toggle-btn {
    position: absolute;
    top: 50%;
    right: 15px;
    width: 24px;
    height: 24px;
    padding: 0;
    color: #999;
    background: transparent;
    border: 0;
    cursor: pointer;
    transform: translateY(-50%);
}

.trust-login-page .password-toggle-btn i {
    position: static;
    display: block;
    transform: none;
}

.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 25px;
    font-size: .85rem;
}

.form-options label {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-dark);
}

.form-options input {
    accent-color: var(--primary-red);
}

.form-options a {
    color: var(--primary-blue);
    font-weight: 600;
    text-decoration: none;
}

.btn-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    margin-bottom: 25px;
    padding: 14px;
    color: white;
    background: linear-gradient(to right, var(--primary-blue), var(--primary-red));
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: opacity .3s, transform .3s, box-shadow .3s;
    min-height: 50px;
    margin-top: 10px;
}

.btn-submit:hover {
    opacity: .96;
    transform: translateY(-2px);
    box-shadow: 0 14px 26px rgba(222, 36, 59, .2);
}

.or-divider {
    position: relative;
    margin-bottom: 25px;
    color: #aaa;
    font-size: .8rem;
    text-align: center;
}

.or-divider::before,
.or-divider::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: #eee;
}

.or-divider::before {
    left: 0;
}

.or-divider::after {
    right: 0;
}

.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    margin-bottom: 30px;
    padding: 12px;
    color: var(--text-dark);
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    font-size: .9rem;
    transition: background .3s, transform .3s;
}

.btn-google:hover {
    background: #f1f1f1;
    transform: translateY(-1px);
}

.google-mark {
    color: #4285f4;
    font-size: 18px;
    font-weight: 800;
}

.signup-link {
    margin: 0;
    color: var(--text-light);
    font-size: .9rem;
    text-align: center;
}

.signup-link a {
    color: var(--primary-red);
    font-weight: 600;
    text-decoration: underline;
}

.trust-login-page .field-error {
    display: block;
    margin-top: 7px;
    color: var(--primary-red);
    font-size: .78rem;
    font-weight: 600;
}

.gradient-btn {
    background: linear-gradient(135deg, #0b2756 0%, #de243b 100%);
    border: none;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

.gradient-btn:hover {
    opacity: 0.9;
    color: white;
}

.gradient-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@keyframes loginFadeUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1100px) {
    .trust-login-page .login-card {
        padding: 34px 28px;
    }
}

@media (max-width: 860px) {
    .main-container {
        flex-direction: column;
    }

    .left-panel,
    .right-panel {
        padding: 30px 24px;
    }

    .left-panel {
        border-bottom-right-radius: 50px;
        border-bottom-left-radius: 50px;
    }
}

@media (max-width: 992px) {
    .main-container {
        flex-direction: column;
    }

    .left-panel {
        padding: 40px 20px;
        border-radius: 0;
        border-bottom-right-radius: 50px;
        border-bottom-left-radius: 50px;
    }

    .trust-login-footer {
        flex-direction: column;
        padding: 15px 20px;
    }
}

@media (max-width: 540px) {
    .right-panel {
        padding: 24px 16px;
    }

    .trust-login-page .login-card {
        padding: 34px 22px;
    }

    .form-options {
        align-items: flex-start;
        flex-direction: column;
    }

    .field-grid,
    .field-grid.three,
    .stat-row {
        grid-template-columns: 1fr;
    }

    .form-card {
        padding: 22px;
    }

    .form-heading {
        align-items: flex-start;
    }
}

@media (max-width: 760px) {
    .topbar,
    .navbar,
    .navlinks,
    .dashboard-head,
    .footer {
        flex-direction: column;
        align-items: flex-start;
    }
}
