:root {
    color-scheme: dark;
    --bg: #202020;
    --text: #f4f4f1;
    --muted: #bebeb8;
    --line: #3a3a37;
    --field: #2b2b2a;
    --dark: #e8e8e4;
    --card: rgba(34, 34, 33, .92);
    --toggle: rgba(38, 38, 37, .9);
    --glow-a: rgba(80, 110, 112, .22);
    --glow-b: rgba(110, 82, 110, .2);
    --action: #f1f1ed;
    --action-text: #202020;
}

:root[data-theme="light"] {
    color-scheme: light;
    --bg: #ffffff;
    --text: #050505;
    --muted: #6f7080;
    --line: #dedfe5;
    --field: #f4f4f6;
    --dark: #111111;
    --card: rgba(255, 255, 255, .88);
    --toggle: rgba(255, 255, 255, .85);
    --glow-a: rgba(217, 249, 255, .7);
    --glow-b: rgba(255, 225, 255, .75);
    --action: #111111;
    --action-text: #ffffff;
}

* {
    box-sizing: border-box;
}

/* Consistent form controls across browsers */
input[type="number"] {
    appearance: textfield;
    -moz-appearance: textfield;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    margin: 0;
    appearance: none;
    -webkit-appearance: none;
}

select:not([multiple]) {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 42px !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236f7080' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m8 10 4 4 4-4'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 14px center !important;
    background-size: 16px 16px !important;
}

:root[data-theme="dark"] select:not([multiple]) {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23bebeb8' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m8 10 4 4 4-4'/%3E%3C/svg%3E") !important;
}

input[type="date"],
input[type="datetime-local"],
input[type="time"] {
    position: relative;
    padding-right: 42px !important;
}

input[type="date"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
    width: 18px;
    height: 18px;
    margin: 0;
    padding: 5px;
    border-radius: 7px;
    opacity: .62;
    cursor: pointer;
    transition: background-color .2s ease, opacity .2s ease;
}

input[type="date"]::-webkit-calendar-picker-indicator:hover,
input[type="datetime-local"]::-webkit-calendar-picker-indicator:hover,
input[type="time"]::-webkit-calendar-picker-indicator:hover {
    background-color: rgba(127, 127, 127, .14);
    opacity: 1;
}


body {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(circle at 0 0, var(--glow-a), transparent 24%),
        radial-gradient(circle at 100% 100%, var(--glow-b), transparent 24%),
        var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.45;
}

.theme-changing body,
.theme-changing .auth-card,
.theme-changing .pill,
.theme-changing .input-wrap,
.theme-changing .theme-toggle,
.theme-changing .theme-toggle i,
.theme-changing button,
.theme-changing .password-toggle,
.theme-changing a,
.theme-changing input,
.theme-changing .auth-copy p,
.theme-changing .card-subtitle,
.theme-changing label {
    transition:
        background-color .2s ease,
        border-color .2s ease,
        color .2s ease,
        box-shadow .2s ease;
}

body :where(p, span, label, input, button, a, small, .pill, .card-subtitle, .auth-actions) {
    font-weight: 400;
}

.theme-toggle {
    position: fixed;
    top: 30px;
    right: 20%;
    height: 38px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border-radius: 999px;
    background: var(--toggle);
    box-shadow: 0 3px 12px rgba(0, 0, 0, .12);
    color: #6f7080;
}

.theme-toggle i {
    position: relative;
    width: 30px;
    height: 18px;
    border-radius: 99px;
    background: #c8ccd4;
}

.theme-toggle > span {
    display: grid;
    place-items: center;
}

.theme-toggle > span svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.theme-toggle i::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fff;
    transition: transform .6s ease, background-color .6s ease;
}

:root[data-theme="dark"] .theme-toggle i {
    background: #555550;
}

:root[data-theme="dark"] .theme-toggle i::after {
    transform: translateX(12px);
}

.auth-shell {
    width: min(1160px, calc(100% - 40px));
    min-height: 100vh;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 530px;
    align-items: center;
    gap: clamp(56px, 9vw, 120px);
}

.auth-copy {
    max-width: 500px;
}

.pill {
    display: inline-flex;
    padding: 8px 16px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--card);
    font-size: 14px;
    font-weight: 400;
}

.auth-copy h1 {
    margin: 26px 0 18px;
    font-size: clamp(36px, 3.8vw, 44px);
    font-weight: 620;
    line-height: 1.06;
    letter-spacing: -0.06em;
}

.auth-copy p,
.card-subtitle {
    color: var(--muted);
    font-size: 17px;
    line-height: 1.55;
    font-weight: 400;
}

.auth-card {
    width: 100%;
    padding: 42px 44px;
    border: 1px solid var(--line);
    border-radius: 26px;
    background: var(--card);
    box-shadow: 0 40px 90px rgba(0, 0, 0, .12);
}

.auth-card h2 {
    margin: 0 0 8px;
    font-size: 24px;
    font-weight: 400;
    line-height: 1.15;
    letter-spacing: -0.05em;
}

.card-subtitle {
    margin: 0 0 30px;
    font-size: 14px;
    line-height: 1.45;
}

form {
    display: grid;
    gap: 20px;
}

label {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 400;
}

.input-wrap {
    height: 51px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 15px;
    border: 1px solid #d7d8df;
    border-radius: 14px;
    background: var(--field);
    color: #6f7280;
}

.input-wrap svg {
    width: 19px;
    height: 19px;
    flex: 0 0 19px;
    stroke: currentColor;
    stroke-width: 1.8;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.password-toggle {
    width: 28px;
    height: 28px;
    min-height: 0;
    margin: 0;
    padding: 0;
    flex: 0 0 28px;
    display: inline-grid;
    place-items: center;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #6f7280;
}

:root[data-theme="dark"] .password-toggle {
    background: transparent;
    color: #b7b7b0;
}

.password-toggle svg {
    width: 18px;
    height: 18px;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
}

.password-toggle:hover {
    background: rgba(127, 127, 127, .12);
}

.password-toggle:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.password-field-wrap {
    position: relative;
    width: 100%;
    display: block;
}

.password-field-wrap > input {
    width: 100%;
    padding-right: 46px !important;
}

.password-field-wrap > .password-toggle {
    position: absolute;
    top: 50%;
    right: 9px;
    transform: translateY(-50%);
    z-index: 1;
}

input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 15px;
    font-weight: 400;
    line-height: 1;
}

input::placeholder {
    color: #787b88;
    opacity: 1;
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-text-fill-color: var(--text);
    caret-color: var(--text);
    box-shadow: 0 0 0 1000px transparent inset;
    -webkit-box-shadow: 0 0 0 1000px transparent inset;
    background-color: transparent;
    background-image: none;
    transition:
        background-color 999999s ease-in-out 0s,
        color .6s ease,
        -webkit-text-fill-color .6s ease;
}

.input-wrap:has(input:-webkit-autofill) {
    background: var(--field);
}

button {
    min-height: 49px;
    margin-top: 4px;
    border: 0;
    border-radius: 13px;
    background: #111111;
    color: #fff;
    font: inherit;
    font-weight: 400;
    cursor: pointer;
}

.auth-actions {
    margin-top: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

a {
    color: var(--muted);
    font-weight: 400;
    text-decoration: none;
}

.error,
.success,
.account-email {
    margin: 0 0 18px;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 14px;
}

.error {
    background: #fff0f0;
    color: #b42318;
}

.success {
    background: #eefaf2;
    color: #116329;
}

.account-email {
    background: rgba(127, 127, 127, .12);
    color: var(--muted);
}

:root[data-theme="dark"] button {
    background: #f1f1ed;
    color: #202020;
}

:root[data-theme="dark"] input::placeholder {
    color: #a6a6a0;
}

@media (max-width: 900px) {
    .theme-toggle {
        right: 24px;
    }

    .auth-shell {
        padding: 96px 0 44px;
        grid-template-columns: 1fr;
        gap: 34px;
    }

    .auth-copy {
        max-width: 100%;
    }
}

@media (max-width: 560px) {
    .auth-shell {
        width: min(100% - 28px, 1180px);
    }

    .auth-copy h1 {
        font-size: 34px;
    }

    .auth-card {
        border-radius: 22px;
        padding: 30px 24px;
    }
}
    border: 1px solid var(--line);
    appearance: none;
    cursor: pointer;
