/* PosterForge demo visual foundation — dark navy + teal accents + gold labels.
   Loaded after product shell; maps demo HTML direction onto existing class names. */

:root {
  --bg: #07090c;
  --bg-elevated: #0b0e13;
  --panel: #0e1218;
  --panel-2: #11161d;
  --panel-3: #151a21;
  --text: #f4f1eb;
  --muted: #929caa;
  --border: #1e252e;
  --border-strong: #303846;

  /* Teal — primary actions, active borders, step circles, focus */
  --pf-cyan-500: #03B1CF;
  --pf-cyan-400: #03CEDA;
  --pf-cyan-hover: #22d3ee;
  --pf-teal-glow: rgba(3, 177, 207, .45);
  --pf-teal-soft: rgba(3, 177, 207, .14);
  --pf-teal-muted: rgba(3, 177, 207, .22);
  --accent: var(--pf-cyan-500);
  --accent-strong: var(--pf-cyan-hover);
  --accent-soft: var(--pf-teal-soft);
  --accent-2: #0467FB;

  /* Gold — step kickers, metadata labels, SELECTED badges */
  --pf-gold-500: #e8a045;
  --pf-gold-400: #f0b04a;
  --pf-gold-muted: #bd9154;
  --pf-gold-soft: rgba(232, 160, 69, .12);
  --pf-gold-border: rgba(232, 160, 69, .35);
  --pf-gold-chip-bg: #15110d;
  --pf-gold-chip-border: #4a3d2b;

  --danger: #e7b5b5;
  --warning: #d7bd92;
  --success: #a7dfbd;
  --shadow: 0 18px 50px rgba(0, 0, 0, .42);
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 16px;
  --font-ui: Inter, "Segoe UI Variable Text", "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  --font-display: Inter, "Segoe UI Variable Display", "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  --focus-ring: 0 0 0 3px rgba(3, 177, 207, .18);

  --pf-navy-950: #07090c;
  --pf-navy-900: #0b0e13;
  --pf-navy-850: #0e1218;
  --pf-navy-800: #11161d;
  --pf-blue-500: #0467FB;
  --pf-blue-400: #3b82f6;
  --pf-white: #f5f2ed;
  --pf-text: #f4f1eb;
  --pf-text-muted: #929caa;
  --pf-text-subtle: #6f7988;
  --pf-border: #1e252e;
  --pf-border-strong: #303846;
}

html, body {
  font-family: var(--font-ui);
  letter-spacing: -.005em;
  background: var(--bg);
  color: var(--text);
}

h1, h2, h3, h4, .title-input, .rail-brand-copy strong, .login-card h1 {
  font-family: var(--font-display);
}

/* App wrapper background */
#appView.pfu-app,
.pfu-app {
  position: relative;
  min-height: 100vh;
  background:
    radial-gradient(1100px 540px at 68% -220px, rgba(3, 177, 207, .09), transparent 64%),
    radial-gradient(860px 420px at 8% 18%, rgba(76, 92, 124, .055), transparent 66%),
    linear-gradient(180deg, #090b0f 0%, #07090c 48%, #06080b 100%);
}

#appView.pfu-app::before,
.pfu-app::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, .018), transparent 24%);
  opacity: .12;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, .65), rgba(0, 0, 0, .1));
}

/* Shell layout — demo: full-width topbar, then sidebar + main */
.app-shell.m5-shell {
  display: flex;
  flex-direction: column;
  grid-template-columns: none;
  min-height: 100vh;
  background: transparent;
}

.app-shell.m5-shell > .shell {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  flex: 1;
  min-height: calc(100vh - 73px);
  min-width: 0;
}

.app-shell.m5-shell > .topbar {
  flex-shrink: 0;
  width: 100%;
}

.workspace.main {
  min-width: 0;
  padding: 30px 34px 64px;
  max-width: 1640px;
  width: 100%;
}

/* Topbar */
.topbar.m5-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 20px;
  padding: 15px 24px;
  min-height: 73px;
  background: rgba(8, 10, 14, .9);
  border-bottom: 1px solid rgba(255, 255, 255, .055);
  box-shadow: none;
  backdrop-filter: blur(26px) saturate(125%);
  position: sticky;
  top: 0;
  z-index: 40;
}

.m5-topbar .brand {
  display: flex;
  align-items: center;
  gap: 13px;
  flex: 0 1 auto;
}

.m5-topbar .brand img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  filter: drop-shadow(0 7px 16px rgba(3, 177, 207, .14));
}

.m5-topbar .brand strong {
  display: block;
  font-size: 19px;
  font-weight: 720;
  letter-spacing: -.03em;
  color: #f5f2ed;
}

.m5-topbar .brand span {
  display: block;
  color: #778291;
  font-size: 11.5px;
  margin-top: 2px;
}

.m5-topbar .topbar-page {
  display: none;
}

.m5-topbar .workspace-name,
.workspace.main .workspace-name-top {
  font-size: 13px;
  color: #aeb7c4;
}

.m5-topbar .access-role-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 9px;
  border: 1px solid var(--pf-gold-chip-border);
  border-radius: 999px;
  background: var(--pf-gold-chip-bg);
  color: var(--pf-gold-400);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
}

.m5-topbar .help-btn {
  min-height: 34px;
  padding: 7px 9px;
  border-radius: 8px;
  border: 1px solid #2a313a;
  background: #0f1319;
  color: #aeb7c4;
  font-size: 10.5px;
  font-weight: 650;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease, color .16s ease;
}

.m5-topbar .help-btn:hover {
  background: #141a22;
  border-color: #343c49;
  color: #e2e5e9;
}

.m5-topbar .help-btn.guided-toggle[aria-pressed="true"] {
  border-color: var(--pf-teal-muted);
  background: rgba(3, 177, 207, .08);
  color: var(--pf-cyan-400);
}

.workspace.main .context-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: -2px 0 16px;
  padding: 8px 10px;
  border-bottom: 1px solid #171d24;
  color: #717b88;
  font-size: 11px;
}

.workspace.main .context-bar b {
  margin-left: 7px;
  color: #c9cfd7;
  font-weight: 600;
}

.workspace.main .context-bar button {
  border: 0;
  background: transparent;
  color: var(--pf-cyan-400);
  font-size: 11px;
  font-weight: 650;
  cursor: pointer;
  padding: 0;
}

.workspace.main .context-bar button:hover {
  color: var(--pf-cyan-hover);
}

.workspace.main .core-workflow {
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin: 0 0 22px;
  padding: 10px;
  border: 1px solid #272e38;
  border-radius: 12px;
  background: #0d1116;
}

.workspace.main .core-workflow[hidden] {
  display: none !important;
}

.workspace.main .core-step {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #aeb7c4;
  text-align: left;
  cursor: pointer;
}

.workspace.main .core-step span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid #2d3540;
  background: #12171d;
  color: #8f99a7;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.workspace.main .core-step b {
  display: block;
  color: #e4e8ed;
  font-size: 13px;
}

.workspace.main .core-step small {
  display: block;
  color: #7f8996;
  font-size: 11px;
  margin-top: 2px;
}

.workspace.main .core-step.active,
.workspace.main .core-step:hover {
  background: rgba(3, 177, 207, .08);
  border-color: var(--pf-teal-muted);
}

.workspace.main .core-step.active span {
  background: linear-gradient(180deg, var(--pf-cyan-hover), var(--pf-cyan-500));
  border-color: var(--pf-cyan-400);
  color: #041016;
  box-shadow: 0 0 12px var(--pf-teal-glow);
}

.workspace.main .core-workflow > i {
  display: flex;
  align-items: center;
  color: #4d5866;
  font-style: normal;
  padding: 0 2px;
}

.workspace.main .workspace-activity-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 0 18px;
  padding: 10px 12px;
  border: 1px solid #1e252e;
  border-radius: 12px;
  background: #0b0f14;
}

.workspace.main .platform-access-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin: 0 0 18px;
  padding: 12px 14px;
  border: 1px solid #303846;
  border-radius: 12px;
  background: #10151b;
}

.workspace.main .platform-access-banner.hidden,
.workspace.main .platform-access-banner[hidden] {
  display: none !important;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.page-head h1 {
  margin: 7px 0 7px;
  font-size: clamp(28px, 3.2vw, 40px);
  line-height: 1.05;
  font-weight: 650;
  letter-spacing: -.045em;
  color: #f5f2ed;
}

.page-head p {
  font-size: 13.5px;
  line-height: 1.6;
  max-width: 82ch;
}

.page-head .status-chip {
  margin-top: 12px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.section-heading h3,
.section-heading h4 {
  margin: 7px 0 7px;
  font-size: clamp(28px, 3.2vw, 40px);
  line-height: 1.05;
  font-weight: 650;
  letter-spacing: -.045em;
  color: #f5f2ed;
}

.section-heading p {
  font-size: 13.5px;
  line-height: 1.6;
  max-width: 82ch;
}

.guidance-card {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, .7fr);
  gap: 15px;
  margin-bottom: 12px;
  padding: 16px 18px;
  border: 1px solid #252c34;
  background: linear-gradient(140deg, #11161c 0%, #0d1116 62%, #15120d 100%);
  border-radius: 12px;
  box-shadow: none;
}

.guidance-card h2 {
  margin: 4px 0 6px;
  font-size: 19px;
  letter-spacing: -.025em;
  color: #f1eee8;
}

.guidance-card h3 {
  margin: 1px 0 6px;
  font-size: 12px;
  color: #f1eee8;
}

.guidance-card p {
  margin: 0;
  color: #909aa7;
  font-size: 12px;
  line-height: 1.55;
}

.guidance-kicker {
  font-size: 8.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--pf-gold-muted);
  font-weight: 760;
}

.guidance-side {
  border-left: 1px solid #242a31;
  padding-left: 15px;
}

.guidance-side .primary-button {
  margin-top: 12px;
}

.inline-explain {
  margin-top: 12px !important;
  font-size: 11px;
  color: #7f8996 !important;
}

.setup-track {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.setup-step {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 7px 9px;
  border: 1px solid #1f252d;
  background: #0b0f14;
  border-radius: 8px;
}

.setup-step .num {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #141a20;
  border: 1px solid #282f38;
  color: #8c96a2;
  font-size: 10px;
  font-weight: 650;
}

.setup-step strong {
  display: block;
  font-size: 11px;
  color: #d5d9df;
}

.setup-step small {
  display: block;
  color: #7f8996;
  font-size: 9.5px;
  margin-top: 2px;
}

.setup-step button {
  border: 1px solid #2a313a;
  background: #11161c;
  color: #c9cfd7;
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 9.5px;
  font-weight: 650;
  cursor: pointer;
}

.setup-step button:hover {
  background: #151a21;
  border-color: #343c49;
}

.setup-step.current {
  border-color: var(--pf-teal-muted);
  background: rgba(3, 177, 207, .05);
}

.setup-step.current .num {
  background: linear-gradient(180deg, var(--pf-cyan-hover), var(--pf-cyan-500));
  border-color: var(--pf-cyan-400);
  color: #041016;
  box-shadow: 0 0 10px var(--pf-teal-glow);
}

.setup-checklist {
  margin-top: 8px;
}

.home-check-item {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 11px;
  color: #9aa3af;
  margin-top: 4px;
}

.home-check-item.complete {
  color: #a7dfbd;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.card.stat {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  column-gap: 12px;
  align-items: center;
  min-height: 0;
  padding: 12px 14px;
}

.card.stat span {
  grid-column: 1;
  grid-row: 1;
  display: block;
  color: #747e8b;
  font-size: 9px;
  font-weight: 650;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.card.stat strong {
  grid-column: 2;
  grid-row: 1 / 3;
  display: block;
  font-size: 28px;
  font-weight: 580;
  color: #f1eee8;
  margin: 0;
  letter-spacing: -.03em;
  line-height: 1;
}

.card.stat small {
  grid-column: 1;
  grid-row: 2;
  display: block;
  color: #7f8996;
  font-size: 10.5px;
  line-height: 1.35;
  margin-top: 4px;
}

.card.stat::after {
  display: none;
}

.card.stat .stat-action {
  margin-top: 12px;
  width: 100%;
}

.hero-card {
  padding: 15px 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.hero-card h2 {
  margin: 3px 0 4px;
  font-size: 19px;
  letter-spacing: -.02em;
  color: #f1eee8;
}

.hero-card p {
  margin: 0;
  color: #929caa;
  font-size: 11.5px;
  line-height: 1.5;
}

.generator-welcome {
  margin-bottom: 12px;
  padding: 15px 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.generator-welcome.hidden {
  display: none;
}

.generator-welcome h2 {
  margin: 4px 0 6px;
  font-size: 19px;
  letter-spacing: -.02em;
  color: #f1eee8;
}

.generator-welcome p {
  margin: 0;
  color: #909aa7;
  font-size: 12px;
  line-height: 1.55;
  max-width: 62ch;
}

.context-help {
  position: relative;
  margin: 0 0 12px;
  padding: 11px 13px 11px 44px;
  border: 1px solid #223949;
  border-radius: 9px;
  background: linear-gradient(135deg, #0b141b 0%, #0b1117 72%);
  box-shadow: inset 2px 0 0 #4e9fc4;
  color: #8fa0ad;
  line-height: 1.5;
}

.context-help::before {
  content: "?";
  position: absolute;
  left: 13px;
  top: 12px;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: #102a38;
  border: 1px solid #2f6178;
  color: #9bd5ee;
  font-size: 12px;
  font-weight: 750;
}

.context-help::after {
  content: "HELPING HAND";
  position: absolute;
  left: 44px;
  top: 11px;
  color: #72b9d9;
  font-size: 7.5px;
  font-weight: 750;
  letter-spacing: .13em;
  line-height: 1;
  white-space: nowrap;
}

.context-help strong {
  display: block;
  padding-top: 14px;
  color: #e0e8ef;
  font-size: 11.5px;
  font-weight: 650;
  line-height: 1.38;
  margin-bottom: 0;
}

.context-help p {
  margin-top: 4px;
  color: #8fa0ad;
  font-size: 10.8px;
  line-height: 1.5;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.screen.active {
  animation: demoFade .18s ease both;
}

@media (max-width: 1100px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .guidance-side {
    border-left: 0;
    border-top: 1px solid #242a31;
    padding: 16px 0 0;
  }
}

@media (max-width: 900px) {
  .page-head,
  .hero-card {
    align-items: stretch;
    flex-direction: column;
  }

  .workspace.main .context-bar {
    margin-top: 0;
  }
}

@media (max-width: 760px) {
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .page-head h1,
  .section-heading h3,
  .section-heading h4 {
    font-size: 30px;
  }

  .sidebar.app-rail.m5-rail nav button,
  .sidebar.app-rail.m5-rail nav button.nav {
    font-size: 12px;
  }

  .card.stat strong {
    font-size: 24px;
  }

  .context-help,
  .help-callout {
    padding: 11px 11px 11px 42px;
  }

  .context-help::before,
  .help-callout::before {
    left: 12px;
  }

  .context-help::after,
  .help-callout::after {
    left: 42px;
  }

  .m5-topbar .workspace-name {
    display: none;
  }

  .workspace.main .core-workflow {
    flex-direction: column;
  }

  .workspace.main .core-workflow > i {
    display: none;
  }
}

.m5-topbar .top-actions,
.m5-topbar .topbar-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  justify-self: end;
}

.workspace.main .activity-dot.busy {
  background: var(--pf-cyan-500);
  box-shadow: 0 0 10px var(--pf-teal-glow);
}

.workspace.main .quota-buckets b {
  color: var(--pf-cyan-400);
}

/* Sidebar */
.sidebar.app-rail.m5-rail {
  width: auto;
  padding: 20px 14px 18px;
  background: #090c10;
  border-right: 1px solid rgba(255, 255, 255, .05);
  position: sticky;
  top: 73px;
  height: calc(100vh - 73px);
  overflow-y: auto;
}

.m5-rail .nav-section {
  margin: 18px 10px 7px;
  color: #5f6874;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.m5-rail .nav-section:first-child {
  margin-top: 2px;
}

.sidebar.app-rail.m5-rail nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.sidebar.app-rail.m5-rail nav button,
.sidebar.app-rail.m5-rail nav button.nav {
  position: relative;
  display: block;
  width: 100%;
  min-height: 42px;
  padding: 10px 13px 10px 15px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: #8f99a7;
  font-size: 13.5px;
  font-weight: 590;
  text-align: left;
  grid-template-columns: none;
  transition: background .16s ease, color .16s ease, border-color .16s ease;
}

.sidebar.app-rail.m5-rail nav button .nav-icon {
  display: none;
}

.sidebar.app-rail.m5-rail nav button:hover {
  background: #0e1218;
  border-color: transparent;
  color: #d8dde5;
  transform: none;
}

.sidebar.app-rail.m5-rail nav button.active {
  background: #11151b;
  border-color: #202630;
  color: #f0eee9;
  box-shadow: none;
}

.sidebar.app-rail.m5-rail nav button.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 11px;
  bottom: 11px;
  width: 2px;
  border-radius: 999px;
  background: var(--pf-cyan-500);
  box-shadow: 0 0 12px var(--pf-teal-glow);
}

.sidebar.app-rail.m5-rail nav button.nav-recommended::after {
  content: "Start here";
  float: right;
  margin-top: 1px;
  color: var(--pf-gold-500);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.sidebar.app-rail .sidebar-bottom {
  margin-top: auto;
  padding-top: 16px;
}

.sidebar.app-rail .user-summary {
  border-color: #1e252e;
  background: #0b0f14;
}

.sidebar.app-rail .workspace-generation-queue {
  background: var(--pf-teal-soft);
  border-color: #2e3742;
}

/* Buttons */
.primary-button {
  color: #041016;
  background: linear-gradient(180deg, var(--pf-cyan-hover) 0%, var(--pf-cyan-500) 100%);
  border: 1px solid var(--pf-cyan-400);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .24), 0 7px 18px rgba(3, 177, 207, .22);
  font-size: 12px;
  font-weight: 620;
  min-height: 36px;
  border-radius: 8px;
  padding: 7px 11px;
}

.primary-button:hover {
  background: linear-gradient(180deg, #38dff5 0%, var(--pf-cyan-400) 100%);
  filter: none;
  transform: none;
}

.secondary-button {
  background: #11161c;
  border: 1px solid #272e38;
  color: #dbe0e7;
  font-size: 12px;
  font-weight: 620;
  min-height: 36px;
  border-radius: 8px;
  padding: 7px 11px;
}

.secondary-button:hover {
  background: #151a21;
  border-color: #343c49;
  transform: none;
}

.ghost-button {
  background: transparent;
  border: 1px solid #242b35;
  color: #aeb7c4;
  font-size: 12px;
  font-weight: 620;
  min-height: 36px;
  border-radius: 8px;
  padding: 7px 11px;
}

.ghost-button:hover {
  background: #0f1319;
  color: #e2e5e9;
  border-color: #343c49;
}

.text-btn {
  -webkit-appearance: none;
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--pf-cyan-400);
  padding: 0;
  font: inherit;
  font-weight: 620;
  letter-spacing: 0;
  cursor: pointer;
  text-align: left;
  box-shadow: none;
}

.text-btn:hover {
  color: var(--pf-cyan-hover);
  background: transparent;
}

.discord-button {
  background: linear-gradient(180deg, var(--pf-cyan-hover) 0%, var(--pf-cyan-500) 100%);
  color: #041016;
  border: 1px solid var(--pf-cyan-400);
}

/* Shared .btn aliases — studio and legacy markup use the same hover behaviour */
.btn {
  font: inherit;
  cursor: pointer;
  border-radius: 8px;
  transition: background .14s ease, border-color .14s ease, color .14s ease, box-shadow .14s ease;
}

.btn.primary {
  color: #041016;
  background: linear-gradient(180deg, var(--pf-cyan-hover) 0%, var(--pf-cyan-500) 100%);
  border: 1px solid var(--pf-cyan-400);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .24), 0 7px 18px rgba(3, 177, 207, .22);
  font-size: 12px;
  font-weight: 620;
  min-height: 32px;
  padding: 6px 11px;
}

.btn.primary:hover {
  background: linear-gradient(180deg, #38dff5 0%, var(--pf-cyan-400) 100%);
  filter: none;
  transform: none;
}

.btn.secondary {
  background: #11161c;
  border: 1px solid #272e38;
  color: #dbe0e7;
  font-size: 12px;
  font-weight: 620;
  min-height: 32px;
  padding: 6px 11px;
}

.btn.secondary:hover {
  background: #151a21;
  border-color: #343c49;
  transform: none;
}

.btn.subtle {
  background: transparent;
  border: 1px solid #242b35;
  color: #aeb7c4;
  font-size: 12px;
  font-weight: 620;
  min-height: 32px;
  padding: 6px 11px;
}

.btn.subtle:hover {
  background: #0f1319;
  color: #e2e5e9;
  border-color: #343c49;
  transform: none;
}

.btn.subtle:disabled,
.btn.secondary:disabled,
.btn.primary:disabled {
  opacity: .58;
  cursor: not-allowed;
  transform: none;
}

.btn.subtle:disabled:hover {
  background: transparent;
  color: #aeb7c4;
  border-color: #242b35;
}

/* Typography & labels */
.eyebrow {
  color: var(--pf-gold-muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .19em;
  text-transform: uppercase;
}

.page-head h1,
.section-heading h1,
.section-heading h2,
.section-heading h3,
.dashboard-hero h3 {
  color: #f1eee8;
  letter-spacing: -.03em;
}

.page-head p,
.section-heading p {
  color: #929caa;
}

/* Cards & panels */
.panel,
.template-card,
.dashboard-hero,
.dashboard-status-card,
.card,
.m5-placeholder-notice {
  background: linear-gradient(180deg, #10141a 0%, #0d1116 100%);
  border: 1px solid #1e252e;
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .14), inset 0 1px 0 rgba(255, 255, 255, .012);
}

.form-card {
  padding: 15px 16px;
  margin-bottom: 14px;
  background: linear-gradient(180deg, #10141a 0%, #0d1116 100%);
  border: 1px solid #1e252e;
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .14), inset 0 1px 0 rgba(255, 255, 255, .012);
}

.pfu-app .form-grid,
#appView.pfu-app .form-grid {
  gap: 10px 12px;
  margin: 13px 0;
}

.pfu-app .row,
#appView.pfu-app .row {
  gap: 7px;
}

.card-head {
  gap: 12px;
}

.dashboard-hero {
  background:
    radial-gradient(500px 240px at 100% 0%, rgba(3, 177, 207, .07), transparent 65%),
    linear-gradient(180deg, #11161d, #0e1217);
}

/* Form controls */
.pfu-app label,
#appView.pfu-app label {
  font-size: 11px;
  font-weight: 580;
}

input, select, textarea {
  border: 1px solid #252c36;
  background: #090c10;
  color: #e9edf2;
  border-radius: 8px;
  box-shadow: none;
  font-size: 12.5px;
  padding: 9px 10px;
  margin-top: 5px;
}

textarea {
  min-height: 78px;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--pf-cyan-500);
  box-shadow: var(--focus-ring);
}

input::placeholder, textarea::placeholder {
  color: #566170;
}

input[type="file"] {
  padding: 7px 10px;
  color: #9aa3af;
  font-size: 11.5px;
  line-height: 1.45;
  cursor: pointer;
}

input[type="file"]::file-selector-button {
  -webkit-appearance: none;
  appearance: none;
  border: 1px solid #272e38;
  border-radius: 7px;
  background: #11161c;
  color: #dbe0e7;
  padding: 6px 12px;
  margin-right: 10px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 620;
  cursor: pointer;
  transition: background .14s ease, border-color .14s ease, color .14s ease;
}

input[type="file"]::file-selector-button:hover {
  background: #151a21;
  border-color: #343c49;
  color: #edf2f9;
}

input[type="file"]::-webkit-file-upload-button {
  -webkit-appearance: none;
  border: 1px solid #272e38;
  border-radius: 7px;
  background: #11161c;
  color: #dbe0e7;
  padding: 6px 12px;
  margin-right: 10px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 620;
  cursor: pointer;
}

input[type="file"]::-webkit-file-upload-button:hover {
  background: #151a21;
  border-color: #343c49;
  color: #edf2f9;
}

input[type="file"].hidden,
input[type="file"][hidden] {
  display: none;
}

input[type="file"].visually-hidden-file {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  opacity: 0 !important;
}

/* Status chips */
.status-chip {
  background: #10151b;
  border-color: #262d36;
  color: #aeb7c4;
}

.status-chip-live {
  border-color: #244834;
  background: #0d1b14;
  color: #8fd9af;
}

.status-chip.warning {
  color: #2a1c00;
  background: #d7bd92;
}

.status-chip.success {
  color: #0d1611;
  background: #a7dfbd;
}

.product-mode-chip,
.m5-scope-chip,
.format-chip-row span {
  border-color: #473621;
  background: #19140e;
  color: #cfaa7a;
}

/* M5-specific accents */
.schedule-readiness-card,
.studio-mapping-readiness {
  border-color: var(--pf-teal-muted);
  background: var(--pf-teal-soft);
}

.schedule-readiness-card.required,
.schedule-readiness-card.attention,
.studio-mapping-readiness.required,
.studio-mapping-readiness.attention {
  border-color: rgba(3, 177, 207, .42);
  background: rgba(3, 177, 207, .1);
}

.guided-action:hover {
  border-color: rgba(3, 177, 207, .45);
  box-shadow: 0 0 0 1px var(--pf-teal-muted);
}

.plan-card .plan-price {
  color: var(--pf-cyan-400);
}

/* Views */
.view {
  padding: 0;
}

.view.active {
  animation: demoFade .18s ease both;
}

@keyframes demoFade {
  from { opacity: .78; transform: translateY(3px); }
  to { opacity: 1; transform: none; }
}

/* Login — separate fullscreen auth gate (demo #authGate parity) */
.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 200;
  overflow: auto;
  background:
    radial-gradient(700px 360px at 50% -120px, rgba(3, 177, 207, .1), transparent 66%),
    #07090c;
}

body.auth-mode #appView,
body.auth-mode .help-drawer,
body.auth-mode .help-backdrop {
  display: none !important;
}

body.app-mode #authGate {
  display: none !important;
}

.login-shell {
  background:
    radial-gradient(700px 360px at 50% -120px, rgba(3, 177, 207, .1), transparent 66%),
    #07090c;
}

.login-card {
  background: #0f1319;
  border: 1px solid #222933;
  border-radius: 16px;
  box-shadow: 0 32px 90px rgba(0, 0, 0, .44);
}

.brand-mark {
  box-shadow: 0 10px 28px rgba(3, 177, 207, .2);
}

/* Studio canvas accents */
.canvas-item.selected {
  outline-color: var(--pf-cyan-400);
}

.resize-handle {
  background: var(--pf-cyan-500);
  border-color: #d4f4f8;
}

.tool-button:hover {
  border-color: var(--pf-teal-muted);
  background: var(--pf-teal-soft);
}

/* Toast — demo parity; top-right chip, content-sized (never top+bottom stretch) */
.toast {
  top: 84px;
  right: 18px;
  bottom: auto;
  width: fit-content;
  max-width: min(380px, calc(100vw - 36px));
  min-width: 0;
  height: auto;
  padding: 11px 14px;
  background: #101811;
  border: 1px solid #294634;
  color: #a9dfba;
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.45;
  box-shadow: 0 18px 48px rgba(0, 0, 0, .32);
}

.toast.error {
  background: #180f10;
  border-color: #432a2a;
  color: #e7b5b5;
}

.toast.success {
  background: #101811;
  border-color: #294634;
  color: #a9dfba;
}

/* Scrollbars */
* {
  scrollbar-color: #232a33 #080a0e;
}

*::-webkit-scrollbar-thumb {
  background: #232a33;
}

*::-webkit-scrollbar-thumb:hover {
  background: #303844;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 1px solid var(--pf-cyan-500);
  outline-offset: 2px;
}

@media (max-width: 1100px) {
  .app-shell.m5-shell > .shell {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .workspace.main {
    padding: 25px 22px 56px;
  }
}

@media (max-width: 760px) {
  .workspace.main {
    padding: 18px 12px 46px;
  }
  .app-shell.m5-shell > .shell {
    display: block;
  }

  .sidebar.app-rail.m5-rail {
    position: static;
    height: auto;
    max-height: none;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, .05);
  }

  .sidebar.app-rail.m5-rail nav {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .topbar.m5-topbar {
    position: static;
    padding: 14px 16px;
  }

  .workspace.main {
    padding: 22px 14px 54px;
  }

  .m5-topbar .brand span {
    display: none;
  }
}
