:root {
    color-scheme: dark;
    --bg: #070a12;
    --bg-soft: #0d1220;
    --surface: #121722;
    --surface-raised: #171d2a;
    --surface-muted: #202838;
    --ink: #f7f8fb;
    --ink-soft: #dbe2ef;
    --muted: #9aa6bb;
    --muted-strong: #c6cfdd;
    --line: #293244;
    --line-soft: #20293a;
    --primary: #f43f8f;
    --primary-strong: #f97316;
    --primary-soft: rgba(244, 63, 143, 0.13);
    --accent: #a855f7;
    --accent-soft: rgba(168, 85, 247, 0.15);
    --blue: #4f7cff;
    --blue-soft: rgba(79, 124, 255, 0.15);
    --warm: #fb923c;
    --warm-soft: rgba(251, 146, 60, 0.15);
    --danger: #fb7185;
    --danger-soft: rgba(251, 113, 133, 0.14);
    --success: #34d399;
    --success-soft: rgba(52, 211, 153, 0.14);
    --ig-gradient: linear-gradient(135deg, #405de6 0%, #833ab4 34%, #c13584 58%, #e1306c 75%, #fd7e14 100%);
    --ig-gradient-soft: linear-gradient(135deg, rgba(64, 93, 230, 0.22), rgba(193, 53, 132, 0.18) 56%, rgba(253, 126, 20, 0.16));
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.25);
    --shadow-md: 0 20px 56px rgba(0, 0, 0, 0.32);
    --shadow-lg: 0 34px 100px rgba(0, 0, 0, 0.48);
    --radius: 8px;
    --radius-sm: 6px;
    --sidebar: 270px;
    --focus: 0 0 0 4px rgba(225, 48, 108, 0.25);
}

* {
    box-sizing: border-box;
}

.is-hidden {
    display: none !important;
}

html {
    min-height: 100%;
}

body {
    margin: 0;
    min-height: 100%;
    background: #070a12;
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, Helvetica, sans-serif;
    font-size: 15px;
    line-height: 1.45;
}

a {
    color: inherit;
    text-decoration: none;
}

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

button,
.button,
.nav a,
.nav button {
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    color: var(--ink);
    cursor: pointer;
    display: inline-flex;
    font-weight: 750;
    gap: 8px;
    justify-content: center;
    min-height: 40px;
    padding: 9px 14px;
    transition: background 140ms ease, border-color 140ms ease, box-shadow 140ms ease, color 140ms ease, transform 140ms ease;
    white-space: nowrap;
}

button:hover,
.button:hover,
.nav a:hover,
.nav button:hover {
    border-color: #b7c5cc;
    box-shadow: var(--shadow-sm);
}

button:focus-visible,
.button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: none;
    box-shadow: var(--focus);
}

button.primary,
.button.primary,
.primary {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
}

button.primary:hover,
.button.primary:hover,
.primary:hover {
    background: var(--primary-strong);
    border-color: var(--primary-strong);
}

button.subtle,
.button.subtle {
    background: var(--surface-muted);
    border-color: var(--line-soft);
    color: var(--ink-soft);
}

button[disabled],
.button[aria-disabled="true"] {
    cursor: not-allowed;
    opacity: 0.58;
}

.app-frame {
    display: grid;
    grid-template-columns: var(--sidebar) minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    background: rgba(255, 255, 255, 0.92);
    border-right: 1px solid var(--line-soft);
    display: flex;
    flex-direction: column;
    gap: 22px;
    min-height: 100vh;
    padding: 22px;
    position: sticky;
    top: 0;
}

.menu-toggle,
.sidebar-close,
.sidebar-backdrop {
    display: none;
}

.brand {
    align-items: center;
    display: inline-flex;
    gap: 11px;
    min-width: 0;
}

.brand-panel {
    padding-bottom: 4px;
}

.brand-mark {
    align-items: center;
    background:
        linear-gradient(135deg, var(--primary) 0%, var(--blue) 52%, var(--accent) 100%);
    border-radius: var(--radius-sm);
    color: #ffffff;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 12px;
    font-weight: 850;
    height: 38px;
    justify-content: center;
    letter-spacing: 0;
    width: 38px;
}

.brand-copy {
    display: grid;
    gap: 2px;
    line-height: 1.08;
    min-width: 0;
}

.brand-copy strong {
    color: var(--ink);
    font-size: 16px;
    letter-spacing: 0;
}

.brand-copy small,
.topbar-label,
.page-kicker,
.eyebrow {
    color: var(--muted);
    font-size: 12px;
    font-weight: 850;
    letter-spacing: 0;
    text-transform: uppercase;
}

.side-nav {
    display: grid;
    gap: 6px;
}

.side-nav a {
    align-items: center;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    color: var(--muted-strong);
    display: flex;
    font-weight: 760;
    gap: 11px;
    min-height: 42px;
    padding: 10px 12px;
    position: relative;
}

.side-nav a::before {
    background: #d4dde3;
    border-radius: 999px;
    content: "";
    height: 7px;
    width: 7px;
}

.side-nav a:hover {
    background: var(--surface-muted);
    border-color: var(--line-soft);
    color: var(--ink);
}

.side-nav a.active {
    background: var(--primary-soft);
    border-color: #b9ded8;
    color: var(--primary-strong);
}

.side-nav a.active::before {
    background: var(--primary);
}

.side-nav a.active::after {
    background: var(--primary);
    border-radius: 999px;
    content: "";
    height: 22px;
    margin-left: auto;
    width: 3px;
}

.side-links {
    border-top: 1px solid var(--line-soft);
    display: grid;
    gap: 9px;
    margin-top: auto;
    padding-top: 18px;
}

.side-links a {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.side-links a:hover {
    color: var(--primary-strong);
}

.main-area {
    min-width: 0;
}

.topbar {
    align-items: center;
    backdrop-filter: blur(18px);
    background: rgba(255, 255, 255, 0.78);
    border-bottom: 1px solid var(--line-soft);
    display: flex;
    justify-content: space-between;
    min-height: 72px;
    padding: 0 34px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.topbar form,
.nav form,
.actions form,
.delete-inline {
    margin: 0;
}

.public-topbar {
    left: 0;
    right: 0;
}

.public-brand .brand-mark {
    height: 34px;
    width: 34px;
}

.public-nav,
.nav {
    align-items: center;
    display: flex;
    gap: 14px;
}

.public-nav a:not(.button),
.nav a:not(.button) {
    color: var(--muted-strong);
    font-weight: 760;
}

.public-nav a:not(.button):hover,
.nav a:not(.button):hover {
    color: var(--ink);
}

.user-stack {
    display: block;
    min-width: 0;
}

.user-stack strong {
    display: inline-block;
    margin-top: 2px;
    max-width: min(52vw, 520px);
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: bottom;
    white-space: nowrap;
}

.user-role {
    background: var(--primary-soft);
    border: 1px solid #b9ded8;
    border-radius: 999px;
    color: var(--primary-strong);
    display: inline-flex;
    font-size: 11px;
    font-weight: 850;
    margin-left: 8px;
    padding: 3px 8px;
    text-transform: uppercase;
    vertical-align: middle;
}

.shell {
    margin: 0 auto;
    max-width: 1320px;
    padding: 34px;
    width: 100%;
}

.page-head,
.studio-toolbar {
    align-items: flex-start;
    display: flex;
    gap: 22px;
    justify-content: space-between;
    margin-bottom: 22px;
}

.page-kicker,
.eyebrow {
    color: var(--primary);
    margin: 0 0 8px;
}

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

h1 {
    font-size: 34px;
    letter-spacing: 0;
    line-height: 1.12;
    margin-bottom: 7px;
}

h2 {
    font-size: 21px;
    letter-spacing: 0;
    line-height: 1.2;
    margin-bottom: 8px;
}

h3 {
    font-size: 16px;
    margin-bottom: 6px;
}

.muted {
    color: var(--muted);
    margin-bottom: 0;
}

.panel,
.empty,
.table-wrap,
.auth-card,
.creator-workspace,
.studio-metric,
.metric-card {
    background: var(--surface);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.panel,
.empty {
    padding: 22px;
}

.empty {
    display: grid;
    gap: 10px;
    justify-items: center;
    min-height: 180px;
    place-content: center;
    text-align: center;
}

.empty p {
    max-width: 560px;
}

.narrow {
    margin: 7vh auto 0;
    max-width: 450px;
}

.auth-card {
    box-shadow: var(--shadow-md);
    padding: 30px;
}

.auth-card .form {
    margin-top: 22px;
}

.flash,
.alert {
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    font-weight: 720;
    margin-bottom: 18px;
    padding: 12px 14px;
}

.flash.success,
.alert.success {
    background: var(--success-soft);
    border-color: #bde8ca;
    color: #14532d;
}

.flash.error,
.alert.error {
    background: var(--danger-soft);
    border-color: #ffd1cc;
    color: var(--danger);
}

.metric-grid,
.studio-metrics {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 24px;
}

.metric-card {
    display: grid;
    gap: 9px;
    min-height: 104px;
    padding: 17px;
    position: relative;
}

.metric-card::before {
    background: var(--primary);
    border-radius: 999px;
    content: "";
    height: 4px;
    left: 17px;
    position: absolute;
    right: 17px;
    top: 0;
}

.metric-card.danger::before {
    background: var(--danger);
}

.metric-card span,
.studio-metric span:not(.metric-icon) {
    color: var(--muted-strong);
    font-size: 13px;
    font-weight: 850;
    letter-spacing: 0;
}

.metric-card strong {
    color: var(--ink);
    font-size: 34px;
    line-height: 1;
}

.studio-toolbar-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.studio-metric {
    align-items: center;
    display: flex;
    gap: 14px;
    min-height: 94px;
    padding: 16px;
}

.studio-metric strong {
    color: var(--ink);
    display: block;
    font-size: 28px;
    line-height: 1;
}

.studio-metric small {
    color: var(--muted);
    display: block;
    margin-top: 3px;
}

.metric-icon {
    align-items: center;
    background: var(--primary-soft);
    border-radius: var(--radius);
    display: inline-flex;
    flex: 0 0 auto;
    height: 48px;
    justify-content: center;
    position: relative;
    width: 48px;
}

.metric-icon::before,
.metric-icon::after {
    background: var(--primary);
    border-radius: 999px;
    content: "";
    position: absolute;
}

.metric-icon::before {
    height: 20px;
    width: 20px;
}

.metric-icon::after {
    height: 4px;
    transform: translate(11px, 12px);
    width: 16px;
}

.metric-icon.warm {
    background: var(--warm-soft);
}

.metric-icon.warm::before,
.metric-icon.warm::after {
    background: var(--warm);
}

.metric-icon.blue {
    background: var(--blue-soft);
}

.metric-icon.blue::before,
.metric-icon.blue::after {
    background: var(--blue);
}

.metric-icon.violet {
    background: var(--accent-soft);
}

.metric-icon.violet::before,
.metric-icon.violet::after {
    background: var(--accent);
}

label {
    color: var(--ink-soft);
    display: grid;
    font-weight: 720;
    gap: 7px;
}

input,
select,
textarea {
    background: #ffffff;
    border: 1px solid #cbd5dc;
    border-radius: var(--radius-sm);
    color: var(--ink);
    min-height: 42px;
    padding: 9px 11px;
    width: 100%;
}

input:hover,
select:hover,
textarea:hover {
    border-color: #aebdc6;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
    box-shadow: var(--focus);
    outline: none;
}

textarea {
    min-height: 112px;
    resize: vertical;
}

.form {
    display: grid;
    gap: 16px;
}

.form.compact {
    gap: 12px;
}

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

.checkbox {
    align-items: center;
    display: flex;
    font-weight: 650;
    gap: 10px;
}

.checkbox input {
    min-height: auto;
    width: auto;
}

.actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.delete-inline,
.danger-form {
    margin-top: 12px;
}

.delete-inline button,
.danger-form button,
.drawer-delete button {
    background: var(--danger-soft);
    border-color: #ffd1cc;
    color: var(--danger);
}

.delete-inline button:hover,
.danger-form button:hover,
.drawer-delete button:hover {
    background: #ffe7e3;
    border-color: #ffb8b0;
}

.table-wrap {
    overflow-x: auto;
}

table {
    border-collapse: collapse;
    min-width: 880px;
    width: 100%;
}

th,
td {
    border-bottom: 1px solid var(--line-soft);
    padding: 13px 14px;
    text-align: left;
    vertical-align: top;
}

th {
    background: var(--surface-raised);
    color: var(--muted-strong);
    font-size: 12px;
    font-weight: 850;
    letter-spacing: 0;
    position: sticky;
    text-transform: uppercase;
    top: 0;
}

tbody tr:hover td {
    background: #fbfdfd;
}

tbody tr:last-child td {
    border-bottom: 0;
}

.caption {
    max-width: 420px;
    white-space: pre-wrap;
}

.table-subline {
    display: block;
    font-size: 12px;
    margin-top: 5px;
}

.error-row td {
    background: var(--danger-soft);
    color: var(--danger);
}

.status {
    align-items: center;
    background: var(--surface-muted);
    border: 1px solid transparent;
    border-radius: 999px;
    color: var(--muted-strong);
    display: inline-flex;
    font-size: 12px;
    font-weight: 850;
    line-height: 1;
    min-height: 24px;
    padding: 5px 9px;
    white-space: nowrap;
}

.status.queued {
    background: var(--blue-soft);
    color: #1d4ed8;
}

.status.publishing {
    background: var(--warm-soft);
    color: #a35a00;
}

.status.published {
    background: var(--success-soft);
    color: var(--success);
}

.status.failed,
.status.canceled {
    background: var(--danger-soft);
    color: var(--danger);
}

.api-info,
.log-list {
    display: grid;
    gap: 10px;
}

.token-box {
    background: linear-gradient(135deg, var(--primary-soft), #fff);
    border: 1px solid #b9ded8;
    border-radius: var(--radius);
    display: grid;
    gap: 10px;
    margin: 16px 0;
    padding: 14px;
}

code {
    background: var(--surface-muted);
    border: 1px solid var(--line-soft);
    border-radius: 5px;
    color: var(--ink-soft);
    padding: 2px 5px;
}

.token-box code {
    background: #ffffff;
    border: 1px solid var(--line-soft);
    color: #101827;
    display: block;
    overflow-wrap: anywhere;
    padding: 10px;
}

.two-factor-qr {
    background: #ffffff;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    display: grid;
    margin: 18px auto;
    max-width: 240px;
    padding: 14px;
    place-items: center;
}

.two-factor-qr img {
    aspect-ratio: 1;
    display: block;
    width: min(100%, 212px);
}

.settings-grid {
    align-items: start;
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
}

.settings-stack {
    display: grid;
    gap: 18px;
}

.mcp-panel,
.mcp-guide {
    display: grid;
    gap: 18px;
}

.mcp-panel-head {
    align-items: flex-start;
    display: flex;
    gap: 18px;
    justify-content: space-between;
}

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

.mcp-info-card {
    background: var(--surface-raised);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    display: grid;
    gap: 8px;
    min-height: 112px;
    padding: 14px;
}

.mcp-info-card span {
    color: var(--muted-strong);
    font-size: 12px;
    font-weight: 850;
    text-transform: uppercase;
}

.mcp-info-card p {
    color: var(--muted);
    margin-bottom: 0;
}

.mcp-info-card code {
    align-self: start;
    overflow-wrap: anywhere;
}

.mcp-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.mcp-fast-card {
    background: var(--surface-raised);
    border: 1px solid var(--line-soft);
    border-left: 3px solid var(--primary);
    border-radius: var(--radius);
    display: grid;
    gap: 14px;
    padding: 16px;
}

.mini-label {
    color: var(--primary);
    display: inline-flex;
    font-size: 12px;
    font-weight: 850;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.mcp-fast-card h3 {
    margin-bottom: 6px;
}

.mcp-fast-card p {
    margin-bottom: 0;
}

.mcp-fast-card pre {
    margin: 0;
}

.setup-steps {
    counter-reset: setup-step;
    display: grid;
    gap: 12px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.setup-steps li {
    background: var(--surface-raised);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    display: grid;
    gap: 8px;
    padding: 15px 15px 15px 58px;
    position: relative;
}

.setup-steps li::before {
    align-items: center;
    background: var(--primary-soft);
    border-radius: 50%;
    color: var(--primary);
    content: counter(setup-step);
    counter-increment: setup-step;
    display: inline-flex;
    font-size: 13px;
    font-weight: 900;
    height: 30px;
    justify-content: center;
    left: 15px;
    position: absolute;
    top: 15px;
    width: 30px;
}

.setup-steps strong {
    color: var(--ink);
}

.setup-steps span {
    color: var(--muted);
}

.codex-fields {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.codex-fields span {
    background: var(--surface-muted);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-sm);
    color: var(--ink-soft);
    overflow-wrap: anywhere;
    padding: 10px;
}

.codex-fields b {
    color: var(--muted);
    display: block;
    font-size: 12px;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.setup-steps pre {
    margin: 0;
    overflow-x: auto;
}

.setup-steps pre code {
    background: transparent;
    border: 0;
    color: inherit;
    padding: 0;
}

.mcp-note {
    align-items: flex-start;
    background: rgba(79, 124, 255, 0.08);
    border: 1px solid rgba(79, 124, 255, 0.2);
    border-radius: var(--radius);
    display: grid;
    gap: 5px;
    padding: 14px 16px;
}

.mcp-note strong {
    color: var(--ink);
}

.mcp-note span {
    color: var(--muted);
}

.mcp-tools {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mcp-tools h3 {
    flex: 1 0 100%;
    margin-bottom: 2px;
}

.mcp-tools span {
    background: var(--surface-muted);
    border: 1px solid var(--line-soft);
    border-radius: 999px;
    color: var(--muted-strong);
    font-size: 13px;
    font-weight: 760;
    padding: 6px 10px;
}

.danger-zone {
    background: transparent;
}

.danger-zone details {
    display: grid;
    gap: 14px;
}

.danger-zone summary {
    align-items: center;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    list-style: none;
}

.danger-zone summary::-webkit-details-marker {
    display: none;
}

.danger-zone summary::after {
    color: var(--muted);
    content: "+";
    font-size: 22px;
    font-weight: 700;
}

.danger-zone details[open] summary::after {
    content: "-";
}

.danger-zone summary span {
    display: grid;
    gap: 3px;
}

.danger-zone summary strong {
    color: var(--danger);
}

.danger-zone summary small {
    color: var(--muted);
    font-size: 13px;
}

.danger-zone-body {
    border-top: 1px solid var(--line-soft);
    margin-top: 14px;
    padding-top: 18px;
}

.diagnostic {
    margin-bottom: 18px;
}

.diagnostic ul {
    line-height: 1.7;
    margin-bottom: 0;
}

.error-text {
    color: var(--danger);
    font-weight: 750;
}

.log-entry {
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-sm);
    padding: 12px;
}

.log-entry summary {
    align-items: center;
    cursor: pointer;
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

pre {
    background: #121a24;
    border-radius: var(--radius-sm);
    color: #e5edf4;
    font-size: 13px;
    line-height: 1.5;
    margin: 12px 0 0;
    overflow-x: auto;
    padding: 12px;
    white-space: pre-wrap;
}

.legal {
    max-width: 900px;
}

.home-hero {
    align-items: center;
    display: grid;
    gap: 44px;
    grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
    min-height: calc(100vh - 210px);
    padding-bottom: 42px;
}

.home-hero h1 {
    font-size: clamp(42px, 6vw, 72px);
    line-height: 0.98;
    margin-bottom: 18px;
}

.home-copy {
    color: var(--ink-soft);
    font-size: 19px;
    line-height: 1.55;
    margin-bottom: 0;
    max-width: 680px;
}

.sales-hero {
    align-items: center;
    display: grid;
    gap: 44px;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 0.9fr);
    min-height: calc(100vh - 170px);
    padding: 34px 0 44px;
}

.sales-copy h1 {
    font-size: clamp(46px, 7vw, 82px);
    line-height: 0.95;
    margin-bottom: 18px;
}

.home-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 26px;
}

.sales-proof {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 22px;
}

.sales-proof span {
    background: rgba(255, 255, 255, 0.055);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    color: var(--muted-strong);
    font-size: 13px;
    font-weight: 800;
    padding: 7px 10px;
}

.sales-product-shot {
    background:
        radial-gradient(circle at 18% 0%, rgba(244, 63, 143, 0.24), transparent 35%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025)),
        #101622;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.shot-header {
    align-items: center;
    background: rgba(255, 255, 255, 0.055);
    display: flex;
    gap: 8px;
    min-height: 42px;
    padding: 12px 15px;
}

.shot-header span {
    background: rgba(255, 255, 255, 0.55);
    border-radius: 999px;
    height: 8px;
    width: 8px;
}

.shot-header strong {
    color: var(--muted-strong);
    font-size: 12px;
    margin-left: auto;
}

.shot-body {
    display: grid;
    gap: 14px;
    padding: 18px;
}

.shot-chat,
.shot-queue {
    background: rgba(12, 17, 28, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    padding: 14px;
}

.shot-chat small {
    color: #ff9cca;
    font-weight: 850;
    text-transform: uppercase;
}

.shot-chat p {
    color: var(--ink-soft);
    margin-bottom: 0;
}

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

.shot-grid span {
    aspect-ratio: 1 / 1;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 198, 109, 0.8)),
        var(--ig-gradient);
    border-radius: var(--radius-sm);
    min-height: 70px;
}

.shot-grid span:nth-child(2) {
    background: linear-gradient(135deg, #9fb5ff, #34d399);
}

.shot-grid span:nth-child(3) {
    background: linear-gradient(135deg, #ff9aaa, #fd7e14);
}

.shot-grid span:nth-child(4) {
    background: linear-gradient(135deg, #8af0c6, #f7f8fb);
}

.shot-queue {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.shot-queue strong {
    color: var(--ink);
}

.shot-queue small {
    color: var(--muted);
    display: block;
    margin-top: 3px;
}

.sales-section,
.sales-flow,
.sales-cta {
    margin-top: 22px;
}

.sales-section-head {
    max-width: 780px;
}

.sales-section-head h2,
.sales-cta h2 {
    font-size: clamp(28px, 4vw, 42px);
}

.sales-features {
    padding-bottom: 0;
}

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

.sales-flow div,
.sales-cta {
    background: rgba(18, 23, 34, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
    padding: 18px;
}

.sales-flow span {
    align-items: center;
    background: var(--primary-soft);
    border-radius: 50%;
    color: #ff9cca;
    display: inline-flex;
    font-weight: 900;
    height: 30px;
    justify-content: center;
    margin-bottom: 12px;
    width: 30px;
}

.sales-flow strong {
    color: var(--ink);
    display: block;
    margin-bottom: 6px;
}

.sales-flow p {
    color: var(--muted);
    margin-bottom: 0;
}

.sales-cta {
    align-items: center;
    display: flex;
    gap: 18px;
    justify-content: space-between;
    margin-bottom: 34px;
}

.home-console {
    background: var(--surface);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.console-top {
    align-items: center;
    background: #17202a;
    display: flex;
    gap: 7px;
    min-height: 42px;
    padding: 12px 15px;
}

.console-top span {
    background: #ffffff;
    border-radius: 999px;
    height: 8px;
    opacity: 0.72;
    width: 8px;
}

.console-body {
    display: grid;
    gap: 10px;
    padding: 16px;
}

.console-row {
    align-items: center;
    background: var(--surface-raised);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-sm);
    display: flex;
    gap: 12px;
    justify-content: space-between;
    min-height: 58px;
    padding: 12px;
}

.feature-strip {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding-bottom: 34px;
}

.feature-strip div {
    background: var(--surface);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    display: grid;
    gap: 6px;
    padding: 18px;
}

.feature-strip strong {
    color: var(--ink);
}

.feature-strip span {
    color: var(--muted);
}

.creator-workspace {
    overflow: hidden;
}

.creator-list-head {
    align-items: center;
    border-bottom: 1px solid var(--line-soft);
    display: flex;
    gap: 18px;
    justify-content: space-between;
    padding: 22px 24px;
}

.creator-list-head h2 {
    margin-bottom: 4px;
}

.creator-search {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.creator-search input {
    min-width: 250px;
}

.filter-tabs {
    background: var(--surface-muted);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-sm);
    display: inline-flex;
    gap: 2px;
    padding: 3px;
}

.filter-tabs button {
    background: transparent;
    border: 0;
    box-shadow: none;
    color: var(--muted-strong);
    min-height: 34px;
    padding: 7px 10px;
}

.filter-tabs button.active {
    background: #ffffff;
    color: var(--primary-strong);
    box-shadow: var(--shadow-sm);
}

.creator-table {
    display: grid;
    padding: 0 24px 24px;
}

.creator-table-head,
.creator-row {
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(260px, 1.35fr) minmax(130px, 0.7fr) minmax(90px, 0.45fr) minmax(190px, 0.9fr) minmax(90px, 0.4fr);
}

.creator-table-head {
    background: var(--surface-raised);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius) var(--radius) 0 0;
    color: var(--muted-strong);
    font-size: 12px;
    font-weight: 850;
    letter-spacing: 0;
    margin-top: 20px;
    padding: 13px 16px;
    text-transform: uppercase;
}

.creator-row {
    align-items: center;
    background: #ffffff;
    border: 1px solid var(--line-soft);
    border-top: 0;
    min-height: 76px;
    padding: 14px 16px;
    transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.creator-row:hover {
    border-color: #a7d7cf;
    box-shadow: 0 14px 34px rgba(15, 118, 110, 0.1);
    transform: translateY(-1px);
    z-index: 1;
}

.creator-row:last-child {
    border-radius: 0 0 var(--radius) var(--radius);
}

.creator-row[hidden] {
    display: none;
}

.creator-account {
    align-items: center;
    display: flex;
    gap: 12px;
    min-width: 0;
}

.account-avatar {
    align-items: center;
    background: linear-gradient(135deg, var(--primary), var(--blue));
    border-radius: 50%;
    color: #ffffff;
    display: inline-flex;
    flex: 0 0 auto;
    font-weight: 850;
    height: 42px;
    justify-content: center;
    overflow: hidden;
    position: relative;
    width: 42px;
}

.account-avatar img {
    display: block;
    height: 100%;
    inset: 0;
    object-fit: cover;
    position: absolute;
    width: 100%;
}

.account-avatar.has-image {
    background: #0c111c;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.account-avatar-fallback {
    position: relative;
    z-index: 1;
}

.account-avatar.has-image .account-avatar-fallback {
    opacity: 0;
}

.creator-account strong {
    color: var(--ink);
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.creator-account small,
.creator-subline,
.creator-queue-count small,
.creator-next-time small {
    color: var(--muted);
    display: block;
    font-size: 13px;
    margin-top: 2px;
}

.creator-account .platform-line {
    color: var(--primary-strong);
    font-weight: 760;
}

.creator-queue-count strong {
    color: var(--ink);
    display: block;
    font-size: 18px;
}

.creator-next-time strong {
    color: var(--ink-soft);
    display: block;
}

.creator-actions {
    display: flex;
    justify-content: flex-end;
}

.drawer-edit-button {
    min-width: 78px;
}

.account-drawer {
    background: transparent;
    border: 0;
    bottom: 0;
    color: var(--ink);
    height: 100dvh;
    left: auto;
    margin: 0;
    max-height: none;
    max-width: none;
    padding: 0;
    position: fixed;
    right: 0;
    top: 0;
    width: min(570px, 100vw);
}

.account-drawer::backdrop {
    backdrop-filter: blur(8px);
    background: rgba(16, 24, 40, 0.36);
}

.drawer-shell {
    background: #ffffff;
    border-left: 1px solid var(--line-soft);
    box-shadow: -28px 0 80px rgba(16, 24, 40, 0.18);
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-height: 100%;
    overflow-y: auto;
    padding: 30px;
    position: relative;
}

.drawer-close,
.icon-only {
    flex: 0 0 auto;
    height: 40px;
    min-height: 40px;
    padding: 0;
    width: 40px;
}

.drawer-close {
    background: transparent;
    border-color: transparent;
    color: var(--muted);
    font-size: 20px;
    position: absolute;
    right: 20px;
    top: 18px;
}

.drawer-profile {
    align-items: center;
    display: grid;
    gap: 16px;
    grid-template-columns: 74px minmax(0, 1fr);
    padding-right: 42px;
}

.drawer-avatar {
    font-size: 25px;
    height: 66px;
    width: 66px;
}

.drawer-profile h2 {
    font-size: 27px;
    margin-bottom: 3px;
}

.drawer-status-line {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.drawer-status-line > span:last-child {
    color: var(--muted);
    font-size: 13px;
}

.drawer-tabs {
    border-bottom: 1px solid var(--line-soft);
    display: flex;
    gap: 26px;
    overflow-x: auto;
}

.drawer-tabs span {
    color: var(--muted-strong);
    flex: 0 0 auto;
    font-weight: 760;
    padding: 0 0 13px;
}

.drawer-tabs .active {
    border-bottom: 2px solid var(--primary);
    color: var(--primary-strong);
}

.drawer-tabs strong {
    background: var(--surface-muted);
    border-radius: 999px;
    color: var(--ink-soft);
    font-size: 12px;
    margin-left: 4px;
    padding: 2px 6px;
}

.queue-preview-panel,
.drawer-section,
.switch-row {
    background: var(--surface-raised);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    padding: 16px;
}

.switch-row {
    align-items: flex-start;
    display: flex;
    gap: 12px;
}

.switch-row small {
    color: var(--muted);
    display: block;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.45;
    margin-top: 4px;
}

.drawer-section-title {
    align-items: flex-start;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-bottom: 12px;
}

.drawer-section-title strong {
    color: var(--ink);
}

.drawer-section-title span,
.drawer-section-title a {
    color: var(--muted);
    font-size: 13px;
}

.drawer-section-title a {
    color: var(--primary-strong);
    font-weight: 760;
}

.queue-preview-strip {
    display: grid;
    gap: 8px;
    grid-auto-columns: minmax(82px, 1fr);
    grid-auto-flow: column;
    overflow-x: auto;
    padding-bottom: 4px;
}

.queue-preview-card,
.queue-preview-more {
    background: linear-gradient(135deg, #17202a, var(--primary) 54%, var(--blue));
    border-radius: var(--radius-sm);
    color: #ffffff;
    display: grid;
    min-height: 92px;
    overflow: hidden;
    padding: 10px;
}

.queue-preview-card:nth-child(2n) {
    background: linear-gradient(135deg, #263238, #7c3aed, var(--accent));
}

.queue-preview-card small {
    align-self: start;
    background: rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    font-weight: 850;
    justify-self: end;
    padding: 2px 6px;
}

.queue-preview-card strong {
    align-self: end;
    font-size: 15px;
}

.queue-preview-card em {
    font-size: 12px;
    font-style: normal;
    opacity: 0.8;
}

.queue-preview-more {
    align-items: center;
    background: var(--surface-muted);
    color: var(--muted-strong);
    font-weight: 850;
    justify-content: center;
}

.drawer-form {
    gap: 14px;
}

.modal-fields-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(0, 1fr) minmax(150px, 0.45fr);
}

.schedule-panel {
    display: grid;
    gap: 10px;
}

.schedule-builder {
    display: grid;
    gap: 8px;
}

.schedule-empty {
    background: #ffffff;
    border: 1px dashed #cbd5dc;
    border-radius: var(--radius-sm);
    color: var(--muted);
    padding: 12px;
}

.schedule-row {
    align-items: center;
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(125px, 0.65fr) minmax(110px, 1fr) 40px;
}

.schedule-row > span {
    color: var(--muted);
    font-size: 13px;
}

.danger-icon {
    background: var(--danger-soft);
    border-color: #ffd1cc;
    color: var(--danger);
}

.add-time-button {
    justify-self: start;
}

.drawer-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.drawer-actions .primary {
    min-width: 164px;
}

.drawer-delete {
    margin-top: auto;
}

.studio-empty {
    gap: 12px;
}

.users-table {
    margin-top: 18px;
}

.user-form {
    align-items: end;
    grid-template-columns: minmax(180px, 1fr) minmax(150px, 0.7fr) minmax(130px, 0.55fr) auto;
}

/* Dark creator theme */
button,
.button,
.nav a,
.nav button {
    background: rgba(23, 29, 42, 0.92);
    border-color: var(--line);
    color: var(--ink);
}

button:hover,
.button:hover,
.nav a:hover,
.nav button:hover {
    background: #202838;
    border-color: rgba(225, 48, 108, 0.5);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
}

button.primary,
.button.primary,
.primary {
    background: var(--ig-gradient);
    border-color: transparent;
    box-shadow: 0 14px 34px rgba(225, 48, 108, 0.28);
}

button.primary:hover,
.button.primary:hover,
.primary:hover {
    background: linear-gradient(135deg, #405de6 0%, #a536b0 34%, #e1306c 72%, #f77737 100%);
    border-color: transparent;
}

button.subtle,
.button.subtle {
    background: rgba(255, 255, 255, 0.055);
    border-color: rgba(255, 255, 255, 0.08);
    color: var(--ink-soft);
}

.sidebar {
    background: #0d1220;
    border-right-color: rgba(255, 255, 255, 0.08);
    box-shadow: 16px 0 60px rgba(0, 0, 0, 0.18);
}

.sidebar::before {
    display: none;
}

.brand-mark,
.account-avatar {
    background: var(--ig-gradient);
    box-shadow: 0 12px 34px rgba(193, 53, 132, 0.25);
}

.brand-copy strong,
.creator-account strong,
.creator-queue-count strong,
.creator-next-time strong,
.drawer-section-title strong,
.drawer-profile h2,
.metric-card strong,
.studio-metric strong,
.feature-strip strong {
    color: var(--ink);
}

.brand-copy small,
.topbar-label {
    color: var(--muted);
}

.side-nav a {
    color: #aeb9ca;
}

.side-nav a::before {
    background: #3a4354;
}

.side-nav a:hover {
    background: rgba(255, 255, 255, 0.055);
    border-color: rgba(255, 255, 255, 0.08);
    color: var(--ink);
}

.side-nav a.active {
    background: rgba(225, 48, 108, 0.15);
    border-color: rgba(225, 48, 108, 0.34);
    color: #ffffff;
}

.side-nav a.active::before,
.side-nav a.active::after,
.metric-card::before {
    background: var(--ig-gradient);
}

.side-links {
    border-top-color: rgba(255, 255, 255, 0.08);
}

.side-links a {
    color: var(--muted);
}

.side-links a:hover,
.page-kicker,
.eyebrow,
.drawer-section-title a {
    color: #ff7ab6;
}

.topbar {
    background: rgba(10, 14, 24, 0.82);
    border-bottom-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.18);
}

.user-role {
    background: rgba(52, 211, 153, 0.14);
    border-color: rgba(52, 211, 153, 0.32);
    color: #8af0c6;
}

.panel,
.empty,
.table-wrap,
.auth-card,
.creator-workspace,
.studio-metric,
.metric-card,
.home-console,
.feature-strip div {
    background: rgba(18, 23, 34, 0.92);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: var(--shadow-sm);
}

.auth-card,
.creator-workspace {
    box-shadow: var(--shadow-md);
}

.studio-metric,
.metric-card {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02)),
        #121722;
}

.metric-card.danger::before {
    background: linear-gradient(135deg, #fb7185, #fd7e14);
}

.metric-icon {
    background: rgba(225, 48, 108, 0.14);
}

.metric-icon::before,
.metric-icon::after {
    background: #e1306c;
}

.metric-icon.warm {
    background: rgba(253, 126, 20, 0.16);
}

.metric-icon.warm::before,
.metric-icon.warm::after {
    background: #fd7e14;
}

.metric-icon.blue {
    background: rgba(64, 93, 230, 0.18);
}

.metric-icon.blue::before,
.metric-icon.blue::after {
    background: #405de6;
}

.metric-icon.violet {
    background: rgba(131, 58, 180, 0.2);
}

.metric-icon.violet::before,
.metric-icon.violet::after {
    background: #833ab4;
}

.creator-list-head {
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

.creator-table-head,
th {
    background: #151b28;
    border-color: rgba(255, 255, 255, 0.08);
    color: #aeb9ca;
}

.creator-row {
    background: rgba(12, 17, 28, 0.72);
    border-color: rgba(255, 255, 255, 0.08);
}

.creator-row:hover {
    background: rgba(22, 29, 44, 0.95);
    border-color: rgba(225, 48, 108, 0.42);
    box-shadow: 0 18px 48px rgba(193, 53, 132, 0.14);
}

tbody tr:hover td {
    background: rgba(255, 255, 255, 0.035);
}

th,
td {
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

input,
select,
textarea {
    background: #0c111c;
    border-color: #2a3447;
    color: var(--ink);
}

input:hover,
select:hover,
textarea:hover {
    border-color: #405de6;
}

input::placeholder,
textarea::placeholder {
    color: #7e8ba0;
}

.filter-tabs {
    background: #0c111c;
    border-color: rgba(255, 255, 255, 0.08);
}

.filter-tabs button {
    color: var(--muted-strong);
}

.filter-tabs button.active {
    background: var(--ig-gradient);
    color: #ffffff;
    box-shadow: 0 12px 26px rgba(225, 48, 108, 0.2);
}

.status {
    background: rgba(255, 255, 255, 0.07);
    color: var(--muted-strong);
}

.status.queued {
    background: rgba(64, 93, 230, 0.16);
    color: #9fb5ff;
}

.status.publishing {
    background: rgba(253, 126, 20, 0.17);
    color: #ffc08a;
}

.status.published {
    background: rgba(52, 211, 153, 0.14);
    color: #8af0c6;
}

.status.failed,
.status.canceled {
    background: rgba(251, 113, 133, 0.15);
    color: #ff9aaa;
}

.account-drawer::backdrop {
    backdrop-filter: blur(9px);
    background: rgba(2, 6, 15, 0.68);
}

.drawer-shell {
    background: #0d1220;
    border-left-color: rgba(255, 255, 255, 0.09);
    box-shadow: -28px 0 90px rgba(0, 0, 0, 0.44);
}

.drawer-close {
    color: var(--muted);
}

.drawer-tabs {
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

.drawer-tabs span {
    color: var(--muted-strong);
}

.drawer-tabs .active {
    border-bottom-color: #e1306c;
    color: #ff7ab6;
}

.drawer-tabs strong {
    background: rgba(255, 255, 255, 0.08);
    color: var(--ink-soft);
}

.queue-preview-panel,
.drawer-section,
.switch-row {
    background: rgba(255, 255, 255, 0.035);
    border-color: rgba(255, 255, 255, 0.08);
}

.queue-preview-card {
    background: var(--ig-gradient);
}

.queue-preview-card:nth-child(2n) {
    background: linear-gradient(135deg, #405de6, #833ab4 48%, #e1306c);
}

.queue-preview-more,
.schedule-empty {
    background: #0c111c;
    border-color: #2a3447;
    color: var(--muted);
}

.danger-icon,
.delete-inline button,
.danger-form button,
.drawer-delete button {
    background: rgba(251, 113, 133, 0.13);
    border-color: rgba(251, 113, 133, 0.32);
    color: #ff9aaa;
}

.danger-icon:hover,
.delete-inline button:hover,
.danger-form button:hover,
.drawer-delete button:hover {
    background: rgba(251, 113, 133, 0.2);
    border-color: rgba(251, 113, 133, 0.45);
}

.flash,
.alert,
.token-box {
    background: rgba(255, 255, 255, 0.055);
    border-color: rgba(255, 255, 255, 0.1);
}

.flash.success,
.alert.success {
    background: rgba(52, 211, 153, 0.12);
    border-color: rgba(52, 211, 153, 0.32);
    color: #a7f3d0;
}

.flash.error,
.alert.error,
.error-row td {
    background: rgba(251, 113, 133, 0.14);
    border-color: rgba(251, 113, 133, 0.32);
    color: #ffb4c0;
}

code,
.token-box code {
    background: #0c111c;
    border-color: #2a3447;
    color: #e9edf5;
}

pre,
.console-top {
    background: #070a12;
}

.console-row {
    background: #151b28;
    border-color: rgba(255, 255, 255, 0.08);
}

.home-copy,
.creator-account small,
.creator-subline,
.creator-queue-count small,
.creator-next-time small,
.drawer-section-title span,
.drawer-status-line > span:last-child,
.feature-strip span,
.muted {
    color: var(--muted);
}

.public-nav a:not(.button),
.nav a:not(.button) {
    color: var(--muted-strong);
}

.public-nav a:not(.button):hover,
.nav a:not(.button):hover {
    color: var(--ink);
}

@media (max-width: 1120px) {
    :root {
        --sidebar: 248px;
    }

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

    .page-head,
    .studio-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .studio-toolbar-actions {
        justify-content: flex-start;
    }

    .creator-table-head {
        display: none;
    }

    .creator-row {
        border: 1px solid var(--line-soft);
        border-radius: var(--radius);
        grid-template-columns: minmax(230px, 1fr) minmax(120px, 0.62fr) minmax(90px, 0.42fr) minmax(160px, 0.8fr) auto;
        margin-bottom: 10px;
    }

    .creator-row:last-child {
        border-radius: var(--radius);
    }
}

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

    .sidebar {
        border-bottom: 1px solid var(--line-soft);
        border-right: 0;
        min-height: auto;
        position: relative;
    }

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

    .side-links {
        grid-template-columns: repeat(3, max-content);
        justify-content: start;
        margin-top: 0;
    }

    .topbar {
        min-height: 64px;
        padding: 0 18px;
    }

    .shell {
        padding: 22px 18px;
    }

    h1 {
        font-size: 30px;
    }

    .home-hero,
    .feature-strip,
    .settings-grid,
    .mcp-info-grid,
    .grid,
    .split,
    .modal-fields-grid,
    .user-form {
        grid-template-columns: 1fr;
    }

    .home-hero {
        min-height: auto;
        padding-top: 18px;
    }

    .creator-list-head,
    .creator-search {
        align-items: stretch;
        flex-direction: column;
    }

    .creator-search {
        justify-content: stretch;
    }

    .creator-search input {
        min-width: 0;
    }

    .filter-tabs {
        justify-content: stretch;
    }

    .filter-tabs button {
        flex: 1 1 0;
    }

    .creator-table,
    .creator-list-head {
        padding-left: 16px;
        padding-right: 16px;
    }

    .creator-row {
        align-items: start;
        grid-template-columns: 1fr;
    }

    .creator-actions {
        justify-content: flex-start;
    }

    .account-drawer {
        width: 100vw;
    }

    .drawer-shell {
        padding: 26px 18px;
    }

    .drawer-profile {
        grid-template-columns: 58px minmax(0, 1fr);
    }

    .drawer-avatar {
        font-size: 21px;
        height: 54px;
        width: 54px;
    }

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

    .drawer-actions {
        flex-direction: column-reverse;
    }
}

@media (max-width: 560px) {
    body {
        font-size: 14px;
    }

    .topbar {
        align-items: center;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 10px 14px;
        padding: 14px 18px;
        position: relative;
    }

    .topbar button {
        width: auto;
    }

    .user-stack {
        flex: 1 1 190px;
    }

    .sidebar {
        gap: 14px;
        padding: 16px 18px;
    }

    .brand-panel {
        padding-bottom: 0;
    }

    .brand-mark {
        height: 34px;
        width: 34px;
    }

    .brand-copy strong {
        font-size: 15px;
    }

    .brand-copy small {
        font-size: 11px;
    }

    .public-nav {
        flex-wrap: wrap;
    }

    .side-nav {
        gap: 6px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .side-nav a {
        font-size: 13px;
        min-height: 38px;
        padding: 8px 10px;
    }

    .side-links {
        gap: 8px 14px;
        grid-template-columns: repeat(3, max-content);
        padding-top: 12px;
    }

    .side-links a {
        font-size: 12px;
    }

    .metric-grid,
    .studio-metrics {
        grid-template-columns: 1fr;
    }

    .home-actions,
    .studio-toolbar-actions,
    .drawer-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .button,
    button {
        width: 100%;
    }

    .icon-only,
    .drawer-close {
        width: 40px;
    }

    .auth-card {
        padding: 24px;
    }
}

@media (max-width: 820px) {
    .app-frame {
        display: block;
    }

    .menu-toggle {
        align-items: center;
        aspect-ratio: 1 / 1;
        background: rgba(255, 255, 255, 0.055);
        border-color: rgba(255, 255, 255, 0.1);
        border-radius: var(--radius);
        display: inline-flex;
        flex-direction: column;
        flex: 0 0 auto;
        gap: 4px;
        height: 44px;
        min-height: 44px;
        min-width: 44px;
        padding: 0;
        width: 44px;
    }

    .menu-toggle span {
        background: var(--ink);
        border-radius: 999px;
        display: block;
        height: 2px;
        width: 20px;
    }

    .sidebar {
        background: #0d1220;
        border-bottom: 0;
        border-right: 1px solid rgba(255, 255, 255, 0.08);
        bottom: 0;
        box-shadow: 28px 0 80px rgba(0, 0, 0, 0.42);
        gap: 18px;
        left: 0;
        min-height: 100dvh;
        overflow-y: auto;
        padding: 22px;
        position: fixed;
        top: 0;
        transform: translateX(-104%);
        transition: transform 180ms ease;
        width: min(82vw, 320px);
        z-index: 30;
    }

    body.menu-open {
        overflow: hidden;
    }

    body.menu-open .sidebar {
        transform: translateX(0);
    }

    .sidebar-close {
        align-items: center;
        aspect-ratio: 1 / 1;
        background: rgba(255, 255, 255, 0.055);
        border-color: rgba(255, 255, 255, 0.08);
        border-radius: var(--radius);
        color: var(--muted-strong);
        display: inline-flex;
        font-size: 20px;
        height: 40px;
        justify-content: center;
        min-height: 40px;
        min-width: 40px;
        padding: 0;
        position: absolute;
        right: 16px;
        top: 16px;
        width: 40px;
    }

    .brand-panel {
        padding-right: 46px;
    }

    .side-nav {
        display: grid;
        gap: 8px;
        grid-template-columns: 1fr;
    }

    .side-nav a {
        font-size: 14px;
        min-height: 42px;
        padding: 10px 12px;
    }

    .side-links {
        display: grid;
        gap: 10px;
        grid-template-columns: 1fr;
        justify-content: stretch;
        margin-top: auto;
        padding-top: 16px;
    }

    .sidebar-backdrop {
        background: rgba(2, 6, 15, 0.64);
        border: 0;
        border-radius: 0;
        bottom: 0;
        box-shadow: none;
        cursor: default;
        display: block;
        left: 0;
        min-height: 0;
        opacity: 0;
        padding: 0;
        pointer-events: none;
        position: fixed;
        right: 0;
        top: 0;
        transition: opacity 160ms ease;
        width: auto;
        z-index: 24;
    }

    .sidebar-backdrop:hover {
        background: rgba(2, 6, 15, 0.64);
        border: 0;
        box-shadow: none;
    }

    body.menu-open .sidebar-backdrop {
        opacity: 1;
        pointer-events: auto;
    }
}

@media (max-width: 560px) {
    .menu-toggle {
        height: 42px;
        min-height: 42px;
        min-width: 42px;
        width: 42px;
    }

    .sidebar-close {
        height: 40px;
        min-height: 40px;
        min-width: 40px;
        width: 40px;
    }

    .sidebar-backdrop {
        width: auto;
    }
}

.dashboard-controls {
    align-items: center;
    display: flex;
    gap: 14px;
    justify-content: space-between;
    margin: -4px 0 16px;
}

.dashboard-search {
    align-items: center;
    flex-direction: row;
    flex: 1 1 auto;
}

.dashboard-search input {
    max-width: 380px;
    min-width: min(100%, 260px);
}

.dashboard-filter-count {
    color: var(--muted);
    font-size: 13px;
    font-weight: 780;
    white-space: nowrap;
}

.dashboard-control-actions {
    align-items: center;
    display: flex;
    flex: 0 0 auto;
    gap: 10px;
    justify-content: flex-end;
}

.dashboard-control-actions form {
    margin: 0;
}

.dashboard-retry-all {
    align-items: center;
    display: inline-flex;
    gap: 8px;
    min-height: 40px;
    white-space: nowrap;
}

.dashboard-retry-all svg {
    fill: none;
    flex: 0 0 auto;
    height: 17px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
    width: 17px;
}

.post-channels {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 7px;
}

.channel-pill {
    align-items: center;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 999px;
    color: var(--muted-strong);
    display: inline-flex;
    font-size: 11px;
    font-weight: 860;
    line-height: 1;
    min-height: 22px;
    padding: 5px 8px;
    text-transform: uppercase;
}

.channel-pill.ok {
    background: rgba(52, 211, 153, 0.14);
    border-color: rgba(52, 211, 153, 0.26);
    color: #8af0c6;
}

.channel-pill.pending {
    background: rgba(64, 93, 230, 0.16);
    border-color: rgba(64, 93, 230, 0.28);
    color: #9fb5ff;
}

.channel-pill.error {
    background: rgba(251, 113, 133, 0.15);
    border-color: rgba(251, 113, 133, 0.28);
    color: #ff9aaa;
}

.dashboard-empty-filter {
    margin-top: 16px;
}

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

.queue-item {
    align-items: stretch;
    background: rgba(18, 23, 34, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
    display: grid;
    gap: 12px;
    grid-template-columns: 68px minmax(0, 1fr) auto;
    min-height: 86px;
    padding: 9px 10px;
}

.queue-item:hover {
    border-color: rgba(225, 48, 108, 0.34);
    box-shadow: 0 16px 42px rgba(193, 53, 132, 0.12);
}

.queue-item[hidden] {
    display: none;
}

.queue-preview-button {
    background: #0c111c;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    height: 68px;
    min-height: 68px;
    overflow: hidden;
    padding: 0;
    position: relative;
    width: 68px;
}

.queue-preview-button img,
.queue-preview-button video {
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.queue-preview-button span {
    background: rgba(2, 6, 15, 0.76);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    bottom: 7px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 860;
    min-width: 26px;
    padding: 4px 7px;
    position: absolute;
    right: 7px;
}

.queue-main {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.queue-title-row,
.queue-meta-row {
    align-items: flex-start;
    display: flex;
    gap: 10px;
    justify-content: space-between;
}

.queue-title-row strong {
    color: var(--ink);
}

.queue-title-row small,
.queue-meta-row {
    color: var(--muted);
    font-size: 13px;
}

.queue-caption {
    color: var(--ink-soft);
    display: -webkit-box;
    line-height: 1.32;
    margin: 0;
    max-width: 860px;
    overflow: hidden;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.queue-error {
    background: rgba(251, 113, 133, 0.12);
    border: 1px solid rgba(251, 113, 133, 0.24);
    border-radius: var(--radius-sm);
    color: #ff9aaa;
    display: grid;
    font-size: 13px;
    gap: 4px;
    padding: 9px 10px;
}

.queue-actions {
    align-items: center;
    display: flex;
    gap: 6px;
}

.queue-actions form {
    margin: 0;
}

.icon-button,
.modal-icon-close {
    background: rgba(255, 255, 255, 0.055);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    color: var(--ink-soft);
    height: 34px;
    min-height: 34px;
    min-width: 34px;
    padding: 0;
    width: 34px;
}

.icon-button svg,
.modal-icon-close svg {
    fill: none;
    height: 17px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
    width: 17px;
}

.icon-button:hover {
    border-color: rgba(225, 48, 108, 0.42);
    color: #ffffff;
}

.danger-icon-button {
    color: #ff9aaa;
}

.icon-button[disabled] {
    opacity: 0.42;
}

.post-modal {
    background: transparent;
    border: 0;
    margin: auto;
    max-width: min(1120px, calc(100vw - 32px));
    padding: 0;
    width: 100%;
}

.post-modal::backdrop {
    backdrop-filter: blur(9px);
    background: rgba(2, 6, 15, 0.74);
}

.post-modal-shell {
    background: #0d1220;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    display: grid;
    gap: 0;
    grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
    max-height: calc(100vh - 48px);
    overflow: hidden;
    position: relative;
}

.modal-icon-close {
    position: absolute;
    right: 14px;
    top: 14px;
    z-index: 2;
}

.post-modal-media {
    align-content: start;
    background: #080c15;
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    max-height: calc(100vh - 48px);
    overflow: auto;
    padding: 16px;
}

.post-modal-media img,
.post-modal-media video {
    aspect-ratio: 1 / 1;
    background: #050811;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    display: block;
    object-fit: contain;
    width: 100%;
}

.post-modal-body {
    display: grid;
    gap: 14px;
    overflow: auto;
    padding: 28px;
}

.post-modal-body h2 {
    padding-right: 42px;
}

.modal-caption {
    color: var(--ink-soft);
    margin: 0;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.post-edit-form textarea {
    min-height: 220px;
    resize: vertical;
}

.modal-switch-row {
    min-height: 100%;
}

.modal-actions {
    align-items: center;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.permission-map {
    display: grid;
    gap: 18px;
}

.permission-map-head {
    align-items: flex-start;
    display: flex;
    gap: 16px;
    justify-content: space-between;
}

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

.permission-card {
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
    display: grid;
    gap: 12px;
    padding: 16px;
}

.permission-list {
    display: grid;
    gap: 9px;
}

.permission-item {
    background: rgba(12, 17, 28, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    display: grid;
    gap: 4px;
    padding: 11px 12px;
}

.permission-item strong {
    color: var(--ink);
    font-size: 13px;
}

.permission-item small,
.permission-note {
    color: var(--muted);
}

.compact-list {
    color: var(--muted-strong);
    display: grid;
    gap: 9px;
    margin: 0;
    padding-left: 18px;
}

.auth-footnote {
    color: var(--muted);
    margin: 16px 0 0;
    text-align: center;
}

.auth-footnote a {
    color: #ff9cca;
    font-weight: 800;
}

.user-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.user-actions form {
    margin: 0;
}

.compact-settings {
    max-width: 860px;
}

.mcp-compact-panel,
.mcp-install-card,
.compact-permissions {
    display: grid;
    gap: 16px;
}

.mcp-token-meta {
    font-size: 13px;
}

.compact-steps {
    gap: 10px;
}

.compact-steps li {
    padding: 13px 13px 13px 52px;
}

.compact-steps li::before {
    height: 28px;
    top: 13px;
    width: 28px;
}

.compact-page-head {
    margin-bottom: 14px;
}

.mcp-simple-card {
    gap: 14px;
    padding: 18px;
}

.mcp-simple-head {
    align-items: center;
    display: flex;
    gap: 14px;
    justify-content: space-between;
}

.mcp-simple-head h2 {
    margin-bottom: 4px;
}

.mcp-simple-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.mcp-simple-actions form {
    margin: 0;
}

.mcp-step-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mcp-step-actions form {
    margin: 0;
}

.status-pill {
    align-items: center;
    border: 1px solid rgba(45, 123, 87, 0.22);
    border-radius: 999px;
    color: #1f6b49;
    display: inline-flex;
    font-size: 12px;
    font-weight: 700;
    min-height: 28px;
    padding: 5px 9px;
}

.status-pill.ok {
    background: #e9f7ef;
}

.oauth-ready-card {
    border-color: rgba(45, 123, 87, 0.22);
}

.oauth-consent-card {
    display: grid;
    gap: 16px;
}

.oauth-consent-summary {
    background: #f6f7f4;
    border: 1px solid var(--border);
    border-radius: 8px;
    display: grid;
    gap: 3px;
    padding: 12px;
}

.oauth-consent-summary span,
.small-text {
    font-size: 13px;
}

.oauth-scope-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.oauth-scope-list span {
    background: #eef2f7;
    border: 1px solid #d7deea;
    border-radius: 999px;
    color: #324154;
    font-size: 13px;
    font-weight: 700;
    padding: 7px 10px;
}

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

.small-button {
    font-size: 13px;
    min-height: 34px;
    padding: 7px 10px;
}

.compact-token-box {
    margin: 0;
    padding: 12px;
}

.mcp-command-box {
    display: grid;
    gap: 8px;
}

.mcp-command-box pre {
    margin-top: 0;
}

.mcp-step-fields {
    margin-top: 2px;
}

.mcp-detailed-steps .mcp-step-fields span {
    margin-top: 0;
}

.mcp-step-fields code {
    display: block;
    margin-top: 5px;
    overflow-wrap: anywhere;
}

.codex-fields .mcp-token-action-field {
    display: block;
}

.mcp-token-generate-form {
    margin: 5px 0 0;
}

.mcp-token-inline-button {
    background: var(--surface-muted);
    border: 1px solid var(--line-soft);
    border-radius: 5px;
    color: var(--ink-soft);
    display: flex;
    font-size: 14px;
    justify-content: center;
    min-height: auto;
    margin: 8px 0 0;
    padding: 8px 10px;
    text-decoration: underline;
    text-underline-offset: 3px;
    width: 100%;
}

.mcp-token-inline-button:hover {
    background: var(--surface);
    border-color: var(--line);
}

.mcp-token-inline-button:disabled {
    cursor: progress;
    opacity: 0.72;
}

.mcp-token-warning {
    color: var(--muted);
    display: block;
    font-size: 12px;
    line-height: 1.35;
    margin-top: 7px;
    text-align: center;
}

.performance-metrics .studio-metric strong {
    font-size: 25px;
    overflow-wrap: anywhere;
}

.performance-layout {
    align-items: start;
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.36fr);
}

.performance-main,
.performance-side,
.performance-ranking,
.tip-list {
    display: grid;
    gap: 14px;
}

.performance-filter-form {
    align-items: end;
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
}

.performance-row {
    align-items: stretch;
    background: var(--surface);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    display: grid;
    gap: 14px;
    grid-template-columns: 44px minmax(0, 1fr) minmax(260px, 0.44fr);
    padding: 14px;
}

.performance-row:hover {
    border-color: var(--line);
}

.performance-rank-number {
    align-items: center;
    background: var(--surface-muted);
    border-radius: var(--radius-sm);
    color: var(--primary);
    display: inline-flex;
    font-size: 18px;
    font-weight: 900;
    height: 44px;
    justify-content: center;
    width: 44px;
}

.performance-row-body {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.performance-title-line {
    align-items: center;
    display: flex;
    gap: 10px;
    justify-content: space-between;
}

.performance-title-line strong,
.performance-row-body p {
    overflow-wrap: anywhere;
}

.performance-row-body p {
    color: var(--muted);
    margin-bottom: 0;
}

.performance-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.performance-tags span {
    background: var(--surface-muted);
    border: 1px solid var(--line-soft);
    border-radius: 999px;
    color: var(--muted-strong);
    font-size: 12px;
    font-weight: 760;
    padding: 5px 8px;
}

.performance-tags .warning-tag {
    background: var(--warm-soft);
    color: var(--warm);
}

.performance-numbers {
    align-content: center;
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.performance-numbers span {
    background: var(--surface-raised);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-sm);
    color: var(--muted);
    display: grid;
    font-size: 12px;
    font-weight: 760;
    gap: 3px;
    padding: 10px;
}

.performance-numbers strong {
    color: var(--ink);
    font-size: 18px;
    line-height: 1;
}

.performance-card {
    display: grid;
    gap: 14px;
}

.performance-dl {
    display: grid;
    gap: 10px;
    margin: 0;
}

.performance-dl div {
    background: var(--surface-raised);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-sm);
    display: flex;
    gap: 10px;
    justify-content: space-between;
    padding: 11px;
}

.performance-dl dt {
    color: var(--muted);
    font-size: 13px;
    font-weight: 760;
}

.performance-dl dd {
    color: var(--ink);
    font-weight: 850;
    margin: 0;
    text-align: right;
}

.tip-item {
    background: var(--surface-raised);
    border: 1px solid var(--line-soft);
    border-left: 3px solid var(--blue);
    border-radius: var(--radius);
    display: grid;
    gap: 6px;
    padding: 13px;
}

.tip-item.priority-alta {
    border-left-color: var(--primary);
}

.tip-item.priority-baixa {
    border-left-color: var(--success);
}

.tip-item span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 850;
    text-transform: uppercase;
}

.tip-item strong {
    color: var(--ink);
}

.tip-item p {
    color: var(--muted);
    margin-bottom: 0;
}

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

.mcp-short-steps li {
    padding: 12px 12px 12px 48px;
}

.mcp-detailed-steps {
    grid-template-columns: 1fr;
}

.mcp-detailed-steps li {
    min-height: 0;
    padding: 12px 14px 12px 50px;
}

.mcp-detailed-steps li span {
    display: block;
    margin-top: 4px;
}

.compact-danger-zone {
    padding: 16px 18px;
}

.factory-format-strip,
.factory-layout,
.factory-stats {
    display: grid;
    gap: 14px;
}

.factory-format-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 22px;
}

.factory-format-strip div,
.factory-stats div {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02)),
        #121722;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    display: grid;
    gap: 5px;
    min-height: 104px;
    padding: 17px;
}

.factory-format-strip span,
.factory-stats span {
    color: var(--muted-strong);
    font-size: 12px;
    font-weight: 850;
    letter-spacing: 0;
    text-transform: uppercase;
}

.factory-format-strip strong,
.factory-stats strong {
    color: var(--ink);
    font-size: 28px;
    line-height: 1;
}

.factory-format-strip small,
.field-help {
    color: var(--muted);
    font-size: 12px;
    font-weight: 650;
}

.factory-layout {
    align-items: start;
    grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
    margin-bottom: 22px;
}

.factory-form,
.factory-rules,
.factory-result {
    min-width: 0;
}

.factory-checklist {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.factory-checklist span {
    background: rgba(52, 211, 153, 0.12);
    border: 1px solid rgba(52, 211, 153, 0.25);
    border-radius: 999px;
    color: #8af0c6;
    font-size: 12px;
    font-weight: 850;
    padding: 7px 10px;
}

.factory-result {
    display: grid;
    gap: 18px;
}

.factory-result-head {
    align-items: start;
    display: flex;
    gap: 16px;
    justify-content: space-between;
}

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

.factory-prompt-preview {
    display: grid;
    gap: 8px;
}

.factory-prompt-preview textarea {
    font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
    font-size: 12px;
    line-height: 1.55;
    min-height: 280px;
}

.products-layout,
.product-list {
    display: grid;
    gap: 18px;
}

.products-layout {
    align-items: start;
    grid-template-columns: minmax(0, 1fr);
    margin-bottom: 22px;
}

.product-list {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.product-form,
.product-edit-form,
.product-card {
    min-width: 0;
}

.product-card {
    overflow: hidden;
    padding: 0;
}

.product-summary-button {
    align-items: start;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    display: grid;
    gap: 12px;
    justify-content: stretch;
    min-height: 154px;
    padding: 18px;
    text-align: left;
    white-space: normal;
    width: 100%;
}

.product-summary-button:hover {
    background: rgba(255, 255, 255, 0.035);
    border-color: transparent;
    box-shadow: none;
}

.product-summary-button strong {
    color: var(--ink);
    font-size: 20px;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.product-summary-top,
.product-summary-meta,
.product-section-head {
    align-items: center;
    display: flex;
    gap: 10px;
    justify-content: space-between;
}

.product-summary-meta {
    flex-wrap: wrap;
    justify-content: flex-start;
}

.product-summary-meta span,
.product-status,
.product-section-head span {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    color: var(--muted-strong);
    font-size: 12px;
    font-weight: 800;
    padding: 6px 8px;
}

.product-status.active {
    background: rgba(52, 211, 153, 0.14);
    border-color: rgba(52, 211, 153, 0.26);
    color: #8af0c6;
}

.product-status.paused {
    background: rgba(251, 113, 133, 0.14);
    border-color: rgba(251, 113, 133, 0.24);
    color: #ffb4c0;
}

.product-modal {
    max-width: min(980px, calc(100vw - 32px));
}

.product-modal-shell {
    gap: 20px;
    grid-template-columns: 1fr;
    overflow: auto;
    padding: 28px;
}

.product-modal-head {
    display: grid;
    gap: 5px;
    padding-right: 44px;
}

.product-modal-head h2,
.product-section-head h3 {
    margin: 0;
}

.product-modal-form,
.product-assets-section {
    min-width: 0;
}

.product-edit-top {
    align-items: end;
    display: grid;
    gap: 14px;
    grid-template-columns: minmax(0, 1fr) auto;
}

.product-active-toggle {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    min-height: 42px;
    padding: 8px 12px;
}

.product-assets-section {
    display: grid;
    gap: 12px;
}

.asset-drop {
    background: rgba(255, 255, 255, 0.035);
    border: 1px dashed rgba(255, 255, 255, 0.18);
    border-radius: var(--radius);
    padding: 14px;
}

.asset-drop.compact {
    padding: 12px;
}

.asset-drop > span {
    color: var(--ink);
    font-weight: 850;
}

.asset-drop small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 650;
}

.asset-drop-tags,
.cta-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.asset-drop-tags {
    margin-top: 10px;
}

.asset-drop-tags span {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 999px;
    color: var(--muted-strong);
    font-size: 12px;
    font-weight: 800;
    padding: 7px 9px;
}

.cta-checklist {
    border: 0;
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
}

.cta-checklist legend {
    color: var(--ink);
    font-size: 14px;
    font-weight: 850;
    margin-bottom: 2px;
    padding: 0;
}

.cta-option {
    align-items: center;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    cursor: pointer;
    display: inline-flex;
    flex-direction: row;
    gap: 8px;
    padding: 8px 10px;
}

.cta-option input {
    flex: 0 0 auto;
    height: 14px;
    margin: 0;
    min-height: auto;
    padding: 0;
    width: 14px;
}

.cta-option span {
    color: var(--muted-strong);
    font-size: 12px;
    font-weight: 800;
}

.asset-list {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: grid;
    gap: 10px;
    padding-top: 16px;
}

.asset-item {
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: var(--radius);
    display: flex;
    gap: 12px;
    justify-content: space-between;
    padding: 12px;
}

.asset-item strong,
.asset-item small {
    display: block;
}

.asset-item strong {
    color: var(--ink);
    overflow-wrap: anywhere;
}

.asset-item small {
    color: var(--muted);
    font-size: 12px;
    margin-top: 3px;
}

.asset-actions,
.danger-form {
    align-items: center;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.asset-actions form,
.danger-form {
    margin: 0;
}

.danger-form {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 14px;
}

@media (max-width: 820px) {
    .performance-layout,
    .performance-filter-form,
    .performance-row,
    .products-layout,
    .factory-layout,
    .factory-format-strip,
    .factory-stats {
        grid-template-columns: 1fr;
    }

    .performance-title-line,
    .performance-dl div {
        align-items: flex-start;
        flex-direction: column;
    }

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

    .dashboard-controls,
    .dashboard-search,
    .permission-map-head {
        align-items: stretch;
        flex-direction: column;
    }

    .dashboard-search input {
        max-width: none;
        width: 100%;
    }

    .dashboard-control-actions {
        align-items: stretch;
        justify-content: space-between;
        width: 100%;
    }

    .dashboard-control-actions form,
    .dashboard-retry-all {
        width: 100%;
    }

    .dashboard-retry-all {
        justify-content: center;
    }

    .product-card-head,
    .product-edit-top,
    .product-summary-top,
    .product-section-head,
    .asset-item,
    .asset-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .product-edit-top {
        grid-template-columns: 1fr;
    }

    .permission-grid {
        grid-template-columns: 1fr;
    }

    .queue-item {
        grid-template-columns: 62px minmax(0, 1fr);
    }

    .queue-preview-button {
        height: 62px;
        min-height: 62px;
        width: 62px;
    }

    .queue-actions {
        grid-column: 1 / -1;
        justify-content: flex-end;
    }

    .queue-title-row,
    .queue-meta-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .post-modal-shell {
        grid-template-columns: 1fr;
    }

    .post-modal-media {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        max-height: 45vh;
    }

    .post-modal-body {
        padding: 22px;
    }

    .sales-hero,
    .home-hero {
        grid-template-columns: 1fr;
        min-height: auto;
    }

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

    .sales-cta {
        align-items: stretch;
        flex-direction: column;
    }

    .mcp-simple-head {
        align-items: stretch;
        flex-direction: column;
    }

    .mcp-simple-actions {
        justify-content: flex-start;
    }

    .mcp-short-steps {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .sales-flow {
        grid-template-columns: 1fr;
    }

    .sales-copy h1 {
        font-size: 44px;
    }

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