/* ========================================
   ThinqPal Auth Pages — Shared Styles
   ======================================== */

:root {
    --bg: #f0efeb;
    --text: #0d0d0d;
    --text-secondary: #6b6b6b;
    --text-muted: #9b9b9b;
    --border: #e0deda;
    --border-light: #e8e7e3;
    --surface: #ffffff;
    --accent: #6366f1;
    --accent-hover: #5558e6;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.06);
    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ── Universal press animation ── */
button,
a,
.social-btn,
.btn-primary,
.back-link,
.forgot-link {
    transition: transform 0.1s ease, filter 0.15s ease, background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

button:active:not(:disabled),
a:active,
.social-btn:active,
.back-link:active {
    transform: scale(0.95) !important;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

/* ── Auth Page Layout ── */
.auth-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 40px 24px;
    position: relative;
}

/* ── Back Link ── */
.back-link {
    position: absolute;
    top: 24px;
    left: 24px;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    transition: color var(--transition), background var(--transition);
}

.back-link:hover {
    color: var(--text);
    background: rgba(0, 0, 0, 0.04);
}

/* ── Auth Card ── */
.auth-card {
    width: 100%;
    max-width: 400px;
    background: var(--surface);
    border-radius: 16px;
    padding: 40px 36px;
    box-shadow: var(--shadow-md);
    animation: fadeUp 0.5s ease-out;
}

.auth-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

.auth-card h1 {
    font-size: 24px;
    font-weight: 800;
    text-align: center;
    letter-spacing: -0.5px;
    margin-bottom: 6px;
}

.auth-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 28px;
}

.error-msg {
    background: #fef2f2;
    color: #dc2626;
    font-size: 13px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    text-align: center;
    border: 1px solid #fecaca;
}

/* ── Social Buttons ── */
.social-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 11px 16px;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    color: var(--text);
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
}

.social-btn:hover {
    background: var(--bg);
    border-color: var(--text-secondary);
    transform: translateY(-1px);
}

.social-btn:active {
    transform: scale(0.95);
}

/* ── Divider ── */
.divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

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

.divider span {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ── Form ── */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.form-row {
    display: flex;
    gap: 12px;
}

.form-row .form-group {
    flex: 1;
    min-width: 0;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.forgot-link {
    font-size: 12px;
    font-weight: 500;
    color: var(--accent);
    text-decoration: none;
}

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

.form-group input {
    width: 100%;
    padding: 11px 14px;
    font-size: 14px;
    font-family: inherit;
    color: var(--text);
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

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

.hint {
    font-size: 12px;
    color: var(--text-muted);
}

/* ── Primary Button ── */
.btn-primary {
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    color: white;
    background: var(--text);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
    margin-top: 4px;
}

.btn-primary:hover {
    background: var(--accent);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: scale(0.95);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ── Footer ── */
.auth-footer {
    font-size: 13px;
    color: var(--text-secondary);
    text-align: center;
    margin-top: 24px;
}

.auth-footer a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

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

/* ── Legal ── */
.legal {
    margin-top: 32px;
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
}

.legal a {
    color: var(--text-muted);
    text-decoration: none;
}

.legal a:hover {
    color: var(--text-secondary);
    text-decoration: underline;
}

/* ── Animation ── */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Responsive ── */
@media (max-width: 480px) {
    .auth-card {
        padding: 32px 24px;
    }

    .form-row {
        flex-direction: column;
    }

    .back-link {
        top: 16px;
        left: 16px;
    }
}