/* ============================================================
 * console.css — CAS Console (internal) styles
 * ============================================================
 * Utility-flavored: dense table, color-coded health, no decoration.
 * This is an operator tool, not a marketing surface.
 * ============================================================ */

:root {
  --bg: #f7f7f5;
  --card: #ffffff;
  --ink: #1f2228;
  --muted: #6b7280;
  --border: #e5e7eb;
  --red: #b91c1c;
  --yellow: #b45309;
  --green: #166534;
  --accent: #2563eb;
  --shadow: 0 1px 3px rgba(0,0,0,0.06);
  --mono: ui-monospace, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  padding-bottom: 80px;
}

.topbar {
  background: white;
  border-bottom: 1px solid var(--border);
  padding: 16px 32px;
  display: flex;
  align-items: baseline;
  gap: 24px;
}
.topbar h1 { margin: 0; font-size: 18px; }
.muted { color: var(--muted); font-size: 13px; }

.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  padding: 24px 32px;
}
.metric {
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  box-shadow: var(--shadow);
}
.metric .label { display: block; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.metric strong { display: block; margin-top: 4px; font-size: 24px; }

.alerts, .tenants {
  padding: 16px 32px 32px;
}
.alerts h2, .tenants h2 { font-size: 16px; margin: 0 0 12px; }

.alert-row {
  background: white;
  border: 1px solid var(--border);
  border-left: 4px solid var(--red);
  border-radius: 6px;
  padding: 12px 16px;
  margin-bottom: 8px;
  display: flex; justify-content: space-between; gap: 16px;
}
.alert-row .reason { font-family: var(--mono); font-size: 13px; color: var(--red); }

.tenants table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  font-size: 13px;
}
.tenants th, .tenants td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.tenants th {
  background: #f9fafb;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.tenants tr:last-child td { border-bottom: 0; }

.health-pill {
  display: inline-block;
  width: 10px; height: 10px; border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}
.health-pill.green  { background: var(--green); }
.health-pill.yellow { background: var(--yellow); }
.health-pill.red    { background: var(--red); }

/* ============================================================
   Support tickets (Group 5)
   ============================================================ */
.tickets { padding: 0 24px 24px; }
.tickets h2 { font-size: 15px; margin-bottom: 12px; }
.ticket-note { margin-bottom: 12px; }

.ticket-rollup {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}
.rollup-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  min-width: 170px;
}
.rollup-card-hot { border-color: var(--red); }
.rollup-layout { font-size: 12px; font-weight: 600; margin-bottom: 4px; }
.rollup-counts { display: flex; gap: 10px; font-size: 12px; color: var(--muted); }

.urgency {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}
.urgency-low    { background: rgba(70,167,88,0.16);  color: var(--green); }
.urgency-medium { background: rgba(245,166,35,0.16); color: var(--yellow); }
.urgency-high   { background: rgba(229,72,77,0.16);  color: var(--red); }
