:root {
    color-scheme: light;
    --primary: #0f766e;
    --primary-hover: #115e59;
    --primary-active: #134e4a;
    --primary-soft: #f0fdfa;
    --text-main: #0f172a;
    --text-body: #334155;
    --text-dim: #64748b;
    --text-faint: #94a3b8;
    --border: #dbe3ec;
    --surface: #ffffff;
    --background: #f5f7fb;
    --error: #b91c1c;
    --error-soft: #fef2f2;
    --ring: rgba(15, 118, 110, 0.24);
    --shadow-lg: 0 28px 72px rgba(15, 23, 42, 0.16), 0 8px 22px rgba(15, 23, 42, 0.08);
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    min-height: 100%;
    background: var(--background);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    background:
        radial-gradient(circle at 10% 5%, rgba(14, 116, 144, 0.12), transparent 32rem),
        radial-gradient(circle at 92% 85%, rgba(15, 118, 110, 0.1), transparent 34rem),
        var(--background);
    color: var(--text-main);
    font-family: "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
}

button,
input {
    font: inherit;
}

button,
a {
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(15, 118, 110, 0.12);
}

:focus-visible {
    outline: 3px solid var(--ring);
    outline-offset: 2px;
}

.auth-shell {
    display: grid;
    width: min(1120px, calc(100% - 40px));
    min-height: min(720px, calc(100dvh - 64px));
    grid-template-columns: minmax(0, 1.08fr) minmax(380px, 0.92fr);
    margin: 32px auto;
    overflow: hidden;
    border-radius: 28px;
    background: var(--surface);
    box-shadow: var(--shadow-lg);
}

.auth-intro {
    position: relative;
    display: flex;
    min-height: 620px;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    padding: clamp(36px, 5vw, 64px);
    background:
        linear-gradient(145deg, rgba(11, 31, 42, 0.98), rgba(8, 71, 80, 0.96)),
        #0b1f2a;
    color: #ffffff;
}

.auth-intro::before,
.auth-intro::after {
    position: absolute;
    border-radius: 50%;
    content: "";
    pointer-events: none;
}

.auth-intro::before {
    top: -160px;
    right: -120px;
    width: 420px;
    height: 420px;
    border: 1px solid rgba(94, 234, 212, 0.12);
    background: rgba(45, 212, 191, 0.07);
}

.auth-intro::after {
    right: 8%;
    bottom: -180px;
    width: 360px;
    height: 360px;
    border: 1px solid rgba(125, 211, 252, 0.1);
    background: rgba(2, 132, 199, 0.08);
}

.auth-brand,
.auth-intro-copy,
.auth-proof {
    position: relative;
    z-index: 1;
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.auth-brand img {
    width: 44px;
    height: 44px;
    border-radius: 13px;
    object-fit: cover;
    /* box-shadow: 0 10px 26px rgba(2, 132, 199, 0.2); */
}

.auth-brand strong {
    display: block;
    font-size: 1rem;
}

.auth-brand span {
    display: block;
    margin-top: 1px;
    color: #8fb2be;
    font-size: 0.67rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.auth-kicker {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 18px;
    color: #5eead4;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.auth-intro h1 {
    max-width: 520px;
    margin: 0;
    color: #ffffff;
    font-size: clamp(2.2rem, 5vw, 4rem);
    font-weight: 700;
    letter-spacing: -0.045em;
    line-height: 1.03;
    text-wrap: balance;
}

.auth-intro-copy>p {
    max-width: 500px;
    margin: 22px 0 0;
    color: #aac0cb;
    font-size: 1rem;
    line-height: 1.75;
    text-wrap: pretty;
}

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

.proof-item {
    padding: 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.06);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.proof-item i {
    margin-bottom: 12px;
    color: #5eead4;
}

.proof-item strong {
    display: block;
    color: #f8fafc;
    font-size: 0.77rem;
}

.proof-item span {
    display: block;
    margin-top: 3px;
    color: #839eae;
    font-size: 0.67rem;
}

.auth-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(28px, 5vw, 64px);
}

.auth-card {
    width: 100%;
    max-width: 410px;
}

.auth-logo {
    display: none;
}

.auth-title {
    margin: 0;
    color: var(--text-main);
    font-size: clamp(1.8rem, 4vw, 2.35rem);
    font-weight: 700;
    letter-spacing: -0.035em;
    line-height: 1.14;
    text-wrap: balance;
}

.auth-subtitle {
    margin: 10px 0 30px;
    color: var(--text-dim);
    font-size: 0.93rem;
    line-height: 1.65;
    text-wrap: pretty;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 7px;
    color: var(--text-body);
    font-size: 0.8rem;
    font-weight: 700;
}

.input-shell {
    position: relative;
}

.input-shell>i {
    position: absolute;
    top: 50%;
    left: 14px;
    color: var(--text-faint);
    font-size: 0.86rem;
    transform: translateY(-50%);
    pointer-events: none;
}

.form-group input {
    width: 100%;
    min-height: 48px;
    padding: 11px 14px 11px 40px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: var(--surface);
    color: var(--text-main);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
    transition-property: border-color, box-shadow, background-color;
    transition-duration: 180ms;
    transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
}

.form-group input::placeholder {
    color: var(--text-faint);
}

.form-group input[type="password"] {
    padding-right: 42px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0;
    color: var(--text-faint);
    cursor: pointer;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 150ms ease;
}

.password-toggle:hover {
    color: var(--text-dim);
}

.form-group input:hover {
    border-color: #bac8d6;
}

.form-group input:focus {
    border-color: var(--primary);
    outline: 0;
    box-shadow: 0 0 0 3px var(--ring);
}

.btn-auth-submit,
.btn-google {
    display: flex;
    width: 100%;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border-radius: 13px;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    transition-property: background-color, border-color, color, transform, box-shadow;
    transition-duration: 180ms;
    transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
}

.btn-auth-submit {
    margin-top: 8px;
    border: 1px solid var(--primary);
    background: linear-gradient(135deg, #0f766e, #0e7490);
    color: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 118, 110, 0.19);
}

.btn-auth-submit:hover:not(:disabled) {
    border-color: var(--primary-hover);
    background: linear-gradient(135deg, #115e59, #075985);
    box-shadow: 0 13px 28px rgba(15, 118, 110, 0.24);
    transform: translateY(-1px);
}

.btn-auth-submit:active:not(:disabled),
.btn-google:active:not(:disabled) {
    transform: scale(0.96);
}

.btn-auth-submit:disabled,
.btn-google:disabled {
    cursor: not-allowed;
    opacity: 0.48;
    transform: none;
    box-shadow: none;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0;
    color: var(--text-faint);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
    height: 1px;
    flex: 1;
    background: var(--border);
    content: "";
}

.btn-google {
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-body);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.btn-google img {
    width: 18px;
    height: 18px;
}

.btn-google:hover:not(:disabled) {
    border-color: #bac8d6;
    background: #f8fafc;
    color: var(--text-main);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

#auth-error-msg {
    display: none;
    margin: 16px 0 0;
    padding: 11px 13px;
    border-radius: 12px;
    background: var(--error-soft);
    color: var(--error);
    box-shadow: inset 0 0 0 1px rgba(185, 28, 28, 0.12);
    font-size: 0.79rem;
    line-height: 1.5;
    text-align: left;
}

.auth-link-text {
    margin: 26px 0 0;
    color: var(--text-dim);
    font-size: 0.83rem;
    text-align: center;
}

.auth-link-text a {
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
}

.auth-link-text a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.auth-note {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin-top: 24px;
    padding: 12px 13px;
    border-radius: 13px;
    background: var(--primary-soft);
    color: var(--text-dim);
    font-size: 0.73rem;
    line-height: 1.5;
}

.auth-note i {
    margin-top: 2px;
    color: var(--primary);
}

@media (max-width: 860px) {
    .auth-shell {
        width: min(100% - 28px, 560px);
        grid-template-columns: 1fr;
        margin: 14px auto;
        border-radius: 24px;
    }

    .auth-intro {
        min-height: auto;
        padding: 28px;
    }

    .auth-intro-copy {
        margin-top: 54px;
    }

    .auth-intro h1 {
        font-size: clamp(2rem, 9vw, 3rem);
    }

    .auth-proof {
        margin-top: 44px;
    }

    .auth-panel {
        padding: 36px 28px 40px;
    }
}

@media (max-width: 520px) {
    .auth-shell {
        width: 100%;
        min-height: 100dvh;
        margin: 0;
        border-radius: 0;
    }

    .auth-intro {
        padding: 20px 20px 24px;
    }

    .auth-intro-copy {
        margin-top: 28px;
    }

    .auth-intro h1 {
        font-size: clamp(1.9rem, 9vw, 2.35rem);
    }

    .auth-intro-copy>p {
        font-size: 0.9rem;
    }

    .auth-proof {
        display: none;
    }

    .auth-panel {
        padding: 34px 20px 40px;
    }
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}