/* ────────────────────────────────────────────────────────────────────────
   Vela — auth pages stylesheet
   Modern, minimal, no framework. ~200 lines covers login / signup /
   password-reset / verify-email. M2.4 onboarding-UI work will extend
   this with workspace-level components.
   ──────────────────────────────────────────────────────────────────── */

:root {
    /* Palette — neutral with one accent. Deliberately understated. */
    --bg: #fafaf9;
    --surface: #ffffff;
    --border: #e7e5e4;
    --text: #1c1917;
    --text-muted: #78716c;
    --accent: #0f766e;            /* deep teal */
    --accent-hover: #0d5f5a;
    --accent-soft: #ccfbf1;
    --danger: #b91c1c;
    --danger-soft: #fee2e2;
    --success: #15803d;
    --success-soft: #dcfce7;

    /* Typography */
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                 "Helvetica Neue", Arial, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
                 "Liberation Mono", monospace;

    /* Spacing scale */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-12: 3rem;

    --radius: 8px;
    --radius-lg: 12px;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* ──── Reset / base ──── */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--accent);
    text-decoration: none;
}
a:hover { text-decoration: underline; }

/* ──── Auth-page layout ──── */
.auth-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-8) var(--space-4);
}

.auth-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: var(--space-8);
    width: 100%;
    max-width: 420px;
}

.auth-header {
    text-align: center;
    margin-bottom: var(--space-6);
}

.auth-brand {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text);
    margin: 0 0 var(--space-2) 0;
}

.auth-brand-tag {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin: 0;
}

.auth-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
    margin: var(--space-6) 0 var(--space-2) 0;
}

.auth-subtitle {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0 0 var(--space-6) 0;
}

/* ──── Form elements ──── */
.field {
    margin-bottom: var(--space-4);
}

.field label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text);
    margin-bottom: var(--space-2);
}

.field input[type="email"],
.field input[type="password"],
.field input[type="text"] {
    display: block;
    width: 100%;
    padding: var(--space-3) var(--space-4);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 0.9375rem;
    transition: border-color 120ms ease, box-shadow 120ms ease;
}

.field input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.field-hint {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: var(--space-2);
}

/* ──── Buttons ──── */
.btn {
    display: inline-block;
    width: 100%;
    padding: var(--space-3) var(--space-4);
    border: none;
    border-radius: var(--radius);
    background: var(--accent);
    color: white;
    font-family: var(--font-sans);
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 120ms ease;
}

.btn:hover { background: var(--accent-hover); }
.btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px var(--accent-soft);
}
.btn:disabled {
    background: var(--text-muted);
    cursor: not-allowed;
}

.btn-secondary {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--bg); }

/* ──── Alerts ──── */
.alert {
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius);
    margin-bottom: var(--space-4);
    font-size: 0.875rem;
}

.alert-danger {
    background: var(--danger-soft);
    color: var(--danger);
    border: 1px solid color-mix(in srgb, var(--danger) 30%, transparent);
}

.alert-success {
    background: var(--success-soft);
    color: var(--success);
    border: 1px solid color-mix(in srgb, var(--success) 30%, transparent);
}

.alert-info {
    background: var(--accent-soft);
    color: var(--accent-hover);
    border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
}

/* ──── Auth-page footer links ──── */
.auth-footer {
    text-align: center;
    margin-top: var(--space-6);
    font-size: 0.875rem;
    color: var(--text-muted);
}

.auth-footer a {
    font-weight: 500;
}

.auth-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: var(--space-6) 0;
}

/* ──── Centered icon for success/failure pages ──── */
.status-icon {
    display: block;
    margin: 0 auto var(--space-4) auto;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 600;
}

.status-icon-success {
    background: var(--success-soft);
    color: var(--success);
}

.status-icon-danger {
    background: var(--danger-soft);
    color: var(--danger);
}

/* ──── Small "powered by" note ──── */
.auth-powered {
    margin-top: var(--space-12);
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Bootstrap-admin form on the closed-signup page */
.auth-bootstrap { margin: 0.75rem 0; }
.auth-bootstrap summary {
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--ink, #1b2a4a);
    font-weight: 600;
}
.auth-bootstrap[open] summary { margin-bottom: 0.75rem; }
.auth-bootstrap code {
    font-size: 0.8em;
    background: rgba(27, 42, 74, 0.06);
    padding: 0.1em 0.35em;
    border-radius: 4px;
}
