:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  background: #f5f5f7;
  color: #1d1d1f;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

.shell {
  width: min(1120px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 32px 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 28px;
  line-height: 1.2;
}

h2 {
  font-size: 18px;
  margin-bottom: 16px;
}

.topbar p,
.hint {
  color: #6e6e73;
  margin-top: 6px;
  font-size: 14px;
}

.panel,
.metrics article {
  background: #ffffff;
  border: 1px solid #d2d2d7;
  border-radius: 8px;
}

.panel {
  padding: 20px;
  margin-bottom: 16px;
}

.narrow {
  max-width: 420px;
}

form {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 6px;
  font-size: 14px;
  color: #3a3a3c;
}

input {
  width: 100%;
  min-height: 40px;
  border: 1px solid #c7c7cc;
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
  background: #ffffff;
}

button {
  border: 0;
  border-radius: 8px;
  min-height: 40px;
  padding: 0 16px;
  font: inherit;
  font-weight: 600;
  color: #ffffff;
  background: #007aff;
  cursor: pointer;
}

button.secondary {
  color: #007aff;
  background: #e9f2ff;
}

button.small {
  min-height: 32px;
  padding: 0 10px;
  font-size: 13px;
}

button:disabled {
  opacity: 0.45;
  cursor: default;
}

.hidden {
  display: none !important;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.metrics article {
  padding: 16px;
}

.metrics span {
  display: block;
  color: #6e6e73;
  font-size: 13px;
  margin-bottom: 8px;
}

.metrics strong {
  font-size: 26px;
}

.emptyState p,
.selectedCompany p {
  color: #6e6e73;
  font-size: 14px;
}

.selectedCompany {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.sectionHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.tableWrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid #e5e5ea;
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}

th {
  color: #6e6e73;
  font-weight: 600;
}

.actionGroup {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

tr.selected {
  background: #f5f9ff;
}

.emptyCell {
  color: #6e6e73;
  text-align: center;
}

.message {
  position: fixed;
  right: 16px;
  bottom: 16px;
  max-width: 360px;
  padding: 12px 14px;
  border-radius: 8px;
  color: #ffffff;
  background: #1d1d1f;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

@media (max-width: 720px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .metrics {
    grid-template-columns: 1fr;
  }
}
