/* ══════════════════════════════════════════════════════════════════════
   THE APP CONSOLE (2026-09-28) — the Showcase's instrument grammar, brought
   to the signed-in app pages (dashboard first; Upgrades, Help, builder next).
   Source of truth for the look: the engine's showcase-console.css (THE
   CONSOLE, 2026-09-27). Same moves, app tokens:
     · glass cards, 18px corners, mono 10px heading with a champagne rule
       that sweeps in (.ac-card h3)
     · figures in the sans at 500, labels in 8.5px mono caps (.ac-stat)
     · "next up" rows: face · serif title + mono line · round go (.ac-next)
     · names in the serif (Bodoni 72 → Didot → Georgia), second half italic
   Every figure a page puts in here is read from the database — nothing
   illustrative, same truth law as the Showcase.
   ══════════════════════════════════════════════════════════════════════ */
:root {
  --ac-serif: 'Bodoni 72', Didot, 'Cormorant Garamond', Georgia, serif;
  --ac-mono: ui-monospace, 'SF Mono', Menlo, monospace;
  --ac-edge: rgba(255,255,255,0.14);
  --ac-glass: rgba(16,22,27,0.72);
  --ac-shadow: 0 18px 50px rgba(0,0,0,0.45);
  --ac-ease: cubic-bezier(.16,1,.3,1);
}

/* page frame: content left, instrument column right (desktop) */
.ac-page { padding: 34px clamp(18px, 3vw, 40px) 90px; max-width: 1380px; }
.ac-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; align-items: start; }
@media (min-width: 1100px) {
  .ac-grid { grid-template-columns: minmax(0, 1fr) 312px; }
  .ac-col { position: sticky; top: 24px; max-height: calc(100vh - 48px); overflow: auto; scrollbar-width: none;
    overscroll-behavior: contain; padding-bottom: 30px;
    -webkit-mask-image: linear-gradient(#000 calc(100% - 30px), transparent); mask-image: linear-gradient(#000 calc(100% - 30px), transparent); }
  .ac-col::-webkit-scrollbar { display: none; }
}
.ac-col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.ac-main { min-width: 0; display: flex; flex-direction: column; gap: 22px; }

/* header: mono readout over a serif name */
.ac-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 26px; }
.ac-ro { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; font: 500 10px var(--ac-mono); letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--text-mute); margin-bottom: 12px; }
.ac-ro .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-rgb),0.22);
  animation: acPulse 2.4s ease-in-out infinite; }
.ac-ro .sep { opacity: 0.4; }
.ac-ro .hot { color: var(--accent); }
.ac-ro .warn { color: #FFC43C; }
.ac-title { margin: 0; font: 400 clamp(2.2rem, 4.2vw, 3.4rem)/1.02 var(--ac-serif); letter-spacing: -0.02em; color: #fff;
  overflow-wrap: anywhere; }
.ac-title em { font-style: italic; color: var(--accent-soft, #eef2f6); }
.ac-sub { margin-top: 10px; color: var(--text-mute); font-size: 0.9rem; font-weight: 300; }

/* one button system: pill for verbs, champagne fill for the primary */
.ac-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 18px;
  border-radius: 999px; border: 1px solid rgba(var(--accent-rgb),0.45); background: rgba(var(--accent-rgb),0.06); color: var(--accent);
  font: 600 10px var(--ac-mono); letter-spacing: 0.16em; text-transform: uppercase; text-decoration: none; cursor: pointer;
  white-space: nowrap; transition: background .2s, color .2s, transform .3s var(--ac-ease), border-color .2s; }
.ac-btn:hover { background: rgba(var(--accent-rgb),0.14); transform: translateY(-1px); }
.ac-btn.primary { background: var(--accent); color: #0a0a0a; border-color: var(--accent); }
.ac-btn.primary:hover { background: var(--accent-soft, #eef2f6); }
.ac-btn.ghost { border-color: var(--ac-edge); color: var(--text-soft); background: none; }
.ac-btn.ghost:hover { border-color: rgba(var(--accent-rgb),0.6); color: var(--accent); }
.ac-btn:disabled { opacity: 0.45; cursor: default; transform: none; }

/* the card */
.ac-card { padding: 16px 18px 18px; border: 1px solid var(--ac-edge); border-radius: 18px; background: var(--ac-glass);
  box-shadow: var(--ac-shadow); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); min-width: 0; }
.ac-card > h3, .ac-sec > h2 { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 0 0 14px;
  font: 600 10px/1 var(--ac-mono); letter-spacing: 0.2em; text-transform: uppercase; color: #fff; position: relative; padding-bottom: 10px; }
.ac-card > h3::after, .ac-sec > h2::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent 70%); transform: scaleX(0); transform-origin: left;
  animation: acRule .9s var(--ac-ease) .25s forwards; }
.ac-card > h3 small, .ac-sec > h2 small { font: 400 9px var(--ac-mono); letter-spacing: 0.12em; color: var(--text-mute);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 60%; text-transform: uppercase; }
.ac-card > h3 small.live { color: var(--accent); padding-left: 12px; position: relative; }
.ac-card > h3 small.live::before { content: ""; position: absolute; left: 0; top: 50%; width: 6px; height: 6px; margin-top: -3px;
  border-radius: 50%; background: var(--accent); animation: acPulse 2.4s ease-in-out infinite; }
.ac-note { margin: 10px 0 0; font: 400 12.5px/1.6 var(--body); color: rgba(255,255,255,0.6); }

/* figures */
.ac-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; }
.ac-stats.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ac-stat b { display: block; font: 500 26px/1 var(--body); letter-spacing: -0.02em; color: #fff; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; }
.ac-stat b.mid { font-size: 18px; }
.ac-stat small { display: block; margin-top: 6px; font: 400 8.5px var(--ac-mono); letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(255,255,255,0.55); }
.ac-stat.hot b { color: var(--accent); text-shadow: 0 0 18px rgba(var(--accent-rgb),0.3); }
.ac-stat.amber b { color: #FFC43C; }
.ac-stat.dim b { color: rgba(255,255,255,0.4); }
.ac-bar { height: 3px; border-radius: 3px; background: rgba(255,255,255,0.08); overflow: hidden; margin-top: 8px; }
.ac-bar i { display: block; height: 100%; background: linear-gradient(90deg, rgba(var(--accent-rgb),0.4), var(--accent)); width: 0;
  transition: width 1s var(--ac-ease) .3s; }

/* next-up rows */
.ac-next { display: grid; grid-template-columns: 56px minmax(0, 1fr) 28px; align-items: center; gap: 12px; width: 100%; padding: 6px;
  margin-top: 6px; border: 1px solid rgba(255,255,255,0.1); border-radius: 12px; background: rgba(255,255,255,0.03); color: inherit;
  text-align: left; text-decoration: none; cursor: pointer; font: inherit;
  transition: border-color .25s, transform .35s var(--ac-ease), background .25s; }
.ac-next:first-of-type { margin-top: 0; }
.ac-next:hover { border-color: rgba(var(--accent-rgb),0.6); background: rgba(var(--accent-rgb),0.07); transform: translateY(-2px); }
.ac-face { display: grid; place-items: center; width: 56px; height: 40px; border-radius: 8px; background: #0b0d0f center/cover no-repeat;
  color: var(--accent); border: 1px solid rgba(255,255,255,0.06); }
.ac-face svg { width: 18px; height: 18px; }
.ac-words { min-width: 0; }
.ac-words b { display: block; font: 400 16px/1.15 var(--ac-serif); letter-spacing: -0.01em; color: #fff; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; }
.ac-words small { display: block; margin-top: 4px; font: 400 8.5px var(--ac-mono); letter-spacing: 0.12em; text-transform: uppercase;
  color: rgba(255,255,255,0.55); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-words small.amber { color: #FFC43C; } .ac-words small.red { color: #ff8a7a; } .ac-words small.hot { color: var(--accent); }
.ac-go { width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid rgba(var(--accent-rgb),0.4); border-radius: 50%;
  color: var(--accent); font-size: 13px; transition: background .2s, color .2s; }
.ac-next:hover .ac-go { background: var(--accent); color: #0a0a0a; }

/* a content section in the main column */
.ac-sec > h2 { font-size: 10px; margin-bottom: 16px; }
.ac-sec .ac-hint { color: var(--text-faint); font-size: 0.8rem; font-weight: 300; line-height: 1.6; margin: -4px 0 14px; }

/* Showcase cards: words on the picture, like Explore */
.ac-shows { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.ac-show { position: relative; display: flex; flex-direction: column; border: 1px solid var(--ac-edge); border-radius: 18px; overflow: hidden;
  background: var(--ac-glass); box-shadow: var(--ac-shadow); transition: border-color .25s, transform .4s var(--ac-ease); }
.ac-show:hover { border-color: rgba(var(--accent-rgb),0.5); transform: translateY(-3px); }
.ac-show .pic { position: relative; aspect-ratio: 16/10; background: #0b0d0f center/cover no-repeat; display: block; color: inherit; text-decoration: none; }
.ac-show .pic::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(4,8,12,0.35) 0%, transparent 30%, transparent 45%, rgba(4,8,12,0.92) 100%); }
.ac-show .pic .st { position: absolute; top: 14px; left: 14px; z-index: 1; }
.ac-show .pic .go { position: absolute; top: 14px; right: 14px; z-index: 1; font: 600 9px var(--ac-mono); letter-spacing: 0.16em;
  text-transform: uppercase; padding: 7px 11px; border-radius: 999px; background: var(--accent); color: #0a0a0a;
  opacity: 0; transform: translateY(-4px); transition: opacity .25s, transform .35s var(--ac-ease); }
.ac-show:hover .pic .go, .ac-show .pic:focus-visible .go { opacity: 1; transform: none; }
@media (hover: none) { .ac-show .pic .go { opacity: 1; transform: none; } }
.ac-show .pic .words { position: absolute; left: 18px; right: 18px; bottom: 16px; z-index: 1; }
.ac-show .pic .words b { display: block; font: 400 clamp(1.4rem, 2vw, 1.75rem)/1.08 var(--ac-serif); letter-spacing: -0.015em; color: #fff;
  text-shadow: 0 2px 18px rgba(0,0,0,0.5); }
.ac-show .pic .words b em { font-style: italic; color: var(--accent-soft, #eef2f6); }
.ac-show .pic .words small { display: block; margin-top: 8px; font: 400 9px var(--ac-mono); letter-spacing: 0.16em; text-transform: uppercase;
  color: rgba(255,255,255,0.7); }
.ac-show .note { margin: 14px 16px 0; color: var(--text-soft); font-size: 0.82rem; font-weight: 300; line-height: 1.55;
  border-left: 2px solid rgba(255,138,122,0.6); padding-left: 10px; }
.ac-show .acts { display: flex; gap: 8px; flex-wrap: wrap; padding: 14px 16px 16px; }
.ac-show .acts .ac-btn:first-child { flex: 1; }
.ac-show .acts .ac-btn { min-height: 34px; padding: 0 14px; font-size: 9px; }

/* status pills — one vocabulary: Draft · In launch review · Changes requested · Live */
.st { display: inline-flex; align-items: center; gap: 7px; font: 600 9px var(--ac-mono); letter-spacing: 0.16em; text-transform: uppercase;
  border-radius: 999px; padding: 6px 11px; border: 1px solid rgba(255,255,255,0.22); color: rgba(255,255,255,0.8);
  background: rgba(4,8,12,0.6); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.st::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.8; }
.st.published { color: var(--accent); border-color: rgba(var(--accent-rgb),0.55); }
.st.published::before { animation: acPulse 2.4s ease-in-out infinite; }
.st.pending { color: #FFC43C; border-color: rgba(255,196,60,0.5); }
.st.rejected { color: #ff8a7a; border-color: rgba(255,138,122,0.5); }

.ac-empty { text-align: center; color: var(--text-mute); font-weight: 300; border: 1px dashed var(--line-strong); border-radius: 18px;
  padding: 34px 20px; line-height: 1.7; }
.ac-empty .ac-btn { margin-top: 14px; }

@keyframes acPulse { 0%,100% { box-shadow: 0 0 0 3px rgba(var(--accent-rgb),0.25); } 50% { box-shadow: 0 0 0 7px rgba(var(--accent-rgb),0.06); } }
@keyframes acRule { to { transform: scaleX(1); } }
@media (prefers-reduced-motion: reduce) {
  .ac-card > h3::after, .ac-sec > h2::after { animation: none; transform: scaleX(1); }
  .ac-ro .dot, .st.published::before, .ac-card > h3 small.live::before { animation: none; }
  .ac-bar i { transition: none; }
}
@media (max-width: 640px) {
  .ac-page { padding-top: 22px; }
  .ac-shows { grid-template-columns: 1fr; }
}
