:root {
  --bg: #081410;
  --bg-soft: #10231d;
  --panel: rgba(16, 35, 29, 0.88);
  --line: rgba(132, 201, 152, 0.16);
  --line-strong: rgba(132, 201, 152, 0.3);
  --text: #f2fbf5;
  --muted: #adcab8;
  --accent: #64d98b;
  --accent-alt: #ffb86b;
  --danger: #ff8b8b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(100, 217, 139, 0.18), transparent 26%),
    radial-gradient(circle at right top, rgba(255, 184, 107, 0.12), transparent 24%),
    linear-gradient(180deg, #0d1d18 0%, var(--bg) 100%);
}

.backdrop {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(circle at center, black 50%, transparent 92%);
}

.page {
  position: relative;
  z-index: 1;
  max-width: 1400px;
  margin: 0 auto;
  padding: 28px 18px 60px;
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 12px;
}

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

h1 {
  font-size: clamp(30px, 4vw, 54px);
  line-height: 1.02;
  margin-bottom: 10px;
}

.subtitle {
  max-width: 780px;
  color: var(--muted);
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.card {
  background: linear-gradient(145deg, rgba(17, 37, 31, 0.95), rgba(10, 21, 18, 0.96));
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.24);
}

.toolbar,
.overview,
.explorer-grid,
.detail-grid,
.drafts-panel {
  margin-top: 20px;
}

.toolbar {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  padding: 16px;
  align-items: end;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field-action {
  justify-content: flex-end;
}

label,
.stat-card span,
.entity-type,
.copy-card span,
.metric-card span {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

select,
input,
button,
.editor-textarea,
.link-button {
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  padding: 12px 14px;
  font: inherit;
}

select,
input,
.editor-textarea {
  background: rgba(4, 10, 8, 0.45);
  color: var(--text);
}

.editor-textarea {
  min-height: 108px;
  resize: vertical;
}

.primary-button,
.link-button {
  text-decoration: none;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  font-weight: 800;
}

.primary-button {
  background: linear-gradient(90deg, var(--accent), #3ac274);
  border: none;
  color: #05100c;
  cursor: pointer;
}

.link-button {
  background: rgba(4, 10, 8, 0.4);
  color: var(--text);
}

.overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.stat-card {
  padding: 18px;
}

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

.explorer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1.6fr 0.8fr;
  gap: 16px;
}

.panel {
  padding: 18px;
}

.panel-head,
.entity-meta,
.detail-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  background: rgba(100, 217, 139, 0.15);
  color: var(--accent);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.editor-mode-switch,
.editor-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.editor-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 14px;
}

.mode-button {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  cursor: pointer;
}

.mode-button.is-active {
  border-color: rgba(100, 217, 139, 0.42);
  background: rgba(100, 217, 139, 0.08);
}

.editor-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.editor-field-grid .field-wide {
  grid-column: 1 / -1;
}

.feedback-card,
.draft-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.03);
}

.feedback-card strong,
.draft-card strong {
  display: block;
  margin-bottom: 8px;
}

.feedback-list,
.draft-meta,
.diff-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.diff-item {
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.diff-item:first-child {
  border-top: none;
  padding-top: 0;
}

.severity {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
}

.severity-baixo {
  background: rgba(100, 217, 139, 0.15);
  color: var(--accent);
}

.severity-medio {
  background: rgba(255, 184, 107, 0.16);
  color: var(--accent-alt);
}

.severity-alto {
  background: rgba(255, 139, 139, 0.16);
  color: var(--danger);
}

.entity-card {
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  padding: 14px;
  cursor: pointer;
}

.entity-card.is-active {
  border-color: rgba(100, 217, 139, 0.42);
  box-shadow: inset 0 0 0 1px rgba(100, 217, 139, 0.26);
  background: rgba(100, 217, 139, 0.08);
}

.entity-card strong,
.entity-card small {
  display: block;
}

.entity-card small,
.empty,
.detail-empty,
.preview-empty,
.note-card p,
.copy-card p,
.creative-card p {
  color: var(--muted);
}

.entity-meta {
  margin-top: 12px;
  font-size: 12px;
  color: var(--muted);
  flex-wrap: wrap;
}

.metric-grid,
.copy-grid {
  display: grid;
  gap: 12px;
}

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

.metric-card,
.copy-card,
.note-card,
.creative-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.03);
}

.metric-card strong {
  display: block;
  margin-top: 8px;
  font-size: 22px;
}

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

.copy-card-wide {
  grid-column: 1 / -1;
}

.detail-content {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.detail-block h3 {
  margin-bottom: 12px;
}

.creative-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 16px;
}

.creative-preview {
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  min-height: 260px;
  background: rgba(255, 255, 255, 0.02);
  display: flex;
  align-items: center;
  justify-content: center;
}

.creative-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-strip {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.preview-thumb {
  width: 88px;
  height: 88px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
}

.preview-thumb.is-active {
  border-color: rgba(100, 217, 139, 0.42);
  box-shadow: inset 0 0 0 1px rgba(100, 217, 139, 0.26);
}

.preview-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 1100px) {
  .explorer-grid,
  .detail-grid,
  .overview,
  .toolbar,
  .metric-grid,
  .copy-grid,
  .creative-layout,
  .editor-field-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    flex-direction: column;
  }
}
