@import url('/static/fonts/fonts.css');

:root {
  font-family: "IBM Plex Sans", "Segoe UI", Arial, sans-serif;
  font-size: 100%;
  font-weight: 400;
  color-scheme: light;
  --bg: #f3f5f8;
  --surface: #ffffff;
  --ink: #202d40;
  --muted: #5f6d80;
  --line: #dbe1e9;
  --accent: #24579a;
  --accent-hover: #19437d;
  --accent-soft: #edf3fb;
  --nav: #17263c;
  --radius: 6px;
  --sidebar-width: 240px;
  /* One hierarchy across views; rem keeps browser text scaling available. */
  --text-meta: .8125rem;
  --text-small: .875rem;
  --text-body: .9375rem;
  --text-input: 1rem;
  --heading-page: 1.625rem;
  --heading-section: 1.125rem;
  --heading-dialog: 1.25rem;
  --heading-brand: 1.375rem;
  --heading-metric: 1.75rem;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-size: var(--text-body); line-height: 1.5; }
body:has(dialog[open]) { overflow: hidden; }
button, input, textarea { font: inherit; }
input::file-selector-button { font: inherit; color: var(--ink); background: #f2f5f9; border: 1px solid var(--line); border-radius: 3px; padding: 5px 9px; margin-right: 10px; cursor: pointer; }
button, a { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { opacity: .5; cursor: not-allowed; }
a { color: var(--accent); }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
h1 { font-size: var(--heading-page); }
h2 { font-size: var(--heading-dialog); }
h3 { font-size: 1rem; }
svg { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
svg.brand-icon { fill: currentColor; stroke: none; width: 19px; height: 19px; }
.platform-badge.large svg.brand-icon { width: 26px; height: 26px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.muted { color: var(--muted); }
:focus-visible { outline: 2px solid #4c7fc2; outline-offset: 3px; }
input, textarea { width: 100%; min-width: 0; color: var(--ink); background: var(--surface); border: 1px solid #acb8c8; border-radius: 4px; padding: 10px 12px; font-size: var(--text-input); line-height: 1.5; }
input:focus, textarea:focus { border-color: var(--accent); outline: 2px solid #c3d6ef; outline-offset: 0; }
input::placeholder, textarea::placeholder { color: #6d7888; opacity: 1; }
input[aria-invalid="true"] { border-color: #b33c35; }
textarea { resize: vertical; min-height: 128px; }
label { display: block; margin-bottom: 7px; font-size: var(--text-small); font-weight: 600; }
.field-hint { display: block; margin-top: 6px; color: var(--muted); font-size: 13px; font-weight: 400; line-height: 1.5; }
.required-mark { color: #a83c35; }
.field-error { margin-top: 8px; color: #a03c33; font-size: 14px; line-height: 1.5; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 16px; border: 1px solid transparent; border-radius: 4px; text-decoration: none; font-size: var(--text-small); font-weight: 600; line-height: 1.4; text-align: center; }
.btn svg { width: 18px; height: 18px; }
.primary { color: white; background: var(--accent); border-color: var(--accent); }
.primary:hover:not(:disabled) { background: var(--accent-hover); }
.secondary { color: #334660; background: white; border-color: #bfc9d5; }
.secondary:hover:not(:disabled) { background: #f0f3f7; border-color: #8697ae; }
.btn.small { min-height: 36px; padding: 7px 10px; font-size: 14px; }
.icon-btn { width: 40px; height: 40px; flex-shrink: 0; display: inline-grid; place-items: center; border: 1px solid transparent; background: transparent; color: #516277; border-radius: 4px; }
.icon-btn:hover { background: #edf1f6; }
.text-button { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 2px 0; border: 0; color: var(--accent); background: transparent; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.text-button svg { width: 16px; height: 16px; }
.eyebrow { color: var(--muted); font-size: 13px; font-weight: 600; letter-spacing: .4px; margin-bottom: 6px; }

/* Workspace navigation */
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar-width); display: flex; flex-direction: column; padding: 24px 16px; background: var(--nav); color: white; overflow-y: auto; z-index: 10; }
.brand { display: flex; align-items: center; gap: 10px; margin: 0 8px 24px; color: white; text-decoration: none; font-size: var(--heading-brand); font-weight: 600; letter-spacing: .1px; }
.brand-mark { width: 34px; height: 34px; display: inline-grid; place-items: center; color: white; background: #2c5c9c; font-size: 23px; font-weight: 600; border-radius: 4px; flex-shrink: 0; }
.workspace-card { display: flex; align-items: center; gap: 10px; padding: 14px 10px; margin-bottom: 28px; border-top: 1px solid #3a475a; border-bottom: 1px solid #3a475a; }
.workspace-symbol { display: grid; place-items: center; width: 30px; height: 34px; flex-shrink: 0; background: #2a3c54; font-size: 15px; border-radius: 4px; }
.workspace-card strong { display: block; font-size: 14px; font-weight: 600; }
.workspace-card span:not(.workspace-symbol) { display: block; font-size: 13px; color: #b9c6d7; margin-top: 5px; }
.nav-label { margin: 0 12px 10px; color: #a5b5ca; font-size: 12px; letter-spacing: .8px; }
.nav-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; margin-bottom: 4px; padding: 12px; border: 0; border-radius: 4px; color: #c9d4e3; background: transparent; text-align: left; font-size: var(--text-small); }
.nav-item:hover { color: white; background: #24364e; }
.nav-item.active { color: white; background: #2c4a70; font-weight: 600; }
.nav-count, .nav-note { margin-left: auto; font-size: 13px; }
.nav-count { border-radius: 3px; padding: 0 6px; background: #426185; color: white; }
.nav-note { color: #b5c3d7; }
.sidebar-bottom { margin-top: auto; padding-top: 28px; }
.sandbox-note { border: 1px solid #3a4d65; padding: 12px; border-radius: 4px; font-size: 13px; }
.sandbox-note p { color: #b5c3d7; margin-top: 8px; font-size: 13px; }
.live-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #92b5e9; margin-right: 6px; }
.profile { display: flex; align-items: center; gap: 10px; padding-top: 20px; margin-top: 20px; border-top: 1px solid #3a475a; }
.avatar { display: grid; place-items: center; width: 32px; height: 32px; background: #2a3c54; border-radius: 4px; flex-shrink: 0; }
.profile strong { display: block; font-size: 14px; }
.profile small { display: block; font-size: 13px; color: #b5c3d7; margin-top: 3px; }
.app-main { margin-left: var(--sidebar-width); min-width: 0; }
.topbar { min-height: 64px; padding: 16px 32px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); color: var(--muted); background: white; font-size: 14px; }
.topbar strong { color: var(--ink); font-weight: 600; }
.slash { margin: 0 12px; color: #7e8c9f; }
.timezone { display: flex; align-items: center; gap: 7px; white-space: nowrap; font-size: 13px; }
.timezone svg { width: 16px; height: 16px; }
main { max-width: 1600px; margin: 0 auto; padding: 28px 32px; }
.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 20px; }
.page-heading p { margin-top: 6px; color: var(--muted); font-size: var(--text-small); }
.page-heading .btn { flex-shrink: 0; }
.demo-banner { display: flex; align-items: flex-start; gap: 12px; padding: 16px; border: 1px solid #c4d4e9; border-left: 3px solid #4874b2; border-radius: 4px; background: #f0f5fc; margin-bottom: 24px; }
.banner-icon { display: grid; place-items: center; color: #426995; padding-top: 2px; }
.demo-banner>div { min-width: 0; flex: 1; }
.demo-banner strong { font-size: 15px; font-weight: 600; }
.demo-banner p { margin-top: 4px; font-size: 14px; color: #4f6481; }
.demo-banner>.pill { flex-shrink: 0; }
.pill { display: inline-flex; align-items: center; padding: 4px 8px; border: 1px solid transparent; border-radius: 4px; font-size: 13px; font-weight: 500; white-space: nowrap; }
.pill.demo { background: #e8edf5; color: #425b7a; border-color: #cbd6e5; }
.pill.draft { background: #f0f2f5; color: #556175; border-color: #dbe1e9; }
.pill.scheduled, .pill.queued { background: #edf3fc; color: #2c5895; border-color: #d0dff3; }
.pill.running, .pill.processing { background: #fff7e6; color: #865d13; border-color: #ead5a5; }
.pill.failed { background: #fceeed; color: #a2352d; border-color: #e9c6c2; }
.pill.completed, .pill.demo_done { background: #edf6f0; color: #2a6545; border-color: #c8ded0; }
.stats { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; margin-bottom: 24px; }
.stat { background: white; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; min-width: 0; }
.stat-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; color: #526178; font-size: 14px; }
.stat-top svg { width: 17px; height: 17px; color: #7387a2; margin-top: 2px; }
.stat-value { font-size: var(--heading-metric); font-weight: 600; line-height: 1.2; margin-top: 12px; font-variant-numeric: tabular-nums; }
.stat-note { font-size: 13px; color: var(--muted); margin-top: 6px; }
.section-toolbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; margin-bottom: 16px; }
.filters { display: flex; gap: 4px; flex-wrap: wrap; }
.filter { min-height: 40px; padding: 8px 10px; border: 1px solid transparent; border-radius: 4px; background: transparent; color: #526178; font-size: 14px; }
.filter:hover { background: #e8edf4; }
.filter.active { border-color: #c8d8ec; background: var(--accent-soft); color: #214d88; font-weight: 600; }
.filter span { margin-left: 5px; font-size: 13px; }
.search-wrap { display: flex; align-items: center; position: relative; width: 250px; max-width: 100%; }
.search-wrap svg { position: absolute; left: 12px; width: 18px; height: 18px; color: var(--muted); }
.search-wrap input { padding-left: 38px; font-size: 15px; }
.panel { min-width: 0; background: white; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px 16px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.panel-heading h2 { font-size: var(--heading-section); }
.panel-heading h3 { font-size: 16px; }
.panel-heading>span, .panel-heading>div>span { color: var(--muted); font-size: var(--text-meta); }
.panel-heading>div>span { display: block; margin-top: 4px; line-height: 1.5; }
.table-wrap { position: relative; overflow-x: auto; max-width: 100%; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 14px; }
th { padding: 12px 16px; color: #55657b; background: #f7f9fc; border-bottom: 1px solid var(--line); font-size: 13px; font-weight: 600; white-space: nowrap; }
td { padding: 16px; border-bottom: 1px solid #e4e9f0; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fafbfd; }
.campaign-title-button { padding: 0; border: 0; background: transparent; color: #234a7e; text-align: left; font-size: 15px; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }
.campaign-title-button:hover { text-decoration: underline; }
.table-subtitle { display: block; margin-top: 5px; font-size: 13px; color: var(--muted); }
.campaign-table td:first-child { min-width: 200px; max-width: 340px; }
.table-date { white-space: nowrap; font-variant-numeric: tabular-nums; }
.platform-stack { display: flex; flex-wrap: nowrap; gap: 4px; }
.platform-badge { width: 26px; height: 26px; flex-shrink: 0; display: inline-grid; place-items: center; border: 1px solid #d5dce6; border-radius: 4px; background: #f5f7fa; color: #41556f; font-size: 16px; font-weight: 600; font-family: Arial, sans-serif; }
.platform-badge.large { width: 36px; height: 36px; font-size: 21px; }
.progress-track { display: flex; gap: 3px; margin-top: 7px; }
.progress-track i { display: block; width: 12px; height: 4px; background: #e1e7f0; border-radius: 1px; }
.progress-track i.filled { background: #4874af; }
.empty-state { text-align: center; padding: 36px 24px; }
.empty-art { display: flex; justify-content: center; gap: 8px; margin-bottom: 24px; }
.empty-art .platform-badge { width: 40px; height: 40px; font-size: 21px; }
.empty-state h2 { font-size: var(--heading-section); margin-bottom: 8px; }
.empty-state p { max-width: 480px; margin: 0 auto 18px; color: var(--muted); font-size: var(--text-small); line-height: 1.6; }
.quick-guide { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; margin-top: 20px; }
.guide-card { display: flex; align-items: flex-start; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 4px; background: #f8fafd; }
.guide-number { flex-shrink: 0; display: grid; place-items: center; width: 26px; height: 26px; background: #e7edf6; border-radius: 3px; color: #365783; font-size: 13px; font-weight: 600; }
.guide-card h3 { font-size: 14px; margin: 2px 0 7px; }
.guide-card p { font-size: 13px; color: var(--muted); line-height: 1.6; }
.page-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 20px; margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.loading { padding: 40px; text-align: center; color: var(--muted); }
.connection-error, .form-message { padding: 12px 16px; border: 1px solid #e5b8b3; background: #fff3f1; color: #92362e; border-radius: 4px; font-size: 14px; }
.connection-error { margin-bottom: 20px; }

/* Dialogs have a fixed header/footer and one independently scrolling body. */
dialog { margin: auto; padding: 0; border: 1px solid #c8d1dd; border-radius: 8px; background: white; color: var(--ink); box-shadow: 0 20px 60px #12223b3b; overflow: hidden; max-width: calc(100vw - 32px); max-height: calc(100dvh - 40px); }
dialog::backdrop { background: #16253c80; }
.editor-dialog { width: 1160px; height: min(920px,calc(100dvh - 40px)); }
.editor-dialog[open], .detail-dialog[open] { display: flex; flex-direction: column; }
#editor-form { display: grid; grid-template-rows: auto auto minmax(0,1fr) auto; width: 100%; height: 100%; min-height: 0; }
.modal-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px 24px; border-bottom: 1px solid var(--line); background: white; min-width: 0; }
.modal-heading>div { min-width: 0; }
.modal-heading h2 { font-size: var(--heading-dialog); }
.modal-heading .eyebrow { font-size: 13px; }
.wizard-steps { list-style: none; display: flex; gap: 24px; padding: 14px 24px; margin: 0; border-bottom: 1px solid var(--line); background: #f7f9fc; }
.wizard-steps li { display: flex; align-items: center; gap: 8px; font-size: 14px; color: #64748a; }
.wizard-steps li>span { display: inline-grid; place-items: center; width: 25px; height: 25px; border: 1px solid #bfccde; border-radius: 50%; font-size: 13px; }
.wizard-steps li.current { color: #244e88; font-weight: 600; }
.wizard-steps li.current>span { background: var(--accent); border-color: var(--accent); color: white; }
.modal-scroll { min-height: 0; overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.form-message { margin: 18px 24px 0; }
.editor-name { padding: 22px 24px; border-bottom: 1px solid var(--line); }
.editor-body { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(280px,1fr); align-items: start; }
.material-editor { min-width: 0; padding: 22px 24px; }
.section-heading { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.section-heading h3 { font-size: 16px; }
.section-help { font-size: 14px; color: var(--muted); margin: 12px 0 18px; line-height: 1.55; }
.platform-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.platform-tab { display: flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 9px; border: 1px solid #cbd4e1; border-radius: 4px; background: white; color: #4a5b73; font-size: 14px; }
.platform-tab.active { border-color: var(--accent); background: var(--accent-soft); color: #214d88; box-shadow: inset 0 -2px var(--accent); }
.platform-tab .platform-badge { border: 0; background: transparent; width: 18px; height: 20px; font-size: 15px; color: inherit; }
.tab-done, .tab-done svg { width: 14px; height: 14px; color: #2a6545; }
.field { margin-bottom: 18px; }
.dropzone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 130px; padding: 20px 16px; border: 1px dashed #8fa7c6; border-radius: 4px; background: #f7faff; text-align: center; cursor: pointer; font-weight: 400; }
.dropzone { width: 100%; }
.dropzone.dragging { border-color: var(--accent); background: #e5eefb; }
.dropzone svg { color: #547aa8; width: 26px; height: 26px; }
.dropzone strong { font-size: 15px; color: #2b5489; }
.dropzone span { font-size: 13px; color: var(--muted); }
.attached-file { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid #c7d8cd; border-radius: 4px; background: #f5faf7; }
.attached-file>svg { color: #3b7351; }
.attached-file>div { min-width: 0; flex: 1; }
.attached-file strong { display: block; overflow-wrap: anywhere; font-size: 14px; }
.attached-file small { display: block; font-size: 13px; color: var(--muted); margin-top: 3px; }
.advanced { padding: 16px 0 0; border-top: 1px solid var(--line); margin-top: 22px; font-size: 14px; }
.advanced summary { cursor: pointer; color: #4e617c; }
.checkbox-line { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; margin: 12px 0 0; font-size: 14px; }
.checkbox-line input { width: 17px; height: 17px; margin-top: 3px; flex-shrink: 0; accent-color: var(--accent); }
.preview-column { min-width: 0; border-left: 1px solid var(--line); background: #f6f8fb; padding: 22px 20px; }
.preview-column>summary { cursor: pointer; font-size: 15px; font-weight: 600; color: #3e526e; }
.preview-content { margin-top: 18px; }
.post-preview { border: 1px solid #d2dbe7; border-radius: 4px; overflow: hidden; background: white; min-width: 0; }
.post-header { display: flex; gap: 10px; align-items: center; padding: 14px; }
.post-header strong { display: block; font-size: 14px; }
.post-header span:not(.platform-badge) { display: block; color: var(--muted); font-size: 13px; margin-top: 3px; }
.preview-media { background: #e9eef5; min-height: 155px; display: grid; place-items: center; color: #6d84a2; }
.preview-media>svg { width: 38px; height: 38px; }
.preview-media img, .preview-media video { display: block; width: 100%; max-height: 260px; object-fit: contain; }
.post-text { padding: 16px; font-size: 15px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.post-text strong { display: block; font-size: 16px; margin-bottom: 5px; }
.preview-note { margin-top: 14px; font-size: 13px; color: var(--muted); line-height: 1.5; }
.modal-footer { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 24px; border-top: 1px solid var(--line); background: #fff; min-width: 0; }
.footer-meta { min-width: 0; }
.ready-count { font-size: 14px; font-weight: 600; color: #43566f; }
.footer-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; flex-shrink: 0; }
.footer-meta .field-hint { margin-top: 3px; }
.review-step { padding: 24px; max-width: 880px; margin: 0 auto; }
.review-heading { margin-bottom: 18px; }
.review-heading p { margin-top: 8px; font-size: 15px; color: var(--muted); overflow-wrap: anywhere; }
.review-materials { border: 1px solid var(--line); border-radius: 4px; }
.review-row { display: grid; grid-template-columns: 140px minmax(0,1fr) auto; align-items: center; gap: 16px; padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 14px; }
.review-row:last-child { border-bottom: 0; }
.review-platform { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.review-file { min-width: 0; }
.review-file strong { display: block; overflow-wrap: anywhere; font-weight: 400; }
.review-file small { color: var(--muted); font-size: 13px; }
.review-edit { white-space: nowrap; }
.launch-options { margin: 24px 0 0; padding: 0; border: 0; min-width: 0; }
.launch-options legend { font-size: 17px; font-weight: 600; padding: 0; margin-bottom: 12px; }
.launch-choices { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.radio-choice { display: flex; align-items: flex-start; gap: 10px; border: 1px solid #bdc9d9; border-radius: 4px; padding: 14px; margin: 0; cursor: pointer; }
.radio-choice:has(input:checked) { background: var(--accent-soft); border-color: var(--accent); }
.radio-choice input { flex-shrink: 0; width: 17px; height: 17px; margin: 3px 0 0; accent-color: var(--accent); }
.radio-choice strong { font-size: 15px; font-weight: 600; }
.radio-choice small { display: block; color: var(--muted); font-size: 13px; font-weight: 400; margin-top: 4px; }
.schedule-fields { margin-top: 18px; }
.schedule-fields input { max-width: 320px; }
.review-notice { display: flex; gap: 10px; background: #f0f4f9; border-left: 3px solid #6889b4; padding: 14px; margin-top: 24px; color: #415b7d; font-size: 14px; }
.form-message.warning { background: #fff8e8; color: #7b5b1d; border-color: #e4d09e; }
.editor-progress { display: flex; align-items: center; gap: 10px; color: #355e94; font-size: 14px; }
.editor-progress progress { width: 90px; height: 6px; accent-color: var(--accent); }

/* Results, reports and connected-account placeholders */
.detail-dialog { width: 1080px; height: min(840px,calc(100dvh - 40px)); }
#detail-content { display: grid; grid-template-rows: auto minmax(0,1fr) auto; width: 100%; height: 100%; min-height: 0; }
.detail-body { min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 22px 24px; }
.detail-summary { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 20px; }
.detail-summary p { margin-top: 8px; color: var(--muted); font-size: 14px; }
.detail-body .table-wrap { border: 1px solid var(--line); border-radius: 4px; }
.result-platform { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.result-guidance { padding: 12px 14px; margin-bottom: 18px; background: #f3f6fa; border: 1px solid #d6e0ed; border-radius: 4px; color: #486280; font-size: 14px; }
.result-guidance.failed { background: #fff4f1; color: #963e2e; border-color: #edc9c0; }
.events-heading { margin-top: 24px; font-size: 16px; }
.event-list { margin-top: 12px; border-top: 1px solid var(--line); }
.event { display: grid; grid-template-columns: 140px minmax(0,1fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid #e5eaf1; font-size: 14px; }
.event time { font-size: 13px; color: var(--muted); }
.event span { overflow-wrap: anywhere; }
.error-text { display: block; max-width: 260px; font-size: 13px; color: #a03c33; line-height: 1.5; }
.toast { position: fixed; bottom: 20px; right: 24px; z-index: 100; width: max-content; max-width: min(440px,calc(100vw - 32px)); padding: 14px 18px; border-radius: 4px; background: #243f65; color: white; box-shadow: 0 4px 16px #12243b24; font-size: 14px; pointer-events: none; }
.toast.error { background: #953c34; }
.accounts-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.account-overview { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 20px; }
.account-overview h2 { font-size: var(--heading-dialog); }
.account-overview p { margin-top: 8px; font-size: 15px; color: var(--muted); max-width: 720px; }
.account-overview>.pill { flex-shrink: 0; }
.account-steps { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; margin: 20px 0; }
.account-steps>div { display: flex; gap: 10px; min-width: 0; }
.account-steps>div>span { width: 26px; height: 26px; flex-shrink: 0; display: grid; place-items: center; border: 1px solid #b9cbe2; border-radius: 4px; color: var(--accent); font-size: 14px; }
.account-steps p { font-size: 13px; color: var(--muted); }
.account-steps strong { display: block; color: var(--ink); font-size: 14px; margin-bottom: 3px; }
.connection-card { display: flex; flex-direction: column; }
.connection-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.connection-type { color: var(--muted); font-size: 13px; display: block; margin: -4px 0 12px; }
.connection-tag { color: #486280; font-size: 13px; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.connection-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; padding-top: 20px; margin-top: auto; }
.connection-actions .btn { width: 100%; }
.settings-link { margin-top: 10px; align-self: flex-start; text-align: left; }
.connected-identity { margin-top: 14px; padding: 12px; background: #f5f8fc; border: 1px solid var(--line); border-radius: 4px; overflow-wrap: anywhere; }
.connected-identity a { font-size: 15px; font-weight: 600; }
.connected-identity span { display: block; color: var(--muted); font-size: 13px; margin-top: 5px; }
.account-message { padding: 12px 16px; border: 1px solid #cbd9eb; border-radius: 4px; background: #f1f6fc; color: #395877; font-size: 14px; line-height: 1.6; margin: 16px 0; overflow-wrap: anywhere; }
.account-message.is-error { color: #92362e; background: #fff3f1; border-color: #e5b8b3; }
.account-message .btn { margin-top: 12px; }
.account-dialog { width: 820px; height: min(850px,calc(100dvh - 40px)); }
.account-dialog[open] { display: flex; }
.account-dialog-layout { display: grid; grid-template-rows: auto minmax(0,1fr) auto; height: 100%; width: 100%; min-height: 0; }
#account-dialog-body { padding: 0 24px 24px; }
#account-dialog-footer { flex-wrap: wrap; }
#account-dialog-footer>.field-hint { max-width: 280px; margin: 0; }
.account-guide, .google-setup { padding-top: 22px; }
.account-guide h3 { margin: 16px 0 12px; }
.account-guide p { font-size: 15px; }
.account-guide ol { padding-left: 22px; font-size: 15px; }
.account-guide li { padding: 6px 0; }
.setup-summary h3 { margin: 14px 0 8px; }
.setup-summary p { color: var(--muted); font-size: 15px; }
.google-settings { border: 1px solid var(--line); border-radius: 4px; padding: 16px; margin: 20px 0; }
.google-settings>summary { font-size: 15px; font-weight: 600; cursor: pointer; color: #2d4d77; }
.setup-checklist { padding-left: 22px; margin: 20px 0; }
.setup-checklist li { margin-bottom: 18px; padding-left: 4px; font-size: 15px; }
.setup-checklist li p { margin: 6px 0 10px; font-size: 14px; color: var(--muted); }
.copy-field { display: flex; gap: 8px; align-items: stretch; }
.copy-field input { font-size: 13px; min-width: 0; }
.copy-field .btn { flex-shrink: 0; font-size: 13px; padding: 8px 12px; }
#google-settings-form { border-top: 1px solid var(--line); padding-top: 16px; }
.google-instructions { border-top: 1px solid var(--line); margin-top: 20px; padding-top: 16px; }
.google-instructions>summary { cursor: pointer; color: var(--accent); font-size: 14px; font-weight: 600; }
.google-settings>summary+form { margin-top: 16px; }
#google-import-status { margin-bottom: 16px; }
.settings-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.account-permissions h3 { font-size: 16px; }
.account-permissions ul { font-size: 14px; padding-left: 20px; }
.account-permissions p { font-size: 14px; color: var(--muted); }
.danger-link { color: #a13d36; }
.danger { background: #a33f36; border-color: #a33f36; color: white; }
.danger:hover:not(:disabled) { background: #852f28; }
.pending-account { padding: 24px; margin: 20px 0; border-color: #a8c0df; }
.pending-account h2 { font-size: var(--heading-dialog); }
.pending-account>p { font-size: 15px; color: var(--muted); margin: 12px 0; }
.pending-account fieldset { border: 0; padding: 0; margin: 20px 0; min-width: 0; }
.pending-account legend { margin-bottom: 10px; font-size: 15px; font-weight: 600; }
.pending-account .radio-choice { margin: 8px 0; overflow-wrap: anywhere; }
.pending-account .radio-choice span { min-width: 0; }
.pending-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.account-card { min-width: 0; padding: 22px; background: white; border: 1px solid var(--line); border-radius: var(--radius); }
.account-card h3 { margin: 16px 0 10px; font-size: 18px; }
.account-card p { font-size: 14px; color: var(--muted); line-height: 1.6; }
.account-status { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.section-note { margin: 18px 0; font-size: 14px; line-height: 1.6; color: var(--muted); }
.report-hero { padding: 24px; display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; }
.report-hero h2 { font-size: var(--heading-dialog); margin-bottom: 10px; }
.report-hero p { max-width: 650px; font-size: 15px; color: var(--muted); line-height: 1.6; }
.report-hero .btn { flex-shrink: 0; }
.calendar-heading { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; padding: 18px 20px; }
.calendar-heading h2 { font-size: var(--heading-dialog); text-transform: capitalize; }
.calendar-controls { display: flex; align-items: center; gap: 6px; }
.calendar-prev svg { transform: rotate(180deg); }
.calendar-scroll { position: relative; overflow-x: auto; }
.calendar-grid { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); min-width: 700px; }
.weekday { padding: 12px; text-align: center; border-block: 1px solid var(--line); background: #f7f9fc; color: var(--muted); font-size: 13px; }
.calendar-day { min-height: 112px; padding: 8px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow: hidden; }
.calendar-day:nth-child(7n) { border-right: 0; }
.calendar-day.outside { background: #f7f9fc; }
.day-number { display: inline-grid; place-items: center; width: 27px; height: 27px; font-size: 14px; color: #506581; margin-bottom: 6px; }
.calendar-day.today .day-number { background: var(--accent); color: white; border-radius: 4px; font-weight: 600; }
.calendar-item { display: block; width: 100%; border: 0; border-left: 2px solid #6486b4; border-radius: 3px; background: #eaf1fb; color: #234f8d; text-align: left; padding: 5px; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 5px; }
.calendar-item.failed { background: #fcefed; border-color: #b95147; color: #9d3a30; }
.calendar-item.completed { background: #eef5f0; border-color: #67967b; color: #326947; }
.calendar-agenda { display: none; }
.agenda-entry { padding: 16px; border-top: 1px solid var(--line); }
.agenda-entry time { display: block; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.agenda-entry .campaign-title-button { display: block; margin-bottom: 8px; }
.demo-page { max-width: 700px; margin: 32px auto; padding: 0 20px; }
.demo-page .brand { color: var(--ink); margin: 0 0 24px; }
.demo-page h1 { font-size: var(--heading-page); margin: 18px 0; }
.demo-page .post-preview { margin: 24px 0; }
.demo-page .preview-media img, .demo-page .preview-media video { max-height: 440px; }

/* One responsive layout, without reducing readable text to fit. */
@media (max-width: 1200px) {
  :root { --sidebar-width: 216px; }
  main { padding: 24px; }
  .topbar { padding-inline: 24px; }
  .accounts-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .modal-footer { flex-wrap: wrap; }
  .footer-meta { flex-basis: 100%; }
  .footer-meta .field-hint { display: none; }
  .footer-actions { width: 100%; }
  .quick-guide { gap: 12px; }
}
@media (max-width: 900px) {
  .sidebar { position: relative; width: 100%; padding: 14px 20px 0; overflow: visible; }
  .brand { font-size: var(--heading-brand); margin: 0 0 14px; }
  .brand-mark { width: 30px; height: 30px; font-size: 21px; }
  .workspace-card, .nav-label, .sidebar-bottom, .nav-count, .nav-note { display: none; }
  .sidebar nav { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 6px; }
  .nav-item { justify-content: center; gap: 8px; padding: 10px 6px; margin: 0; border-radius: 4px 4px 0 0; min-height: 46px; font-size: 14px; }
  .app-main { margin-left: 0; }
  .topbar { min-height: 48px; padding-block: 12px; }
  .editor-body { grid-template-columns: minmax(0,1fr); }
  .preview-column { border-left: 0; border-top: 1px solid var(--line); }
  .post-preview { max-width: 520px; }
  .report-hero { flex-direction: column; gap: 18px; }
}
@media (max-width: 700px) {
  .account-overview { flex-wrap: wrap; }
  .account-steps { grid-template-columns: 1fr; gap: 12px; }
  .account-dialog { height: calc(100dvh - 16px); }
  #account-dialog-body { padding: 0 16px 16px; }
  #account-dialog-footer>.field-hint { max-width: none; font-size: 13px; }
  .copy-field { flex-direction: column; }
  .copy-field input { font-size: 14px; }
  .google-settings { padding: 12px; }
  .pending-account { padding: 16px; }
  .pending-actions .btn { width: 100%; }
  #account-dialog-footer .footer-actions { display: flex; flex-direction: column-reverse; }
  #account-dialog-footer .footer-actions .btn { width: 100%; }
  main { padding: 20px 16px; }
  :root { --heading-page: 1.5rem; --heading-metric: 1.625rem; }
  .page-heading { gap: 16px; flex-wrap: wrap; }
  .page-heading p { font-size: 14px; }
  .demo-banner>.pill { display: none; }
  .stats { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  .stat { padding: 14px; }
  .stat-note { display: none; }
  .search-wrap { width: 100%; }
  .section-toolbar { gap: 12px; }
  .quick-guide { grid-template-columns: 1fr; }
  .accounts-grid { grid-template-columns: 1fr; }
  .page-footer { flex-direction: column; }
  .calendar-scroll { display: none; }
  .calendar-agenda { display: block; }
  .calendar-heading h2 { font-size: 19px; }
  .calendar-agenda .empty-state { padding: 28px 16px; }
  .campaign-table, .campaign-table tbody, .result-table, .result-table tbody { display: block; width: 100%; }
  .campaign-table thead, .result-table thead { display: none; }
  .campaign-table tr, .result-table tr { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; padding: 18px 16px; border-bottom: 1px solid var(--line); }
  .campaign-table tr:last-child, .result-table tr:last-child { border-bottom: 0; }
  .campaign-table td, .result-table td { display: block; border: 0; padding: 0; min-width: 0; }
  .campaign-table td:first-child, .result-table td:first-child { grid-column: 1 / -1; min-width: 0; max-width: none; }
  .campaign-table td::before, .result-table td::before { content: attr(data-label); display: block; color: var(--muted); font-size: 13px; margin-bottom: 5px; }
  .campaign-table td:first-child::before, .campaign-table td:last-child::before, .result-table td:first-child::before { display: none; }
  .result-table td:last-child { grid-column: 1 / -1; }
  .platform-stack { flex-wrap: wrap; }
  .pill { white-space: normal; }
  .table-date { white-space: normal; }
  .detail-summary .btn { width: 100%; }
  .error-text { max-width: none; }
  .event { grid-template-columns: minmax(0,1fr); gap: 4px; }
  dialog { max-width: calc(100vw - 16px); max-height: calc(100dvh - 16px); border-radius: 6px; }
  .editor-dialog, .detail-dialog { height: calc(100dvh - 16px); }
  .modal-heading { padding: 14px 16px; }
  .wizard-steps { padding: 12px 16px; gap: 16px; }
  .wizard-steps li { font-size: 13px; gap: 6px; }
  .wizard-steps li>span { width: 22px; height: 22px; flex-shrink: 0; }
  .editor-name, .material-editor, .preview-column, .review-step, .detail-body { padding: 18px 16px; }
  .form-message { margin: 14px 16px 0; }
  .modal-footer { padding: 12px 16px; gap: 8px; }
  .footer-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .footer-actions .primary { grid-column: 1 / -1; }
  .footer-actions .btn { padding: 9px 10px; font-size: 14px; min-width: 0; }
  .footer-actions #save-draft:has(+ #editor-next:not([hidden])) { grid-column: 1 / -1; }
  .ready-count { font-size: 13px; }
  .launch-choices { grid-template-columns: 1fr; }
  .review-row { grid-template-columns: minmax(0,1fr) auto; gap: 8px 12px; padding: 12px; }
  .review-platform { grid-column: 1 / -1; }
  .review-file { font-size: 13px; }
  .schedule-fields input { max-width: 100%; }
  .toast { right: 16px; bottom: 16px; }
}
@media (max-width: 480px) {
  .sidebar { padding: 12px 12px 0; }
  .nav-item { flex-direction: column; gap: 3px; font-size: 13px; padding: 8px 4px; }
  .nav-item svg { width: 18px; height: 18px; }
  .topbar { display: none; }
  .page-heading .btn { width: 100%; }
  .demo-banner { padding: 12px; gap: 8px; }
  .demo-banner p { font-size: 13px; }
  .filter { padding: 8px; font-size: 13px; }
  .filter span { margin-left: 3px; }
  .panel-heading { padding: 16px; }
  .empty-state { padding: 32px 18px; }
  .calendar-heading { padding: 16px; }
  .calendar-controls { gap: 2px; }
  .calendar-controls .icon-btn { width: 34px; }
  .calendar-controls .btn { padding-inline: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}

/* Shared administration screens. Keep controls readable and usable on narrow screens. */
.technical-value { font-family: "IBM Plex Mono", monospace; font-size: 13px; overflow-wrap: anywhere; }
.topbar-actions { display: flex; align-items: center; gap: 20px; flex-shrink: 0; }
.notification-button { position: relative; color: var(--ink); }
.notification-count { position: absolute; right: -4px; top: -2px; border: 2px solid white; border-radius: 10px; min-width: 20px; padding: 0 4px; background: #b73333; color: white; font-size: 11px; font-weight: 600; line-height: 16px; }
.mobile-profile { display: none; }
.profile-button { width: 100%; background: transparent; color: inherit; border: 0; text-align: left; padding-inline: 0; }
.profile-button>span:nth-child(2) { flex: 1; min-width: 0; }
.profile-button strong { overflow: hidden; text-overflow: ellipsis; display: block; }
.profile-button small { display: block; color: #b9c6d7; }
.profile-button svg { width: 16px; }
.settings-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(240px, 1fr); align-items: start; gap: 24px; }
.settings-panel, .settings-aside, .sheets-panel { min-width: 0; }
.settings-panel h2, .sheets-panel h2, .notification-list h2 { font-size: var(--heading-section); }
.settings-form { display: flex; flex-direction: column; gap: 8px; padding: 24px; }
.settings-form label { font-size: var(--text-small); font-weight: 500; margin-top: 14px; }
.settings-form label:first-of-type { margin-top: 0; }
.settings-form>.btn { align-self: flex-start; margin-top: 20px; }
.settings-form .form-message { margin: 0; }
.settings-aside { padding: 28px; display: flex; flex-direction: column; gap: 16px; }
.settings-aside p, .sheets-summary>p { color: var(--muted); }
.settings-illustration { display: grid; place-items: center; width: 50px; height: 50px; color: var(--accent); background: var(--accent-soft); border-radius: 6px; }
.settings-illustration svg { width: 26px; height: 26px; }
.success-message { color: #226146; background: #eef8f2; border-color: #b9deca; }
.notification-item { display: flex; gap: 16px; padding: 20px; border-top: 1px solid var(--line); }
.notification-item.unread { background: #f5f8fc; }
.notification-symbol { width: 40px; height: 40px; display: grid; place-items: center; flex-shrink: 0; border: 1px solid var(--line); border-radius: 6px; color: #226146; background: #f2f8f4; }
.notification-symbol.error { color: #a43030; background: #fff4f2; }
.notification-text { min-width: 0; flex: 1; }
.notification-text h3 { font-size: var(--text-body); font-weight: 600; }
.notification-text p { margin: 4px 0 8px; color: var(--muted); font-size: var(--text-small); }
.notification-text small { color: var(--muted); font-size: 13px; }
.notification-actions { display: flex; flex-wrap: wrap; gap: 12px 24px; margin-top: 10px; }
.unread-dot { border-radius: 50%; height: 7px; width: 7px; background: var(--accent); margin-top: 8px; flex-shrink: 0; }
.sheets-panel { margin: 22px 0; }
.sheets-body { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sheets-summary { padding: 24px; display: flex; flex-direction: column; align-items: flex-start; gap: 18px; min-width: 0; }
.sheets-summary:only-child { grid-column: 1 / -1; }
.sheets-body>.settings-form { border-left: 1px solid var(--line); }
.setup-list { margin: 4px 0; padding-left: 22px; color: var(--muted); }
.setup-list li+li { margin-top: 10px; }
.sync-details { width: 100%; margin: 0; font-size: 14px; }
.sync-details>div { display: flex; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); padding: 10px 0; }
.sync-details dt { color: var(--muted); }
.sync-details dd { margin: 0; text-align: right; }
.consent-label { display: flex; align-items: flex-start; gap: 10px; font-weight: 400 !important; }
.consent-label input { width: 18px; height: 18px; margin: 4px 0 0; flex-shrink: 0; }
.button-row { display: flex; flex-wrap: wrap; gap: 10px; }
.login-page { min-height: 100dvh; display: grid; place-items: center; padding: 32px; background: #edf1f6; }
.login-shell { display: grid; grid-template-columns: 1fr 1fr; width: min(1040px, 100%); padding: 0; background: white; border-radius: 10px; overflow: hidden; box-shadow: 0 18px 70px #17263c12; border: 1px solid var(--line); }
.login-intro { padding: 44px; background: var(--nav); color: white; display: flex; flex-direction: column; justify-content: space-between; gap: 56px; }
.login-intro .brand { color: white; padding: 0; }
.login-intro .brand-mark { background: #314865; }
.login-intro .eyebrow { color: #adbfd5; }
.login-intro h1 { font-size: clamp(2rem, 3vw, 2.5rem); line-height: 1.25; font-weight: 500; margin: 18px 0; letter-spacing: -.5px; }
.login-intro p:not(.eyebrow) { color: #c2cfdf; max-width: 330px; }
.login-intro small { color: #b4c3d5; font-size: 13px; }
.login-platforms { display: flex; gap: 24px; margin-top: 30px; color: #e1e9f3; }
.login-platforms svg.brand-icon { width: 23px; height: 23px; }
.login-form-panel { padding: 56px 44px; display: flex; align-items: center; min-width: 0; }
.login-form-panel form { width: 100%; }
.login-lock { display: grid; place-items: center; width: 46px; height: 46px; border: 1px solid var(--line); border-radius: 8px; color: var(--accent); margin-bottom: 22px; }
.login-form-panel h2 { font-size: 1.5rem; }
.login-form-panel .section-help { margin: 10px 0 26px; }
.login-form-panel label { display: block; margin: 18px 0 7px; font-weight: 500; }
.login-form-panel .btn { width: 100%; margin: 26px 0 18px; }
.login-form-panel .form-message { margin: 0 0 20px; }
.password-field { position: relative; }
.password-field input { padding-right: 50px; }
.password-field .icon-btn { position: absolute; right: 3px; top: 50%; transform: translateY(-50%); }
@media (max-width: 1100px) { .sheets-body { grid-template-columns: 1fr; } .sheets-body>.settings-form { border-left: 0; border-top: 1px solid var(--line); } }
@media (max-width: 900px) { .mobile-profile { display: inline-flex; } .settings-grid { grid-template-columns: 1fr; } .login-page { padding: 20px; } .login-intro, .login-form-panel { padding: 30px; } }
@media (max-width: 600px) {
  .topbar { display: flex; padding: 8px 16px; min-height: 58px; gap: 10px; }
  .topbar .breadcrumb-label { font-size: 13px; min-width: 0; }
  .topbar-actions { gap: 8px; }
  .topbar .timezone { display: none; }
  .settings-form, .settings-aside, .sheets-summary { padding: 18px; }
  .settings-form>.btn { width: 100%; }
  .notification-item { padding: 18px 14px; gap: 10px; }
  .notification-symbol { width: 32px; height: 32px; }
  .notification-actions { gap: 8px 16px; }
  .login-page { padding: 0; place-items: stretch; background: white; }
  .login-shell { display: block; border: 0; border-radius: 0; box-shadow: none; }
  .login-intro { padding: 24px; gap: 22px; }
  .login-intro h1 { font-size: 1.625rem; margin: 12px 0; }
  .login-intro .eyebrow, .login-intro small, .login-platforms { display: none; }
  .login-form-panel { padding: 30px 24px; }
  .login-lock { display: none; }
}
