:root {
    --ink: #152033;
    --muted: #6d7889;
    --line: #e7ebf1;
    --surface: #ffffff;
    --canvas: #f6f8fb;
    --navy: #111b2f;
    --navy-soft: #1d2a42;
    --blue: #246bfd;
    --blue-dark: #1753cc;
    --cyan: #12b8c9;
    --green: #179a6c;
    --green-bg: #eaf8f2;
    --orange: #d77d17;
    --orange-bg: #fff5e7;
    --red: #d44f5b;
    --red-bg: #fff0f1;
    --purple: #7658d9;
    --shadow: 0 14px 36px rgba(24, 36, 58, .08);
    font-family: Inter, "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--canvas); font-size: 14px; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }

.app-shell { min-height: 100vh; display: flex; }
.sidebar { width: 248px; min-width: 248px; background: var(--navy); color: #dbe4f4; padding: 23px 14px 16px; display: flex; flex-direction: column; }
.brand-lockup { display: flex; align-items: center; gap: 11px; padding: 0 12px 21px; color: #fff; }
.brand-lockup strong { display: block; font-size: 16px; letter-spacing: .02em; }
.brand-lockup span { display: block; font-size: 11px; color: #9eacc4; margin-top: 3px; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #fff; font-weight: 800; background: linear-gradient(135deg, #15bfc8, #3971ff 65%, #e64c74); box-shadow: 0 8px 18px rgba(28, 173, 210, .26); }
.workspace-chip { margin: 0 7px 18px; border: 1px solid rgba(255, 255, 255, .1); padding: 10px 11px; border-radius: 8px; color: #b7c4d9; font-size: 12px; background: rgba(255,255,255,.045); }
.status-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #32c88d; margin-right: 7px; box-shadow: 0 0 0 3px rgba(50, 200, 141, .12); }
.status-dot.amber { background: #ffc05a; box-shadow: 0 0 0 3px rgba(255, 192, 90, .12); }
.nav-list { display: grid; gap: 4px; }
.nav-item { border: 0; width: 100%; background: transparent; color: #a9b7cc; text-align: left; border-radius: 8px; padding: 11px 12px; display: flex; align-items: center; gap: 11px; transition: .18s ease; }
.nav-item:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav-item.active { background: #2b69e8; color: #fff; box-shadow: 0 8px 18px rgba(21, 88, 210, .26); }
.nav-icon { width: 17px; text-align: center; font-size: 16px; color: #a9c8ff; }
.nav-item.active .nav-icon { color: #fff; }
.sidebar-bottom { margin-top: auto; padding: 16px 8px 0; }
.executor-mini { display: flex; gap: 8px; align-items: center; background: rgba(255,255,255,.06); padding: 10px; border-radius: 8px; }
.executor-mini strong { display: block; font-size: 12px; color: #e8effb; }
.executor-mini small { display: block; margin-top: 3px; color: #8e9db4; font-size: 11px; }
/* Six compact cards still fit beside the 248px desktop sidebar at 1280px. */
.asset-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.asset-item { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.asset-open { display: block; width: 100%; padding: 0; border: 0; background: transparent; color: var(--ink); text-align: left; }
.asset-open:hover .asset-card-title { color: var(--blue); }
.asset-open:focus-visible { outline: 3px solid var(--blue); outline-offset: -3px; }
.asset-preview-frame { position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 3 / 4; overflow: hidden; background: #eef1f5; }
.asset-thumb { position: absolute; inset: 0; display: block; width: 100%; height: 100%; min-height: 0; object-fit: contain; object-position: top center; }
.asset-preview-message { padding: 12px; color: var(--muted); font-size: 12px; text-align: center; line-height: 1.7; }
.asset-thumb[hidden], .asset-preview-message[hidden] { display: none; }
.asset-card-copy { display: block; padding: 9px 9px 0; }
.asset-card-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; line-height: 1.5; min-height: 3em; font-size: 13px; font-weight: 600; }
.asset-card-summary { display: flex; flex-wrap: wrap; gap: 4px; justify-content: space-between; align-items: center; margin-top: 6px; color: var(--muted); font-size: 11px; }
.asset-card-summary .badge { padding-inline: 6px; min-height: 21px; }
.asset-item-meta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 7px 9px 0; color: var(--muted); font-size: 11px; }
.asset-item-actions { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px; padding: 4px 5px 6px; }
.asset-item-actions .button { padding-inline: 4px; font-size: 11px; }

/* An isolated image dialog, deliberately separate from the existing form modal. */
.asset-viewer { position: fixed; inset: 0; width: 100%; height: 100%; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 18px; border: 0; background: rgba(5, 9, 16, .88); color: #eef2fa; overflow: hidden; }
.asset-viewer:not([open]) { display: none; }
.asset-viewer[open] { display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; }
.asset-viewer::backdrop { background: rgba(5, 9, 16, .85); }
.asset-viewer-fallback { z-index: 100; }
.asset-viewer-panel { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto minmax(0, 1fr) auto auto; width: min(1500px, 100%); height: 100%; min-height: 0; min-width: 0; background: #111723; border: 1px solid #333d50; border-radius: 12px; overflow: hidden; box-shadow: 0 24px 80px #0008; }
.asset-viewer-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; }
.asset-viewer-head > div { min-width: 0; }
.asset-viewer-head h2 { margin: 0; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.asset-viewer-head p { margin: 5px 0 0; font-size: 12px; color: #b7c5da; overflow-wrap: anywhere; max-height: 3em; overflow: auto; }
.asset-viewer button { border: 1px solid #46536a; border-radius: 6px; background: #222e41; color: #f1f5fc; padding: 7px 10px; min-height: 34px; flex-shrink: 0; }
.asset-viewer button:hover:not(:disabled) { background: #334867; }
.asset-viewer button:disabled { opacity: .4; cursor: default; }
.asset-viewer :focus-visible { outline: 2px solid #8dbbff; outline-offset: -2px; }
.asset-viewer [hidden] { display: none !important; }
.asset-viewer-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 0 16px 10px; }
.asset-viewer-zoom-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-left: auto; }
.asset-viewer-zoom-controls output { min-width: 44px; text-align: center; font-size: 12px; font-variant-numeric: tabular-nums; }
.asset-viewer-stage { position: relative; min-width: 0; min-height: 0; background: #05080e; }
.asset-viewer-viewport { width: 100%; height: 100%; overflow: auto; overscroll-behavior: contain; touch-action: none; }
.asset-viewer-viewport.is-zoomed { cursor: grab; }
.asset-viewer-viewport.is-zoomed:active { cursor: grabbing; }
.asset-viewer-canvas { min-width: 100%; min-height: 100%; display: grid; place-items: center; padding: 16px; }
.asset-viewer-image { display: block; max-width: none; max-height: none; object-fit: contain; user-select: none; -webkit-user-select: none; }
.asset-viewer-message { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 20px; text-align: center; color: #d6e2f5; background: #05080e; pointer-events: none; }
.asset-viewer-message p { margin: 0; line-height: 1.7; }
.asset-viewer-message button { pointer-events: auto; }
.asset-viewer-help { font-size: 11px; line-height: 1.6; color: #b7c5da; margin: 0; padding: 7px 16px; }
.asset-viewer-thumbs { display: flex; gap: 8px; padding: 4px 16px 10px; overflow-x: auto; min-width: 0; overscroll-behavior: contain; }
.asset-viewer-thumbs button { position: relative; width: 47px; height: 62px; padding: 2px; border: 2px solid transparent; background: #293345; }
.asset-viewer-thumbs button[aria-current="true"] { border-color: #8dbbff; background: #39557f; }
.asset-viewer-thumbs img { display: block; width: 100%; height: 100%; object-fit: contain; }
.asset-viewer-thumbs span { position: absolute; right: 1px; bottom: 1px; background: #000b; padding: 1px 4px; border-radius: 3px; font-size: 10px; }
.asset-viewer-thumbs .is-broken::before { content: '!'; color: #f4baba; }
@media (max-width: 1199px) { .asset-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 650px) { .asset-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; } .asset-viewer { padding: 6px; } .asset-viewer-head { padding: 10px; } .asset-viewer-toolbar { padding-inline: 10px; } .asset-viewer-zoom-controls { margin-left: 0; } .asset-viewer button { font-size: 12px; } .asset-viewer-help { padding-inline: 10px; } .asset-viewer-thumbs { padding-inline: 10px; } }
@media (max-width: 440px) { .asset-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-height: 520px) and (orientation: landscape) { .asset-viewer { padding: 4px; } .asset-viewer-head { padding-block: 5px; } .asset-viewer-toolbar { padding-bottom: 5px; } .asset-viewer-thumbs button { height: 40px; width: 32px; } .asset-viewer-help { padding-block: 3px; } }
.logout-link { display: block; text-align: center; color: #95a2b8; margin-top: 16px; font-size: 12px; }
.logout-link:hover { color: #fff; }

.main-area { flex: 1; min-width: 0; }
.topbar { height: 92px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.9); display: flex; align-items: center; justify-content: space-between; padding: 0 34px; position: sticky; top: 0; z-index: 5; backdrop-filter: blur(12px); }
.topbar-kicker { color: var(--muted); font-size: 11px; margin: 0 0 5px; letter-spacing: .08em; text-transform: uppercase; }
.topbar h1 { margin: 0; font-size: 23px; letter-spacing: -.025em; }
.topbar-actions { display: flex; gap: 16px; align-items: center; }
.today-label { color: var(--muted); font-size: 13px; }
.mobile-menu { display: none; background: transparent; border: 0; font-size: 22px; margin-right: 9px; }
.content { padding: 30px 34px 54px; max-width: 1600px; margin: 0 auto; }

.button { border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 7px; min-height: 38px; padding: 0 15px; font-weight: 600; transition: .18s ease; }
.button:hover { border-color: #c5cedb; transform: translateY(-1px); }
.button-primary { background: var(--blue); border-color: var(--blue); color: #fff; box-shadow: 0 8px 16px rgba(36,107,253,.18); }
.button-primary:hover { background: var(--blue-dark); border-color: var(--blue-dark); }
.button-secondary { background: var(--navy); border-color: var(--navy); color: #fff; }
.button-quiet { background: transparent; border-color: transparent; color: var(--blue); padding-inline: 8px; }
.button-danger { color: var(--red); border-color: #f2c7cc; background: var(--red-bg); }
.button-small { min-height: 31px; padding: 0 10px; font-size: 12px; }
.button-block { width: 100%; }

.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 20px; }
.section-head h2 { margin: 0; font-size: 18px; }
.section-head p { margin: 6px 0 0; color: var(--muted); }
.section-actions { display: flex; align-items: center; gap: 8px; }
.eyebrow { color: var(--blue); font-size: 11px; font-weight: 700; letter-spacing: .12em; margin: 0 0 9px; }
.muted { color: var(--muted); }
.grid { display: grid; gap: 16px; }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); }
.card-pad { padding: 20px; }
.stat-card { padding: 18px 20px; position: relative; overflow: hidden; }
.stat-card::after { content: ''; position: absolute; width: 74px; height: 74px; right: -29px; bottom: -29px; border-radius: 50%; background: var(--stat-color, #eaf0ff); }
.stat-label { color: var(--muted); font-size: 12px; }
.stat-value { font-size: 28px; font-weight: 700; margin: 13px 0 5px; letter-spacing: -.04em; }
.stat-note { color: var(--muted); font-size: 12px; }
.stat-blue { --stat-color: #e4edff; }
.stat-green { --stat-color: #def6ec; }
.stat-orange { --stat-color: #fff0d6; }
.stat-purple { --stat-color: #eee8ff; }
.stat-cyan { --stat-color: #dff7f8; }
.stat-red { --stat-color: #ffe3e5; }
.stat-blue .stat-value { color: var(--blue); }
.stat-green .stat-value { color: var(--green); }
.stat-orange .stat-value { color: var(--orange); }
.stat-purple .stat-value { color: var(--purple); }
.stat-cyan .stat-value { color: #0a97a7; }

.dashboard-grid { margin-top: 17px; grid-template-columns: 1.35fr .65fr; align-items: start; }
.panel-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 19px 20px; border-bottom: 1px solid var(--line); }
.panel-title h3 { margin: 0; font-size: 15px; }
.panel-title span { color: var(--muted); font-size: 12px; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; min-width: 620px; }
th { color: #8b96a8; text-align: left; font-size: 11px; font-weight: 600; letter-spacing: .06em; padding: 12px 20px; white-space: nowrap; background: #fbfcfe; }
td { border-top: 1px solid #eff1f5; padding: 14px 20px; vertical-align: middle; white-space: nowrap; }
td.wrap { white-space: normal; }
.primary-cell { font-weight: 600; color: var(--ink); }
.secondary-cell { color: var(--muted); font-size: 12px; margin-top: 4px; }
.data-unverified { color: var(--muted); font-size: 12px; font-weight: 400; }
.empty-state { padding: 38px 20px; text-align: center; color: var(--muted); }
.empty-state strong { display: block; color: var(--ink); margin-bottom: 6px; }
.progress-line { height: 7px; background: #edf0f5; border-radius: 99px; overflow: hidden; margin: 15px 0 10px; }
.progress-line span { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), var(--cyan)); border-radius: inherit; }
.plan-list { display: grid; gap: 11px; }
.plan-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid #eff1f5; }
.plan-item:last-child { border-bottom: 0; }
.plan-item strong { display: block; font-size: 13px; }
.plan-item small { display: block; color: var(--muted); margin-top: 4px; }
.number-pill { min-width: 31px; height: 31px; padding: 0 8px; border-radius: 6px; display: grid; place-items: center; background: #eef4ff; color: var(--blue); font-weight: 700; }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.search-input { min-width: 220px; flex: 1; }
.input, .select, .textarea { width: 100%; border: 1px solid #dfe5ec; border-radius: 6px; background: #fff; color: var(--ink); min-height: 40px; padding: 0 12px; outline: none; transition: border-color .18s, box-shadow .18s; }
.textarea { padding-top: 10px; min-height: 96px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(36,107,253,.11); }
.filter-select { width: auto; min-width: 130px; }
.label { display: block; color: #536073; font-size: 12px; font-weight: 600; margin-bottom: 7px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.form-grid .full { grid-column: 1 / -1; }
.stack-form { display: grid; gap: 14px; }
.stack-form label { display: grid; gap: 7px; color: #536073; font-size: 12px; font-weight: 600; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(15,25,44,.52); display: grid; place-items: center; padding: 20px; z-index: 20; }
.modal-backdrop[hidden] { display: none; }
.modal { width: min(680px, 100%); max-height: min(86vh, 820px); overflow: auto; background: #fff; border-radius: 10px; box-shadow: 0 24px 70px rgba(0,0,0,.2); }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 22px 24px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font-size: 18px; }
.modal-head p { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.modal-close { border: 0; background: #f2f4f7; color: var(--muted); width: 30px; height: 30px; border-radius: 6px; }
.modal-body { padding: 22px 24px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 9px; padding-top: 20px; }
.badge { display: inline-flex; align-items: center; min-height: 24px; padding: 0 8px; border-radius: 5px; background: #eff3f8; color: #617086; font-size: 11px; font-weight: 600; }
.badge-blue { color: var(--blue); background: #ebf2ff; }
.badge-green { color: var(--green); background: var(--green-bg); }
.badge-orange { color: var(--orange); background: var(--orange-bg); }
.badge-red { color: var(--red); background: var(--red-bg); }
.badge-purple { color: var(--purple); background: #f0ebff; }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.template-card { padding: 18px; min-height: 196px; display: flex; flex-direction: column; }
.template-card h3 { margin: 11px 0 8px; font-size: 15px; }
.template-card p { color: var(--muted); line-height: 1.65; margin: 0 0 15px; flex: 1; }
.template-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.production-resources { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(260px, .85fr); gap: 26px; padding: 24px; margin-bottom: 28px; background: linear-gradient(120deg, #f5f8ff, #fff 66%); }
.production-resources-compact { margin-top: 20px; }
.production-resource-copy h3 { margin: 0 0 9px; font-size: 18px; }
.production-resource-copy p:not(.eyebrow) { color: var(--muted); line-height: 1.7; margin: 0 0 16px; font-size: 12px; }
.production-resource-links { display: flex; flex-wrap: wrap; gap: 8px; }
.production-resource-links a, .sample-card a { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.production-brand { align-self: center; min-width: 0; }
.brand-preview-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.brand-preview { display: grid; grid-template-rows: 54px auto; justify-items: center; gap: 7px; padding: 12px; border: 1px solid var(--line); background: white; border-radius: 8px; color: var(--muted); text-decoration: none; font-size: 11px; }
.brand-preview:hover { border-color: var(--blue); }
.brand-preview img { width: 100%; height: 54px; object-fit: contain; }
.production-section-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 24px 0 16px; }
.production-section-heading h3 { margin: 0 0 6px; font-size: 17px; }
.production-section-heading p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.production-template-card { overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.template-cover { display: grid; place-items: center; width: 100%; aspect-ratio: 4 / 3; padding: 15px; border: 0; border-bottom: 1px solid var(--line); background: #eef2f7; cursor: pointer; overflow: hidden; }
.template-cover img { display: block; width: 100%; height: 100%; min-height: 0; object-fit: contain; transition: transform .2s; }
.template-cover:hover img { transform: scale(1.025); }
.template-cover-empty { color: var(--muted); font-size: 12px; cursor: default; }
.production-template-body { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.production-template-body h3 { margin: 0 0 8px; font-size: 16px; }
.production-template-body .template-meta { margin-bottom: 12px; }
.template-description { margin: 0 0 16px; font-size: 12px; color: var(--muted); line-height: 1.75; }
.template-page-preview { padding: 0; margin: 0 0 14px; list-style: none; display: grid; gap: 8px; }
.template-page-preview li { display: flex; align-items: baseline; gap: 8px; font-size: 12px; line-height: 1.5; }
.template-page-preview li span { font-variant-numeric: tabular-nums; color: #6b82aa; font-size: 11px; min-width: 20px; }
.template-counts { display: flex; flex-wrap: wrap; gap: 12px; font-size: 11px; color: var(--muted); padding: 12px 0; border-top: 1px solid var(--line); margin-top: auto; }
.template-card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.template-history { margin-top: 28px; padding: 20px; border: 1px solid var(--line); border-radius: 8px; }
.template-history > summary, .production-instructions > summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--ink); }
.template-history > summary span { color: var(--muted); font-size: 12px; font-weight: 400; margin-left: 8px; }
.template-history > p { font-size: 12px; line-height: 1.7; margin: 12px 0 18px; }
.sample-card { padding: 20px; }
.sample-card h4 { margin: 15px 0; font-size: 15px; line-height: 1.6; }
.modal-wide { width: min(980px, 100%); }
.template-detail-intro { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px; align-items: center; margin-bottom: 22px; }
.template-detail-intro > div:only-child { grid-column: 1 / -1; }
.template-detail-cover { display: block; width: 100%; max-height: 270px; object-fit: contain; background: #f3f5f8; border: 1px solid var(--line); border-radius: 8px; padding: 10px; }
.template-detail-intro .button { margin-top: 15px; }
.production-detail-section { margin: 22px 0; }
.production-detail-section h3 { font-size: 15px; margin: 0 0 14px; }
.production-list { padding-left: 19px; margin: 8px 0; color: #536073; line-height: 1.8; font-size: 13px; }
.production-list li + li { margin-top: 5px; }
.page-plan-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.page-plan-list > li { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; padding: 16px; background: #f8fafc; border: 1px solid #e9eef4; border-radius: 7px; }
.page-plan-number { width: 32px; min-height: 29px; align-self: start; display: grid; place-items: center; background: #eaf1ff; color: var(--blue); border-radius: 5px; font-size: 12px; font-weight: 700; }
.page-plan-list h4 { margin: 3px 0 7px; font-size: 14px; }
.page-plan-list p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.75; }
.page-plan-label { margin-top: 12px; color: #7e8a9c; font-size: 11px; font-weight: 600; }
.production-check-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.production-check-grid section { border-top: 1px solid var(--line); padding-top: 18px; }
.production-instructions { border: 1px solid var(--line); border-radius: 7px; padding: 15px; margin: 18px 0; }
.production-instructions .production-prose { margin-top: 14px; }
.production-prose { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.85; font-size: 13px; color: #536073; }
.production-version { margin: 18px 0 0; color: #8792a4; font-size: 11px; }
.task-title-link { border: 0; padding: 0; background: transparent; color: var(--ink); font: inherit; font-weight: 600; text-align: left; cursor: pointer; }
.task-title-link:hover { color: var(--blue); text-decoration: underline; }
.task-detail-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; color: var(--muted); font-size: 12px; }
.task-detail-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 22px 0; }
.task-detail-facts dt { color: var(--muted); font-size: 11px; margin-bottom: 6px; }
.task-detail-facts dd { margin: 0; font-size: 13px; font-weight: 600; }
.task-brief-copy { background: #f8fafc; border: 1px solid var(--line); padding: 16px; border-radius: 7px; }
.project-nature-field { border: 1px solid var(--line); padding: 14px 16px; border-radius: 7px; margin: 0; }
.project-nature-field label { display: inline-flex; align-items: center; gap: 6px; margin-right: 24px; font-size: 13px; }
.project-nature-field input { accent-color: var(--blue); }
.project-nature-field p { margin: 12px 0 0; font-size: 12px; color: var(--muted); line-height: 1.7; }
.form-help { margin: 20px 0 0; color: var(--muted); font-size: 12px; line-height: 1.7; align-self: center; }
.task-template-brief { padding: 17px; background: #f8fafc; border: 1px solid var(--line); border-radius: 7px; }
.task-template-brief h3 { margin: 0 0 7px; font-size: 14px; }
.task-template-brief > p { margin: 0 0 13px; font-size: 12px; line-height: 1.7; color: var(--muted); }
.input-checklist { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; margin-bottom: 10px; }
.input-checklist .check-line { align-items: flex-start; font-weight: 400; line-height: 1.65; }
.input-checklist input { flex-shrink: 0; margin-top: 4px; }
.brief-textarea { min-height: 150px; line-height: 1.7; }
.brief-missing { font-size: 12px; }
.case-module-summary { margin: 0 0 14px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 7px; font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
.case-module-summary p { margin: 3px 0; }
.case-task-fields { min-width: 0; margin: 0; padding: 16px; border: 1px solid var(--line); border-radius: 7px; }
.case-task-fields legend { padding: 0 5px; font-size: 13px; font-weight: 600; }
.case-task-fields .notice, .case-settings .notice { margin: 0; }
.case-task-fields .production-detail-section { margin: 16px 0 0; }
.case-settings > section h3 { margin: 10px 0; font-size: 15px; }
.case-settings .production-instructions { margin: 10px 0; }
.case-settings .production-version { margin: 10px 0; }
.case-frozen .task-detail-facts dd { overflow-wrap: anywhere; }
@media (max-width: 1100px) { .production-resources { grid-template-columns: 1fr; } .production-brand { max-width: 440px; } }
@media (max-width: 650px) { .production-resources { padding: 18px; gap: 18px; } .template-detail-intro, .production-check-grid, .input-checklist { grid-template-columns: 1fr; } .template-detail-cover { max-height: 260px; width: min(220px, 100%); margin: 0 auto; } .production-check-grid { gap: 0; } .production-template-body { padding: 17px; } .template-history { padding: 15px; } .project-nature-field label { display: flex; margin: 5px 0; } .page-plan-list > li { padding: 12px; gap: 9px; } .template-cover { aspect-ratio: 4 / 3; } }
.inspiration-card { overflow: hidden; }
.inspiration-cover { height: 126px; background: linear-gradient(135deg, #e7eefb, #e1f4f1); display: grid; place-items: center; color: #7d8ba3; font-size: 12px; }
.inspiration-cover img { width: 100%; height: 100%; object-fit: cover; }
.inspiration-body { padding: 16px; }
.inspiration-body h3 { margin: 0 0 7px; font-size: 15px; }
.inspiration-body p { color: var(--muted); line-height: 1.55; margin: 0 0 10px; }
.list-stack { display: grid; gap: 11px; }
.list-row { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 15px 18px; display: flex; justify-content: space-between; align-items: center; gap: 18px; }
.list-row:hover { border-color: #c8d5eb; box-shadow: 0 8px 20px rgba(24,36,58,.05); }
.list-row-main { min-width: 0; }
.list-row-main strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-row-main p { color: var(--muted); margin: 5px 0 0; font-size: 12px; }
.row-actions { display: flex; align-items: center; gap: 7px; flex-shrink: 0; }
.split-layout { display: grid; grid-template-columns: .8fr 1.2fr; gap: 18px; align-items: start; }
.settings-card { padding: 21px; }
.settings-card h3 { margin: 0 0 8px; font-size: 16px; }
.settings-card p { color: var(--muted); line-height: 1.6; margin: 0 0 20px; }
.notice { border-left: 3px solid var(--cyan); background: #effafb; padding: 13px 15px; color: #47737a; line-height: 1.6; border-radius: 0 6px 6px 0; }
.alert { border-radius: 6px; padding: 10px 12px; font-size: 12px; }
.alert-danger { background: var(--red-bg); color: var(--red); }
.alert-success { background: var(--green-bg); color: var(--green); }
.check-line { display: flex !important; grid-template-columns: auto 1fr; align-items: center; gap: 8px !important; color: #536073; font-size: 12px; font-weight: 600; }
.check-line input { accent-color: var(--blue); }
.toast { position: fixed; z-index: 40; top: 22px; left: 50%; transform: translate(-50%, -15px); opacity: 0; pointer-events: none; background: #152033; color: #fff; padding: 11px 17px; border-radius: 7px; box-shadow: 0 12px 30px rgba(21,32,51,.2); transition: .2s ease; font-size: 13px; }
.toast.visible { opacity: 1; transform: translate(-50%, 0); }
.toast-error { background: #b63f4d; }

.login-page { min-height: 100vh; display: grid; place-items: center; background: radial-gradient(circle at 12% 8%, #e1edff, transparent 35%), radial-gradient(circle at 90% 88%, #dff8f0, transparent 35%), #f5f7fb; }
.login-shell { width: min(430px, calc(100% - 34px)); }
.login-brand { display: flex; align-items: center; gap: 11px; font-size: 18px; font-weight: 700; margin-bottom: 19px; }
.login-card { background: rgba(255,255,255,.93); border: 1px solid var(--line); border-radius: 10px; padding: 32px; box-shadow: 0 20px 60px rgba(26,44,75,.1); }
.login-card h1 { font-size: 28px; margin: 0 0 8px; }
.login-card > .muted { margin: 0 0 24px; line-height: 1.6; }
.login-foot { color: #8a95a7; font-size: 12px; text-align: center; margin: 18px 0 0; }

@media (max-width: 1180px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) { .sidebar { position: fixed; inset: 0 auto 0 0; z-index: 10; transform: translateX(-100%); transition: transform .2s; box-shadow: 12px 0 30px rgba(0,0,0,.18); } .sidebar.open { transform: translateX(0); } .mobile-menu { display: inline-block; } .topbar { padding: 0 20px; } .content { padding: 24px 20px 45px; } .dashboard-grid, .split-layout { grid-template-columns: 1fr; } }
@media (max-width: 650px) { .topbar { height: 76px; } .topbar-kicker, .today-label { display: none; } .topbar h1 { font-size: 20px; } .topbar-actions .button { padding: 0 10px; font-size: 12px; } .content { padding-inline: 14px; } .grid-4, .grid-3, .grid-2, .card-grid, .form-grid { grid-template-columns: 1fr; } .form-grid .full { grid-column: auto; } .section-head { align-items: flex-start; flex-direction: column; } .section-actions { width: 100%; } .section-actions .button { flex: 1; } .list-row { align-items: flex-start; flex-direction: column; } .row-actions { width: 100%; justify-content: flex-end; } .modal-body, .modal-head { padding-inline: 18px; } }

/* Competitor monitoring: isolate wrapping and layout from global data tables. */
.competitor-page { min-width: 0; }
.competitor-page .section-head > div { min-width: 0; }
.competitor-page .section-head p { line-height: 1.65; overflow-wrap: anywhere; }
.competitor-page .section-actions { flex-shrink: 0; flex-wrap: wrap; }
.competitor-page .section-actions .button { min-height: 40px; }
.competitor-page .card { min-width: 0; box-shadow: none; }
.competitor-page .button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; }
.competitor-page .badge { max-width: 100%; overflow-wrap: anywhere; }
.competitor-accounts { margin-bottom: 22px; }
.competitor-account-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 18px 20px; }
.competitor-account { display: flex; flex-direction: column; min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 7px; background: #fbfcfe; }
.competitor-account-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.competitor-account-heading h4 { margin: 2px 0 0; min-width: 0; font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.competitor-account-heading .badge { flex-shrink: 0; max-width: 45%; }
.competitor-account-meta { margin: 9px 0 16px; font-size: 12px; line-height: 1.7; color: var(--muted); overflow-wrap: anywhere; }
.competitor-account-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; }
.competitor-account-footer > span { min-width: 0; font-size: 12px; line-height: 1.6; color: var(--muted); overflow-wrap: anywhere; }
.competitor-account-footer .button { min-height: 34px; }
.competitor-more-accounts { border-top: 1px solid var(--line); }
.competitor-more-accounts > summary { padding: 14px 20px; color: var(--blue); font-size: 12px; cursor: pointer; }
.competitor-more-accounts[open] > summary { border-bottom: 1px solid var(--line); }
.competitor-posts-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; padding: 20px; border-bottom: 1px solid var(--line); }
.competitor-posts-toolbar > div { min-width: 0; }
.competitor-posts-toolbar h3 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; margin: 0; font-size: 15px; }
.competitor-posts-toolbar h3 span { color: var(--muted); font-size: 12px; font-weight: 400; }
.competitor-posts-toolbar p { margin: 8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.competitor-search { flex: 0 1 320px; min-width: 0; }
.competitor-search .label { margin-bottom: 6px; }
.competitor-post { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(190px, .75fr) minmax(0, 1fr); gap: 24px; padding: 22px 20px; align-items: start; }
.competitor-post + .competitor-post { border-top: 1px solid var(--line); }
.competitor-post > div { min-width: 0; overflow-wrap: anywhere; }
.competitor-post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.competitor-post-main h4 { margin: 10px 0; font-size: 14px; line-height: 1.75; font-weight: 600; overflow-wrap: anywhere; }
.competitor-post-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.competitor-post-footer .button { padding-inline: 0; min-height: 34px; }
.competitor-post h5 { margin: 2px 0 12px; font-size: 11px; color: var(--muted); font-weight: 500; }
.competitor-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 12px 10px; border-radius: 6px; background: #f6f8fb; text-align: center; }
.competitor-metrics > div { min-width: 0; }
.competitor-metrics dt { margin-bottom: 8px; color: var(--muted); font-size: 11px; }
.competitor-metrics dd { margin: 0; font-size: 14px; line-height: 1.5; font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.competitor-metrics .data-unverified { font-size: 11px; }
.competitor-tags { margin: 0 0 10px; color: #526987; font-size: 12px; line-height: 1.8; overflow-wrap: anywhere; }
.competitor-analysis-detail > summary { cursor: pointer; color: var(--blue); font-size: 12px; line-height: 1.7; padding-block: 5px; }
.competitor-analysis-detail p { margin: 10px 0 0; color: #536073; font-size: 12px; line-height: 1.85; white-space: pre-wrap; overflow-wrap: anywhere; }
.competitor-analysis-empty { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.competitor-page summary:focus-visible, .competitor-page a:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
@media (min-width: 901px) and (max-width: 1100px) { .competitor-page .section-head { align-items: flex-start; flex-direction: column; } }
@media (max-width: 1100px) { .competitor-post { grid-template-columns: minmax(0, 1fr) minmax(190px, .65fr); gap: 18px; } .competitor-post-analysis { grid-column: 1 / -1; padding-top: 14px; border-top: 1px dashed var(--line); } .competitor-account-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 650px) { .competitor-account-grid { grid-template-columns: minmax(0, 1fr); padding: 14px; gap: 10px; } .competitor-page .panel-title, .competitor-posts-toolbar { padding: 16px 14px; } .competitor-page .panel-title { flex-wrap: wrap; } .competitor-page .section-actions .button { padding-inline: 10px; font-size: 12px; } .competitor-search { flex-basis: 100%; } .competitor-post { grid-template-columns: minmax(0, 1fr); padding: 18px 14px; gap: 16px; } .competitor-post-analysis { padding-top: 0; border-top: 0; } .competitor-post h5 { margin-bottom: 8px; } .competitor-metrics { padding-block: 12px; } .competitor-more-accounts > summary { padding-inline: 14px; } }
