:root {
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --cta: #f97316;
  --deal: #ef4444;
  --success: #16a34a;
  --warning: #d97706;
  --bg: #f8fafc;
  --surface: #ffffff;
  --text: #1e293b;
  --muted: #475569;
  --border: #e2e8f0;
  --star: #f5a623;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Source Sans 3", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}
h1, h2, h3, .brand { font-family: Lexend, system-ui, sans-serif; }

.layout { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 1.25rem;
}
.sidebar .brand { font-size: 1.1rem; font-weight: 600; color: var(--primary); margin-bottom: 1.5rem; display: block; }
.sidebar nav a {
  display: block;
  padding: 0.5rem 0.75rem;
  color: var(--muted);
  text-decoration: none;
  border-radius: 6px;
  margin-bottom: 0.25rem;
}
.sidebar nav a:hover, .sidebar nav a.active { background: #eff6ff; color: var(--primary); }

.main { padding: 1.5rem 2rem; }
.header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.muted { color: var(--muted); font-size: 0.9rem; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.25rem;
}
.card .value { font-size: 1.75rem; font-weight: 700; font-family: Lexend, sans-serif; }
.card .label { color: var(--muted); font-size: 0.85rem; }

table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
th, td { padding: 0.65rem 0.85rem; text-align: left; border-bottom: 1px solid var(--border); font-size: 0.92rem; }
th { background: #f1f5f9; font-weight: 600; color: var(--muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.03em; }
tr:hover td { background: #f8fafc; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.chip {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
  background: #eff6ff;
  color: var(--primary);
  border: 1px solid #dbeafe;
}
.chip.status-draft { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.chip.status-active { background: #dcfce7; color: #166534; border-color: #bbf7d0; }
.chip.status-pending_review { background: #e0e7ff; color: #3730a3; border-color: #c7d2fe; }

.filters { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 1rem; align-items: end; }
.filters label { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.8rem; color: var(--muted); }
.filters select, .filters input, .btn {
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font: inherit;
}
.btn {
  background: var(--primary);
  color: white;
  border: none;
  cursor: pointer;
}
.btn:hover { background: var(--primary-hover); }
.btn-secondary { background: var(--surface); color: var(--text); border: 1px solid var(--border); }

.detail-grid { display: grid; grid-template-columns: 1fr 320px; gap: 1.5rem; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 0.75rem; }
.media-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #f1f5f9;
}
pre.json {
  background: #0f172a;
  color: #e2e8f0;
  padding: 1rem;
  border-radius: 8px;
  overflow: auto;
  font-size: 0.8rem;
  max-height: 480px;
}

.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem;
}
.login-card {
  width: 100%;
  max-width: 380px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
}
.login-card input { width: 100%; margin: 0.5rem 0 1rem; }
.error { color: var(--deal); font-size: 0.9rem; }

.pagination { display: flex; gap: 0.5rem; margin-top: 1rem; align-items: center; }