* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "Segoe UI", Arial, sans-serif;
  background: #f3f4f6;
  color: #111827;
}

body {
  min-height: 100vh;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
  border: 1px solid #d1d5db;
  background: #ffffff;
  color: #111827;
  border-radius: 10px;
  padding: 10px 14px;
}

button.primary,
.file-button {
  background: #0f766e;
  border-color: #0f766e;
  color: #ffffff;
}

.file-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 10px;
}

.file-button input {
  display: none;
}

.app-shell {
  display: grid;
  grid-template-columns: 360px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: #111827;
  color: #f9fafb;
  padding: 20px;
  border-right: 1px solid #1f2937;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0f766e;
  font-weight: 700;
}

.brand h1,
.topbar h2 {
  margin: 0;
  font-size: 20px;
}

.brand p,
.topbar p {
  margin: 4px 0 0;
  color: #94a3b8;
}

.panel {
  background: #1f2937;
  border: 1px solid #374151;
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 16px;
}

.panel h2 {
  margin: 0 0 12px;
  font-size: 15px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.field span {
  color: #cbd5e1;
  font-size: 13px;
}

.field input,
.field select {
  width: 100%;
  background: #111827;
  color: #f9fafb;
  border: 1px solid #475569;
  border-radius: 10px;
  padding: 10px 12px;
}

.field.checkbox {
  flex-direction: row;
  align-items: center;
}

.field.checkbox input {
  width: auto;
}

.button-row {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.hint {
  margin: 0;
  color: #94a3b8;
  font-size: 12px;
  line-height: 1.5;
}

.bookmarklet-box {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #374151;
}

.bookmarklet-title {
  margin-bottom: 8px;
  color: #f9fafb;
  font-size: 13px;
  font-weight: 600;
}

.bookmarklet-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  background: #1d4ed8;
  color: #fff;
  text-decoration: none;
  font-size: 13px;
}

.stats-list {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.stats-list div {
  background: #111827;
  border: 1px solid #374151;
  border-radius: 12px;
  padding: 12px;
}

.stats-list dt {
  color: #94a3b8;
  font-size: 12px;
}

.stats-list dd {
  margin: 8px 0 0;
  font-size: 24px;
  font-weight: 700;
}

.status-box {
  margin-top: 12px;
  padding: 12px;
  border-radius: 12px;
  background: #0b1220;
  border: 1px solid #334155;
  color: #cbd5e1;
  white-space: pre-wrap;
}

.content {
  padding: 24px;
}

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

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 16px;
}

.model-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.model-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.model-name {
  margin: 0;
  font-size: 18px;
  word-break: break-word;
}

.model-meta {
  margin: 6px 0 0;
  color: #6b7280;
  font-size: 13px;
}

.pill-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
}

.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
}

.pill.free-yes {
  background: #dcfce7;
  color: #166534;
}

.pill.free-no {
  background: #fee2e2;
  color: #991b1b;
}

.pill.health-high {
  background: #dbeafe;
  color: #1d4ed8;
}

.pill.health-mid {
  background: #fef3c7;
  color: #92400e;
}

.pill.health-low {
  background: #fee2e2;
  color: #991b1b;
}

.channel-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.channel-item {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px;
  background: #f9fafb;
}

.channel-line {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.channel-name {
  font-weight: 600;
}

.channel-tags {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  background: #e5e7eb;
  color: #374151;
  font-size: 12px;
}

.empty-state {
  padding: 40px;
  text-align: center;
  border: 1px dashed #cbd5e1;
  border-radius: 16px;
  color: #6b7280;
  background: #ffffff;
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid #1f2937;
  }
}
