/* ============================================================================
   admin/admin.css — admin-only styling, on top of the portal stylesheet.
   Denser than the cook portal: this is read at a desk, not at a hob.
   ========================================================================== */

body.admin .portal-body { max-width: 1240px; }

.admin-badge {
  display: inline-flex; align-items: center; gap: 6px; margin-bottom: 16px;
  background: var(--dark-black); color: #FFF; border-radius: var(--radius-pill);
  padding: 5px 12px; font-size: 11.5px; font-weight: 800;
}
.admin-badge .ic { width: 13px; height: 13px; }

.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.two-col > .portal-section { margin-bottom: 0; }

/* Bars — a CSS div beats 90KB of charting library for six numbers. */
.bar-row { margin-bottom: 13px; }
.bar-head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  font-size: 13px; margin-bottom: 5px;
}
.bar-head strong { font-weight: 800; }
.bar-head em { font-style: normal; font-weight: 500; color: var(--text-muted); font-size: 12px; }
.bar-track { height: 8px; background: var(--surface-sunken); border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; background: var(--text-muted); }
.bar-fill.tone-ok { background: var(--ok-fg); }
.bar-fill.tone-warn { background: #D97706; }
.bar-fill.tone-info { background: var(--info-fg); }
.bar-fill.tone-muted { background: var(--border-strong); }

.mini-stats {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px;
  margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border-color);
}
.mini-stats strong { display: block; font-size: 20px; font-weight: 800; }
.mini-stats span { font-size: 11.5px; color: var(--text-muted); line-height: 1.4; }

/* Six weeks of orders. */
.spark { display: flex; gap: 10px; align-items: flex-end; height: 150px; padding-top: 8px; }
.spark-col { flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: flex-end; height: 100%; }
.spark-bar {
  width: 100%; max-width: 54px; background: var(--primary-yellow);
  border-radius: 6px 6px 0 0; min-height: 4px;
}
.spark-n { font-size: 12.5px; font-weight: 800; margin-top: 6px; }
.spark-l { font-size: 11px; color: var(--text-muted); }

/* Needs a person today. */
.attention-list { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.attention-list li {
  display: flex; align-items: center; gap: 14px; padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
}
.attention-list li:last-child { border-bottom: none; }
.attention-list strong { display: block; font-size: 14.5px; }
.attention-list span { font-size: 12.5px; color: var(--text-muted); }
.attention-list .btn-black { margin-left: auto; flex: none; }

/* Tables */
.admin-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.admin-table th {
  text-align: left; font-size: 11.5px; font-weight: 800; color: var(--text-muted);
  padding: 0 10px 10px; border-bottom: 1px solid var(--border-color); white-space: nowrap;
}
.admin-table th.n, .admin-table td.n { text-align: right; }
.admin-table td { padding: 12px 10px; border-bottom: 1px solid var(--border-color); vertical-align: top; }
.admin-table tbody tr:last-child td { border-bottom: none; }
.admin-table tbody tr:hover { background: var(--surface-sunken); }
.admin-table tr.is-stalled { background: #FFFDF5; }
.cell-sub { display: block; font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }
.cell-person { display: flex; gap: 10px; align-items: flex-start; }
.account-avatar.sm { width: 30px; height: 30px; font-size: 12px; }

.tag-cook, .tag-cust, .tag-warn {
  display: inline-block; font-size: 10px; font-weight: 800; border-radius: 4px;
  padding: 2px 6px; margin-left: 6px; vertical-align: middle;
}
.tag-cook { background: var(--warn-bg); color: var(--warn-fg); }
.tag-cust { background: var(--info-bg); color: var(--info-fg); }
.tag-warn { background: var(--danger-bg); color: var(--danger-fg); }

/* Feedback and incident cards */
.fb-card, .inc-card {
  border: 1px solid var(--border-color); border-radius: var(--radius-md);
  padding: 15px; margin-bottom: 10px;
}
.inc-card.sev-high { border-left: 4px solid var(--danger-fg); }
.inc-card.sev-medium { border-left: 4px solid #D97706; }
.inc-card.sev-low { border-left: 4px solid var(--border-strong); }
.fb-top, .inc-top {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 12px;
}
.fb-text { font-size: 14px; line-height: 1.6; margin: 10px 0; }
.fb-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fb-foot .btn-black:last-child { margin-left: auto; }

/* Audit log */
.audit-list { display: flex; flex-direction: column; gap: 2px; }
.audit-row {
  display: grid; grid-template-columns: 80px 70px minmax(0, 1fr); gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--border-color); font-size: 13px;
}
.audit-when, .audit-who { color: var(--text-muted); font-size: 12px; }

@media (max-width: 900px) {
  .two-col { grid-template-columns: 1fr; }
  .admin-table { font-size: 12.5px; }
  .admin-table th:nth-child(n+5), .admin-table td:nth-child(n+5) { display: none; }
  .mini-stats { grid-template-columns: 1fr; }
}
