.auth-page *,
.auth-page *::before,
.auth-page *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ── Page shell ── */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    font-family: 'DM Sans', sans-serif;
    color: var(--text, #111827);
    -webkit-font-smoothing: antialiased;
    padding: 24px;
}

/* ── Card ── */
.auth-card {
    width: 100%;
    max-width: 400px;
    background: var(--white, #fff);
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 20px;
    padding: 36px 32px 32px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, .06);
}

/* ── Logo ── */
.auth-logo {
    display: flex;
    align-items: center;
    gap: 9px;
    text-decoration: none;
    margin-bottom: 28px;
}

.auth-logo-mark {
    width: 34px;
    height: 34px;
    background: var(--blue, #2563eb);
    border-radius: 9px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.auth-logo-mark svg {
    width: 16px;
    height: 16px;
    color: #fff;
}

.auth-logo-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text, #111827);
    letter-spacing: -.01em;
}

/* ── Heading ── */
.auth-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text, #111827);
    margin-bottom: 5px;
    letter-spacing: -.015em;
}

.auth-sub {
    font-size: .85rem;
    color: var(--muted, #6b7280);
    margin-bottom: 24px;
    line-height: 1.55;
}

.auth-sub a {
    color: var(--blue, #2563eb);
    font-weight: 500;
    text-decoration: none;
}

.auth-sub a:hover {
    text-decoration: underline;
}

/* ── Google button ── */
.auth-btn-google {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 11px 16px;
    background: var(--white, #fff);
    border: 1.5px solid var(--border, #e5e7eb);
    border-radius: 10px;
    font-size: .875rem;
    font-weight: 500;
    font-family: inherit;
    color: var(--text, #111827);
    cursor: pointer;
    transition: border-color .15s, background .15s, box-shadow .15s;
}

.auth-btn-google:hover {
    border-color: #d1d5db;
    background: var(--bg, #f9fafb);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
}

.auth-btn-google svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* ── Divider ── */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 18px 0;
}

.auth-divider-line {
    flex: 1;
    height: 1px;
    background: var(--border, #e5e7eb);
}

.auth-divider-text {
    font-size: .72rem;
    color: #9ca3af;
    white-space: nowrap;
}

/* ── Fields ── */
.auth-field {
    margin-bottom: 14px;
}

.auth-label {
    display: block;
    font-size: .8rem;
    font-weight: 600;
    color: var(--text, #111827);
    margin-bottom: 6px;
}

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

.auth-input-icon {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    width: 15px;
    height: 15px;
    color: #9ca3af;
    pointer-events: none;
}

.auth-input {
    width: 100%;
    padding: 11px 14px 11px 40px;
    border: 1.5px solid var(--border, #e5e7eb);
    border-radius: 10px;
    font-size: .9rem;
    font-family: inherit;
    color: var(--text, #111827);
    background: var(--bg, #f9fafb);
    outline: none;
    transition: border-color .18s, box-shadow .18s, background .18s;
}

.auth-input:focus {
    border-color: var(--blue, #2563eb);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .08);
    background: var(--white, #fff);
}

.auth-input::placeholder {
    color: #9ca3af;
}

/* Password toggle */
.auth-pw-toggle {
    position: absolute;
    right: 11px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #9ca3af;
    padding: 3px;
    line-height: 0;
    transition: color .15s;
}

.auth-pw-toggle:hover {
    color: var(--muted, #6b7280);
}

.auth-pw-toggle svg {
    width: 15px;
    height: 15px;
}

/* Field meta row (label + link side by side) */
.auth-field-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.auth-field-row .auth-label {
    margin-bottom: 0;
}

.auth-forgot {
    font-size: .78rem;
    color: var(--blue, #2563eb);
    font-weight: 500;
    text-decoration: none;
}

.auth-forgot:hover {
    text-decoration: underline;
}

/* ── Submit button ── */
.auth-btn-submit {
    width: 100%;
    padding: 11px;
    background: var(--blue, #2563eb);
    color: #fff;
    font-size: .9rem;
    font-weight: 600;
    font-family: inherit;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    margin-top: 6px;
    transition: background .15s, box-shadow .15s;
}

.auth-btn-submit:hover {
    background: #1d4ed8;
    box-shadow: 0 4px 14px rgba(37, 99, 235, .22);
}

/* ── Footer ── */
.auth-footer {
    text-align: center;
    font-size: .8rem;
    color: var(--muted, #6b7280);
    padding-top: 20px;
    margin-top: 20px;
    border-top: 1px solid var(--border, #e5e7eb);
}

.auth-footer a {
    color: var(--blue, #2563eb);
    font-weight: 500;
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* ── Input error state ── */
.auth-input.is-error {
    border-color: #dc2626;
    background: #fff;
}

.auth-input.is-error:focus {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, .08);
}

/* ── Field error message ── */
.auth-field-error {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: .76rem;
    color: #dc2626;
    margin-top: 5px;
    line-height: 1.4;
}

.auth-field-error svg {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
}

/* ── General alert (session error / success) ── */
.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 11px 14px;
    border-radius: 10px;
    font-size: .83rem;
    line-height: 1.5;
    margin-bottom: 18px;
}

.auth-alert svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    margin-top: 1px;
}

.auth-alert--error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
}

.auth-alert--success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #15803d;
}