/* Toolstore-coherent theme (storefront reference: toolstore black utility
   strip + teal header + light gray page band + teal action buttons). */
:root {
  --ink: #1a1a1a;        /* black utility strip */
  --teal: #0e7c99;       /* toolstore header / button teal */
  --teal-dark: #0a617a;
  --teal-pale: #e8f3f7;
  --band: #f0f0f0;       /* page-title band */
  --bg: #fafafa;
  --line: #e2e2e2;
  --text: #2b2b2b;
  --muted: #6f7780;
  --red: #c0392b;
  --ok: #3d8b37;
  --ok-pale: #e7f3e3;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", "Open Sans", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
}

/* ── black utility strip (language selector lives here) ─────────────── */
.utilbar {
  background: var(--ink);
  color: #fff;
  display: flex;
  align-items: stretch;
  font-size: 12px;
}
.util-tab {
  padding: 10px 18px;
  letter-spacing: .6px;
  font-weight: 600;
}
.util-tab.active { background: var(--teal); }
.lang-switch { margin-left: auto; display: flex; align-items: center; padding-right: 14px; }
.lang-switch button {
  background: none;
  border: 0;
  color: #fff;
  opacity: .6;
  font: 700 12px "Segoe UI", sans-serif;
  letter-spacing: .5px;
  cursor: pointer;
  padding: 6px 8px;
}
.lang-switch button.active { opacity: 1; text-decoration: underline; text-underline-offset: 3px; }
.lang-switch .sep { opacity: .4; }

/* ── teal main bar ───────────────────────────────────────────────────── */
.topbar {
  display: flex;
  align-items: center;
  gap: 36px;
  background: var(--teal);
  color: #fff;
  padding: 16px 28px;
}
.brand { color: #fff; text-decoration: none; line-height: 1.05; }
.brand .b1 { display: block; font-size: 23px; font-weight: 800; letter-spacing: .3px; }
.brand .b1 span { font-weight: 300; }
.brand .b2 {
  display: block;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 3px;
  opacity: .9;
  margin-top: 2px;
}
.env { font-size: 11px; opacity: .7; margin-left: auto; }
.nav { display: flex; align-items: center; gap: 26px; }
.nav a { color: #fff; text-decoration: none; font-size: 15px; font-weight: 600; opacity: .85; }
.nav a.active, .nav a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 5px; }

/* ── light gray page-title band ──────────────────────────────────────── */
.pageband { background: var(--band); }
.pageband h1 {
  max-width: 1180px;
  margin: 0 auto;
  padding: 26px 20px;
  font-size: 30px;
  font-weight: 400;
  color: #333;
}

main { max-width: 1180px; margin: 26px auto; padding: 0 20px; }

.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  margin-bottom: 20px;
  overflow: hidden;
}

.panel-head {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  border: 0;
  background: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  color: #333;
  padding: 15px 18px;
  cursor: pointer;
  text-align: left;
}
.panel-head.static { cursor: default; }
.panel-head .chev { transition: transform .15s; display: inline-block; color: var(--teal); }
.panel-head[aria-expanded="false"] .chev { transform: rotate(-90deg); }
.panel-head .right { margin-left: auto; }

.panel-body { padding: 4px 18px 18px; border-top: 1px solid var(--line); }

.hint { color: var(--muted); font-size: 13px; margin: 10px 0; }

/* ── paste + drag-and-drop upload ────────────────────────────────────── */
.input-split { display: flex; gap: 14px; align-items: stretch; }
.input-split textarea { flex: 1.6; }
.input-split .dropzone { flex: 1; }
@media (max-width: 760px) { .input-split { flex-direction: column; } }

textarea {
  width: 100%;
  font: 13px/1.5 Consolas, monospace;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 10px;
  resize: vertical;
}
textarea:focus { outline: 2px solid var(--teal); border-color: transparent; }

.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 130px;
  border: 2px dashed var(--teal);
  border-radius: 6px;
  background: #fff;
  color: var(--teal);
  font-weight: 600;
  font-size: 13px;
  text-align: center;
  padding: 14px;
  cursor: pointer;
  transition: background .15s;
}
.dropzone:hover, .dropzone.drag { background: var(--teal-pale); }
.dropzone .dz-icon { font-size: 26px; }
.dropzone .dz-sub { color: var(--muted); font-weight: 400; font-size: 12px; }

.toolbar { display: flex; align-items: center; gap: 10px; margin-top: 14px; flex-wrap: wrap; }

.lang-row { display: flex; align-items: center; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.lang-label { font-size: 13px; font-weight: 600; color: #333; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  font: 600 12px "Segoe UI", sans-serif;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  border-radius: 16px;
  padding: 6px 14px;
  cursor: pointer;
}
.chip.active { background: var(--teal); border-color: var(--teal); color: #fff; }

select, .lang-label input[type="date"] {
  font: 600 12px "Segoe UI", sans-serif;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 7px 8px;
  color: #333;
  background: #fff;
}

.checkline { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text); cursor: pointer; }
.checkline input[type="checkbox"] { accent-color: var(--teal); width: 15px; height: 15px; cursor: pointer; }

.btn {
  font: 600 13px "Segoe UI", sans-serif;
  border-radius: 3px;
  padding: 10px 20px;
  cursor: pointer;
  border: 1px solid transparent;
}
.btn.primary { background: var(--teal); color: #fff; }
.btn.primary:hover { background: var(--teal-dark); }
.btn.primary:disabled { background: #9cc2cf; cursor: wait; }
.btn.ghost { background: #fff; color: var(--teal); border-color: var(--teal); }
.btn.ghost:hover { background: var(--teal-pale); }

.counter { color: var(--muted); font-size: 12px; margin-left: auto; }

/* ── progress bar (estimated; shimmer proves liveness) ──────────────── */
.progress { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.progress-track {
  flex: 1;
  height: 6px;
  background: var(--band);
  border-radius: 3px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--teal);
  border-radius: 3px;
  transition: width .25s linear;
  position: relative;
  overflow: hidden;
}
.progress-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.45), transparent);
  animation: prog-shimmer 1.2s infinite;
}
@keyframes prog-shimmer {
  from { transform: translateX(-100%); }
  to   { transform: translateX(100%); }
}
.progress-label { font-size: 12px; color: var(--muted); white-space: nowrap; min-width: 110px; text-align: right; }
.progress.error .progress-fill { background: var(--red); }
.progress.error .progress-fill::after,
.progress.done .progress-fill::after { animation: none; }
.progress.error .progress-label { color: var(--red); }

.msg { margin-top: 12px; font-size: 13px; padding: 10px 12px; border-radius: 4px; }
.msg.error { background: #fdecea; color: var(--red); }
.msg.info { background: var(--teal-pale); color: var(--teal-dark); }

.summary { font-weight: 400; color: var(--muted); font-size: 13px; }
.summary b.ok { color: var(--ok); }
.summary b.bad { color: var(--red); }

.missing {
  background: #fdf3e7;
  border: 1px solid #f0ddc0;
  color: #8a5a17;
  font-size: 13px;
  border-radius: 4px;
  padding: 10px 12px;
  margin: 12px 0 4px;
  word-break: break-all;
}

.table-wrap { overflow-x: auto; margin-top: 12px; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td.name { white-space: normal; min-width: 220px; }
td.cat { white-space: normal; min-width: 220px; color: var(--muted); }
th { background: #f5f5f5; color: #333; position: sticky; top: 0; }
tbody tr:hover { background: var(--teal-pale); }
.pill { font-size: 11px; font-weight: 600; border-radius: 10px; padding: 2px 9px; }
.pill.on { background: var(--ok-pale); color: var(--ok); }
.pill.off { background: #fdecea; color: var(--red); }
.mono { font-family: Consolas, monospace; }
