/* ESAB theme layer — only active under body.theme-esab (admin preview). */
.ft-esab, .esab-stripe { display: none; }
.theme-esab .ft-classic { display: none; }

body.theme-esab {
  --bg: #ffffff; --bg-2: #ffffff; --surface: #ffffff; --surface-2: #f6f6f7;
  --line: #e6e6e9; --fg: #111111; --muted: #6b6b70; --dim: #9a9aa0;
  --red: #E5383B; --red-dim: #f3b9ba; --bad: #E5383B; --ok: #1f9d55; --warn: #c98a00;
  --esab: #111; --ebx: #111; --y: #FBE400; --grey: #dcdce0;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Inter", system-ui, sans-serif;
  background: #fff; color: #111;
}
body.theme-esab::before { display: none; }
.theme-esab .app { max-width: 1240px; padding-bottom: 72px; }

/* header */
.theme-esab .logos { border-bottom: 0; padding-bottom: 4px; }
.theme-esab .logo { color: #111; font-size: 11px; }
.theme-esab .logo.ebx span, .theme-esab .logo.mars { color: #111; }
.theme-esab .brand-kicker { color: #6b6b70; font-size: 11px; letter-spacing: .18em; }
.theme-esab .brand h1 { font-weight: 800; letter-spacing: -.01em; }
.theme-esab .clock { font-weight: 700; font-family: var(--font); }
.theme-esab .live-status { color: #1f9d55; }
.theme-esab .top-nav a, .theme-esab .btn-logout { color: #111; }
.theme-esab .btn-logout { border-color: #e6e6e9; background: #fff; }
.theme-esab .btn-theme { background: var(--y); border-color: var(--y); font-weight: 600; }
.theme-esab .btn, .theme-esab .btn-block { background: #111; color: #fff; border-color: #111; }

/* cards, chips */
.theme-esab .card, .theme-esab .chart, .theme-esab .kpi, .theme-esab .esab-side {
  background: #fff; border: 1px solid #ececef; border-radius: 16px;
  box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.05);
}
.theme-esab .card::before { background: var(--y); }
.theme-esab .card:hover { border-color: #111; }
.theme-esab .card-go { color: #111; }
.theme-esab .shift-chip { background: #fff; border-color: #e6e6e9; color: #6b6b70; border-radius: 999px; }
.theme-esab .shift-chip.active { background: #111; border-color: #111; color: #fff; }

/* KPI band */
.esab-kpi {
  display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 0;
  background: var(--y); border-radius: 16px; padding: 18px 22px; margin: 16px 0 18px; color: #111;
}
.esab-kpi .ek { padding: 4px 22px; border-left: 1px solid rgba(0,0,0,.18); }
.esab-kpi .ek:first-child { border-left: 0; padding-left: 0; display: flex; gap: 18px; align-items: center; }
.esab-kpi .lbl { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.esab-kpi .val { font-size: 32px; font-weight: 800; margin: 4px 0 2px; font-variant-numeric: tabular-nums; }
.esab-kpi .sub { font-size: 12px; color: rgba(0,0,0,.7); }
.esab-ring { width: 84px; height: 84px; flex: none; }
.esab-ring text { font: 800 17px var(--font); fill: #111; }

/* layout */
.esab-grid { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 18px; align-items: start; }
.theme-esab .chart { padding: 20px 20px 18px; }
.theme-esab .chart-head h3 { font-size: 15px; font-weight: 700; }
.theme-esab .cause-hint { color: #6b6b70; }

/* bars */
.theme-esab .bars { gap: 10px; }
.theme-esab .bar-col .shaft { background: #f3f3f5; border-radius: 8px 8px 2px 2px; max-width: 44px; }
.theme-esab .bar-col .fill { background: var(--grey); border-radius: 8px 8px 0 0; box-shadow: none; }
.theme-esab .bar-col.met .fill, .theme-esab .bar-col.met.now .fill { background: var(--y); box-shadow: none; }
.theme-esab .bar-col.under .fill { background: var(--red); }
.theme-esab .bar-col.now .fill { background: var(--y); box-shadow: none; outline: 2px solid #111; outline-offset: -2px; }
.theme-esab .bar-col.now.under .fill { background: #fff3a0; }
.theme-esab .bar-col.now .h { color: #111; font-weight: 800; }
.theme-esab .bar-col .n { font-family: var(--font); font-weight: 700; color: #111; font-size: 11px; }
.theme-esab .bar-col.future .n { color: #bbb; }
.theme-esab .bar-col .h { color: #6b6b70; font-size: 11px; }
.theme-esab .bar-col.clickable:hover .shaft { box-shadow: 0 0 0 2px #111; }
.theme-esab .meta-line { border-top: 1.5px dashed #111; }
.theme-esab .meta-line label { color: #111; font-weight: 700; background: #fff; padding: 0 4px; }
.theme-esab .cause-tag { color: #6b6b70; }
.theme-esab .bar-col.has-cause .cause-tag { background: #fff6b0; color: #111; border-color: transparent; }

.esab-banner { margin-top: 14px; }
.esab-banner span {
  display: block; background: #111; color: #fff; text-align: center;
  font-weight: 700; font-size: 12px; letter-spacing: .1em; text-transform: uppercase;
  padding: 9px 12px; clip-path: polygon(1.5% 0, 100% 0, 98.5% 100%, 0 100%);
}

/* side summary */
.esab-side { padding: 18px 18px 14px; }
.esab-side h4 { margin: 4px 0 10px; font-size: 14px; font-weight: 700; }
.esab-side h4 + .es-row { border-top: 0; }
.esab-side h4:not(:first-child) { margin-top: 18px; }
.es-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 9px 0; border-top: 1px solid #f0f0f2; font-size: 13px; color: #444; }
.es-row b { color: #111; font-size: 16px; font-weight: 800; }
.es-row span b { font-size: 13px; }
.es-prog { height: 8px; background: #ededf0; border-radius: 99px; overflow: hidden; margin: 2px 0 8px; }
.es-prog i { display: block; height: 100%; background: #111; border-radius: 99px; }
.es-empty { font-size: 13px; color: #6b6b70; padding: 8px 0; }
.pill-cause { font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 99px; background: #fff3a0; color: #5a4b00; white-space: nowrap; }
.pill-cause.none { background: #f1f1f3; color: #8a8a90; font-weight: 600; }
.pill-cause.c-material, .pill-cause.c-mtto, .pill-cause.c-mantenimiento { background: #fde3e3; color: #b3191c; }

/* modals / tables / forms */
.theme-esab .hour-detail-modal, .theme-esab .cause-modal, .theme-esab .gate-card { background: #fff; color: #111; border-color: #ececef; box-shadow: 0 20px 60px rgba(0,0,0,.18); }
.theme-esab input, .theme-esab select, .theme-esab textarea { background: #fff; color: #111; border-color: #dcdce0; }
.theme-esab table th { color: #6b6b70; }

/* footer */
.theme-esab footer.site { color: #8a8a90; border-top: 0; }
.theme-esab .ft-esab { display: inline; font-size: 11px; }
.theme-esab .esab-stripe {
  display: block; position: fixed; right: 0; bottom: 0; z-index: 5;
  background: var(--y); color: #111; font-weight: 800; letter-spacing: .2em; font-size: 12px;
  padding: 7px 26px 7px 70px; clip-path: polygon(40px 0, 100% 0, 100% 100%, 0 100%);
}

@media (max-width: 900px) {
  .esab-grid { grid-template-columns: 1fr; }
  .esab-kpi { grid-template-columns: 1fr; gap: 12px; }
  .esab-kpi .ek { border-left: 0; padding: 0; border-top: 1px solid rgba(0,0,0,.15); padding-top: 10px; }
  .esab-kpi .ek:first-child { border-top: 0; padding-top: 0; }
  .theme-esab .bars { gap: 5px; }
  .theme-esab .bar-col .n { font-size: 12px; }
}
.theme-esab .track { background: #ededf0; }
.theme-esab .track.ok > span { background: #111; }
.theme-esab .cause-tag.empty { border: 0; background: transparent; }
/* full-page white incl. overscroll (html had dark var(--bg) from :root) */
html.theme-esab, html:has(body.theme-esab) { background: #fff; --bg: #fff; --bg-2: #fff; color-scheme: light; }
html.theme-esab body, body.theme-esab { background: #fff; min-height: 100%; height: auto; }
.theme-esab .card.pending { opacity: 1; background: #fff; filter: none; }
.theme-esab .card.pending h2 { color: #6b6b70; }
.theme-esab .card.pending::before { background: var(--y); }
