:root {
    --tc-blue: #0d2042;
    --tc-blue-soft: #1a2d55;
    --tc-blue-border: #253654;
    --tc-copper: #b94c27;
    --tc-copper-light: #d2814e;
    --tc-copper-dark: #883f24;
    --tc-graphite: #323032;
    --tc-light: #ededed;
    --tc-white: #ffffff;
}

* {
    box-sizing: border-box;
}

html,
.tc-login-body {
    min-height: 100%;
    margin: 0;
}

.tc-login-body {
    min-height: 100vh;
    background: var(--tc-blue);
    color: var(--tc-white);
    font-family: Arial, Helvetica, sans-serif;
    overflow-x: hidden;
}

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

.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);
}

.tc-login-frame {
    position: relative;
    display: inline-block;
    width: min(1080px, 100%);
    margin: 0 auto;
}

.tc-login-frame::before,
.tc-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;
}

.tc-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%);
}

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

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

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

.tc-login-image::after {
    content: none;
}

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

.tc-login-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 10px 36px 20px;
    background: var(--tc-blue-soft);
}

.tc-login-logo {
    width: min(220px, 74%);
    height: auto;
    display: block;
    margin: 28px auto 8px;
}

.tc-login-content h1 {
    margin: 0 0 4px;
    color: var(--tc-white);
    font-size: 1.48rem;
    line-height: 1.2;
    font-weight: 600;
    text-align: center;
}

.tc-login-content p {
    max-width: 390px;
    margin: 0 0 8px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.9rem;
    line-height: 1.45;
    text-align: center;
}

.tc-login-form {
    width: 100%;
    max-width: 380px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tc-login-form label {
    margin-bottom: 0;
    color: var(--tc-white);
    font-size: 0.9rem;
    font-weight: 700;
}

.tc-login-form input {
    width: 100%;
    min-height: 38px;
    padding: 6px 10px;
    border: 1px solid #d8dce6;
    border-radius: 6px;
    outline: none;
    background: #ffffff;
    color: #000000;
    font-size: 15px;
    transition: border-color 140ms ease, box-shadow 140ms ease;
}

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

.tc-login-form button {
    width: 100%;
    min-height: 42px;
    margin-top: 10px;
    border: 0;
    border-radius: 6px;
    background: var(--tc-copper);
    color: var(--tc-white);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: filter 140ms ease;
}

.tc-login-form button:hover {
    filter: brightness(1.06);
}

.tc-login-form .tc-login-reset-link {
    min-height: 0;
    margin: 4px 0 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--tc-white);
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.tc-login-form .tc-login-reset-link:hover,
.tc-login-form .tc-login-reset-link:focus {
    text-decoration: underline;
    filter: none;
}

.tc-login-alert {
    width: 100%;
    max-width: 380px;
    margin: 2px auto 8px;
    padding: 10px 12px;
    border: 1px solid rgba(210, 129, 78, 0.5);
    border-radius: 6px;
    background: rgba(136, 63, 36, 0.22);
    color: #ffd9c5;
    font-size: 14px;
    line-height: 1.5;
}

.tc-login-success {
    width: 100%;
    max-width: 380px;
    margin: 2px auto 8px;
    padding: 10px 12px;
    border: 1px solid rgba(137, 205, 159, 0.5);
    border-radius: 6px;
    background: rgba(31, 103, 69, 0.24);
    color: #d8ffe6;
    font-size: 14px;
    line-height: 1.5;
}

.tc-login-meta {
    margin-top: 8px;
    color: rgba(237, 237, 237, 0.72);
    font-size: 12px;
}

.tc-login-legal {
    position: relative;
    z-index: 3;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 18px;
    margin-top: 18px;
    font-size: 13px;
}

.tc-login-legal a {
    color: rgba(237, 237, 237, 0.78);
    text-decoration: none;
}

.tc-login-legal a:hover {
    color: var(--tc-white);
    text-decoration: underline;
}

.tc-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 48px 16px;
    background: rgba(0, 0, 0, 0.45);
}

.tc-modal.is-open {
    display: flex;
}

.tc-modal-dialog {
    width: min(500px, 100%);
    margin-top: 6vh;
    overflow: hidden;
    border-radius: 6px;
    background: lightblue;
    color: #000000;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
}

.tc-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}

.tc-modal-header h2 {
    margin: 0;
    color: #000000;
    font-size: 1.25rem;
    line-height: 1.2;
}

.tc-modal-close {
    width: 34px;
    height: 34px;
    border: 0;
    background: transparent;
    color: #000000;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.tc-modal-body {
    padding: 18px;
}

.tc-modal-body p {
    margin: 0 0 16px;
    color: #000000;
    font-size: 15px;
    line-height: 1.45;
    text-align: left;
}

.tc-reset-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tc-reset-form label {
    color: #000000;
    font-size: 15px;
    font-weight: 700;
}

.tc-reset-form input {
    width: 100%;
    min-height: 38px;
    padding: 6px 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    background: #ffffff;
    color: #000000;
    font-size: 15px;
}

.tc-reset-form button {
    align-self: flex-start;
    min-height: 38px;
    margin-top: 8px;
    padding: 7px 14px;
    border: 1px solid #0062cc;
    border-radius: 4px;
    background: #007bff;
    color: #ffffff;
    font-size: 15px;
    cursor: pointer;
}

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

    .tc-login-image {
        display: none;
    }

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

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

@media (max-width: 520px) {
    .tc-login-shell {
        padding: 32px 12px;
    }

    .tc-login-frame::before,
    .tc-login-frame::after {
        display: none;
    }

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

    .tc-login-content h1 {
        font-size: 1.36rem;
    }

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

@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;
    }
}
