/* ── Documentation.razor ── */
.docrev-page         { padding: 1.5rem; }
.docrev-banner       { background:var(--atlas-white); padding:1.25rem 2rem; border-radius:12px; box-shadow:var(--atlas-shadow-1); display:flex; align-items:center; justify-content:space-between; margin-bottom:1rem; border-left:5px solid var(--atlas-blue-600); }
.docrev-banner-title { font-size:1.4rem; font-weight:700; color:var(--atlas-gray-900); }
.docrev-banner-sub   { font-size:.875rem; color:var(--atlas-gray-500); margin-top:.2rem; }
.docrev-split        { min-height: calc(100vh - 220px); }
.docrev-workers-scroll { max-height: calc(100vh - 250px); overflow:auto; padding: .35rem .25rem; }
.docrev-table-wrapper  { padding: 0 .5rem; }
/* Compact AtlasTable look in this split pane */
#docrev-workers-table th, #docrev-workers-table td { padding:.5rem 1rem; font-size:.85rem; }
#docrev-workers-table th:first-child, #docrev-workers-table td:first-child { padding-left:1.25rem; }
#docrev-workers-table th:last-child,  #docrev-workers-table td:last-child  { padding-right:1.25rem; }
#docrev-workers-table tr.docrev-row-active td { background: rgba(37,99,235,.08) !important; }
#docrev-workers-table tr { cursor: pointer; }

/* Entity-type selector */
.docrev-entity-tabs .nav-link {
    font-size: .85rem; font-weight: 600; padding: .5rem 1rem; border-radius: 8px;
    color: #475569; background: var(--atlas-white); border: 1px solid var(--atlas-gray-200);
}
.docrev-entity-tabs .nav-link.active { background: var(--atlas-blue-600); color: var(--atlas-white); border-color: var(--atlas-blue-600); }
.docrev-entity-tabs .nav-link:disabled { opacity: .55; cursor: not-allowed; }
.docrev-entity-tabs .nav-item + .nav-item .nav-link { margin-left: .5rem; }

/* ── ZoneGrants.razor ── */
.zg-page        { padding: 1.5rem; }
.zg-banner      { background:var(--atlas-white); padding:1.25rem 2rem; border-radius:12px; box-shadow:var(--atlas-shadow-1); display:flex; align-items:center; justify-content:space-between; margin-bottom:1rem; border-left:5px solid var(--atlas-blue-600); }
.zg-banner-title{ font-size:1.4rem; font-weight:700; color:var(--atlas-gray-900); }
.zg-banner-sub  { font-size:.875rem; color:var(--atlas-gray-500); margin-top:.2rem; }
.zg-split       { min-height: calc(100vh - 220px); }
.zg-persons-scroll { max-height: calc(100vh - 250px); overflow:auto; padding:.35rem .25rem; }
.zg-table-wrapper  { padding:0 .5rem; }
#zg-persons-table th, #zg-persons-table td { padding:.5rem 1rem; font-size:.85rem; }
#zg-persons-table tr { cursor:pointer; }
#zg-persons-table tr.zg-row-active td { background: rgba(37,99,235,.08) !important; }
.zg-map         { height: 55vh; border-radius:10px; overflow:hidden; background:var(--atlas-gray-200); }
.zg-zone-chip   { display:flex; align-items:center; justify-content:space-between; padding:.35rem .5rem; border-radius:6px; font-size:.85rem; }
.zg-zone-chip + .zg-zone-chip { margin-top:.25rem; }

/* ── TrainingTracker.razor ── */
.training-page        { padding: 1.5rem; }
.training-banner      { background: var(--atlas-white); padding: 1.25rem 2rem; border-radius: 12px; box-shadow: var(--atlas-shadow-1); display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; border-left: 5px solid var(--atlas-blue-600); }
.training-banner-title { font-size: 1.4rem; font-weight: 700; color: var(--atlas-gray-900); }
.training-banner-sub   { font-size: .875rem; color: var(--atlas-gray-500); margin-top: .2rem; }

/* ── Credentials.razor ── */
/* ── Tab counter switcher ── */
.tab-counter {
    display: inline-flex;
    align-items: center;
    padding: .65rem 1.25rem;
    border-radius: 10px;
    font-size: .95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all .2s ease;
    user-select: none;
}
.tab-counter-active {
    background: var(--atlas-white);
    color: var(--kpi-primary);
    box-shadow: 0 2px 8px rgba(37,99,235,.15);
    border: 2px solid var(--kpi-primary);
}
.tab-counter-inactive {
    background: rgba(255,255,255,.6);
    color: var(--text-secondary);
    border: 2px solid transparent;
}
.tab-counter-inactive:hover {
    background: var(--atlas-white);
    color: var(--text-primary);
    border-color: var(--atlas-gray-300);
}
.tab-counter .fw-bold {
    font-size: 1.15rem;
    min-width: 28px;
    text-align: center;
}

/* ── Filter chips ── */
.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 8px 3px 10px;
    border-radius: 20px;
    font-size: .78rem;
    font-weight: 500;
    background: var(--atlas-indigo-100);
    color: var(--atlas-indigo-800);
    border: 1px solid var(--atlas-indigo-200);
    white-space: nowrap;
}
.filter-chip .filter-chip-remove {
    cursor: pointer;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(55,48,163,.12);
    transition: background .15s;
    font-size: .7rem;
}
.filter-chip .filter-chip-remove:hover {
    background: rgba(55,48,163,.25);
}
.filter-chip select, .filter-chip input {
    border: none;
    background: transparent;
    font-size: .78rem;
    font-weight: 500;
    color: var(--atlas-indigo-800);
    padding: 0;
    outline: none;
    max-width: 180px;
}
.filter-chip select { cursor: pointer; }

/* ── Access devices (counter chip + expandable child row) ── */
.device-count-chip {
    display: inline-flex; align-items: center;
    cursor: pointer; user-select: none;
}
.device-count-chip .badge { background: var(--kpi-primary); font-size: .78rem; font-weight: 600; }
.device-count-empty { color: var(--text-secondary); font-size: .8rem; }
.device-child-row { background: var(--atlas-gray-50); }
.device-list { display: flex; flex-direction: column; gap: 6px; padding: 8px 12px; }
.device-item {
    display: flex; align-items: center; gap: 12px;
    padding: 8px 12px; border: 1px solid var(--atlas-gray-200); border-radius: 8px;
    background: var(--atlas-white); cursor: pointer; transition: box-shadow .15s, border-color .15s;
}
.device-item:hover { border-color: var(--kpi-primary); box-shadow: 0 1px 4px rgba(37,99,235,.15); }
.device-item-icon {
    width: 34px; height: 34px; border-radius: 8px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: var(--atlas-color-primary-soft); color: var(--kpi-primary); font-size: 1.1rem;
}
.device-item-type { font-weight: 600; font-size: .85rem; color: var(--text-primary); }
.device-item-value { font-family: monospace; font-size: .78rem; color: var(--text-secondary); }
.device-detail-icon {
    width: 48px; height: 48px; border-radius: 12px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: var(--atlas-color-primary-soft); color: var(--kpi-primary); font-size: 1.6rem;
}

/* ── Worker ID Card ── */
.id-card {
    width: 85.6mm; height: 54mm;
    border: 1px solid var(--atlas-gray-300);
    border-radius: 8px;
    background: var(--atlas-white);
    display: flex;
    flex-direction: row;
    overflow: hidden;
    font-family: 'Segoe UI', sans-serif;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.id-card-stripe { width: 8mm; background: var(--kpi-primary); flex-shrink: 0; }
.id-card-body   { flex: 1; padding: 5mm 4mm; display: flex; flex-direction: column; justify-content: space-between; }
.id-card-qr     { width: 20mm; display: flex; align-items: center; justify-content: center; padding: 3mm; border-left: 1px solid var(--atlas-gray-200); flex-shrink: 0; }
.id-card-qr img, .id-card-qr canvas { width: 18mm !important; height: 18mm !important; }
.id-card-name   { font-size: 11pt; font-weight: 700; color: var(--atlas-gray-900); line-height: 1.2; }
.id-card-sub    { font-size: 7.5pt; color: var(--atlas-gray-500); margin-top: 1mm; }
.id-card-badge  { font-size: 8pt; font-weight: 700; font-family: monospace; color: var(--kpi-primary); }
.id-card-row    { font-size: 7pt; color: var(--atlas-gray-700); display: flex; gap: 2mm; align-items: center; }
.id-card-label  { font-size: 6pt; text-transform: uppercase; color: var(--atlas-gray-400); letter-spacing: .4px; }
.id-card-valid  { font-size: 6.5pt; color: var(--atlas-emerald-500); font-weight: 600; }
.id-card-expired{ font-size: 6.5pt; color: var(--atlas-red-500); font-weight: 600; }

/* ── AccessLogs.razor ── */
/* ── Tab navigation (same style as WorkerTableComponent) ── */
#registros-tabs { border-bottom: 2px solid var(--atlas-gray-200); }
#registros-tabs .nav-link { border: none; border-bottom: 2px solid transparent; background: none; color: var(--text-secondary); padding: .625rem 1rem; font-weight: 500; margin-bottom: -2px; }
#registros-tabs .nav-link.active { color: var(--kpi-primary); border-bottom-color: var(--kpi-primary); }
#registros-tabs .nav-link:hover:not(.active) { color: var(--text-primary); }
#registros-tabs .badge { font-size: .7rem; }

/* Loading overlay inside table wrapper */
#proc-loading-overlay:not(.d-none) { display: flex !important; }

/* Auto-promoted denied-access rows */
.table-row-synthetic { background: rgba(245,158,11,.04); }
.table-row-synthetic td:first-child { border-left: 3px solid var(--atlas-amber-500); }

/* ── Global date selector bar ── */
.ac-date-bar { background: var(--atlas-white); border-radius: 12px; padding: .75rem 1.25rem; box-shadow: var(--atlas-shadow-1); display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; border-left: 5px solid var(--kpi-success); transition: border-color .25s ease, background .25s ease; }
.ac-date-bar[data-mode="historical"] { border-left-color: var(--kpi-warning); background: #fffaf0; }
.ac-date-bar-left, .ac-date-bar-right { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.ac-date-picker-wrapper { display: flex; align-items: center; gap: .5rem; }
.ac-date-input { width: 155px; }
.ac-date-label { font-weight: 600; color: var(--text-primary); font-size: .9rem; }
.ac-date-arrow { color: var(--text-secondary); font-weight: 600; }

.ac-mode-pill { display: inline-flex; align-items: center; gap: .375rem; padding: .25rem .625rem; border-radius: 999px; font-size: .72rem; font-weight: 700; letter-spacing: .06em; background: rgba(16,185,129,.12); color: var(--kpi-success); }
.ac-mode-pill .ac-mode-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--kpi-success); animation: acPulse 1.6s infinite; }
.ac-mode-pill[data-mode="historical"] { background: rgba(245,158,11,.14); color: var(--atlas-amber-700); }
.ac-mode-pill[data-mode="historical"] .ac-mode-dot { background: var(--atlas-amber-700); animation: none; }
@keyframes acPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(16,185,129,.7); } 50% { box-shadow: 0 0 0 6px rgba(16,185,129,0); } }

/* Hide live-only KPIs and tweak chrome in historical mode */
.asset-dashboard.mode-historical .kpi-live-only { display: none !important; }
.asset-dashboard.mode-historical .dashboard-banner { border-left-color: var(--kpi-warning); }
.asset-dashboard.mode-historical .ac-date-label { color: var(--atlas-amber-700); }
.asset-dashboard.mode-historical .kpi-value { filter: saturate(.78); }

/* ── Observations.razor ── */
/* ── Filter chips ── */
.obs-filter-chip { display: inline-flex; align-items: center; gap: .4rem; background: var(--atlas-indigo-50); border: 1px solid var(--atlas-indigo-200); border-radius: 20px; padding: .25rem .5rem .25rem .75rem; font-size: .8rem; color: var(--text-primary); }
.obs-filter-chip select, .obs-filter-chip input[type="date"] { border: none; background: transparent; font-size: .8rem; outline: none; color: var(--kpi-primary); font-weight: 500; }
.obs-filter-chip-remove { cursor: pointer; padding: .15rem .35rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; transition: background .15s; }
.obs-filter-chip-remove:hover { background: rgba(0,0,0,.1); }

/* ── Observation detail modal ── */
.obs-banner { display: flex; align-items: center; gap: 1.25rem; padding: 1.5rem; background: linear-gradient(135deg, var(--atlas-blue-50) 0%, var(--atlas-slate-50) 100%); border-bottom: 1px solid var(--atlas-gray-200); flex-wrap: wrap; }
.obs-avatar { width: 64px; height: 64px; border-radius: 50%; background: var(--kpi-primary); color: var(--atlas-white); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; font-weight: 700; flex-shrink: 0; letter-spacing: .05em; }
.obs-banner-info { flex: 1; min-width: 200px; }
.obs-banner-name { font-size: 1.3rem; font-weight: 700; color: var(--text-primary); margin-bottom: .25rem; }
.obs-banner-meta { display: flex; flex-wrap: wrap; gap: .75rem; font-size: .82rem; color: var(--text-secondary); }
.obs-banner-meta span { display: inline-flex; align-items: center; }
.obs-banner-right { text-align: right; font-size: .82rem; color: var(--text-secondary); line-height: 1.7; }
.obs-banner-date { font-weight: 600; color: var(--text-primary); font-size: .9rem; }

.obs-observer-section { background: var(--atlas-gray-50); padding: 1rem 1.5rem; border-bottom: 1px solid var(--atlas-gray-200); }
.obs-observer-title { font-size: .85rem; font-weight: 600; color: var(--kpi-primary); text-transform: uppercase; letter-spacing: .04em; margin-bottom: .5rem; }
.obs-observer-meta { display: flex; flex-wrap: wrap; gap: 1.5rem; font-size: .85rem; color: var(--text-primary); }

.obs-classification-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--atlas-gray-200); }
.obs-kpi-card { text-align: center; padding: 1rem .75rem; background: var(--atlas-white); border: 1px solid var(--atlas-gray-200); border-radius: 10px; }
.obs-kpi-icon { width: 44px; height: 44px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.3rem; margin-bottom: .5rem; }
.obs-kpi-label { font-size: .72rem; text-transform: uppercase; font-weight: 600; color: var(--text-secondary); letter-spacing: .04em; margin-bottom: .25rem; }
.obs-kpi-value { font-size: 1rem; font-weight: 700; color: var(--text-primary); }
.accent-info-bg    { background: rgba(59,130,246,.1); color: var(--atlas-blue-500); }
.accent-success-bg { background: rgba(16,185,129,.1); color: var(--kpi-success); }
.accent-danger-bg  { background: rgba(239,68,68,.1); color: var(--kpi-danger); }
.accent-warning-bg { background: rgba(245,158,11,.1); color: var(--kpi-warning); }
.accent-primary-bg { background: var(--atlas-color-primary-soft); color: var(--kpi-primary); }
.accent-secondary-bg { background: rgba(107,114,128,.1); color: var(--text-secondary); }

.obs-details-section { padding: 1.25rem 1.5rem; }
.obs-detail-block { margin-bottom: 1.25rem; }
.obs-section-title { color: var(--kpi-primary); font-size: .9rem; text-transform: uppercase; font-weight: 600; letter-spacing: .04em; border-bottom: 2px solid var(--atlas-blue-100); padding-bottom: .4rem; margin-bottom: .6rem; }

/* ── Two-column detail layout ── */
.obs-detail-layout { display: flex; min-height: 0; }
.obs-history-pane { width: 240px; min-width: 200px; max-width: 260px; background: var(--atlas-slate-50); border-right: 1px solid var(--atlas-slate-200); padding: 1rem .85rem; overflow-y: auto; flex-shrink: 0; }
.obs-detail-pane  { flex: 1; overflow-y: auto; }
.obs-history-title { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--atlas-slate-500); margin-bottom: .85rem; }
.obs-history-empty { font-size: .8rem; color: var(--atlas-slate-400); text-align: center; padding: 1rem 0; }

/* ── Timeline ── */
.obs-timeline { list-style: none; padding: 0; margin: 0; }
.obs-timeline-item { display: flex; gap: .6rem; padding-bottom: 1rem; position: relative; }
.obs-timeline-item:not(:last-child)::before { content: ''; position: absolute; left: .85rem; top: 1.4rem; bottom: 0; width: 1px; background: var(--atlas-slate-200); }
.obs-tl-dot { width: 1.7rem; height: 1.7rem; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .9rem; flex-shrink: 0; }
.obs-tl-dot-primary   { background: var(--atlas-blue-100); color: var(--atlas-blue-600); }
.obs-tl-dot-success   { background: #dcfce7; color: var(--atlas-green-600); }
.obs-tl-dot-danger    { background: var(--atlas-red-100); color: var(--atlas-red-600); }
.obs-tl-dot-warning   { background: #fef9c3; color: #ca8a04; }
.obs-tl-dot-info      { background: #e0f2fe; color: #0284c7; }
.obs-tl-dot-secondary { background: var(--atlas-slate-100); color: var(--atlas-slate-500); }
.obs-tl-content { flex: 1; min-width: 0; }
.obs-tl-event  { font-size: .8rem; font-weight: 600; color: #1e293b; line-height: 1.3; word-break: break-word; }
.obs-tl-actor  { font-size: .72rem; color: var(--atlas-slate-500); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.obs-tl-note   { font-size: .72rem; color: var(--atlas-red-600); font-style: italic; margin-top: .15rem; word-break: break-word; }
.obs-tl-date   { font-size: .68rem; color: var(--atlas-slate-400); margin-top: .1rem; }
.obs-detail-content { font-size: .9rem; color: var(--text-primary); line-height: 1.6; padding: .25rem 0; white-space: pre-line; }

/* ── Worker observation count in detail modal ── */
.obs-worker-count-banner { display: flex; justify-content: center; padding: 1rem 1.5rem; background: #fefce8; border-bottom: 1px solid var(--atlas-gray-200); }
.obs-worker-count-box { text-align: center; padding: .75rem 2.5rem; background: var(--atlas-white); border: 2px solid var(--kpi-primary); border-radius: 12px; }
.obs-worker-count-number { font-size: 2.5rem; font-weight: 800; color: var(--kpi-primary); line-height: 1.1; }
.obs-worker-count-label { font-size: .78rem; color: var(--text-secondary); font-weight: 500; text-transform: uppercase; letter-spacing: .04em; margin-top: .25rem; }

/* ── Category list in detail modal ── */
.obs-category-list { display: flex; flex-direction: column; gap: .5rem; }
.obs-category-item { display: flex; align-items: center; padding: .5rem .75rem; background: #f0f4ff; border-radius: 8px; font-size: .85rem; }

/* ── Worker count grid in worker report modal ── */
.worker-count-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; padding: 1.5rem; }
.worker-count-box { text-align: center; padding: 1.25rem .75rem; border-radius: 12px; }
.worker-count-number { font-size: 2.5rem; font-weight: 800; line-height: 1.1; }
.worker-count-label { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; margin-top: .35rem; }
.worker-count-total { background: rgba(37,99,235,.08); color: var(--kpi-primary); }
.worker-count-total .worker-count-number { color: var(--kpi-primary); }
.worker-count-safe { background: rgba(16,185,129,.08); }
.worker-count-safe .worker-count-number { color: var(--kpi-success); }
.worker-count-safe .worker-count-label { color: var(--kpi-success); }
.worker-count-unsafe { background: rgba(239,68,68,.08); }
.worker-count-unsafe .worker-count-number { color: var(--kpi-danger); }
.worker-count-unsafe .worker-count-label { color: var(--kpi-danger); }
.worker-count-coaching { background: rgba(249,115,22,.08); }
.worker-count-coaching .worker-count-number { color: var(--kpi-orange); }
.worker-count-coaching .worker-count-label { color: var(--kpi-orange); }

@media (max-width: 576px) {
    .obs-classification-row { grid-template-columns: repeat(2, 1fr); }
    .obs-banner { flex-direction: column; text-align: center; }
    .obs-banner-right { text-align: center; }
    .obs-banner-meta { justify-content: center; }
    .worker-count-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Target-type tag in detail modal banner ── */
.obs-banner-target-tag { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .6rem; background: rgba(37,99,235,.12); color: var(--kpi-primary); border-radius: 12px; font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; margin-bottom: .35rem; }

/* ── Create/Edit form modal ── */
.obs-form-section { margin-bottom: 1.25rem; padding-bottom: 1.25rem; border-bottom: 1px solid var(--atlas-slate-100); }
.obs-form-section:last-child { border-bottom: none; }
.obs-form-label { display: block; font-size: .85rem; font-weight: 600; color: var(--kpi-primary); text-transform: uppercase; letter-spacing: .04em; margin-bottom: .6rem; }

/* Target-type selector */
.obs-target-selector { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; }
.obs-target-btn { display: flex; flex-direction: column; align-items: center; gap: .25rem; padding: .75rem .5rem; border: 2px solid var(--atlas-gray-200); background: var(--atlas-white); border-radius: 10px; color: var(--text-secondary); font-size: .8rem; font-weight: 500; transition: all .15s ease; cursor: pointer; }
.obs-target-btn:hover { border-color: var(--kpi-primary); color: var(--kpi-primary); }
.obs-target-btn.active { border-color: var(--kpi-primary); background: rgba(37,99,235,.08); color: var(--kpi-primary); }
.obs-target-btn i { font-size: 1.5rem; }

/* Category chips */
.obs-cat-chip { display: inline-flex; align-items: center; gap: .3rem; padding: .35rem .7rem; border: 1px solid var(--atlas-gray-200); background: var(--atlas-white); border-radius: 16px; font-size: .78rem; color: var(--text-secondary); cursor: pointer; transition: all .15s; margin: .15rem; }
.obs-cat-chip:hover { border-color: var(--kpi-primary); color: var(--kpi-primary); }
.obs-cat-chip.selected { background: var(--kpi-primary); border-color: var(--kpi-primary); color: var(--atlas-white); }

/* Photo grid */
.obs-photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: .75rem; }
.obs-photo-thumb { position: relative; aspect-ratio: 1; border: 1px solid var(--atlas-gray-200); border-radius: 10px; overflow: hidden; background: var(--atlas-gray-50); display: flex; align-items: center; justify-content: center; flex-direction: column; padding: .5rem; text-align: center; }
.obs-photo-thumb i { font-size: 2rem; color: var(--text-secondary); }
.obs-photo-thumb img { width: 100%; height: 100%; object-fit: cover; }
.obs-photo-name { font-size: .7rem; color: var(--text-secondary); margin-top: .25rem; word-break: break-word; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }

@media (max-width: 576px) {
    .obs-target-selector { grid-template-columns: repeat(2, 1fr); }
}

/* ── WorkerImport.razor ── */
.kpi-dl-btn { background: transparent; border: none; color: var(--text-secondary); border-radius: 6px; padding: .25rem .35rem; line-height: 1; font-size: 1rem; flex-shrink: 0; margin-left: auto; }
.kpi-dl-btn:hover { background: rgba(0,0,0,.07); color: var(--text-primary); }

/* Stepper */
.stepper-header { display: flex; align-items: center; background: var(--atlas-white); border-radius: 12px; padding: 1rem 1.5rem; box-shadow: var(--atlas-shadow-1); gap: .75rem; }
.stepper-header-sticky { position: sticky; top: 0; z-index: 100; }
.stepper-steps-track { display: flex; align-items: center; flex: 1; min-width: 0; }
.stepper-nav-btn { flex-shrink: 0; white-space: nowrap; min-width: 80px; }
.stepper-step { display: flex; align-items: center; gap: .5rem; }
.stepper-circle { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .85rem; background: var(--atlas-gray-200); color: var(--atlas-gray-400); transition: all .2s; flex-shrink: 0; }
.stepper-label { font-size: .85rem; font-weight: 600; color: var(--atlas-gray-400); white-space: nowrap; transition: color .2s; }
.stepper-line { flex: 1; height: 2px; background: var(--atlas-gray-200); margin: 0 .75rem; transition: background .2s; }
.stepper-step.active .stepper-circle { background: var(--kpi-primary); color: var(--atlas-white); }
.stepper-step.active .stepper-label { color: var(--text-primary); }
.stepper-step.done .stepper-circle { background: var(--kpi-success); color: var(--atlas-white); }
.stepper-step.done .stepper-label { color: var(--kpi-success); }
.stepper-line.done { background: var(--kpi-success); }

/* ── Visits.razor ── */
.vis-dashboard { background: var(--atlas-gray-100); min-height: 100%; padding: 1.5rem; }
.vis-card { background: var(--atlas-white); border: 1px solid rgba(0,0,0,.05); border-radius: 12px; box-shadow: var(--atlas-shadow-1); }
.vis-banner { background: var(--atlas-white); padding: 1.25rem 2rem; border-radius: 12px; box-shadow: var(--atlas-shadow-1); display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; border-left: 5px solid var(--atlas-blue-600); }
.vis-banner-title { font-size: 1.4rem; font-weight: 700; color: var(--atlas-gray-900); }
.vis-banner-sub { font-size: .875rem; color: var(--atlas-gray-500); margin-top: .2rem; }
.vis-table-header { padding: 1rem 1.25rem; border-bottom: 1px solid #eef0f3; display: flex; align-items: center; justify-content: space-between; }
.vis-table-title { font-size: 1rem; font-weight: 600; color: var(--atlas-gray-900); }
.vis-thumb { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; border: 1px solid var(--atlas-gray-200); }
.vis-thumb-empty { display: flex; align-items: center; justify-content: center; background: var(--atlas-gray-100); color: var(--atlas-gray-400); font-size: 1.2rem; }

/* ── Blacklist.razor (plan 2026-07-23 F4) ──────────────────────────────────────────────
   Veto global de plataforma. Namespace .bl-*; el modal compartido usa .blm-* y vive en
   accessControl-components.css. Nada de CSS inline: solo tokens --atlas-*. */
.bl-page { background: var(--atlas-gray-100); min-height: 100%; padding: 1.5rem; }
.bl-banner { background: var(--atlas-white); padding: 1.25rem 2rem; border-radius: 12px; box-shadow: var(--atlas-shadow-1); display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; border-left: 5px solid var(--atlas-red-600); }
.bl-banner-title { font-size: 1.4rem; font-weight: 700; color: var(--atlas-gray-900); }
.bl-banner-title i { color: var(--atlas-red-600); }
.bl-banner-sub { font-size: .875rem; color: var(--atlas-gray-500); margin-top: .2rem; max-width: 70ch; }
.bl-table-wrapper { background: var(--atlas-white); }
.bl-required { color: var(--atlas-red-600); }
.bl-modal { background: var(--atlas-overlay); }

/* Toggle Active / History (patrón Alert Engine) */
.bl-view-toggle .btn.active { background: var(--atlas-gray-800); border-color: var(--atlas-gray-800); color: var(--atlas-white); }

/* Celdas */
.bl-caret { background: transparent; border: none; padding: 0 .4rem 0 0; color: var(--atlas-gray-500); line-height: 1; }
.bl-caret:hover { color: var(--atlas-gray-900); }
.bl-reason { display: inline-block; max-width: 22ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.bl-status { display: inline-block; padding: .1rem .5rem; border-radius: 999px; font-size: .72rem; font-weight: 700; letter-spacing: .02em; }
.bl-status-active { background: var(--atlas-red-100); color: var(--atlas-red-800); }
.bl-status-lifted { background: var(--atlas-gray-200); color: var(--atlas-gray-700); }

/* Fila desplegable con la auditoría (incluidos los BLOCKED_ATTEMPT) */
.bl-audit { background: var(--atlas-gray-50); border-left: 3px solid var(--atlas-red-500); padding: .85rem 1rem; }
.bl-audit-loading, .bl-audit-empty { font-size: .82rem; color: var(--atlas-gray-500); }
.bl-audit-head { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; font-weight: 700; font-size: .82rem; color: var(--atlas-gray-800); margin-bottom: .6rem; }
.bl-audit-hint { font-weight: 400; font-size: .75rem; color: var(--atlas-gray-500); }
.bl-audit-reason { font-size: .8rem; color: var(--atlas-gray-700); background: var(--atlas-white); border: 1px solid var(--atlas-border); border-radius: 8px; padding: .45rem .6rem; margin-bottom: .5rem; }
.bl-audit-reason-label { display: block; font-size: .68rem; text-transform: uppercase; letter-spacing: .04em; color: var(--atlas-gray-400); font-weight: 700; }
.bl-audit-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .3rem; }
.bl-audit-item { display: grid; grid-template-columns: 9.5rem 11rem 12rem 7rem 1fr; gap: .5rem; align-items: baseline; font-size: .78rem; color: var(--atlas-gray-700); background: var(--atlas-white); border: 1px solid var(--atlas-border); border-radius: 8px; padding: .35rem .55rem; }
.bl-audit-action { font-weight: 700; font-size: .68rem; letter-spacing: .03em; padding: .1rem .45rem; border-radius: 999px; text-align: center; }
.bl-audit-action-added { background: var(--atlas-red-100); color: var(--atlas-red-800); }
.bl-audit-action-lifted { background: var(--atlas-emerald-100); color: var(--atlas-emerald-800); }
.bl-audit-action-blocked { background: var(--atlas-amber-100); color: var(--atlas-amber-800); }
.bl-audit-when { color: var(--atlas-gray-500); font-variant-numeric: tabular-nums; }
.bl-audit-actor { color: var(--atlas-gray-800); overflow: hidden; text-overflow: ellipsis; }
.bl-audit-origin { color: var(--atlas-gray-500); text-transform: uppercase; font-size: .68rem; letter-spacing: .04em; }
.bl-audit-detail { color: var(--atlas-gray-600); word-break: break-word; }

@media (max-width: 992px) {
    .bl-audit-item { grid-template-columns: 1fr; gap: .15rem; }
    .bl-banner { flex-direction: column; align-items: flex-start; }
}
