/* ── Admin Dashboard ───────────────────────────────────────────────── */

/* Admin shell — top-nav layout */
.admin-shell-wrap {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: var(--bg, #0e0e0e);
}

.admin-topbar {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 0 1.75rem;
    height: 52px;
    background: var(--surface, #141414);
    border-bottom: 1px solid var(--border, rgba(255,255,255,0.08));
    position: sticky;
    top: 0;
    z-index: 100;
    flex-shrink: 0;
}

.admin-topbar-brand {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.9rem;
    font-weight: 600;
    margin-right: 0.5rem;
    white-space: nowrap;
}
.admin-topbar-mark {
    background: var(--accent, #7c6ff7);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.18em 0.45em;
    border-radius: 4px;
    letter-spacing: 0.04em;
}

.admin-topbar-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex: 1;
}

/* ── Admin nav: Logs dropdown ── */
.admin-topbar-dropdown { position: relative; }
.admin-topbar-dropdown-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    cursor: pointer;
    border: none;
    background: none;
    font: inherit;
}
.admin-dropdown-caret { width: 14px; height: 14px; }
.admin-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 0.35rem);
    left: 0;
    min-width: 160px;
    background: var(--surface-2, #1e1e24);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 0.5rem;
    padding: 0.35rem 0;
    z-index: 100;
    box-shadow: 0 8px 24px rgba(0,0,0,.4);
}
.admin-topbar-dropdown:hover .admin-dropdown-menu,
.admin-topbar-dropdown:focus-within .admin-dropdown-menu { display: block; }
.admin-dropdown-item {
    display: block;
    padding: 0.45rem 1rem;
    font-size: 0.82rem;
    color: rgba(255,255,255,.75);
    text-decoration: none;
    transition: background 0.12s;
}
.admin-dropdown-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.admin-dropdown-item.is-active { color: var(--accent, #f28b3c); font-weight: 600; }

.admin-topbar-link {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    color: var(--muted, #888);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}
.admin-topbar-link svg { width: 15px; height: 15px; flex-shrink: 0; }
.admin-topbar-link:hover { background: rgba(255,255,255,0.06); color: var(--text, #eee); }
.admin-topbar-link.is-active { background: rgba(124,111,247,0.14); color: var(--accent, #7c6ff7); }

.admin-topbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}
.admin-topbar-home {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 0.85rem;
    border-radius: 6px;
    border: 1px solid var(--border, rgba(255,255,255,0.12));
    color: var(--text, #eee);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    transition: background 0.15s, border-color 0.15s;
}
.admin-topbar-home svg { width: 15px; height: 15px; flex-shrink: 0; }
.admin-topbar-home:hover { background: rgba(255,255,255,0.07); border-color: rgba(255,255,255,0.22); }

.admin-main {
    padding: 2rem 2.5rem;
    flex: 1;
    overflow-y: auto;
}

.admin-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.admin-page-header h1 { font-size: 1.6rem; font-weight: 800; margin: 0 0 0.25rem; }
.admin-breadcrumb { color: var(--muted); text-decoration: none; font-size: 0.85rem; display: block; margin-bottom: 0.4rem; }
.admin-breadcrumb:hover { color: var(--text); }

.admin-flash {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    font-weight: 500;
}
.admin-flash--success { background: rgba(34,197,94,0.12); color: #4ade80; border: 1px solid rgba(34,197,94,0.2); }
.admin-flash--error   { background: rgba(239,68,68,0.12);  color: #f87171; border: 1px solid rgba(239,68,68,0.2); }
.admin-flash--info    { background: rgba(59,130,246,0.12); color: #93c5fd; border: 1px solid rgba(59,130,246,0.2); }

.admin-search-row {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    align-items: center;
}

.admin-search-input {
    flex: 1;
    max-width: 360px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border, rgba(255,255,255,0.1));
    border-radius: 8px;
    color: var(--text);
    padding: 0.55rem 0.85rem;
    font-size: 0.9rem;
}

.admin-table-wrap { overflow-x: auto; }

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.admin-table th {
    text-align: left;
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid var(--border, rgba(255,255,255,0.08));
    color: var(--muted);
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.admin-table th a { color: inherit; text-decoration: none; }
.admin-table th a:hover { color: var(--text); }

.admin-table td {
    padding: 0.7rem 0.75rem;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    vertical-align: middle;
}

.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr.row-inactive td { opacity: 0.5; }
.admin-table-compact td, .admin-table-compact th { padding: 0.5rem 0.6rem; }

.admin-sort-arrow { font-size: 0.7rem; margin-left: 0.2rem; }

.admin-email-cell { display: flex; align-items: center; gap: 0.5rem; }
.admin-credits-cell { font-variant-numeric: tabular-nums; font-weight: 600; }
.admin-date-cell { color: var(--muted); font-size: 0.82rem; }
.admin-action-link { color: var(--accent, #e07b00); text-decoration: none; font-weight: 600; font-size: 0.82rem; }
.admin-action-link:hover { text-decoration: underline; }
.admin-empty { color: var(--muted); padding: 2rem; text-align: center; }
.admin-credit-pos { color: #4ade80; font-weight: 600; }
.admin-credit-neg { color: #f87171; font-weight: 600; }

.admin-badge {
    background: rgba(224,123,0,0.18);
    color: var(--accent, #e07b00);
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.1rem 0.45rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.admin-status-pill {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.18rem 0.6rem;
    border-radius: 20px;
}
.admin-status-pill.is-active   { background: rgba(34,197,94,0.15);  color: #4ade80; }
.admin-status-pill.is-inactive { background: rgba(239,68,68,0.12);  color: #f87171; }

.admin-pagination {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1.25rem;
    justify-content: flex-end;
}

/* Secrets grid */
.admin-secrets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}
.admin-secret-card { padding: 1.25rem; border-radius: 10px; }
.admin-secret-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; }
.admin-secret-head strong { font-size: .95rem; }
.admin-secret-status {
    font-size: .72rem; font-weight: 700; padding: .2em .6em;
    border-radius: 999px; white-space: nowrap; flex-shrink: 0;
}
.admin-secret-status.is-set     { background: rgba(34,197,94,.15); color: #4ade80; }
.admin-secret-status.is-missing { background: rgba(239,68,68,.15);  color: #f87171; }
.admin-secret-form { display: flex; flex-direction: column; gap: .6rem; }
.admin-secret-actions { display: flex; gap: .5rem; }
.admin-secret-clear-btn { color: #e05c5c !important; }

/* Create User panel */
.admin-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.admin-create-user-panel {
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    border-radius: 10px;
    animation: adminFadeIn .15s ease;
}
@keyframes adminFadeIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

.admin-create-user-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .9rem 1.5rem;
    margin-top: 1rem;
}
.admin-form-row { display: flex; flex-direction: column; gap: .35rem; }
.admin-form-row--check { justify-content: flex-end; padding-top: 1.1rem; }
.admin-form-label { font-size: .78rem; font-weight: 600; letter-spacing: .04em; color: var(--text-muted, #888); text-transform: uppercase; }
.admin-required { color: #e05c5c; }
.admin-form-input {
    background: var(--bg, #0e0e0e);
    border: 1px solid var(--border, #1e1e1e);
    border-radius: 6px;
    color: var(--text, #eee);
    padding: .55rem .75rem;
    font-size: .88rem;
    outline: none;
    transition: border-color .15s;
    width: 100%;
}
.admin-form-input:focus { border-color: var(--accent, #7c6ff7); }
.admin-check-label {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .88rem;
    cursor: pointer;
    user-select: none;
}
.admin-form-actions {
    grid-column: 1 / -1;
    display: flex;
    gap: .75rem;
    padding-top: .5rem;
    border-top: 1px solid var(--border, #1e1e1e);
    margin-top: .25rem;
}

@media (max-width: 600px) {
    .admin-create-user-form { grid-template-columns: 1fr; }
}

/* User detail */
.admin-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.admin-detail-card { padding: 1.5rem; }
.admin-detail-card--full { grid-column: 1 / -1; }
.admin-section-title { font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); margin: 0 0 1rem; }

.admin-dl { display: grid; grid-template-columns: 130px 1fr; gap: 0.4rem 0.75rem; font-size: 0.88rem; margin-bottom: 1.25rem; }
.admin-dl dt { color: var(--muted); }
.admin-dl dd { margin: 0; word-break: break-all; }

.admin-inline-form { margin-top: 1rem; }
.admin-field-label { display: block; font-size: 0.8rem; color: var(--muted); margin-bottom: 0.4rem; }

.admin-inline-row {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.admin-input {
    flex: 1;
    min-width: 120px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border, rgba(255,255,255,0.1));
    border-radius: 8px;
    color: var(--text);
    padding: 0.5rem 0.75rem;
    font-size: 0.88rem;
}

.admin-input-narrow { max-width: 130px; flex: none; }

.admin-credit-balance {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
    margin-bottom: 1.25rem;
}

.admin-credit-number {
    font-size: 2.5rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: var(--accent, #e07b00);
}

.admin-credit-form { display: flex; flex-direction: column; gap: 0.75rem; }

.admin-preset-row { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.admin-preset-btn { font-size: 0.82rem; padding: 0.4rem 0.75rem; }

.admin-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.admin-toggle-row:last-child { border-bottom: none; }
.admin-toggle-row p { margin: 0.15rem 0 0; font-size: 0.82rem; }
.admin-toggle-row strong { font-size: 0.9rem; }

.admin-toggle-btn {
    font-size: 0.82rem;
    font-weight: 700;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.15s;
}
.admin-toggle-btn.is-on  { background: rgba(34,197,94,0.18);  color: #4ade80; }
.admin-toggle-btn.is-off { background: rgba(255,255,255,0.08); color: var(--muted); }
.admin-toggle-btn:hover { opacity: 0.8; }

@media (max-width: 900px) {
    .admin-detail-grid { grid-template-columns: 1fr; }
    .admin-topbar { padding: 0 1rem; gap: 0.75rem; }
    .admin-topbar-brand strong { display: none; }
    .admin-main { padding: 1.25rem 1rem; }
}

/* ── Workspace Home / Launchpad Panel ──────────────────────────────── */

.workspace-home {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    padding: 2rem 2rem 3rem;
    overflow-y: auto;
    height: 100%;
    box-sizing: border-box;
}
.workspace-home[hidden] { display: none !important; }

/* ── workspace-grid: hide rail + strip on the launchpad ────────────── */
.workspace-grid.is-home {
    grid-template-columns: 1fr;
}
.workspace-grid.is-home .shell-demo-strip,
.workspace-grid.is-home .shell-carousel-btn,
.workspace-grid.is-home .shell-demo-carousel {
    display: none;
}

/* ── AI Assistant panel (shared across free tools) ────────────────────── */
.ai-asst-panel {
    border-top: 1px solid rgba(255,255,255,.07);
    background: rgba(0,0,0,.18);
    padding: 18px 20px 14px;
}
.ai-asst-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 12px;
}
.ai-asst-title {
    font-size: .72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--accent, #f28b3c);
}
.ai-asst-cost {
    font-size: .65rem;
    font-weight: 600;
    color: var(--muted, #777);
}
.ai-asst-input-row {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}
.ai-asst-input {
    flex: 1;
    padding: 8px 14px;
    border-radius: 8px;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.1);
    color: var(--ink, #eee);
    font-size: .82rem;
    outline: none;
    transition: border-color .15s;
}
.ai-asst-input:focus {
    border-color: var(--accent, #f28b3c);
}
.ai-asst-input::placeholder {
    color: var(--muted, #555);
}
.ai-asst-go {
    padding: 8px 18px;
    border-radius: 8px;
    font-size: .78rem;
    font-weight: 700;
    background: linear-gradient(135deg, rgba(242,139,60,.18), rgba(242,139,60,.08));
    border: 1px solid rgba(242,139,60,.3);
    color: var(--accent, #f28b3c);
    cursor: pointer;
    transition: all .15s;
    white-space: nowrap;
}
.ai-asst-go:hover {
    background: rgba(242,139,60,.25);
    border-color: var(--accent);
}
.ai-asst-go:disabled {
    opacity: .35;
    pointer-events: none;
}
.ai-asst-label {
    font-size: .65rem;
    font-weight: 600;
    color: var(--muted, #666);
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: 8px;
}
.ai-asst-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 8px;
}
.ai-asst-chip {
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,.08);
    background: rgba(255,255,255,.03);
    cursor: pointer;
    transition: all .15s;
    text-align: left;
}
.ai-asst-chip:hover {
    border-color: rgba(242,139,60,.35);
    background: rgba(242,139,60,.06);
    transform: translateY(-1px);
}
.ai-asst-chip-name {
    display: block;
    font-size: .78rem;
    font-weight: 700;
    color: var(--ink, #eee);
    margin-bottom: 3px;
}
.ai-asst-chip-desc {
    display: block;
    font-size: .68rem;
    color: var(--muted, #888);
    line-height: 1.4;
}
.ai-asst-chip.is-loading {
    pointer-events: none;
    opacity: .5;
    animation: ai-asst-pulse 1.2s ease-in-out infinite;
}
@keyframes ai-asst-pulse {
    0%, 100% { opacity: .5; }
    50% { opacity: .8; }
}
.ai-asst-chip.is-active {
    border-color: var(--accent, #f28b3c);
    background: rgba(242,139,60,.1);
}

/* AI hint chips for quick-prompt suggestions (#54) */
.bc-ai-hint-chip {
    padding: 3px 10px;
    border-radius: 20px;
    font-size: .62rem;
    font-weight: 700;
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.12);
    color: var(--muted, #888);
    cursor: pointer;
    transition: background .12s, color .12s, border-color .12s;
    white-space: nowrap;
}
.bc-ai-hint-chip:hover {
    background: rgba(242,139,60,.12);
    border-color: rgba(242,139,60,.4);
    color: var(--accent, #f28b3c);
}

/* AI Assistant — frosted unlock overlay */
.ai-asst-body {
    position: relative;
}
.ai-asst-overlay {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: rgba(10, 12, 18, .55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-radius: 10px;
    transition: opacity .3s ease;
}
.ai-asst-overlay-heading {
    font-size: .82rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--accent, #f28b3c);
}
.ai-asst-overlay-sub {
    font-size: .78rem;
    color: rgba(255,255,255,.7);
    text-align: center;
    line-height: 1.4;
    max-width: 280px;
}
.ai-asst-overlay-btn {
    margin-top: 6px;
    padding: 8px 28px;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 700;
    border: 1px solid rgba(242,139,60,.4);
    background: linear-gradient(135deg, rgba(242,139,60,.2), rgba(242,139,60,.08));
    color: var(--accent, #f28b3c);
    cursor: pointer;
    transition: all .18s;
}
.ai-asst-overlay-btn:hover {
    background: rgba(242,139,60,.3);
    border-color: var(--accent);
    transform: scale(1.04);
}
.ai-asst-panel.is-unlocked .ai-asst-overlay {
    opacity: 0;
    pointer-events: none;
}

/* ── Bug #53: collapsible AI Design panel ─────────────────────────────
   Ships collapsed so the card preview remains in view. The header acts
   as a button — clicking expands/collapses the body. A subtle teaser
   line + chevron makes the panel discoverable without scrolling. */
.ai-asst-panel.is-collapsible {
    padding: 0;
    transition: padding .2s ease;
}
.ai-asst-panel.is-collapsible .ai-asst-header--toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    width: 100%;
    margin: 0;
    padding: 12px 20px;
    background: linear-gradient(180deg, rgba(242,139,60,.06), rgba(242,139,60,.02));
    border: none;
    border-top: 1px solid rgba(242,139,60,.18);
    border-bottom: 1px solid rgba(255,255,255,.05);
    cursor: pointer;
    color: inherit;
    text-align: left;
    font: inherit;
    transition: background .15s ease;
}
.ai-asst-panel.is-collapsible .ai-asst-header--toggle:hover {
    background: linear-gradient(180deg, rgba(242,139,60,.12), rgba(242,139,60,.04));
}
.ai-asst-panel.is-collapsible .ai-asst-header--toggle .ai-asst-cost {
    flex: 1;
    text-align: left;
    margin-left: 4px;
}
.ai-asst-panel.is-collapsible .ai-asst-teaser {
    display: inline-block;
    margin-left: 8px;
    color: var(--accent, #f28b3c);
    font-weight: 700;
    opacity: .85;
}
.ai-asst-panel.is-collapsible .ai-asst-chevron {
    font-size: .9rem;
    color: var(--accent, #f28b3c);
    transition: transform .22s ease;
    flex-shrink: 0;
}
.ai-asst-panel.is-collapsible:not(.is-collapsed) .ai-asst-chevron {
    transform: rotate(-180deg);
}
.ai-asst-panel.is-collapsible .ai-asst-body {
    padding: 16px 20px 14px;
    max-height: 1200px;
    overflow: hidden;
    transition: max-height .3s ease, padding .25s ease, opacity .25s ease;
    opacity: 1;
}
.ai-asst-panel.is-collapsible.is-collapsed .ai-asst-body {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    opacity: 0;
    pointer-events: none;
}
.ai-asst-panel.is-collapsible.is-collapsed .ai-asst-teaser {
    opacity: 1;
}
/* When the panel is collapsed, hide the absolutely-positioned overlay too —
   max-height:0 + overflow:hidden on the body normally clips children, but
   safari/firefox sometimes still paint position:absolute descendants. Belt + suspenders. */
.ai-asst-panel.is-collapsible.is-collapsed .ai-asst-overlay,
.ai-asst-panel.is-collapsible.is-collapsed .ai-asst-body * {
    visibility: hidden;
}

/* ── Changelog / What's new ───────────────────────────────────────────── */
.lp-changelog {
    width: 100%;
    box-sizing: border-box;
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 12px;
    overflow: hidden;
}
.lp-changelog-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    border-bottom: 1px solid rgba(255,255,255,.06);
}
.lp-changelog-label {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--muted, #98a2b3);
}
.lp-changelog-toggle {
    background: none;
    border: none;
    color: var(--muted, #98a2b3);
    font-size: .65rem;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: background .15s;
}
.lp-changelog-toggle:hover { background: rgba(255,255,255,.06); }
.lp-changelog-list {
    list-style: none;
    margin: 0;
    padding: 6px 0;
}
.lp-cl-item {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 7px 16px;
    font-size: .78rem;
    color: rgba(255,255,255,.7);
    line-height: 1.4;
    border-bottom: 1px solid rgba(255,255,255,.04);
}
.lp-cl-item:last-child { border-bottom: none; }
.lp-cl-tag {
    flex-shrink: 0;
    font-size: .58rem;
    font-weight: 800;
    letter-spacing: .07em;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 4px;
    min-width: 32px;
    text-align: center;
}
.lp-cl-new .lp-cl-tag  { background: rgba(72,199,102,.15);  color: #48c766; border: 1px solid rgba(72,199,102,.25); }
.lp-cl-fix .lp-cl-tag  { background: rgba(99,179,237,.12);  color: #63b3ed; border: 1px solid rgba(99,179,237,.22); }
.lp-cl-note .lp-cl-tag { background: rgba(255,200,60,.10);  color: #ffc83c; border: 1px solid rgba(255,200,60,.2); }
.lp-cl-gone .lp-cl-tag { background: rgba(252,129,74,.10);  color: #fc814a; border: 1px solid rgba(252,129,74,.2); }

/* ── Beta notice bar ──────────────────────────────────────────────────── */
.lp-beta-notice {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 18px;
    background: rgba(255, 200, 60, .06);
    border: 1px solid rgba(255, 200, 60, .2);
    border-radius: 10px;
    width: 100%;
    box-sizing: border-box;
}
.lp-beta-badge {
    flex-shrink: 0;
    font-size: .62rem;
    font-weight: 900;
    letter-spacing: .1em;
    color: #ffc83c;
    background: rgba(255, 200, 60, .12);
    border: 1px solid rgba(255, 200, 60, .3);
    border-radius: 5px;
    padding: 2px 7px;
}
.lp-beta-text {
    flex: 1;
    font-size: .75rem;
    color: rgba(255, 200, 60, .75);
    line-height: 1.4;
}
.lp-beta-ver {
    flex-shrink: 0;
    font-size: .65rem;
    font-family: monospace;
    color: rgba(255, 200, 60, .4);
    letter-spacing: .04em;
}

/* ── Launchpad welcome screen ─────────────────────────────────────────── */
.workspace-home {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    align-items: center;
    justify-content: center;
}

/* lp-welcome base — overridden by the Mobile Overhaul block at bottom of file */
.lp-welcome {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    padding: 24px 24px 32px;
    max-width: 820px;
    width: 100%;
    text-align: center;
}

/* Headline block */
.lp-welcome-headline {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.lp-eyebrow {
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--accent, #f28b3c);
    opacity: .75;
}
.lp-h1 {
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 900;
    letter-spacing: -.025em;
    line-height: 1.1;
    margin: 0;
    color: var(--ink, #edf1f7);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: .25em;
}
/* ── AIFI word-mark — WiFi arc above as a decorative accent ───────────── */
.aifi-word {
    position: relative;
    display: inline-block;
    background: linear-gradient(135deg, #f28b3c 30%, #ffb870);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    padding-top: .5em; /* room for the arc above */
}
.aifi-word::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 1.4em;
    height: .52em;
    margin-bottom: -.38em;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 42'%3E%3Ccircle cx='30' cy='39' r='5' fill='%2348c8e8'/%3E%3Cpath d='M16,28 Q30,15 44,28' stroke='%2348c8e8' fill='none' stroke-width='5.5' stroke-linecap='round'/%3E%3Cpath d='M4,17 Q30,0 56,17' stroke='%2348c8e8' fill='none' stroke-width='5.5' stroke-linecap='round'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center bottom;
    opacity: .92;
}

/* Smaller variant for body/pill text */
.aifi-word--sm {
    padding-top: .45em;
}
.aifi-word--sm::before {
    width: 1.3em;
    height: .48em;
    margin-bottom: -.34em;
}

/* Legacy image approach — kept for topbar, hidden on home */
.lp-aifi-logo { display: none; }
.lp-aifi-logo--sm { display: none; }

.lp-h1 em { font-style: normal; }
.lp-subhead {
    font-size: .95rem;
    color: var(--muted, #98a2b3);
    max-width: 480px;
    line-height: 1.6;
    margin: 0;
}

/* 3-step row */
/* ── Sequential guide card ─────────────────────────────────────────────── */
.lp-guide-card {
    display: flex;
    align-items: stretch;
    gap: 0;
    width: 100%;
    padding: 20px 16px;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,.07);
    background: rgba(255,255,255,.02);
}

/* Each step: dim by default, green box when .is-lp-active */
.lp-guide-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 16px 10px;
    border-radius: 12px;
    border: 2px solid transparent;
    min-width: 0;
    overflow: hidden;
    text-align: center;
    opacity: .3;
    transition: opacity .3s, border-color .3s, background .3s;
}
.lp-guide-step.is-lp-active {
    opacity: 1;
    border-color: rgba(72,199,102,.85);
    background: rgba(72,199,102,.06);
    animation: lpCardPulse 1.4s step-start infinite;
}
@keyframes lpCardPulse {
    0%, 49%  { border-color: rgba(72,199,102,.9);  box-shadow: 0 0 0 4px rgba(72,199,102,.2); }
    50%, 100% { border-color: rgba(72,199,102,.25); box-shadow: none; }
}

.lp-guide-step strong {
    font-size: .88rem;
    font-weight: 700;
    color: var(--ink, #edf1f7);
}
.lp-guide-step span {
    font-size: .72rem;
    color: var(--muted, #98a2b3);
    line-height: 1.4;
}

/* Number badges — grey when dim, green when active */
.lp-guide-num {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: rgba(255,255,255,.12);
    color: rgba(255,255,255,.3);
    font-size: .8rem;
    font-weight: 900;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    transition: background .3s, color .3s;
}
.lp-guide-step.is-lp-active .lp-guide-num {
    background: #48c766;
    color: #0a1a0e;
}

/* Intro rule box (no number) */
.lp-guide-rule-box {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border: 2px solid rgba(72,199,102,.6);
    border-radius: 8px;
    background: rgba(72,199,102,.08);
    font-size: .8rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: rgba(72,199,102,.95);
}

/* Arrow between steps */
.lp-guide-arrow {
    font-size: 1.2rem;
    color: rgba(255,255,255,.15);
    flex-shrink: 0;
    padding: 0 10px;
    display: flex;
    align-items: center;
    transition: color .3s;
}

/* Step 2 — drag/drop SVG icon */
.lp-guide-drop-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(72,200,230,.5);
    width: 44px; height: 44px;
}
.lp-guide-step.is-lp-active .lp-guide-drop-visual {
    color: rgba(72,200,230,.9);
}

/* Step 3 — render play icon */
.lp-guide-render-icon {
    font-size: 1.6rem;
    opacity: .4;
    transition: opacity .3s;
}
.lp-guide-step.is-lp-active .lp-guide-render-icon {
    opacity: 1;
}

/* mock filmstrip inside guide card */
.lp-mock-strip {
    display: flex;
    gap: 5px;
    padding: 5px 6px;
    align-items: center;
    background: rgba(0,0,0,.25);
    border-radius: 8px;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}
.lp-mock-thumb {
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
    object-fit: cover;
    border-radius: 6px;
    opacity: 0.35;
    border: 1.5px solid rgba(255,255,255,.06);
    transition: opacity .3s, transform .25s, border-color .3s, box-shadow .3s;
    pointer-events: none;
    user-select: none;
}
.lp-mock-strip .lp-mock-active {
    opacity: 1;
    transform: scale(1.12);
    border-color: #48c766;
    box-shadow: 0 0 10px rgba(72,199,102,.6);
}

@keyframes pulseDot {
    0%, 100% { transform: scale(1);   opacity: .7; box-shadow: 0 0 0 0 rgba(72,199,102,0); }
    50%       { transform: scale(1.5); opacity: 1;  box-shadow: 0 0 0 5px rgba(72,199,102,.25); }
}

/* ── Pitch bullets row ─────────────────────────────────────────────── */
.lp-pitch-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px 10px;
}
.lp-pitch-item {
    font-size: .78rem;
    font-weight: 600;
    color: var(--muted, #98a2b3);
    letter-spacing: .01em;
}
.lp-pitch-sep {
    color: rgba(255,255,255,.15);
    font-size: .8rem;
}

/* ── Studio CTA button ─────────────────────────────────────────────── */
.lp-studio-btn {
    padding: 13px 36px;
    border-radius: 999px;
    border: none;
    background: #48c766;
    color: #0a1a0e;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: .01em;
    cursor: pointer;
    transition: background .15s, transform .1s;
    box-shadow: 0 4px 20px rgba(72,199,102,.35);
}
.lp-studio-btn:hover {
    background: #5dd97a;
    transform: translateY(-1px);
}
.lp-studio-btn:active { transform: none; }

.lp-skip-label {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: .72rem;
    color: var(--muted, #98a2b3);
    cursor: pointer;
    user-select: none;
}
.lp-skip-check {
    accent-color: #48c766;
    cursor: pointer;
}

/* Studio nav link — same style as other nav links */
.demo-effect-nav a.nav-studio-link {
    font-weight: 700;
}
.demo-effect-nav a.nav-studio-link:hover {
    color: #f5efe8;
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.12);
}

/* Footer — credit pill */
.lp-welcome-foot {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    flex-wrap: wrap;
}
.lp-credit-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: .84rem;
    color: var(--muted, #98a2b3);
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 40px;
    padding: 9px 20px;
}
.lp-credit-pill strong {
    color: var(--ink, #edf1f7);
    font-weight: 800;
}
.lp-credit-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #48c766;
    flex-shrink: 0;
    animation: pulseDot 2s ease-in-out infinite;
}

/* Hide iframe when home is shown */
.demo-frame[hidden] { display: none !important; }

@media (max-width: 680px) {
    .lp-guide-card { flex-direction: column; }
    .lp-guide-arrow { transform: rotate(90deg); }
    .lp-welcome { gap: 18px; padding: 16px 16px 24px; }
}

/* ── OLD launchpad styles (kept as stubs, no longer rendered) ─────────── */
.lp-guide {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    padding: 9px 14px;
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 10px;
    flex-wrap: wrap;
}
.lp-guide-step {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.lp-guide-num {
    width: 22px; height: 22px;
    border-radius: 50%;
    background: var(--accent, #f28b3c);
    color: #111;
    font-size: .72rem;
    font-weight: 900;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.lp-guide-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}
.lp-guide-text strong {
    font-size: .78rem;
    font-weight: 700;
    color: var(--ink, #edf1f7);
    white-space: nowrap;
}
.lp-guide-text span {
    font-size: .68rem;
    color: var(--muted, #98a2b3);
    white-space: nowrap;
}
.lp-guide-arrow {
    font-size: .9rem;
    color: rgba(255,255,255,.2);
    flex-shrink: 0;
}
.lp-bar-pricing {
    margin-left: auto;
    font-size: .73rem;
    font-weight: 700;
    color: var(--accent, #f28b3c);
    text-decoration: none;
    border: 1px solid rgba(242,139,60,.28);
    border-radius: 6px;
    padding: 4px 11px;
    white-space: nowrap;
    transition: background .15s;
    flex-shrink: 0;
}
.lp-bar-pricing:hover { background: rgba(242,139,60,.10); }

/* Workflow grid — fills remaining height */
.lp-grid {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 8px;
    overflow-y: auto;
    align-content: start;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.12) transparent;
}
.lp-grid::-webkit-scrollbar { width: 4px; }
.lp-grid::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 2px; }

/* Individual workflow card */
.lp-card {
    display: flex;
    flex-direction: column;
    border-radius: 10px;
    overflow: hidden;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.08);
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: border-color .15s, transform .15s, box-shadow .15s;
}
.lp-card:hover {
    border-color: var(--accent, #f28b3c);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,.3);
}

/* Thumbnail area — 4:3, fills with cover image */
.lp-card-thumb {
    aspect-ratio: 4/3;
    overflow: hidden;
    background: rgba(255,255,255,.03);
    position: relative;
    flex-shrink: 0;
}
.lp-card-thumb img,
.lp-card-thumb video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .3s;
}
.lp-card:hover .lp-card-thumb img,
.lp-card:hover .lp-card-thumb video {
    transform: scale(1.04);
}
.lp-card-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    font-size: .72rem; color: var(--muted); padding: .5rem; text-align: center;
}
.lp-card-badge {
    position: absolute;
    bottom: 5px; right: 5px;
    background: rgba(0,0,0,.6);
    color: rgba(255,255,255,.85);
    font-size: .6rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .07em;
    padding: 2px 6px; border-radius: 4px;
    backdrop-filter: blur(4px);
    pointer-events: none;
}

/* Before → After split inside card thumb */
.lp-ba {
    display: flex;
    width: 100%; height: 100%;
    align-items: stretch;
}
.lp-ba-half {
    flex: 1;
    position: relative;
    overflow: hidden;
}
.lp-ba-half img, .lp-ba-half video {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    filter: brightness(.7) saturate(.7);
    transition: filter .3s;
}
.lp-ba-half--after img, .lp-ba-half--after video {
    filter: brightness(1) saturate(1);
}
.lp-card:hover .lp-ba-half img,
.lp-card:hover .lp-ba-half video { filter: brightness(.85) saturate(.85); }
.lp-card:hover .lp-ba-half--after img,
.lp-card:hover .lp-ba-half--after video { filter: brightness(1.05) saturate(1.05); }

.lp-ba-cap {
    position: absolute;
    bottom: 4px; left: 4px;
    font-size: .55rem; font-weight: 800; letter-spacing: .08em;
    text-transform: uppercase;
    color: rgba(255,255,255,.6);
    background: rgba(0,0,0,.45);
    padding: 1px 5px; border-radius: 3px;
    pointer-events: none;
}
.lp-ba-cap--after { left: auto; right: 4px; color: rgba(255,255,255,.9); }

.lp-ba-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    flex-shrink: 0;
    font-size: .7rem;
    color: rgba(255,255,255,.5);
    background: rgba(0,0,0,.4);
    z-index: 1;
    letter-spacing: 0;
}

/* Card footer — title + "Try →" */
.lp-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: 7px 9px;
    background: rgba(0,0,0,.2);
    flex-shrink: 0;
}
.lp-card-name {
    font-size: .78rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    min-width: 0;
}
.lp-card-tag {
    display: none; /* hidden by default to keep cards compact */
}
.lp-try {
    flex-shrink: 0;
    font-size: .72rem;
    font-weight: 800;
    color: var(--accent, #f28b3c);
    white-space: nowrap;
    transition: opacity .15s;
}
.lp-card:hover .lp-try { opacity: .7; }

/* Hide iframe when home is shown */
.demo-frame[hidden] { display: none !important; }

/* LEGACY home classes (kept for safety but no longer rendered) */
.home-mkt-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent);
    background: rgba(242,139,60,0.10);
    border: 1px solid rgba(242,139,60,0.22);
    padding: 4px 12px;
    border-radius: 40px;
    margin-bottom: 16px;
}

.workspace-home-intro h1 {
    font-size: clamp(1.5rem, 2.8vw, 2.2rem);
    font-weight: 900;
    line-height: 1.12;
    letter-spacing: -0.02em;
    margin: 0 0 0.8rem;
}

.workspace-home-intro h1 em {
    font-style: normal;
    color: var(--accent);
}

.workspace-home-intro .lede {
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.65;
    margin: 0 0 1rem;
}

.home-mkt-not-for {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 0.8rem;
    color: var(--muted);
    line-height: 1.5;
}

.home-mkt-not-for strong { color: var(--ink); }

/* ── Home right col ─────────────────────────────────────────────── */
.workspace-home-pillars {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-top: 0.25rem;
}

.home-mkt-who-label {
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--muted);
    margin: 0 0 6px;
}

.home-mkt-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 0.75rem;
}

.home-mkt-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 40px;
    padding: 5px 12px;
    font-size: 0.8rem;
    color: var(--ink);
    font-weight: 500;
    white-space: nowrap;
}

.home-mkt-pricing-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.83rem;
    font-weight: 700;
    color: var(--accent);
    text-decoration: none;
    border: 1px solid rgba(242,139,60,0.3);
    border-radius: 8px;
    padding: 7px 14px;
    background: rgba(242,139,60,0.07);
    transition: background 0.15s;
}

.home-mkt-pricing-link:hover { background: rgba(242,139,60,0.14); }

.home-grid-label {
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--muted);
    margin: 0 0 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.home-grid-hint {
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
    color: rgba(255,255,255,0.25);
    font-style: italic;
}

.workspace-home-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
    gap: 1rem;
}

.workspace-home-card {
    display: flex;
    flex-direction: column;
    border-radius: 10px;
    overflow: hidden;
    background: var(--surface-raised, rgba(255,255,255,0.04));
    border: 1px solid var(--border, rgba(255,255,255,0.08));
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
    cursor: pointer;
}

.workspace-home-card:hover {
    border-color: var(--accent, #e07b00);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}

/* Thumb overlay — "▶ Launch" appears on hover */
.workspace-home-card-thumb::after {
    content: '▶  Launch';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.52);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    opacity: 0;
    transition: opacity 0.18s;
}

.workspace-home-card:hover .workspace-home-card-thumb::after {
    opacity: 1;
}

.workspace-home-card-thumb {
    aspect-ratio: 4/3;
    overflow: hidden;
    background: rgba(255,255,255,0.04);
    position: relative;
}

.workspace-home-card-thumb img,
.workspace-home-card-thumb video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.workspace-home-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: var(--muted);
    padding: 0.5rem;
    text-align: center;
}

.home-card-output-badge {
    position: absolute;
    bottom: 7px;
    right: 7px;
    background: rgba(0,0,0,0.62);
    color: rgba(255,255,255,0.85);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    padding: 3px 7px;
    border-radius: 5px;
    backdrop-filter: blur(4px);
    pointer-events: none;
}

.workspace-home-card-copy {
    padding: 0.6rem 0.75rem 0.75rem;
}

.workspace-home-card-copy strong {
    font-size: 0.85rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    margin-bottom: 2px;
}

.home-card-launch-btn {
    display: block;
    margin-top: 9px;
    padding: 7px 12px;
    border-radius: 7px;
    background: rgba(242,139,60,0.10);
    border: 1px solid rgba(242,139,60,0.22);
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 700;
    text-align: center;
    transition: background 0.15s, color 0.15s;
}

.workspace-home-card:hover .home-card-launch-btn {
    background: var(--accent);
    border-color: var(--accent);
    color: #111318;
}

.home-card-tagline {
    display: block;
    font-size: 0.75rem;
    color: var(--muted);
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Hide iframe when home is shown */
.demo-frame[hidden] {
    display: none !important;
}

@media (max-width: 860px) {
    .workspace-home-hero {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .home-mkt-chips { flex-direction: row; }
}
@media (max-width: 720px) {
    .workspace-home-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
}

/* ============================================================
   User Dashboard
   ============================================================ */
.dash-page {
    min-height: 100vh;
    background: var(--bg, #0d1117);
    color: var(--ink, #edf1f7);
    display: flex;
    flex-direction: column;
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 24px 60px;
}

/* Header */
.dash-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 0 18px;
    border-bottom: 1px solid rgba(255,255,255,.07);
    flex-wrap: wrap;
}
.dash-back {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: .8rem;
    color: var(--muted, #98a2b3);
    text-decoration: none;
    margin-right: 4px;
}
.dash-back svg { width: 14px; height: 14px; }
.dash-back:hover { color: var(--ink, #edf1f7); }
.dash-identity { display: flex; align-items: center; gap: 12px; flex: 1; }
.dash-avatar {
    width: 40px; height: 40px; border-radius: 50%;
    background: rgba(72,199,102,.15);
    border: 1.5px solid rgba(72,199,102,.3);
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem; font-weight: 800; color: #48c766;
    flex-shrink: 0;
}
.dash-name { font-size: .95rem; font-weight: 700; margin: 0; }
.dash-email { font-size: .75rem; margin: 2px 0 0; }
.dash-header-credits { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.dash-credits-pill {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 12px; border-radius: 999px;
    background: rgba(72,199,102,.08);
    border: 1px solid rgba(72,199,102,.2);
    font-size: .78rem; font-weight: 700; color: #48c766;
}
.dash-credits-dot {
    width: 6px; height: 6px; border-radius: 50%; background: #48c766;
}
.dash-plan-badge {
    font-size: .65rem; font-weight: 800; letter-spacing: .07em;
    text-transform: uppercase;
    padding: 3px 8px; border-radius: 5px;
    background: rgba(255,255,255,.06);
    color: var(--muted, #98a2b3);
    border: 1px solid rgba(255,255,255,.1);
}

/* Tab bar */
.dash-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid rgba(255,255,255,.07);
    margin-top: 24px;
}
.dash-tab {
    background: none; border: none;
    padding: 10px 20px;
    font-size: .83rem; font-weight: 600;
    color: var(--muted, #98a2b3);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: color .15s, border-color .15s;
    margin-bottom: -1px;
}
.dash-tab:hover { color: var(--ink, #edf1f7); }
.dash-tab.is-active { color: #48c766; border-bottom-color: #48c766; }

/* Panels */
.dash-panel { display: none; padding-top: 28px; }
.dash-panel.is-active { display: block; }
.dash-panel-head { margin-bottom: 20px; }
.dash-panel-head h2 { font-size: 1.1rem; font-weight: 700; margin: 0 0 4px; }
.dash-panel-head p { font-size: .82rem; }
.dash-count {
    display: inline-block;
    background: rgba(72,199,102,.12);
    color: #48c766;
    font-size: .65rem; font-weight: 800;
    padding: 2px 7px; border-radius: 999px;
    vertical-align: middle; margin-left: 6px;
}

/* Render grid */
.dash-render-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
}
.dash-render-card {
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 10px;
    overflow: hidden;
    transition: border-color .2s;
}
.dash-render-card:hover { border-color: rgba(72,199,102,.3); }
.dash-render-thumb {
    display: block; position: relative;
    aspect-ratio: 1; overflow: hidden;
    background: rgba(0,0,0,.3);
    text-decoration: none;
}
.dash-render-media {
    width: 100%; height: 100%; object-fit: cover;
    display: block;
}
.dash-render-type-badge {
    position: absolute; top: 6px; right: 6px;
    background: rgba(0,0,0,.6);
    color: #fff; font-size: .55rem; font-weight: 800;
    letter-spacing: .06em;
    padding: 2px 5px; border-radius: 3px;
}
.dash-render-overlay {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,0);
    color: #fff; opacity: 0;
    transition: opacity .2s, background .2s;
}
.dash-render-thumb:hover .dash-render-overlay {
    opacity: 1; background: rgba(0,0,0,.4);
}
.dash-render-meta { padding: 8px 10px 4px; }
.dash-render-title { font-size: .75rem; font-weight: 600; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-render-date { font-size: .65rem; margin: 2px 0 0; }
.dash-render-actions {
    display: flex; gap: 6px; padding: 6px 8px 8px;
}

/* Action buttons */
.dash-action-btn {
    flex: 1; text-align: center;
    padding: 5px 8px;
    font-size: .65rem; font-weight: 700;
    border-radius: 6px; border: 1px solid rgba(255,255,255,.1);
    background: rgba(255,255,255,.04);
    color: var(--ink, #edf1f7);
    text-decoration: none; cursor: pointer;
    transition: background .15s;
}
.dash-action-btn:hover { background: rgba(255,255,255,.09); }
.dash-action-danger { color: #fc814a; border-color: rgba(252,129,74,.2); }
.dash-action-danger:hover { background: rgba(252,129,74,.08); }

/* Stats row (credits tab) */
.dash-stats-row {
    display: flex; flex-wrap: wrap; gap: 12px;
    margin-bottom: 24px;
}
.dash-stat {
    flex: 1; min-width: 120px;
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 10px;
    padding: 16px 20px;
}
.dash-stat-val { font-size: 1.6rem; font-weight: 800; margin: 4px 0; }
.dash-add-credits-btn {
    display: inline-block;
    padding: 10px 20px;
    background: #48c766; color: #0a1a0e;
    font-weight: 800; font-size: .85rem;
    border-radius: 8px; text-decoration: none;
    transition: background .15s;
}
.dash-add-credits-btn:hover { background: #5dd97a; }

/* Analytics split bar */
.dash-analytics { margin-bottom: 28px; }
.dash-split-bar {
    display: flex; height: 32px; border-radius: 8px;
    overflow: hidden; margin: 10px 0 8px;
    background: rgba(255,255,255,.05);
}
.dash-split-seg {
    display: flex; align-items: center; justify-content: center;
    font-size: .68rem; font-weight: 800; color: rgba(0,0,0,.8);
    transition: width .6s ease;
    min-width: 0;
}
.dash-split-image { background: #48c766; }
.dash-split-video { background: #63b3ed; }
.dash-split-legend { font-size: .75rem; color: var(--muted, #98a2b3); display: flex; align-items: center; }
.dash-legend-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; margin-right: 5px; }
.dash-legend-image { background: #48c766; }
.dash-legend-video { background: #63b3ed; }

/* Transaction list */
.dash-tx-list { max-height: 380px; overflow-y: auto; }
.dash-tx-row {
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    gap: 12px; align-items: center;
    padding: 9px 0;
    border-bottom: 1px solid rgba(255,255,255,.05);
    font-size: .78rem;
}
.dash-tx-note { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-tx-date { font-size: .68rem; }
.dash-tx-delta { font-weight: 800; min-width: 36px; text-align: right; }
.dash-tx-pos { color: #48c766; }
.dash-tx-neg { color: #fc814a; }
.dash-tx-bal { min-width: 36px; text-align: right; }

/* Profile grid */
.dash-profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}
.dash-profile-card {
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 10px;
    padding: 20px;
    display: flex; flex-direction: column; gap: 10px;
}
.dash-input {
    width: 100%; box-sizing: border-box;
    padding: 9px 12px;
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 7px;
    color: var(--ink, #edf1f7);
    font-size: .85rem;
}
.dash-input:focus { outline: none; border-color: #48c766; }
.dash-profile-row { display: flex; gap: 8px; }
.dash-profile-row .dash-input { flex: 1; }
.dash-profile-save-btn {
    padding: 9px 16px;
    background: rgba(72,199,102,.12);
    border: 1px solid rgba(72,199,102,.25);
    border-radius: 7px;
    color: #48c766; font-weight: 700; font-size: .82rem;
    cursor: pointer; white-space: nowrap;
    transition: background .15s;
}
.dash-profile-save-btn:hover { background: rgba(72,199,102,.22); }

/* Empty state */
.dash-empty {
    padding: 48px 24px; text-align: center;
    color: var(--muted, #98a2b3); font-size: .9rem;
}
.dash-empty a { color: #48c766; }

/* Responsive */
@media (max-width: 600px) {
    .dash-render-grid { grid-template-columns: repeat(2, 1fr); }
    .dash-stats-row .dash-stat { min-width: 100%; }
    .dash-tx-row { grid-template-columns: 1fr auto auto; }
    .dash-tx-bal { display: none; }
}

/* ============================================================
   Account page (legacy — kept for any other templates)
   ============================================================ */
.account-page {
    min-height: 100vh;
    background: var(--bg, #0e0e0e);
    display: flex;
    flex-direction: column;
}

.account-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--border, #1e1e1e);
}

.account-back-link {
    display: flex;
    align-items: center;
    gap: .4rem;
    color: var(--text-muted, #888);
    text-decoration: none;
    font-size: .85rem;
    transition: color .15s;
}
.account-back-link:hover { color: var(--text, #eee); }
.account-back-link svg { width: 16px; height: 16px; }

.account-page-brand {
    display: flex;
    align-items: center;
    gap: .6rem;
    font-size: .9rem;
}
.account-page-brand .brand-mark {
    background: var(--accent, #7c6ff7);
    color: #fff;
    font-weight: 700;
    font-size: .75rem;
    padding: .2em .45em;
    border-radius: 4px;
    letter-spacing: .04em;
}

.account-page-body {
    max-width: 680px;
    width: 100%;
    margin: 2.5rem auto;
    padding: 0 1.5rem 4rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.account-card {
    background: var(--surface, #141414);
    border: 1px solid var(--border, #1e1e1e);
    border-radius: 12px;
    padding: 1.5rem;
}

.account-card-head {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.account-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--accent, #7c6ff7);
    color: #fff;
    font-size: 1.4rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.account-name {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 600;
}
.account-email { margin: .15rem 0 0; font-size: .85rem; }

.account-stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.account-stat-card {
    background: var(--surface, #141414);
    border: 1px solid var(--border, #1e1e1e);
    border-radius: 12px;
    padding: 1.25rem 1rem;
}
.account-stat-label { margin: 0 0 .35rem; font-size: .7rem; letter-spacing: .08em; }
.account-stat-value { margin: 0 0 .25rem; font-size: 1.4rem; font-weight: 700; }
.account-stat-card .muted { margin: 0; font-size: .78rem; }
.account-stat-upgrade-link {
    font-size: .78rem;
    font-weight: 700;
    color: var(--accent);
    text-decoration: none;
}
.account-stat-upgrade-link:hover { text-decoration: underline; }

.account-actions-card h2 {
    margin: 0 0 1rem;
    font-size: .85rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--text-muted, #888);
}

.account-actions-list {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.account-action-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .75rem 1rem;
    border-radius: 8px;
    background: var(--bg, #0e0e0e);
    border: 1px solid var(--border, #1e1e1e);
    color: var(--text, #eee);
    text-decoration: none;
    font-size: .9rem;
    cursor: pointer;
    width: 100%;
    text-align: left;
    transition: background .15s, border-color .15s;
}
.account-action-row:hover { background: var(--surface-hover, #1a1a1a); border-color: var(--border-hover, #2e2e2e); }
.account-action-row svg { width: 16px; height: 16px; flex-shrink: 0; color: var(--text-muted, #888); }

.account-action-admin { color: var(--accent, #7c6ff7); border-color: color-mix(in srgb, var(--accent, #7c6ff7) 30%, transparent); }
.account-action-admin:hover { background: color-mix(in srgb, var(--accent, #7c6ff7) 8%, transparent); }

.account-action-logout { color: #e05c5c; border-color: color-mix(in srgb, #e05c5c 25%, transparent); }
.account-action-logout:hover { background: color-mix(in srgb, #e05c5c 8%, transparent); }

/* Admin nav link */
.nav-admin-link {
    font-weight: 600;
}
button.nav-show-splash-btn {
    background: none;
    border: none;
    cursor: pointer;
    font: inherit;
    font-size: 0.82rem;
    opacity: 0.65;
    padding: 0;
}
button.nav-show-splash-btn:hover { opacity: 1; }

@media (max-width: 600px) {
    .account-stats-row { grid-template-columns: 1fr; }
    .account-page-header { padding: .8rem 1rem; }
}

/* ═══════════════════════════════════════════════════════════════════════
   TABBED WORKFLOW INTERFACE
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Tab bar ─────────────────────────────────────────────────────────── */
.workspace-tab-bar {
    display: flex;
    align-items: center;
    gap: .25rem;
    padding: .25rem .5rem .25rem .75rem;
    background: rgba(0,0,0,.25);
    border-bottom: 1px solid var(--panel-border, rgba(255,255,255,.08));
    overflow-x: auto;
    flex-shrink: 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.15) transparent;
}
.workspace-tab-bar::-webkit-scrollbar { height: 3px; }
.workspace-tab-bar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 2px; }

.workspace-tab-list {
    display: flex;
    gap: .2rem;
    flex: 1;
    overflow-x: auto;
    scrollbar-width: none;
}
.workspace-tab-list::-webkit-scrollbar { display: none; }

/* Individual tab button */
.workspace-tab {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .28rem .65rem .28rem .55rem;
    background: rgba(255,255,255,.04);
    border: 1px solid var(--panel-border, rgba(255,255,255,.08));
    border-radius: 8px 8px 0 0;
    border-bottom: none;
    color: var(--muted, #98a2b3);
    font-size: .78rem;
    white-space: nowrap;
    cursor: pointer;
    transition: background .15s, color .15s;
    max-width: 180px;
    position: relative;
}
.workspace-tab:hover { background: rgba(255,255,255,.07); color: var(--ink, #edf1f7); }
.workspace-tab.is-active {
    background: rgba(255,255,255,.10);
    border-color: rgba(255,255,255,.16);
    color: var(--ink, #edf1f7);
    box-shadow: 0 -2px 0 var(--accent, #f28b3c) inset;
}

/* Floating tab — dashed border signals temporary / not yet anchored */
.workspace-tab.tab-state-floating {
    border-style: dashed;
    opacity: .8;
}

/* Running tab — amber left-border stripe so it's visible without the spinner alone */
.workspace-tab.tab-state-running {
    border-left-color: var(--accent, #f28b3c);
    border-left-width: 2px;
}

/* Complete tab — green left-border stripe */
.workspace-tab.tab-state-complete {
    border-left-color: #4caf50;
    border-left-width: 2px;
}

/* Compound queue tab — always visually distinct and anchored */
.workspace-tab.tab-compound {
    border-left: 2px solid var(--accent, #f28b3c);
    color: var(--accent, #f28b3c);
    font-weight: 600;
}
.workspace-tab.tab-compound.is-active {
    color: var(--accent, #f28b3c);
    box-shadow: 0 -2px 0 var(--accent, #f28b3c) inset;
    background: rgba(242, 139, 60, .1);
}
.tab-float-mark {
    font-size: .7rem;
    color: var(--muted);
    line-height: 1;
}

/* Running tab — pulsing orange dot */
/* ── Workflow queue node: spinner overlay on top of thumbnail ───────────── */
