.tce-auth {
    --nvy:        #0B1A34;
    --nvy-hover:  #14274A;
    --ink:        #0B1A34;
    --steel:      #5B6A83;
    --line:       #DCE1EA;
    --surface:    #FFFFFF;
    --accent:     #2F6FED;
    --accent-ink: #1E4FB0;
    --danger-bg:  #FDECEC;
    --danger-ink: #9B1C1C;
    --danger-line:#F4C9C9;
    --ok-bg:      #E9F6EE;
    --ok-ink:     #1E6C3B;
    --ok-line:    #C3E6D0;

    font-family: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--ink);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;

    background:
        radial-gradient(1100px 520px at 50% -10%, #FFFFFF 0%, rgba(255,255,255,0) 60%),
        linear-gradient(180deg, #F4F6FB 0%, #E7ECF4 100%);
}

.tce-auth__centered {
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.tce-auth__logo {
    width: 210px;
    height: auto;
    display: block;
    margin: 0 auto 14px;
}
.tce-auth__title {
    font-family: "Archivo", sans-serif;
    font-weight: 800;
    font-size: 24px;
    letter-spacing: -0.3px;
    color: var(--ink);
    margin: 0;
}
.tce-auth__eyebrow {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--steel);
    margin: 4px 0 24px;
}

.tce-auth__card {
    background: var(--surface);
    border: 1px solid #E7EBF2;
    border-radius: 14px;
    box-shadow: 0 12px 34px rgba(11, 26, 52, 0.08);
    padding: 28px 26px 24px;
    text-align: left;
    position: relative;
    overflow: hidden;
}

.tce-auth__card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--nvy), var(--accent));
}

.tce-auth__cardhead { margin-bottom: 20px; }
.tce-auth__cardhead h2 {
    font-family: "Archivo", sans-serif;
    font-weight: 700;
    font-size: 20px;
    letter-spacing: -0.2px;
    margin: 0 0 4px;
    color: var(--ink);
}
.tce-auth__cardhead p {
    font-size: 13.5px;
    color: var(--steel);
    margin: 0;
    line-height: 1.5;
}

.tce-auth__msg {
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 13.5px;
    font-weight: 500;
    line-height: 1.45;
    margin-bottom: 18px;
    display: flex;
    gap: 9px;
    align-items: flex-start;
}
.tce-auth__msg svg { flex-shrink: 0; margin-top: 1px; }
.tce-auth__msg--error { background: var(--danger-bg); color: var(--danger-ink); border: 1px solid var(--danger-line); }
.tce-auth__msg--ok    { background: var(--ok-bg);     color: var(--ok-ink);     border: 1px solid var(--ok-line); }

.tce-auth__field { margin-bottom: 16px; }
.tce-auth__field label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 7px;
}
.tce-auth__input { position: relative; }
.tce-auth__input input {
    width: 100%;
    height: 46px;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 0 15px;
    font-size: 15px;
    font-family: inherit;
    color: var(--ink);
    background: #fff;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.tce-auth__input input::placeholder { color: #9aa6bb; }
.tce-auth__input input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(47, 111, 237, 0.15);
}
.tce-auth__input--pw input { padding-right: 46px; }

.tce-auth__input input.tce-code {
    text-align: center;
    letter-spacing: 8px;
    font-weight: 600;
    font-size: 19px;
}
.tce-auth__input input.tce-code::placeholder {
    letter-spacing: normal;
    font-weight: 400;
    font-size: 15px;
}

.tce-auth__hint {
    font-size: 12px;
    color: var(--steel);
    margin: -6px 0 16px;
    line-height: 1.5;
}
.tce-auth__toggle {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border: none;
    background: transparent;
    color: var(--steel);
    cursor: pointer;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s ease, background 0.15s ease;
}
.tce-auth__toggle:hover { color: var(--ink); background: #eef1f6; }
.tce-auth__toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

.tce-auth__row {
    display: flex;
    justify-content: flex-end;
    margin: -2px 0 20px;
}
.tce-auth__row a {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
}
.tce-auth__row a:hover { color: var(--accent-ink); text-decoration: underline; }

.tce-auth__submit {
    width: 100%;
    height: 48px;
    background: var(--nvy);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-family: "Archivo", sans-serif;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.05s ease;
}
.tce-auth__submit:hover { background: var(--nvy-hover); }
.tce-auth__submit:active { transform: translateY(1px); }
.tce-auth__submit:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.tce-auth__note {
    margin-top: 18px;
    padding: 11px 13px;
    background: #f4f6fb;
    border: 1px solid #e6eaf2;
    border-radius: 10px;
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--steel);
    display: flex;
    gap: 9px;
    align-items: flex-start;
}
.tce-auth__note svg { flex-shrink: 0; margin-top: 1px; color: var(--accent); }

.tce-auth__securefoot {
    margin-top: 20px;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--steel);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}
.tce-auth__securefoot svg { color: var(--nvy); opacity: 0.8; }
.tce-auth__securefoot .dot { color: #b6bfd0; }

.tce-auth__back {
    margin-top: 18px;
    font-size: 13px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}
.tce-auth__back a {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
}
.tce-auth__back a:hover { text-decoration: underline; color: var(--accent-ink); }
.tce-auth__back .sep { color: #b6bfd0; }

@media (max-width: 420px) {
    .tce-auth { padding: 28px 16px; }
    .tce-auth__card { padding: 24px 20px 20px; }
    .tce-auth__logo { width: 138px; }
}

@media (prefers-reduced-motion: reduce) {
    .tce-auth * { transition: none !important; }
}

html:has(.tce-glogin) { zoom: 1; --tce-zoom: 1; }

.tce-glogin {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    overflow: hidden;
    background: #E9EDF8;
    font-family: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    color: #182033;
}

.tce-glogin__scene {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    z-index: 0;
    pointer-events: none;
}

.tce-glogin__inner {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    width: 800px;
    max-width: 800px;
    box-sizing: border-box;
    padding: 58px 40px 58px 80px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
    transform-origin: top left;
    transform: scale(calc(100vw / 2000px));
}

.tce-glogin__divider {
    width: 100%;
    max-width: 640px;
    height: 1.5px;
    background: linear-gradient(90deg, rgba(99,117,150,0.85) 0%, rgba(99,117,150,0.35) 100%);
}

.tce-glogin__brandbar {
    position: static;
    z-index: 2;
    display: inline-block;
}
.tce-glogin__brandbar img {
    width: 430px;
    max-width: 100%;
    height: auto;
    display: block;
    image-rendering: -webkit-optimize-contrast;
}

.tce-glogin__card {
    width: 100%;
    max-width: 640px;
    min-height: 480px;
    text-align: left;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(16px) saturate(1.05);
    -webkit-backdrop-filter: blur(16px) saturate(1.05);
    border: 1px solid rgba(255, 255, 255, 0.85);
    border-radius: 34px;
    padding: 46px 52px 40px;
    box-shadow: 0 34px 72px -30px rgba(20, 30, 60, 0.45);
}

.tce-glogin__card form,
.tce-glogin__card > .tce-glogin__msg,
.tce-glogin__card h1,
.tce-glogin__card .sub,
.tce-glogin__card .tce-glogin__note,
.tce-glogin__card .tce-glogin__contact-admin,
.tce-glogin__card .tce-glogin__copyright,
.tce-glogin__card .tce-glogin__lead,
.tce-glogin__card .tce-glogin__foot,
.tce-glogin__card .tce-glogin__hint {
    max-width: 430px;
}

.tce-glogin__card h1 {
    font-family: "Archivo", sans-serif;
    font-weight: 800;
    font-size: 40px;
    line-height: 1.05;
    letter-spacing: -0.02em;
    margin: 0 0 6px;
    color: #232739;
}
.tce-glogin__card .sub {
    font-size: 15px;
    font-weight: 600;
    color: #3d4356;
    margin: 0 0 26px;
}
.tce-glogin__card .sub strong { font-weight: 800; color: #202943; }

.tce-glogin__msg {
    border-radius: 10px;
    padding: 11px 14px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 18px;
    display: flex;
    gap: 8px;
    align-items: flex-start;
    text-align: left;
}
.tce-glogin__msg svg { flex-shrink: 0; margin-top: 1px; }
.tce-glogin__msg--error { background: rgba(196,81,81,0.12); border: 1px solid rgba(196,81,81,0.36); color: #9d3838; }
.tce-glogin__msg--ok    { background: rgba(46,125,91,0.12); border: 1px solid rgba(46,125,91,0.36); color: #235f45; }

.tce-glogin__field { position: relative; margin-bottom: 18px; }
.tce-glogin__label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: #232739;
    margin-bottom: 8px;
}
.tce-glogin__field input {
    width: 100%;
    height: 48px;
    border-radius: 10px;
    border: 1px solid #D3D8E8;
    background: rgba(255, 255, 255, 0.80);
    padding: 0 16px;
    font-size: 14.5px;
    font-family: inherit;
    color: #182033;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.tce-glogin__field.has-icon input { padding-right: 46px; }
.tce-glogin__field input::placeholder { color: #98a0b5; }
.tce-glogin__field input:focus {
    border-color: #2F6FED;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(47,111,237,0.16);
}
.tce-glogin__field input:invalid:not(:placeholder-shown) { border-color: #C45151; }
.tce-glogin__field input:invalid:not(:placeholder-shown):focus { box-shadow: 0 0 0 3px rgba(196,81,81,0.14); }

.tce-glogin__eye {
    position: absolute;
    right: 6px;
    bottom: 6px;
    width: 36px; height: 36px;
    border: none;
    background: transparent;
    color: #687080;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, color 0.15s ease;
}
.tce-glogin__eye:hover { background: rgba(32,41,67,0.07); color: #202943; }

.tce-glogin__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 4px 0 22px;
}
.tce-glogin__remember {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    color: #4a5266;
    cursor: pointer;
}
.tce-glogin__remember input {
    width: 15px; height: 15px; margin: 0;
    accent-color: #2F6FED;
    cursor: pointer;
}
.tce-glogin__row a {
    font-size: 13.5px;
    font-weight: 600;
    color: #3d4356;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.tce-glogin__row a:hover { color: #2F6FED; }

.tce-glogin__submit {
    width: 100%;
    height: 50px;
    border-radius: 10px;
    border: none;
    background: #202943;
    color: #ffffff;
    font-family: "Archivo", sans-serif;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 12px 26px -14px rgba(21,28,49,0.7);
    transition: background 0.15s ease, transform 0.1s ease;
}
.tce-glogin__submit:hover { background: #151C31; }
.tce-glogin__submit:active { transform: scale(0.99); }
.tce-glogin__submit.is-loading { pointer-events: none; opacity: 0.85; }
.tce-glogin__spinner {
    display: none;
    width: 16px; height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #ffffff;
}
.tce-glogin__submit.is-loading .tce-glogin__spinner {
    display: inline-block;
    animation: tce-spin 0.7s linear infinite;
}
@keyframes tce-spin { to { transform: rotate(360deg); } }

.tce-glogin__note {
    margin: 20px 0 0;
    font-size: 12.5px;
    color: #6c7488;
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
}
.tce-glogin__note svg { flex-shrink: 0; }
.tce-glogin__contact-admin {
    margin: 8px 0 0;
    font-size: 12.5px;
    color: #6c7488;
    text-align: center;
}
.tce-glogin__contact-admin a { color: #3d4356; font-weight: 600; text-decoration: none; }
.tce-glogin__contact-admin a:hover { color: #2F6FED; text-decoration: underline; text-underline-offset: 3px; }
.tce-glogin__copyright {
    margin: 20px 0 0;
    font-size: 11.5px;
    color: #7d8497;
    text-align: center;
}

.tce-sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.tce-glogin__lead {
    font-size: 13.5px;
    line-height: 1.5;
    color: #4a5266;
    margin: 0 0 22px;
}
.tce-glogin__hint {
    font-size: 12px;
    line-height: 1.5;
    color: #6c7488;
    text-align: left;
    margin: -8px 2px 16px;
}
.tce-glogin__field input.tce-code {
    text-align: center;
    letter-spacing: 8px;
    font-weight: 600;
    font-size: 18px;
}
.tce-glogin__field input.tce-code::placeholder { letter-spacing: normal; font-weight: 400; font-size: 15px; }
.tce-glogin__foot {
    margin: 20px 0 0;
    text-align: center;
    font-size: 13px;
    color: #4a5266;
}
.tce-glogin__foot a { color: #3d4356; font-weight: 600; text-decoration: none; }
.tce-glogin__foot a:hover { color: #2F6FED; text-decoration: underline; text-underline-offset: 3px; }
.tce-glogin__foot .sep { margin: 0 8px; color: #b9bfd0; }

@media (max-width: 900px) {

    .tce-glogin { align-items: flex-start; }
    .tce-glogin__scene { display: none; }
    .tce-glogin__inner {
        position: relative;
        transform: none;
        width: 100%;
        max-width: 100%;
        padding: 34px 22px 44px;
        gap: 22px;
    }
    .tce-glogin__divider { max-width: 100%; }
    .tce-glogin__card {
        max-width: 100%;
        min-height: 0;
        padding: 26px 22px 24px;
        border-radius: 18px;
        border: 1px solid rgba(32,41,67,0.12);
        background: rgba(255,255,255,0.72);
    }
    .tce-glogin__card form,
    .tce-glogin__card h1,
    .tce-glogin__card .sub { max-width: 100%; }
    .tce-glogin__card h1 { font-size: 32px; }
}
@media (max-width: 460px) {
    .tce-glogin__brandbar img { width: 230px; }
    .tce-glogin__card h1 { font-size: 28px; }
}

@media (prefers-reduced-motion: reduce) {
    .tce-glogin__submit, .tce-glogin__field input, .tce-glogin__eye { transition: none !important; }
    .tce-glogin__spinner { animation: none !important; }
}
