:root{
  --bg:#0b0f17;
  --panel:#101827;
  --card:#0f1624;
  --card2:#0e1522;
  --surface:#101827;
  --surface2:#2a2a2a;
  --surface3:#2a2d45;
  --border:rgba(255,255,255,.08);
  --text:#e8eefc;
  --fg:#e8eefc;
  --muted:rgba(232,238,252,.68);
  --muted2:rgba(232,238,252,.5);
  --primary:#7aa2ff;
  --primary2:#4e7bff;
  --accent:#7aa2ff;
  --purple:#a855f7;
  --danger:#ff5c7a;
  --warn:#ffcc66;
  --warning:#ffcc66;
  --ok:#3ddc97;
  --hover:rgba(255,255,255,.04);
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --sans: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  --radius:16px;
  --radius-sm:12px;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --sla-modal-bg:#1e2130;
  --sla-card-bg:#0d1020;
  --sla-card-border:rgba(255,255,255,.1);
  --sla-label-color:rgba(200,210,230,.55);
  --sla-value-color:#e8eeff;
  --sla-section-label:rgba(200,210,230,.6);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body{
  margin:0;
  font-family: var(--sans);
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 70% 0%, rgba(122,162,255,.12), transparent 60%),
    radial-gradient(900px 500px at 20% 10%, rgba(61,220,151,.08), transparent 55%),
    linear-gradient(180deg, #070a10 0%, var(--bg) 35%, #070a10 100%);
}

a{ color: var(--primary); text-decoration: none; }
a:hover{ text-decoration: underline; }

.muted{ color: var(--muted); }
.muted2{ color: var(--muted2); }
.small{ font-size: 12px; }
.mono{ font-family: var(--mono); }

hr{
  border: none;
  border-top: 1px solid var(--border);
  margin: 14px 0;
  opacity: .85;
}

/* --- Buttons --- */
button{
  font-family: var(--sans);
  border: 1px solid var(--border);
  background: rgba(255,255,255,.03);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: transform .05s ease, background .15s ease, border-color .15s ease;
  user-select: none;
}
button:hover{
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.12);
}
button:active{ transform: translateY(1px); }
button:disabled{
  opacity: .5;
  cursor: not-allowed;
}

button.primary{
  background: linear-gradient(180deg, rgba(122,162,255,.25), rgba(78,123,255,.18));
  border-color: rgba(122,162,255,.35);
}
button.primary:hover{
  background: linear-gradient(180deg, rgba(122,162,255,.32), rgba(78,123,255,.22));
  border-color: rgba(122,162,255,.5);
}

button.ghost{
  background: rgba(255,255,255,.02);
}
button.danger, button.ghost.danger{
  color: #ffd7df;
  border-color: rgba(255,92,122,.35);
  background: rgba(255,92,122,.08);
}
button.danger:hover, button.ghost.danger:hover{
  border-color: rgba(255,92,122,.55);
  background: rgba(255,92,122,.12);
}
button.small{
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 12px;
}

/* --- Inputs --- */
input, select, textarea{
  font-family: var(--sans);
  color: var(--text);
  background: rgba(255,255,255,.03);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 9px 10px;
  outline: none;
  transition: border-color .15s ease, background .15s ease;
}
input.mono{ font-family: var(--mono); }
input:focus, select:focus, textarea:focus{
  border-color: rgba(122,162,255,.55);
  background: rgba(122,162,255,.06);
}

select{
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(232,238,252,.55) 50%),
    linear-gradient(135deg, rgba(232,238,252,.55) 50%, transparent 50%);
  background-position:
    calc(100% - 16px) calc(1em + 2px),
    calc(100% - 11px) calc(1em + 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 28px;
}

/* --- Layout --- */
.topbar{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(10,14,22,.75);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.brand{ display:flex; flex-direction: column; gap: 2px; }
.brandTitle{ font-weight: 700; letter-spacing: .2px; }
.brandSub{ font-size: 12px; color: var(--muted); }

.topActions{ display:flex; gap: 8px; align-items:center; flex-wrap: wrap; }

.toolbar{
  display:flex;
  gap: 12px;
  padding: 12px 16px 0 16px;
  flex-wrap: wrap;
}
.toolGroup{
  background: rgba(255,255,255,.02);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  min-width: 220px;
  box-shadow: 0 1px 0 rgba(255,255,255,.03) inset;
}
.toolGroup.grow{ flex: 1 1 420px; }
.row{ display:flex; gap: 8px; align-items:center; }
.grow{ flex: 1; }

.main{
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  padding: 14px 16px 24px 16px;
}

.panel{
  background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.015));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.panelHeader{
  display:flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  background: rgba(0,0,0,.12);
}
.panelTitle{ font-weight: 700; }

/* --- Progress --- */
.progressWrap{ padding: 12px 14px; }
.progressBarTrack{
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.08);
}
#progressBar{
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(122,162,255,.55), rgba(61,220,151,.45));
}

/* --- Banner / toast --- */
.bannerHost{
  position: fixed;
  top: 70px;
  right: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 50;
}
.banner{
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(16,24,39,.88);
  box-shadow: var(--shadow);
  max-width: 360px;
}
.banner.info{ border-color: rgba(122,162,255,.35); }
.banner.ok{ border-color: rgba(61,220,151,.35); }
.banner.warn{ border-color: rgba(255,204,102,.35); }
.banner.error{ border-color: rgba(255,92,122,.35); }

/* --- Files UI cards from app.js --- */
#files{ padding: 14px; display: flex; flex-direction: column; gap: 12px; }

.fileRow{
  background: rgba(0,0,0,.12);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  box-shadow: 0 1px 0 rgba(255,255,255,.03) inset;
}

.fileMain{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.fileField{
  display:flex;
  flex-direction: column;
  gap: 6px;
}

.fileCols{
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.6;
}

.fileName{
  font-weight: 650;
  width: min(360px, 55vw);
}

.pill{
  display:inline-flex;
  align-items:center;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.03);
  color: var(--muted);
}
.pill.primary{
  border-color: rgba(122,162,255,.45);
  background: rgba(122,162,255,.10);
  color: #d9e4ff;
}

.fileGrid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.field{ display:flex; flex-direction: column; gap: 6px; }
.field label{ font-size: 12px; color: var(--muted); }
.field.colSpan2{ grid-column: span 2; }

@media (max-width: 980px){
  .fileGrid{ grid-template-columns: 1fr; }
  .field.colSpan2{ grid-column: span 1; }
}

/* --- Results --- */
#results{ padding: 14px; display: flex; flex-direction: column; gap: 12px; }

.resultPair{
  background: rgba(0,0,0,.12);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.reportHead{
  display:flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  background: rgba(0,0,0,.10);
}
.pairInner{ padding: 12px 14px; }

.kpiRow{
  display:grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.kpi{
  text-align: left;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: rgba(255,255,255,.02);
  border: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(255,255,255,.03) inset;
}
.kpi:hover{ background: rgba(255,255,255,.05); }
.kpiLabel{ font-size: 12px; color: var(--muted); }
.kpiVal{ font-size: 18px; font-weight: 750; margin-top: 4px; }

@media (max-width: 980px){
  .kpiRow{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.pairFilters{
  display:flex;
  gap: 10px;
  align-items:center;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.pairPager{
  display:flex;
  align-items:center;
  gap: 8px;
}

.tableWrap{
  overflow:auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(0,0,0,.10);
}

table{
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
thead th{
  position: sticky;
  top: 0;
  background: rgba(16,24,39,.92);
  backdrop-filter: blur(10px);
  color: var(--muted);
  text-align: left;
  padding: 10px 10px;
  border-bottom: 1px solid var(--border);
  font-weight: 650;
  white-space: nowrap;
}
tbody td{
  padding: 9px 10px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  white-space: nowrap;
}
tbody tr:hover{
  background: rgba(122,162,255,.08);
}

/* --- Details side panel --- */
.detailsPanel{
  position: fixed;
  right: 14px;
  bottom: 14px;
  top: 84px;
  width: min(520px, calc(100vw - 28px));
  background: rgba(16,24,39,.88);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  z-index: 40;
  overflow: hidden;
  backdrop-filter: blur(14px);
  display: flex;
  flex-direction: column;
}
.detailsHeader{
  display:flex;
  justify-content: space-between;
  align-items:center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  background: rgba(0,0,0,.12);
  flex-shrink: 0;
}
.detailsTitle{ font-weight: 750; }
.detailsBtns{ display:flex; gap: 8px; }
.detailsBody{
  padding: 12px 14px;
  overflow: auto;
  flex: 1;
}
.grid2{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media (max-width: 980px){
  .detailsPanel{ top: 70px; right: 10px; left: 10px; width: auto; }
  .grid2{ grid-template-columns: 1fr; }
}

/* --- Modal --- */
.modalBackdrop{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 60;
  display:flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal{
  width: min(860px, 100%);
  max-height: min(90vh, 860px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: rgba(16,24,39,.92);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  color: var(--text);
}
.modalHead{
  display:flex;
  justify-content: space-between;
  align-items:center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}
.modalTitle{ font-weight: 750; }
.modalBody{
  padding: 12px 14px;
  overflow: auto;
  max-height: calc(80vh - 120px);
}
.modalFoot{
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  display:flex;
  justify-content: flex-end;
  gap: 10px;
}

/* --- Views/columns modal helpers --- */
.stack{ display:flex; flex-direction: column; gap: 10px; }
.gridCols{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.chk{
  display:flex;
  align-items:center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.02);
}
.viewRow{
  display:flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.02);
}
.viewRowBtns{ display:flex; gap: 8px; }

/* --- Scrollbars (nice-to-have) --- */
*::-webkit-scrollbar{ height: 10px; width: 10px; }
*::-webkit-scrollbar-thumb{
  background: rgba(255,255,255,.12);
  border-radius: 999px;
  border: 2px solid rgba(0,0,0,.0);
}
*::-webkit-scrollbar-track{ background: rgba(255,255,255,.04); }
[hidden]{
  display: none !important;
}

/* ========================================================
   Classes for dynamically generated HTML in app.js
   ======================================================== */

/* --- Button BEM aliases (app.js generates .btn .btn-* classes) --- */
.btn{
  font-family: var(--sans);
  border: 1px solid var(--border);
  background: rgba(255,255,255,.03);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: transform .05s ease, background .15s ease, border-color .15s ease;
  user-select: none;
}
.btn:hover{ background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.12); }
.btn:active{ transform: translateY(1px); }
.btn:disabled{ opacity: .5; cursor: not-allowed; }

.btn-primary{
  background: linear-gradient(180deg, rgba(122,162,255,.25), rgba(78,123,255,.18));
  border-color: rgba(122,162,255,.35);
}
.btn-primary:hover{
  background: linear-gradient(180deg, rgba(122,162,255,.32), rgba(78,123,255,.22));
  border-color: rgba(122,162,255,.5);
}
.btn-ghost{ background: rgba(255,255,255,.02); }
.btn-danger{
  color: #ffd7df;
  border-color: rgba(255,92,122,.35);
  background: rgba(255,92,122,.08);
}
.btn-danger:hover{ border-color: rgba(255,92,122,.55); background: rgba(255,92,122,.12); }
.btn-sm{ padding: 6px 10px; border-radius: 10px; font-size: 12px; }

/* --- Input/select aliases --- */
.input{ font-family: var(--sans); color: var(--text); background: rgba(255,255,255,.03); border: 1px solid var(--border); border-radius: 12px; padding: 9px 10px; outline: none; transition: border-color .15s ease, background .15s ease; }
.input:focus{ border-color: rgba(122,162,255,.55); background: rgba(122,162,255,.06); }
.input-sm{ padding: 6px 8px; font-size: 12px; border-radius: 10px; }
.select{ font-family: var(--sans); color: var(--text); background: rgba(255,255,255,.03); border: 1px solid var(--border); border-radius: 12px; padding: 9px 10px; padding-right: 28px; outline: none; transition: border-color .15s ease; appearance: none; background-image: linear-gradient(45deg,transparent 50%,rgba(232,238,252,.55) 50%), linear-gradient(135deg,rgba(232,238,252,.55) 50%,transparent 50%); background-position: calc(100% - 16px) calc(1em + 2px), calc(100% - 11px) calc(1em + 2px); background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
.select:focus{ border-color: rgba(122,162,255,.55); }

/* --- Banner BEM modifiers (app.js uses banner--err, banner--warn) --- */
.banner--err{ border-color: rgba(255,92,122,.45); }
.banner--warn{ border-color: rgba(255,204,102,.45); }
.banner__icon{
  font-size: 16px;
  width: 24px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.banner{
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.banner__body{ flex: 1; }
.banner__title{ font-weight: 650; font-size: 13px; }
.banner__text{ font-size: 12px; color: var(--muted); margin-top: 2px; }
.banner__actions{ margin-top: 6px; display: flex; gap: 6px; }

/* --- Results layout --- */
.results{ display: flex; flex-direction: column; gap: 12px; }
.result-block{
  background: rgba(0,0,0,.12);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
}
.result-title{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.links{ display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.link{ font-size: 13px; }

/* --- KPI grid (app.js uses .kpi .item .value .name) --- */
.kpi{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}
.kpi .item{
  text-align: left;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: rgba(255,255,255,.02);
  border: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(255,255,255,.03) inset;
}
.kpi .item:hover{ background: rgba(255,255,255,.05); }
.kpi .value{ font-size: 18px; font-weight: 750; margin-bottom: 4px; }
.kpi .name{ font-size: 12px; color: var(--muted); }
.kpi--pair .item{ cursor: pointer; }
.kpi-btn{ display: block; width: 100%; text-align: left; }

/* --- Diff tabs --- */
.diff-tabs{
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.diff-tab{
  padding: 6px 12px;
  border-radius: 10px;
  font-size: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.02);
  color: var(--muted);
  cursor: pointer;
  transition: background .12s, border-color .12s, color .12s;
}
.diff-tab:hover{ background: rgba(255,255,255,.05); color: var(--text); }
.diff-tab--active{
  background: rgba(122,162,255,.15);
  border-color: rgba(122,162,255,.4);
  color: #d0dcff;
}

/* --- Pair toolbar & filters --- */
.pair-toolbar{
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  padding: 8px 0;
}
.pair-toolbar .left{ display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pair-toolbar .right{ display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pair-filters{ display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.chip{
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  border: 1px solid rgba(255,204,102,.35);
  background: rgba(255,204,102,.08);
  color: #ffe9a0;
}

/* --- Diff pagination --- */
.diff-pagination{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.diff-page-sizes{ display: flex; align-items: center; gap: 4px; }
.diff-page-nav{ display: flex; align-items: center; gap: 6px; }
.diff-pgsz-btn{
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.02);
  color: var(--muted);
  cursor: pointer;
}
.diff-pgsz-btn--active{
  background: rgba(122,162,255,.15);
  border-color: rgba(122,162,255,.4);
  color: #d0dcff;
}
.diff-nav-btn{
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 14px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.02);
  color: var(--text);
  cursor: pointer;
}
.diff-nav-btn:disabled{ opacity: .35; cursor: not-allowed; }
.diff-page-indicator{ font-size: 12px; color: var(--muted); white-space: nowrap; }

/* --- Diff table wrapper & row colors --- */
.diff-table-wrap{
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(0,0,0,.10);
}
.diff-table{ width: 100%; border-collapse: collapse; font-size: 13px; }
.diff-row--mismatch td{ background: rgba(255,204,102,.06); }
.diff-row--mismatch:hover td{ background: rgba(255,204,102,.12); }
.diff-row--missing td{ background: rgba(122,162,255,.06); }
.diff-row--missing:hover td{ background: rgba(122,162,255,.12); }
.diff-row--dup td{ background: rgba(255,92,122,.05); }
.diff-row--dup:hover td{ background: rgba(255,92,122,.10); }
tbody .diff-row--mismatch:focus,
tbody .diff-row--missing:focus,
tbody .diff-row--dup:focus{ outline: 2px solid rgba(122,162,255,.55); }

/* --- Sticky columns in diff table --- */
.sticky-col{
  position: sticky;
  left: 0;
  background: rgba(16,24,39,.92);
  z-index: 1;
  white-space: nowrap;
}
.sticky-col-2{
  position: sticky;
  left: 180px;
  background: rgba(16,24,39,.92);
  z-index: 1;
  white-space: nowrap;
}

/* --- Details card & KV grid --- */
.details-grid{
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.details-card{
  background: rgba(255,255,255,.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}
.details-card h4{ margin: 0 0 8px 0; font-size: 13px; color: var(--muted); font-weight: 600; }
.details-kv{
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 4px 12px;
  font-size: 13px;
}
.details-kv .k{ color: var(--muted); white-space: nowrap; }
.details-kv .v{ font-family: var(--mono); word-break: break-all; }

/* --- Columns modal list --- */
.cols-list{ display: flex; flex-direction: column; gap: 6px; }
.cols-item{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.02);
}
.cols-item .left{ display: flex; align-items: center; gap: 8px; }
.cols-item .name{ font-size: 13px; }
.cols-item .actions{ display: flex; gap: 4px; }

/* --- Add file button (label styled as button) --- */
.btn-add-file{
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--sans);
  font-size: 14px;
  border: 1px solid rgba(61,220,151,.4);
  background: rgba(61,220,151,.09);
  color: #a8f0d4;
  padding: 8px 14px;
  border-radius: 12px;
  cursor: pointer;
  transition: transform .05s ease, background .15s ease, border-color .15s ease;
  user-select: none;
  white-space: nowrap;
}
.btn-add-file:hover{
  background: rgba(61,220,151,.16);
  border-color: rgba(61,220,151,.6);
  color: #c8f8e8;
}
.btn-add-file:active{ transform: translateY(1px); }

.decimalCommaLabel {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-family: var(--sans);
  color: var(--text);
  margin-top: 4px;
}
.dropOverlay {
  position: fixed;
  inset: 0;
  background: rgba(7, 10, 16, 0.88);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px dashed rgba(122, 162, 255, 0.55);
  pointer-events: none;
  backdrop-filter: blur(4px);
}
.dropOverlayInner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  color: var(--primary);
  font-size: 18px;
  font-weight: 650;
  letter-spacing: .2px;
}
.summaryRow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: rgba(0,0,0,.08);
}
.summaryKpi {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 80px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.02);
  border: 1px solid var(--border);
  gap: 2px;
}
.summaryKpiVal {
  font-size: 15px;
  font-weight: 750;
  font-family: var(--mono);
}
.summaryKpiLabel {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}

.reportBlock{
  border-top: 1px solid var(--border);
}
.pairHead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  background: rgba(0,0,0,.10);
  flex-wrap: wrap;
}
.pairTitle { font-weight: 700; }
.pairMeta { flex: 1; }

.statusFilterBar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 6px 0 8px 0;
}

.typeFilterLabel {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  padding: 3px 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.78rem;
  transition: background .12s, border-color .12s;
}
.typeFilterLabel:hover { background: rgba(255,255,255,.05); }
.typeFilterLabel input[type=checkbox] { accent-color: var(--accent); width: 13px; height: 13px; }

/* --- Column filter popup --- */
.colFilterPopup {
  position: fixed;
  z-index: 200;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: 200px;
  max-height: 320px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.colFilterHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.colFilterVals {
  overflow-y: auto;
  flex: 1;
  padding: 4px 0;
}
.colFilterItem {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 12px;
  cursor: pointer;
  font-size: 0.8rem;
}
.colFilterItem:hover { background: rgba(255,255,255,.05); }
.colFilterItem input[type=checkbox] { accent-color: var(--accent); flex-shrink: 0; }
.colFilterFooter {
  display: flex;
  gap: 6px;
  padding: 6px 10px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
th.col-filterable {
  cursor: pointer;
  user-select: none;
}
th.col-filterable:hover { color: var(--text); }
.col-filter-icon { opacity: 0.45; font-size: 0.65em; vertical-align: middle; }
.col-filter-active { color: var(--accent); font-size: 0.75em; vertical-align: middle; }

.reportSearchBar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0 8px 0;
}
.reportSearchInput {
  padding: 4px 8px;
  width: 220px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  font-size: 0.8rem;
}

/* ── Inline status mapping panel body ── */
.smapPanelBody {
  padding: 12px 14px;
}
.smapPanelFooter {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px;
  margin-top: 10px;
}

/* ── Status mapping UI ── */
.smapSection {
  margin-top: 14px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}
.smapSection > .muted { display: block; margin-bottom: 10px; }

.smapRows { display: flex; flex-direction: column; gap: 8px; }

.smapFreeZone {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 0;
  min-height: 40px;
}
.smapFreeZone--empty {
  padding: 0.5rem 0;
}
.smapGroups {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}
.smapGroup {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: var(--surface2, #23263a);
  border: 1px solid var(--border, #333);
  border-radius: 6px;
  flex-wrap: wrap;
}
.smapGroup.dnd-over {
  border-color: var(--accent, #5b7cf6);
  background: var(--surface3, #2a2d45);
}
.smapGroupChips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.smapChip--free {
  cursor: grab;
}
.smapChip--free:active {
  cursor: grabbing;
}
.smapChip--dragging {
  opacity: 0.35;
}
.smapChip--free.dnd-over {
  outline: 2px solid var(--accent, #5b7cf6);
  outline-offset: 2px;
}
.smapGroupLabel {
  cursor: pointer;
  color: var(--muted, #8892b0);
  font-size: 0.85rem;
  border-bottom: 1px dashed var(--border, #444);
  line-height: 1.4;
}
.smapGroupLabel:hover {
  color: var(--text, #e8eefc);
}

.smapChip--grouped { /* inherits base .smapChip styling */ }

.smapChip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-family: var(--mono);
  background: rgba(122,162,255,.12);
  border: 1px solid rgba(122,162,255,.3);
  color: #d0dcff;
  white-space: nowrap;
}
.smapChipX {
  cursor: pointer;
  opacity: .6;
  font-size: 11px;
  line-height: 1;
  padding: 0 1px;
  background: none;
  border: none;
  color: inherit;
}
.smapChipX:hover { opacity: 1; }


.smapArrow {
  color: var(--muted2);
  font-size: 14px;
  flex-shrink: 0;
  user-select: none;
}

.smapCanonical {
  font-family: var(--mono);
  font-size: 12px;
  padding: 4px 9px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.03);
  color: var(--text);
  width: 130px;
  outline: none;
  transition: border-color .12s;
}
.smapCanonical:focus { border-color: rgba(122,162,255,.55); }


.smapUnmapped {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.smapUnmapped > .muted { font-size: 12px; display: block; margin-bottom: 6px; }

.smapUnmappedBadges { display: flex; flex-wrap: wrap; gap: 6px; }

.smapUnmappedBadge {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-family: var(--mono);
  border: 1px solid var(--border);
  background: rgba(255,255,255,.03);
  color: var(--muted);
  cursor: pointer;
  transition: border-color .12s, color .12s, background .12s;
}
.smapUnmappedBadge:hover {
  border-color: rgba(122,162,255,.4);
  color: var(--text);
  background: rgba(122,162,255,.08);
}

/* ===== LOGIN PAGE ===== */

.loginPage {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

/* Floating math symbols */
.mathBg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.mathSym {
  position: absolute;
  color: rgba(160, 190, 255, 0.35);
  font-family: "Georgia", serif;
  opacity: 0;
  animation: floatUp linear forwards;
  user-select: none;
}

@keyframes floatUp {
  0%   { transform: translateY(0)   rotate(0deg);   opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 0.6; }
  100% { transform: translateY(-110vh) rotate(20deg); opacity: 0; }
}

/* Login card */
.loginCard {
  position: relative;
  z-index: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 360px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}

.loginBrand {
  text-align: center;
  margin-bottom: 2rem;
}

.loginBrandTitle {
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--fg);
}

.loginBrandSub {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.2rem;
  font-family: var(--mono);
}

.loginForm {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.loginField {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.loginField label {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.loginField input {
  font-family: var(--mono);
  font-size: 0.9rem;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--fg);
  border-radius: 4px;
  padding: 0.5rem 0.7rem;
  width: 100%;
  box-sizing: border-box;
}

.loginField input:focus {
  outline: none;
  border-color: var(--accent, #6c8ebf);
}

.loginBtn {
  margin-top: 0.5rem;
  padding: 0.6rem;
  background: var(--primary, #3a6ea5);
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 0.9rem;
  cursor: pointer;
  font-family: var(--mono);
  letter-spacing: 0.04em;
  transition: opacity 0.15s;
}

.loginBtn:hover  { opacity: 0.85; }
.loginBtn:active { opacity: 0.7; }
.loginBtn:disabled { opacity: 0.4; cursor: default; }

.loginError {
  font-size: 0.8rem;
  color: var(--danger, #c0392b);
  text-align: center;
  min-height: 1.1em;
}

/* ===== TOPBAR ADDITIONS ===== */
#incidentsNavBtn.active {
  background: var(--accent, #6c8aff);
  color: #fff;
  border-color: var(--accent, #6c8aff);
}
.topbarSep {
  width: 1px;
  height: 1.2em;
  background: var(--border);
  margin: 0 0.2rem;
}
.topbarUser {
  font-family: var(--mono);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ===== HISTORY PANEL ===== */
.historyList {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.5rem 0;
}
.historyEmpty {
  padding: 0.5rem 0;
}
.historyRow {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.1s;
}
.historyRow:hover { background: var(--hover, rgba(255,255,255,0.04)); }
.historyRowMeta   { font-size: 0.8rem; color: var(--muted); }
.historyRowStats  { font-size: 0.8rem; font-family: var(--mono); }
.historyPager {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  padding: 0.5rem 0;
  font-size: 0.8rem;
}

/* ===== ADMIN PANEL ===== */
.adminPage {
  min-height: 100vh;
  background: var(--bg);
  color: var(--fg);
  display: flex;
  flex-direction: column;
}

.adminTopbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  height: 48px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
}

.adminBrand { font-weight: 600; font-size: 0.95rem; }
.adminBrandSub { font-size: 0.7rem; color: var(--muted); }

.adminMain {
  flex: 1;
  padding: 1.5rem;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}

/* Tabs */
.adminTabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
}

.adminTab {
  padding: 0.6rem 1.2rem;
  font-size: 0.85rem;
  cursor: pointer;
  border: none;
  background: none;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s;
}

.adminTab.active {
  color: var(--fg);
  border-bottom-color: var(--fg);
}

.adminTabContent { display: none; }
.adminTabContent.active { display: block; }

/* Tables */
.adminTable {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.adminTable th {
  text-align: left;
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
}

.adminTable td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.adminTable tr:hover td { background: var(--hover, rgba(255,255,255,0.03)); }

.adminTableActions { display: flex; gap: 0.4rem; }

/* Admin toolbar above table */
.adminToolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

/* Admin pagination */
.adminPager {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.75rem;
  font-size: 0.8rem;
}

/* Admin modal form */
.adminForm {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 280px;
}

.adminFormField {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.adminFormField label {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.adminFormField input,
.adminFormField select {
  font-family: var(--mono);
  font-size: 0.875rem;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--fg);
  border-radius: 4px;
  padding: 0.4rem 0.6rem;
}

.adminFormError {
  font-size: 0.8rem;
  color: var(--danger, #c0392b);
  min-height: 1em;
}

/* Clickable reconciliation rows */
.reconRow { cursor: pointer; }

/* ===== FILE PREVIEW ===== */
.filePreview {
  margin-top: 8px;
  border-top: 1px solid var(--border);
  padding-top: 8px;
}
.filePreviewScroll {
  overflow-x: auto;
  border-radius: 6px;
  border: 1px solid var(--border);
}
.filePreviewTable {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  font-family: var(--mono);
}
.filePreviewTable th {
  padding: 4px 8px;
  text-align: left;
  background: rgba(0,0,0,.18);
  color: var(--muted);
  font-weight: 500;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
}
.filePreviewTable td {
  padding: 3px 8px;
  white-space: nowrap;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
}
.filePreviewTable th:last-child,
.filePreviewTable td:last-child { border-right: none; }
.filePreviewTable tbody tr:last-child td { border-bottom: none; }
.filePreviewTable tbody tr:hover td { background: rgba(255,255,255,.03); }
.fpSel { background: rgba(122,162,255,.12) !important; color: var(--text) !important; }

/* ===== LIGHT THEME ===== */
body[data-theme="light"] {
  --bg: #f0f4ff;
  --panel: #ffffff;
  --card: #f5f7ff;
  --card2: #eef1fb;
  --surface: #ffffff;
  --surface2: #e8ecf8;
  --surface3: #dde2f2;
  --border: rgba(0,0,0,.1);
  --text: #1a1f2e;
  --fg: #1a1f2e;
  --muted: rgba(26,31,46,.62);
  --muted2: rgba(26,31,46,.45);
  --primary: #3b6fd4;
  --primary2: #2a56b8;
  --accent: #3b6fd4;
  --shadow: 0 4px 16px rgba(0,0,0,.1);
  --ok: #1a7a48;
  --warn: #8a6200;
  --warning: #8a6200;
  --hover: rgba(0,0,0,.04);
  --sla-modal-bg:#ffffff;
  --sla-card-bg:#f0f4ff;
  --sla-card-border:rgba(0,0,0,.12);
  --sla-label-color:rgba(26,31,46,.55);
  --sla-value-color:#1a1f2e;
  --sla-section-label:rgba(26,31,46,.6);
  --danger: #c4183a;
}
body[data-theme="light"] {
  background: linear-gradient(180deg, #e8edff 0%, #f0f4ff 40%, #eaf0ff 100%);
}
body[data-theme="light"] button {
  background: rgba(0,0,0,.04);
  border-color: rgba(0,0,0,.12);
  color: var(--text);
}
body[data-theme="light"] button:hover {
  background: rgba(0,0,0,.07);
  border-color: rgba(0,0,0,.2);
}
body[data-theme="light"] button.primary {
  background: linear-gradient(180deg, rgba(59,111,212,.2), rgba(42,86,184,.15));
  border-color: rgba(59,111,212,.4);
}
body[data-theme="light"] input,
body[data-theme="light"] select,
body[data-theme="light"] textarea {
  background: #fff;
  border-color: rgba(0,0,0,.15);
  color: var(--text);
}
body[data-theme="light"] select {
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(60,65,90,.6) 50%),
    linear-gradient(135deg, rgba(60,65,90,.6) 50%, transparent 50%);
  background-position:
    calc(100% - 16px) calc(1em + 2px),
    calc(100% - 11px) calc(1em + 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
body[data-theme="light"] .topbar,
body[data-theme="light"] .toolbar {
  background: rgba(255,255,255,.85);
  border-color: rgba(0,0,0,.1);
}
body[data-theme="light"] .panel,
body[data-theme="light"] .modal,
body[data-theme="light"] .detailsPanel {
  background: var(--panel);
  border-color: var(--border);
}
body[data-theme="light"] .table th {
  background: rgba(0,0,0,.04);
}
body[data-theme="light"] .table tr:hover td {
  background: rgba(59,111,212,.06);
}
body[data-theme="light"] .fileRow,
body[data-theme="light"] .historyRow {
  border-color: var(--border);
}
body[data-theme="light"] .banner {
  background: rgba(255,255,255,.95);
  border-color: rgba(0,0,0,.12);
}
body[data-theme="light"] .banner.ok  { border-color: rgba(40,160,90,.35); }
body[data-theme="light"] .banner.warn { border-color: rgba(180,130,0,.35); }
body[data-theme="light"] .banner.error { border-color: rgba(200,50,60,.35); }
body[data-theme="light"] .banner__text { color: var(--muted); }

/* Add file button */
body[data-theme="light"] .btn-add-file {
  color: #1a6b40;
  border-color: rgba(26,107,64,.35);
  background: rgba(26,107,64,.07);
}
body[data-theme="light"] .btn-add-file:hover {
  color: #145432;
  background: rgba(26,107,64,.13);
  border-color: rgba(26,107,64,.55);
}

/* Active tabs / page-size buttons */
body[data-theme="light"] .diff-tab--active,
body[data-theme="light"] .diff-pgsz-btn--active {
  color: #1e3f9e;
  background: rgba(59,111,212,.12);
  border-color: rgba(59,111,212,.4);
}

/* Mismatch-type filter chips */
body[data-theme="light"] .chip {
  color: #7a5200;
  border-color: rgba(180,130,0,.3);
  background: rgba(180,130,0,.07);
}

/* Hover states — invisible white tint on light bg */
body[data-theme="light"] .diff-tab:hover {
  background: rgba(0,0,0,.05);
  color: var(--text);
}
body[data-theme="light"] .typeFilterLabel:hover {
  background: rgba(0,0,0,.05);
}
body[data-theme="light"] .colFilterItem:hover {
  background: rgba(0,0,0,.05);
}

/* Table headers — hardcoded dark bg */
body[data-theme="light"] thead th {
  background: rgba(240,244,255,.98);
  color: var(--muted);
}
body[data-theme="light"] .sticky-col,
body[data-theme="light"] .sticky-col-2 {
  background: rgba(240,244,255,.98);
}

/* KPI items in light theme */
body[data-theme="light"] .kpi .item {
  background: rgba(0,0,0,.02);
}
body[data-theme="light"] .kpi .item:hover {
  background: rgba(0,0,0,.05);
}

/* Status-mapping chips */
body[data-theme="light"] .smapChip {
  color: #2a4ea0;
  background: rgba(59,111,212,.1);
  border-color: rgba(59,111,212,.25);
}
body[data-theme="light"] .smapGroup {
  background: rgba(0,0,0,.03);
  border-color: rgba(0,0,0,.1);
}
body[data-theme="light"] .smapGroup.dnd-over {
  background: rgba(59,111,212,.07);
  border-color: rgba(59,111,212,.35);
}
body[data-theme="light"] .smapCanonical {
  background: #fff;
  border-color: rgba(0,0,0,.15);
}
body[data-theme="light"] .smapGroupLabel {
  color: var(--muted);
  border-bottom-color: rgba(0,0,0,.15);
}
body[data-theme="light"] .smapGroupLabel:hover {
  color: var(--text);
}
body[data-theme="light"] .smapAddRowBtn:hover {
  color: #1a6b40;
  border-color: rgba(26,107,64,.45);
}

/* Header type filter chips */
.headerTypeFilters {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  flex: 1;
  min-width: 0;
}
.reportHead {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.presetBadge {
  display: inline-block;
  font-size: .7rem;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.presetBadge--file {
  background: rgba(80,160,255,.15);
  color: #60aaff;
  border: 1px solid rgba(80,160,255,.25);
}
.presetBadge--full {
  background: rgba(100,200,120,.12);
  color: #6ec87a;
  border: 1px solid rgba(100,200,120,.22);
}
body[data-theme="light"] .presetBadge--file {
  background: rgba(40,100,220,.1);
  color: #2255bb;
  border-color: rgba(40,100,220,.2);
}
body[data-theme="light"] .presetBadge--full {
  background: rgba(30,130,60,.1);
  color: #1a7a35;
  border-color: rgba(30,130,60,.2);
}

/* Virtual scroll table */
.vtable-wrap {
  border: 1px solid var(--border, #333);
  border-radius: 4px;
  overflow-x: auto;
}
.vtable-wrap table {
  table-layout: fixed;
  border-collapse: collapse;
}
.vtable-wrap thead th {
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 0;
}
.vtable-body tr {
  height: 32px;   /* must match VT_ROW_HEIGHT */
}
.vtable-body td {
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 0;
}
.vt-spacer td { font-size: 0; line-height: 0; overflow: visible; }

/* Incident modal field rows */
.fieldRow {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 0.75rem;
}
.fieldRow textarea,
.fieldRow input[type="text"],
.fieldRow input[type="date"] {
  width: 100%;
  box-sizing: border-box;
}

/* Incident filter buttons */
.incFilterBtn {
  padding: 0.2rem 0.6rem;
  font-size: 0.8rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}
.incFilterBtn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.text-danger { color: var(--danger); }

/* Birthday/greeting banner — light theme */
body[data-theme="light"] #bdayCard {
  background: linear-gradient(135deg, #f0f4ff 0%, #e8eeff 60%, #f0f4ff 100%) !important;
  border-color: rgba(100,130,255,.25) !important;
  box-shadow: 0 24px 64px rgba(0,0,0,.15) !important;
}
body[data-theme="light"] #bdayCard div { color: #1a1f2e !important; }
body[data-theme="light"] #bdayName   { color: #b8860b !important; }
body[data-theme="light"] #bdayWish   { color: rgba(30,40,80,.6) !important; }

/* ── Danger buttons — light theme ── */
body[data-theme="light"] button.danger,
body[data-theme="light"] button.ghost.danger {
  color: #b01030;
  border-color: rgba(176,16,48,.3);
  background: rgba(176,16,48,.06);
}
body[data-theme="light"] button.danger:hover,
body[data-theme="light"] button.ghost.danger:hover {
  border-color: rgba(176,16,48,.5);
  background: rgba(176,16,48,.10);
}
body[data-theme="light"] .btn-danger {
  color: #b01030;
  border-color: rgba(176,16,48,.3);
  background: rgba(176,16,48,.06);
}
body[data-theme="light"] .btn-danger:hover {
  border-color: rgba(176,16,48,.5);
  background: rgba(176,16,48,.10);
}

/* ── Pill primary — light theme ── */
body[data-theme="light"] .pill.primary {
  color: #2a4ea0;
  background: rgba(59,111,212,.12);
  border-color: rgba(59,111,212,.3);
}

/* ── Progress bar track — light theme ── */
body[data-theme="light"] .progressBarTrack {
  background: rgba(0,0,0,.08);
  border-color: rgba(0,0,0,.12);
}

/* ── Scrollbars — light theme ── */
body[data-theme="light"] *::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,.18);
}
body[data-theme="light"] *::-webkit-scrollbar-track {
  background: rgba(0,0,0,.04);
}

/* ── Status-mapping unmapped badges — light theme ── */
body[data-theme="light"] .smapUnmappedBadge {
  background: rgba(0,0,0,.04);
  border-color: rgba(0,0,0,.12);
  color: var(--muted);
}
body[data-theme="light"] .smapUnmappedBadge:hover {
  background: rgba(59,111,212,.08);
  border-color: rgba(59,111,212,.3);
  color: var(--text);
}

/* ── Summary KPI row — light theme ── */
body[data-theme="light"] .summaryKpi {
  background: rgba(0,0,0,.03);
  border-color: rgba(0,0,0,.1);
}

/* ── File preview row hover — light theme ── */
body[data-theme="light"] .filePreviewTable tbody tr:hover td {
  background: rgba(0,0,0,.04);
}
body[data-theme="light"] .filePreviewTable th {
  background: rgba(0,0,0,.06);
}

/* ── Checkbox rows & view rows — light theme ── */
body[data-theme="light"] .chk,
body[data-theme="light"] .viewRow {
  background: rgba(0,0,0,.02);
  border-color: rgba(0,0,0,.1);
}

/* ── Tool groups — light theme ── */
body[data-theme="light"] .toolGroup {
  background: rgba(0,0,0,.02);
  border-color: rgba(0,0,0,.1);
}

/* ── Diff table wrap & result blocks — light theme ── */
body[data-theme="light"] .diff-table-wrap,
body[data-theme="light"] .tableWrap {
  background: rgba(0,0,0,.02);
}

/* ── Column filter popup — light theme ── */
body[data-theme="light"] .colFilterPopup {
  background: #ffffff;
  border-color: rgba(0,0,0,.12);
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
}

/* ── Details card — light theme ── */
body[data-theme="light"] .details-card {
  background: rgba(0,0,0,.02);
  border-color: rgba(0,0,0,.1);
}

/* ── Drop overlay — light theme ── */
body[data-theme="light"] .dropOverlay {
  background: rgba(230,235,255,.92);
  border-color: rgba(59,111,212,.5);
}
body[data-theme="light"] .dropOverlayInner {
  color: var(--primary);
}
