/* Markenist: shared, responsive visual system. Loaded after feature styles. */
:root {
  --orange: #3d23c0;
  --accent-soft: #edeafe;
  --border: #e2e7ed;
  --muted: #657184;
  --green: #1b8b61;
  --sidebar: 248px;
  --ink: #1d2939;
  --surface: #ffffff;
  color: var(--ink);
  background: #f4f6f8;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.5;
}
body { background: #f4f6f8; color: var(--ink); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font-family: inherit; }
button { transition: background .16s ease, border-color .16s ease, box-shadow .16s ease; }
button:not(:disabled), select:not(:disabled) { cursor: pointer; }
button:focus-visible, a:focus-visible { outline: 3px solid #5c44d5; outline-offset: 3px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid #5c44d5; outline-offset: 1px; }
::selection { background: #d7d0fd; color: #251577; }
.app > main { min-width: 0; }
.app > main > header { height: 76px; padding: 0 32px; background: #ffffffed; }
.sidebar { padding: 28px 16px 20px; overflow-y: auto; }
.logo { font-size: 27px; padding: 0 12px 32px; letter-spacing: -1px; }
.logo-mark i { background: #583aed; }
.nav-label { font-size: 11px; color: #788497; margin-bottom: 12px; }
.sidebar nav { display: grid; gap: 5px; margin-bottom: 30px; }
.sidebar nav button { min-height: 48px; height: auto; padding: 12px 14px; margin: 0; font-size: 15px; color: #566276; border-radius: 11px; }
.sidebar nav button:hover { background: #f2f5f8; color: var(--ink); }
.sidebar nav button.active { background: var(--accent-soft); color: #361daf; box-shadow: inset 3px 0 #4a2dd8; }
.sidebar nav button b { font-size: 11px; background: #d7cffd; }
.workspace-card { padding: 13px 11px; background: #f9fafb; border-radius: 12px; }
.workspace-icon { width: 39px; height: 39px; flex: none; background: #253246; }
.workspace-card strong, .user-row strong { font-size: 13px; }
.workspace-card span, .user-row span { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.search { height: 44px; max-width: 460px; background: #f6f8fa; border-color: var(--border); border-radius: 11px; }
.search input { font-size: 14px; }
.search kbd { font-size: 11px; }
.icon-button { width: 42px; height: 42px; }
.page { max-width: 1640px; padding: 32px 32px 64px; }
.page-title { gap: 24px; margin-bottom: 26px; }
.page-title p { font-size: 11px; letter-spacing: 1.6px; color: #6b788a; margin-bottom: 7px; }
.page-title h1 { font-size: clamp(27px, 2.3vw, 34px); line-height: 1.25; letter-spacing: -1px; color: #152237; margin-bottom: 9px; }
.page-title h2 { font-size: 14px; line-height: 1.6; color: var(--muted); }
.page-title-actions { flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.primary, .module-title .primary { min-height: 44px; height: auto; padding: 12px 18px; border-radius: 10px; font-size: 14px; line-height: 1.4; background: var(--orange); box-shadow: 0 3px 7px #341da718; }
.primary:hover, .module-title .primary:hover { background: #311aa4; box-shadow: 0 4px 12px #341da729; }
.header-actions .primary { background: #243247; }
.header-actions .primary:hover { background: #152237; }
.secondary-button, .upload-button, .filter, .period { min-height: 42px; height: auto; padding: 10px 14px; font-size: 13px; color: #405069; border-color: var(--border); }
.ghost { font-size: 13px; }
.card { border-radius: 16px; border-color: var(--border); box-shadow: 0 2px 5px #14243a04, 0 8px 24px #14243a03; min-width: 0; }
.metrics-grid { gap: 16px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.metric-card { padding: 21px 22px 19px; }
.metric-head > span { font-size: 13px; color: #647084; }
.metric-icon { width: 36px; height: 36px; flex: none; background: var(--accent-soft); border-radius: 11px; }
.metric-card > strong { font-size: 32px; line-height: 1.2; font-weight: 800; color: #1d2939; margin: 12px 0 10px; font-variant-numeric: tabular-nums; }
.metric-card p, .metric-card p span { font-size: 12px; color: #68788b; }
.dashboard-grid, .analytics-grid, .content-builder-grid, .ads-builder-grid, .post-composer-grid { gap: 20px; }
.card-head { gap: 16px; flex-wrap: wrap; }
.card-head h3, .health-keyword-card .card-head h3, .health-sentiment-card .card-head h3 { font-size: 17px; color: #223149; line-height: 1.4; }
.card-head p { font-size: 13px; color: var(--muted); line-height: 1.55; }
.ads-form, .ads-preview, .brief-panel, .plan-panel, .post-composer, .post-preview { padding: 24px; }
.panel-step { gap: 12px; margin-bottom: 24px; }
.panel-step > span { width: 38px; height: 38px; flex: none; font-size: 14px; border-radius: 12px; }
.panel-step h3 { font-size: 20px; color: #223149; }
.panel-step p { font-size: 13px; color: var(--muted); line-height: 1.5; }
.form-grid, .meta-detail-grid, .meta-budget-fields, .adset-two-fields, .pixel-fields, .creative-two-fields { gap: 16px; }
.field { gap: 8px; }
.field > span, .meta-label, .creative-small-label { font-size: 13px; color: #405069; }
.field input, .field select, .field textarea, .meta-wide-input,
.meta-detail-grid select, .meta-budget-fields select,
.adset-manager-section select, .adset-manager-section input[type="number"],
.adset-manager-section input[type="datetime-local"],
.creative-manager-section input:not([type="checkbox"]):not([type="radio"]),
.creative-manager-section select, .creative-manager-section textarea {
  font-size: 14px; color: #25344a; border: 1px solid #d8e0e9;
  border-radius: 9px; background: white; min-width: 0;
}
.field input, .field select, .meta-wide-input,
.meta-detail-grid select, .meta-budget-fields select,
.adset-manager-section select, .adset-manager-section input[type="number"],
.adset-manager-section input[type="datetime-local"],
.creative-manager-section input:not([type="checkbox"]):not([type="radio"]), .creative-manager-section select { height: 44px; padding: 0 12px; }
.field textarea, .creative-manager-section textarea { padding: 12px; line-height: 1.65; min-height: 110px; }
::placeholder { color: #7b8899; opacity: 1; }
.money-input { height: 44px; background: #fff; border-color: #d8e0e9; }
.money-input > b, .money-input > span { display: grid; place-items: center; padding: 0 12px; background: #f2f5f8; color: #627087; font-size: 12px; }
.meta-campaign-sections, .meta-adset-sections, .meta-ad-creative-sections { gap: 16px; }
.meta-campaign-section, .adset-manager-section, .creative-manager-section { padding: 20px; border-radius: 12px; border-color: var(--border); }
.meta-section-title, .adset-section-title, .creative-section-title { margin-bottom: 14px; }
.meta-section-title strong, .adset-section-title > strong, .creative-section-title strong { font-size: 15px; }
.meta-campaign-section > p, .adset-manager-section > p, .creative-manager-section > p { font-size: 13px; color: var(--muted); line-height: 1.6; }
.meta-detail-grid label > span, .meta-budget-fields label > span, .adset-manager-section label > span,
.creative-stack-field > span, .creative-identity-grid label > span { font-size: 13px; color: #405069; }
.ads-media-source-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; }
.ads-media-source-tabs > button { display: flex; align-items: center; gap: 10px; min-height: 64px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 11px; background: #fff; text-align: left; color: var(--ink); cursor: pointer; }
.ads-media-source-tabs > button:hover { border-color: #9988ef; background: #f9f7ff; }
.ads-media-source-tabs > button.active { border-color: var(--orange); background: #f2f0fe; box-shadow: 0 0 0 1px var(--orange); }
.ads-media-source-tabs > button > span { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 9px; background: #f5f6f7; color: #46556a; font-size: 17px; }
.ads-media-source-tabs > button.active > span { background: #dfd9fd; color: var(--orange); }
.ads-media-source-tabs > button > div { display: flex; flex-direction: column; gap: 2px; }
.ads-media-source-tabs strong { font-size: 13px; }
.ads-media-source-tabs small { color: var(--muted); font-size: 11px; }
.ads-media-library-help { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 7px; color: var(--muted); font-size: 11px; }
.ads-media-library-help button { border: 0; background: transparent; color: var(--orange); font-weight: 750; cursor: pointer; }
.ads-creative-upload { min-height: 112px; border: 1.5px dashed #d5d9df; border-radius: 12px; background: #fafbfc; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 18px; cursor: pointer; }
.ads-creative-upload:hover { border-color: var(--orange); background: #f9f7ff; }
.ads-creative-upload.busy { opacity: .65; cursor: wait; }
.ads-creative-upload input { display: none; }
.ads-creative-upload > span { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; background: #181817; color: #fff; font-size: 18px; }
.ads-creative-upload > div { display: flex; flex-direction: column; gap: 4px; }
.ads-creative-upload strong { font-size: 13px; }
.ads-creative-upload small { color: var(--muted); font-size: 11px; }
.creative-media-summary.has-preview { grid-template-columns: 58px minmax(0,1fr) auto; margin-top: 12px; }
.creative-media-summary.has-preview > b { color: #15845f; font-size: 11px; }
.creative-media-thumb { position: relative; width: 58px; height: 58px; overflow: hidden; border-radius: 9px; background: #f0f1f2; display: grid; place-items: center; }
.creative-media-thumb img, .creative-media-thumb video { width: 100%; height: 100%; object-fit: cover; }
.creative-media-placeholder { color: #9aa2ad; font-size: 22px; }
.media-type-badge { position: absolute; left: 4px; bottom: 4px; padding: 2px 5px; border-radius: 4px; background: rgba(16,24,40,.78); color: #fff; font-size: 8px; font-weight: 750; }
.platform-ad-media > video { display: block; width: 100%; height: 100%; object-fit: cover; background: #000; }
.ads-operation-status { display: grid; grid-template-columns: 38px minmax(0,1fr); gap: 12px; margin-top: 18px; padding: 15px; border: 1px solid; border-radius: 12px; }
.ads-operation-status > span { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; font-size: 18px; font-weight: 800; }
.ads-operation-status > div { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.ads-operation-status strong { font-size: 14px; }
.ads-operation-status p { margin: 0; font-size: 12px; line-height: 1.55; overflow-wrap: anywhere; }
.ads-operation-status > div > div { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 5px; }
.ads-operation-status > div > div > span { display: flex; flex-direction: column; gap: 2px; padding: 6px 8px; border-radius: 7px; background: rgba(255,255,255,.72); }
.ads-operation-status small { font-size: 9px; text-transform: uppercase; color: var(--muted); }
.ads-operation-status b { font-size: 10px; overflow-wrap: anywhere; }
.ads-operation-status.working { border-color: #b9d2ef; background: #f2f7fd; color: #234d79; }
.ads-operation-status.working > span { background: #dfeefe; }
.ads-operation-status.success { border-color: #a8dbc8; background: #effaf5; color: #176b50; }
.ads-operation-status.success > span { background: #d8f2e8; }
.ads-operation-status.error { border-color: #efb6b3; background: #fff2f1; color: #9d322c; }
.ads-operation-status.error > span { background: #ffdeda; }
.adset-audience-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.adset-toggle-head p, .adset-disabled-feature span, .placement-choice span, .budget-strategy-list span,
.inherited-setting span, .special-category-list span { font-size: 12px; line-height: 1.6; color: var(--muted); }
.adset-toggle-head strong, .placement-choice strong, .budget-strategy-list strong, .inherited-setting b,
.special-category-list strong, .delivery-summary strong, .delivery-summary span { font-size: 13px; }
.budget-section, .adset-manager-section.objective-context { background: #f8fafc; border-color: #dce4ee; }
.budget-location-note { margin: 12px 0; padding: 13px; border: 1px solid #d9e5ef; border-radius: 10px; background: #fff; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 11px; }
.budget-location-note > span { width: 34px; height: 34px; border-radius: 9px; background: var(--accent-soft); color: var(--orange); display: grid; place-items: center; font-size: 13px; font-weight: 800; }
.budget-location-note > div { display: flex; flex-direction: column; gap: 2px; }
.budget-location-note strong { color: var(--ink); font-size: 13px; }
.budget-location-note p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.budget-location-note button { min-height: 34px; padding: 7px 10px; border: 1px solid #aea2ea; border-radius: 8px; background: #f6f4ff; color: var(--orange); font-size: 12px; font-weight: 750; }
.budget-location-note button:hover { border-color: var(--orange); background: var(--orange); color: #fff; }
.meta-budget-fields.bid-only { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.placement-choice > label, .budget-strategy-list > label { padding: 12px; }
.placement-choice > label.active, .budget-strategy-list > label.active { background: var(--accent-soft); }
.meta-switch { flex-shrink: 0; }
.adset-manager-section label.meta-switch { flex-direction: row; align-items: center; gap: 8px; }
.meta-switch i { width: 34px; height: 20px; }
.meta-switch i::after { width: 16px; height: 16px; }
.meta-switch input:checked + i { background: var(--orange); }
.meta-switch input:checked + i::after { transform: translateX(14px); }
.ads-editor-tabs { padding: 5px; gap: 5px; background: #edf1f5; margin-bottom: 24px; }
.ads-editor-tabs button { height: 46px; font-size: 14px; }
.ads-editor-tabs button.active { color: #361daf; box-shadow: 0 2px 6px #20304b0e; }
.ads-editor-tabs button span { width: 22px; height: 22px; font-size: 12px; }
.ads-parent-hierarchy { background: #f8fafc; padding: 14px; border-color: var(--border); }
.ads-parent-row strong { font-size: 14px; }
.ads-parent-row small, .ads-parent-row em { font-size: 12px; }
.ads-preview-tabs button, .preview-tabs button { min-height: 38px; font-size: 13px; }
.platform-ad-user { padding: 16px; gap: 10px; }
.platform-ad-user > span { width: 40px; height: 40px; }
.platform-ad-user strong { font-size: 14px; }
.platform-ad-user small { font-size: 11px; }
.platform-ad-card > p { font-size: 14px; padding: 0 16px; }
.facebook-link-preview { padding: 14px 16px; }
.facebook-link-preview strong { font-size: 14px; }
.facebook-link-preview button { height: auto; min-height: 36px; font-size: 12px; padding: 8px 12px; }
.content-alert, .adset-warning, .analytics-warning, .meta-feature-note { font-size: 13px; line-height: 1.6; padding: 12px 16px; }
.analytics-row, .table-row, .queue-row { padding-top: 16px; padding-bottom: 16px; font-size: 13px; }
.analytics-header, .table-header { font-size: 11px; color: #637188; }
.analytics-post strong, .table-main strong, .user-post-copy strong { font-size: 14px; }
.analytics-post small, .table-main span, .user-post-copy span { font-size: 12px; color: #6b778a; }
.analytics-table-card, .data-panel, .post-records { overflow-x: auto; }
.analytics-row-detailed { min-width: 860px; }
.ads-header-account, .page-title-actions .analytics-calendar-trigger, .post-social-trigger { min-height: 48px; height: auto; border-radius: 11px; padding: 8px 12px; background: #fff; }
.ads-header-account { min-width: 230px; max-width: 320px; gap: 2px; }
.ads-header-account > span, .page-title-actions .analytics-calendar-trigger small, .post-social-trigger small { font-size: 11px; color: var(--muted); }
.ads-header-account select, .page-title-actions .analytics-calendar-trigger strong, .post-social-trigger strong { font-size: 13px; }
.analytics-account-select { font-size: 12px; }
.analytics-account-select select { height: 48px; font-size: 13px; max-width: 280px; }
.range-picker { top: calc(100% + 10px); width: min(500px, calc(100vw - 40px)); max-height: 460px; grid-template-columns: 165px minmax(0, 1fr); border-radius: 14px; box-shadow: 0 16px 48px #1a2b4424; }
.range-picker > aside { max-height: 395px; background: #f8fafc; }
.range-picker > aside button { font-size: 12px; padding: 10px 12px; }
.range-picker > aside button.active, .range-picker > aside button:hover, .range-days button.in-range { background: #e7e2fe; color: #341da6; border-left-color: var(--orange); }
.range-inputs input { height: 36px; font-size: 12px; }
.range-inputs label span, .range-weekdays span { font-size: 11px; }
.range-month > strong { font-size: 13px; }
.range-days button, .range-days i { height: 28px; font-size: 12px; }
.range-days button.selected { background: var(--orange); color: #fff; }
.range-picker > footer button { font-size: 13px; min-height: 32px; color: var(--orange); }
.range-picker > footer .apply { color: var(--orange); }
.post-social-popover { top: calc(100% + 10px); width: min(360px, calc(100vw - 40px)); box-shadow: 0 16px 48px #1a2b4424; border-radius: 14px; }
.post-social-platform { gap: 12px; }
.post-social-platform strong { font-size: 14px; }
.post-social-platform small { font-size: 12px; }
.post-social-platform button { min-height: 36px; font-size: 12px; }
.post-workspace-tabs { background: #edf1f5; }
.post-workspace-tabs strong { font-size: 14px; }
.post-workspace-tabs small { font-size: 12px; }
.modal { width: min(540px, 100%); max-height: calc(100dvh - 40px); overflow-y: auto; padding: 32px; border-radius: 20px; }
.modal h2 { font-size: 26px; }
.modal > p:not(.eyebrow) { font-size: 14px; color: var(--muted); }
.modal-close { width: 36px; height: 36px; }
.connection-explainer p { overflow-wrap: anywhere; }
.content-reference-note, .product-reference-picker > p, .field-help, .cost-note, .video-warning { font-size: 12px !important; line-height: 1.6; }
.health-category-tabs button, .listening-category-tabs button { font-size: 14px; min-height: 44px; }
.keyword-bubble { animation: none; }
.keyword-bubble:hover, .keyword-bubble:focus-visible { transform: scale(1.06); }
.ai-card .card-head h3, .analytics-insight .card-head h3 { color: #fff; }
.product-reference-upload { min-height: 42px; padding: 10px 14px; font-size: 13px; }
.product-reference-list strong { font-size: 13px; }
.product-reference-list small { font-size: 12px; }
.product-reference-list button { width: 30px; height: 30px; }
.product-reference-list article { grid-template-columns: 40px minmax(0, 1fr) 30px; }
.library-workspace { display: grid; gap: 16px; }
.library-toolbar { min-height: 72px; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.library-filter-tabs { display: flex; align-items: center; gap: 6px; padding: 4px; border-radius: 11px; background: #f1f4f7; }
.library-filter-tabs button { min-height: 40px; padding: 8px 13px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; }
.library-filter-tabs button:hover { color: var(--ink); background: #ffffffa8; }
.library-filter-tabs button.active { color: #331da2; background: #fff; box-shadow: 0 2px 8px #17203312; }
.library-filter-tabs button > span { color: var(--orange); }
.library-filter-tabs button > b { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: #e8edf2; color: #667085; display: grid; place-items: center; font-size: 11px; }
.library-filter-tabs button.active > b { background: var(--accent-soft); color: var(--orange); }
.library-search { width: min(310px, 38%); height: 42px; padding: 0 13px; border: 1px solid var(--border); border-radius: 10px; background: #fff; display: flex; align-items: center; gap: 8px; }
.library-search:focus-within { border-color: #5c44d5; box-shadow: 0 0 0 3px #ece9fe; }
.library-search > span { color: #8b95a5; font-size: 17px; }
.library-search input { min-width: 0; width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 14px; }
.library-main { min-height: 360px; }
.library-main .card-head { align-items: center; }
.library-main .card-head h3 { font-size: 18px; }
.library-assets { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.library-assets .content-asset { padding: 8px; border: 1px solid transparent; border-radius: 13px; transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease; }
.library-assets .content-asset:hover { border-color: #c0b7ee; box-shadow: 0 10px 26px #25344a12; transform: translateY(-2px); }
.library-assets .content-media { height: 180px; }
.asset-type { position: absolute; right: 8px; bottom: 8px; padding: 5px 8px; border-radius: 7px; color: #fff; background: #172033d9; backdrop-filter: blur(4px); font-size: 11px; font-weight: 700; }
.asset-actions { min-height: 35px; margin-top: 8px; display: flex; align-items: center; gap: 8px; }
.asset-actions button { min-height: 32px; padding: 6px 10px; border: 1px solid #c0b7ee; border-radius: 8px; background: #f6f4ff; color: var(--orange); font-size: 12px; font-weight: 750; }
.asset-actions button:hover { background: var(--orange); color: #fff; border-color: var(--orange); }
.library-empty { min-height: 270px; }
.library-empty-icon { width: 52px; height: 52px; margin-bottom: 6px; border-radius: 15px; background: var(--accent-soft); color: var(--orange) !important; display: grid; place-items: center; font-size: 23px !important; }
.library-empty .upload-button { margin-top: 10px; }
.post-media-picker { padding: 16px; border: 1px solid var(--border); border-radius: 13px; background: #fbfcfd; }
.post-media-picker.full { grid-column: 1 / -1; }
.post-media-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.post-media-heading > div { display: flex; flex-direction: column; gap: 3px; }
.post-media-heading strong { font-size: 14px; color: var(--ink); }
.post-media-heading span { font-size: 12px; color: var(--muted); }
.post-media-heading > button { padding: 4px 0; border: 0; background: transparent; color: var(--orange); font-size: 12px; font-weight: 750; }
.post-media-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.post-media-tabs > button { min-height: 64px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: #fff; display: grid; grid-template-columns: 34px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 10px; text-align: left; }
.post-media-tabs > button:hover { border-color: #a397e1; }
.post-media-tabs > button.active { border-color: #7057e9; background: #f5f3fe; box-shadow: 0 0 0 2px #e7e2fe; }
.post-media-tabs > button > span { grid-row: 1 / 3; width: 34px; height: 34px; border-radius: 9px; background: #f1f4f7; color: #536071; display: grid; place-items: center; align-self: center; }
.post-media-tabs > button.active > span { color: var(--orange); background: #e2dcfe; }
.post-media-tabs strong { align-self: end; color: var(--ink); font-size: 13px; }
.post-media-tabs small { align-self: start; color: var(--muted); font-size: 11px; }
.post-library-select { margin-top: 12px; display: grid; gap: 10px; }
.post-selected-asset { min-width: 0; padding: 9px; border: 1px solid #dce4eb; border-radius: 10px; background: #fff; display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.post-selected-asset img, .post-selected-asset video { width: 56px; height: 48px; border-radius: 7px; background: #eef1f4; object-fit: cover; }
.post-selected-asset > div { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.post-selected-asset strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.post-selected-asset span { color: var(--muted); font-size: 11px; }
.post-selected-asset > b { color: var(--green); font-size: 11px; }
.post-library-empty { min-height: 68px; padding: 10px 12px; border: 1px dashed #d9e0e7; border-radius: 10px; background: #fff; display: flex; align-items: center; gap: 10px; }
.post-library-empty > span { width: 38px; height: 38px; border-radius: 9px; background: #f1f4f7; color: #8490a0; display: grid; place-items: center; }
.post-library-empty > div { display: flex; flex-direction: column; gap: 2px; }
.post-library-empty strong { font-size: 12px; }
.post-library-empty small { color: var(--muted); font-size: 11px; }
.post-media-picker .post-upload-row { margin-top: 12px; }
@media (min-width: 1251px) {
  .metrics-grid:has(> :nth-child(6)):not(:has(> :nth-child(7))) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .content-builder-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); }
}
@media (min-width: 1400px) { .ads-builder-grid { grid-template-columns: minmax(0, 1.5fr) minmax(320px, .8fr); } }
@media (max-width: 1250px) {
  .page-title { align-items: flex-start; flex-direction: column; }
  .page-title-actions { width: 100%; justify-content: flex-start; }
  .ads-builder-grid, .post-composer-grid, .content-builder-grid { grid-template-columns: minmax(0, 1fr); }
  .ads-preview, .post-preview { max-width: 540px; width: 100%; }
  .metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .library-assets { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) { .page { padding: 26px 20px 50px; } }
@media (max-width: 720px) {
  :root { --sidebar: 0px; }
  .sidebar { width: 260px; }
  .app > main > header { height: 66px; padding: 0 16px; }
  .header-actions .primary { width: auto; min-width: 44px; font-size: 12px; padding: 10px; }
  .page { padding: 24px 16px 48px; }
  .page-title h1 { font-size: 28px; }
  .page-title-actions { flex-direction: row; align-items: stretch; gap: 8px; }
  .module-title .primary, .module-title .page-title-actions:has(.ads-header-account) .primary { width: auto; flex: 0 1 auto; font-size: 13px; padding: 12px 16px; }
  .ads-header-account { flex: 1; min-width: 190px; }
  .analytics-account-select { white-space: normal; }
  .metric-card { padding: 16px; }
  .metric-card > strong { font-size: 28px; }
  .ads-form, .ads-preview, .post-composer, .post-preview, .brief-panel, .plan-panel { padding: 18px; }
  .meta-campaign-section, .adset-manager-section, .creative-manager-section { padding: 16px; }
  .ads-editor-tabs button { font-size: 13px; }
  .adset-audience-grid { grid-template-columns: 1fr; }
  .field input, .field select, .field textarea, .adset-manager-section select, .adset-manager-section input, .meta-wide-input, .creative-manager-section select { font-size: 16px; }
  .range-picker { position: fixed; top: 110px; left: 16px; right: 16px; width: auto; max-height: calc(100dvh - 140px); grid-template-columns: 135px minmax(0, 1fr); }
  .range-picker > aside { display: block; max-height: 360px; border-right: 1px solid var(--border); }
  .range-picker > aside button { font-size: 11px; padding: 9px 10px; }
  .range-picker > main { padding: 10px; }
  .range-inputs { flex-wrap: wrap; }
  .range-inputs > b { display: none; }
  .range-inputs label { width: 100%; }
  .range-months { max-height: 200px; }
  .modal { padding: 28px 22px; }
  .budget-location-note { grid-template-columns: 34px minmax(0, 1fr); }
  .budget-location-note button { grid-column: 2; justify-self: start; }
  .meta-budget-fields.bid-only { grid-template-columns: 1fr; }
  .library-toolbar { align-items: stretch; flex-direction: column; }
  .library-filter-tabs { overflow-x: auto; }
  .library-filter-tabs button { flex: 0 0 auto; }
  .library-search { width: 100%; }
  .library-assets { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .library-assets .content-media { height: 145px; }
  .post-media-tabs { grid-template-columns: 1fr; }
}
@media (max-width: 430px) {
  .metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .metric-head > span { font-size: 12px; }
  .metric-icon { display: none; }
  .metric-card > strong { font-size: 26px; overflow-wrap: anywhere; }
  .metric-card p { font-size: 11px; }
  .search { max-width: 160px; }
  .search input { min-width: 0; width: 100%; }
  .header-actions { gap: 6px; }
  .header-actions .icon-button { display: none; }
  .library-assets { grid-template-columns: 1fr; }
  .library-main .card-head { align-items: stretch; flex-direction: column; gap: 12px; }
  .library-main .upload-button { width: 100%; }
  .post-selected-asset { grid-template-columns: 50px minmax(0, 1fr); }
  .post-selected-asset > b { grid-column: 2; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

.runway-connection {
  min-height: 92px;
  padding: 18px 20px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 15px;
  border-color: #d9dee8;
  background: linear-gradient(115deg, #fff 0%, #fbfbff 58%, #f2f0ff 100%);
}
.runway-connection.connected { border-color: #b9dfcd; background: linear-gradient(115deg, #fff 0%, #f7fcfa 58%, #eaf8f1 100%); }
.runway-provider-mark, .runway-modal-mark {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, #17171b, #7357ff);
  box-shadow: 0 9px 22px #5945c72b;
  font: 800 21px Manrope, sans-serif;
}
.runway-connection > div:nth-child(2) { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.runway-connection > div:nth-child(2) > span { color: #8d879a; font-size: 10px; font-weight: 800; letter-spacing: .1em; }
.runway-connection strong { display: flex; align-items: center; gap: 7px; color: var(--ink); font-size: 15px; }
.runway-connection strong i { color: #20a36c; font-size: 11px; font-style: normal; }
.runway-connection p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.runway-connection > button { min-width: 134px; }
.runway-connect-modal .runway-modal-mark { margin-bottom: 18px; }
.runway-redirect-note { display: block; margin-top: 12px; color: #97939d; font-size: 10px; overflow-wrap: anywhere; }
@media (max-width: 720px) {
  .runway-connection { grid-template-columns: 44px minmax(0, 1fr); padding: 16px; }
  .runway-provider-mark { width: 44px; height: 44px; }
  .runway-connection > button { grid-column: 2; width: max-content; min-width: 0; }
}
