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

:root {
    --bg:        #0f0f1a;
    --card:      #1a1a2e;
    --card-2:    #222240;
    --border:    #2e2e50;
    --text:      #e2e8f0;
    --text-muted:#8892a4;
    --primary:   #16a34a;
    --primary-h: #15803d;
    --error:     #dc2626;
    --error-bg:  #2d1111;
    --success:   #16a34a;
    --success-bg:#0f2a18;
    --info:      #0ea5e9;
    --info-bg:   #0c1e2d;
    --radius:    10px;
    --font:      -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}

/* ── Layout ───────────────────────────────────────────────────────────────── */
.auth-body {
    min-height: 100vh;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font);
    color: var(--text);
    padding: 24px 16px;
}

.auth-wrap {
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

/* ── Card ─────────────────────────────────────────────────────────────────── */
.auth-card {
    width: 100%;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 36px 32px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ── Brand ────────────────────────────────────────────────────────────────── */
.auth-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}

.auth-brand-icon { font-size: 26px; }

.auth-brand-name {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.5px;
}

/* ── Headings ─────────────────────────────────────────────────────────────── */
.auth-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text);
}

.auth-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: -12px;
    line-height: 1.5;
}

/* ── Alert ────────────────────────────────────────────────────────────────── */
.alert {
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.4;
}

.alert--error   { background: var(--error-bg);   color: #f87171; border: 1px solid #7f1d1d; }
.alert--success { background: var(--success-bg);  color: #4ade80; border: 1px solid #14532d; }
.alert--info    { background: var(--info-bg);     color: #7dd3fc; border: 1px solid #0c4a6e; }

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

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

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

.form-label-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 400;
}
.form-label-link:hover { text-decoration: underline; }

.form-input {
    width: 100%;
    padding: 10px 14px;
    background: var(--card-2);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 15px;
    font-family: var(--font);
    outline: none;
    transition: border-color 0.15s;
}
.form-input:focus { border-color: var(--primary); }
.form-input::placeholder { color: var(--text-muted); }

/* ── Password toggle ──────────────────────────────────────────────────────── */
.input-with-toggle { position: relative; }

.input-with-toggle .form-input { padding-right: 44px; }

.input-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 4px;
}
.input-toggle:hover { color: var(--text); }

/* ── Checkbox ─────────────────────────────────────────────────────────────── */
.form-check { flex-direction: row; align-items: center; gap: 10px; }

.check-input {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    accent-color: var(--primary);
    cursor: pointer;
}

.check-label { font-size: 14px; color: var(--text-muted); cursor: pointer; }

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 20px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, opacity 0.15s;
    min-height: 44px;
    font-family: var(--font);
}

.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-h); }

.btn--full { width: 100%; }

/* ── Back link ────────────────────────────────────────────────────────────── */
.auth-back { text-align: center; }
.auth-back a { color: var(--text-muted); font-size: 14px; text-decoration: none; }
.auth-back a:hover { color: var(--text); }

/* ── Footer ───────────────────────────────────────────────────────────────── */
.auth-footer {
    font-size: 12px;
    color: var(--text-muted);
}
