:root {
  color-scheme: light;
  --ink: #1a1d24;
  --muted: #677084;
  --line: #dce2ea;
  --panel: #ffffff;
  --soft: #f3f6f8;
  --nav: #10141c;
  --green: #18a058;
  --teal: #0e8c86;
  --gold: #f2b84b;
  --coral: #df6b57;
  --blue: #3977d4;
  --shadow: 0 18px 55px rgba(28, 34, 45, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(24, 160, 88, 0.07), transparent 38%),
    linear-gradient(180deg, #f8fafb, #eef3f6);
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
}

.sidebar {
  color: #f5f7fb;
  background:
    linear-gradient(180deg, rgba(24, 160, 88, 0.22), transparent 28%),
    var(--nav);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand-lockup {
  display: flex;
  gap: 12px;
  align-items: center;
}

.brand-lockup strong,
.brand-lockup small {
  display: block;
}

.brand-lockup small,
.usage-card p {
  color: #aab4c3;
}

.brand-logo {
  width: 42px;
  height: 42px;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.brand-mark {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.brand-mark span {
  border-radius: 3px;
  background: var(--green);
}

.brand-mark span:nth-child(2) {
  background: var(--gold);
  transform: translateY(6px);
}

.brand-mark span:nth-child(3) {
  background: var(--coral);
  transform: translateY(12px);
}

.nav-list {
  display: grid;
  gap: 8px;
}

.nav-item {
  width: 100%;
  border: 0;
  color: #cbd3df;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 8px;
  text-align: left;
}

.nav-item.active,
.nav-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.nav-icon {
  color: #11151d;
  background: #fff;
  min-width: 32px;
  height: 28px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  font-size: 0.78rem;
  font-weight: 800;
}

.usage-card {
  margin-top: auto;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.07);
}

.mini-label,
.eyebrow {
  margin: 0 0 7px;
  color: var(--green);
  text-transform: uppercase;
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0;
}

.usage-topline {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.usage-topline strong {
  font-size: 2rem;
}

.meter {
  height: 9px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.16);
  overflow: hidden;
  margin: 12px 0;
}

.meter span {
  display: block;
  width: 62%;
  height: 100%;
  background: linear-gradient(90deg, var(--green), var(--gold));
}

.workspace {
  min-width: 0;
  padding: 28px;
}

.topbar,
.panel-heading,
.status-row,
.topbar-actions,
.form-row,
.channel-row,
.release-preview {
  display: flex;
  align-items: center;
}

.topbar {
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

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

h1 {
  font-size: clamp(1.8rem, 3vw, 3.2rem);
  line-height: 1;
  margin-bottom: 0;
}

h2 {
  font-size: clamp(1.7rem, 3vw, 2.8rem);
  line-height: 1.03;
  max-width: 860px;
}

h3 {
  margin-bottom: 0;
}

.topbar-actions {
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.primary-action,
.ghost-action,
.icon-button {
  border: 0;
  border-radius: 8px;
  min-height: 42px;
}

.primary-action {
  color: #fff;
  background: var(--ink);
  padding: 0 18px;
  font-weight: 800;
}

.primary-action:hover {
  background: #303846;
}

.primary-action.wide {
  width: 100%;
}

.ghost-action {
  background: var(--soft);
  color: var(--ink);
  padding: 0 14px;
  font-weight: 800;
}

.icon-button {
  width: 44px;
  display: grid;
  place-items: center;
  background: #fff;
  border: 1px solid var(--line);
}

.icon-stack,
.icon-stack::before,
.icon-stack::after {
  width: 18px;
  height: 3px;
  border-radius: 99px;
  background: var(--green);
  display: block;
  content: "";
}

.icon-stack::before {
  transform: translateY(-7px);
  background: var(--gold);
}

.icon-stack::after {
  transform: translateY(4px);
  background: var(--coral);
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.hero-band {
  min-height: 345px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  gap: 28px;
  align-items: stretch;
  margin-bottom: 18px;
}

.hero-copy {
  color: #fff;
  padding: 34px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(14, 140, 134, 0.86), rgba(26, 29, 36, 0.96)),
    #172033;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-copy h2,
.hero-copy p {
  max-width: 760px;
}

.hero-copy p {
  color: #d7e7e4;
  font-size: 1.05rem;
}

.status-row {
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.status-pill,
.chip,
.score-badge {
  border-radius: 99px;
  padding: 7px 10px;
  font-size: 0.8rem;
  font-weight: 800;
}

.status-pill {
  background: rgba(255, 255, 255, 0.12);
}

.status-pill.live,
.chip.approved {
  color: #07351f;
  background: #9cf1c3;
}

.flow-art {
  position: relative;
  border-radius: 8px;
  padding: 20px;
  background:
    repeating-linear-gradient(90deg, rgba(26, 29, 36, 0.05) 0 1px, transparent 1px 42px),
    repeating-linear-gradient(0deg, rgba(26, 29, 36, 0.05) 0 1px, transparent 1px 42px),
    #ffffff;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.flow-art::before {
  content: "";
  position: absolute;
  inset: 46px 64px;
  border: 2px dashed rgba(24, 160, 88, 0.32);
  border-radius: 8px;
}

.flow-node {
  position: absolute;
  min-width: 132px;
  min-height: 58px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 12px 28px rgba(22, 29, 39, 0.12);
  display: grid;
  place-items: center;
  text-align: center;
  font-weight: 900;
}

.flow-node::after {
  content: "";
  width: 28px;
  height: 4px;
  border-radius: 99px;
  background: var(--green);
  position: absolute;
  bottom: -14px;
}

.flow-node.user {
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
}

.flow-node.brain {
  top: 112px;
  left: 30px;
}

.flow-node.creative {
  top: 112px;
  right: 30px;
}

.flow-node.qc {
  bottom: 72px;
  left: 50%;
  transform: translateX(-50%);
}

.flow-node.publish {
  bottom: 18px;
  right: 36px;
  background: #172033;
  color: #fff;
}

.metrics-grid,
.dashboard-grid,
.dossier-grid,
.scheduler-layout,
.admin-grid {
  display: grid;
  gap: 18px;
}

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

.metric,
.panel,
.profile-card,
.memory-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(28, 34, 45, 0.06);
}

.metric {
  padding: 18px;
}

.metric span,
.metric small {
  display: block;
  color: var(--muted);
}

.metric strong {
  display: block;
  font-size: 2.2rem;
  line-height: 1;
  margin: 10px 0 8px;
}

.dashboard-grid {
  grid-template-columns: minmax(320px, 0.9fr) minmax(360px, 1.1fr);
  align-items: start;
}

.panel {
  padding: 20px;
}

.intake-panel,
.qc-panel {
  grid-row: span 2;
}

.panel-heading {
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.chip {
  color: #4b3510;
  background: #fff1c9;
}

.score-badge {
  color: #07351f;
  background: #c9f7da;
}

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

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 800;
  font-size: 0.86rem;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  color: var(--ink);
  background: #fff;
}

textarea {
  resize: vertical;
}

.form-row {
  gap: 12px;
  align-items: stretch;
}

.form-row label {
  flex: 1;
  min-width: 0;
}

.agent-list,
.qc-list {
  display: grid;
  gap: 12px;
}

.agent-row,
.qc-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  display: grid;
  gap: 10px;
  background: #fbfcfd;
}

.agent-row header,
.qc-row header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.agent-row strong,
.qc-row strong {
  font-size: 0.95rem;
}

.agent-row p,
.qc-row p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.progress {
  height: 7px;
  border-radius: 99px;
  overflow: hidden;
  background: #e8edf2;
}

.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
}

.prompt-panel {
  background: #172033;
  color: #fff;
}

.prompt-panel .eyebrow {
  color: #9cf1c3;
}

pre {
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
  color: #dbe6ee;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 16px;
  max-height: 340px;
  overflow: auto;
}

.section-heading {
  margin: 20px 0;
}

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

.profile-card,
.memory-card {
  padding: 22px;
}

.profile-card.selected {
  border-color: rgba(24, 160, 88, 0.55);
  box-shadow: 0 0 0 4px rgba(24, 160, 88, 0.09);
}

.avatar-art {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(242, 184, 75, 0.8), rgba(223, 107, 87, 0.12)),
    linear-gradient(180deg, #16202b, #354255);
  position: relative;
  overflow: hidden;
  margin-bottom: 18px;
}

.avatar-art span {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 118px;
  height: 156px;
  transform: translateX(-50%);
  border-radius: 60px 60px 0 0;
  background: linear-gradient(180deg, #f6d0aa 0 34%, #1d2734 34% 100%);
}

.avatar-art.alt {
  background:
    linear-gradient(135deg, rgba(24, 160, 88, 0.8), rgba(57, 119, 212, 0.16)),
    #172033;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.tag-row span,
.channel-row span {
  border-radius: 99px;
  padding: 7px 10px;
  background: var(--soft);
  color: var(--muted);
  font-weight: 800;
  font-size: 0.78rem;
}

.memory-card ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.6;
}

.kanban {
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 16px;
}

.kanban-column {
  min-height: 420px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.7);
}

.kanban-column h3 {
  margin-bottom: 14px;
}

.asset-card {
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--line);
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: 0 6px 18px rgba(28, 34, 45, 0.05);
}

.asset-card strong {
  display: block;
  margin-bottom: 8px;
}

.asset-card p {
  color: var(--muted);
  margin-bottom: 12px;
}

.asset-meta {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.scheduler-layout {
  grid-template-columns: 320px minmax(0, 1fr);
}

.admin-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.settings-list,
.slider-stack,
.policy-list {
  display: grid;
  gap: 12px;
}

.setting-row,
.toggle-row,
.policy-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  padding: 14px;
}

.setting-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.6fr);
  align-items: center;
  gap: 14px;
}

.setting-row small,
.policy-item small {
  display: block;
  color: var(--muted);
  font-weight: 600;
  margin-top: 4px;
}

.slider-stack input[type="range"] {
  padding: 0;
  accent-color: var(--green);
}

.slider-stack strong {
  color: var(--ink);
}

.toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
}

.toggle-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
}

.prompt-admin textarea {
  min-height: 238px;
}

.calendar-strip {
  display: grid;
  gap: 10px;
}

.calendar-day {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.calendar-day strong {
  display: block;
}

.calendar-day span {
  color: var(--muted);
}

.release-preview {
  align-items: stretch;
  gap: 24px;
}

.reel-frame {
  width: min(260px, 38vw);
  aspect-ratio: 9 / 16;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(26, 29, 36, 0.1), rgba(26, 29, 36, 0.84)),
    linear-gradient(135deg, var(--teal), var(--gold));
  color: #fff;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  box-shadow: var(--shadow);
}

.reel-header {
  height: 8px;
  width: 68px;
  border-radius: 99px;
  background: #fff;
  margin-bottom: auto;
}

.reel-title {
  font-size: clamp(1.4rem, 3vw, 2.3rem);
  font-weight: 900;
  line-height: 1;
}

.reel-caption {
  margin-top: 12px;
  color: #eaf3ef;
}

.release-copy {
  max-width: 520px;
  align-self: center;
}

.release-copy p {
  color: var(--muted);
}

.channel-row {
  gap: 8px;
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .nav-list {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .hero-band,
  .dashboard-grid,
  .dossier-grid,
  .scheduler-layout,
  .admin-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 720px) {
  .workspace,
  .sidebar,
  .hero-copy {
    padding: 18px;
  }

  .topbar,
  .form-row,
  .release-preview {
    align-items: stretch;
    flex-direction: column;
  }

  .nav-list,
  .metrics-grid,
  .kanban {
    grid-template-columns: 1fr;
  }

  .hero-band {
    min-height: auto;
  }

  .flow-art {
    min-height: 420px;
  }

  .flow-node {
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
  }

  .flow-node.brain {
    top: 96px;
  }

  .flow-node.creative {
    top: 178px;
  }

  .flow-node.qc {
    bottom: 88px;
  }

  .flow-node.publish {
    bottom: 18px;
  }

  .setting-row {
    grid-template-columns: 1fr;
  }

  .reel-frame {
    width: 100%;
    max-width: 310px;
  }
}
