@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("../fonts/Inter-Variable.woff2") format("woff2");
}

/* ============================================================
   Design tokens
   ============================================================ */
:root {
    --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

    --bg: #f5f6fa;
    --surface: #ffffff;
    --surface-muted: #f8f9fc;
    --border: #e7e9f1;
    --border-soft: #eef0f6;

    --text: #1a1d29;
    --text-muted: #6b7083;
    --text-faint: #9a9fb0;

    --brand: #e23636;
    --brand-dark: #b32424;
    --brand-light: #fdeceb;

    --accent-blue: #3461ff;
    --accent-blue-light: #eaefff;
    --accent-green: #1aa264;
    --accent-green-light: #e6f7ef;
    --accent-purple: #7c4fe0;
    --accent-purple-light: #f0eafc;
    --accent-amber: #d98c00;
    --accent-amber-light: #fdf1dc;

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;

    --shadow-sm: 0 1px 2px rgba(20, 22, 35, 0.04), 0 1px 1px rgba(20, 22, 35, 0.03);
    --shadow-md: 0 8px 24px rgba(20, 22, 35, 0.06), 0 2px 6px rgba(20, 22, 35, 0.04);
    --shadow-lg: 0 20px 48px rgba(20, 22, 35, 0.12), 0 6px 16px rgba(20, 22, 35, 0.06);

    --transition: 150ms ease;
}

* { box-sizing: border-box; }

html, body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
}

body { font-size: 15px; }

a { text-decoration: none; }

h1, h2, h3, h4, h5, h6 { letter-spacing: -0.01em; }

/* ============================================================
   Topbar
   ============================================================ */
.topbar {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1030;
}

.topbar-inner {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 20px;
    height: 64px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text);
    margin-right: 8px;
    white-space: nowrap;
}

.brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 800;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.nav-pills-main {
    display: flex;
    align-items: center;
    gap: 2px;
    background: var(--surface-muted);
    border-radius: 999px;
    padding: 4px;
}

.nav-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 999px;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.88rem;
    transition: background var(--transition), color var(--transition);
    white-space: nowrap;
}

.nav-pill svg { width: 16px; height: 16px; flex-shrink: 0; }

.nav-pill:hover { color: var(--text); background: rgba(20,22,35,0.04); }

.nav-pill.active {
    background: var(--surface);
    color: var(--text);
    box-shadow: var(--shadow-sm);
}

.topbar-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--accent-blue-light);
    color: var(--accent-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.78rem;
    flex-shrink: 0;
}

/* Account menu — logout lives behind this, never a one-click action */
.account-menu { position: relative; }

.account-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px 5px 5px;
    border-radius: 999px;
    border: 1.5px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-weight: 600;
    font-size: 0.85rem;
    transition: all var(--transition);
}
.account-trigger:hover { background: var(--surface-muted); }
.account-trigger-name { color: var(--text); }
.account-trigger svg { width: 14px; height: 14px; color: var(--text-muted); transition: transform var(--transition); }
.account-menu.open .account-trigger svg { transform: rotate(180deg); }
.account-menu.open .account-trigger { border-color: var(--brand); }

.account-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 240px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 8px;
    z-index: 1050;
}
.account-menu.open .account-dropdown { display: block; }

.account-dropdown-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 8px 14px;
}
.account-name { font-weight: 700; font-size: 0.9rem; }
.account-role { color: var(--text-muted); font-size: 0.76rem; }

.dropdown-divider { height: 1px; background: var(--border-soft); margin: 6px 2px; }

.dropdown-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 10px;
    border-radius: var(--radius-sm);
    color: var(--text);
    font-weight: 600;
    font-size: 0.86rem;
    transition: background var(--transition);
}
.dropdown-link svg { width: 16px; height: 16px; color: var(--text-muted); flex-shrink: 0; }
.dropdown-link:hover { background: var(--surface-muted); color: var(--text); }
.dropdown-link.active { background: var(--brand-light); color: var(--brand-dark); }
.dropdown-link.active svg { color: var(--brand); }

.dropdown-link-danger { color: var(--brand); }
.dropdown-link-danger svg { color: var(--brand); }
.dropdown-link-danger:hover { background: var(--brand-light); color: var(--brand-dark); }

.account-dropdown-nav { display: none; }

@media (max-width: 860px) {
    .nav-pills-main { display: none; }
    .account-dropdown-nav { display: block; }
    .account-trigger-name { display: none !important; }
}

/* ============================================================
   Page shell
   ============================================================ */
.page {
    max-width: 1180px;
    margin: 0 auto;
    padding: 28px 20px 60px;
}

.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 22px;
}

.page-title { font-size: 1.5rem; font-weight: 800; margin: 0; }
.page-subtitle { color: var(--text-muted); font-size: 0.92rem; margin-top: 2px; }

/* ============================================================
   Cards
   ============================================================ */
.card-surface {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

/* KPI cards */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

@media (max-width: 900px) {
    .kpi-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .kpi-grid { grid-template-columns: 1fr; }
}

.kpi-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition);
}

.kpi-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.kpi-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
}
.kpi-icon svg { width: 20px; height: 20px; }

.kpi-icon.icon-total { background: var(--brand-light); color: var(--brand); }
.kpi-icon.icon-today { background: var(--accent-blue-light); color: var(--accent-blue); }
.kpi-icon.icon-companies { background: var(--accent-green-light); color: var(--accent-green); }
.kpi-icon.icon-dupes { background: var(--accent-purple-light); color: var(--accent-purple); }

.kpi-label { font-size: 0.82rem; color: var(--text-muted); font-weight: 600; margin-bottom: 4px; }
.kpi-value { font-size: 1.9rem; font-weight: 800; letter-spacing: -0.02em; }

.panel-head {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-soft);
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.panel-body { padding: 18px 20px; }

.link-quiet { color: var(--accent-blue); font-weight: 600; font-size: 0.85rem; }

/* Recent entries list */
.entry-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-soft);
}
.entry-row:last-child { border-bottom: none; }

.entry-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--surface-muted);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.78rem;
    flex-shrink: 0;
}

.entry-row .entry-main { flex: 1; min-width: 0; }
.entry-row .entry-name { font-weight: 700; font-size: 0.9rem; }
.entry-row .entry-meta { color: var(--text-muted); font-size: 0.8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.entry-row .entry-time { color: var(--text-faint); font-size: 0.76rem; white-space: nowrap; flex-shrink: 0; }

.empty-note { color: var(--text-muted); font-size: 0.88rem; padding: 24px 0; text-align: center; }

/* CTA */
.cta-wrap { text-align: center; margin-top: 28px; }

.btn-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    color: #fff;
    font-weight: 700;
    padding: 13px 30px;
    border-radius: 999px;
    border: none;
    box-shadow: 0 10px 24px rgba(226, 54, 54, 0.3);
    transition: transform var(--transition), box-shadow var(--transition);
    font-size: 0.95rem;
}
.btn-brand:hover { transform: translateY(-1px); box-shadow: 0 14px 30px rgba(226, 54, 54, 0.38); color: #fff; }
.btn-brand svg { width: 18px; height: 18px; }
.btn-brand.btn-block { width: 100%; justify-content: center; }

/* ============================================================
   Form
   ============================================================ */
.field-group { margin-bottom: 18px; }

.field-label {
    display: block;
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 7px;
    color: var(--text);
}
.field-label .req { color: var(--brand); }
.field-label .opt { color: var(--text-faint); font-weight: 500; font-size: 0.78rem; }

.field-input-wrap { position: relative; }

.field-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-faint);
    display: flex;
    pointer-events: none;
}
.field-icon svg { width: 18px; height: 18px; }

.field-input {
    width: 100%;
    padding: 13px 16px 13px 42px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 1rem;
    background: var(--surface-muted);
    transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
    color: var(--text);
}

.field-input:focus {
    outline: none;
    border-color: var(--brand);
    background: var(--surface);
    box-shadow: 0 0 0 4px var(--brand-light);
}

.alert-box {
    border-radius: var(--radius-md);
    padding: 13px 16px;
    font-size: 0.88rem;
    margin-bottom: 18px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.alert-box svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }
.alert-success { background: var(--accent-green-light); color: #116b43; }
.alert-danger { background: var(--brand-light); color: var(--brand-dark); }
.alert-box ul { margin: 0; padding-left: 18px; }

/* ============================================================
   Quick search (Data Entry page)
   Expands as its own full-width row BELOW the page header, so it
   pushes content down instead of floating over other text.
   ============================================================ */
.qs-toggle {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 1.5px solid var(--border);
    background: var(--surface);
    color: var(--text);
    border-radius: 999px;
    padding: 10px 16px;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all var(--transition);
    flex-shrink: 0;
}
.qs-toggle svg { width: 16px; height: 16px; color: var(--text-muted); }
.qs-toggle:hover { background: var(--surface-muted); }

.qs-panel {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.2s ease, margin 0.3s ease;
    margin-bottom: 0;
}
.qs-panel.open {
    max-height: 480px;
    opacity: 1;
    margin-bottom: 22px;
}

.qs-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border: 1.5px solid var(--brand);
    border-radius: var(--radius-md);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}
.qs-box .qs-icon { width: 18px; height: 18px; color: var(--text-faint); flex-shrink: 0; }
.qs-box input {
    border: none;
    outline: none;
    background: transparent;
    flex: 1;
    min-width: 0;
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--text);
}
.qs-close {
    border: none;
    background: var(--border-soft);
    color: var(--text-muted);
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    cursor: pointer;
}
.qs-close svg { width: 13px; height: 13px; }
.qs-close:hover { background: var(--brand-light); color: var(--brand); }

.qs-dropdown {
    display: none;
    margin-top: 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    max-height: 320px;
    overflow-y: auto;
}
.qs-dropdown.show { display: block; }

.qs-result {
    display: block;
    width: 100%;
    text-align: left;
    padding: 12px 16px;
    border: none;
    border-bottom: 1px solid var(--border-soft);
    background: transparent;
    cursor: pointer;
    transition: background var(--transition);
}
.qs-result:hover { background: var(--surface-muted); }
.qs-result:last-child { border-bottom: none; }
.qs-result-name { font-weight: 700; font-size: 0.88rem; color: var(--text); }
.qs-result-meta { color: var(--text-muted); font-size: 0.78rem; margin-top: 2px; }
.qs-empty { padding: 18px 14px; text-align: center; color: var(--text-muted); font-size: 0.85rem; }

/* Quick search result detail modal */
.qs-detail-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-soft);
}
.qs-detail-row:last-child { border-bottom: none; }
.qs-detail-label { font-weight: 700; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--text-muted); flex-shrink: 0; }
.qs-detail-value { font-size: 0.9rem; color: var(--text); text-align: right; }

/* ============================================================
   Login
   ============================================================ */
.auth-shell {
    min-height: 100vh;
    display: flex;
}

.auth-side {
    flex: 1;
    background: radial-gradient(circle at 20% 20%, #3a0a0a 0%, #150303 55%, #0a0a0a 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px;
    position: relative;
    overflow: hidden;
}

.auth-side::before {
    content: "";
    position: absolute;
    width: 460px;
    height: 460px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(226,54,54,0.35), transparent 70%);
    top: -120px;
    right: -120px;
}

.auth-side-content { position: relative; z-index: 1; max-width: 420px; }

.auth-side .brand-mark { width: 46px; height: 46px; border-radius: 12px; font-size: 1.1rem; margin-bottom: 26px; }

.auth-side h2 { font-size: 1.9rem; font-weight: 800; line-height: 1.25; margin-bottom: 14px; }
.auth-side p { color: rgba(255,255,255,0.65); font-size: 0.95rem; line-height: 1.6; }

.auth-form-side {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    background: var(--surface);
}

.auth-form-box { width: 100%; max-width: 380px; }
.auth-form-box h1 { font-size: 1.5rem; font-weight: 800; margin-bottom: 4px; }
.auth-form-box .sub { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 28px; }

@media (max-width: 860px) {
    .auth-side { display: none; }
}

/* ============================================================
   Modal
   ============================================================ */
.modal-content {
    border-radius: var(--radius-lg);
    border: none;
    box-shadow: var(--shadow-lg);
}
.modal-header { border-bottom: 1px solid var(--border-soft); padding: 18px 22px; }
.modal-body { padding: 20px 22px; }
.modal-footer { border-top: 1px solid var(--border-soft); padding: 16px 22px; }

.match-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    margin-bottom: 8px;
    background: var(--surface-muted);
}
.match-card .match-name { font-weight: 700; font-size: 0.9rem; }
.match-card .match-meta { color: var(--text-muted); font-size: 0.8rem; margin-top: 2px; }

.btn-ghost {
    border: 1.5px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-weight: 600;
    padding: 10px 18px;
    border-radius: var(--radius-md);
    transition: all var(--transition);
}
.btn-ghost:hover { background: var(--surface-muted); }

.btn-danger-solid {
    border: none;
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    color: #fff;
    font-weight: 700;
    padding: 10px 18px;
    border-radius: var(--radius-md);
}

/* ============================================================
   Report page
   ============================================================ */
.report-toolbar {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-soft);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

/* Search — the primary, most prominent control */
.report-search {
    position: relative;
    flex: 1 1 280px;
    max-width: 380px;
}
.report-search svg {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    width: 17px;
    height: 17px;
    color: var(--text-faint);
    pointer-events: none;
}
.report-search input {
    width: 100%;
    padding: 10px 14px 10px 38px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    background: var(--surface-muted);
    transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
}
.report-search input:focus {
    outline: none;
    border-color: var(--brand);
    background: var(--surface);
    box-shadow: 0 0 0 4px var(--brand-light);
}
.report-search .clear-search {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    border: none;
    background: var(--border-soft);
    color: var(--text-muted);
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.report-search .clear-search svg { position: static; width: 12px; height: 12px; }
.report-search.has-value .clear-search { display: flex; }

/* Date filter popover trigger */
.filter-popover { position: relative; }
.filter-trigger {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 1.5px solid var(--border);
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: 9px 14px;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text);
    cursor: pointer;
    transition: all var(--transition);
}
.filter-trigger:hover { background: var(--surface-muted); }
.filter-trigger svg { width: 16px; height: 16px; color: var(--text-muted); }
.filter-trigger .filter-count {
    background: var(--brand);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    border-radius: 999px;
    padding: 1px 7px;
    line-height: 1.4;
}

.filter-panel {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 20;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 16px;
    min-width: 260px;
}
.filter-panel.show { display: block; }
.filter-panel .filter-row { display: flex; gap: 10px; margin-bottom: 12px; }
.filter-panel .filter-field { flex: 1; display: flex; flex-direction: column; gap: 5px; }
.filter-panel label { font-size: 0.72rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.03em; }
.filter-panel input[type="date"] {
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px 10px;
    font-size: 0.85rem;
    background: var(--surface-muted);
    width: 100%;
}
.filter-panel-actions { display: flex; justify-content: flex-end; gap: 8px; }

/* Export button group */
.export-group {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-export {
    display: inline-flex !important;
    align-items: center;
    gap: 7px;
    border: 1.5px solid var(--border) !important;
    background: var(--surface) !important;
    border-radius: var(--radius-md) !important;
    padding: 9px 15px !important;
    font-weight: 600 !important;
    font-size: 0.84rem !important;
    color: var(--text) !important;
    transition: all var(--transition);
}
.btn-export svg { width: 16px; height: 16px; flex-shrink: 0; }
.btn-export.export-csv:hover { border-color: var(--accent-green) !important; color: var(--accent-green) !important; background: var(--accent-green-light) !important; }
.btn-export.export-excel:hover { border-color: #1d6f42 !important; color: #1d6f42 !important; background: #e7f4ed !important; }
.btn-export.export-pdf:hover { border-color: var(--brand) !important; color: var(--brand) !important; background: var(--brand-light) !important; }

@media (max-width: 760px) {
    .export-group { margin-left: 0; width: 100%; }
    .btn-export { flex: 1; justify-content: center; }
    .report-search { max-width: none; flex-basis: 100%; }
}

.badge-dupe-yes {
    display: inline-flex; align-items: center; gap: 4px;
    background: var(--accent-amber-light); color: var(--accent-amber);
    border-radius: 999px; padding: 4px 10px; font-size: 0.75rem; font-weight: 700;
}
.badge-dupe-no {
    display: inline-flex; align-items: center; gap: 4px;
    background: var(--surface-muted); color: var(--text-faint);
    border: 1px solid var(--border); border-radius: 999px; padding: 4px 10px; font-size: 0.75rem; font-weight: 600;
}

/* Table (desktop) */
#entriesTable { width: 100% !important; font-size: 0.88rem; border-collapse: separate; border-spacing: 0; }
#entriesTable thead th {
    border-bottom: 2px solid var(--border);
    color: var(--text-muted);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 700;
    padding: 12px 14px;
    white-space: nowrap;
}
#entriesTable tbody td { padding: 13px 14px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
#entriesTable tbody tr:hover { background: var(--surface-muted); }
#entriesTable tbody tr:last-child td { border-bottom: none; }

.cell-name { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.cell-avatar {
    width: 30px; height: 30px; border-radius: 50%;
    background: var(--surface-muted); color: var(--text-muted);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.7rem; flex-shrink: 0;
}

/* DataTables chrome overrides */
.dt-container { position: relative; }
div.dataTables_wrapper div.dataTables_filter,
div.dataTables_wrapper div.dataTables_length { display: none; }

.dt-bottom-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 14px;
}

div.dataTables_wrapper div.dataTables_info {
    color: var(--text-muted);
    font-size: 0.82rem;
    padding-top: 0 !important;
}

div.dataTables_wrapper div.dataTables_paginate .paginate_button {
    border-radius: var(--radius-sm) !important;
    margin-left: 3px;
    padding: 6px 11px !important;
    border: 1px solid transparent !important;
    font-size: 0.82rem !important;
}
div.dataTables_wrapper div.dataTables_paginate .paginate_button:hover {
    background: var(--surface-muted) !important;
    border-color: var(--border) !important;
}
div.dataTables_wrapper div.dataTables_paginate .paginate_button.current {
    background: var(--brand) !important;
    border-color: var(--brand) !important;
    color: #fff !important;
}
div.dataTables_wrapper div.dataTables_paginate .paginate_button.disabled {
    opacity: 0.4;
}

.dt-buttons { display: none !important; } /* we render our own export buttons */

/* ============================================================
   Mobile card table
   ============================================================ */
@media (max-width: 760px) {
    #entriesTable thead { display: none; }
    #entriesTable, #entriesTable tbody, #entriesTable tr, #entriesTable td {
        display: block;
        width: 100% !important;
    }
    #entriesTable tbody tr {
        border: 1px solid var(--border);
        border-radius: var(--radius-md);
        margin-bottom: 12px;
        padding: 4px 14px;
        background: var(--surface);
        box-shadow: var(--shadow-sm);
    }
    #entriesTable tbody tr:hover { background: var(--surface); }
    #entriesTable tbody td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        text-align: right;
        padding: 10px 0;
        border-bottom: 1px dashed var(--border-soft);
    }
    #entriesTable tbody td:last-child { border-bottom: none; }
    #entriesTable tbody td::before {
        content: attr(data-label);
        font-weight: 700;
        font-size: 0.7rem;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: var(--text-muted);
        text-align: left;
        flex-shrink: 0;
    }
    #entriesTable tbody td.cell-name-td { padding-top: 14px; }
    #entriesTable tbody td.cell-name-td::before { display: none; }
    .cell-name { font-size: 1rem; width: 100%; }
}

@media (max-width: 575.98px) {
    .page { padding: 18px 14px 50px; }
    .kpi-value { font-size: 1.6rem; }
}
