:root {
    --tm-blue: #172e6a;
    --tm-blue-light: #284a9b;
    --tm-blue-soft: #415eaa;
    --tm-red: #91120e;
    --tm-red-light: #b92a24;
    --tm-bg: #070a12;
    --tm-bg-secondary: #0c101a;
    --tm-card: #101521;
    --tm-card-light: #151b28;
    --tm-text: #ffffff;
    --tm-muted: #8f9aae;
    --tm-border: rgba(255, 255, 255, 0.08);
    --tm-radius: 20px;
    --tm-transition: 0.3s ease;
    --tm-font: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

body.auth-page {
    min-height: 100vh;
    margin: 0;
    color: var(--tm-text);
    font-family: var(--tm-font);
    background:
        radial-gradient(circle at 14% 12%, rgba(40, 74, 155, 0.42), transparent 28rem),
        radial-gradient(circle at 92% 82%, rgba(145, 18, 14, 0.24), transparent 25rem),
        var(--tm-bg);
}

a {
    color: #9db6ff;
    text-decoration: none;
}

a:hover {
    color: #ffffff;
}

.portal-skip-link {
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 20;
    transform: translateY(-180%);
    padding: 0.6rem 0.85rem;
    color: var(--tm-text);
    border-radius: 999px;
    background: var(--tm-blue);
}

.portal-skip-link:focus {
    transform: none;
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(27rem, 0.82fr);
    isolation: isolate;
}

.auth-has-site-header .auth-shell {
    padding-top: 8.5rem;
}

.auth-has-site-header .auth-brand-panel {
    min-height: calc(100vh - 8.5rem);
}

.auth-has-site-header .auth-card-wrap {
    align-items: start;
    padding-top: 1.5rem;
}

.auth-brand-panel {
    position: relative;
    display: grid;
    align-items: center;
    min-height: 100vh;
    padding: clamp(2rem, 6vw, 5rem);
    overflow: hidden;
}

.auth-brand-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
    background-size: 58px 58px;
    mask-image: radial-gradient(circle at center, black, transparent 78%);
}

.auth-brand-content {
    position: relative;
    z-index: 2;
    max-width: 42rem;
    animation: authReveal 0.7s ease both;
}

.auth-brand-content img {
    width: min(240px, 70vw);
    height: auto;
    margin-bottom: clamp(2rem, 5vw, 4rem);
    padding: 0.45rem 0.7rem;
    border-radius: 14px;
    background: rgba(255,255,255,0.96);
}

.auth-eyebrow {
    margin-bottom: 0.75rem;
    color: #b7c7ff;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.auth-brand-content h1,
.auth-card h2 {
    margin-bottom: 1rem;
    color: var(--tm-text);
    font-weight: 700;
    line-height: 1.02;
}

.auth-brand-content h1 {
    font-size: clamp(2.6rem, 6vw, 5.5rem);
}

.auth-brand-content p:not(.auth-eyebrow),
.auth-card-head p {
    color: var(--tm-muted);
}

.auth-card-wrap {
    display: grid;
    align-items: center;
    padding: clamp(1rem, 4vw, 3rem);
}

.auth-card {
    width: min(100%, 31rem);
    margin-inline: auto;
    padding: clamp(1.3rem, 4vw, 2rem);
    border: 1px solid var(--tm-border);
    border-radius: var(--tm-radius);
    background:
        linear-gradient(145deg, rgba(255,255,255,0.07), rgba(255,255,255,0.025)),
        var(--tm-card);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.32);
    animation: authCardIn 0.55s ease both;
}

.register-card {
    width: min(100%, 45rem);
}

.auth-card-head {
    margin-bottom: 1.4rem;
}

.form-label,
.form-check-label {
    color: #d8deea;
    font-size: 0.9rem;
    font-weight: 700;
}

.form-control {
    min-height: 3.15rem;
    color: var(--tm-text);
    border: 1px solid var(--tm-border);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.055);
}

.form-control:focus {
    color: var(--tm-text);
    border-color: rgba(65, 94, 170, 0.8);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 0.22rem rgba(40, 74, 155, 0.24);
}

.iti {
    width: 100%;
}

.iti .form-control {
    width: 100%;
}

.iti__dropdown-content,
.iti__country-list {
    color: #172033;
    background: #ffffff;
}

.iti__search-input {
    color: #172033;
    background: #ffffff;
}

.iti__country {
    color: #172033;
}

.iti__country:hover,
.iti__country.iti__highlight {
    color: #07111f;
    background: #eef3ff;
}

.iti__country-name,
.iti__dial-code {
    color: inherit;
}

.password-field {
    position: relative;
}

.password-field .form-control {
    padding-right: 3.1rem;
}

.password-field button {
    position: absolute;
    top: 50%;
    right: 0.65rem;
    width: 2.2rem;
    height: 2.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--tm-muted);
    border: 0;
    border-radius: 10px;
    background: transparent;
    transform: translateY(-50%);
}

.auth-options {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin: 1rem 0 1.3rem;
}

.auth-submit {
    width: 100%;
    min-height: 3.2rem;
    color: var(--tm-text);
    border: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--tm-blue), var(--tm-blue-light));
    font-weight: 800;
    box-shadow: 0 18px 38px rgba(23, 46, 106, 0.36);
}

.auth-submit:hover {
    color: var(--tm-text);
    transform: translateY(-1px);
}

.auth-submit:disabled {
    opacity: 0.7;
    transform: none;
}

.auth-switch,
.auth-terms {
    margin-top: 1rem;
    color: var(--tm-muted);
    text-align: center;
}

.auth-terms {
    text-align: left;
}

.auth-alert {
    display: none;
    margin-bottom: 1rem;
    padding: 0.85rem 1rem;
    border-radius: 14px;
    font-weight: 700;
}

.auth-alert.is-visible {
    display: block;
}

.auth-alert.is-error {
    color: #ffd8d6;
    background: rgba(145, 18, 14, 0.22);
}

.auth-alert.is-info,
.auth-alert.is-success {
    color: #dbe6ff;
    background: rgba(40, 74, 155, 0.24);
}

.field-error {
    min-height: 1.05rem;
    margin-top: 0.3rem;
    color: #ffaaa5;
    font-size: 0.8rem;
}

.auth-link-button {
    border: 0;
    padding: 0;
    color: #b9c8ff;
    background: transparent;
    font: inherit;
    transition: color var(--tm-transition);
}

.auth-link-button:hover,
.auth-link-button:focus-visible {
    color: #ffffff;
}

.password-strength {
    height: 0.35rem;
    margin-top: 0.55rem;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
}

.password-strength span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: var(--tm-red);
    transition: width var(--tm-transition), background var(--tm-transition);
}

.password-hint {
    color: var(--tm-muted);
}

.market-orbit {
    position: absolute;
    right: 8%;
    bottom: 8%;
    width: min(34rem, 70vw);
    opacity: 0.85;
}

.market-orbit svg {
    width: 100%;
    fill: none;
}

.market-orbit path {
    stroke: #9db6ff;
    stroke-width: 3;
    stroke-dasharray: 680;
    stroke-dashoffset: 680;
    animation: chartTrace 1.8s ease forwards;
}

.market-orbit circle {
    fill: var(--tm-red-light);
}

.market-orbit span {
    position: absolute;
    width: 13rem;
    height: 13rem;
    border-radius: 50%;
    background: rgba(40, 74, 155, 0.18);
    filter: blur(18px);
    animation: glowFloat 6s ease-in-out infinite;
}

.market-orbit span:nth-child(2) {
    right: 10%;
    bottom: 12%;
    background: rgba(145, 18, 14, 0.14);
    animation-delay: -2s;
}

.market-orbit span:nth-child(3) {
    left: 12%;
    top: 8%;
    animation-delay: -4s;
}

@keyframes authReveal {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: none; }
}

@keyframes authCardIn {
    from { opacity: 0; transform: translateY(18px) scale(0.98); }
    to { opacity: 1; transform: none; }
}

@keyframes chartTrace {
    to { stroke-dashoffset: 0; }
}

@keyframes glowFloat {
    50% { transform: translate3d(12px, -14px, 0) scale(1.06); }
}

@media (max-width: 991.98px) {
    .auth-has-site-header .auth-shell {
        padding-top: 5.85rem;
    }

    .auth-has-site-header .auth-brand-panel {
        min-height: auto;
        align-items: start;
        padding-top: 0.45rem;
        padding-bottom: 0.75rem;
    }

    .auth-has-site-header .auth-card-wrap {
        padding-top: 0;
    }

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

    .auth-brand-panel {
        min-height: auto;
        padding-inline: clamp(1rem, 5vw, 2rem);
        padding-bottom: 0.75rem;
    }

    .auth-card-wrap {
        padding-inline: clamp(1rem, 5vw, 2rem);
        padding-top: 0;
    }

    .market-orbit {
        position: relative;
        right: auto;
        bottom: auto;
        width: min(16.5rem, 68vw);
        margin: 0.75rem auto 0;
        opacity: 0.32;
    }
}

@media (max-width: 575.98px) {
    .auth-card {
        border-radius: 16px;
    }

    .auth-options {
        display: grid;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
    }
}
