:root {
  --bg: #171517;
  --panel: #1e1c1e;
  --panel-2: #1e1c1e;
  --border: #2d2b2d;
  --text: #e5e5e5;
  --muted: #9ca3af;
  --brand: #6366f1;
  --brand-2: #8b5cf6;
  --star: #fbbf24;
  --success: #10b981;
  --error: #ef4444;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", sans-serif;
  color: var(--text);
  line-height: 1.55;
  background: var(--bg);
}

img,
video,
iframe {
  max-width: 100%;
}

video {
  display: block;
}

.container {
  width: min(1160px, 94%);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background: rgba(23, 21, 23, 0.9);
  backdrop-filter: blur(10px);
}

.header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-block-auth {
  margin-bottom: 0.35rem;
}

.site-logo {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.header-actions form {
  display: inline-flex;
}

.header-actions .btn {
  min-height: 42px;
}

.eyebrow {
  color: var(--brand);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  font-size: 0.82rem;
  margin-bottom: 0.25rem;
}

h1,
h2 {
  color: #fff;
  line-height: 1.2;
}

h1 {
  font-size: 1.75rem;
}

h2 {
  font-size: 1.2rem;
  margin-bottom: 0.8rem;
}

.main-grid {
  display: grid;
  grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
  gap: 1rem;
  padding: 1.5rem 0 2.2rem;
}

.hero-panel,
.full-width {
  grid-column: 1 / -1;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.05rem;
}

.hero-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  background: var(--panel-2);
}

.hero-metric {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
}

.hero-number {
  font-size: 2.1rem;
  font-weight: 800;
  color: #fff;
}

.hero-sub {
  color: var(--muted);
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 0.84rem;
}

.form-stack {
  display: grid;
  gap: 0.75rem;
}

label {
  font-weight: 600;
  font-size: 0.95rem;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #171517;
  color: var(--text);
  font: inherit;
  padding: 0.72rem 0.8rem;
}

textarea {
  resize: vertical;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.72rem 1rem;
  border: 0;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  transition: all 0.2s;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.18);
  border: 1px solid rgba(239, 68, 68, 0.45);
  color: #fca5a5;
}

.pill {
  padding: 0.38rem 0.78rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.9rem;
}

.alert {
  border-radius: 10px;
  padding: 0.64rem 0.8rem;
  border: 1px solid;
}

.alert-error {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.32);
  color: #fca5a5;
}

.alert-success {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.32);
  color: #86efac;
}

.star-picker {
  border: 0;
  display: inline-flex;
  flex-direction: row-reverse;
  gap: 0.15rem;
}

.star-picker input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.star-picker label {
  font-size: 2rem;
  line-height: 1;
  color: #52525b;
  cursor: pointer;
  transition: color 0.15s;
}

.star-picker label:hover,
.star-picker label:hover ~ label,
.star-picker input:checked ~ label {
  color: var(--star);
}

.stars-text {
  color: var(--star);
  letter-spacing: 0.03em;
}

.review-list {
  display: grid;
  gap: 0.7rem;
}

.reviews-grid-main {
  display: grid;
  gap: 1rem;
  padding: 1.8rem 0 2.8rem;
}

.reviews-grid {
  display: grid;
  gap: 1.1rem;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
}

.review-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
}

.review-card-grid {
  min-height: 210px;
  display: flex;
  flex-direction: column;
}

.review-grid-content {
  margin-top: 0.5rem;
  line-height: 1.62;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.review-card.compact {
  margin-top: 0.6rem;
}

.review-head {
  display: flex;
  justify-content: space-between;
  gap: 0.7rem;
  align-items: flex-start;
}

.review-meta {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0.5rem 0 0.7rem;
  flex-wrap: wrap;
}

.review-editor-main {
  width: min(900px, 94%);
  margin: 0 auto;
  padding: 1.8rem 0 2.8rem;
  display: grid;
  gap: 1rem;
}

.review-editor-panel {
  padding: 1.2rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.85), rgba(15, 23, 42, 0.95));
  color: #dbeafe;
  border-radius: 999px;
  padding: 0.18rem 0.62rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.badge-purchase {
  border-color: rgba(245, 158, 11, 0.5);
  background: linear-gradient(135deg, rgba(120, 53, 15, 0.95), rgba(180, 83, 9, 0.9));
  color: #ffedd5;
  box-shadow: 0 8px 18px -12px rgba(245, 158, 11, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.badge-dot {
  width: 0.44rem;
  height: 0.44rem;
  border-radius: 50%;
  background: #fde68a;
  box-shadow: 0 0 0 3px rgba(253, 230, 138, 0.15);
}

.auth-layout {
  min-height: 100vh;
  display: grid;
  place-items: center;
}

.auth-panel {
  width: min(460px, 100%);
}

.link {
  display: inline-block;
  margin-top: 0.8rem;
  color: var(--muted);
  text-decoration: none;
}

.link:hover {
  color: #fff;
}

.admin-main {
  padding: 1.3rem 0 2.2rem;
  display: grid;
  gap: 1rem;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.stat-card strong {
  color: #fff;
  font-size: 1.5rem;
}

.table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
}

.admin-table th,
.admin-table td {
  border-bottom: 1px solid var(--border);
  padding: 0.7rem 0.55rem;
  text-align: left;
  vertical-align: top;
}

.admin-table th {
  color: #fff;
  font-size: 0.9rem;
}

.site-footer {
  position: relative;
  border-top: 1px solid var(--border);
  margin-top: 1.2rem;
  padding: 1.05rem 0 1.4rem;
  color: var(--muted);
  font-size: 0.86rem;
  text-align: center;
}

.site-footer::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 50%;
  width: 220px;
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, var(--brand), transparent);
}

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

  .admin-stats {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .header-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-logo {
    width: 30px;
    height: 30px;
  }

  h1 {
    font-size: 1.45rem;
  }

  .hero-panel {
    flex-direction: column;
    align-items: flex-start;
  }
}
