/* TTB Label Checker — IBM Carbon (vendored compiled theme in /vendor) + app-specific markup that Carbon has no patterns for:
   verdict banners, result tables, batch row cards. Structure only; cosmetics come from Carbon. */

[hidden] { display: none !important; }

body {
  background: var(--ibm-gray-10, #f4f4f4);
  color: var(--ibm-gray-90, #161616);
}

/* ── Header (site header equivalent — no Carbon JS, static tag + helper) ───── */
.site-header {
  background: var(--ibm-gray-100, #161616);
  color: #f4f4f4;
  padding: 1rem 1rem 1.1rem;
}
.site-header__name {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
}
.site-header__tagline {
  margin: .25rem 0 0;
  font-size: .875rem;
  color: var(--ibm-gray-30, #e0e0e0);
}

/* ── Page / SIEM split shell: application left ⅓, evidence viewer right ⅔ ──── */
.page { max-width: 120rem; margin: 0 auto; padding: 1rem 1rem 2rem; }

.shell {
  display: grid;
  grid-template-columns: minmax(20rem, 1fr) 2fr;   /* exactly 1 : 2 */
  gap: 1rem;
  align-items: start;
}
.pane--app { min-width: 0; }
.pane--viewer { position: sticky; top: 1rem; }      /* evidence stays visible while the queue scrolls */

.card {
  background: #fff;
  border: 1px solid var(--ibm-gray-20, #e0e0e0);
  padding: 1.25rem;
}
.pane--app > .card { margin-top: 1rem; }
.pane--app > .card:first-child { margin-top: 0; }
.card h2 { margin: 0 0 1rem; font-size: 1.25rem; font-weight: 600; }

/* Demo callout — visually distinct so reviewers see it's sample data. */
.card--demo {
  background: #fffbe6;
  border: 1px solid #f1c21b;
  border-top: 4px solid #f1c21b;
}
.demo-kicker {
  display: inline-block;
  margin: 0 0 .5rem;
  padding: .125rem .5rem;
  background: #f1c21b;
  color: #161616;
  font: 600 .75rem/1.4 'IBM Plex Sans', sans-serif;
  letter-spacing: .5px;
  text-transform: uppercase;
}
.card--demo h2 { font-size: 1.0625rem; margin-bottom: .5rem; }
#demo-gone { margin-top: .75rem; }

/* ── Federal regulation checklist (left pane) ──────────────────────────────── */
.regcheck { list-style: none; margin: .75rem 0 0; padding: 0; }
.regrow {
  border: 1px solid var(--ibm-gray-20, #e0e0e0);
  border-left: 3px solid var(--ibm-gray-30, #e0e0e0);
  padding: .625rem .75rem;
  margin-bottom: .5rem;
  background: #fff;
}
.regrow--pass { border-left-color: #24a148; }
.regrow--flag { border-left-color: #f1c21b; }
.regrow--missing { border-left-color: #da1e28; }
.regrow--error { border-left-color: #da1e28; }
.regrow--not_checked { border-left-color: var(--ibm-gray-40, #a8a8a8); border-left-style: dashed; }
.regrow__head { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.regrow__req { font: 600 .875rem/1.35 'IBM Plex Sans', sans-serif; color: #161616; flex: 1 1 12rem; }
.regrow__cite { font: 400 .75rem 'IBM Plex Sans', sans-serif; color: #6f6f6f; white-space: nowrap; }
.regrow__detail { margin: .375rem 0 0; font: 400 .8125rem/1.45 'IBM Plex Sans', sans-serif; color: #525252; }

#robot-check { min-height: 65px; margin: .75rem 0; }  /* reserved space, no layout jump */

fieldset { border: 0; margin: 0; padding: 0; }
fieldset > legend {
  font-size: .875rem;
  font-weight: 600;
  color: var(--ibm-gray-70, #525252);
  padding: 0;
  margin-bottom: 1rem;           /* Carbon form group spacing */
}

.field { margin: 0 0 1.5rem; }   /* 24px stack gap; vendored Carbon sets no .bx--form-item margin */
.req { color: var(--ibm-red, #da1e28); font-weight: 600; font-size: .875rem; margin-left: .25rem; }
.hint, .bx--form__helper-text { color: var(--ibm-gray-70, #525252); font-size: .875rem; margin: .25rem 0 0; }
.hint-inline { font-weight: 400; color: var(--ibm-gray-70, #525252); font-size: .875rem; }

input[type="file"] { font: 400 .875rem 'IBM Plex Sans', sans-serif; color: var(--ibm-gray-70, #525252); }

.actions { margin-top: 2rem; }
.actions .bx--btn { min-width: 12rem; }

/* Ghost clear buttons sit under their file-input hints. */
#single-clear, #csv-clear { margin-top: .75rem; }

/* ── Right-pane evidence viewer ────────────────────────────────────────────── */
.viewer {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--ibm-gray-20, #e0e0e0);
  height: calc(100vh - 7.25rem);   /* full working height, header + margins */
  min-height: 24rem;
}
.viewer__toolbar {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .5rem .75rem;
  background: var(--ibm-gray-10, #f4f4f4);
  border-bottom: 1px solid var(--ibm-gray-20, #e0e0e0);
}
.viewer__zoom {
  min-width: 3.25rem;
  text-align: center;
  font: 600 .8125rem 'IBM Plex Sans', sans-serif;
  color: var(--ibm-gray-70, #525252);
  font-variant-numeric: tabular-nums;
}
.viewer__spacer { flex: 1; }
.viewer__stage {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  padding: 1rem;
  background:
    repeating-conic-gradient(#ececec 0 25%, #f7f7f7 0 50%) 0 0 / 24px 24px;  /* neutral checker, stands in for transparency */
}
#viewer-img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transform-origin: center;
  background: #fff;
  box-shadow: 0 0 0 1px var(--ibm-gray-30, #e0e0e0);
}
#viewer-img.img--fit { width: auto !important; }
.viewer__empty { text-align: center; color: var(--ibm-gray-60, #6f6f6f); padding: 1rem; }
.viewer__empty-title { margin: 0 0 .25rem; font-size: 1.0625rem; font-weight: 600; color: var(--ibm-gray-80, #393939); }
.viewer__empty-hint { margin: 0; font-size: .875rem; }
.viewer__meta {
  display: flex;
  gap: 1.25rem;
  padding: .5rem .75rem;
  border-top: 1px solid var(--ibm-gray-20, #e0e0e0);
  font: 400 .8125rem 'IBM Plex Sans', sans-serif;
  color: var(--ibm-gray-70, #525252);
  font-variant-numeric: tabular-nums;
}
.viewer__meta span:first-child { font-weight: 600; color: var(--ibm-gray-90, #161616); word-break: break-all; }

/* ── Status / progress (spinner is app-specific; bar itself is Carbon) ─────── */
.status {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-top: 1rem;
  font-size: .875rem;
  color: var(--ibm-gray-60, #6f6f6f);
}
.spinner {
  width: 1rem;
  height: 1rem;
  border: 2px solid var(--ibm-gray-30, #e0e0e0);
  border-top-color: #0f62fe;
  border-radius: 50%;
  animation: spin .9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Spacing for JS-written alerts inside the static error containers. */
#single-error, #batch-error { margin-top: 1rem; }

.warn-card { margin: 1rem 0; }
.warn-card ul { margin: .25rem 0 0 1.2rem; padding: 0; }

/* ── Verdict banner (no Carbon analogue — pass/flag/error strip) ───────────── */
.verdict {
  display: flex;
  flex-direction: column;
  border: 1px solid;
  padding: .75rem 1rem;
  margin-top: 1.25rem;
  font-size: 1.0625rem;
  font-weight: 600;
}
.verdict.pass  { color: #0e6027; background: #defbe6; border-color: #0e6027; }
.verdict.flag  { color: #3d3d3d; background: #fcf4d6; border-color: #f1c21b; }
.verdict.error { color: #a2191f; background: #fff1f1; border-color: #da1e28; }
.verdict small { display: block; font-size: .875rem; font-weight: 400; margin-top: .25rem; }

/* ── Result furniture ──────────────────────────────────────────────────────── */
.latency {
  display: inline-block;
  font-size: .8125rem;
  color: var(--ibm-gray-70, #525252);
  border: 1px solid var(--ibm-gray-30, #e0e0e0);
  padding: .125rem .5rem;
  margin-top: .5rem;
}
.latency.slow { color: #613d00; background: #fcf4d6; border-color: #f1c21b; }
.latency-note { color: #613d00; font-weight: 600; margin-left: .5rem; font-size: .8125rem; }

/* Carbon has no verdict-color tag preset: support-warning tint (flag/missing).
   Corners flat per the IBM grid — Carbon's own tag ships rounded (.9375rem); the
   spinner circle above is a status glyph, not a box, so it stays round. */
.bx--tag { border-radius: 0; }
.pill {
  margin-right: .5rem;
  background: transparent;
}
.pill.pill-warn {
  background: #fcf4d6;
  color: #3d3d3d;
  border-color: transparent;
}
.pill-note { display: block; color: #6f6f6f; font-size: .875rem; margin-top: .25rem; }

table.fields {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  font-size: .875rem;
}
table.fields th, table.fields td {
  text-align: left;
  padding: .625rem .75rem;
  border-bottom: 1px solid #e0e0e0;
  vertical-align: top;
}
table.fields th {
  background: #f4f4f4;
  font-weight: 600;
  color: #161616;
  border-bottom: 1px solid #161616;
}
.missing-val { color: #6f6f6f; font-style: italic; }

ul.summary { margin: .75rem 0 0; padding-left: 1.4rem; font-size: .9375rem; }
ul.summary li { margin: .25rem 0; }
.issues { color: #a2191f; font-weight: 600; }

/* ── Batch rows ────────────────────────────────────────────────────────────── */
.rowcard {
  background: #fff;
  border: 1px solid #e0e0e0;
  margin-top: .75rem;
}
.rowcard summary {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .75rem 1rem;
  cursor: pointer;
  list-style: none;               /* own chevron */
}
.rowcard summary::-webkit-details-marker { display: none; }
.rowcard summary::before {
  content: "";
  width: .5rem;
  height: .5rem;
  border-right: 1.5px solid #161616;
  border-bottom: 1.5px solid #161616;
  transform: rotate(-45deg);
  transition: transform .15s ease;
}
.rowcard[open] summary::before { transform: rotate(45deg); }
.rowcard summary .fname { font-weight: 600; word-break: break-all; font-size: .9375rem; }
.rowcard summary .brand { color: #6f6f6f; word-break: break-word; font-size: .875rem; }
.rowcard summary .lat { margin-left: auto; color: #6f6f6f; white-space: nowrap; font-size: .8125rem; }
.rowcard .details { padding: 0 1rem 1rem; border-top: 1px solid #e0e0e0; }
.rowcard .details .verdict { margin-top: 1rem; }

/* ── Batch banner ──────────────────────────────────────────────────────────── */
.banner {
  background: #e0e0e0;
  border: 1px solid #8d8d8d;
  padding: 1rem;
  margin-top: 1rem;
}
.banner strong { font-size: 1.0625rem; display: block; }
.banner .counts { display: flex; flex-wrap: wrap; gap: .5rem; margin: .75rem 0; }
.banner .bx--btn { margin-top: .5rem; }

footer {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #e0e0e0;
  color: #525252;
  font-size: .875rem;
}
footer p { max-width: 42rem; margin: 0; font-weight: 600; }

@media (max-width: 600px) {
  .card { padding: 1rem; }
  .actions .bx--btn { width: 100%; min-width: 0; }
}

/* Below ~1024px the split stops paying: stack queue above viewer (Wazuh does the same). */
@media (max-width: 1024px) {
  .shell { grid-template-columns: 1fr; }
  .pane--viewer { position: static; }
  .viewer { height: min(75vh, 36rem); }
}