:root {
  --ink: #202a25;
  --muted: #68756e;
  --line: #dfe7e2;
  --paper: #ffffff;
  --red: #187c72;
  --red-dark: #12645d;
  --green: #21825e;
  --sidebar: #193630;
  --soft: #f3f6f4;
  color: var(--ink);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

body,
button,
input,
select,
textarea {
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

body {
  background: #f3f6f4;
  color: var(--ink);
}

.sidebar {
  width: 236px;
  padding: 24px 14px 16px;
  background: var(--sidebar);
}

.workspace {
  min-width: 0;
  margin-left: 236px;
}

.brand {
  padding: 0 12px 28px;
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

.brand-name {
  font-size: 17px;
  font-weight: 750;
}

.nav-section-label {
  margin: 0 12px 10px;
  color: #9caf9f;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0;
}

.nav-item {
  height: 44px;
  margin: 3px 0;
  padding-inline: 12px;
  border-radius: 6px;
  color: #d3ddd6;
  font-size: 13px;
  transition: background-color 140ms ease, color 140ms ease;
}

.nav-item:hover {
  background: #ffffff12;
  color: #fff;
}

.nav-item.active {
  background: #ffffff18;
  box-shadow: inset 3px 0 #63c4ad;
  color: #fff;
}

.nav-item.active .nav-icon {
  color: #8bd5c2;
}

.sidebar-bottom {
  padding: 17px 8px 0;
  border-top-color: #ffffff20;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 4;
  height: 66px;
  padding-inline: 32px;
  background: #fff;
  border-bottom: 1px solid #e9eeea;
  box-shadow: none;
}

.top-actions {
  gap: 12px;
}

.sync-status {
  color: #68766d;
}

.page-content {
  max-width: 1480px;
  padding: 34px 32px 42px;
}

.page-heading {
  align-items: center;
  margin-bottom: 24px;
}

h1 {
  color: #1f2924;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 29px;
  font-weight: 720;
  line-height: 1.2;
}

#pageDescription {
  margin-top: 5px;
  color: #6d7972;
  font-size: 13px;
}

.button {
  height: 40px;
  padding-inline: 15px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 650;
  transition: background-color 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.button-primary {
  background: var(--red);
  border-color: var(--red);
  box-shadow: 0 2px 5px #12645d24;
}

.button-primary:hover {
  background: var(--red-dark);
  border-color: var(--red-dark);
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.metric {
  display: grid;
  grid-template-columns: 1fr;
  align-content: center;
  gap: 6px;
  min-width: 0;
  min-height: 112px;
  padding: 16px 18px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e2e9e4;
  border-top: 3px solid #50a781;
  border-radius: 8px;
  box-shadow: 0 2px 7px #25352b08;
}

.metric:nth-child(1) { border-top-color: #187c72; }
.metric:nth-child(2) { border-top-color: #d49a36; }
.metric:nth-child(3) { border-top-color: #278765; }
.metric:nth-child(4) { border-top-color: #63877a; }

.metric-label {
  color: #68756e;
  font-size: 11px;
  font-weight: 600;
}

.metric strong {
  color: #202a25;
  font-size: 26px;
  font-weight: 730;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.metric-note {
  color: #849088;
  font-size: 10px;
}

.metric:last-child strong {
  font-size: 15px;
  white-space: nowrap;
}

.metric:last-child .metric-note {
  display: none;
}

.data-section {
  overflow: hidden;
  background: #fff;
  border: 1px solid #e1e8e3;
  border-radius: 8px;
  box-shadow: 0 2px 8px #25352b08;
}

.toolbar {
  min-height: 68px;
  padding: 13px 17px;
  background: #fff;
  border-bottom: 1px solid #e8ede9;
}

.toolbar-left,
.toolbar-right {
  gap: 10px;
}

.search-box {
  width: 280px;
  height: 40px;
  padding-inline: 12px;
  background: #f8faf8;
  border: 1px solid #e0e7e2;
  border-radius: 6px;
  transition: border-color 140ms ease, background-color 140ms ease, box-shadow 140ms ease;
}

.search-box:focus-within {
  background: #fff;
  border-color: #5aa99c;
  box-shadow: 0 0 0 3px #187c7218;
}

.search-box input,
.select-control {
  color: #333d37;
  font-size: 12px;
}

.select-control {
  height: 40px;
  padding-inline: 12px 30px;
  background-color: #f8faf8;
  border-color: #e0e7e2;
  border-radius: 6px;
  transition: border-color 140ms ease, background-color 140ms ease, box-shadow 140ms ease;
}

.select-control:focus,
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: #5aa99c;
  box-shadow: 0 0 0 3px #187c7218;
}

.result-count {
  padding: 6px 10px;
  background: #f1f5f2;
  border-radius: 999px;
  color: #58665e;
  font-size: 11px;
  font-weight: 600;
}

.shift-week-control {
  gap: 4px;
  padding: 3px 5px;
  background: #eef5f0;
  border: 1px solid #dce9e0;
  border-radius: 8px;
  color: #3d5d4d;
  font-size: 11px;
  font-weight: 650;
}

.shift-week-control .icon-button {
  width: 28px;
  height: 28px;
  background: #fff;
  border: 1px solid #e2ebe5;
  border-radius: 6px;
}

.shift-week-control .icon-button:hover:not(:disabled) {
  background: #e2f0e7;
  color: #1d6f4d;
}

.icon-button {
  transition: background-color 140ms ease, color 140ms ease;
}

.icon-button:hover:not(:disabled) {
  background: #f0f5f1;
  color: #286b4d;
}

.icon-button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

table { min-width: 760px; }

th {
  height: 43px;
  padding-inline: 15px;
  background: #f6f8f6;
  color: #67746c;
  font-size: 10px;
  font-weight: 700;
}

td {
  height: 64px;
  padding-inline: 15px;
  color: #364139;
  font-size: 12px;
}

tbody tr.data-row:nth-child(even) { background: #fbfcfb; }
tbody tr.data-row:hover { background: #f1f7f2; }

.person-cell { gap: 11px; }

.person-avatar {
  width: 34px;
  height: 34px;
  background: #e5f3ef;
  border: 1px solid #cce6df;
  color: #216c60;
  font-size: 11px;
  font-weight: 700;
}

.person-name {
  color: #253029;
  font-size: 12px;
  font-weight: 650;
}

.subline { color: #858e87; font-size: 10px; }

.status-pill {
  min-height: 24px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 650;
}

.tag { font-size: 10px; padding: 5px 7px; }

.table-footer {
  min-height: 54px;
  height: auto;
  background: #fff;
  border-top: 1px solid #e8ede9;
  color: #707972;
  font-size: 11px;
}

.footnote {
  color: #737d75;
  font-size: 10px;
  line-height: 1.5;
}

.modal {
  border: 1px solid #e1e8e3;
  border-radius: 8px;
  box-shadow: 0 20px 60px #16251c2e;
}

.modal-header {
  background: #fff;
  border-bottom-color: #e7ede8;
}

.field input,
.field select,
.field textarea {
  border-color: #dce5df;
  border-radius: 6px;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

:where(button, input, select, textarea, a):focus-visible {
  outline: 2px solid #187c72;
  outline-offset: 2px;
}

@media (max-width: 1050px) {
  .sidebar { width: 200px; }
  .workspace { margin-left: 200px; }
  .page-content { padding-inline: 22px; }
  .metric-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .sidebar { width: 58px; padding: 17px 6px 10px; }
  .workspace { margin-left: 58px; }
  .topbar { height: 58px; padding-inline: 12px; }
  .page-content { padding: 19px 12px 28px; }
  .metric-strip { gap: 8px; }
  .metric { min-height: 98px; padding: 12px; }
  .metric strong { font-size: 22px; }
  .metric:last-child strong { font-size: 12px; }
  .toolbar { gap: 8px; padding: 10px; }
  .toolbar-left, .toolbar-right { gap: 7px; }
}

@media (max-width: 430px) {
  .metric-strip { grid-template-columns: 1fr; }
  .metric { min-height: 80px; }
  .page-heading { align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  button,
  .button,
  .icon-button,
  .action-link {
    transition-duration: 190ms !important;
  }
}

button,
.button,
.icon-button,
.action-link {
  transition-property: transform, color, background-color, border-color, box-shadow, filter;
  transition-duration: 190ms;
  transition-timing-function: cubic-bezier(.2, .75, .25, 1);
}

button:not(:disabled):hover,
.button:not(:disabled):hover,
.action-link:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px #25352b14;
}

.button-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px #12645d33;
}

.action-link { color: #187c72; }
.avatar { background: #e5f3ef; color: #216c60; }
.field input:focus,
.field select:focus,
.field textarea:focus { border-color: #5aa99c; box-shadow: 0 0 0 2px #187c7218; }

.button-secondary:hover:not(:disabled),
.button-quiet:hover:not(:disabled) {
  background: #f1f7f3;
  border-color: #c8d9ce;
  color: #25543b;
  box-shadow: 0 3px 8px #25352b12;
}

.icon-button:not(:disabled):hover {
  transform: translateY(-1px) scale(1.04);
}

button:not(:disabled):active,
.button:not(:disabled):active,
.action-link:not(:disabled):active {
  transform: translateY(0) scale(.98);
  transition-duration: 80ms;
}

button:disabled,
.button:disabled {
  transform: none;
}

.manager-dashboard { display: grid; gap: 22px; }
.dashboard-context { display: flex; align-items: center; justify-content: space-between; min-height: 36px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.dashboard-link { padding: 5px 0 5px 12px; border: 0; background: transparent; color: #187c72; font: inherit; font-weight: 650; cursor: pointer; }
.dashboard-link:hover { color: #12645d; }
.dashboard-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.dashboard-kpis > div { display: flex; align-items: baseline; gap: 12px; padding: 0 20px 15px 0; }
.dashboard-kpis > div + div { padding-left: 20px; border-left: 1px solid var(--line); }
.dashboard-kpis span { color: var(--muted); font-size: 11px; }
.dashboard-kpis strong { font-size: 20px; line-height: 1; font-variant-numeric: tabular-nums; }
.dashboard-kpis .attention-number { color: #187c72; }
.dashboard-columns { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 32px; }
.dashboard-panel { min-width: 0; }
.dashboard-panel > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 0 0 11px; border-bottom: 1px solid #cfdad3; }
.dashboard-panel h3 { margin: 0; font-size: 13px; font-weight: 700; }
.dashboard-panel header p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.dashboard-count { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.dashboard-list { max-height: 385px; overflow: auto; }
.dashboard-record { width: 100%; display: grid; grid-template-columns: minmax(74px, 1.1fr) minmax(55px, .95fr) minmax(60px, .85fr) 42px; align-items: center; gap: 8px; min-height: 56px; padding: 8px 0; border: 0; border-bottom: 1px solid #e5ebe7; background: transparent; color: var(--ink); text-align: left; cursor: pointer; }
.dashboard-record:hover { background: #edf5f1; }
.dashboard-person { min-width: 0; display: grid; gap: 4px; }
.dashboard-record strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; font-weight: 650; }
.dashboard-record small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 9px; }
.dashboard-owner, .dashboard-status { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 10px; }
.dashboard-age { color: #273c31; text-align: right; font-size: 11px; font-weight: 650; font-variant-numeric: tabular-nums; }
.dashboard-empty, .dashboard-loading, .dashboard-error { padding: 20px 0; color: var(--muted); font-size: 11px; }
.dashboard-error { display: grid; gap: 10px; }
.dashboard-error strong { color: var(--ink); }
.dashboard-bottom { padding-top: 8px; border-top: 1px solid var(--line); }
.funnel-breakdown, .agent-breakdown { display: grid; gap: 12px; padding-top: 14px; }
.funnel-breakdown > div { display: grid; grid-template-columns: 90px 1fr 35px; align-items: center; gap: 12px; font-size: 10px; }
.funnel-breakdown strong, .agent-breakdown strong { text-align: right; font-size: 11px; font-variant-numeric: tabular-nums; }
.funnel-bar { height: 5px; overflow: hidden; background: #e4ebe6; }
.funnel-bar i { display: block; height: 100%; background: #4a9582; }
.agent-breakdown > div { display: flex; justify-content: space-between; gap: 14px; font-size: 10px; }
.agent-breakdown span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-notice { margin: -10px 0 0; color: var(--muted); font-size: 10px; }

@media (max-width: 850px) {
  .dashboard-columns { grid-template-columns: 1fr; gap: 20px; }
  .dashboard-kpis > div { display: grid; gap: 7px; }
}
@media (max-width: 650px) {
  .dashboard-record { grid-template-columns: minmax(110px, 1.2fr) minmax(65px, .8fr) 44px; }
  .dashboard-owner { display: none; }
  .dashboard-context { gap: 12px; }
}
