:root {
    --bg-top: #f7f9fc;
    --bg-bottom: #e8eef7;
    --surface: rgba(255, 255, 255, 0.52);
    --surface-strong: rgba(255, 255, 255, 0.58);
    --surface-soft: rgba(246, 249, 253, 0.48);
    --border: rgba(255, 255, 255, 0.34);
    --border-strong: rgba(59, 130, 246, 0.14);
    --text: #18263d;
    --text-soft: #58677e;
    --text-dim: #8190a6;
    --accent: #2f6df6;
    --accent-strong: #1f56d2;
    --accent-soft: rgba(47, 109, 246, 0.08);
    --accent-glow: rgba(47, 109, 246, 0.16);
    --danger: #c24141;
    --danger-bg: rgba(254, 242, 242, 0.9);
    --danger-border: rgba(194, 65, 65, 0.16);
    --shadow-shell: 0 34px 90px rgba(15, 23, 42, 0.12);
    --shadow-card: 0 14px 28px rgba(148, 163, 184, 0.1);
    --radius-xl: 34px;
    --radius-lg: 26px;
    --radius-md: 18px;
    --radius-sm: 14px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    min-height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(125, 170, 255, 0.32), transparent 30%),
        radial-gradient(circle at 85% 18%, rgba(255, 255, 255, 0.95), transparent 24%),
        radial-gradient(circle at 20% 85%, rgba(191, 219, 254, 0.34), transparent 26%),
        linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
}

.auth-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px 22px;
}

.auth-layout {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1.02fr) minmax(360px, 0.84fr);
    gap: 0;
    align-items: stretch;
}

.auth-window {
    position: relative;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    background: var(--surface);
    backdrop-filter: blur(28px) saturate(165%);
    -webkit-backdrop-filter: blur(28px) saturate(165%);
    box-shadow: var(--shadow-shell);
    overflow: hidden;
}

.auth-window::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.08)),
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.38), transparent 26%);
    pointer-events: none;
}

.auth-window-bar {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 56px;
    padding: 0 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.26);
    background: rgba(255, 255, 255, 0.16);
}

.auth-window-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-soft);
    letter-spacing: -0.01em;
}

.auth-brand,
.auth-card {
    position: relative;
    min-width: 0;
}

.auth-brand {
    padding: 34px 34px 28px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(244, 248, 253, 0.14));
    border-right: 1px solid rgba(255, 255, 255, 0.24);
}

.auth-card {
    padding: 34px 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: rgba(255, 255, 255, 0.18);
}

.auth-kicker,
.auth-logo-wrap,
.auth-feature-grid,
.auth-brand-footer,
.auth-card-head,
.auth-alert,
.auth-form,
.auth-alt-link {
    position: relative;
    z-index: 1;
}

.auth-kicker {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    width: fit-content;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.42);
    background: rgba(255, 255, 255, 0.28);
    color: var(--accent-strong);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.auth-logo-wrap {
    display: flex;
    align-items: center;
    gap: 18px;
    margin: 22px 0 26px;
}

.auth-logo {
    width: 96px;
    height: auto;
    border-radius: 22px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.64);
    border: 1px solid rgba(255, 255, 255, 0.48);
    box-shadow: 0 12px 24px rgba(148, 163, 184, 0.14);
    object-fit: contain;
    flex-shrink: 0;
}

.auth-logo-text strong {
    display: block;
    margin: 0;
    font-size: 34px;
    font-weight: 700;
    line-height: 1.04;
    letter-spacing: -0.04em;
    color: var(--text);
}

.auth-logo-text span {
    display: block;
    margin-top: 8px;
    font-size: 14px;
    color: var(--text-soft);
    line-height: 1.6;
}

.auth-feature-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.auth-feature {
    padding: 16px 16px 14px;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.42);
    background: rgba(255, 255, 255, 0.22);
    box-shadow: var(--shadow-card);
}

.auth-feature-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-dim);
}

.auth-feature-value {
    margin-top: 7px;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.03em;
    color: var(--text);
}

.auth-brand-footer {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.22);
    font-size: 12px;
    color: var(--text-dim);
}

.auth-card-head {
    margin-bottom: 24px;
}

.auth-card-head h1 {
    margin: 0;
    font-size: 40px;
    font-weight: 700;
    line-height: 1.02;
    letter-spacing: -0.05em;
    color: var(--text);
}

.auth-alert {
    margin-bottom: 18px;
    padding: 13px 15px;
    border-radius: var(--radius-md);
    border: 1px solid var(--danger-border);
    background: var(--danger-bg);
    color: var(--danger);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.55;
}

.auth-form {
    display: grid;
    gap: 15px;
}

.auth-field label {
    display: block;
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-soft);
}

.auth-input-wrap {
    position: relative;
}

.auth-input-wrap .form-control {
    min-height: 56px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.34);
    padding: 14px 62px 14px 16px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.66),
        0 1px 1px rgba(15, 23, 42, 0.02);
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.auth-input-wrap .form-control::placeholder {
    color: #8a97aa;
}

.auth-input-wrap .form-control:focus {
    border-color: rgba(47, 109, 246, 0.34);
    background: rgba(255, 255, 255, 0.48);
    box-shadow: 0 0 0 4px var(--accent-glow);
}

.auth-toggle {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    min-width: 50px;
    height: 34px;
    border: 1px solid rgba(255, 255, 255, 0.48);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.36);
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.auth-toggle:hover {
    border-color: rgba(47, 109, 246, 0.22);
    background: rgba(240, 246, 255, 0.52);
    color: var(--accent-strong);
}

.auth-submit {
    min-height: 56px;
    border: none;
    border-radius: 18px;
    background: linear-gradient(180deg, #4d8dff 0%, #2f6df6 100%);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.01em;
    box-shadow: 0 12px 22px rgba(47, 109, 246, 0.2);
    cursor: pointer;
    transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.auth-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 30px rgba(47, 109, 246, 0.26);
    filter: brightness(1.02);
}

.auth-alt-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    margin-top: 14px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.46);
    background: rgba(255, 255, 255, 0.22);
    color: var(--text-soft);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.auth-alt-link:hover {
    border-color: rgba(47, 109, 246, 0.18);
    background: rgba(240, 246, 255, 0.94);
    color: var(--accent-strong);
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
    outline: none;
}

.auth-submit:focus-visible,
.auth-alt-link:focus-visible,
.auth-toggle:focus-visible {
    box-shadow: 0 0 0 4px var(--accent-glow);
}

@media (max-width: 1080px) {
    .auth-layout {
        grid-template-columns: 1fr;
    }

    .auth-brand {
        min-height: auto;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.22);
    }
}

@media (max-width: 767px) {
    .auth-shell {
        padding: 14px;
        align-items: flex-start;
    }

    .auth-layout {
        gap: 14px;
    }

    .auth-brand,
    .auth-card {
        padding: 24px 20px;
    }

    .auth-window {
        border-radius: 24px;
    }

    .auth-window-bar {
        min-height: 50px;
        padding: 0 14px;
    }

    .auth-logo-wrap {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }

    .auth-logo-text strong {
        font-size: 28px;
    }

    .auth-feature-grid {
        grid-template-columns: 1fr;
    }

    .auth-card-head h1 {
        font-size: 32px;
    }
}

@media (max-width: 480px) {
    .auth-shell {
        padding: 10px;
    }

    .auth-brand,
    .auth-card {
        padding: 20px 16px;
    }

    .auth-window {
        border-radius: 20px;
    }

    .auth-kicker {
        font-size: 10px;
    }

    .auth-logo {
        width: 88px;
    }

    .auth-logo-text strong {
        font-size: 24px;
    }

    .auth-card-head h1 {
        font-size: 27px;
    }
}
