:root {
  --wdts-charcoal: #231f20;
  --wdts-black: #050505;
  --wdts-red: #A32136;
  --wdts-crimson: #8f1029;
  --wdts-graphite: #3b3638;
  --wdts-steel: #6d747c;
  --wdts-line: #ded7d9;
  --wdts-mist: #f7f5f5;
  --wdts-paper: #ffffff;
  --wdts-gold: #b89042;
  --wdts-green: #2d7d59;
  --workspace: #edf2f5;
  --shadow-panel: 0 12px 30px rgba(35, 31, 32, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--workspace);
  color: var(--wdts-charcoal);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
}

button,
select,
input,
textarea {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.app-shell {
  min-height: 100vh;
  background: var(--workspace);
}

.dashboard-shell {
  background: var(--workspace);
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  display: flex;
  width: 17.5rem;
  flex-direction: column;
  border-right: 1px solid var(--wdts-line);
  background: #fff;
}

.sidebar-brand {
  margin: 1rem;
  border-radius: 6px;
  background: var(--wdts-red);
  color: #fff;
  padding: 1rem;
  box-shadow: var(--shadow-panel);
}

.sidebar-brand-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sidebar-bug {
  display: grid;
  flex: none;
  width: 3.5rem;
  height: 3.5rem;
  place-items: center;
  border-radius: 6px;
  background: #fff;
  color: var(--wdts-red);
  font-weight: 950;
}

.sidebar-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 950;
  line-height: 1.2;
}

.sidebar-date {
  margin: 0.65rem 0 0;
  font-size: 0.82rem;
  font-weight: 850;
  line-height: 1.3;
}

.sidebar-nav {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.625rem;
  padding: 0.75rem 1rem 1rem;
  overflow-y: auto;
}

.sidebar-footer {
  padding: 0 1rem 1rem;
}

.nav-item {
  display: flex;
  min-height: 3rem;
  align-items: center;
  gap: 0.75rem;
  border: 2px solid var(--wdts-charcoal);
  border-radius: 6px;
  background: #fff;
  color: var(--wdts-charcoal);
  padding: 0.625rem 0.875rem;
  font-size: 1.03rem;
  font-weight: 950;
}

.nav-item:hover,
.nav-item.active {
  border-color: var(--wdts-red);
  color: var(--wdts-red);
  box-shadow: 0 2px 9px rgba(35, 31, 32, 0.06);
}

.main-wrap {
  padding-left: 17.5rem;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--wdts-line);
  background: rgba(237, 242, 245, 0.95);
  backdrop-filter: blur(16px);
}

.topbar-inner {
  display: flex;
  min-height: 5rem;
  align-items: center;
  gap: 1.25rem;
  padding: 0.875rem 2rem;
}

.brand-mark {
  display: grid;
  width: 10.5rem;
  height: 3rem;
  place-items: center;
  border: 2px solid var(--wdts-red);
  border-radius: 6px;
  color: var(--wdts-red);
  font-weight: 950;
  letter-spacing: 0.12em;
}

.crumb {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  color: #64748b;
  font-size: 1.2rem;
  font-weight: 650;
}

.crumb strong {
  color: var(--wdts-charcoal);
  font-weight: 950;
}

.page {
  padding: 1.5rem 2rem 2.5rem;
}

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.eyebrow-icon {
  display: grid;
  width: 3rem;
  height: 3rem;
  place-items: center;
  border-radius: 6px;
  background: rgba(176, 24, 53, 0.1);
  color: var(--wdts-red);
  font-weight: 950;
}

.page h1 {
  margin: 0.65rem 0 0;
  color: var(--wdts-charcoal);
  font-size: 2rem;
  font-weight: 950;
  line-height: 1;
}

.page-subtitle {
  max-width: 68rem;
  margin: 0.65rem 0 0;
  color: #475569;
  font-size: 1.2rem;
  font-weight: 650;
  line-height: 1.45;
}

.status-line {
  margin: 0.5rem 0 1.25rem;
  color: var(--wdts-red);
  font-size: 1.1rem;
  font-weight: 950;
}

.toolbar,
.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.filter-field {
  display: grid;
  min-width: 12rem;
  gap: 0.25rem;
}

.filter-field span {
  color: #64748b;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 950;
}

.select,
.text-input,
.button,
.file-button {
  border: 1px solid var(--wdts-line);
  border-radius: 6px;
  background: #fff;
  color: var(--wdts-charcoal);
  box-shadow: 0 1px 3px rgba(35, 31, 32, 0.05);
}

.text-input,
.select {
  min-height: 3rem;
  padding: 0 0.8rem;
  font-weight: 800;
}

.button,
.file-button {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0 0.9rem;
  font-weight: 950;
  cursor: pointer;
}

.file-button input {
  display: none;
}

.button:hover,
.file-button:hover {
  border-color: var(--wdts-red);
  color: var(--wdts-red);
}

.button.primary {
  border-color: var(--wdts-red);
  background: var(--wdts-red);
  color: #fff;
}

.button.primary:hover {
  border-color: var(--wdts-crimson);
  background: var(--wdts-crimson);
  color: #fff;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.metric-card {
  min-height: 6.6rem;
  border: 1px solid var(--wdts-line);
  border-left: 7px solid var(--wdts-red);
  border-radius: 6px;
  background: #fff;
  padding: 0.82rem;
  box-shadow: 0 2px 10px rgba(35, 31, 32, 0.05);
}

.metric-card.green {
  border-left-color: var(--wdts-green);
}

.metric-card.gold {
  border-left-color: var(--wdts-gold);
}

.metric-card.slate {
  border-left-color: #64748b;
}

.metric-label {
  margin: 0;
  color: #64748b;
  text-transform: uppercase;
  font-size: 0.68rem;
  font-weight: 950;
}

.metric-value {
  margin: 0.35rem 0 0;
  color: var(--wdts-black);
  font-size: 1.9rem;
  font-weight: 950;
  line-height: 1;
}

.metric-detail {
  margin: 0.35rem 0 0;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 700;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(28rem, 1fr) minmax(28rem, 1fr) minmax(17rem, 0.74fr);
  align-items: stretch;
  gap: 0.75rem;
}

.card,
.data-panel {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--wdts-line);
  border-radius: 6px;
  background: #fff;
  box-shadow: var(--shadow-panel);
}

.card-pad {
  padding: 0.95rem;
}

.section-title {
  margin: 0 0 0.75rem;
  color: var(--wdts-charcoal);
  text-transform: uppercase;
  font-size: 0.84rem;
  font-weight: 950;
}

.country-chart {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(7.8rem, 8.4rem) minmax(17rem, 1fr);
  align-items: center;
  gap: 0.75rem;
}

.donut {
  display: grid;
  width: 7.9rem;
  height: 7.9rem;
  place-items: center;
  border-radius: 999px;
  background: conic-gradient(var(--wdts-line) 0 100%);
}

.donut-core {
  display: grid;
  width: 4.78rem;
  height: 4.78rem;
  place-items: center;
  align-content: center;
  border-radius: inherit;
  background: #fff;
  text-align: center;
  font-weight: 950;
}

.donut-core span {
  font-size: 1.18rem;
  line-height: 1;
}

.donut-core small {
  margin-top: 0.22rem;
  color: #475569;
  text-transform: uppercase;
  font-size: 0.56rem;
  font-weight: 850;
}

.small-table,
.employee-table {
  width: 100%;
  border-collapse: collapse;
}

.small-table th,
.small-table td,
.employee-table th,
.employee-table td {
  border-bottom: 1px solid #edf2f5;
  text-align: left;
  padding: 0.55rem 0.35rem;
}

.small-table th,
.employee-table th {
  color: #475569;
  text-transform: uppercase;
  font-size: 0.68rem;
  font-weight: 950;
}

.small-table td,
.employee-table td {
  font-weight: 750;
}

.bar-list {
  display: grid;
  gap: 0.45rem;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(7rem, 0.9fr) minmax(10rem, 1.5fr) 2.8rem;
  align-items: center;
  gap: 0.55rem;
  padding: 0.3rem 0;
  font-size: 0.78rem;
  font-weight: 850;
}

.bar-track {
  height: 0.55rem;
  overflow: hidden;
  border-radius: 999px;
  background: #edf2f5;
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--wdts-red);
}

.alert-list {
  display: grid;
  gap: 0.7rem;
}

.alert-item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  color: #475569;
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.35;
}

.alert-dot {
  flex: none;
  width: 0.55rem;
  height: 0.55rem;
  margin-top: 0.35rem;
  border-radius: 999px;
  background: var(--wdts-red);
}

.data-panel-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 1.75rem;
  padding: 1.8rem 0 1.3rem;
  border-bottom: 1px solid var(--wdts-line);
}

.data-panel-header h2 {
  margin: 0;
  font-size: 2.25rem;
  font-weight: 950;
  line-height: 1.08;
}

.data-panel-header p {
  margin: 0.35rem 0 0;
  color: #475569;
  font-size: 1rem;
  font-weight: 850;
}

.paste-panel {
  display: grid;
  gap: 0.65rem;
  padding: 1rem 1.75rem 0;
}

.paste-panel label {
  color: #64748b;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 950;
}

.paste-panel textarea {
  min-height: 7rem;
  resize: vertical;
  border: 1px solid var(--wdts-line);
  border-radius: 6px;
  padding: 0.85rem;
  color: var(--wdts-charcoal);
  font-weight: 750;
  line-height: 1.35;
}

.paste-panel .button {
  justify-self: start;
}

.table-scroll {
  overflow-x: auto;
  padding: 1.5rem 1.75rem 1.75rem;
}

.employee-table {
  min-width: 64rem;
}

.employee-table thead {
  background: var(--wdts-red);
  color: #fff;
}

.employee-table thead th {
  border-bottom: 0;
  color: #fff;
}

.status-badge {
  display: inline-flex;
  border-radius: 999px;
  padding: 0.32rem 0.62rem;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 950;
}

.status-badge.active {
  background: #ecfdf5;
  color: #065f46;
}

.status-badge.inactive {
  background: #f1f5f9;
  color: #475569;
}

.table-state {
  color: #64748b;
  font-size: 0.98rem;
  font-weight: 850;
}

.note-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.status-note {
  display: grid;
  gap: 0.3rem;
  min-height: 4.25rem;
  border-radius: 6px;
  padding: 0.85rem 1rem;
  font-size: 0.9rem;
  font-weight: 850;
  line-height: 1.35;
}

.status-note strong {
  font-size: 0.95rem;
  font-weight: 950;
}

.status-note-ok {
  border: 1px solid #86efac;
  background: #ecfdf5;
  color: #065f46;
}

.status-note-warning {
  border: 1px solid #fcd34d;
  background: #fffbeb;
  color: #713f12;
}

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

  .dashboard-grid,
  .note-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 920px) {
  .sidebar {
    position: static;
    width: 100%;
    border-right: 0;
    border-bottom: 1px solid var(--wdts-line);
  }

  .sidebar-nav {
    flex-direction: row;
    overflow-x: auto;
  }

  .nav-item {
    flex: none;
  }

  .main-wrap {
    padding-left: 0;
  }

  .topbar {
    display: none;
  }

  .page {
    padding: 1rem;
  }

  .page-header,
  .data-panel-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .metric-grid,
  .country-chart {
    grid-template-columns: 1fr;
  }
}
