:root {
  --bg: #fff;
  --panel: #fff;
  --ink: #000;
  --muted: #000;
  --line: #000;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, Arial, Helvetica, sans-serif;
}

button,
input,
select {
  color: #000;
  font: inherit;
}

button {
  min-height: 40px;
  border: 1.5px solid #000;
  border-radius: 6px;
  background: #000;
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  padding: 0 16px;
}

button:hover {
  background: #fff;
  color: #000;
}

button:disabled {
  cursor: wait;
  opacity: 0.65;
}

select,
input {
  min-height: 40px;
  width: 100%;
  border: 1.5px solid #000;
  border-radius: 6px;
  background: #fff;
  padding: 0 10px;
}

label {
  display: grid;
  font-size: 12px;
  font-weight: 700;
  gap: 6px;
  letter-spacing: 0;
}

.hidden {
  display: none !important;
}

.eyebrow,
.muted {
  color: #000;
  margin: 0;
}

.eyebrow {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.muted {
  margin-top: 8px;
}

.login-shell {
  align-items: center;
  display: flex;
  min-height: 100vh;
  justify-content: center;
  padding: 32px;
}

.login-panel {
  background: #fff;
  border: 2px solid #000;
  border-radius: 12px;
  box-shadow: 10px 10px 0 #000;
  display: grid;
  gap: 28px;
  max-width: 500px;
  padding: 36px;
  width: 100%;
}

.login-panel h1,
.topbar h1 {
  font-size: 24px;
  line-height: 1.15;
  margin: 0;
}

.login-form {
  display: grid;
  gap: 16px;
}

.login-status {
  min-height: 18px;
  font-size: 12px;
  font-weight: 700;
}

.app-shell {
  min-height: 100vh;
  padding: 8px;
}

.topbar {
  align-items: center;
  border: 2px solid #000;
  border-radius: 12px;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 8px 10px;
}

.topbar-actions {
  align-items: center;
  display: flex;
  gap: 10px;
}

.pill {
  border: 1.5px solid #000;
  border-radius: 999px;
  color: #000;
  font-size: 12px;
  font-weight: 800;
  padding: 9px 13px;
}

.ghost-button {
  background: #fff;
  color: #000;
}

.ghost-button:hover {
  background: #000;
  color: #fff;
}

.menu-link {
  align-items: center;
  border: 1.5px solid #000;
  border-radius: 999px;
  color: #000;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  min-height: 34px;
  padding: 0 12px;
  text-decoration: none;
}

.menu-link:hover {
  background: #000;
  color: #fff;
}

.controls-band {
  align-items: end;
  background: #fff;
  border: 2px solid #000;
  border-radius: 12px;
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  margin-top: 8px;
  padding: 8px;
}

.metrics-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  margin: 8px 0;
}

.metrics-grid article,
.summary-grid article {
  background: #fff;
  border: 2px solid #000;
  border-radius: 10px;
  padding: 8px;
}

.metrics-grid span {
  display: block;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 4px;
}

.metrics-grid strong {
  font-size: 22px;
  line-height: 1;
}

.summary-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 10px;
}

.section-title {
  border-bottom: 2px solid #000;
  font-size: 13px;
  font-weight: 800;
  margin: -16px -16px 12px;
  padding: 12px 16px;
  text-transform: uppercase;
}

.mini-table-wrap {
  max-height: 190px;
  overflow: auto;
}

.sheet-wrap {
  background: #fff;
  border: 2px solid #000;
  border-radius: 12px;
  height: calc(100vh - 300px);
  min-height: 360px;
  overflow: auto;
  position: relative;
}

.sheet-status {
  background: #fff;
  border-bottom: 2px solid #000;
  color: #000;
  font-size: 12px;
  font-weight: 800;
  left: 0;
  padding: 10px 12px;
  position: sticky;
  top: 0;
  z-index: 3;
}

table {
  border-collapse: separate;
  border-spacing: 0;
  min-width: 1450px;
  width: 100%;
}

.mini-table {
  min-width: 720px;
}

th,
td {
  border-bottom: 1px solid #000;
  border-right: 1px solid #000;
  font-size: 13px;
  max-width: 260px;
  overflow: hidden;
  padding: 8px 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

th {
  background: #fff;
  color: #000;
  font-size: 12px;
  font-weight: 900;
  position: sticky;
  text-align: left;
  top: 37px;
  z-index: 2;
}

.mini-table th {
  top: 0;
}

td:first-child,
th:first-child {
  left: 0;
  position: sticky;
  z-index: 1;
}

th:first-child {
  z-index: 4;
}

td:first-child {
  background: #fff;
}

.status-select {
  min-width: 145px;
}

.comment-input {
  min-width: 260px;
}

td:nth-child(12),
th:nth-child(12) {
  background: #fff;
  position: sticky;
  right: 300px;
  z-index: 2;
}

td:nth-child(13),
th:nth-child(13) {
  background: #fff;
  position: sticky;
  right: 0;
  z-index: 2;
  min-width: 300px;
}

th:nth-child(12),
th:nth-child(13) {
  z-index: 5;
}

.pagination-bar {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  font-size: 12px;
  font-weight: 800;
  padding-top: 8px;
}

.city-dashboard .summary-grid {
  grid-template-columns: 1fr;
}

.city-dashboard .mini-table-wrap {
  max-height: 430px;
}

.city-dashboard .sheet-wrap {
  display: none;
}

@media (max-width: 1200px) {
  .controls-band,
  .metrics-grid,
  .summary-grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .sheet-wrap {
    height: 58vh;
  }
}
