@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ================================================
   Auth Pages — Chronosense
   ================================================ */

body.auth,
body.auth *,
body.auth *::before,
body.auth *::after {
    box-sizing: border-box;
}

body.auth {
    margin: 0;
    padding: 72px 24px;
    background: #f1f5f9;
    background-image:
        radial-gradient(ellipse at 15% 15%, rgba(219, 234, 254, 0.45) 0%, transparent 55%),
        radial-gradient(ellipse at 85% 85%, rgba(224, 231, 255, 0.35) 0%, transparent 55%);
    color: #1c1917;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    font-size: 0.875rem;
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-font-smoothing: antialiased;
}

/* ── Container ─────────────────────────────────── */

.auth-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 560px;
}

/* ── Brand ─────────────────────────────────────── */

.auth-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 32px;
}

.auth-brand-logo {
    height: 148px;
    width: auto;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.08));
}

.auth-brand-tagline {
    font-size: 13px;
    color: #94a3b8;
    margin-top: 6px;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* ── Card ──────────────────────────────────────── */

.auth-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 48px;
    width: 100%;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.04),
        0 4px 12px rgba(0, 0, 0, 0.05),
        0 20px 48px rgba(15, 23, 42, 0.09);
}

.auth-card-title {
    font-size: 21px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 28px 0;
    text-align: center;
    letter-spacing: -0.025em;
}

.auth-card-subtitle {
    font-size: 14px;
    color: #718096;
    text-align: center;
    margin-bottom: 20px;
    line-height: 1.5;
}

.auth-card-desc {
    font-size: 14px;
    color: #78716c;
    text-align: center;
    margin: -16px 0 32px 0;
    line-height: 1.6;
}

/* ── Form ──────────────────────────────────────── */

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

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

.auth-form-group label {
    font-size: 13.5px;
    font-weight: 600;
    color: #374151;
    letter-spacing: 0.005em;
}

.auth-form-group input,
.auth-form-group select {
    height: 46px;
    padding: 0 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 9px;
    font-size: 15px;
    color: #0f172a;
    background: #fcfcfd;
    font-family: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.auth-form-group input:focus,
.auth-form-group select:focus {
    outline: none;
    border-color: #334155;
    box-shadow: 0 0 0 3px rgba(51, 65, 85, 0.10);
    background: #ffffff;
}

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

.auth-form-group select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 44px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' viewBox='0 0 12 12'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M3 4.5l3 3 3-3'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    cursor: pointer;
}

/* ── Field helper ──────────────────────────────── */

.auth-field-helper {
    font-size: 12px;
    color: #9ca3af;
    line-height: 1.4;
    margin-top: 2px;
    text-align: center;
}

/* ── Form section divider ──────────────────────── */

.auth-form-section {
    padding-top: 8px;
    border-top: 1px solid #e5e7eb;
    margin-top: 16px;
}

.auth-form-section-title {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    letter-spacing: 0.01em;
    text-align: center;
}

.auth-form-section-hint {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 3px;
    text-align: center;
}

/* ── Form actions (forgot password link) ───────── */

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

/* ── Buttons ───────────────────────────────────── */

.auth-btn-primary {
    height: 48px;
    padding: 0 24px;
    background: #1e293b;
    color: #ffffff;
    border: 1px solid #1e293b;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    letter-spacing: 0.015em;
    width: 100%;
    margin-top: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(15, 23, 42, 0.14);
    transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}

.auth-btn-primary:hover:not(:disabled) {
    background: #0f172a;
    border-color: #0f172a;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12), 0 6px 16px rgba(15, 23, 42, 0.2);
    transform: translateY(-1px);
}

.auth-btn-primary:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.auth-btn-primary:disabled {
    opacity: 0.5;
    cursor: default;
}

.auth-btn-secondary {
    height: 42px;
    padding: 0 16px;
    background: #ffffff;
    color: #1c1917;
    border: 1.5px solid #e2e8f0;
    border-radius: 9px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.auth-btn-secondary:hover:not(:disabled) {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.auth-btn-secondary:disabled {
    opacity: 0.5;
    cursor: default;
}

/* ── Links ─────────────────────────────────────── */

.auth-link-inline {
    font-size: 14px;
    color: #6b7280;
    text-decoration: none;
}

.auth-link-inline:hover {
    color: #1c1917;
    text-decoration: underline;
}

.auth-footer-link {
    margin-top: 28px;
    font-size: 13.5px;
    color: #94a3b8;
    text-align: center;
}

/* ADDED: tightens gap between consecutive footer links (e.g. login page) */
.auth-footer-link + .auth-footer-link {
    margin-top: 8px;
}

.auth-footer-link a {
    color: #475569;
    font-weight: 600;
    text-decoration: none;
}

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

/* ── Messages ──────────────────────────────────── */

.auth-message {
    padding: 14px 18px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 24px;
    text-align: center;
}

.auth-message-success {
    color: #166534;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
}

.auth-message-error {
    color: #991b1b;
    background: #fef2f2;
    border: 1px solid #fecaca;
}

.auth-message-info {
    color: #1e40af;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
}

/* ── Resend Verification ───────────────────────── */

.auth-resend {
    text-align: center;
    margin-top: 28px;
    padding-top: 28px;
    border-top: 1px solid #e5e7eb;
}

.auth-resend p {
    font-size: 14px;
    color: #6b7280;
    margin: 0 0 12px 0;
}

/* ── Remember me checkbox ─────────────────────────────────────── */
.auth-remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #4a5568;
    user-select: none;
}

.auth-remember-me input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #334155;
    flex-shrink: 0;
}

.auth-remember-me span {
    line-height: 1;
}

/* ── T&C checkbox ──────────────────────────────────────────────── */
.auth-form-group--checkbox {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 0.25rem;
    margin-bottom: 0.25rem;
}

.auth-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.8125rem;
    color: #6b7280;
    line-height: 1.5;
    user-select: none;
}

.auth-checkbox-label input[type="checkbox"] {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    border: 1.5px solid #d1d5db;
    border-radius: 5px;
    background: #ffffff;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.auth-checkbox-label input[type="checkbox"]:hover:not(:checked) {
    border-color: #94a3b8;
    background: #f8fafc;
}

.auth-checkbox-label input[type="checkbox"]:checked {
    background: #334155;
    border-color: #334155;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M2 6l3 3 5-5' stroke='%23ffffff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 11px 11px;
}

.auth-checkbox-label input[type="checkbox"]:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(51, 65, 85, 0.15);
}

.auth-checkbox-label a {
    color: #334155;
    font-weight: 500;
    text-decoration: none;
}

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

/* ── Turnstile widget ──────────────────────────────────────────── */
.auth-turnstile {
    display: flex;
    justify-content: center;
    margin-top: 0.25rem;
    margin-bottom: 0.25rem;
}

/* ── Trust / security indicator ────────────────────────────────── */
.auth-trust {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 28px;
    font-size: 11.5px;
    color: #b0bec5;
    font-weight: 500;
    letter-spacing: 0.02em;
    user-select: none;
}

.auth-trust svg {
    flex-shrink: 0;
    opacity: 0.8;
}