/* orch-coordinator operator UX — minimal hand-rolled styles. */

* { box-sizing: border-box; }
body {
  font: 14px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  margin: 0;
  background: #f7f7f8;
  color: #1f1f1f;
}
header {
  background: #15202b;
  color: #fff;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
}
header nav { display: flex; gap: 1rem; align-items: center; width: 100%; }
header a { color: #fff; text-decoration: none; }
header .brand { font-weight: 600; }
header .orch { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; opacity: 0.85; flex: 1; font-size: 12px; }
header .actor { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; opacity: 0.95; }
header .navlink { padding: 0.25rem 0.6rem; border-radius: 4px; }
header .navlink:hover { background: rgba(255,255,255,0.12); }
header .logout { margin: 0; }
main { padding: 1rem; max-width: 1400px; margin: 0 auto; }
footer { padding: 0.5rem 1rem; color: #777; font-size: 12px; display: flex; justify-content: space-between; }

section { margin-bottom: 1.5rem; background: #fff; border: 1px solid #e3e4e7; border-radius: 6px; padding: 1rem; }
section h1 { margin: 0 0 0.5rem; font-size: 1.25rem; }
section h2 { margin: 0 0 0.5rem; font-size: 1.1rem; }

.muted { color: #666; }
.was { color: #b94e00; }

.badges { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-bottom: 0.5rem; }
.badge {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e9ebf0;
  color: #333;
}
.badge.drift-none { background: #e6f4ea; color: #1e6e3a; }
.badge.drift-added { background: #e0e8ff; color: #1947b3; }
.badge.drift-removed { background: #fde2e2; color: #9b1c1c; }
.badge.drift-price_changed { background: #fff4d4; color: #6b4a00; }
.badge.drift-mode_changed { background: #ead2ff; color: #5a17a9; }
.badge.drift-extra_changed { background: #ffe1c8; color: #804008; }
.badge.drift-worker_changed { background: #d1eef5; color: #0c5566; }
.badge.audit-accepted { background: #e6f4ea; color: #1e6e3a; }
.badge.audit-publish_failed { background: #fde2e2; color: #9b1c1c; }
.badge.audit-sig_invalid, .badge.audit-identity_mismatch { background: #fde2e2; color: #9b1c1c; }
.badge.audit-rollback_rejected, .badge.audit-window_invalid, .badge.audit-drift_rejected { background: #fff4d4; color: #6b4a00; }

table { width: 100%; border-collapse: collapse; }
th, td { padding: 0.45rem 0.6rem; border-bottom: 1px solid #eee; text-align: left; vertical-align: top; }
th { background: #fafbfc; font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: #555; }
tbody tr:hover { background: #fafbff; }
tbody tr.drift-added { background: #f3f7ff; }
tbody tr.drift-removed { background: #fff7f7; }
tbody tr.drift-price_changed { background: #fffaee; }

td.worker code, td.hash code { font-size: 11px; color: #444; }

.broker-cell { display: inline-block; font-size: 12px; padding: 1px 6px; margin-right: 4px; border-radius: 3px; background: #eef; color: #224; }
.broker-cell.broker-stale_failing { background: #fff4d4; color: #6b4a00; }
.broker-cell.broker-schema_error { background: #fde2e2; color: #9b1c1c; }

.brokers ul { list-style: none; padding: 0.5rem 0 0; margin: 0; }
.brokers li { padding: 0.2rem 0; }
.brokers .err { color: #9b1c1c; margin-left: 0.5rem; }

.filters { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.5rem; }
.refresh { margin-top: 0.75rem; }
.filters input[type=text], .filters select {
  padding: 0.3rem 0.5rem;
  border: 1px solid #cfd2d7;
  border-radius: 4px;
  font-size: 13px;
}
.filters button, .upload button, .refresh button {
  padding: 0.35rem 0.9rem;
  background: #15202b;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.upload form { display: flex; gap: 0.5rem; align-items: center; }
.upload input[type=file] { font-size: 13px; }
.upload-flash {
  margin: 0 0 0.75rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid #e3e4e7;
  border-radius: 4px;
  background: #fafbfc;
}
.upload-accepted { border-color: #1e6e3a; color: #1e6e3a; }
.upload-drift_rejected,
.upload-rollback_rejected,
.upload-window_invalid { border-color: #6b4a00; color: #6b4a00; }
.upload-sig_invalid,
.upload-identity_mismatch,
.upload-schema_invalid,
.upload-publish_failed,
.upload-error { border-color: #9b1c1c; color: #9b1c1c; }

.logout button {
  padding: 0.35rem 0.9rem;
  background: rgba(255,255,255,0.12);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 4px;
  cursor: pointer;
}

.login-card { max-width: 520px; margin: 2rem auto; }
.login-form {
  display: grid;
  gap: 0.6rem;
  max-width: 420px;
}
.login-form input[type=text],
.login-form input[type=password] {
  padding: 0.45rem 0.55rem;
  border: 1px solid #cfd2d7;
  border-radius: 4px;
  font-size: 13px;
}
.login-form button {
  width: fit-content;
  padding: 0.45rem 1rem;
  background: #15202b;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
.login-error { color: #9b1c1c; }

small { color: #777; }
