:root {
    --login-primary: #126f8f;
    --login-primary-dark: #0b4863;
    --login-accent: #20a39e;
    --login-gold: #d99b32;
    --login-ink: #111827;
    --login-muted: #64748b;
    --login-line: #d8e2e7;
    --login-surface: #ffffff;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    font-family: "Segoe UI", Inter, Arial, sans-serif;
    color: var(--login-ink);
    background: #edf5f7;
}

.login-page :is(h1, h2, h3, h4, h5, h6, p, label, span, a, button, input, div) {
    font-weight: 500 !important;
}

.app-loader-overlay {
    position: fixed;
    inset: 0;
    z-index: 20000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent !important;
    backdrop-filter: none !important;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.16s ease, visibility 0.16s ease;
}

.app-loader-overlay.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.app-loader-card {
    position: relative;
    width: 132px;
    height: 132px;
    min-width: 132px;
    min-height: 132px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent !important;
    box-shadow: none;
    color: #16d9c2;
    font-weight: 500;
}

.app-loader-spinner {
    position: absolute;
    inset: 0;
    width: 132px;
    height: 132px;
    border: 8px solid rgba(12, 214, 184, 0.22);
    border-top-color: #09f3bd;
    border-right-color: #00d5ff;
    border-radius: 50%;
    box-shadow:
        0 0 16px rgba(0, 245, 189, 0.7),
        inset 0 0 18px rgba(0, 213, 255, 0.35);
    animation: app-loader-spin 0.9s linear infinite;
}

.app-loader-text {
    position: relative;
    z-index: 1;
    display: block;
    color: #09d7ce;
    font-size: 1.12rem;
    font-weight: 850;
    letter-spacing: 0;
    text-shadow: 0 0 12px rgba(0, 245, 189, 0.5);
}

.app-loader-text::first-letter {
    color: #f6c64a;
}

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

.page-wrapper {
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.login-shell {
    width: min(824px, 100%);
    min-height: 492px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.45);
    border-radius: 0;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.2);
}

.login-card {
    min-height: 492px;
    padding: 24px 50px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 251, 250, 0.98)),
        var(--login-surface);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-card-header {
    margin-bottom: 12px;
}

.brand-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 2px;
}

.brand-logo {
    width: 56px;
    height: 72px;
    object-fit: contain;
    flex: 0 0 auto;
    filter: drop-shadow(0 10px 20px rgba(18, 111, 143, 0.16));
}

.brand-row h1 {
    margin: 0;
    color: #14315f;
    font-size: 1.48rem;
    font-weight: 850;
    line-height: 1.05;
    letter-spacing: 0;
    white-space: nowrap;
}

.brand-row h1 span {
    color: var(--login-primary);
}

.login-page .login-title {
    color: var(--login-ink);
    font-size: 1rem;
    line-height: 1.12;
    font-weight: 500;
    letter-spacing: 0;
}

.welcome-msg {
    max-width: 310px;
    margin-top: 6px;
    color: #475569;
    font-size: 0.84rem;
    line-height: 1.35;
}

.login-form {
    width: 100%;
}

.input-field-wrapper {
    margin-bottom: 8px;
}

.input-field-wrapper label {
    display: block;
    margin-bottom: 5px;
    color: #243244;
    font-size: 0.82rem;
    font-weight: 500;
}

.input-control {
    position: relative;
}

.premium-input {
    width: 100%;
    min-height: 40px;
    padding: 8px 38px 8px 42px;
    color: var(--login-ink);
    background: #f8fbfc;
    border: 1px solid var(--login-line);
    border-radius: 8px;
    font-size: 0.92rem;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.premium-input::placeholder {
    color: #94a3b8;
}

.premium-input:focus {
    outline: none;
    background: #fff;
    border-color: var(--login-primary);
    box-shadow: 0 0 0 4px rgba(18, 111, 143, 0.14);
}

.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    color: #7b8da1;
    font-size: 0.92rem;
    transform: translateY(-50%);
    pointer-events: none;
}

.input-control:focus-within .input-icon {
    color: var(--login-primary);
}

.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    transform: translateY(-50%);
}

.password-toggle:hover,
.password-toggle:focus {
    outline: none;
    background: rgba(18, 111, 143, 0.1);
    color: var(--login-primary-dark);
}

.captcha-row {
    display: grid;
    grid-template-columns: minmax(112px, 0.78fr) minmax(92px, 0.62fr);
    gap: 8px;
    align-items: stretch;
}

.captcha-question {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid #c9d8df;
    border-radius: 7px;
    background: #edf6f8;
    color: #16394a;
    font-size: 0.9rem;
    font-weight: 850;
    letter-spacing: 2px;
    user-select: none;
}

.captcha-question i {
    color: var(--login-primary);
}

.captcha-refresh {
    width: 25px;
    height: 25px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 2px;
    border: 0;
    border-radius: 7px;
    background: rgba(18, 111, 143, 0.1);
    color: var(--login-primary-dark);
    cursor: pointer;
}

.captcha-refresh:hover,
.captcha-refresh:focus {
    outline: none;
    background: rgba(18, 111, 143, 0.18);
}

.captcha-refresh:disabled {
    cursor: wait;
    opacity: 0.72;
}

.captcha-refresh i {
    color: inherit;
}

.captcha-spin {
    animation: captcha-spin 0.7s linear infinite;
}

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

.captcha-input {
    padding-left: 14px;
    padding-right: 14px;
    text-align: center;
    text-transform: uppercase;
}

.btn-premium-login {
    width: 100%;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 6px;
    border: 1px solid #0f607e;
    border-radius: 8px;
    background: linear-gradient(90deg, var(--login-primary-dark), var(--login-primary), var(--login-accent));
    color: #fff;
    font-size: 0.92rem;
    font-weight: 850;
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(18, 111, 143, 0.22);
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.btn-premium-login:hover,
.btn-premium-login:focus {
    transform: translateY(-1px);
    filter: brightness(0.98);
    box-shadow: 0 16px 28px rgba(18, 111, 143, 0.28);
}

.login-options-row {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: flex-end;
    margin: -2px 0 10px;
}

.login-options-row a {
    color: var(--login-primary-dark);
    font-size: 0.78rem;
    font-weight: 500;
    text-decoration: none;
}

.login-options-row a:hover,
.login-options-row a:focus {
    color: var(--login-primary);
    text-decoration: underline;
}

.remember-option {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 0 auto 0 0;
    color: #334155;
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
}

.remember-option input {
    width: 15px;
    height: 15px;
    margin: 0;
    accent-color: var(--login-primary);
    cursor: pointer;
}

.login-assurance {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.login-assurance span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 26px;
    padding: 4px 8px;
    border: 1px solid #d7e5ea;
    border-radius: 7px;
    background: #f7fbfc;
    color: #466174;
    font-size: 0.7rem;
    font-weight: 500;
}

.login-assurance i {
    color: var(--login-primary);
}

.login-visual-panel {
    position: relative;
    min-height: 492px;
    overflow: hidden;
    isolation: isolate;
    background: #0f2333;
}

.visual-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    background-image: var(--slide-image);
    background-position: center;
    background-size: cover;
    transform: none;
    transition: opacity 0.7s ease;
    z-index: 0;
}

.visual-security-slide {
    background-position: center;
}

.visual-factory-slide {
    background-position: center;
}

.visual-slide.is-active {
    opacity: 1;
}

.login-visual-panel::after {
    content: none;
}

.visual-content {
    position: absolute;
    left: 26px;
    right: 26px;
    bottom: 26px;
    color: #fff;
}

.visual-badge {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 28px;
    padding: 5px 9px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(12px);
    color: #eaf7fb;
    font-size: 0.72rem;
    font-weight: 850;
}

.visual-content h2 {
    max-width: 420px;
    margin: 12px 0 7px;
    font-size: clamp(1.42rem, 2.6vw, 2.05rem);
    line-height: 1.06;
    font-weight: 850;
    letter-spacing: 0;
}

.visual-content p {
    max-width: 380px;
    margin: 0;
    color: rgba(238, 247, 250, 0.9);
    font-size: 0.82rem;
    line-height: 1.42;
}

.visual-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    max-width: 390px;
    margin-top: 12px;
}

.visual-metrics div {
    min-height: 56px;
    padding: 9px 10px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    background: rgba(8, 20, 31, 0.42);
    backdrop-filter: blur(14px);
}

.visual-metrics strong {
    display: block;
    color: #fff;
    font-size: 1rem;
    line-height: 1.1;
}

.visual-metrics span {
    display: block;
    margin-top: 5px;
    color: rgba(238, 247, 250, 0.78);
    font-size: 0.68rem;
    font-weight: 750;
}

.visual-dots {
    position: absolute;
    right: 22px;
    top: 22px;
    display: flex;
    gap: 8px;
}

.visual-dots button {
    width: 22px;
    height: 5px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.42);
    cursor: pointer;
}

.visual-dots button.is-active {
    background: #fff;
}

.alert-danger {
    background: #fff1f2;
    color: #b4233a;
    border-radius: 8px;
}

.alert-danger.validation-summary-valid {
    display: none;
}

.login-confirm-modal {
    border: 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 22px 54px rgba(15, 23, 42, 0.28);
}

.login-confirm-header {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 18px 20px 10px;
}

.login-confirm-icon {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 42px;
    border-radius: 10px;
    background: #e8f6f7;
    color: var(--login-primary-dark);
    font-size: 1.18rem;
}

.login-confirm-modal .modal-title {
    margin: 0;
    color: var(--login-ink);
    font-size: 1.05rem;
    line-height: 1.2;
}

.login-confirm-subtitle {
    margin-top: 3px;
    color: var(--login-muted);
    font-size: 0.78rem;
}

.login-confirm-body {
    padding: 8px 20px 12px;
}

.login-confirm-message {
    margin: 0 0 12px;
    color: #243244;
    font-size: 0.9rem;
    line-height: 1.45;
}

.login-confirm-details {
    display: grid;
    gap: 8px;
    padding: 12px;
    border: 1px solid #d8e7ec;
    border-radius: 10px;
    background: #f7fbfc;
}

.login-confirm-details div {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
}

.login-confirm-details span {
    color: var(--login-muted);
    font-size: 0.76rem;
}

.login-confirm-details strong {
    min-width: 0;
    color: var(--login-ink);
    font-size: 0.8rem;
    overflow-wrap: anywhere;
}

.login-confirm-note {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    margin-top: 12px;
    padding: 10px 12px;
    border: 1px solid #f0d99c;
    border-radius: 10px;
    background: #fff8e8;
    color: #7a4d05;
    font-size: 0.8rem;
    line-height: 1.42;
}

.login-confirm-note i {
    margin-top: 1px;
    color: #b7791f;
}

.login-confirm-footer {
    gap: 8px;
    padding: 4px 20px 18px;
}

.login-confirm-footer .btn {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border-radius: 8px;
}

.smallest {
    font-size: 10px;
}

@media (max-width: 980px) {
    .login-shell {
        max-width: 560px;
        grid-template-columns: 1fr;
    }

    .login-card {
        min-height: auto;
        padding: 24px 22px;
    }

    .login-visual-panel {
        min-height: 320px;
        order: -1;
    }

    .visual-content {
        left: 22px;
        right: 22px;
        bottom: 22px;
    }
}

@media (max-width: 560px) {
    .page-wrapper {
        padding: 14px;
    }

    .login-shell {
        min-height: auto;
        border-radius: 0;
    }

    .login-card {
        padding: 28px 20px;
    }

    .brand-row {
        gap: 12px;
        margin-bottom: 18px;
    }

    .brand-logo {
        width: 68px;
        height: 88px;
    }

    .brand-row h1 {
        font-size: 1.12rem;
    }

    .login-visual-panel {
        min-height: 230px;
    }

    .visual-content {
        left: 20px;
        right: 20px;
        bottom: 20px;
    }

    .visual-content h2 {
        font-size: 1.32rem;
    }

    .captcha-row {
        grid-template-columns: 1fr;
    }

    .login-options-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .login-confirm-details div {
        grid-template-columns: 1fr;
        gap: 2px;
    }

    .login-confirm-footer {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .login-confirm-footer .btn,
    .login-confirm-footer form {
        width: 100%;
    }

    .visual-metrics {
        grid-template-columns: 1fr;
        gap: 7px;
        margin-top: 18px;
    }

    .visual-metrics div {
        min-height: auto;
        padding: 10px 12px;
    }
}
