/* ============================================================
   Campaign Simulation Dashboard — Stylesheet
   Vanilla CSS, no framework dependency.
   ============================================================ */

/* ── Reset / Base ─────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 15px; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #1a1a2e;
    background: #f0f2f5;
    line-height: 1.5;
    min-height: 100vh;
}

a { color: #4f46e5; text-decoration: none; }
a:hover { text-decoration: underline; }

ul, ol { list-style: none; }

pre, code {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.875rem;
}

/* ── Variables ────────────────────────────────────────────── */

:root {
    --primary:   #4f46e5;
    --primary-d: #3730a3;
    --success:   #16a34a;
    --danger:    #dc2626;
    --warning:   #d97706;
    --info:      #0891b2;
    --secondary: #6b7280;
    --dark:      #1f2937;
    --sidebar-w: 240px;
    --topbar-h:  56px;
    --radius:    8px;
    --shadow:    0 1px 3px rgba(0,0,0,.10), 0 1px 2px rgba(0,0,0,.06);
    --shadow-md: 0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
}

/* ── Layout ───────────────────────────────────────────────── */

.app-body { background: #f0f2f5; }

.app-layout {
    display: flex;
    min-height: 100vh;
}

.main-area {
    flex: 1;
    margin-left: var(--sidebar-w);
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.main-content {
    flex: 1;
    padding: 1.5rem;
    max-width: 1400px;
    width: 100%;
}

.two-col-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-top: 1.25rem;
}

@media (max-width: 900px) {
    .two-col-layout { grid-template-columns: 1fr; }
}

/* ── Sidebar ──────────────────────────────────────────────── */

.sidebar {
    position: fixed;
    top: 0; left: 0;
    width: var(--sidebar-w);
    height: 100vh;
    background: #1e1b4b;
    color: #c7d2fe;
    display: flex;
    flex-direction: column;
    z-index: 200;
    overflow-y: auto;
    transition: transform 0.25s ease;
}

.sidebar-admin { background: #1e293b; }

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 1.1rem 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.sidebar-logo { font-size: 1.4rem; }

.sidebar-name {
    font-size: 0.82rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-nav {
    flex: 1;
    padding: 0.75rem 0;
}

.nav-section-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: rgba(199,210,254,.5);
    padding: 0.85rem 1.25rem 0.35rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.62rem 1.25rem;
    color: #c7d2fe;
    font-size: 0.875rem;
    border-left: 3px solid transparent;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.nav-link:hover {
    background: rgba(255,255,255,.07);
    color: #fff;
    text-decoration: none;
}

.nav-link.active {
    background: rgba(79,70,229,.25);
    color: #fff;
    border-left-color: #818cf8;
    font-weight: 600;
}

.sidebar-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid rgba(255,255,255,.08);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.75rem;
}

.user-avatar {
    width: 34px; height: 34px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.admin-avatar { background: #0f766e; }

.user-info { min-width: 0; }

.user-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role { font-size: 0.72rem; color: rgba(199,210,254,.6); }

.btn-logout {
    display: block;
    text-align: center;
    padding: 0.4rem;
    background: rgba(255,255,255,.08);
    color: #c7d2fe;
    border-radius: var(--radius);
    font-size: 0.8rem;
    transition: background 0.15s;
}

.btn-logout:hover {
    background: rgba(220,38,38,.35);
    color: #fff;
    text-decoration: none;
}

/* Mobile sidebar */
@media (max-width: 767px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.sidebar-open {
        transform: translateX(0);
        box-shadow: 4px 0 20px rgba(0,0,0,.3);
    }
    .main-area { margin-left: 0; }
}

/* ── Topbar ───────────────────────────────────────────────── */

.topbar {
    position: sticky;
    top: 0;
    height: var(--topbar-h);
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0 1.5rem;
    z-index: 100;
    box-shadow: var(--shadow);
}

.topbar-admin { background: #f8fafc; }

.sidebar-toggle {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: #6b7280;
    padding: 0.25rem;
    border-radius: 4px;
    display: none;
    line-height: 1;
}

@media (max-width: 767px) {
    .sidebar-toggle { display: flex; align-items: center; }
}

.topbar-title {
    flex: 1;
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* ── Footer ───────────────────────────────────────────────── */

.app-footer {
    padding: 0.75rem 1.5rem;
    border-top: 1px solid #e5e7eb;
    background: #fff;
    font-size: 0.78rem;
}

.sim-notice {
    color: #92400e;
    font-weight: 500;
}

/* ── Page Header ──────────────────────────────────────────── */

.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.page-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.25;
}

.page-subtitle {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.2rem;
}

.page-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* ── Cards ────────────────────────────────────────────────── */

.card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 1.25rem;
    border-bottom: 1px solid #f3f4f6;
    background: #fafafa;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.card-body {
    padding: 1.25rem;
}

.card-body.p-0 { padding: 0; }

.mb-3 { margin-bottom: 1.25rem; }
.mt-3 { margin-top: 1.25rem; }
.mb-2 { margin-bottom: 0.6rem; }
.mt-2 { margin-top: 0.6rem; }
.mt-1 { margin-top: 0.35rem; }
.mb-0 { margin-bottom: 0; }

/* ── Stat Cards ───────────────────────────────────────────── */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.stats-grid-lg {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.stat-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid #e5e7eb;
    padding: 1.1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-card-clickable {
    cursor: pointer;
    transition: box-shadow 0.15s, transform 0.1s;
}

.stat-card-clickable:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.stat-body { min-width: 0; }

.stat-value {
    font-size: 1.55rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.15;
}

.stat-label {
    font-size: 0.78rem;
    color: #6b7280;
    margin-top: 0.15rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Global stats row */
.stats-row {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.stats-row-item { display: flex; flex-direction: column; }

.stats-row-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: #111827;
}

.stats-row-label {
    font-size: 0.8rem;
    color: #6b7280;
}

/* ── Badges ───────────────────────────────────────────────── */

.badge {
    display: inline-block;
    padding: 0.22em 0.6em;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
    white-space: nowrap;
    line-height: 1.4;
}

.badge-primary   { background: #ede9fe; color: #4338ca; }
.badge-success   { background: #dcfce7; color: #15803d; }
.badge-danger    { background: #fee2e2; color: #b91c1c; }
.badge-warning   { background: #fef3c7; color: #92400e; }
.badge-info      { background: #cffafe; color: #0e7490; }
.badge-secondary { background: #f3f4f6; color: #4b5563; }
.badge-dark      { background: #1f2937; color: #f9fafb; }

/* bg- variants for status_badge() helper */
.bg-primary   { background: #ede9fe; color: #4338ca; }
.bg-success   { background: #dcfce7; color: #15803d; }
.bg-danger    { background: #fee2e2; color: #b91c1c; }
.bg-warning   { background: #fef3c7; color: #92400e; }
.bg-info      { background: #cffafe; color: #0e7490; }
.bg-secondary { background: #f3f4f6; color: #4b5563; }
.bg-dark      { background: #1f2937; color: #f9fafb; }

/* ── Simulation badges ────────────────────────────────────── */

.sim-badge {
    display: inline-block;
    padding: 0.2em 0.65em;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    background: #fef3c7;
    color: #92400e;
    border-radius: 4px;
    border: 1px solid #fde68a;
    white-space: nowrap;
}

.sim-badge-lg { font-size: 0.75rem; padding: 0.25em 0.8em; }

.sim-badge-warning {
    background: #fee2e2;
    color: #b91c1c;
    border-color: #fca5a5;
}

.sim-notice-box {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.85rem;
    color: #78350f;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

/* ── Alerts ───────────────────────────────────────────────── */

.alert {
    padding: 0.85rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    font-size: 0.875rem;
    border: 1px solid transparent;
    position: relative;
    transition: opacity 0.3s;
}

.alert-success {
    background: #f0fdf4;
    color: #15803d;
    border-color: #bbf7d0;
}

.alert-danger {
    background: #fef2f2;
    color: #b91c1c;
    border-color: #fecaca;
}

.alert-warning {
    background: #fffbeb;
    color: #92400e;
    border-color: #fde68a;
}

.alert-dismissible { padding-right: 2.5rem; }

.alert-close {
    position: absolute;
    top: 0.55rem; right: 0.75rem;
    background: none;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    color: inherit;
    opacity: 0.6;
    line-height: 1;
}

.alert-close:hover { opacity: 1; }

/* ── Buttons ──────────────────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.48rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius);
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, box-shadow 0.15s, opacity 0.15s;
    white-space: nowrap;
    line-height: 1.4;
}

.btn:hover { text-decoration: none; opacity: 0.88; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-primary   { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-d); opacity: 1; }
.btn-secondary { background: #f3f4f6; color: #374151; border-color: #d1d5db; }
.btn-success   { background: #16a34a; color: #fff; }
.btn-danger    { background: #dc2626; color: #fff; }
.btn-warning   { background: #d97706; color: #fff; }
.btn-dark      { background: #1f2937; color: #f9fafb; }
.btn-outline   { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: #ede9fe; }

.btn-sm { padding: 0.3rem 0.7rem; font-size: 0.8rem; }
.btn-full { width: 100%; justify-content: center; }

.action-buttons { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: flex-start; }

/* ── Forms ────────────────────────────────────────────────── */

.form-group { display: flex; flex-direction: column; gap: 0.35rem; margin-bottom: 1rem; }
.form-group:last-child { margin-bottom: 0; }

.form-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
}

.form-label.required::after {
    content: ' *';
    color: var(--danger);
}

.form-input {
    padding: 0.52rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: var(--radius);
    font-size: 0.875rem;
    color: #111827;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
    width: 100%;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79,70,229,.12);
}

.form-select { cursor: pointer; }

.form-textarea {
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
}

.form-input-file {
    padding: 0.4rem 0;
    border: none;
    font-size: 0.875rem;
    color: #374151;
    width: 100%;
    cursor: pointer;
}

.form-hint { font-size: 0.78rem; color: #6b7280; }

.form-section {
    border: 1px solid #f3f4f6;
    border-radius: var(--radius);
    padding: 1.1rem 1.25rem;
    margin-bottom: 1.25rem;
    background: #fafafa;
}

.form-section:last-of-type { margin-bottom: 0; }

.form-section-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.85rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 640px) {
    .form-row { grid-template-columns: 1fr; }
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    padding-top: 1rem;
    flex-wrap: wrap;
}

/* ── Toggle switch ────────────────────────────────────────── */

.toggle-label {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    cursor: pointer;
    user-select: none;
}

.toggle-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0; height: 0;
}

.toggle-track {
    position: relative;
    width: 42px; height: 24px;
    background: #d1d5db;
    border-radius: 9999px;
    transition: background 0.2s;
    flex-shrink: 0;
}

.toggle-track::after {
    content: '';
    position: absolute;
    top: 3px; left: 3px;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,.2);
    transition: transform 0.2s;
}

.toggle-label input:checked + .toggle-track {
    background: var(--primary);
}

.toggle-label input:checked + .toggle-track::after {
    transform: translateX(18px);
}

.toggle-text { font-size: 0.875rem; color: #374151; }

/* ── Tables ───────────────────────────────────────────────── */

.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.table th {
    padding: 0.65rem 1rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #6b7280;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    white-space: nowrap;
}

.table td {
    padding: 0.72rem 1rem;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: middle;
    color: #374151;
}

.table tbody tr:last-child td { border-bottom: none; }

.table-hover tbody tr:hover { background: #fafafa; }

.table-sm th, .table-sm td { padding: 0.5rem 0.75rem; }

.table-link { color: var(--primary); font-weight: 500; }
.table-link:hover { text-decoration: underline; }

.text-muted { color: #9ca3af; }

/* ── Progress ─────────────────────────────────────────────── */

.progress-track {
    height: 16px;
    background: #e5e7eb;
    border-radius: 9999px;
    overflow: hidden;
    margin-bottom: 0.4rem;
}

.progress-bar {
    height: 100%;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: #fff;
    min-width: 2rem;
    transition: width 0.4s ease;
}

.progress-bar-primary { background: var(--primary); }
.progress-bar-success { background: var(--success); }
.progress-bar-warning { background: var(--warning); }

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.progress-label { font-size: 0.875rem; font-weight: 600; color: #374151; display: flex; align-items: center; gap: 0.4rem; }
.progress-pct   { font-size: 0.875rem; font-weight: 700; color: #111827; }

/* Mini progress (table) */
.progress-mini {
    height: 6px;
    background: #e5e7eb;
    border-radius: 9999px;
    overflow: hidden;
    min-width: 60px;
    margin-bottom: 0.2rem;
}

.progress-mini-bar {
    height: 100%;
    background: var(--primary);
    border-radius: 9999px;
    transition: width 0.3s ease;
}

/* Live poll indicator */
.poll-dot {
    display: inline-block;
    width: 8px; height: 8px;
    background: #16a34a;
    border-radius: 50%;
    animation: pulse-dot 1.6s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.4; transform: scale(0.7); }
}

/* ── Detail list ──────────────────────────────────────────── */

.detail-list {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0.6rem 1.25rem;
    font-size: 0.875rem;
}

.detail-list dt {
    font-weight: 600;
    color: #6b7280;
    white-space: nowrap;
}

.detail-list dd { color: #111827; word-break: break-word; }

/* ── Activity log ─────────────────────────────────────────── */

.activity-log { padding: 0.5rem 0; }

.activity-log-full { max-height: 600px; overflow-y: auto; }

.activity-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.65rem 1.25rem;
    border-bottom: 1px solid #f3f4f6;
    align-items: flex-start;
}

.activity-item:last-child { border-bottom: none; }

.activity-body { flex: 1; min-width: 0; }

.activity-type-label {
    font-size: 0.73rem;
    margin-bottom: 0.15rem;
}

.activity-text {
    font-size: 0.83rem;
    color: #374151;
    word-break: break-word;
    line-height: 1.45;
}

.activity-time {
    font-size: 0.73rem;
    color: #9ca3af;
    margin-top: 0.15rem;
}

/* ── Email body preview ───────────────────────────────────── */

.email-body-preview {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: var(--radius);
    padding: 1rem;
    font-size: 0.875rem;
    color: #374151;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 400px;
    overflow-y: auto;
}

/* ── Search form ──────────────────────────────────────────── */

.search-form { width: 100%; }

.search-row {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.search-row .form-input { flex: 1; min-width: 180px; margin-bottom: 0; }

/* ── Pagination ───────────────────────────────────────────── */

.pagination-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1.25rem;
    border-top: 1px solid #f3f4f6;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.pagination-info { font-size: 0.8rem; color: #6b7280; }

.pagination { display: flex; gap: 0.25rem; flex-wrap: wrap; }

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px; height: 32px;
    padding: 0 0.5rem;
    border: 1px solid #e5e7eb;
    border-radius: var(--radius);
    font-size: 0.8rem;
    color: #374151;
    background: #fff;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s;
}

.page-link:hover { background: #f3f4f6; text-decoration: none; }
.page-link.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ── Empty state ──────────────────────────────────────────── */

.empty-state {
    text-align: center;
    padding: 3rem 2rem;
}

.empty-state-sm { padding: 1.5rem 1rem; }

.empty-text {
    font-size: 0.9rem;
    color: #6b7280;
    margin-bottom: 1rem;
}

/* ── Code block ───────────────────────────────────────────── */

.code-block {
    background: #1e293b;
    color: #e2e8f0;
    padding: 0.85rem 1rem;
    border-radius: var(--radius);
    font-size: 0.82rem;
    overflow-x: auto;
    white-space: pre;
    line-height: 1.6;
}

/* ── Auth layout ──────────────────────────────────────────── */

.auth-body {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #1e293b 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.auth-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    padding: 2rem 1rem;
}

.auth-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,.35);
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
}

.auth-brand {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo { font-size: 2.5rem; margin-bottom: 0.5rem; }

.auth-brand h1 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.3;
}

.auth-subtitle { font-size: 0.82rem; color: #6b7280; margin-top: 0.25rem; }

.auth-form .form-group { margin-bottom: 1.1rem; }

.auth-footer {
    text-align: center;
    font-size: 0.78rem;
    color: rgba(255,255,255,.55);
    margin-top: 1.25rem;
}

/* ── Error pages ──────────────────────────────────────────── */

.error-body {
    background: #f0f2f5;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.error-page {
    text-align: center;
    padding: 2rem;
}

.error-code {
    font-size: 6rem;
    font-weight: 800;
    color: #e5e7eb;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.error-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.5rem;
}

.error-message {
    color: #6b7280;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.error-actions { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }

/* ── Character counter ────────────────────────────────────── */

.char-counter {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.2rem;
}

/* ── Misc helpers ─────────────────────────────────────────── */

.text-muted  { color: #9ca3af; }
.mt-1  { margin-top: 0.35rem; }
.mb-0  { margin-bottom: 0; }