:root {
  font-family: system-ui, sans-serif;
  line-height: 1.45;
  color: #1a1a1a;
  background: #f6f7f9;
}
body {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.25rem;
}
body.voxen-page-job {
  max-width: 1280px;
}
body.voxen-page-ops {
  max-width: 1280px;
}
body.voxen-page-home,
body.voxen-page-jobs {
  max-width: 1280px;
}
.voxen-site-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 0 0 1.25rem;
  padding: 0.55rem 0.85rem;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  font-size: 0.825rem;
}
.voxen-site-nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: #14171c;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.005em;
  flex-shrink: 0;
}
.voxen-site-nav-brand:hover { color: #0b5fff; }
.voxen-site-nav-mark {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: linear-gradient(135deg, #0b5fff, #5b8cff);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.voxen-site-nav-rail {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0.25rem;
  background: #eef0f3;
  border-radius: 999px;
  flex-wrap: wrap;
}
.voxen-site-nav-rail a,
.voxen-site-nav-rail .voxen-site-nav-current {
  color: #4b5563;
  text-decoration: none;
  font-size: 0.825rem;
  font-weight: 500;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  white-space: nowrap;
  line-height: 1;
  transition: color 0.12s ease, background 0.12s ease;
}
.voxen-site-nav-rail a:hover {
  color: #14171c;
  background: rgba(255, 255, 255, 0.7);
}
.voxen-site-nav-rail .voxen-site-nav-current {
  color: #0b5fff;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  font-weight: 600;
}
.voxen-site-nav-meta {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.78rem;
  color: #6b7280;
  flex-shrink: 0;
}
.voxen-site-nav-meta a,
.voxen-site-nav-logout {
  color: #4b5563;
  text-decoration: none;
}
.voxen-site-nav-meta a:hover,
.voxen-site-nav-logout:hover { color: #0b5fff; }

@media (max-width: 720px) {
  .voxen-site-nav { gap: 0.6rem; padding: 0.5rem 0.75rem; }
  .voxen-site-nav-rail { width: 100%; order: 3; justify-content: flex-start; }
  .voxen-site-nav-rail a,
  .voxen-site-nav-rail .voxen-site-nav-current { padding: 0.35rem 0.6rem; font-size: 0.8rem; }
  .voxen-site-nav-meta { order: 2; margin-left: auto; }
}

.voxen-ops-host {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #e0e3ea;
}
.voxen-ops-host:last-child {
  border-bottom: none;
}
.voxen-ops-host-title {
  font-size: 1.15rem;
  margin: 0 0 0.5rem;
}
.voxen-ops-h2 {
  font-size: 1.05rem;
  margin: 1.25rem 0 0.5rem;
}
.voxen-ops-proc-tr--warn {
  background: #fff8e6;
}
.voxen-ops-proc-tr--alert {
  background: #ffe8e8;
}
.voxen-ops-meta {
  margin: 0.5rem 0 1rem;
}
.voxen-ops-table {
  font-size: 0.9rem;
  margin-bottom: 1rem;
}
.voxen-ops-table td.voxen-ops-cmd {
  word-break: break-word;
  white-space: pre-wrap;
  max-width: 42rem;
}
.voxen-ops-pre {
  background: #fff;
  padding: 0.75rem;
  border: 1px solid #e8eaef;
  overflow-x: auto;
  font-size: 0.85rem;
}
h1 { font-size: 1.35rem; }
a { color: #0b5fff; }
table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
th, td {
  text-align: left;
  padding: 0.5rem 0.65rem;
  border-bottom: 1px solid #e8eaef;
}
th { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; color: #555; }
.drop {
  border: 2px dashed #aab;
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
  background: #fff;
  margin-bottom: 1.5rem;
}
.drop.dragover { border-color: #0b5fff; background: #eef4ff; }
.voxen-upload-diar-row { text-align: left; margin: 0.75rem 0 0; font-size: 0.95rem; }
.voxen-upload-diar-label,
.voxen-job-run-diar-label { cursor: pointer; }
.voxen-events-log {
  font-family: ui-monospace, monospace;
  font-size: 0.78rem;
  line-height: 1.35;
  background: #111;
  color: #e8e8e8;
  padding: 0.45rem 0.55rem;
  border-radius: 6px;
  max-height: 14rem;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}
.voxen-events-log > div {
  padding: 0.12rem 0;
  border-bottom: 1px solid #2a2a2a;
}
.voxen-events-log > div:last-child {
  border-bottom: none;
}
.msg { margin: 0.5rem 0; padding: 0.5rem; border-radius: 4px; }
.msg.ok { background: #e6f7e9; }
.msg.err { background: #fde8e8; }
.msg.warn { background: #fff8e6; color: #5c4a00; }

.voxen-upload-dup {
  display: block;
  font-size: 0.9rem;
  color: #3d5a45;
  margin-bottom: 0.35rem;
  line-height: 1.35;
}

.voxen-upload-job-link {
  display: inline-block;
  margin-top: 0.4rem;
  font-weight: 600;
}

/* Jobs list: selection + batch + file dialog */
.voxen-batch-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
  padding: 0.5rem 0.65rem;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.voxen-batch-bar[hidden] {
  display: none !important;
}
.voxen-batch-count { font-size: 0.9rem; color: #444; }
.voxen-col-check { width: 2.25rem; }
.voxen-col-meta { width: 3rem; text-align: center; }
.voxen-filename-truncate {
  display: inline-block;
  max-width: min(40vw, 22rem);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}
.voxen-file-meta {
  min-width: 44px;
  min-height: 44px;
  padding: 0 0.35rem;
  margin-left: 0.25rem;
  border: none;
  background: transparent;
  color: #0b5fff;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 6px;
  vertical-align: middle;
}
.voxen-file-meta:hover { background: #eef4ff; }
.voxen-btn-danger {
  min-height: 44px;
  padding: 0.35rem 0.85rem;
  border: none;
  border-radius: 6px;
  background: #c42b2b;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}
.voxen-btn-danger:hover { background: #a32222; }
.voxen-btn-danger:disabled { opacity: 0.6; cursor: not-allowed; }
.voxen-dialog {
  border: none;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  max-width: min(90vw, 28rem);
  box-shadow: 0 8px 32px rgba(0,0,0,.2);
}
.voxen-dialog::backdrop { background: rgba(0,0,0,.35); }
/* Non-modal Run ASR info: no full-page block; user can read the job page behind it */
.voxen-asr-info-dialog {
  position: fixed;
  top: 4.75rem;
  right: 1rem;
  left: auto;
  margin: 0;
  max-width: min(92vw, 22rem);
  z-index: 50;
}
.voxen-dialog-title { font-size: 1.1rem; margin: 0 0 0.75rem; }
.voxen-dialog-body-text { margin: 0 0 0.75rem; word-break: break-word; }
.voxen-dialog-actions { margin: 1rem 0 0; display: flex; gap: 0.5rem; flex-wrap: wrap; }
.voxen-dialog-actions button {
  min-height: 44px;
  padding: 0.35rem 0.85rem;
  border-radius: 6px;
  border: 1px solid #ccd;
  background: #f6f7f9;
  cursor: pointer;
}
/* Dialog generic rule above wins over .voxen-btn-danger alone — restore destructive styling */
.voxen-dialog-actions button.voxen-btn-danger {
  background: #a32222;
  color: #fff;
  font-weight: 600;
  border: 1px solid #7a1818;
}
.voxen-dialog-actions button.voxen-btn-danger:hover {
  background: #8b1e1e;
}
.voxen-dialog-actions button.voxen-btn-danger:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.voxen-monospace { font-family: ui-monospace, monospace; font-size: 0.85rem; }
.voxen-job-file-cell { display: flex; align-items: center; flex-wrap: wrap; gap: 0.15rem; }
.voxen-btn-secondary {
  min-height: 44px;
  padding: 0.35rem 0.85rem;
  border-radius: 6px;
  border: 1px solid #889;
  background: #eef1f5;
  color: #1a1a1a;
  font-weight: 600;
  cursor: pointer;
}
.voxen-btn-secondary:hover { background: #e2e6ed; }
.voxen-btn-secondary:disabled { opacity: 0.45; cursor: not-allowed; }
.voxen-dialog-actions button.voxen-btn-secondary {
  background: #eef1f5;
  color: #1a1a1a;
  border: 1px solid #889;
  font-weight: 600;
}
.voxen-dialog-actions button.voxen-btn-secondary:hover {
  background: #e2e6ed;
}
.voxen-status-line {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.voxen-badge-cancelled {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  background: #f3e8c8;
  color: #5c4a12;
  border: 1px solid #d9c896;
}
.voxen-job-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 0.5rem;
}

/* Job detail: compact header + metadata grid */
.voxen-job-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.85rem;
  margin: 0 0 0.5rem;
}
.voxen-job-header h1 {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.2;
}
.voxen-job-header-nav {
  margin: 0;
  font-size: 0.875rem;
}
.voxen-job-header-sep {
  margin: 0 0.35rem;
  color: #888;
}
.voxen-meta-grid {
  display: grid;
  grid-template-columns: minmax(5.5rem, auto) 1fr;
  gap: 0.2rem 0.85rem;
  margin: 0 0 0.85rem;
  padding: 0.5rem 0.65rem;
  font-size: 0.875rem;
  line-height: 1.35;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  align-items: center;
}
.voxen-meta-grid dt {
  margin: 0;
  color: #555;
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.voxen-meta-grid dd {
  margin: 0;
  min-width: 0;
}
.voxen-meta-grid .voxen-meta-break {
  word-break: break-all;
}
.voxen-meta-muted {
  color: #666;
  font-weight: 500;
  font-size: 0.82rem;
}
.voxen-asr-hint {
  font-size: 0.82rem;
  color: #444;
  margin: 0 0 0.65rem;
  padding: 0.5rem 0.65rem;
  background: #fff;
  border-radius: 6px;
  border: 1px solid #e8eaef;
  line-height: 1.4;
}
.voxen-meta-stack .voxen-monospace {
  font-size: 0.84rem;
}
.voxen-filename-truncate--job {
  max-width: min(58vw, 36rem);
}
.voxen-section-title {
  font-size: 0.95rem;
  font-weight: 650;
  margin: 0.85rem 0 0.3rem;
  line-height: 1.25;
}
.voxen-sse-line {
  margin: 0 0 0.35rem;
  font-size: 0.82rem;
  color: #555;
}
.voxen-sse-status {
  font-weight: 600;
  color: #333;
}
.voxen-sse-status--ok {
  color: #0a6e2e;
}
.voxen-sse-status--bad {
  color: #a32222;
}
.voxen-transcript-meta { font-size: 0.9rem; color: #444; }
.voxen-transcript-toolbar {
  margin: 0.35rem 0 0.5rem;
  font-size: 0.9rem;
}
.voxen-transcript-toolbar-label {
  margin-right: 1.25rem;
  cursor: pointer;
}
.voxen-transcript-toolbar-label input {
  margin-right: 0.35rem;
  vertical-align: middle;
}
.voxen-transcript-downloads {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
}
.voxen-transcript-preview {
  white-space: normal;
  word-break: break-word;
  background: #fff;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  border: 1px solid #e8eaef;
  max-height: 24rem;
  overflow: auto;
}
.voxen-transcript-p {
  margin: 0 0 0.75rem;
  line-height: 1.45;
}
.voxen-transcript-p:last-child {
  margin-bottom: 0;
}
.voxen-transcript-raw-json {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
  line-height: 1.35;
}
.voxen-msg-warn { color: #7a4a00; }

.voxen-diar-row--active {
  background: rgba(59, 130, 246, 0.08);
  border-radius: 4px;
}
.voxen-diar-last-updated {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.8rem;
}

/* Dev-only upload routing (VOXEN_ENABLE_DEV_ROUTING_UI); replace with admin-gated UI later */
.voxen-dev-panel {
  margin: 1rem 0 1.25rem;
  padding: 0.85rem 1rem;
  border-radius: 8px;
  border: 1px solid #c9a227;
  background: linear-gradient(165deg, #fff9e6 0%, #fff3cc 100%);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.voxen-dev-panel-title {
  font-size: 0.95rem;
  margin: 0 0 0.35rem;
  color: #5c4a12;
}
.voxen-dev-panel-note,
.voxen-dev-panel-hint {
  font-size: 0.82rem;
  margin: 0.4rem 0;
  color: #4a3d10;
}
.voxen-dev-route-toggle {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.65rem 0 0.25rem;
}
.voxen-dev-route-btn {
  min-height: 40px;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  border: 1px solid #a68b1a;
  background: #fff;
  color: #3d3208;
  font-weight: 600;
  cursor: pointer;
}
.voxen-dev-route-btn:hover {
  background: #fffef5;
  border-color: #8a7215;
}
.voxen-dev-route-btn.is-active {
  background: #5c4a12;
  color: #fff;
  border-color: #3d3208;
}
