:root {
  color-scheme: light;
  --bg: #f3ede1;
  --surface: rgba(255, 252, 246, 0.82);
  --surface-strong: #fffaf2;
  --border: rgba(45, 58, 49, 0.12);
  --text: #1f261f;
  --muted: #5a665c;
  --accent: #0f766e;
  --accent-strong: #0b5f58;
  --danger: #9f1239;
  --shadow: 0 20px 60px rgba(31, 38, 31, 0.08);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.18), transparent 30%),
    linear-gradient(180deg, #f8f1e3 0%, #efe6d4 100%);
}

button,
input,
textarea {
  font: inherit;
}

.background-glow {
  position: fixed;
  width: 24rem;
  height: 24rem;
  border-radius: 999px;
  filter: blur(40px);
  opacity: 0.35;
  pointer-events: none;
}

.background-glow-left {
  top: -8rem;
  left: -8rem;
  background: rgba(15, 118, 110, 0.28);
}

.background-glow-right {
  right: -10rem;
  bottom: -8rem;
  background: rgba(250, 204, 21, 0.22);
}

.shell {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 48px 0 64px;
}

.hero,
.grid-two {
  display: grid;
  gap: 24px;
}

.hero {
  grid-template-columns: 1.3fr 0.9fr;
  align-items: start;
  margin-bottom: 24px;
}

.dashboard {
  display: grid;
  gap: 24px;
}

.page-stack {
  display: grid;
  gap: 24px;
}

.panel,
.auth-card,
.stat-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.panel,
.auth-card {
  padding: 24px;
}

.eyebrow,
.card-label {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  font-size: 0.75rem;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 12px;
  font-size: clamp(2.6rem, 7vw, 5rem);
  line-height: 0.95;
}

h2 {
  margin-bottom: 12px;
  font-size: 1.65rem;
}

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

.lead {
  max-width: 58ch;
  font-size: 1.05rem;
  line-height: 1.6;
}

.auth-actions,
.panel-header,
.stats-grid {
  display: flex;
  gap: 12px;
}

.auth-actions,
.stats-grid {
  flex-wrap: wrap;
}

.panel-header {
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

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

.stat-card {
  padding: 18px;
}

.stat-card span,
.chip {
  color: var(--muted);
  font-size: 0.92rem;
}

.stat-card strong {
  display: block;
  margin-top: 10px;
  font-size: 1.2rem;
}

.chip {
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.45);
}

.section-nav {
  display: flex;
  gap: 10px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  width: fit-content;
}

.section-tab {
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
}

.section-tab.active {
  color: #f7fffd;
  background: var(--accent);
}

button {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  cursor: pointer;
  transition: transform 140ms ease, opacity 140ms ease, background 140ms ease;
}

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

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.primary {
  color: #f7fffd;
  background: var(--accent);
}

.primary:hover {
  background: var(--accent-strong);
}

.secondary {
  color: var(--text);
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--border);
}

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

.inline-form,
.inline-actions {
  display: flex;
  gap: 12px;
  align-items: end;
  flex-wrap: wrap;
}

.inbox-toolbar {
  margin-bottom: 18px;
}

.app-filter {
  position: relative;
  display: grid;
  gap: 8px;
  max-width: 360px;
}

.compact-filter {
  display: grid;
  gap: 8px;
  min-width: 180px;
  width: fit-content;
  align-self: end;
}

.compact-filter select {
  width: auto;
  min-width: 180px;
}

.filter-button {
  justify-content: flex-start;
  text-align: left;
}

.filter-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 10;
  width: min(420px, 90vw);
  max-height: 320px;
  overflow: auto;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface-strong);
  box-shadow: var(--shadow);
  display: grid;
  gap: 8px;
}

.filter-option {
  display: flex;
  width: 100%;
  justify-content: flex-start;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--border);
}

.grow {
  flex: 1 1 320px;
}

label {
  display: grid;
  gap: 8px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 14px 16px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.7);
}

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

.grid-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stats-grid-compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 18px;
}

.user-editor {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(31, 38, 31, 0.28);
  backdrop-filter: blur(12px);
}

.modal-card {
  width: min(920px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-strong);
  box-shadow: var(--shadow);
}

.empty-state {
  margin-top: 18px;
  padding: 18px;
  border-radius: 18px;
  border: 1px dashed var(--border);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.35);
}

.list-item {
  display: grid;
  gap: 6px;
  padding: 16px;
  border-radius: 18px;
  background: var(--surface-strong);
  border: 1px solid var(--border);
}

.list-item-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.app-badge {
  display: flex;
  align-items: center;
  gap: 12px;
}

.app-badge-icon,
.app-badge-fallback {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--border);
  object-fit: cover;
  background: rgba(255, 255, 255, 0.6);
}

.app-badge-fallback {
  display: grid;
  place-items: center;
  color: var(--accent);
  font-weight: 700;
}

.list-item pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--muted);
}

.review-body {
  display: grid;
  gap: 10px;
}

.review-meta {
  display: grid;
  gap: 4px;
}

.review-author {
  color: var(--text);
  font-size: 1rem;
}

.review-date {
  color: var(--muted);
  font-size: 0.92rem;
}

.review-rating {
  color: var(--text);
  font-size: 1.45rem;
  line-height: 1;
  letter-spacing: 0.02em;
}

.review-text {
  color: var(--text) !important;
  font-weight: 700;
  font-size: 0.96rem;
  line-height: 1.55;
}

.review-reply,
.review-helper-text,
.review-error-text {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.5);
}

.review-reply {
  color: var(--text) !important;
}

.review-error-text {
  color: var(--danger) !important;
  background: rgba(159, 18, 57, 0.08);
  border: 1px solid rgba(159, 18, 57, 0.16);
}

.review-body button {
  width: fit-content;
}

.draft-editor {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.danger {
  background: var(--danger);
  color: white;
}

.hidden {
  display: none;
}

@media (max-width: 900px) {
  .hero,
  .grid-two,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .shell {
    width: min(100vw - 20px, 1180px);
    padding-top: 24px;
  }

  .modal-backdrop {
    padding: 12px;
  }

  .modal-card {
    width: 100%;
    max-height: calc(100vh - 24px);
    padding: 18px;
  }
}
