* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  overflow-x: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #f4f5f7;
  color: #1f2733;
}

.app-shell {
  max-width: 1080px;
  margin: 0 auto;
  padding: 24px;
}

.app-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  justify-content: space-between;
  margin-bottom: 20px;
}

.app-header h1 {
  font-size: 20px;
  margin: 0;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.tab-button {
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  background: #e6e8ec;
  cursor: pointer;
  font-size: 14px;
}

.tab-button.active {
  background: #2f6fed;
  color: white;
}

.card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  margin-bottom: 16px;
}

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

th,
td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid #eef0f3;
}

th {
  color: #67707d;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
}

.filters {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
}

input,
select {
  padding: 6px 8px;
  border: 1px solid #d7dbe0;
  border-radius: 6px;
  font-size: 14px;
}

button {
  font-family: inherit;
}

button.primary {
  background: #2f6fed;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 8px 14px;
  cursor: pointer;
  font-size: 14px;
}

button.danger {
  background: #e5484d;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 13px;
}

.status-badge {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.status-open {
  background: #fff4d6;
  color: #a06a00;
}

.status-closed {
  background: #dcf6e3;
  color: #16794f;
}

.status-flagged {
  background: #fde2e1;
  color: #b3261e;
}

.tier-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 6px;
}

.muted {
  color: #8892a0;
  font-size: 13px;
}

.error-banner {
  background: #fde2e1;
  color: #b3261e;
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 14px;
}

@media (max-width: 640px) {
  .app-shell {
    padding: 12px;
  }

  .card {
    padding: 14px;
  }

  .tab-button {
    padding: 8px 12px;
    font-size: 13px;
  }

  table {
    font-size: 13px;
  }

  th,
  td {
    padding: 6px 8px;
  }
}
