:root {
  --bg: #f6f8fb;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --line: #d9e2ec;
  --line-soft: #e7edf4;
  --text: #101828;
  --muted: #475467;
  --muted-2: #667085;
  --primary: #1564D4;
  --primary-dark: #0f4fad;
  --blue: #1d4ed8;
  --green: #15803d;
  --amber: #b45309;
  --red: #b91c1c;
  --sidebar: #0b1f3a;
  --sidebar-soft: #153a6b;
  --shadow: 0 16px 38px rgba(15, 23, 42, .08);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.45 Inter, "Segoe UI", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 248px minmax(0, 1fr); }
.app-sidebar {
  background: linear-gradient(180deg, #0a1a33 0%, var(--sidebar) 100%);
  color: #d9e2ec;
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.app-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: #fff;
  padding: 4px 8px 14px;
  text-decoration: none;
}
.app-brand:hover { text-decoration: none; }
.app-brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #0b1f3a;
  background: #93c5fd;
  font-weight: 900;
}
.app-brand strong { display: block; font-size: 17px; letter-spacing: .04em; }
.app-brand small { display: block; color: #9fb3c8; font-size: 12px; margin-top: 1px; }
.nav-section {
  padding: 10px 10px 2px;
  color: #9fb3c8;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 800;
}
.app-nav { display: grid; gap: 4px; }
.app-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 11px;
  color: #d9e2ec;
  border-radius: 7px;
  font-weight: 700;
}
.app-nav a:hover { background: rgba(255,255,255,.06); text-decoration: none; }
.app-nav a.active {
  background: var(--sidebar-soft);
  color: #fff;
  box-shadow: inset 3px 0 0 #60a5fa;
}
.muted-nav a { color: #b7c7d4; font-weight: 650; }
.nav-icon {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: inline-grid;
  place-items: center;
  background: rgba(255,255,255,.08);
  color: #bfdbfe;
  font-size: 12px;
  flex: 0 0 auto;
}
.sidebar-footer {
  margin-top: auto;
  border: 1px solid rgba(217,226,236,.16);
  background: rgba(255,255,255,.05);
  border-radius: 8px;
  padding: 11px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.sidebar-footer strong { display: block; color: #fff; font-size: 13px; }
.sidebar-footer small { display: block; color: #9fb3c8; font-size: 12px; }
.health-dot { width: 9px; height: 9px; border-radius: 999px; background: #3b82f6; box-shadow: 0 0 0 4px rgba(59,130,246,.16); }

.app-main { min-width: 0; }
.app-topbar {
  height: 68px;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 20;
}
.app-topbar strong { font-size: 16px; }
.eyebrow { margin: 0 0 2px; color: var(--muted-2); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.topbar-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.topbar-link, .user-chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 6px 10px;
  color: var(--text);
  background: #fff;
  font-weight: 700;
}
.topbar-link:hover { text-decoration: none; border-color: #a8b7c7; }
.topbar-link.danger { color: var(--red); }
.user-chip { background: #f0fdfa; color: #1e3a8a; border-color: #bfdbfe; }

.wrap { max-width: 1500px; margin: 0 auto; padding: 24px 22px 64px; }
h1 { margin: 0 0 6px; font-size: 26px; line-height: 1.15; color: var(--text); letter-spacing: -.02em; }
h2 { margin: 0 0 12px; font-size: 12px; color: var(--muted-2); font-weight: 850; text-transform: uppercase; letter-spacing: .08em; }
.lede { margin: 0; color: var(--muted); }
.pagehead { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; margin-bottom: 20px; flex-wrap: wrap; }
.stats { display: flex; gap: 10px; flex-wrap: wrap; color: var(--muted); }
.stats > div {
  min-width: 118px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  box-shadow: 0 8px 22px rgba(15,23,42,.04);
}
.stats b { display: block; color: var(--text); font-size: 22px; line-height: 1; margin-bottom: 3px; }

.crumb { color: var(--muted); margin: 0 0 12px; }
.subnav { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 22px; }
.subnav a, .subnav span {
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
}
.subnav a.on, .subnav span.on { background: #eff6ff; color: var(--primary); border-color: #bfdbfe; }

table { width: 100%; border-collapse: separate; border-spacing: 0; }
.tenants, .jobs {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.tenants th, .jobs th {
  text-align: left;
  font-size: 11px;
  color: var(--muted-2);
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.tenants td, .jobs td {
  padding: 12px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
  color: #243042;
}
.tenants tr:last-child td, .jobs tr:last-child td { border-bottom: 0; }
.tenants tbody tr { cursor: pointer; transition: background .15s ease; }
.tenants tbody tr:hover, .jobs tbody tr:hover { background: #f8fafc; }
.name { font-weight: 800; color: var(--text); }
.sub { color: var(--muted); font-size: 13px; }

.pill {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  line-height: 1.35;
  background: #e2e8f0;
  color: #334155;
  font-weight: 850;
  text-transform: lowercase;
}
.pill.active, .pill.done, .pill.paid, .pill.online, .pill.ok { background: #dcfce7; color: var(--green); }
.pill.overdue, .pill.failed, .pill.bad, .pill.suspended, .pill.inactive, .pill.offline { background: #fee2e2; color: var(--red); }
.pill.trial, .pill.pending, .pill.running, .pill.unpaid, .pill.unknown { background: #fef3c7; color: var(--amber); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; background: #94a3b8; }
.dot.ok, .dot.online { background: var(--green); }
.dot.warning, .dot.unknown { background: var(--amber); }
.dot.error, .dot.offline { background: var(--red); }

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 28px; }
article {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px 18px;
  box-shadow: 0 10px 28px rgba(15,23,42,.05);
}
dl { margin: 0; display: grid; gap: 10px; }
dl > div { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line-soft); padding-bottom: 8px; }
dl > div:last-child { border-bottom: 0; padding-bottom: 0; }
dt { color: var(--muted); }
dd { margin: 0; font-weight: 800; color: var(--text); text-align: right; }
.actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.tenant-side-actions { display: grid; justify-items: end; gap: 10px; min-width: min(100%, 420px); }
.report-notification {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: min(100%, 520px);
  padding: 10px 12px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
  color: #1e3a5f;
  box-shadow: 0 10px 24px rgba(30, 64, 175, .08);
}
.report-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 30px;
  border-radius: 7px;
  background: #1d4ed8;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
}
.report-copy { min-width: 0; }
.report-copy strong,
.report-copy small { display: block; overflow-wrap: anywhere; }
.report-copy strong { color: #172033; font-size: 13px; line-height: 1.25; }
.report-copy small { color: #466176; margin-top: 2px; }
.btn {
  border: 1px solid var(--primary);
  border-radius: 7px;
  padding: 8px 13px;
  font: inherit;
  cursor: pointer;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  display: inline-block;
}
.btn:hover { text-decoration: none; filter: brightness(1.04); }
.btn.small { padding: 7px 10px; font-size: 12px; white-space: nowrap; }
.btn.ghost { background: #fff; color: var(--text); border: 1px solid var(--line); }
.btn.danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn.good { background: var(--green); border-color: var(--green); color: #fff; }

.auth-body { background: radial-gradient(circle at top left, #d1fae5 0, transparent 32%), var(--bg); }
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login {
  width: min(100%, 390px);
  background: var(--surface);
  padding: 30px;
  border-radius: 14px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.login form { display: grid; gap: 12px; margin-top: 16px; }
.login label { display: grid; gap: 6px; color: var(--muted); font-size: 13px; font-weight: 700; }
.login input, .toolbar input[type=search], .toolbar select, .formgrid input, .formgrid select, .formgrid textarea {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 7px;
  padding: 9px 12px;
  font: inherit;
}
.login input:focus, .toolbar input:focus, .toolbar select:focus, .formgrid input:focus, .formgrid select:focus, .formgrid textarea:focus {
  outline: 3px solid rgba(15, 118, 110, .14);
  border-color: var(--primary);
}
.login button { margin-top: 8px; }
.flash.err { color: var(--red); }
.flash.ok { color: var(--green); }
.muted { color: var(--muted); }
code { font: 13px ui-monospace, SFMono-Regular, Consolas, monospace; background: #eef2f7; color: #0f172a; padding: 2px 6px; border-radius: 5px; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin: 0 0 18px; align-items: center; }
.toolbar input[type=search] { min-width: 260px; flex: 1; }
.formgrid { display: grid; gap: 10px; }
.formgrid label { display: grid; gap: 5px; color: var(--muted); font-size: 13px; font-weight: 700; }
.formgrid textarea { min-height: 92px; resize: vertical; }

.notice {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 13px;
  margin: 0 0 16px;
  background: #fff;
  color: var(--text);
  font-weight: 700;
}
.notice.ok { background: #eff6ff; border-color: #a7f3d0; color: var(--green); }
.notice.err { background: #fef2f2; border-color: #fecaca; color: var(--red); }
.billing-head { align-items: center; }
.billing-overview {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(240px, .65fr) minmax(260px, .8fr);
  gap: 14px;
  margin-bottom: 16px;
}
.billing-money {
  font-size: 34px;
  line-height: 1;
  font-weight: 900;
  color: var(--text);
  margin: 6px 0 10px;
}
.dispatch-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 18px;
  display: grid;
  grid-template-columns: minmax(220px, .36fr) minmax(0, 1fr);
  gap: 18px;
  margin-bottom: 18px;
}
.dispatch-copy {
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 16px;
}
.dispatch-copy h2 {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 20px;
  line-height: 1.15;
  text-transform: none;
  letter-spacing: 0;
}
.dispatch-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.channel-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  margin: 0;
  background: #fff;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}
.channel-box legend {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  padding: 0 4px;
}
.channel-box label,
.checkline {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}
.channel-box input,
.checkline input {
  width: auto;
  accent-color: var(--primary);
}
.message-label {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.message-label textarea {
  width: 100%;
  min-height: 190px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 8px;
  padding: 12px;
  font: inherit;
  resize: vertical;
}
.message-label textarea:focus {
  outline: 3px solid rgba(15, 118, 110, .14);
  border-color: var(--primary);
}
.dispatch-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.billing-section {
  margin-top: 18px;
}
.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.section-head h2 {
  margin-bottom: 4px;
}

@media (max-width: 980px) {
  .app-shell { grid-template-columns: 1fr; }
  .app-sidebar { position: static; height: auto; padding: 14px; }
  .app-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sidebar-footer { display: none; }
  .app-topbar { position: static; height: auto; padding: 14px; align-items: flex-start; }
  .wrap { padding: 18px 14px 48px; }
  .grid { grid-template-columns: 1fr; }
  .billing-overview, .dispatch-panel, .dispatch-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .app-nav { grid-template-columns: 1fr; }
  .topbar-actions, .tenant-side-actions, .actions, .toolbar, .pagehead { display: grid; width: 100%; justify-items: stretch; }
  .report-notification { grid-template-columns: auto minmax(0, 1fr); }
  .report-notification .btn { grid-column: 1 / -1; }
  .topbar-link, .user-chip, .btn, .toolbar input[type=search], .toolbar select { width: 100%; }
  .stats { display: grid; grid-template-columns: 1fr; width: 100%; }
  .tenants, .jobs { display: block; overflow-x: auto; }
  .dispatch-actions { display: grid; }
  .dispatch-actions .btn { width: 100%; }
}

/* Agent Workforce Control Center - Open Design operational dashboard */
.agent-pagehead { align-items: center; }
.agent-hero { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr); gap: 16px; margin-bottom: 16px; }
.agent-hero-main, .agent-run-card, .agent-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.agent-hero-main { display: flex; gap: 18px; align-items: center; min-height: 190px; padding: 22px; background: radial-gradient(circle at 12% 18%, rgba(59,130,246,.18), transparent 20rem), linear-gradient(135deg, #0a1a33, #0b1f3a 62%, #1564D4); color: #d9e2ec; overflow: hidden; }
.agent-hero-main h2 { color: #bfdbfe; margin-bottom: 8px; }
.agent-hero-main h3 { color: #fff; font-size: 30px; line-height: 1.05; margin: 0 0 8px; letter-spacing: -.03em; }
.agent-hero-main p { color: #c8d7e3; margin: 0; max-width: 780px; }
.agent-orb { width: 92px; height: 92px; border-radius: 24px; display: grid; place-items: center; flex: 0 0 auto; color: #0b1f3a; background: #93c5fd; font-size: 24px; font-weight: 950; box-shadow: 0 0 0 10px rgba(147,197,253,.12); }
.agent-run-card { padding: 18px; display: grid; align-content: center; gap: 8px; }
.agent-run-card span, .agent-run-card small { color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.agent-run-card strong { color: var(--text); font-size: 36px; line-height: 1; text-transform: uppercase; }
.agent-run-card code { display: block; background: #f1f5f9; border: 1px solid var(--line); border-radius: 8px; color: #334155; font-size: 12px; margin-top: 4px; padding: 9px; white-space: normal; }
.agent-stats { margin-bottom: 16px; }
.agent-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, .48fr); gap: 16px; margin-bottom: 16px; }
.agent-panel { padding: 16px; min-width: 0; }
.panel-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.panel-head h2 { margin-bottom: 4px; }
.agent-roster { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.agent-card { border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); padding: 13px; min-height: 190px; }
.agent-card-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; margin-bottom: 8px; }
.agent-card strong { display: block; color: var(--text); font-size: 15px; }
.agent-card small { display: block; color: var(--muted); font-size: 12px; }
.agent-card p { color: #344054; margin: 8px 0; }
.agent-tags { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0; }
.agent-tags span { background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 999px; color: #1e3a8a; font-size: 11px; font-weight: 800; padding: 4px 7px; }
.agent-tools { border-top: 1px solid var(--line); padding-top: 9px; }
.agent-list { display: grid; gap: 10px; max-height: 660px; overflow: auto; padding-right: 4px; }
.agent-list.compact { max-height: 430px; }
.agent-list-item { border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); padding: 12px; }
.agent-list-item strong { display: block; margin-top: 7px; color: var(--text); }
.agent-list-item p { color: #344054; margin: 6px 0; }
.agent-list-item small { color: var(--muted); }
.agent-table td { font-size: 13px; }
.memory-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.memory-card { border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); padding: 13px; }
.memory-card strong { display: block; color: var(--text); }
.memory-card p { color: #344054; margin: 7px 0; }
.memory-card small, .empty { color: var(--muted); }
.pill.critical { background: #fee2e2; color: var(--red); }
.pill.warning, .pill.medium { background: #fef3c7; color: var(--amber); }
.pill.info, .pill.low { background: #dbeafe; color: var(--blue); }
.pill.awaiting_approval, .pill.ready_for_action, .pill.staged, .pill.manual_required { background: #fef3c7; color: var(--amber); }
.pill.investigating, .pill.open, .pill.executing, .pill.verifying, .pill.command_accepted, .pill.inconclusive, .pill.partial { background: #dbeafe; color: var(--blue); }
.pill.blocked, .pill.failed { background: #fee2e2; color: var(--red); }
.pill.active, .pill.closed, .pill.verified, .pill.outcome_verified, .pill.completed { background: #dcfce7; color: var(--green); }
@media (max-width: 1260px) { .agent-roster { grid-template-columns: repeat(2, minmax(0, 1fr)); } .memory-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 980px) { .agent-hero, .agent-grid { grid-template-columns: 1fr; } .agent-roster, .memory-grid { grid-template-columns: 1fr; } .agent-hero-main { align-items: flex-start; flex-direction: column; } }

/* Convention-mode ops polish: focus, KPI, attention, empty, row actions */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.btn:focus-visible,
.app-nav a:focus-visible,
.tenant-name:focus-visible {
  outline: 2px solid #2dd4bf;
  outline-offset: 2px;
}
.btn:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 16px;
}
.kpi {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 14px 16px;
  min-width: 0;
}
.kpi span {
  display: block;
  color: var(--muted-2);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.kpi strong {
  display: block;
  margin-top: 6px;
  color: var(--text);
  font-size: 28px;
  line-height: 1.1;
  letter-spacing: -.02em;
}
.kpi small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}
.kpi.good { border-top: 3px solid var(--green); }
.kpi.warn { border-top: 3px solid var(--amber); }
.kpi.bad { border-top: 3px solid var(--red); }
.kpi.danger { border-top: 3px solid #7f1d1d; }

.attention-panel,
.empty-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 16px;
  margin: 0 0 16px;
}
.attention-list { display: grid; gap: 8px; }
.attention-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  color: inherit;
  text-decoration: none;
  transition: border-color .15s ease, background .15s ease;
}
.attention-item:hover {
  text-decoration: none;
  border-color: #94a3b8;
  background: #fff;
}
.attention-item strong { display: block; color: var(--text); }
.attention-item small { display: block; color: var(--muted); margin-top: 2px; }
.attention-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: flex-end; }
.attention-item.sev-3 { border-left: 4px solid var(--red); }
.attention-item.sev-2 { border-left: 4px solid var(--amber); }
.attention-item.sev-1 { border-left: 4px solid var(--blue); }

.tenant-name {
  color: inherit;
  text-decoration: none;
  display: block;
}
.tenant-name:hover { text-decoration: none; }
.tenant-name:hover .name { color: var(--primary); text-decoration: underline; }
.tenants tr.row-locked { background: #fff7f7; }
.tenants tr.row-locked:hover { background: #fff1f1; }
.row-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  white-space: nowrap;
}
.row-actions .btn { min-height: 32px; }
.pill.warning {
  background: #fef3c7;
  color: var(--amber);
}
.pill.good {
  background: #dcfce7;
  color: var(--green);
}
.pill.info {
  background: #dbeafe;
  color: var(--blue);
}
.empty-panel h2 { margin-top: 0; }

.lock-reason {
  min-width: 160px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
  background: #fff;
}

@media (max-width: 1200px) {
  .kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .attention-item { flex-direction: column; align-items: flex-start; }
  .attention-meta { justify-content: flex-start; }
}
@media (max-width: 640px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .row-actions { flex-wrap: wrap; }
}
.plain-list { margin: 0; padding-left: 18px; }
.plain-list li { margin: 6px 0; }
.ok-text { color: var(--green); }
.bad-text { color: var(--red); }
