:root {
  color-scheme: light;
  --bg: #f6f1ea;
  --bg-alt: #fdf8f1;
  --ink: #1d1b16;
  --muted: #5f584f;
  --primary: #c0522d;
  --primary-dark: #9a3f21;
  --accent: #247b7b;
  --card: #ffffff;
  --stroke: #e3d8cc;
  --shadow: 0 20px 50px rgba(29, 27, 22, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Vazirmatn", "Segoe UI", Tahoma, sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
}

.background {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: -1;
}

.blob {
  position: absolute;
  width: 540px;
  height: 540px;
  border-radius: 50%;
  filter: blur(0px);
  opacity: 0.4;
  background: radial-gradient(circle, rgba(192, 82, 45, 0.45) 0%, rgba(192, 82, 45, 0) 70%);
  animation: float 12s ease-in-out infinite;
}

.blob-one {
  top: -160px;
  left: -120px;
}

.blob-two {
  bottom: -220px;
  right: -160px;
  background: radial-gradient(circle, rgba(36, 123, 123, 0.4) 0%, rgba(36, 123, 123, 0) 70%);
  animation-delay: 2s;
}

.grain {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='120' height='120' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23noise)' opacity='.07'/%3E%3C/svg%3E");
  opacity: 0.5;
  mix-blend-mode: multiply;
}

.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 20px 80px;
}

.card,
.panel {
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 32px;
  animation: rise 0.5s ease both;
}

.card-header h1,
.panel-header h2 {
  margin: 12px 0 8px;
  font-size: 28px;
}

h3 {
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 20px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 12px;
  color: var(--accent);
}

.stack {
  display: grid;
  gap: 16px;
}

.field {
  display: grid;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
}

.field input,
.field select,
.field textarea {
  padding: 12px 14px;
  border: 1px solid var(--stroke);
  border-radius: 12px;
  font-size: 15px;
  font-family: inherit;
  background: var(--bg-alt);
}

.field textarea {
  resize: vertical;
}

.field input:focus,
.field select:focus {
  outline: 2px solid rgba(36, 123, 123, 0.3);
  border-color: var(--accent);
}

.hint {
  font-size: 12px;
  color: var(--muted);
}

.btn {
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: inherit;
  cursor: pointer;
  font-size: 14px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn.primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 10px 20px rgba(192, 82, 45, 0.3);
}

.btn.primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.btn.ghost {
  background: transparent;
  border-color: var(--stroke);
  color: var(--ink);
}

.btn.ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.message {
  margin: 0;
  color: var(--primary-dark);
  font-size: 13px;
}

.panel {
  padding: 28px 32px 40px;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.panel-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chip {
  padding: 6px 12px;
  background: rgba(36, 123, 123, 0.12);
  border-radius: 999px;
  font-size: 13px;
  color: var(--accent);
}

.tabs {
  margin-top: 28px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.tab {
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: transparent;
  cursor: pointer;
  font-family: inherit;
}

.tab.active {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 10px 20px rgba(36, 123, 123, 0.25);
}

.tab-panels {
  margin-top: 24px;
}

.panel-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

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

.list-item {
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--stroke);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  background: var(--bg-alt);
  animation: rise 0.4s ease both;
}

.list-title {
  font-size: 14px;
  font-weight: 600;
}

.list-actions {
  display: flex;
  gap: 8px;
}

.cards {
  display: grid;
  gap: 16px;
}

.prompt-card {
  border: 1px solid var(--stroke);
  border-radius: 18px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 120px 1fr;
  background: var(--bg-alt);
  animation: rise 0.4s ease both;
}

.prompt-card img {
  width: 120px;
  height: 120px;
  object-fit: cover;
}

.prompt-body {
  padding: 12px 16px;
  display: grid;
  gap: 8px;
}

.prompt-title {
  font-weight: 700;
  font-size: 16px;
}

.prompt-meta {
  font-size: 13px;
  color: var(--muted);
}

.prompt-description {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}

.prompt-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.updates-card {
  max-width: 720px;
}

.updates {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 16px;
}

.updates li {
  background: var(--bg-alt);
  padding: 16px;
  border-radius: 14px;
  border: 1px solid var(--stroke);
}

.detail {
  position: fixed;
  inset: 0;
  background: rgba(29, 27, 22, 0.6);
  display: grid;
  place-items: center;
  padding: 24px;
  z-index: 10;
}

.detail-card {
  background: var(--card);
  border-radius: 20px;
  border: 1px solid var(--stroke);
  max-width: 860px;
  width: min(100%, 860px);
  display: grid;
  grid-template-columns: minmax(240px, 360px) 1fr;
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow);
  animation: rise 0.3s ease both;
}

.detail-image-wrap {
  background: var(--bg-alt);
  display: grid;
  place-items: center;
}

.detail-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-content {
  padding: 24px;
  display: grid;
  gap: 12px;
}

.detail-subtitle {
  color: var(--muted);
  margin: 0;
}

.detail-category {
  font-size: 13px;
  color: var(--accent);
}

.detail-description {
  color: var(--ink);
  line-height: 1.8;
  margin: 0;
}

.detail-close {
  position: absolute;
  top: 12px;
  left: 12px;
  border: none;
  background: rgba(29, 27, 22, 0.08);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
}

.detail-close:hover {
  background: rgba(29, 27, 22, 0.16);
}

.hidden {
  display: none;
}

.detail.hidden {
  display: none;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px) translateX(0px);
  }
  50% {
    transform: translateY(20px) translateX(12px);
  }
}

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

  .prompt-card {
    grid-template-columns: 1fr;
  }

  .prompt-card img {
    width: 100%;
    height: 180px;
  }

  .detail-card {
    grid-template-columns: 1fr;
  }

  .detail-image-wrap img {
    height: 240px;
  }
}

@media (max-width: 600px) {
  .wrap {
    padding: 24px 16px 60px;
  }

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

  .tabs {
    gap: 8px;
  }
}
