/* ── Samenvatting pagina ─────────────────────────────────── */
.summary-page {
    max-width: 900px;
}

.summary-header-info {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 0.85rem;
    font-size: 0.85rem;
    color: var(--gray-600);
}

/* ── Help pagina ─────────────────────────────────────────── */
.help-page {
    max-width: 960px;
}

.help-section {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.help-section h2 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.65rem;
    padding-bottom: 0.4rem;
    border-bottom: 3px solid var(--brand-orange);
    display: inline-block;
}

.help-section p {
    font-size: 0.85rem;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
    line-height: 1.65;
}

/* Stappen (1-2-3-4) */
.help-steps {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.help-step {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    background: var(--gray-50);
    border-radius: var(--radius);
    padding: 0.85rem;
    border-left: 4px solid var(--brand-orange);
}

.step-number {
    width: 30px;
    height: 30px;
    min-width: 30px;
    background: var(--brand-orange);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.82rem;
}

.step-content h3 {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 0.1rem;
}

.step-content p {
    font-size: 0.8rem;
    margin-bottom: 0;
    color: var(--gray-600);
}

/* Modi-kaarten */
.help-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.65rem;
    margin-top: 0.5rem;
}

.help-card {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow);
}

.help-card-header {
    padding: 0.5rem 0.85rem;
    font-weight: 600;
    font-size: 0.85rem;
    color: white;
}

.help-card-compare { background: var(--brand-gray); }
.help-card-dryrun { background: var(--info); }
.help-card-sync { background: var(--brand-orange); }
.help-card-syncnaam { background: var(--success); }

.help-card-body {
    padding: 0.65rem 0.85rem;
}

.help-card-body p {
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
}

.help-tip {
    font-style: italic;
    color: var(--gray-500) !important;
    font-size: 0.75rem !important;
    margin-bottom: 0 !important;
}

/* Genummerde lijst */
.help-ol {
    padding-left: 1.25rem;
    font-size: 0.84rem;
    color: var(--gray-700);
    line-height: 1.7;
}

.help-ol li {
    margin-bottom: 0.3rem;
}

.help-ol ul {
    list-style: disc;
    padding-left: 1.25rem;
    margin-top: 0.2rem;
}

.help-ol code {
    background: var(--brand-orange-light);
    color: var(--brand-orange-hover);
    padding: 0.1rem 0.35rem;
    border-radius: 3px;
    font-size: 0.78rem;
    font-weight: 600;
}

/* Tabbladen-uitleg */
.help-tabs-explain {
    margin-top: 0.65rem;
}

.help-tabs-explain h3 {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 0.35rem;
}

.help-tabs-explain ul {
    list-style: none;
    padding: 0;
}

.help-tabs-explain li {
    font-size: 0.8rem;
    color: var(--gray-700);
    padding: 0.3rem 0;
    border-bottom: 1px solid var(--gray-100);
}

.help-tabs-explain li:last-child {
    border-bottom: none;
}

/* Tips lijst */
.help-tips-list {
    list-style: none;
    padding: 0;
}

.help-tips-list li {
    font-size: 0.82rem;
    color: var(--gray-700);
    padding: 0.4rem 0 0.4rem 1.25rem;
    position: relative;
    border-bottom: 1px solid var(--gray-100);
}

.help-tips-list li:last-child {
    border-bottom: none;
}

.help-tips-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.6rem;
    width: 8px;
    height: 8px;
    background: var(--brand-orange);
    border-radius: 50%;
}

/* Toast notificaties (globaal) */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
}
.toast {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.7rem 1rem;
    border-radius: var(--radius);
    background: white;
    box-shadow: 0 4px 24px rgba(0,0,0,0.15);
    border-left: 4px solid var(--success);
    font-size: 0.84rem;
    color: var(--gray-800);
    animation: toastIn 0.3s ease-out;
    max-width: 380px;
    cursor: pointer;
}
.toast-failed { border-left-color: var(--danger); }
.toast-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}
.toast-body { flex: 1; }
.toast-title { font-weight: 600; font-size: 0.82rem; }
.toast-sub { font-size: 0.75rem; color: var(--gray-500); margin-top: 1px; }
.toast-close {
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    font-size: 1rem;
    padding: 0;
    line-height: 1;
    flex-shrink: 0;
}
.toast-close:hover { color: var(--gray-600); }
@keyframes toastIn {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes toastOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(40px); }
}

/* Help-pagina tabbladen */
.help-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--gray-200);
    margin-bottom: 1.25rem;
}
.help-tab {
    padding: 0.55rem 1.1rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-500);
    cursor: pointer;
    border: none;
    background: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color 0.15s, border-color 0.15s;
}
.help-tab:hover { color: var(--gray-700); }
.help-tab.active {
    color: var(--brand-orange);
    border-bottom-color: var(--brand-orange);
}
.help-tab-panel { display: none; }
.help-tab-panel.active { display: block; }

/* ── FT toolbar (generiek voor alle tabs) ────────────────── */
.ft-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    padding: 0 0.1rem;
}

/* ── Sorteerbare headers ─────────────────────────────────── */
.sortable {
    user-select: none;
    -webkit-user-select: none;
}

.sortable:hover {
    background: var(--gray-700);
}

/* ── Lege filter melding ─────────────────────────────────── */
.empty-row td {
    padding: 2rem 1rem !important;
    text-align: center;
    background: white !important;
}

.empty-filter-msg {
    color: var(--gray-400);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.empty-filter-msg .filter-reset {
    font-size: 0.78rem;
}

/* ── Klikbare rijen (planning overzetten) ────────────────── */
.clickable-row {
    cursor: pointer;
}

.clickable-row:hover td {
    background: var(--brand-orange-light) !important;
    color: var(--gray-900);
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
    .sidebar { width: 52px; min-width: 52px; }
    .main-area { margin-left: 52px; }
    .sidebar-app-name, .sidebar-label, .sidebar-footer-text, .sidebar-sub-header { opacity: 0; pointer-events: none; }
    .sidebar-header { justify-content: center; padding: 0.75rem 0.4rem; }
    .sidebar-brand { display: none; }
    .sidebar-link { justify-content: center; padding: 0.55rem 0.4rem; border-left-width: 2px; }
    .container { padding: 0.75rem; }
    .summary-cards { gap: 0.25rem; }
    .summary-card { min-width: 55px; padding: 0.4rem 0.5rem; }
    .summary-number { font-size: 1.1rem; }
    .summary-label { font-size: 0.55rem; }
    .page-header { flex-direction: column; align-items: flex-start; }
    .tabs { gap: 0; }
    .tab { padding: 0.4rem 0.6rem; font-size: 0.75rem; }
    .help-cards { grid-template-columns: 1fr; }
}

/* ── Donut chart ─────────────────────────────────────────── */
.chart-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.chart-card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.25rem;
    flex: 1;
    min-width: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.chart-card h3 {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.75rem;
    text-align: center;
}

.donut-wrap {
    position: relative;
    width: 130px;
    height: 130px;
}

.donut-chart {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    display: block;
}

.donut-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.donut-center-number {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--gray-800);
    line-height: 1;
}

.donut-center-label {
    font-size: 0.62rem;
    color: var(--gray-500);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.03em;
}

.chart-legend {
    margin-top: 0.85rem;
    width: 100%;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.2rem 0;
    font-size: 0.75rem;
    color: var(--gray-700);
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.legend-value {
    margin-left: auto;
    font-weight: 600;
    color: var(--gray-800);
}

/* Dashboard stats row */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.stat-card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1rem;
    text-align: center;
}

.stat-number {
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.2rem;
}

.stat-label {
    font-size: 0.7rem;
    color: var(--gray-500);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.03em;
}

.stat-card-ok .stat-number { color: var(--success); }
.stat-card-warning .stat-number { color: var(--warning); }
.stat-card-danger .stat-number { color: var(--danger); }
.stat-card-info .stat-number { color: var(--info); }
.stat-card-total .stat-number { color: var(--brand-gray); }

/* ── Row-afhandeling: voortgang in dashboard-resultaatkolom ──────────────── */
.row-progress {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.18rem 0.55rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
}
.row-progress-done {
    background: var(--success-bg);
    color: var(--success);
}
.row-progress-open {
    background: var(--warning-bg);
    color: var(--warning);
}
.row-progress-none {
    background: var(--gray-100, #f1f5f9);
    color: var(--gray-500);
}

/* ── Row-afhandeling: checkbox + status binnen tabel-rijen ──────────────── */
.col-handled {
    width: 2.4rem;
    text-align: center;
    padding-left: 0.4rem !important;
    padding-right: 0.4rem !important;
}
.row-handle-cb {
    cursor: pointer;
    width: 1.05rem;
    height: 1.05rem;
    accent-color: var(--success);
}
.row-handle-auto {
    color: var(--success);
    font-size: 1rem;
    line-height: 1;
    cursor: help;
}
.handled-meta {
    font-size: 0.7rem;
    color: var(--gray-500);
    margin-left: 0.3rem;
    font-style: italic;
}

/* Filter-pillen voor open/afgehandeld/alle bovenaan een tab */
.handled-filter {
    display: flex;
    gap: 0.4rem;
    margin: 0.2rem 0 0.85rem 0;
    align-items: center;
    flex-wrap: wrap;
}
.handled-filter-label {
    font-size: 0.72rem;
    color: var(--gray-500);
    margin-right: 0.2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.handled-filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: white;
    border: 1px solid var(--gray-300, #cbd5e1);
    border-radius: 999px;
    padding: 0.28rem 0.85rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--gray-600, #475569);
    cursor: pointer;
    transition: all 0.15s ease;
    line-height: 1;
}
.handled-filter-pill:hover {
    border-color: var(--gray-400, #94a3b8);
    background: var(--gray-50, #f8fafc);
}
.handled-filter-pill .pill-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.4rem;
    height: 1.15rem;
    padding: 0 0.4rem;
    border-radius: 999px;
    background: var(--gray-100, #f1f5f9);
    color: var(--gray-600, #475569);
    font-size: 0.7rem;
    font-weight: 700;
    transition: all 0.15s ease;
}
/* Actieve staten — semantisch gekleurd per pil-type */
.handled-filter-pill[data-handled-filter="open"].active {
    background: var(--warning);
    border-color: var(--warning);
    color: white;
    box-shadow: 0 1px 3px rgba(217, 119, 6, 0.25);
}
.handled-filter-pill[data-handled-filter="done"].active {
    background: var(--success);
    border-color: var(--success);
    color: white;
    box-shadow: 0 1px 3px rgba(22, 163, 74, 0.25);
}
.handled-filter-pill[data-handled-filter="all"].active {
    background: var(--brand-gray, #475569);
    border-color: var(--brand-gray, #475569);
    color: white;
    box-shadow: 0 1px 3px rgba(71, 85, 105, 0.25);
}
.handled-filter-pill.active .pill-count {
    background: rgba(255, 255, 255, 0.25);
    color: white;
}

.section-progress-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    margin-left: auto; /* duwt badge naar rechts in flex-container */
    line-height: 1;
}
.section-progress-badge.done {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid rgba(22, 163, 74, 0.2);
}
.section-progress-badge.open {
    background: var(--warning-bg);
    color: var(--warning);
    border: 1px solid rgba(217, 119, 6, 0.2);
}
.section-progress-badge::before {
    content: '';
    display: inline-block;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}
