:root {
  --bg: #f4f6f8;
  --panel: #ffffff;
  --text: #162033;
  --muted: #617086;
  --line: #d8dee7;
  --accent: #006f91;
  --accent-dark: #00536d;
  --active: #137333;
  --danger: #a63232;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5;
}

.app-shell {
  width: min(1440px, calc(100% - 32px));
  margin: 24px auto;
}

.toolbar,
.filters,
.status-bar,
.pagination {
  background: var(--panel);
  border: 1px solid var(--line);
}

.toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: 22px;
  border-radius: 8px 8px 0 0;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.1;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input,
select,
button {
  min-height: 42px;
  border-radius: 6px;
  font: inherit;
}

input,
select {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  padding: 8px 10px;
}

input:focus,
select:focus {
  border-color: var(--accent);
  outline: 3px solid rgba(0, 111, 145, 0.18);
}

button {
  border: 0;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  padding: 0 16px;
}

button:hover:not(:disabled) {
  background: var(--accent-dark);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.filters {
  display: grid;
  grid-template-columns: repeat(6, minmax(140px, 1fr)) auto;
  gap: 14px;
  align-items: end;
  padding: 18px 22px;
  border-top: 0;
}

.status-bar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 12px 22px;
  border-top: 0;
  color: var(--muted);
}

#clearBtn,
.pagination button {
  min-height: 36px;
  background: #eef3f6;
  color: var(--text);
  border: 1px solid var(--line);
}

#clearBtn:hover:not(:disabled),
.pagination button:hover:not(:disabled) {
  background: #dfe8ee;
}

.table-wrap {
  overflow-x: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-top: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
}

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #edf2f5;
  color: #334155;
  font-size: 13px;
}

tbody tr:hover {
  background: #f8fafc;
}

.company-name {
  color: var(--accent-dark);
  font-weight: 700;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  background: #e7f4ec;
  color: var(--active);
  font-size: 12px;
  font-weight: 700;
  padding: 2px 9px;
  text-transform: capitalize;
}

.empty-row td {
  color: var(--muted);
  padding: 32px 14px;
  text-align: center;
}

.error {
  color: var(--danger);
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 14px 22px;
  border-top: 0;
  border-radius: 0 0 8px 8px;
}

@media (max-width: 1100px) {
  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .filters {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }
}

@media (max-width: 640px) {
  .app-shell {
    width: min(100% - 20px, 1440px);
    margin: 10px auto;
  }

  .toolbar,
  .filters,
  .status-bar,
  .pagination {
    padding: 14px;
  }

  .filters,
  .status-bar {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }
}
