.login-container {
    --drive-blue: var(--primary);
    --drive-blue-2: var(--brand-blue-2);
    --drive-blue-soft: var(--ui-header-action-hover-bg);
    --drive-bg: var(--ui-bg);
    --drive-text: var(--ui-text);
    --drive-muted: var(--ui-muted);
    --drive-border: var(--ui-border);
    --drive-green: var(--success);
}

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    position: relative;
    isolation: isolate;
    background-color: #eaf0f7;
    background-image:
        linear-gradient(115deg, rgba(8, 25, 48, 0.52), rgba(8, 25, 48, 0.16)),
        radial-gradient(circle at top left, rgba(var(--bs-primary-rgb), 0.08), transparent 24%),
        radial-gradient(circle at bottom right, rgba(var(--bs-primary-rgb), 0.1), transparent 24%),
        repeating-linear-gradient(
            -45deg,
            #fbfdff,
            #fbfdff 4px,
            #f3f7fd 4px,
            #f3f7fd 8px
        );
}

.login-container::before {
    position: absolute;
    z-index: -1;
    inset: 0;
    background-image: linear-gradient(115deg, rgba(8, 25, 48, 0.52), rgba(8, 25, 48, 0.16)), var(--login-background-image, none);
    background-position: center;
    background-size: cover;
    content: "";
    transition: opacity 350ms ease;
}

.login-background-change {
    position: fixed;
    z-index: 10;
    right: 18px;
    bottom: 18px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 9px 14px;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 999px;
    background: rgba(18, 35, 57, 0.76);
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.2);
    font: inherit;
    cursor: pointer;
    backdrop-filter: blur(1px);
}

.login-background-change:hover { background: rgba(18, 35, 57, 0.92); }
.login-background-change:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.login-background-change:disabled { cursor: wait; opacity: 0.5; }

@media (prefers-reduced-motion: reduce) {
    .login-container::before { transition: none; }
}

.login-shell {
    width: 100%;
    max-width: 840px;
}

.login-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 410px;
    /* min-width: 450px; */
    background: rgba(255, 255, 255, 0.2);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0, 25, 48, 0.38),
                0 8px 24px rgba(0, 25, 48, 0.22),
                inset 0 1px 0 rgba(255, 255, 255, 0.18);
    animation: slideUp 0.55s ease-out;
}

.login-shell.login-shell-single {
    max-width: 420px;
}

.login-shell-single .login-card {
    grid-template-columns: minmax(0, 1fr);
}

.login-panel {
    padding: 28px;
}

.login-panel-info {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.24), rgba(245, 248, 252, 0.1));
    -webkit-backdrop-filter: blur(1px);
    backdrop-filter: blur(1px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.support-badge {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 18px;
}

.support-icon {
    width: 52px;
    height: 52px;
    border: 2px solid var(--drive-blue-2);
    color: var(--drive-blue-2);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    font-weight: 800;
    box-shadow: inset 0 0 0 4px rgba(66, 133, 244, 0.12);
}

.support-title {
    text-align: center;
    /* justify-content: center; */
    color: var(--brand-blue);
    font-size: 1.7rem;
    font-weight: 700;
    line-height: 1.3;
    text-transform: uppercase;
    margin-top: 6px;
}

.support-subtitle {
    color: var(--drive-muted);
    font-size: 0.92rem;
    margin-top: 4px;
}

.support-box {
    margin-top: 26px;
    border: 1px solid #e0e6ef;
    border-radius: 12px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.48);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(1px);
}

.support-box-title {
    color: var(--drive-blue);
    text-align: center;
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    margin-bottom: 10px;
}

.support-row {
    display: grid;
    grid-template-columns: minmax(130px, 1.2fr) 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 8px 0;
    border-top: 1px dashed #e1e6ee;
    font-size: 0.82rem;
    color: #4e5a63;
}

.support-row:first-of-type {
    border-top: none;
}

.support-row strong {
    color: var(--drive-blue);
    font-size: 0.85rem;
}

.support-row small {
    color: #7a858d;
    white-space: nowrap;
}

.support-note {
    margin-top: 24px;
    color: var(--drive-muted);
    font-size: 0.9rem;
    line-height: 1.7;
}

.login-panel-form {
    background: linear-gradient(
        160deg,
        color-mix(in srgb, var(--ui-brand) 65%, transparent) 0%,
        color-mix(in srgb, var(--brand-blue) 50%, transparent) 55%,
        color-mix(in srgb, var(--brand-blue-dark) 75%, transparent) 100%
    );
    -webkit-backdrop-filter: blur(1px);
    backdrop-filter: blur(1px);
    color: #fff !important;
    display: flex;
    flex-direction: column;
}

.login-topbar {
    display: flex;
    justify-content: flex-end;
}

.language-chip {
    border: 1px solid rgba(255, 255, 255, 0.48);
    border-radius: 999px;
    padding: 2px 10px;
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.8rem;
    cursor: default;
}

.login-header {
    text-align: center;
    margin: 18px 0 22px;
}

.brand-mark {
    line-height: 1;
}

.brand-logo {
    width: 100px;
    height: auto;
    object-fit: contain;
    /* filter: brightness(0) invert(1); */
}

.login-subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.82rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin: 6px 0 0;
}

.login-form {
    margin-bottom: 16px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group.compact {
    margin-bottom: 14px;
}

.form-label {
    display: block;
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.83rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.input-shell {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #9aa4ab;
    font-size: 0.95rem;
    z-index: 1;
    pointer-events: none;
}

.form-control {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.58);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.78);
    color: #21313b;
    font-size: 0.95rem;
    padding: 11px 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.has-icon {
    padding-left: 42px !important;
    padding-right: 42px;
}

.form-control:focus {
    outline: none;
    border-color: var(--drive-blue);
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.2);
}

.form-control.is-invalid {
    border-color: #ffaeae;
    background: rgba(255, 245, 245, 0.94);
}

.password-input-container {
    position: relative;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: #8b97a0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
}

.password-toggle:hover {
    background: rgba(0, 0, 0, 0.06);
}

.login-actions-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 10px 0 16px;
}

.login-panel-form > a.btn-light {
    background: rgba(255, 255, 255, 0.76) !important;
    -webkit-backdrop-filter: blur(1px);
    backdrop-filter: blur(1px);
}

.form-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.form-check-input {
    width: 16px;
    height: 16px;
    accent-color: #ffd39a;
}

.form-check-label,
.forgot-link {
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.82rem;
}

.forgot-link {
    white-space: nowrap;
}

.btn-login {
    width: 100%;
    border: none;
    border-radius: 4px;
    padding: 11px 16px;
    background: linear-gradient(180deg, #ff7800, #e97510);
    color: #ffffff;
    font-size: 0.96rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.btn-login:hover:not(:disabled) {
    box-shadow: 0 12px 24px rgba(26, 232, 181, 0.28);
    transform: translateY(-1px);
    color:var(--drive-blue);
    /* border: 1px solid var(--drive-blue); */
    /* -webkit-text-stroke: 1px #ece3e3;
     */
     text-shadow: 
    -1px -1px 0 #f1ebeb,  
     1px -1px 0 #f1ebeb,
    -1px  1px 0 #f1ebeb,
     1px  1px 0 #f1ebeb;
}

.btn-login:disabled {
    opacity: 0.72;
}

.btn-loader {
    display: flex;
    justify-content: center;
}

.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(26, 115, 232, 0.25);
    border-top-color: var(--drive-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.alert {
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 14px;
    font-size: 0.82rem;
    border: none;
}

.alert-danger {
    background: rgba(255, 241, 241, 0.95) !important;
    color: #b12b48;
}

.alert-success {
    background: rgba(239, 255, 245, 0.95);
    color: var(--drive-green);
}

.error-list {
    margin: 0;
    padding-left: 18px;
}

.error-list li + li {
    margin-top: 4px;
}

.invalid-feedback {
    color: #ffe6e8;
    font-size: 0.8rem;
    margin-top: 5px;
}

.login-footer {
    margin-top: auto;
    text-align: center;
    padding-top: 12px;
}

.footer-text {
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.82rem;
    line-height: 1.7;
    margin: 0 0 12px;
}

.copyright {
    color: rgba(255, 255, 255, 0.64);
    font-size: 0.76rem;
    margin: 0;
}

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

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

.form-control:focus,
.form-check-input:focus,
.btn-login:focus,
.password-toggle:focus {
    outline: 2px solid #aecbfa;
    outline-offset: 2px;
}

@media (max-width: 860px) {
    .login-card {
        grid-template-columns: 1fr;
    }

    .login-panel-info {
        order: 2;
    }

    .login-panel-form {
        order: 1;
    }
}

@media (max-width: 520px) {
    .login-container {
        padding: 14px;
    }

    .login-panel {
        padding: 20px 18px;
    }

    .support-row {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .login-actions-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .brand-mark {
        font-size: 1.9rem;
    }
}
