:root {
    --bg: #050507;
    --bg-2: #080a12;
    --card-bg: rgba(12, 14, 22, 0.78);
    --card-bg-strong: rgba(15, 18, 30, 0.92);
    --accent: #4169e1;
    --accent-2: #6f8cff;
    --accent-3: #9eb2ff;
    --gold: #d4af37;
    --accent-glow: rgba(65, 105, 225, 0.18);
    --accent-glow-strong: rgba(65, 105, 225, 0.34);
    --text: #f8fafc;
    --muted: #9aa7bd;
    --muted-2: #6f7d94;
    --border: rgba(255, 255, 255, 0.1);
    --border-strong: rgba(111, 140, 255, 0.28);
    --radius: 20px;
    --shadow: 0 30px 95px rgba(0, 0, 0, 0.72);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--bg);
}

body.ts-login-page {
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    position: relative;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 18% 18%, rgba(65, 105, 225, 0.22), transparent 34%),
        radial-gradient(circle at 82% 16%, rgba(212, 175, 55, 0.11), transparent 28%),
        radial-gradient(circle at 50% 100%, rgba(111, 140, 255, 0.14), transparent 38%),
        linear-gradient(135deg, #040405 0%, #070912 52%, #030304 100%);
}

body.ts-login-page::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(65, 105, 225, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(65, 105, 225, 0.045) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(circle at center, #000 0%, rgba(0, 0, 0, 0.72) 42%, transparent 78%);
    animation: gridDrift 18s linear infinite;
}

body.ts-login-page::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.045) 44%, transparent 58%);
    transform: translateX(-100%);
    animation: pageSweep 9s ease-in-out infinite;
}

.page-orb,
.page-grid-glow {
    position: fixed;
    pointer-events: none;
    z-index: 0;
}

.page-orb {
    width: 22rem;
    height: 22rem;
    border-radius: 999px;
    filter: blur(18px);
    opacity: 0.62;
    animation: floatOrb 11s ease-in-out infinite;
}

.page-orb-one {
    left: -7rem;
    top: 12%;
    background: radial-gradient(circle, rgba(65, 105, 225, 0.22), transparent 68%);
}

.page-orb-two {
    right: -8rem;
    bottom: 8%;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.13), transparent 70%);
    animation-delay: -5s;
}

.page-grid-glow {
    width: 38rem;
    height: 38rem;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    border-radius: 999px;
    background: radial-gradient(circle, rgba(65, 105, 225, 0.17), transparent 68%);
    filter: blur(5px);
    opacity: 0.8;
}

.site-navbar {
    z-index: 20;
    min-height: 58px;
    background: rgba(5, 5, 7, 0.76);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
}

.site-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.72rem;
    color: #fff !important;
    font-size: 1.1rem;
    font-weight: 900;
    letter-spacing: -0.045em;
}

.brand-mark {
    width: 36px;
    height: 36px;
    display: inline-grid;
    place-items: center;
    border-radius: 13px;
    color: var(--accent-3);
    background: linear-gradient(145deg, rgba(65, 105, 225, 0.25), rgba(255, 255, 255, 0.03));
    border: 1px solid rgba(111, 140, 255, 0.22);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 12px 34px rgba(65, 105, 225, 0.18);
}

.nav-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #37ff9f;
    box-shadow: 0 0 0 6px rgba(55, 255, 159, 0.08), 0 0 18px rgba(55, 255, 159, 0.55);
    animation: livePulse 1.8s ease-in-out infinite;
}

.nav-status {
    position: relative;
    overflow: hidden;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    color: #dfe7ff;
    background: linear-gradient(135deg, rgba(65, 105, 225, 0.22), rgba(212, 175, 55, 0.08));
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid rgba(111, 140, 255, 0.24);
}

.nav-status::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18), transparent);
    transform: translateX(-120%);
    animation: shimmer 4.5s ease-in-out infinite;
}

.login-stage {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    padding-top: 4.35rem;
    padding-bottom: 0.75rem;
}

.login-stage .row {
    justify-content: center;
}

.login-stage [class*="col-"] {
    width: 100%;
    max-width: 980px;
    flex: 0 1 980px;
}

.login-card {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(250px, 0.85fr) minmax(390px, 1.15fr);
    grid-template-areas:
        "hero access"
        "hero form"
        "hero meta"
        "support support";
    align-items: center;
    column-gap: clamp(1rem, 2.5vw, 2.1rem);
    row-gap: 0.48rem;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.078), rgba(255, 255, 255, 0.02)),
        var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: clamp(1rem, 2vw, 1.45rem);
    box-shadow: var(--shadow);
    backdrop-filter: blur(26px);
    -webkit-backdrop-filter: blur(26px);
    transform: translateY(16px) scale(0.985);
    opacity: 0;
    animation: cardReveal 0.85s cubic-bezier(0.16, 1, 0.3, 1) 0.12s forwards;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.login-card::before {
    content: "";
    position: absolute;
    inset: 0;
    padding: 1px;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(111, 140, 255, 0.52), rgba(212, 175, 55, 0.22), transparent 55%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0.8;
    z-index: -1;
}

.login-card::after {
    content: "";
    position: absolute;
    width: 14rem;
    height: 14rem;
    right: -7rem;
    top: -7rem;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(65, 105, 225, 0.22), transparent 70%);
    filter: blur(4px);
    z-index: -1;
}

.login-card:hover,
.login-card:focus-within {
    border-color: var(--border-strong);
    transform: translateY(-2px) scale(1);
    box-shadow: 0 34px 105px rgba(0, 0, 0, 0.76), 0 0 0 1px rgba(65, 105, 225, 0.08), 0 0 64px rgba(65, 105, 225, 0.08);
}

.login-card-shine {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.08) 44%, transparent 58%);
    transform: translateX(-120%);
    animation: cardShine 6s ease-in-out infinite;
    z-index: -1;
}

.login-hero {
    grid-area: hero;
    min-height: 100%;
    margin-bottom: 0 !important;
    padding: 0.85rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-radius: 17px;
    background:
        radial-gradient(circle at 50% 18%, rgba(65, 105, 225, 0.18), transparent 42%),
        linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.015));
    border: 1px solid rgba(255, 255, 255, 0.07);
    animation: softFadeUp 0.75s ease 0.24s both;
}

.brand-icon {
    width: 54px;
    height: 54px;
    position: relative;
    display: inline-grid;
    place-items: center;
    border-radius: 17px;
    color: #fff;
    margin-bottom: 0.7rem !important;
    background: linear-gradient(145deg, rgba(65, 105, 225, 0.35), rgba(255, 255, 255, 0.06));
    border: 1px solid rgba(111, 140, 255, 0.28);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 18px 46px rgba(65, 105, 225, 0.22);
}

.brand-icon i {
    position: relative;
    z-index: 2;
    font-size: 1.45rem;
    background: linear-gradient(135deg, #ffffff 22%, var(--accent-3) 70%, var(--gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 18px rgba(65, 105, 225, 0.5));
    animation: rocketFloat 2.8s ease-in-out infinite;
}

.brand-icon-ring {
    position: absolute;
    inset: -5px;
    border-radius: 21px;
    border: 1px solid rgba(111, 140, 255, 0.18);
    animation: ringPulse 2.8s ease-in-out infinite;
}

.eyebrow {
    color: var(--gold);
    font-size: 0.62rem;
    font-weight: 900;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin-bottom: 0.25rem !important;
}

.brand-title {
    font-size: clamp(1.45rem, 3.6vw, 1.8rem);
    font-weight: 950;
    letter-spacing: -0.075em;
    margin-bottom: 0.1rem;
    background: linear-gradient(180deg, #ffffff 0%, #dbe5ff 52%, #93a8ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-subtitle {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.access-panel {
    grid-area: access;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.58rem 0.7rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.065);
    animation: softFadeUp 0.75s ease 0.34s both;
}

.access-panel h2 {
    font-size: 1rem;
    margin-bottom: 0.15rem !important;
}

.access-panel p {
    font-size: 0.76rem;
    line-height: 1.25;
}

.secure-pill {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
    color: #dce6ff;
    font-size: 0.66rem;
    font-weight: 800;
    padding: 0.3rem 0.5rem;
    border-radius: 999px;
    background: rgba(65, 105, 225, 0.14);
    border: 1px solid rgba(111, 140, 255, 0.2);
}

.secure-pill i {
    color: var(--gold);
}

.login-form {
    grid-area: form;
}

.form-field {
    opacity: 0;
    transform: translateY(10px);
    animation: softFadeUp 0.68s ease forwards;
    animation-delay: var(--delay, 0s);
}

.login-form .mb-3 {
    margin-bottom: 0.5rem !important;
}

.login-form .mb-4 {
    margin-bottom: 0.55rem !important;
}

.form-label {
    margin-bottom: 0.28rem !important;
    font-size: 0.74rem !important;
}

.input-shell {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    z-index: 3;
    color: var(--muted-2);
    font-size: 0.95rem;
    transform: translateY(-50%);
    transition: color 0.2s ease, transform 0.2s ease;
}

.ts-input {
    width: 100%;
    height: 42px;
    min-height: 42px;
    color: #fff !important;
    background: rgba(3, 5, 11, 0.58) !important;
    border: 1px solid rgba(255, 255, 255, 0.09) !important;
    border-radius: 13px;
    padding: 9px 13px 9px 42px;
    font-size: 0.88rem;
    outline: none;
    transition: border-color 0.22s ease, box-shadow 0.22s ease, background-color 0.22s ease, transform 0.22s ease !important;
}

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

.ts-input::placeholder {
    color: #526078;
}

.input-shell:focus-within .input-icon {
    color: var(--accent-3);
    transform: translateY(-50%) scale(1.03);
}

.ts-input:focus {
    border-color: rgba(111, 140, 255, 0.72) !important;
    box-shadow: 0 0 0 4px var(--accent-glow), 0 12px 34px rgba(65, 105, 225, 0.1) !important;
    background: rgba(8, 11, 22, 0.92) !important;
    transform: translateY(-1px);
}

.toggle-btn {
    position: absolute;
    right: 9px;
    top: 50%;
    z-index: 5;
    width: 30px;
    height: 30px;
    display: inline-grid;
    place-items: center;
    color: var(--muted);
    font-size: 0.9rem;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 10px;
    transform: translateY(-50%);
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.toggle-btn:hover,
.toggle-btn:focus-visible {
    color: #fff;
    background: rgba(65, 105, 225, 0.15);
    border-color: rgba(111, 140, 255, 0.28);
    transform: translateY(-50%) scale(1.03);
}

.form-check-input {
    width: 1.05rem;
    height: 1.05rem;
    margin-top: 0.16rem;
    cursor: pointer;
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.16);
    box-shadow: none !important;
}

.form-check-input:checked {
    background-color: var(--accent);
    border-color: var(--accent);
}

.form-check-label {
    color: var(--muted);
    font-size: 0.76rem;
    cursor: pointer;
    user-select: none;
}

.btn-launch {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 42px;
    color: #fff;
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    padding: 9px 15px;
    border-radius: 13px;
    background: linear-gradient(135deg, var(--accent), #2449c9 55%, #162c80);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 14px 36px rgba(65, 105, 225, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.18);
    transition: transform 0.22s ease, box-shadow 0.22s ease, filter 0.22s ease;
}

.btn-launch::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.24), transparent);
    transform: translateX(-120%);
    transition: transform 0.75s ease;
}

.btn-launch:hover,
.btn-launch:focus-visible {
    color: #fff;
    filter: saturate(1.08);
    transform: translateY(-2px);
    box-shadow: 0 20px 48px rgba(65, 105, 225, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.btn-launch:hover::before,
.btn-launch:focus-visible::before {
    transform: translateX(120%);
}

.btn-launch:active {
    transform: translateY(0);
}

.btn-launch i {
    transition: transform 0.2s ease;
}

.btn-launch:hover i {
    transform: translateX(4px);
}

.login-meta {
    grid-area: meta;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.38rem;
    margin-top: 0.35rem !important;
}

.meta-item {
    min-height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.42rem;
    color: #c9d5ee;
    font-size: 0.66rem;
    font-weight: 800;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.meta-item i {
    color: var(--accent-3);
}

.login-card > .text-center.mt-4 {
    grid-area: support;
    margin-top: 0 !important;
}

.login-card > .text-center.mt-4 p,
.login-card > .text-center.mt-4 a {
    font-size: 0.74rem !important;
}

.text-white-custom {
    color: #f4f7ff !important;
}

.text-muted-custom {
    color: var(--muted) !important;
}

.forgot-link,
.support-link {
    position: relative;
    color: var(--accent-3);
    font-size: 0.76rem;
    font-weight: 750;
    text-decoration: none;
    transition: color 0.2s ease;
}

.forgot-link::after,
.support-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -3px;
    width: 100%;
    height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.22s ease;
}

.forgot-link:hover,
.support-link:hover {
    color: #ffffff;
}

.forgot-link:hover::after,
.support-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

@keyframes cardReveal {
    from {
        opacity: 0;
        filter: blur(6px);
        transform: translateY(18px) scale(0.985);
    }
    to {
        opacity: 1;
        filter: blur(0);
        transform: translateY(0) scale(1);
    }
}

@keyframes softFadeUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes rocketFloat {
    0%, 100% {
        transform: translateY(0) rotate(-3deg);
    }
    50% {
        transform: translateY(-5px) rotate(3deg);
    }
}

@keyframes ringPulse {
    0%, 100% {
        opacity: 0.62;
        transform: scale(0.98);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
}

@keyframes livePulse {
    0%, 100% {
        opacity: 0.78;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.22);
    }
}

@keyframes shimmer {
    0%, 35% {
        transform: translateX(-120%);
    }
    65%, 100% {
        transform: translateX(120%);
    }
}

@keyframes cardShine {
    0%, 46% {
        opacity: 0;
        transform: translateX(-120%);
    }
    56% {
        opacity: 1;
    }
    72%, 100% {
        opacity: 0;
        transform: translateX(120%);
    }
}

@keyframes gridDrift {
    from {
        background-position: 0 0;
    }
    to {
        background-position: 44px 44px;
    }
}

@keyframes pageSweep {
    0%, 60% {
        opacity: 0;
        transform: translateX(-110%);
    }
    72% {
        opacity: 0.5;
    }
    100% {
        opacity: 0;
        transform: translateX(110%);
    }
}

@keyframes floatOrb {
    0%, 100% {
        transform: translate3d(0, 0, 0) scale(1);
    }
    50% {
        transform: translate3d(16px, -18px, 0) scale(1.05);
    }
}

@media (max-height: 760px) and (min-width: 768px) {
    .site-navbar {
        min-height: 50px;
    }

    .site-navbar .container {
        min-height: 50px;
    }

    .brand-mark {
        width: 32px;
        height: 32px;
        border-radius: 12px;
    }

    .site-brand {
        font-size: 1rem;
    }

    .nav-status {
        padding: 5px 12px;
        font-size: 0.65rem;
    }

    .login-stage {
        padding-top: 3.65rem;
        padding-bottom: 0.45rem;
    }

    .login-card {
        padding: 0.85rem;
    }

    .login-hero {
        padding: 0.65rem;
    }

    .brand-icon {
        width: 46px;
        height: 46px;
        margin-bottom: 0.55rem !important;
    }

    .brand-icon i {
        font-size: 1.25rem;
    }

    .brand-title {
        font-size: 1.38rem;
    }

    .brand-subtitle {
        font-size: 0.72rem;
    }

    .access-panel {
        padding: 0.48rem 0.62rem;
    }

    .access-panel h2 {
        font-size: 0.96rem;
    }

    .access-panel p,
    .form-label,
    .form-check-label,
    .forgot-link,
    .support-link,
    .text-muted-custom.small {
        font-size: 0.72rem !important;
    }

    .ts-input,
    .btn-launch {
        height: 38px;
        min-height: 38px;
    }

    .login-meta {
        display: none;
    }
}

@media (max-width: 767.98px) {
    .login-stage {
        padding-top: 4.35rem;
        padding-bottom: 0.9rem;
    }

    .login-stage [class*="col-"] {
        max-width: 560px;
        flex-basis: auto;
    }

    .login-card {
        display: block;
        padding: 1rem;
        border-radius: 20px;
        background: rgba(10, 12, 20, 0.78);
    }

    .login-hero {
        min-height: auto;
        margin-bottom: 0.9rem !important;
        padding: 0;
        background: transparent;
        border: 0;
    }

    .access-panel {
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 0.75rem;
    }

    .brand-icon {
        width: 52px;
        height: 52px;
        border-radius: 18px;
    }

    .brand-icon-ring {
        border-radius: 22px;
    }

    .brand-title {
        font-size: 1.42rem;
    }

    .brand-subtitle {
        font-size: 0.78rem;
    }

    .login-meta {
        display: none;
    }

    .login-card > .text-center.mt-4 {
        margin-top: 0.75rem !important;
    }
}

@media (max-width: 575.98px) {
    .site-brand {
        font-size: 1rem;
    }

    .brand-mark {
        width: 34px;
        height: 34px;
        border-radius: 12px;
    }

    .login-stage {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .login-card {
        padding: 0.95rem;
    }

    .ts-input {
        height: 42px;
        min-height: 42px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
/* Secure Lock Graphic Core Target */
.brand-icon .bi-secure-lock {
    width: 1.6rem;
    height: 1.6rem;
    position: relative;
    z-index: 2;
    color: #ffffff;
    filter: drop-shadow(0 0 16px rgba(65, 105, 225, 0.65));
    animation: rocketFloat 2.8s ease-in-out infinite;
}

/* Subtle mechanical tension animation on the lock shackle */
.brand-icon .bi-secure-lock .lock-shackle {
    animation: lockSecure 2.8s ease-in-out infinite;
    transform-origin: bottom center;
}

@keyframes lockSecure {
    0%, 100% {
        transform: translateY(0);
        opacity: 0.85;
    }
    50% {
        transform: translateY(0.5px);
        opacity: 1;
        color: var(--accent-3);
    }
}