:root {
  color-scheme: light;
  --bg: #eef3ef;
  --ink: #14241c;
  --muted: #5d6d64;
  --card: #ffffff;
  --line: #d5e2da;
  --accent: #1d7a45;
  --accent-dark: #145c34;
  --danger: #b42318;
  --danger-bg: #fff1f0;
  --warn: #8a5a00;
  --warn-bg: #fff6e5;
  --ok: #0f6b3c;
  --ok-bg: #e7f6ee;
  --shadow: 0 12px 40px rgba(20, 36, 28, 0.08);
  font-family: "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1200px 500px at 50% -200px, #d9efe2, transparent 60%),
    var(--bg);
  color: var(--ink);
}

a { color: var(--accent-dark); }

.sheet {
  width: min(440px, calc(100% - 32px));
  margin: 28px auto 48px;
}

.admin-sheet {
  width: min(960px, calc(100% - 32px));
}

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

h1 {
  margin: 0 0 8px;
  font-size: 32px;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

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

.lead { margin: 0 0 22px; }

form { display: grid; gap: 16px; }

.field { display: grid; gap: 6px; font-weight: 650; }

input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 12px;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: #fbfcfb;
}

.remember {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 650;
}
.remember input {
  width: 22px;
  height: 22px;
  padding: 0;
}

textarea { min-height: 140px; resize: vertical; }

.segment { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.segment label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfcfb;
  font-weight: 650;
}

.segment input { width: auto; }

.btn {
  border: 0;
  border-radius: 14px;
  min-height: 52px;
  padding: 0 18px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.btn.primary { background: var(--accent); color: white; }
.btn.primary:hover { background: var(--accent-dark); }
.btn.danger { background: var(--danger); color: white; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn:disabled { opacity: 0.6; cursor: wait; }

.errors {
  margin: 0;
  padding: 12px 14px 12px 32px;
  border-radius: 12px;
  background: var(--danger-bg);
  color: var(--danger);
}

.progress { display: grid; gap: 6px; }
.progress > div {
  height: 8px;
  border-radius: 99px;
  background: #e4eee8;
  overflow: hidden;
}
.progress > div > span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
}
.file-pick {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfcfb;
  padding: 8px 12px;
  font-weight: 650;
  overflow: hidden;
}
.file-pick span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-pick input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.previews { display: flex; flex-wrap: wrap; gap: 8px; }
.previews img, .previews video {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: 12px;
  background: #eef3ef;
}
.previews p { margin: 0; color: var(--muted); font-size: 14px; }

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

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.filters a {
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  background: white;
  color: var(--ink);
}
.filters a.active { background: var(--ink); color: white; border-color: var(--ink); }

.review-list { display: grid; gap: 12px; }
.review-list a.item {
  display: block;
  text-decoration: none;
  color: inherit;
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
}
.review-list h2 { margin: 8px 0 4px; font-size: 20px; }
.meta { color: var(--muted); font-size: 14px; }

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 13px;
  font-weight: 700;
}
.badge.Pending { background: var(--warn-bg); color: var(--warn); }
.badge.Published { background: var(--ok-bg); color: var(--ok); }
.badge.Rejected { background: var(--danger-bg); color: var(--danger); }

.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.media-grid { display: grid; gap: 12px; }
.media-frame { display: block; }
.media-grid img, .review-list img.thumb {
  display: block;
  width: auto;
  height: auto;
  max-width: min(100%, 1024px);
  max-height: 1024px;
  object-fit: contain;
  border-radius: 16px;
  background: #111;
}
.media-grid video {
  width: 100%;
  max-height: 80vh;
  border-radius: 16px;
  background: #111;
}
.review-body { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 18px; line-height: 1.45; }
