:root {
  --ink: #2e2f33;
  --ink-2: #44464d;
  --cloud: #f5f5f7;
  --accent: #3a8b7a;
  --accent-2: #7ad0bb;
  --sand: #d2d0cc;
  --shadow: 0 14px 50px rgba(0, 0, 0, 0.12);
  --radius: 18px;
  --radius-sm: 12px;
  --max: 1080px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Vazir', sans-serif;
  background: radial-gradient(120% 120% at 20% 20%, #eef5f2, #f9f9fc 55%);
  color: var(--ink);
  min-height: 100vh;
}

button, input, textarea, select {
  font-family: 'Vazir', sans-serif;
}

.app { max-width: var(--max); margin: 0 auto; padding: 24px 20px 80px; position: relative; }

.bg-pattern {
  position: fixed;
  inset: 0;
  background: radial-gradient(600px circle at 70% 10%, rgba(58, 139, 122, 0.08), transparent),
              radial-gradient(500px circle at 20% 60%, rgba(122, 208, 187, 0.08), transparent);
  z-index: 0;
  pointer-events: none;
}

.hero { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 28px; align-items: center; position: relative; z-index: 1; }
.hero__text h1 { margin: 8px 0 12px; font-size: clamp(26px, 4vw, 36px); }
.hero__text .lead { margin: 0 0 14px; line-height: 1.7; }
.eyebrow { letter-spacing: 0.05em; text-transform: uppercase; font-size: 12px; color: var(--ink-2); margin: 0; }
.lead { color: var(--ink-2); }
.hint { color: var(--ink-2); margin: 6px 0 0; }

.hero__cta { display: flex; gap: 12px; flex-wrap: wrap; }
.btn { border: none; border-radius: 999px; padding: 12px 20px; font-weight: 600; cursor: pointer; transition: transform 0.1s ease, box-shadow 0.2s ease; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; box-shadow: var(--shadow); }
.btn.ghost { background: transparent; border: 1px solid #d7d7dc; color: var(--ink); }

.hero__logo { display: flex; justify-content: center; }
.logo-ring { width: 190px; height: 190px; border-radius: 30% 70% 60% 40%; background: #fff; box-shadow: var(--shadow); display: grid; place-items: center; padding: 26px; }
.logo { max-width: 100%; height: auto; object-fit: contain; }

.critique-hero-card {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  align-items: center;
  gap: 18px;
  margin-top: 22px;
  padding: 20px;
  border-radius: 24px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(199, 52, 63, 0.14), rgba(242, 123, 136, 0.12)), #fff;
  border: 1px solid rgba(199, 52, 63, 0.12);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.08);
}

.critique-pills { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.critique-visual { position: relative; min-height: 180px; }
.bubble { position: absolute; border-radius: 50%; background: rgba(199, 52, 63, 0.16); filter: blur(0px); }
.bubble.big { width: 160px; height: 160px; top: 10%; right: 8%; background: rgba(199, 52, 63, 0.18); }
.bubble.mid { width: 110px; height: 110px; bottom: 10%; right: 26%; background: rgba(242, 123, 136, 0.18); }
.bubble.small { width: 72px; height: 72px; bottom: 12%; right: 6%; background: rgba(199, 52, 63, 0.24); }
.spark {
  position: absolute;
  width: 140px;
  height: 140px;
  border-radius: 30% 70% 55% 45%;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.9), rgba(255,255,255,0));
  top: 26%;
  right: 18%;
  mix-blend-mode: screen;
}

.panel { margin-top: 36px; position: relative; z-index: 1; }
.panel__header { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.pill { background: #eef5f2; color: var(--accent); border-radius: 999px; padding: 8px 14px; font-weight: 600; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chips { display: none; }

.card { background: #fff; border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); border: 1px solid #ececf0; }

.form { display: flex; flex-direction: column; gap: 16px; }
.field label { display: block; margin-bottom: 6px; font-weight: 600; }
.field input, .field textarea, .field select {
  width: 100%; border: 1px solid #d9d9df; border-radius: var(--radius-sm);
  padding: 12px 14px; font-size: 15px; font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(58, 139, 122, 0.15); }
.field textarea { resize: vertical; }

.segmented { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 6px; }
.segment { border: 1px solid #d7d7dc; border-radius: var(--radius-sm); padding: 10px; background: #fafafc; cursor: pointer; font-weight: 600; }
.segment.active { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; border-color: transparent; box-shadow: var(--shadow); }

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.actions { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; }

.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.switch input { display: none; }
.slider { width: 42px; height: 24px; background: #d1d5db; border-radius: 999px; position: relative; transition: background 0.2s; }
.slider::after { content: ""; width: 18px; height: 18px; border-radius: 50%; background: #fff; position: absolute; top: 3px; left: 3px; transition: transform 0.2s; box-shadow: 0 2px 6px rgba(0,0,0,0.2); }
.switch input:checked + .slider { background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.switch input:checked + .slider::after { transform: translateX(18px); }
.switch__label { font-weight: 600; color: var(--ink-2); }

.idea-card { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.idea-benefits { background: #f7faf9; border: 1px solid #e1ece7; border-radius: var(--radius); padding: 14px 16px; }
.idea-benefits h3 { margin: 0 0 10px; }
.idea-benefits ul { margin: 0; padding: 0 18px; color: var(--ink-2); line-height: 1.8; }

.admin-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { border: 1px solid #d7d7dc; background: #fff; border-radius: 999px; padding: 8px 12px; cursor: pointer; }
.chip.active { background: var(--ink); color: #fff; border-color: transparent; }
.admin-card { display: flex; flex-direction: column; gap: 14px; }
.admin-top { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; }
.search-box { flex: 1; }
.search-box input { width: 100%; padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid #d9d9df; }
.badge { background: #eef5f2; color: var(--accent); border-radius: 999px; padding: 6px 12px; font-weight: 700; }
.table { display: grid; gap: 10px; max-height: 420px; overflow: auto; padding-right: 4px; }
.row { border: 1px solid #ececf0; border-radius: var(--radius-sm); padding: 12px; background: #fafafa; }
.row__top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tag { background: #eef5f2; color: var(--accent); border-radius: 12px; padding: 4px 10px; font-weight: 700; font-size: 12px; }
.row__meta { color: var(--ink-2); font-size: 13px; }
.row__title { margin: 8px 0 4px; font-weight: 700; }
.row__body { margin: 0; color: var(--ink-2); line-height: 1.6; }
.row__contact { color: var(--ink); font-size: 14px; margin-top: 6px; font-weight: 600; }

.footer { max-width: var(--max); margin: 0 auto; padding: 16px 20px 32px; color: var(--ink-2); text-align: center; }
.footer__links { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.link { border: none; background: transparent; color: var(--ink); cursor: pointer; font-weight: 700; }
.muted { margin: 8px 0 0; font-size: 13px; }

#idea-panel, #admin-panel { display: none; }
#login-panel { display: none; }

.login-card { max-width: 480px; margin: 0 auto; }
#admin-error { color: #c7343f; }

@media (max-width: 720px) {
  .app { padding: 18px 16px 72px; }
  .panel { margin-top: 28px; }
  .logo-ring { width: 150px; height: 150px; padding: 20px; }
  .critique-hero-card { margin-top: 16px; }
}
