@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --sidebar-width: 260px;
    --sidebar-bg: #0f172a;
    --sidebar-hover: rgba(255,255,255,.08);
    --sidebar-active: rgba(59,130,246,.18);
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --success: #16a34a;
    --warning: #d97706;
    --danger: #dc2626;
    --surface: #ffffff;
    --surface-muted: #f8fafc;
    --border: #e2e8f0;
    --text: #0f172a;
    --text-muted: #64748b;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow-sm: 0 1px 2px rgba(15,23,42,.05);
    --shadow: 0 4px 16px rgba(15,23,42,.08);
    --shadow-lg: 0 8px 30px rgba(15,23,42,.12);
    --transition: .18s ease;
}

*, *::before, *::after { box-sizing: border-box; }

body {
    min-height: 100vh;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--text);
    background: var(--surface-muted);
    -webkit-font-smoothing: antialiased;
}

a { transition: color var(--transition); }

/* ── Sidebar ── */
.sidebar {
    width: var(--sidebar-width);
    min-height: 100vh;
    background: var(--sidebar-bg);
    position: sticky;
    top: 0;
    z-index: 1040;
    border-right: 1px solid rgba(255,255,255,.06);
}

.sidebar-brand {
    padding: 1.25rem 1rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.sidebar-brand .brand-logo {
    width: 40px; height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 1.25rem;
}

.sidebar .nav-link {
    color: rgba(255,255,255,.72);
    border-radius: var(--radius-sm);
    margin: 2px 8px;
    padding: .65rem 1rem;
    font-size: .9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: .65rem;
    transition: all var(--transition);
    border-left: 3px solid transparent;
}

.sidebar .nav-link i { font-size: 1.1rem; opacity: .85; }

.sidebar .nav-link:hover {
    color: #fff;
    background: var(--sidebar-hover);
}

.sidebar .nav-link.active {
    color: #fff;
    background: var(--sidebar-active);
    border-left-color: #3b82f6;
}

.sidebar-user {
    margin: 8px;
    padding: .75rem 1rem;
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.08);
}

.sidebar-user .avatar-sm {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: #fff;
    font-weight: 600;
    font-size: .85rem;
    display: flex; align-items: center; justify-content: center;
}

/* ── Topbar ── */
.topbar {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: .85rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 1020;
    backdrop-filter: blur(8px);
}

.topbar-title { font-size: 1.15rem; font-weight: 600; margin: 0; }
.topbar-subtitle { font-size: .8rem; color: var(--text-muted); }

/* ── Main content ── */
.main-content { min-height: 100vh; background: var(--surface-muted); }

main.container-fluid {
    max-width: 1440px;
}

/* ── Cards ── */
.card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition);
}

.card.shadow-sm { box-shadow: var(--shadow-sm); }
.card:hover.shadow-sm { box-shadow: var(--shadow); }

.card-header {
    font-size: .875rem;
    font-weight: 600;
    background: var(--surface) !important;
    border-bottom: 1px solid var(--border);
    padding: .85rem 1.25rem;
}

.card-footer {
    background: var(--surface) !important;
    border-top: 1px solid var(--border);
}

/* ── KPI Cards ── */
.kpi-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    transition: transform var(--transition), box-shadow var(--transition);
    overflow: hidden;
}

.kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.kpi-card .kpi-icon {
    width: 44px; height: 44px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.25rem;
}

.kpi-card .kpi-value { font-size: 1.5rem; font-weight: 700; line-height: 1.2; }
.kpi-card .kpi-label { font-size: .78rem; color: var(--text-muted); font-weight: 500; text-transform: uppercase; letter-spacing: .04em; }

.kpi-success .kpi-icon { background: #dcfce7; color: var(--success); }
.kpi-warning .kpi-icon { background: #fef3c7; color: var(--warning); }
.kpi-danger  .kpi-icon { background: #fee2e2; color: var(--danger); }
.kpi-primary .kpi-icon { background: #dbeafe; color: var(--primary); }
.kpi-info    .kpi-icon { background: #e0f2fe; color: #0284c7; }

/* ── Filter / Toolbar ── */
.filter-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.action-bar {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    align-items: center;
    margin-bottom: 1rem;
}

.action-bar .btn { font-size: .875rem; }

.quick-filters { display: flex; flex-wrap: wrap; gap: .35rem; }
.quick-filters .btn { border-radius: 20px; font-size: .8rem; padding: .25rem .75rem; }

/* ── Tables ── */
.table-modern { margin-bottom: 0; }
.table-modern thead th {
    font-size: .72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--text-muted);
    background: var(--surface-muted) !important;
    border-bottom: 1px solid var(--border);
    padding: .75rem 1rem;
    white-space: nowrap;
}
.table-modern tbody td {
    padding: .85rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
}
.table-modern tbody tr:last-child td { border-bottom: none; }
.table-modern tbody tr:hover { background: #f8fafc; }
.table-row-click { cursor: pointer; }
.table-row-click:hover { background: #eff6ff !important; }

/* ── Empty state ── */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--text-muted);
}
.empty-state i.empty-icon {
    font-size: 3rem;
    opacity: .2;
    display: block;
    margin-bottom: .75rem;
}
.empty-state h6 { color: var(--text); font-weight: 600; }

/* ── Forms ── */
.form-label {
    font-size: .82rem;
    font-weight: 500;
    color: var(--text);
    margin-bottom: .35rem;
}

.form-control, .form-select {
    border-color: var(--border);
    border-radius: var(--radius-sm);
    font-size: .9rem;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}

.form-section-title {
    font-size: .85rem;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: .04em;
    padding-bottom: .5rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid #dbeafe;
    display: flex;
    align-items: center;
    gap: .5rem;
}

/* ── Breadcrumb ── */
.breadcrumb {
    font-size: .82rem;
    margin-bottom: 0;
}
.breadcrumb-item a { color: var(--text-muted); text-decoration: none; }
.breadcrumb-item a:hover { color: var(--primary); }

/* ── Badges ── */
.badge { font-weight: 500; font-size: .72rem; padding: .35em .65em; border-radius: 6px; }

/* ── Alerts / Flash ── */
.alert-flash {
    border: none;
    border-radius: var(--radius-sm);
    border-left: 4px solid;
    display: flex;
    align-items: center;
    gap: .75rem;
    font-size: .9rem;
    box-shadow: var(--shadow-sm);
}
.alert-flash.alert-success { border-left-color: var(--success); background: #f0fdf4; color: #166534; }
.alert-flash.alert-danger  { border-left-color: var(--danger);  background: #fef2f2; color: #991b1b; }

/* ── Mobile nav ── */
.mobile-nav {
    z-index: 1030;
    box-shadow: 0 -4px 20px rgba(15,23,42,.08);
    border-top: 1px solid var(--border) !important;
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.mobile-nav a {
    flex: 1;
    text-align: center;
    text-decoration: none;
    color: var(--text-muted);
    padding: .4rem .25rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    font-size: .65rem;
}

.mobile-nav a i { font-size: 1.25rem; display: block; margin-bottom: 2px; }
.mobile-nav a.active { color: var(--primary); background: #eff6ff; }
.mobile-nav a.active i { color: var(--primary); }

.mobile-layout { padding-bottom: 80px; }

/* ── Dashboard ── */
.dash-welcome {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.dash-welcome-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: .25rem;
    color: var(--text);
}

.dash-welcome-sub {
    color: var(--text-muted);
    font-size: .9rem;
}

.dash-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.dash-action-btn {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .55rem 1rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-size: .82rem;
    font-weight: 500;
    text-decoration: none;
    transition: all var(--transition);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
}

.dash-action-btn:hover {
    border-color: #93c5fd;
    color: var(--primary);
    box-shadow: var(--shadow);
    transform: translateY(-1px);
}

.dash-action-sync {
    background: linear-gradient(135deg, #0ea5e9, #2563eb);
    border-color: transparent;
    color: #fff;
}

.dash-action-sync:hover {
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(37,99,235,.35);
}

.dash-alerts {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.dash-alert {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .85rem 1rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-size: .875rem;
    transition: all var(--transition);
}

.dash-alert:hover { transform: translateX(4px); }

.dash-alert-danger  { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.dash-alert-warning { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.dash-alert-info    { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }

.dash-finance-hero {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #1d4ed8 100%);
    color: #fff;
}

.dash-finance-hero-inner { padding: 1.5rem 1.75rem; }

.dash-finance-label {
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    opacity: .75;
    margin-bottom: .35rem;
}

.dash-finance-value {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    line-height: 1.1;
}

.dash-finance-meta {
    font-size: .9rem;
    opacity: .85;
    margin-top: .35rem;
}

.dash-finance-meta .text-warning { color: #fde68a !important; }

.dash-progress-wrap .text-muted { color: rgba(255,255,255,.65) !important; }
.dash-progress-wrap .text-success { color: #86efac !important; }

.dash-progress {
    height: 10px;
    border-radius: 999px;
    background: rgba(255,255,255,.15);
}

.dash-progress .progress-bar { border-radius: 999px; }

.dash-stat-pill {
    text-align: center;
    padding: 1rem .75rem;
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.12);
    backdrop-filter: blur(4px);
}

.dash-stat-num {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
}

.dash-stat-lbl {
    display: block;
    font-size: .72rem;
    opacity: .75;
    margin-top: .15rem;
}

.dash-kpi-card {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
    height: 100%;
    color: var(--text);
}

.dash-kpi-card:hover {
    border-color: #93c5fd;
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.dash-kpi-urgent {
    border-color: #fecaca;
    background: linear-gradient(135deg, #fff 0%, #fef2f2 100%);
}

.dash-kpi-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.dash-kpi-icon-success { background: #dcfce7; color: var(--success); }
.dash-kpi-icon-danger  { background: #fee2e2; color: var(--danger); }
.dash-kpi-icon-warning { background: #fef3c7; color: var(--warning); }
.dash-kpi-icon-pending { background: #fef9c3; color: #ca8a04; }
.dash-kpi-icon-info    { background: #e0f2fe; color: #0284c7; }
.dash-kpi-icon-neutral { background: #f1f5f9; color: var(--text-muted); }

.dash-kpi-value { font-size: 1.35rem; font-weight: 700; line-height: 1.2; }
.dash-kpi-label { font-size: .72rem; color: var(--text-muted); font-weight: 500; }
.dash-kpi-arrow { color: #cbd5e1; font-size: .85rem; margin-left: auto; }

.dash-section-header h5 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
}

.dash-chart-card,
.dash-activity-card,
.dash-table-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.dash-chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .85rem 1.15rem;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    font-size: .875rem;
    background: var(--surface-muted);
}

.dash-chart-header a { color: var(--primary); text-decoration: none; font-weight: 500; }
.dash-chart-header a:hover { text-decoration: underline; }

.dash-chart-body {
    padding: 1rem 1.15rem 1.25rem;
    height: 240px;
    position: relative;
}

.dash-chart-body-wide { height: 280px; }

.dash-activity-list { max-height: 280px; overflow-y: auto; }

.dash-activity-item {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .85rem 1.15rem;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    color: var(--text);
    transition: background var(--transition);
}

.dash-activity-item:hover { background: var(--surface-muted); }

.dash-activity-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    color: #fff;
    font-weight: 700;
    font-size: .85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dash-activity-empty {
    text-align: center;
    padding: 2.5rem 1rem;
    color: var(--text-muted);
}

.dash-activity-empty i { font-size: 2rem; display: block; margin-bottom: .5rem; }

.dash-activity-footer {
    padding: .85rem 1.15rem;
    border-top: 1px solid var(--border);
    background: #f0fdf4;
}

.dash-pay-item {
    display: flex;
    justify-content: space-between;
    gap: .5rem;
    padding: .35rem 0;
    font-size: .82rem;
    text-decoration: none;
    color: var(--text);
}

.dash-pay-item:hover { color: var(--primary); }

.dash-table-scroll {
    max-height: 320px;
    overflow-y: auto;
}

.dash-table thead th {
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--text-muted);
    background: var(--surface-muted);
    position: sticky;
    top: 0;
    z-index: 1;
}

.dash-plano-list { padding: 1rem 1.15rem; }

.dash-plano-item { margin-bottom: 1rem; }
.dash-plano-item:last-child { margin-bottom: 0; }

.dash-plano-bar {
    height: 8px;
    border-radius: 999px;
    background: #f1f5f9;
}

.dash-plano-bar .progress-bar {
    background: linear-gradient(90deg, var(--primary), #6366f1);
    border-radius: 999px;
}

.dash-finance-card {
    background: linear-gradient(135deg, #fff 0%, #eff6ff 100%);
    border: 1px solid #bfdbfe !important;
}

@media (max-width: 767.98px) {
    .dash-welcome-title { font-size: 1.25rem; }
    .dash-quick-actions { width: 100%; }
    .dash-action-btn span { display: none; }
    .dash-action-btn { padding: .6rem .75rem; border-radius: var(--radius-sm); }
    .dash-kpi-arrow { display: none; }
    .dash-chart-body { height: 200px; }
}

/* ── Cliente ── */
.cliente-avatar {
    width: 56px; height: 56px; border-radius: var(--radius);
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: #fff; font-size: 1.5rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(37,99,235,.25);
}
.cliente-header {
    background: linear-gradient(135deg, #fff 0%, #f8fafc 100%);
    border: 1px solid var(--border) !important;
}
.cliente-tabs .nav-link {
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    margin-right: 4px;
    font-weight: 500;
    font-size: .875rem;
    padding: .5rem 1rem;
}
.cliente-tabs .nav-link.active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(37,99,235,.3);
}
.cliente-row:hover { background: #f8fafc; }
.cliente-table thead th {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--text-muted);
}

/* ── Report cards ── */
.report-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all var(--transition);
    height: 100%;
}
.report-card:hover {
    border-color: #93c5fd;
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}
.report-card .report-icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    background: #eff6ff;
    color: var(--primary);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.35rem;
    margin-bottom: .75rem;
}

/* ── Wiki ── */
.wiki-content { font-size: .95rem; line-height: 1.75; color: #334155; }
.wiki-content .wiki-figure { text-align: center; }
.wiki-content .wiki-img { max-height: 420px; object-fit: contain; cursor: zoom-in; }
.wiki-content .wiki-video { width: 100%; max-height: 480px; background: #0f172a; }

.wiki-gallery-section { border-top: 1px solid var(--border); padding-top: 1.5rem; }
.wiki-gallery-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition);
}
.wiki-gallery-card:hover { box-shadow: var(--shadow); }
.wiki-gallery-num {
    background: var(--primary);
    color: #fff;
    font-size: .72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: .35rem .75rem;
}
.wiki-gallery-img {
    width: 100%;
    max-height: 280px;
    object-fit: contain;
    background: #f8fafc;
    padding: .5rem;
}
.wiki-gallery-video {
    width: 100%;
    max-height: 360px;
    display: block;
    background: #0f172a;
}
.wiki-preview-video {
    max-height: 140px;
    background: #0f172a;
}
.wiki-gallery-caption {
    padding: .75rem 1rem;
    font-size: .875rem;
    color: var(--text);
    border-top: 1px solid var(--border);
    background: var(--surface-muted);
}
.wiki-upload-preview { background: var(--surface-muted); }
.wiki-sidebar .list-group-item {
    border: none;
    font-size: .875rem;
    font-weight: 500;
    padding: .65rem 1rem;
}
.wiki-sidebar .list-group-item.active {
    background: #eff6ff;
    color: var(--primary);
    border-radius: var(--radius-sm);
}

/* ── Suporte ── */
.ticket-problem {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1rem;
    line-height: 1.6;
}
.ticket-solution {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: var(--radius-sm);
    padding: 1rem;
    line-height: 1.6;
}
.resolution-panel {
    border: 2px solid var(--primary) !important;
    border-radius: var(--radius);
}
.resolution-panel .card-header {
    background: var(--primary) !important;
    color: #fff;
    border: none;
}

/* ── Config ── */
.config-section {
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--border);
}
.config-section:last-child { border-bottom: none; }
.webhook-box {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: .75rem 1rem;
    font-size: .82rem;
    word-break: break-all;
}

/* ── Login page wrapper ── */
.auth-page-wrapper { min-height: 100vh; background: transparent; }
.auth-page-wrapper > .alert-flash {
    position: fixed; top: 1rem; left: 50%; transform: translateX(-50%);
    z-index: 9999; min-width: 280px; max-width: 90%;
}

.auth-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #1e40af 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}
.auth-card {
    width: 100%;
    max-width: 420px;
    border: none;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}
.auth-card .auth-header {
    background: linear-gradient(135deg, #2563eb, #4f46e5);
    color: #fff;
    padding: 2rem 2rem 1.5rem;
    text-align: center;
}
.auth-card .auth-logo {
    width: 56px; height: 56px;
    background: rgba(255,255,255,.15);
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: .75rem;
}
.auth-card .auth-body { padding: 2rem; }
.auth-card .btn-primary {
    padding: .65rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
}

/* ── Buttons ── */
.btn {
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: .875rem;
    transition: all var(--transition);
}
.btn-primary { background: var(--primary); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }

.btn-icon {
    width: 34px; height: 34px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ── Pagination ── */
.pagination .page-link {
    border-radius: var(--radius-sm);
    margin: 0 2px;
    border-color: var(--border);
    color: var(--text);
    font-size: .85rem;
}
.pagination .page-item.active .page-link {
    background: var(--primary);
    border-color: var(--primary);
}

/* ── Offcanvas mobile menu ── */
.offcanvas-mobile-menu .list-group-item {
    border: none;
    padding: .75rem 1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: .75rem;
}
.offcanvas-mobile-menu .list-group-item i { font-size: 1.1rem; color: var(--text-muted); }

/* ── Stat card legacy ── */
.stat-card .card-body { padding: 1rem 1.25rem; }

/* ── Responsive ── */
@media (max-width: 991.98px) {
    .main-content { padding-bottom: 80px !important; }
    .topbar { padding: .75rem 1rem; }
    .filter-card { padding: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; }
}

/* ── Page loader / sync overlay ── */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    z-index: 10050;
    pointer-events: none;
    opacity: 0;
    transition: opacity .2s ease;
    background: rgba(37, 99, 235, .12);
}

.page-loader.active { opacity: 1; }

.page-loader-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #60a5fa, var(--primary));
    background-size: 200% 100%;
    animation: pageLoaderBar 1.2s ease-in-out infinite;
}

@keyframes pageLoaderBar {
    0% { width: 8%; margin-left: 0; }
    50% { width: 55%; margin-left: 22%; }
    100% { width: 8%; margin-left: 92%; }
}

.sync-overlay {
    position: fixed;
    inset: 0;
    z-index: 10040;
    background: rgba(15, 23, 42, .45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.sync-overlay-card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 2rem 2.5rem;
    text-align: center;
    min-width: 260px;
}

.btn-sync-asaas .spinner-border { width: 1rem; height: 1rem; }

.changelog-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.changelog-list li {
    position: relative;
    padding: .35rem 0 .35rem 1.35rem;
    border-bottom: 1px solid var(--border, #e9ecef);
}

.changelog-list li:last-child { border-bottom: none; }

.changelog-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: .75rem;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--primary, #0d6efd);
}

.changelog-list-detail li {
    padding-top: .5rem;
    padding-bottom: .5rem;
}

.changelog-card { border-left: 4px solid var(--primary, #0d6efd) !important; }
