:root {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #eef7ff;
  background: #061828;
  font-synthesis: none;
  --page: #071b2c;
  --panel: #0c2a42;
  --panel-strong: #0a2338;
  --panel-soft: #123852;
  --line: rgba(76, 202, 236, 0.78);
  --line-soft: rgba(76, 202, 236, 0.22);
  --text: #eef7ff;
  --muted: #9cb3c6;
  --faint: #6f8799;
  --green: #00dc78;
  --yellow: #ffd95c;
  --red: #ff516f;
  --violet: #9277ff;
  --shadow: 0 14px 28px rgba(0, 0, 0, 0.42);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% -10%, rgba(24, 157, 193, 0.22), transparent 28rem),
    linear-gradient(180deg, #09243a 0%, var(--page) 48%, #051421 100%);
}
button, input { font: inherit; }
a { color: inherit; }

.dashboard {
  width: min(1440px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 8px;
}

.topbar,
.panel,
.metric {
  background: linear-gradient(180deg, var(--panel) 0%, var(--panel-strong) 100%);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 104px;
  padding: 18px 22px;
  border-bottom: 4px solid var(--line);
}

.eyebrow {
  margin: 0 0 6px;
  color: #2f82ff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1, h2, p { margin-top: 0; }
h1 {
  margin-bottom: 6px;
  font-size: clamp(26px, 3vw, 42px);
  line-height: 1.02;
  font-weight: 850;
  color: var(--text);
  letter-spacing: 0;
}
h2 {
  margin-bottom: 4px;
  font-size: 13px;
  line-height: 1.2;
  font-weight: 850;
  color: var(--text);
  text-transform: uppercase;
}
.subtitle,
.panel__header p {
  max-width: 720px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.refresh-button {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  cursor: pointer;
}
.refresh-button:hover { border-color: var(--line); color: var(--yellow); }
.refresh-button:disabled { opacity: 0.55; cursor: wait; }

.status-message {
  min-height: 25px;
  margin: 8px 0;
  color: var(--muted);
  font-size: 13px;
}
.status-message--error {
  color: var(--red);
  font-weight: 750;
}

.warnings {
  margin: 0 0 8px;
  border-left: 3px solid var(--yellow);
  border-radius: 6px;
  background: rgba(255, 217, 92, 0.1);
  padding: 10px 12px;
  color: #ffe38a;
  font-size: 13px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 8px;
}

.metric {
  min-height: 150px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-bottom: 3px solid var(--line);
}
.metric__label {
  color: var(--text);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}
.metric__value {
  color: var(--green);
  font-size: clamp(42px, 5vw, 64px);
  line-height: 0.95;
  font-weight: 850;
  letter-spacing: 0;
}
.metric__value--small {
  color: var(--text);
  font-size: clamp(22px, 2.4vw, 32px);
  line-height: 1.1;
}
.metric__hint {
  color: var(--muted);
  font-size: 13px;
}
.metric--tasks .metric__value { color: var(--red); }
.metric--employees .metric__value { color: var(--violet); }
.metric--scope .metric__value { color: var(--yellow); }

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(360px, 0.85fr);
  gap: 8px;
  align-items: start;
}

.panel {
  min-width: 0;
  overflow: hidden;
  border-bottom: 4px solid var(--line);
}
.panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
  padding: 14px 16px;
  background: rgba(5, 18, 30, 0.3);
  border-bottom: 1px solid var(--line-soft);
}

.search-field input {
  width: min(330px, 34vw);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 10px 12px;
  outline: none;
  background: rgba(0, 0, 0, 0.18);
  color: var(--text);
}
.search-field input::placeholder { color: var(--faint); }
.search-field input:focus {
  border-color: var(--line);
  box-shadow: 0 0 0 3px rgba(76, 202, 236, 0.13);
}

.table-wrap {
  overflow: auto;
  max-height: calc(100vh - 318px);
  min-height: 480px;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  text-align: left;
  vertical-align: middle;
}
th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #082033;
  color: #c9d9e8;
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}
tr:hover td { background: rgba(76, 202, 236, 0.06); }
.number-cell {
  text-align: right;
  white-space: nowrap;
}
.deal-link {
  color: var(--text);
  font-weight: 780;
  text-decoration: none;
}
.deal-link:hover {
  color: var(--yellow);
  text-decoration: underline;
}
.deal-meta {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}
.badge {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  border-radius: 4px;
  padding: 4px 7px;
  background: rgba(255, 81, 111, 0.12);
  color: var(--red);
  font-weight: 850;
}

.employees-list {
  max-height: calc(100vh - 318px);
  min-height: 480px;
  overflow: auto;
}
.employee-card {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.employee-card:last-child { border-bottom: 0; }
.employee-card summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px;
  cursor: pointer;
  list-style: none;
}
.employee-card summary::-webkit-details-marker { display: none; }
.employee-card__identity {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
}
.employee-card__identity strong,
.employee-card__identity small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.employee-card__identity small,
.employee-card__result small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}
.employee-card__result {
  text-align: right;
  white-space: nowrap;
}
.employee-card__result strong {
  color: var(--red);
  font-size: 18px;
}
.avatar {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #66d9f4;
  color: #083047;
  font-size: 12px;
  font-weight: 900;
}
.task-list {
  padding: 0 14px 12px 60px;
}
.task-item {
  padding: 9px 0;
  border-top: 1px dashed rgba(255, 255, 255, 0.14);
  font-size: 12px;
}
.task-item a {
  color: var(--text);
  font-weight: 780;
  text-decoration: none;
}
.task-item a:hover { color: var(--yellow); }
.task-item small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.empty-state {
  padding: 40px 18px;
  color: var(--muted);
  text-align: center;
}
.dashboard__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 2px 0;
  color: var(--muted);
  font-size: 11px;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 1080px) {
  .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .content-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .dashboard { padding: 6px; }
  .topbar,
  .panel__header,
  .dashboard__footer {
    align-items: flex-start;
    flex-direction: column;
  }
  .refresh-button { align-self: flex-end; margin-top: -46px; }
  .summary-grid { grid-template-columns: 1fr; }
  .metric { min-height: 118px; }
  .search-field,
  .search-field input { width: 100%; }
  .table-wrap,
  .employees-list { max-height: none; min-height: 0; }
  th:nth-child(3),
  td:nth-child(3),
  th:nth-child(5),
  td:nth-child(5) { display: none; }
}
