/* My EduHub — Sign in / Sign up / Password reset */

:root {
    --auth-bg: #f0f2f6;
    --auth-surface: #ffffff;
    --auth-green: #1d4d3e;
    --auth-green-dark: #163d31;
    --auth-green-soft: #e8f3ef;
    --auth-ink: #0f172a;
    --auth-muted: #64748b;
    --auth-line: #e2e8f0;
    --auth-danger: #dc2626;
    --auth-success: #16a34a;
    --auth-radius: 18px;
    --auth-shadow: 0 20px 48px rgba(15, 23, 42, 0.1);
}

* { box-sizing: border-box; }

.auth-page {
    margin: 0;
    min-height: 100vh;
    font-family: 'DM Sans', system-ui, sans-serif;
    color: var(--auth-ink);
    background: var(--auth-bg);
}

.auth-shell {
    min-height: 100vh;
}

.auth-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem 1.25rem 3rem;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: var(--auth-surface);
    border: 1px solid var(--auth-line);
    border-radius: 24px;
    padding: 1.75rem 1.75rem 1.5rem;
    box-shadow: var(--auth-shadow);
}

@media (min-width: 480px) {
    .auth-card { padding: 2rem 2.25rem 1.75rem; }
}

.auth-mobile-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    text-decoration: none;
    color: var(--auth-green);
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    font-size: 1.25rem;
}

/* Role tabs */
.auth-role-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    padding: 0.35rem;
    margin-bottom: 1.5rem;
    background: var(--auth-bg);
    border-radius: 14px;
}

.auth-role-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.65rem 0.75rem;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--auth-muted);
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.auth-role-tab:hover {
    color: var(--auth-ink);
    background: rgba(255, 255, 255, 0.6);
}

.auth-role-tab.is-active {
    background: var(--auth-surface);
    color: var(--auth-green);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.auth-card__head {
    margin-bottom: 1.35rem;
}

.auth-card__head h1 {
    margin: 0 0 0.4rem;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.65rem;
    font-weight: 700;
    line-height: 1.2;
}

.auth-card__head p {
    margin: 0;
    font-size: 0.92rem;
    color: var(--auth-muted);
    line-height: 1.5;
}

/* Alerts */
.auth-alert {
    padding: 0.75rem 1rem;
    border-radius: 12px;
    font-size: 0.88rem;
    line-height: 1.45;
    margin-bottom: 1.15rem;
}

.auth-alert--error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.auth-alert--success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.auth-alert--info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

.auth-alert a { color: inherit; font-weight: 700; }

/* Form */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.auth-field label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--auth-ink);
}

.auth-field input {
    width: 100%;
    padding: 0.72rem 0.95rem;
    border: 1px solid var(--auth-line);
    border-radius: 12px;
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--auth-ink);
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-field input:focus {
    outline: none;
    border-color: var(--auth-green);
    box-shadow: 0 0 0 3px rgba(29, 77, 62, 0.12);
}

.auth-field--pw {
    position: relative;
}

.auth-pw-toggle {
    position: absolute;
    right: 0.65rem;
    bottom: 0.55rem;
    border: none;
    background: transparent;
    color: var(--auth-muted);
    cursor: pointer;
    padding: 0.25rem;
    font-size: 1.05rem;
    line-height: 1;
}

.auth-pw-toggle:hover { color: var(--auth-ink); }

.auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: -0.25rem;
}

.auth-check {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    color: var(--auth-muted);
    cursor: pointer;
}

.auth-check input { accent-color: var(--auth-green); }

.auth-link {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--auth-green);
    text-decoration: none;
}

.auth-link:hover { text-decoration: underline; }

.auth-submit {
    margin-top: 0.25rem;
    width: 100%;
    padding: 0.82rem 1.25rem;
    border: none;
    border-radius: 999px;
    background: var(--auth-green);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease;
}

.auth-submit:hover {
    background: var(--auth-green-dark);
}

.auth-submit:active { transform: scale(0.99); }

.auth-hint {
    font-size: 0.78rem;
    color: var(--auth-muted);
    margin: -0.35rem 0 0;
    line-height: 1.4;
}

.auth-card__foot {
    margin-top: 1.35rem;
    padding-top: 1.15rem;
    border-top: 1px solid var(--auth-line);
    text-align: center;
    font-size: 0.88rem;
    color: var(--auth-muted);
}

.auth-card__foot p { margin: 0 0 0.35rem; }

.auth-card__foot a {
    color: var(--auth-green);
    font-weight: 700;
    text-decoration: none;
}

.auth-card__foot a:hover { text-decoration: underline; }

.auth-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0.25rem 0;
    font-size: 0.75rem;
    color: var(--auth-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--auth-line);
}

.auth-secondary-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    width: 100%;
    padding: 0.72rem 1rem;
    border: 1px solid var(--auth-line);
    border-radius: 999px;
    background: #fff;
    color: var(--auth-ink);
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.auth-secondary-btn:hover {
    background: var(--auth-bg);
    border-color: #cbd5e1;
}
