:root {
    --tc-auth-ink: #111827;
    --tc-auth-muted: #7b8495;
    --tc-auth-line: #e6e9ef;
    --tc-auth-accent: #6258ff;
    --tc-auth-accent-2: #4858e8;
}

* { box-sizing: border-box; }

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

body.tc-auth-page {
    min-height: 100vh;
    overflow-x: hidden;
    color: var(--tc-auth-ink);
    background:
        radial-gradient(circle at 12% 3%, rgba(103,162,255,.23), transparent 28%),
        radial-gradient(circle at 40% 3%, rgba(255,181,181,.18), transparent 25%),
        radial-gradient(circle at 66% 4%, rgba(255,222,137,.18), transparent 25%),
        radial-gradient(circle at 82% 6%, rgba(144,226,210,.18), transparent 29%),
        #f6f7f9;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.tc-auth-shell {
    width: min(100%, 1100px);
    min-height: 100vh;
    margin: 0 auto;
    display: grid;
    grid-template-rows: auto 1fr auto;
    justify-items: center;
    padding: 42px 24px 26px;
}

.tc-auth-brand {
    justify-self: start;
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    text-decoration: none;
}

.tc-auth-brand img {
    width: auto;
    height: 30px;
    max-width: 220px;
    display: block;
    object-fit: contain;
}

.tc-auth-card {
    align-self: center;
    width: min(100%, 460px);
    padding: 36px 38px 30px;
    border: 1px solid rgba(225,228,235,.96);
    border-radius: 24px;
    background: rgba(255,255,255,.96);
    box-shadow: 0 28px 80px rgba(31,42,68,.10), 0 4px 16px rgba(31,42,68,.04);
}

.tc-auth-card-head { margin-bottom: 26px; }
.tc-auth-kicker {
    color: var(--tc-auth-accent);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .11em;
}
.tc-auth-card h1 {
    margin: 8px 0 8px;
    font-size: 28px;
    line-height: 1.2;
    letter-spacing: -.035em;
}
.tc-auth-card-head p {
    margin: 0;
    color: var(--tc-auth-muted);
    font-size: 13px;
    line-height: 1.65;
}

.tc-auth-form { display: grid; gap: 17px; }
.tc-auth-field { display: block; }
.tc-auth-field > span {
    display: block;
    margin-bottom: 7px;
    color: #4d5667;
    font-size: 12px;
    font-weight: 800;
}
.tc-auth-field input {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    border: 1px solid var(--tc-auth-line);
    border-radius: 12px;
    outline: none;
    color: #20293a;
    background: #fbfcfd;
    font-size: 14px;
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.tc-auth-field input:focus {
    border-color: rgba(98,88,255,.62);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(98,88,255,.09);
}
.tc-auth-field input::placeholder { color: #a7afbd; }

.tc-password-wrap { position: relative; }
.tc-password-wrap input { padding-right: 60px; }
.tc-password-toggle {
    position: absolute;
    top: 50%; right: 9px;
    height: 32px;
    transform: translateY(-50%);
    padding: 0 8px;
    border: 0;
    border-radius: 8px;
    color: #727b8a;
    background: transparent;
    cursor: pointer;
    font-size: 11px;
    font-weight: 800;
}
.tc-password-toggle:hover { color: #343d4e; background: #f0f2f5; }

.tc-password-strength {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr auto;
    align-items: center;
    gap: 5px;
    margin-top: -7px;
}
.tc-password-strength i {
    height: 4px;
    border-radius: 999px;
    background: #e8ebf0;
}
.tc-password-strength span {
    min-width: 68px;
    margin-left: 5px;
    color: #99a1af;
    text-align: right;
    font-size: 10px;
}
.tc-password-strength.level-1 i:nth-child(1),
.tc-password-strength.level-2 i:nth-child(-n+2),
.tc-password-strength.level-3 i:nth-child(-n+3) {
    background: linear-gradient(90deg, #7167ff, #4f74f5);
}

.tc-auth-error {
    display: none;
    padding: 10px 12px;
    border: 1px solid #ffd7dd;
    border-radius: 10px;
    color: #b63f53;
    background: #fff5f6;
    font-size: 12px;
    line-height: 1.5;
}
.tc-auth-error.show { display: block; }

.tc-auth-submit {
    width: 100%;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 0;
    border-radius: 13px;
    color: #fff;
    background: linear-gradient(135deg, #171f30, #28344a);
    box-shadow: 0 10px 24px rgba(24,31,47,.14);
    cursor: pointer;
    font-size: 14px;
    font-weight: 900;
    transition: transform .16s ease, box-shadow .16s ease, opacity .16s ease;
}
.tc-auth-submit:hover { transform: translateY(-1px); box-shadow: 0 14px 30px rgba(24,31,47,.18); }
.tc-auth-submit:disabled { opacity: .58; cursor: not-allowed; transform: none; }
.tc-auth-submit i { font-style: normal; font-size: 17px; }

.tc-auth-switch {
    margin-top: 22px;
    padding-top: 19px;
    border-top: 1px solid #eef0f3;
    color: #8a92a0;
    text-align: center;
    font-size: 12px;
}
.tc-auth-switch a { color: var(--tc-auth-accent); text-decoration: none; font-weight: 900; }
.tc-auth-switch a:hover { text-decoration: underline; }

.tc-auth-footer {
    padding-top: 24px;
    color: #a0a7b2;
    font-size: 10px;
}

@media (max-width: 600px) {
    .tc-auth-shell { padding: 22px 16px 18px; }
    .tc-auth-brand { width: 100%; }
    .tc-auth-brand img { height: 26px; max-width: 175px; }
    .tc-auth-card {
        width: 100%;
        padding: 28px 20px 24px;
        border-radius: 20px;
        box-shadow: 0 16px 42px rgba(31,42,68,.09);
    }
    .tc-auth-card h1 { font-size: 24px; }
    .tc-auth-field input { height: 50px; font-size: 16px; }
    .tc-auth-submit { min-height: 50px; }
}
