:root {
  color-scheme: dark;
  --bg: #0b1020;
  --panel: #151d31;
  --panel-2: #1a2440;
  --text: #f5f7ff;
  --muted: #9ca8c7;
  --accent: #7b4dff;
  --accent-2: #9b7bff;
  --green: #31d06d;
  --danger: #ff5c7a;
  --line: rgba(255, 255, 255, 0.08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top, #1d2750 0, var(--bg) 46%);
  color: var(--text);
  font: 14px/1.45 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.app {
  width: min(480px, 100%);
  margin: 0 auto;
  padding: 14px 12px 28px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 4px 12px;
}

.eyebrow {
  margin: 0 0 2px;
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 700;
}

h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: 24px; }
h2 { margin-bottom: 0; font-size: 16px; }

.icon-btn, .tab, button {
  border: 0;
  color: var(--text);
  background: var(--panel-2);
  border-radius: 8px;
  min-height: 38px;
  padding: 0 14px;
  font-weight: 700;
}

.icon-btn {
  width: 40px;
  padding: 0;
  font-size: 19px;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 12px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 10px;
}

.tab {
  min-height: 34px;
  padding: 0 6px;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
}

.tab.active {
  color: white;
  background: linear-gradient(135deg, var(--accent), #5330c9);
}

.view { display: none; }
.view.active { display: block; }

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 12px 2px 10px;
  color: var(--muted);
}

.list {
  display: grid;
  gap: 8px;
}

.card {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 10px;
  min-height: 86px;
  padding: 8px;
  background: rgba(21, 29, 49, 0.92);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.card.no-image {
  grid-template-columns: 1fr;
}

.thumb {
  width: 76px;
  height: 76px;
  object-fit: cover;
  border-radius: 6px;
  background: #0e1426;
}

.card h3 {
  margin: 0 0 4px;
  font-size: 14px;
}

.card p {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 12px;
}

.meta {
  color: var(--accent-2);
  font-size: 12px;
}

.row-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
}

.switch {
  width: 46px;
  height: 26px;
  border-radius: 99px;
  background: var(--green);
  position: relative;
  flex: none;
}

.switch::after {
  content: "";
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: white;
  position: absolute;
  right: 3px;
  top: 3px;
}

.primary {
  background: linear-gradient(135deg, var(--accent), #5330c9);
}

.danger {
  background: rgba(255, 92, 122, 0.14);
  color: #ff9aaa;
}

.searchbox {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin: 12px 0;
}

input {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  border-radius: 8px;
  padding: 0 12px;
}

.panel, .empty {
  padding: 14px;
  color: var(--muted);
  background: rgba(21, 29, 49, 0.92);
  border: 1px solid var(--line);
  border-radius: 8px;
}

code {
  color: var(--accent-2);
}
