:root {
    --bg-main: #0D2042;
    --panel-bg: #1A2D55;
    --panel-border: #253654;
    --btn-bg: #B94C27;
    --text-light: #ffffff;
    --text-dark: #000000;
}

body {
    background: var(--bg-main);
    color: var(--text-light);
    overflow-x: hidden;
}

.login-shell {
    position: relative;
    min-height: 100vh;
    padding: 48px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.login-shell .container {
    display: flex;
    justify-content: center;
    width: 100%;
    max-width: 100%;
}

.language-switcher {
    position: fixed;
    top: 18%;
    right: 0;
    z-index: 1000;
    transform: translateY(-18%);
    padding: 0.6rem 0.5rem;
    margin: 0;
    width: auto;
    max-width: none;
    background: #243557;
    border-radius: 10px 0 0 14px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.25);
    text-align: center;
}

.language-switcher a {
    display: block;
    margin: 0.5rem 0.6rem;
    opacity: 0.9;
}

.language-switcher a:hover {
    opacity: 1;
}

.language-switcher img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #cfd4e3;
    box-shadow: 0 1px 3px rgba(0,0,0,0.25);
    object-fit: cover;
}

.language-switcher .active img {
    border: 1px solid #ffffff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.35);
}

.login-frame {
    position: relative;
    display: inline-block;
    margin: 0 auto;
}

.login-frame::before,
.login-frame::after {
    content: "";
    position: absolute;
    width: 620px;
    height: 620px;
    border-radius: 50%;
    z-index: 2;
    filter: blur(2px);
    opacity: 0.8;
    pointer-events: none;
}

.login-frame::before {
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(148, 73, 50, 0.9) 0%, rgba(13, 32, 66, 0) 68%);
}

.login-frame::after {
    bottom: 0;
    right: 0;
    transform: translate(50%, 50%);
    background: radial-gradient(circle, rgba(35, 59, 107, 0.95) 0%, rgba(13, 32, 66, 0) 70%);
}

.login-card {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: 0;
    max-width: 1080px;
    margin: 0 auto;
    background: var(--panel-bg);
    border: 25px solid var(--panel-border);
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(7, 16, 37, 0.45);
}

.login-image {
    position: relative;
    height: 100%;
    min-height: 80px;
}

.login-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.login-content {
    padding: 10px 36px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.login-logo {
    max-width: 220px;
    display: block;
    margin: 28px auto 8px;
}

.login-title {
    margin: 0 0 6px;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-light);
    text-align: center;
}

.login-form label {
    font-size: 0.9rem;
    margin-bottom: 3px;
    color: var(--text-light);
}

.login-form {
    width: 100%;
    max-width: 380px;
    margin: 0 auto;
}

.login-form .form-control {
    background: #ffffff;
    color: var(--text-dark);
    border: 1px solid #d8dce6;
    padding: 6px 10px;
    border-radius: 6px;
}

.login-form .form-control:focus {
    border-color: #e2e6f2;
    box-shadow: 0 0 0 0.2rem rgba(185, 76, 39, 0.2);
}

.password-field {
    position: relative;
}

.password-field .form-control {
    padding-right: 42px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    width: 30px;
    height: 30px;
    padding: 5px;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: #495057;
    cursor: pointer;
}

.password-toggle svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.password-toggle-hide,
.password-toggle[aria-pressed="true"] .password-toggle-show {
    display: none;
}

.password-toggle[aria-pressed="true"] .password-toggle-hide {
    display: block;
}

.button-login {
    background: var(--btn-bg) !important;
    color: #ffffff;
    border: none;
    padding: 9px 14px;
    border-radius: 6px;
    font-weight: 600;
    letter-spacing: 0.02em;
    width: 100%;
    max-width: 380px;
}

.button-login:hover,
.button-login:focus,
.button-login:active,
.button-login:focus-visible {
    background: var(--btn-bg) !important;
    color: #ffffff !important;
    box-shadow: none;
}

.login-button {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.login-alerts .alert {
    margin-top: 12px;
}

.login-form .form-text a {
    color: #ffffff;
}

.login-form .form-text a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.login-legal-links {
    position: relative;
    z-index: 3;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: .35rem 1rem;
    margin: 18px auto 0;
    text-align: center;
    max-width: 900px;
}

.login-legal-links a {
    color: rgba(255, 255, 255, .72);
    font-size: .84rem;
    text-decoration: none;
}

.login-legal-links a:hover,
.login-legal-links a:focus {
    color: #ffffff;
    text-decoration: underline;
}

.modal-open {
    padding-right: 0 !important;
}

.modal-open .modal {
    padding-right: 0 !important;
}

.modal {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.modal-body {
    overflow-x: hidden;
    word-break: break-word;
}

@media (max-width: 991px) {
    .login-card {
        grid-template-columns: 1fr;
        max-width: 560px;
        width: 100%;
        border-width: 18px;
    }

    .login-image {
        display: none;
    }

    .login-content {
        padding: 36px 28px 32px;
    }

    .login-frame::before,
    .login-frame::after {
        width: 420px;
        height: 420px;
    }
}

@media (max-width: 575px) {
    .login-frame::before,
    .login-frame::after {
        display: none;
    }

    .login-shell {
        padding: 32px 12px;
    }

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

    .login-card {
        max-width: 100%;
        width: 100%;
        border-width: 14px;
    }

    .login-frame {
        width: 100%;
    }

    .login-form {
        max-width: 100%;
    }

    .button-login {
        max-width: 100%;
    }

    .modal-dialog {
        width: 100vw !important;
        max-width: 100vw !important;
        margin: 0 !important;
        padding: 0;
    }

    .modal-content {
        width: 100%;
        padding: 6px 12px;
        border-radius: 0;
    }
}

@media (max-width: 768px) {
    .language-switcher {
        top: 5%;
        transform: translateY(-10%);
        padding: 0.5rem 0.45rem;
        border-radius: 12px 0 0 12px;
    }
    .language-switcher img {
        width: 34px;
        height: 34px;
    }
}
