:root {
  --bg-0: #03060c;
  --bg-1: #0a111a;
  --card-bg: #0c141d;
  --card-bg-2: #0f1822;
  --card-border: #1d2b37;
  --text-main: #eef4f8;
  --text-muted: #b1bdc9;
  --accent: #ff2636;
  --shadow: 0 12px 24px rgb(0 0 0 / 35%);
}

* { box-sizing: border-box; }

body {
  min-block-size: 100vh;
  margin: 0;
  color: var(--text-main);
  background: linear-gradient(170deg, var(--bg-1), var(--bg-0));
  font-family: "Exo 2", sans-serif;
}

.wallboard { width: min(1920px, 100%); margin: 0 auto; padding: 22px 18px 50px; }
.top-row, .agent-tables { display: grid; gap: 12px; }
.top-row { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.agent-tables { grid-template-columns: minmax(350px, 1.25fr) minmax(280px, 1fr) repeat(2, minmax(230px, .9fr)); margin-top: 14px; }

.metric-card, .agent-table-section { overflow: hidden; border: 1px solid var(--card-border); border-radius: 8px; background: linear-gradient(165deg, var(--card-bg), var(--card-bg-2)); box-shadow: var(--shadow); }
.metric-card { position: relative; display: flex; flex-direction: column; justify-content: space-between; min-height: 174px; padding: 14px 16px; }
.metric-card::after { position: absolute; right: 0; bottom: 0; left: 0; height: 5px; background: var(--accent); content: ""; }
.metric-header, .agent-table-header { display: flex; align-items: center; gap: 12px; }
.metric-icon { display: inline-flex; flex: 0 0 auto; width: 40px; height: 40px; }
.metric-icon svg, .agent-table-icon { width: 100%; height: 100%; fill: none; stroke: var(--text-main); stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
h2 { margin: 0; color: var(--text-main); font-family: "Barlow Condensed", sans-serif; font-size: 1.9rem; font-weight: 600; line-height: 1; letter-spacing: .04em; text-transform: uppercase; }
.metric-value { margin: 0; color: var(--text-main); font-family: "Barlow Condensed", sans-serif; font-size: clamp(3.2rem, 4.2vw, 5.1rem); font-weight: 700; line-height: 1; text-align: center; }
.agent-table-header { padding: 14px 16px; border-bottom: 2px solid var(--accent); }
.agent-table-header strong { margin-left: auto; font-size: 1rem; }
.agent-table-icon { width: 22px; height: 22px; }
.agent-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.agent-table th, .agent-table td { padding: 9px 16px; text-align: left; }
.agent-table th { color: var(--text-muted); font-size: .85rem; font-weight: 500; }
.agent-table th:last-child, .agent-table td:last-child { width: 140px; text-align: right; white-space: nowrap; }
.agent-table td { border-top: 1px solid var(--card-border); }
.agent-table td:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agent-table tr.performance-color td { background: var(--booking-performance-color); }
.agent-status-table th:nth-child(2),
.agent-status-table td:nth-child(2) { width: 72px; color: var(--text-main); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.agent-status-table th:last-child,
.agent-status-table td:last-child { width: 220px; text-align: left; white-space: normal; }
.agent-status { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; }
.agent-status svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }
.agent-status-available { color: #36c476; }
.agent-status-busy { color: #b678ff; }
.agent-status-away { color: #f2b84b; }
.agent-status-lunch { color: #f2b84b; }
.agent-status-after_call_work { color: #5d9cf7; }
.agent-status-offline { color: #9ba8b4; }
.agent-status-table tr.long-status-alert td { animation: long-status-alert-pulse 1.8s ease-in-out infinite; }
@keyframes long-status-alert-pulse { 0%, 100% { background: transparent; } 50% { background: rgb(240 90 98 / 22%); } }
.agent-status-chart { height: 250px; padding: 12px 16px 8px; }
.status-line { position: fixed; bottom: 18px; left: 18px; margin: 0; color: var(--text-muted); font-size: .9rem; }

@media (prefers-reduced-motion: reduce) { .agent-status-table tr.long-status-alert td { animation: none; background: rgb(240 90 98 / 22%); } }

@media (max-width: 1200px) { .agent-tables { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) { .top-row, .agent-tables { grid-template-columns: 1fr; } .wallboard { padding: 10px 10px 50px; } }