:root {
  --ink: #111215;
  --ink-soft: #3d3f45;
  --muted: #6b6f78;
  --paper: #f7f4ee;
  --surface: #ffffff;
  --accent: #ffb347;
  --accent-2: #2aa198;
  --accent-3: #e85d75;
  --line: #e5e0d8;
  --shadow: 0 18px 40px rgba(15, 17, 21, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Sora", "Space Grotesk", "Helvetica Neue", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at 20% 10%, #fff7e6 0%, #f6f1e7 45%, #efe7db 100%);
  min-height: 100vh;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26px 56px;
  position: sticky;
  top: 0;
  background: rgba(247, 244, 238, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  z-index: 10;
}

.brand {
  display: flex;
  flex-direction: column;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 20px;
}

.brand small {
  font-weight: 500;
  font-size: 12px;
  color: var(--muted);
}

nav {
  display: flex;
  gap: 18px;
  font-size: 14px;
}

nav button {
  background: none;
  border: none;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  color: var(--ink-soft);
}

nav button.active {
  color: var(--ink);
  position: relative;
}

nav button.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -10px;
  height: 2px;
  background: var(--ink);
  border-radius: 999px;
}

.range-pill.active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.show-summary-row td {
  padding: 0;
  border-bottom: none;
}

.show-summary {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  margin: 12px 0;
}

.show-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.summary-card {
  background: #fdfbf7;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  display: grid;
  gap: 8px;
}

.summary-card h4 {
  margin: 0;
  font-size: 13px;
}

.summary-list {
  display: grid;
  gap: 10px;
}

.summary-creative {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.summary-creative > div {
  min-width: 0;
}

.summary-creative strong {
  font-size: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.summary-creative small {
  color: var(--muted);
  font-size: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.summary-thumb {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  object-fit: cover;
  background: #eee;
}

.summary-metric {
  font-size: 13px;
  font-weight: 600;
}

#showsTable tr {
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

#showsTable tr:hover {
  background: #fff6e3;
  transform: translateX(2px);
}

.cpc-low {
  color: #1b7f36;
  font-weight: 700;
}

.cpc-high {
  color: #b1221a;
  font-weight: 700;
}

main {
  padding: 32px 56px 80px;
  display: grid;
  gap: 32px;
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.card {
  background: var(--surface);
  border-radius: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.card h3 {
  margin: 0 0 8px;
}

.kpi {
  font-size: 28px;
  font-weight: 700;
}

.kpi small {
  font-size: 12px;
  color: var(--muted);
}

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.section-title h2 {
  margin: 0;
  font-size: 20px;
}

.filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

input,
select,
textarea {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font-family: inherit;
  background: #fdfbf7;
  font-size: 13px;
}

button.primary {
  border: none;
  border-radius: 999px;
  padding: 10px 16px;
  background: var(--ink);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

button.secondary {
  border-radius: 999px;
  padding: 10px 16px;
  background: #fff;
  border: 1px solid var(--ink);
  font-weight: 600;
  cursor: pointer;
}

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

.table th,
.table td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
}

.table th {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
  color: var(--muted);
}

.badge {
  background: #fff1d6;
  color: #7f4f00;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}

.grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.creative {
  display: grid;
  gap: 10px;
}

.creative-media {
  width: 100%;
  border-radius: 12px;
  object-fit: cover;
  aspect-ratio: 4/5;
  background: #eee;
  display: block;
}

.creative strong {
  font-size: 14px;
}

.notice {
  padding: 10px 14px;
  border-radius: 12px;
  background: #f1f5f4;
  color: #2b3f3c;
  font-size: 13px;
}

.login-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at top left, #f7f2e7, #ece5d7 45%, #e7dfcf 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 50;
}

.login-shell {
  width: min(520px, 92vw);
  background: #fff;
  border-radius: 24px;
  display: grid;
  place-items: center;
  box-shadow: 0 24px 60px rgba(17, 18, 21, 0.18);
  border: 1px solid #ece3d3;
  padding: 40px 36px;
}

.login-panel {
  display: grid;
  align-content: center;
  gap: 20px;
  width: 100%;
}

.login-logo {
  width: 180px;
  height: auto;
  display: block;
  margin: 0 auto;
}

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

.hidden {
  display: none !important;
}

.chart {
  width: 100%;
  height: 220px;
  background: linear-gradient(135deg, #fdf9f2, #f2ece2);
  border-radius: 14px;
  border: 1px dashed #e1d8cb;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 13px;
}

.creative-meta {
  display: grid;
  gap: 6px;
}

.creative-meta small {
  color: var(--muted);
}

.creative-row {
  display: grid;
  gap: 12px;
}

@media (max-width: 900px) {
  header,
  main {
    padding: 20px;
  }
}
