:root {
  color-scheme: light;
  --bg: #f4f6f8;
  --surface: #ffffff;
  --border: #dfe4e8;
  --text: #182126;
  --muted: #65727a;
  --primary: #0f766e;
  --primary-dark: #0b5f59;
  --success: #16794c;
  --warning: #9a6700;
  --sidebar: #172328;
  font-family: "Poppins", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.environment-banner { min-height: 34px; display: grid; place-items: center; padding: 7px 18px; background: #8a4b08; color: white; font-size: 11px; font-weight: 600; text-align: center; }
.auth-body > .environment-banner { position: fixed; inset: 0 0 auto; z-index: 20; }

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-size: 14px; letter-spacing: 0; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; letter-spacing: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
svg { width: 18px; height: 18px; flex: 0 0 auto; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 244px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 22px 14px 18px; background: var(--sidebar); color: #dbe4e7; display: flex; flex-direction: column; }
.brand-mark { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 0 10px 18px; border-bottom: 1px solid #304046; }
.brand-mark > span, .auth-logo { width: 34px; height: 34px; display: grid; place-items: center; background: var(--primary); color: white; font-size: 12px; font-weight: 600; border-radius: 6px; }
.brand-mark strong { color: white; font-size: 14px; }
.sidebar nav { display: grid; gap: 4px; margin-top: 20px; }
.nav-item { min-height: 42px; display: flex; align-items: center; gap: 11px; padding: 0 12px; color: #aebbc0; border-radius: 6px; }
.nav-item:hover { color: white; background: #23343a; }
.nav-item.active { color: white; background: var(--primary); }
.sidebar-footer { margin-top: auto; display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: center; padding: 16px 10px 0; border-top: 1px solid #304046; }
.sidebar-footer strong, .sidebar-footer small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-footer strong { color: white; font-size: 13px; }
.sidebar-footer small { color: #93a4aa; font-size: 11px; margin-top: 2px; }
.avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: #dfe9e7; color: var(--primary-dark); font-weight: 600; font-size: 11px; }
.main-area { min-width: 0; }
.topbar { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px clamp(20px, 4vw, 46px); background: var(--surface); border-bottom: 1px solid var(--border); }
.topbar h1 { margin: 2px 0 0; font-size: 22px; line-height: 1.2; }
.eyebrow { display: block; color: var(--primary); font-size: 11px; font-weight: 600; text-transform: uppercase; }
.topbar form { margin: 0; }
.topbar-actions { display: flex; align-items: center; gap: 9px; }
.notification-button { position: relative; width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 6px; background: white; color: var(--muted); }
.notification-button:hover, .notification-button.has-notifications { color: var(--primary); border-color: #b8c3c8; }
.notification-button b { position: absolute; top: -6px; right: -7px; min-width: 18px; height: 18px; display: grid; place-items: center; padding: 0 4px; border: 2px solid white; border-radius: 10px; background: var(--accent); color: white; font-size: 9px; }
.icon-button { height: 36px; display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--border); background: white; color: var(--muted); padding: 0 12px; border-radius: 6px; cursor: pointer; }
.icon-button:hover { border-color: #b8c3c8; color: var(--text); }
.mobile-menu { display: none; border: 0; background: transparent; font-size: 20px; }
.content { padding: 30px clamp(20px, 4vw, 46px) 50px; max-width: 1450px; margin: 0 auto; }
.page-actions { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.page-actions h2, .panel h2, .integration-band h2 { margin: 0 0 5px; font-size: 17px; }
.page-actions p, .panel p, .integration-band p { margin: 0; color: var(--muted); line-height: 1.5; }
.primary-button, .secondary-button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 18px; border: 1px solid transparent; border-radius: 6px; cursor: pointer; font-weight: 600; }
.primary-button svg, .secondary-button svg { width: 16px; height: 16px; flex: 0 0 16px; }
.primary-button { background: var(--primary); color: white; }
.primary-button:hover { background: var(--primary-dark); }
.primary-button.compact, .secondary-button { min-height: 38px; padding: 0 14px; }
.secondary-button { border-color: var(--border); background: white; color: var(--text); }
.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.metrics.metrics-four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.metrics.metrics-four strong { font-size: clamp(20px, 2vw, 30px); overflow-wrap: anywhere; }
.metrics article { min-height: 126px; padding: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: 7px; display: flex; flex-direction: column; }
.metrics span, .metrics small { color: var(--muted); }
.metrics strong { margin: 8px 0 4px; font-size: 30px; line-height: 1; }
.metrics small { margin-top: auto; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 7px; }
.panel-heading { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.panel-heading-actions { display: flex; align-items: center; gap: 8px; }
.panel-heading-action { margin: 0; }
.app-dialog { width: min(640px, calc(100% - 32px)); max-height: calc(100dvh - 32px); margin: auto; padding: 0; overflow: auto; border: 0; border-radius: 8px; background: #fff; color: var(--text); box-shadow: 0 24px 70px #1b2a3040; }
.app-dialog::backdrop { background: #17252b80; backdrop-filter: blur(2px); }
.dialog-form { display: grid; }
.dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 20px 22px; border-bottom: 1px solid var(--border); }
.dialog-heading h2 { margin: 4px 0 6px; font-size: 19px; }
.dialog-heading p { margin: 0; color: var(--muted); }
.dialog-body { display: grid; gap: 15px; padding: 20px 22px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; padding: 15px 22px; border-top: 1px solid var(--border); background: #f8fafb; }
.ai-caption-field { display: grid; gap: 7px; }
.ai-caption-field > label, .ai-caption-field-heading > label { color: #344148; font-size: 12px; font-weight: 500; }
.ai-caption-field-heading { min-height: 34px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ai-caption-toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.ai-caption-button { min-height: 34px; padding: 0 11px; font-size: 11px; }
.ai-caption-button svg { width: 15px; height: 15px; }
.ai-caption-status { min-height: 18px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.ai-caption-status.is-success { color: var(--success); }
.ai-caption-status.is-error { color: #b42318; }
.ai-caption-status.is-loading { display: flex; align-items: center; gap: 7px; color: var(--primary-dark); }
.ai-caption-status.is-loading::before { content: ""; width: 12px; height: 12px; flex: 0 0 12px; border: 2px solid #b9d7d3; border-top-color: var(--primary); border-radius: 50%; animation: ai-caption-spin .75s linear infinite; }
@keyframes ai-caption-spin { to { transform: rotate(360deg); } }
.panel-heading a:not(.primary-button):not(.secondary-button) { color: var(--primary); font-weight: 600; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px 20px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { color: var(--muted); font-size: 11px; text-transform: uppercase; }
tbody tr:last-child td { border-bottom: 0; }
.table-link { font-weight: 600; }
.row-action { width: 30px; height: 30px; display: grid; place-items: center; margin-left: auto; color: var(--muted); }
.publication-row-actions, .page-status-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; }
.publication-row-actions .row-action { margin-left: 0; border: 0; background: transparent; cursor: pointer; }
.publication-row-actions .row-action.danger:hover { color: #b42318; background: #fff0ef; }
.publication-delete-dialog { width: min(680px, calc(100% - 32px)); }
.publication-delete-options { gap: 12px; }
.publication-delete-option { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 18px; padding: 16px; border: 1px solid var(--border); border-radius: 7px; }
.publication-delete-option.danger { border-color: #f0c9c5; background: #fffafa; }
.publication-delete-option strong { display: block; margin-bottom: 5px; font-size: 14px; }
.publication-delete-option p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.publication-delete-option button { white-space: nowrap; }
.publication-delete-option button:disabled { opacity: .48; cursor: not-allowed; }
@media (max-width: 640px) {
  .publication-delete-option { grid-template-columns: 1fr; }
  .publication-delete-option button { width: 100%; }
}
.status { width: max-content; display: inline-flex; align-items: center; min-height: 24px; padding: 0 8px; border-radius: 999px; font-size: 11px; font-weight: 600; }
.status-active, .status-linked { background: #e5f5ed; color: var(--success); }
.status-paused, .status-pending_link { background: #fff3d6; color: var(--warning); }
.status-archived { background: #eef1f3; color: var(--muted); }
.status-draft, .status-cancelled { background: #eef1f3; color: #58666d; }
.status-processing, .status-queued { background: #e9f2ff; color: #175cd3; }
.status-scheduled { background: #fff3d6; color: var(--warning); }
.status-published { background: #e5f5ed; color: var(--success); }
.status-failed { background: #feecec; color: #b42318; }
.status-current, .status-exempt { background: #e5f5ed; color: var(--success); }
.status-pending { background: #fff3d6; color: var(--warning); }
.status-overdue { background: #feecec; color: #b42318; }
.status-partially_published, .status-manual_action_required, .status-manual_review_required { background: #fff0e6; color: #b54708; }
.integration-band { margin-top: 20px; padding: 22px; display: flex; align-items: center; justify-content: space-between; gap: 20px; background: #edf7f5; border-left: 4px solid var(--primary); }
.account-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.account-card { min-width: 0; padding: 18px; background: var(--surface); border: 1px solid var(--border); border-radius: 7px; }
.account-card-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 13px; align-items: center; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.account-card-head h3 { margin: 0; font-size: 15px; overflow-wrap: anywhere; }
.account-card-head p { margin: 4px 0 0; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.network-pair { display: flex; align-items: center; }
.network-pair .network-icon + .network-icon { margin-left: -8px; border: 2px solid white; }
.account-card dl { margin: 0; }
.account-card dl > div { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 12px; padding-top: 12px; }
.account-card dt { color: var(--muted); }
.account-card dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.empty-state { padding: 34px 24px; text-align: center; }
.empty-state h2 { margin: 0 0 7px; font-size: 17px; }
.empty-state p { margin: 0; color: var(--muted); }
.integration-state { min-height: 180px; padding: 24px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.integration-state h2, .drive-actions h2 { margin: 5px 0 7px; font-size: 17px; }
.integration-state p, .drive-actions p { margin: 0; color: var(--muted); line-height: 1.5; }
.integration-state code { max-width: 520px; padding: 12px 14px; background: #f2f5f6; border: 1px solid var(--border); border-radius: 5px; color: #344148; overflow-wrap: anywhere; }
.drive-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr); gap: 16px; }
.drive-actions { padding: 22px; display: grid; align-content: start; gap: 16px; }
.drive-actions form { margin: 0; }
.drive-actions button { width: 100%; }
.client-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.client-card { min-height: 92px; display: grid; grid-template-columns: 46px 1fr 20px; align-items: center; gap: 14px; padding: 16px; background: white; border: 1px solid var(--border); border-radius: 7px; }
.client-card:hover { border-color: #aebcc1; }
.client-initial { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 6px; background: #dfe9e7; color: var(--primary-dark); font-weight: 600; }
.client-initial.large { width: 62px; height: 62px; font-size: 17px; }
.client-card-main > div { display: flex; align-items: center; gap: 10px; }
.client-card h3 { margin: 0; font-size: 15px; }
.client-card p { margin: 6px 0 0; color: var(--muted); }
.client-header { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; }
.client-header h2 { margin: 2px 0 4px; font-size: 21px; }
.client-header p { margin: 0; color: var(--muted); }
.client-header > .status { margin-left: auto; }
.client-header-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.client-overview-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.client-social-history { align-items: start; }
.client-files-panel { margin-bottom: 16px; }
.client-files-panel .drive-file-grid { grid-template-columns: repeat(8, minmax(0, 1fr)); }
.client-drive-scroll { max-height: 760px; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; background: #f8fafb; }
.client-drive-scroll-hint { color: var(--muted); font-size: 11px; }
.client-caption-panel { margin-bottom: 16px; }
.client-caption-list { max-height: 560px; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.client-caption-actions { flex-wrap: wrap; justify-content: flex-end; }
.form-help { color: var(--muted); font-size: 12px; }
.dialog-template-link { justify-self: start; }
.recent-clients, .attention-panel, .client-access-panel { margin-top: 16px; }
.channel-list { padding: 8px 20px; }
.channel-row { min-height: 70px; display: grid; grid-template-columns: 38px 1fr auto; gap: 12px; align-items: center; border-bottom: 1px solid var(--border); }
.channel-row:last-child { border-bottom: 0; }
.channel-row strong, .channel-row small { display: block; }
.channel-row small { margin-top: 3px; color: var(--muted); text-transform: capitalize; }
.network-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: white; font-weight: 600; }
.network-icon.facebook { background: #1877f2; }
.network-icon.instagram { background: #c13584; }
.network-icon.both, .network-dot.both { background: #344148; }
.network-icon.both { width: 42px; border-radius: 17px; font-size: 9px; }
.panel-subsection { padding: 18px 20px; border-top: 1px solid var(--border); background: #fafbfb; }
.link-account-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 12px; }
.linked-actions { padding: 0 20px; }
.linked-account-action { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--border); }
.linked-account-action span { min-width: 0; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.text-button { border: 0; background: transparent; padding: 7px 0; color: var(--primary); font-weight: 600; cursor: pointer; }
.text-button:hover { text-decoration: underline; }
.text-button.danger { color: #b42318; }
.detail-list { margin: 0; padding: 8px 20px; }
.detail-list > div { display: grid; grid-template-columns: 120px 1fr; gap: 16px; padding: 15px 0; border-bottom: 1px solid var(--border); }
.detail-list > div:last-child { border-bottom: 0; }
.detail-list dt { color: var(--muted); }
.detail-list dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.form-panel { max-width: 850px; }
.client-form { max-width: 1050px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; padding: 22px 20px; }
.form-section-title { grid-column: 1 / -1; margin: 6px 0 -2px; padding-bottom: 9px; border-bottom: 1px solid var(--border); font-size: 13px; }
label { display: grid; gap: 7px; color: #344148; font-size: 12px; font-weight: 500; }
label.full { grid-column: 1 / -1; }
input, select, textarea { width: 100%; border: 1px solid #cbd4d8; background: white; color: var(--text); border-radius: 5px; padding: 10px 11px; outline: none; }
input, select { min-height: 42px; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px #0f766e1a; }
input[type="color"] { padding: 4px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 20px; border-top: 1px solid var(--border); }
.primary-button:disabled, .secondary-button:disabled { opacity: .5; cursor: not-allowed; }
.empty { padding: 20px 0; }
.compact-empty { padding: 24px 20px; text-align: left; }
.service-list { margin: 0; padding: 14px 20px 18px 42px; }
.service-list li { padding: 6px 0; }
.history-list { max-height: 480px; overflow-y: auto; padding: 4px 20px; }
.history-item { position: relative; display: grid; grid-template-columns: 12px minmax(0, 1fr); gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--border); }
.history-item:last-child { border-bottom: 0; }
.history-dot { width: 9px; height: 9px; margin-top: 5px; border-radius: 50%; background: var(--primary); }
.history-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.history-meta time, .history-item small { color: var(--muted); font-size: 11px; }
.history-item p { margin: 7px 0; color: #344148; line-height: 1.5; white-space: pre-wrap; }
.history-form { display: grid; gap: 12px; padding: 18px 20px; border-top: 1px solid var(--border); background: #fafbfb; }
.history-form button { justify-self: end; }

.composer { max-width: 980px; }
.composer-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, .6fr); }
.composer-fields { padding: 22px 20px; display: grid; gap: 18px; }
.composer-settings { padding: 22px 20px; display: grid; align-content: start; gap: 20px; background: #f8fafb; border-left: 1px solid var(--border); }
fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
legend { margin-bottom: 8px; color: #344148; font-size: 12px; font-weight: 500; }
.segmented { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid #cbd4d8; border-radius: 5px; overflow: hidden; }
.segmented label { display: block; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { min-height: 40px; display: grid; place-items: center; padding: 0 12px; background: white; color: var(--muted); cursor: pointer; }
.segmented label + label span { border-left: 1px solid #cbd4d8; }
.segmented input:checked + span { background: var(--primary); color: white; font-weight: 600; }
.check-option { min-height: 42px; display: flex; grid-template-columns: none; flex-direction: row; align-items: center; gap: 10px; padding: 0 11px; border: 1px solid var(--border); background: white; }
.check-option + .check-option { border-top: 0; }
.check-option:first-of-type { border-radius: 5px 5px 0 0; }
.check-option:last-of-type { border-radius: 0 0 5px 5px; }
.check-option input { width: 17px; min-height: 17px; height: 17px; margin: 0; }
.publication-thumb { width: 50px; height: 50px; display: grid; place-items: center; object-fit: cover; border: 1px solid var(--border); border-radius: 5px; background: #f1f4f5; color: var(--muted); font-size: 10px; }
.table-subtext { display: block; margin-top: 4px; color: var(--muted); }
.publication-destinations { display: flex; align-items: center; gap: 8px; }
.publication-network { display: inline-flex; align-items: center; gap: 3px; }
.publication-network-link { width: 26px; height: 28px; display: grid; place-items: center; border-radius: 5px; color: var(--muted); }
.publication-network-link:hover { color: var(--primary-dark); background: var(--primary-soft); }
.publication-network-link:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.publication-network-link svg { width: 15px; height: 15px; }
.network-dot { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; color: white; font-size: 10px; font-weight: 600; }
.network-dot.facebook { background: #1877f2; }
.network-dot.instagram { background: #c13584; }
.network-dot.both { width: 44px; border-radius: 14px; }
.social-network-logo svg { width: 16px; height: 16px; display: block; }
.social-network-logo.network-icon svg { width: 19px; height: 19px; }
.social-network-logo.both { display: inline-flex; align-items: center; justify-content: center; gap: 2px; }
.social-network-logo.network-dot.both svg { width: 14px; height: 14px; }
.social-network-logo.network-icon.both svg { width: 16px; height: 16px; }
.analytics-content-cell { width: 300px; min-width: 230px; max-width: 300px; overflow: hidden; }
.analytics-content-cell strong { display: block; overflow: hidden; font-size: 12px; line-height: 1.4; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.analytics-content-cell .table-subtext { margin-top: 3px; font-size: 10px; }
.analytics-published-date { min-width: 88px; white-space: nowrap; color: var(--muted); font-size: 11px; }
.table-sort { display: inline-flex; align-items: center; gap: 7px; color: inherit; white-space: nowrap; }
.table-sort:hover { color: var(--primary); }
.table-sort-arrows { display: inline-flex; flex-direction: column; gap: 2px; }
.table-sort-arrows i { width: 0; height: 0; border-right: 3px solid transparent; border-left: 3px solid transparent; opacity: .3; }
.table-sort-arrows .sort-up { border-bottom: 4px solid currentColor; }
.table-sort-arrows .sort-down { border-top: 4px solid currentColor; }
.table-sort[data-direction="asc"] .sort-up, .table-sort[data-direction="desc"] .sort-down { opacity: 1; color: var(--primary); }
.publication-detail { display: grid; grid-template-columns: minmax(280px, .8fr) minmax(360px, 1.2fr); gap: 16px; align-items: start; }
.media-panel { min-height: 420px; display: grid; place-items: center; overflow: hidden; background: #edf1f2; }
.publication-preview { display: block; width: 100%; max-height: 640px; object-fit: contain; }
.story-detail-media { position: relative; width: min(100%, 360px); aspect-ratio: 9 / 16; overflow: hidden; background: #11181b; }
.story-detail-media .publication-preview { width: 100%; height: 100%; max-height: none; object-fit: cover; }
.story-detail-sticker { pointer-events: none; cursor: default; }
.destination-results { padding: 8px 20px; }
.destination-result { min-height: 76px; display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 12px; border-bottom: 1px solid var(--border); }
.destination-result:last-child { border-bottom: 0; }
.destination-result strong, .destination-result small { display: block; }
.destination-result small { margin-top: 3px; color: var(--muted); }
.destination-result-actions { display: flex; align-items: center; gap: 6px; }
.destination-error { margin: 5px 0 0; color: #b42318; font-size: 12px; }
.caption-panel { grid-column: 1 / -1; }
.caption-panel > p { margin: 0; padding: 20px; white-space: pre-wrap; line-height: 1.6; }

.story-composer { max-width: 1120px; }
.story-composer-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(340px, .95fr); }
.story-fields { padding: 22px 20px; display: grid; align-content: start; gap: 18px; }
.story-preview-panel { padding: 22px; background: #edf1f2; border-left: 1px solid var(--border); }
.story-preview-panel > p { margin: 12px 0 0; text-align: center; font-size: 12px; color: var(--muted); }
.story-canvas { position: relative; width: min(100%, 405px); aspect-ratio: 9 / 16; margin: 0 auto; overflow: hidden; background: #11181b; border: 1px solid #ccd5d9; touch-action: none; user-select: none; }
.story-canvas > img, .story-canvas > video { width: 100%; height: 100%; display: block; object-fit: cover; }
.story-canvas > [hidden] { display: none; }
.story-placeholder { position: absolute; inset: 0; display: grid; place-items: center; padding: 30px; color: #aebbc0; text-align: center; }
.story-link-sticker { position: absolute; z-index: 2; left: 50%; top: 72%; transform: translate(-50%, -50%); width: max-content; max-width: 94%; height: 54px; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 12px; border: 0; border-radius: 16px; background: #fff; color: #263238; box-shadow: 0 2px 10px #0000002e; cursor: grab; touch-action: none; }
.story-link-sticker:active { cursor: grabbing; }
.story-link-sticker span { font-size: 21px; }
.story-link-sticker strong { min-width: 0; overflow: hidden; white-space: nowrap; line-height: 1; text-align: center; font-family: Georgia, serif; font-size: 20px; font-weight: 500; }
.form-row, .layout-settings, .position-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.position-controls input[type="range"] { padding: 0; border: 0; box-shadow: none; accent-color: var(--primary); }
.segmented.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.segmented.three label + label span { border-left: 1px solid #cbd4d8; }
.status-bridge_opening_browser { background: #e9f2ff; color: #175cd3; }
.status-bridge_waiting_manual_confirmation, .status-manual_review_required { background: #fff0e6; color: #b54708; }
.status-bridge_published { background: #e5f5ed; color: var(--success); }
.status-bridge_failed, .status-bridge_session_invalid { background: #feecec; color: #b42318; }

.content-filters { display: grid; grid-template-columns: minmax(220px, .7fr) minmax(320px, 1.3fr) auto; align-items: end; gap: 12px; margin-bottom: 12px; padding: 16px; background: white; border: 1px solid var(--border); }
.content-filters .secondary-button { min-height: 42px; }
.publication-filters { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(130px, .65fr) minmax(140px, .7fr) minmax(140px, .7fr) auto auto; align-items: end; gap: 12px; margin-bottom: 12px; padding: 14px 16px; border: 1px solid var(--border); background: white; }
.publication-filters .secondary-button { min-height: 42px; }
.publication-filters .text-button { min-height: 42px; display: inline-grid; place-items: center; }
.content-metrics { min-height: 44px; display: flex; align-items: center; gap: 22px; margin-bottom: 16px; padding: 0 4px; color: var(--muted); font-size: 12px; }
.content-metrics strong { color: var(--text); }
.content-workspace { display: grid; grid-template-columns: minmax(0, .9fr) minmax(520px, 1.1fr); gap: 16px; align-items: start; }
.content-note-list { overflow: hidden; }
.content-note-row { border-bottom: 1px solid var(--border); background: #fff; transition: background-color .18s ease; }
.content-note-row:last-child { border-bottom: 0; }
.content-note-row[open] { background: #f8fbfb; }
.content-note-summary { min-height: 112px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 17px 20px; list-style: none; cursor: pointer; transition: background-color .18s ease; }
.content-note-summary::-webkit-details-marker { display: none; }
.content-note-summary:hover { background: #f5f9f8; }
.content-note-summary:focus-visible { outline: 2px solid var(--primary); outline-offset: -3px; }
.content-note-main { min-width: 0; }
.content-note-main h3 { margin: 0 0 6px; font-size: 15px; }
.content-note-title { display: flex; flex-wrap: wrap; align-items: baseline; }
.content-note-date { color: var(--muted); font-weight: 500; white-space: nowrap; }
.content-note-separator { margin: 0 5px; }
.content-note-main > p { margin: 0; color: #56666e; line-height: 1.55; overflow-wrap: anywhere; }
.content-note-preview { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; white-space: pre-wrap; }
.content-note-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; color: var(--muted); font-size: 11px; }
.content-note-meta span + span::before { content: "·"; margin-right: 8px; color: #a0adb3; }
.content-note-toggle { width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 50%; background: #fff; transition: border-color .18s ease, transform .18s ease; }
.content-note-toggle::after { content: ""; width: 7px; height: 7px; border-right: 2px solid #66767e; border-bottom: 2px solid #66767e; transform: translateY(-2px) rotate(45deg); }
.content-note-row[open] .content-note-toggle { border-color: #acd5ce; transform: rotate(180deg); }
.content-note-expanded { padding: 0 20px 18px; }
.content-note-body { margin: 0; padding: 16px 0 18px; border-top: 1px solid var(--border); color: #34444c; white-space: pre-wrap; line-height: 1.7; overflow-wrap: anywhere; }
.content-row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding-top: 14px; border-top: 1px solid var(--border); }
.content-row-actions form { margin: 0; }
.content-row-actions .primary-button, .content-row-actions .secondary-button { min-height: 38px; padding: 0 14px; }
.drive-file-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: start; gap: 10px; padding: 16px; }
.drive-upload { display: grid; grid-template-columns: minmax(260px, 1fr) auto; align-items: end; gap: 10px; padding: 14px 16px; background: #f8fafb; border-bottom: 1px solid var(--border); }
.drive-upload .primary-button { min-height: 42px; }
.drive-library-toolbar { min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 9px 16px; border-bottom: 1px solid var(--border); background: #fff; }
.drive-media-filter { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.drive-media-filter button { min-height: 34px; padding: 0 12px; border: 0; border-right: 1px solid var(--border); background: #fff; color: #52636b; font: inherit; font-size: 12px; cursor: pointer; }
.drive-media-filter button:last-child { border-right: 0; }
.drive-media-filter button:hover { background: #f4f7f8; }
.drive-media-filter button.is-active { background: #e6f4f2; color: var(--primary); font-weight: 700; }
.drive-media-filter button span { margin-left: 4px; color: #829198; font-size: 10px; }
.drive-order-status { color: var(--muted); font-size: 11px; text-align: right; }
.drive-order-status.is-saving { color: #735c0f; }
.drive-order-status.is-saved { color: var(--success); }
.drive-order-status.is-error { color: #b42318; }
.drive-file-card { min-width: 0; overflow: hidden; border: 1px solid var(--border); background: white; border-radius: 6px; }
.drive-file-card.is-dragging { opacity: .46; border-color: var(--primary); box-shadow: 0 8px 24px #15363d24; }
.drive-file-card.is-drop-target { border-color: var(--primary); box-shadow: 0 0 0 2px #0f766e24; }
.drive-file-preview { display: grid; place-items: center; overflow: hidden; background: #edf1f2; }
.drive-file-preview img { width: 100%; height: auto; display: block; object-fit: contain; }
.drive-video-preview { position: relative; background: #11181b; }
.drive-video-preview video { width: 100%; height: auto; display: block; object-fit: contain; background: #11181b; cursor: pointer; }
.drive-video-badge { position: absolute; top: 8px; left: 8px; min-height: 24px; display: inline-flex; align-items: center; padding: 0 8px; border-radius: 4px; background: #11181bcc; color: #fff; font-size: 10px; font-weight: 700; pointer-events: none; }
.drive-video-toggle { position: absolute; top: 8px; right: 8px; width: 32px; height: 32px; display: grid; place-items: center; padding: 0; border: 1px solid #ffffff66; border-radius: 50%; background: #11181bd9; color: #fff; cursor: pointer; box-shadow: 0 4px 12px #0004; }
.drive-video-toggle:hover { background: var(--primary); }
.drive-video-toggle svg { width: 15px; height: 15px; }
.drive-video-toggle > span { width: 100%; height: 100%; align-items: center; justify-content: center; line-height: 0; }
.video-play-icon { display: grid; }
.video-play-icon svg { display: block; transform: translateX(1px); }
.video-pause-icon { display: none; }
.drive-video-preview.is-playing .video-play-icon { display: none; }
.drive-video-preview.is-playing .video-pause-icon { display: grid; }
.drive-file-placeholder { color: #7b898f; }
.drive-file-placeholder svg { width: 30px; height: 30px; }
.drive-file-info { min-width: 0; padding: 10px 10px 7px; }
.drive-file-info span, .drive-file-info p { color: var(--muted); font-size: 11px; }
.drive-file-title { min-width: 0; display: flex; align-items: center; gap: 6px; }
.drive-file-info h3 { min-width: 0; flex: 1; margin: 3px 0 5px; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drive-drag-handle { width: 25px; height: 25px; flex: 0 0 25px; display: grid; place-items: center; margin-top: -2px; border-radius: 4px; color: #87969c; cursor: grab; }
.drive-drag-handle:hover { background: #edf4f4; color: var(--primary); }
.drive-drag-handle:active { cursor: grabbing; }
.drive-drag-handle svg { width: 17px; height: 17px; }
.drive-file-info p { margin: 0; }
.drive-file-actions { display: flex; align-items: center; gap: 6px; padding: 0 10px 10px; }
.drive-file-actions .primary-button { min-width: 0; min-height: 34px; flex: 1; padding: 0 9px; }
.drive-file-delete { margin: 0; }
.drive-filter-empty { margin: 16px; padding: 28px 16px; border: 1px dashed var(--border); color: var(--muted); text-align: center; }
.file-icon-button { width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 5px; background: #fff; color: #52636b; cursor: pointer; }
.file-icon-button:hover { border-color: #9fadb3; background: #f7f9fa; }
.file-icon-button svg { width: 16px; height: 16px; }
.file-icon-button.danger-button { color: #b42318; }
.drive-inline-error { grid-column: 1 / -1; padding: 24px; text-align: center; }
.drive-inline-error p { margin: 0 0 14px; color: #b42318; }
.selected-drive-media { display: grid; grid-template-columns: 70px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px; border: 1px solid var(--border); background: #f8fafb; border-radius: 6px; }
.selected-drive-media img { width: 70px; height: 58px; display: block; object-fit: cover; border-radius: 4px; background: #e8edef; }
.selected-drive-media span, .selected-drive-media strong, .selected-drive-media small { display: block; }
.selected-drive-media span, .selected-drive-media small { color: var(--muted); font-size: 11px; }
.selected-drive-media strong { margin: 4px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.publication-media-picker { display: grid; gap: 0; }
.publication-media-source { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--border); border-radius: 5px 5px 0 0; overflow: hidden; }
.publication-media-source button { min-height: 40px; padding: 0 12px; border: 0; background: #fff; color: var(--muted); font: inherit; font-size: 12px; cursor: pointer; }
.publication-media-source button + button { border-left: 1px solid var(--border); }
.publication-media-source button:hover { background: #f5f8f8; }
.publication-media-source button.is-active { background: #e6f4f2; color: var(--primary); font-weight: 600; }
.publication-media-library, .publication-media-upload { min-width: 0; border: 1px solid var(--border); border-top: 0; border-radius: 0 0 5px 5px; background: #f8fafb; }
.publication-media-library[hidden], .publication-media-upload[hidden], .publication-media-status[hidden], .publication-media-card[hidden] { display: none !important; }
.publication-media-status { padding: 22px 16px; color: var(--muted); font-size: 12px; text-align: center; }
.publication-media-status[data-state="loading"] { color: var(--primary); }
.publication-media-status[data-state="error"] { color: #b42318; }
.publication-media-grid { max-height: 326px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: start; gap: 8px; overflow-y: auto; padding: 10px; }
.publication-media-grid:empty { display: none; }
.publication-media-card { position: relative; min-width: 0; display: grid; align-content: start; padding: 0; overflow: hidden; border: 1px solid var(--border); border-radius: 5px; background: #fff; color: var(--text); font: inherit; text-align: left; }
.publication-media-card:hover { border-color: #93bdb7; box-shadow: 0 5px 15px #15363d12; }
.publication-media-card.is-selected { border-color: var(--primary); box-shadow: 0 0 0 2px #0f766e24; }
.publication-media-card-preview { position: relative; aspect-ratio: 4 / 3; display: grid; place-items: center; overflow: hidden; background: #e8edef; }
.publication-media-card-preview img { width: 100%; height: 100%; display: block; object-fit: cover; }
.publication-media-select { position: absolute; inset: 0; z-index: 1; padding: 0; border: 0; border-radius: 5px; background: transparent; cursor: pointer; }
.publication-media-select:focus-visible { outline: 2px solid var(--primary); outline-offset: -3px; }
.publication-media-preview-action { z-index: 3; display: grid; place-items: center; padding: 0; border: 1px solid #ffffff99; background: #11181bd9; color: #fff; box-shadow: 0 3px 10px #0005; cursor: pointer; }
.publication-media-preview-action:hover { background: #11181bf2; }
.publication-media-preview-action:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.publication-media-play { position: absolute; inset: 50% auto auto 50%; width: 30px; height: 30px; transform: translate(-50%, -50%); border-radius: 50%; }
.publication-media-play::after { content: ""; position: absolute; top: 50%; left: 52%; transform: translate(-42%, -50%); border-top: 5px solid transparent; border-bottom: 5px solid transparent; border-left: 8px solid #fff; }
.publication-media-view { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; border-radius: 50%; }
.publication-media-view svg { width: 15px; height: 15px; }
.publication-media-card-details { min-width: 0; display: grid; gap: 3px; padding: 8px; }
.publication-media-card-details strong { overflow: hidden; font-size: 11px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.publication-media-card-details small { min-height: 14px; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.publication-media-selected-mark { position: absolute; top: 6px; left: 6px; z-index: 2; width: 22px; height: 22px; display: none; border-radius: 50%; background: var(--primary); box-shadow: 0 2px 6px #0003; }
.publication-media-selected-mark::after { content: ""; position: absolute; left: 7px; top: 5px; width: 6px; height: 9px; border-right: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(45deg); }
.publication-media-card.is-selected .publication-media-selected-mark { display: block; }
.media-preview-dialog { width: min(920px, calc(100% - 32px)); overflow: hidden; }
.media-preview-heading { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.media-preview-heading h2 { min-width: 0; margin: 0; overflow: hidden; font-size: 16px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.media-preview-body { min-height: 320px; display: grid; place-items: center; overflow: hidden; background: #11181b; }
.media-preview-body img, .media-preview-body video { display: block; max-width: 100%; max-height: calc(100dvh - 110px); object-fit: contain; }
.media-preview-body video { width: 100%; }
.publication-media-upload { padding: 14px; }
.publication-media-upload p { margin: 8px 0 0; color: var(--muted); font-size: 11px; }
.drive-view-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.drive-viewer { min-height: 620px; display: grid; place-items: center; overflow: hidden; background: #11181b; }
.drive-internal-preview { display: block; width: 100%; max-height: 78vh; object-fit: contain; }
.drive-document-preview { display: grid; justify-items: center; gap: 10px; color: #c6d0d4; }
.drive-document-preview svg { width: 42px; height: 42px; }
.drive-document-preview span { color: #91a0a6; font-size: 12px; }
.drive-file-sidebar { display: grid; gap: 12px; padding: 20px; }
.drive-file-sidebar h2 { margin: 0 0 6px; font-size: 16px; }
.drive-file-sidebar p { margin: 0; color: var(--muted); line-height: 1.5; }
.drive-file-sidebar form { margin: 0; }
.drive-file-sidebar .primary-button, .drive-file-sidebar .secondary-button { width: 100%; }
.danger-button { border-color: #efb3b3; color: #b42318; }
.danger-button:hover { border-color: #d86e6e; background: #fff5f5; }
.analytics-filters { display: grid; grid-template-columns: minmax(200px, 1.2fr) minmax(160px, .8fr) minmax(160px, .8fr); align-items: end; gap: 12px; margin-bottom: 18px; padding: 14px 16px; border: 1px solid var(--border); background: white; }
.analytics-filters > button[type="submit"], .report-filters > button[type="submit"] { display: none; }
.analytics-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.analytics-metrics article { min-height: 118px; padding: 18px; border: 1px solid var(--border); border-top: 3px solid var(--primary); background: white; }
.analytics-metrics span, .analytics-metrics small { display: block; color: var(--muted); }
.analytics-metrics span { font-size: 12px; font-weight: 500; }
.analytics-metrics strong { display: block; margin: 8px 0 5px; font-size: 27px; }
.analytics-metrics small { font-size: 11px; }
.analytics-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr); gap: 14px; margin-bottom: 18px; }
.analytics-network-list { display: grid; gap: 16px; padding: 18px; }
.analytics-network { display: grid; gap: 9px; }
.analytics-network-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.analytics-network-head strong, .analytics-network-head small { display: block; }
.analytics-network-head small, .analytics-network-foot { color: var(--muted); font-size: 11px; }
.analytics-network-head b { font-size: 18px; }
.analytics-bar { height: 8px; overflow: hidden; background: #edf1f2; border-radius: 4px; }
.analytics-bar span { display: block; min-width: 2px; height: 100%; background: var(--primary); border-radius: inherit; }
.analytics-network:nth-child(2) .analytics-bar span { background: #c42f83; }
.analytics-network-foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; }
.analytics-summary dl { margin: 0; padding: 8px 18px 18px; }
.analytics-summary dl > div { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 42px; border-bottom: 1px solid var(--border); }
.analytics-summary dl > div:last-child { border-bottom: 0; }
.analytics-summary dt { color: var(--muted); }
.analytics-summary dd { margin: 0; font-weight: 600; }
.analytics-complete { margin-bottom: 18px; }
.analytics-detail-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; padding: 6px 18px 18px; }
.analytics-detail-list > div { min-width: 0; padding: 14px 12px; border-bottom: 1px solid var(--border); }
.analytics-detail-list dt { color: var(--muted); font-size: 11px; }
.analytics-detail-list dd { margin: 5px 0 0; color: var(--text); font-size: 17px; font-weight: 600; }
.analytics-availability { margin: 0; padding: 14px 18px; border-top: 1px solid var(--border); color: var(--muted); font-size: 12px; }
.publication-analytics-panel { grid-column: 1 / -1; }
.publication-analytics-totals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid var(--border); }
.publication-analytics-totals span { padding: 16px 18px; border-right: 1px solid var(--border); }
.publication-analytics-totals span:last-child { border-right: 0; }
.publication-analytics-totals small, .publication-analytics-totals strong { display: block; }
.publication-analytics-totals small { color: var(--muted); }
.publication-analytics-totals strong { margin-top: 5px; font-size: 22px; }
.publication-metric-list { display: grid; }
.publication-metric-row { display: grid; grid-template-columns: auto minmax(150px, .8fr) minmax(360px, 1.4fr) auto; align-items: center; gap: 12px; padding: 15px 18px; border-bottom: 1px solid var(--border); }
.publication-metric-row:last-child { border-bottom: 0; }
.publication-metric-row > div > strong, .publication-metric-row > div > small { display: block; }
.publication-metric-row > div > small { color: var(--muted); font-size: 11px; }
.publication-metric-row dl { display: grid; grid-template-columns: repeat(4, minmax(70px, 1fr)); gap: 10px; margin: 0; }
.publication-metric-row dt { color: var(--muted); font-size: 10px; }
.publication-metric-row dd { margin: 3px 0 0; font-weight: 600; }

.planning-filters { display: grid; grid-template-columns: minmax(210px, 1.2fr) minmax(160px, .7fr) minmax(180px, .8fr); align-items: end; gap: 12px; margin-bottom: 12px; padding: 14px 16px; border: 1px solid var(--border); background: white; }
.planning-filters .secondary-button { min-height: 42px; }
.planning-summary { min-height: 50px; display: flex; align-items: center; gap: 28px; margin-bottom: 16px; padding: 0 4px; color: var(--muted); font-size: 12px; }
.planning-summary strong { margin-right: 4px; color: var(--text); font-size: 16px; }
.planning-calendar-panel { margin-bottom: 24px; overflow-x: auto; }
.planning-calendar-toolbar { min-width: 920px; min-height: 62px; display: flex; align-items: center; justify-content: center; gap: 16px; padding: 10px 16px; border-bottom: 1px solid var(--border); }
.planning-calendar-toolbar h2 { width: 210px; margin: 0; text-align: center; text-transform: capitalize; }
.planning-calendar-toolbar .icon-button { width: 36px; padding: 0; }
.planning-calendar-toolbar .previous svg { transform: rotate(180deg); }
.planning-weekdays, .planning-calendar { min-width: 920px; display: grid; grid-template-columns: repeat(7, minmax(128px, 1fr)); }
.planning-weekdays { background: #f8fafb; border-bottom: 1px solid var(--border); }
.planning-weekdays span { padding: 9px 10px; color: var(--muted); font-size: 11px; font-weight: 500; text-align: center; text-transform: uppercase; }
.planning-day { min-height: 132px; padding: 8px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); background: white; }
.planning-day:nth-child(7n) { border-right: 0; }
.planning-day.outside { background: #f8fafb; }
.planning-day.today { box-shadow: inset 0 0 0 2px var(--primary); }
.planning-day-head { min-height: 26px; display: flex; align-items: center; justify-content: space-between; }
.planning-day-head time { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; color: #435158; font-size: 12px; font-weight: 600; }
.planning-day.today .planning-day-head time { background: var(--primary); color: white; }
.planning-day.outside .planning-day-head time { color: #a0adb2; }
.planning-day-head a { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 4px; color: var(--muted); }
.planning-day-head a:hover { background: #edf1f2; color: var(--primary); }
.planning-day-head a svg { width: 15px; height: 15px; }
.planning-day-create { position: relative; z-index: 2; }
.planning-day-create[open] { z-index: 5; }
.planning-day-create summary { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 4px; color: var(--muted); cursor: pointer; list-style: none; }
.planning-day-create summary::-webkit-details-marker { display: none; }
.planning-day-create summary:hover, .planning-day-create[open] summary { background: #edf1f2; color: var(--primary); }
.planning-day-create summary svg { width: 15px; height: 15px; }
.planning-day-create-menu { position: absolute; top: 32px; right: 0; min-width: 150px; overflow: hidden; border: 1px solid var(--border); border-radius: 6px; background: #fff; box-shadow: var(--shadow-md); }
.planning-day-head .planning-day-create-menu a { width: auto; height: auto; min-height: 36px; display: flex; align-items: center; padding: 8px 12px; border-radius: 0; color: var(--text); font-size: 12px; white-space: nowrap; }
.planning-day-head .planning-day-create-menu a + a { border-top: 1px solid var(--border); }
.planning-day-head .planning-day-create-menu a:hover { background: var(--primary-soft); color: var(--primary-dark); }
.planning-day-events { display: grid; gap: 5px; margin-top: 4px; }
.planning-event { min-width: 0; display: block; padding: 6px 7px; border-left: 3px solid #64748b; background: #f1f4f5; border-radius: 3px; }
.planning-event span, .planning-event strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.planning-event span { color: var(--muted); font-size: 9px; font-weight: 500; text-transform: uppercase; }
.planning-event strong { margin-top: 2px; font-size: 11px; }
.planning-event-idea { border-left-color: #64748b; }
.planning-event-production { border-left-color: #2563eb; background: #eff6ff; }
.planning-event-review { border-left-color: #c2410c; background: #fff7ed; }
.planning-event-approved { border-left-color: #7c3aed; background: #f5f3ff; }
.planning-event-scheduled { border-left-color: #0f766e; background: #ecfdf5; }
.planning-event-published { border-left-color: #15803d; background: #f0fdf4; }
.planning-section-heading { display: flex; align-items: flex-end; justify-content: space-between; margin: 0 0 12px; }
.planning-section-heading h2 { margin: 0 0 4px; font-size: 17px; }
.planning-section-heading p { margin: 0; color: var(--muted); }
.planning-board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: 10px; padding-bottom: 10px; overflow-x: auto; }
.planning-column { min-height: 260px; border: 1px solid var(--border); background: #f8fafb; }
.planning-column > header { min-height: 48px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 0 12px; border-bottom: 1px solid var(--border); background: white; }
.planning-column > header strong { font-size: 12px; }
.planning-column > header b { min-width: 24px; height: 24px; display: grid; place-items: center; border-radius: 12px; background: #edf1f2; color: var(--muted); font-size: 11px; }
.planning-stage-dot { width: 8px; height: 8px; border-radius: 50%; background: #64748b; }
.planning-stage-dot-production { background: #2563eb; }
.planning-stage-dot-review { background: #c2410c; }
.planning-stage-dot-approved { background: #7c3aed; }
.planning-stage-dot-scheduled { background: #0f766e; }
.planning-stage-dot-published { background: #15803d; }
.planning-column > div { display: grid; gap: 8px; padding: 8px; }
.planning-column-empty { padding: 20px 8px; color: var(--muted); font-size: 11px; text-align: center; }
.planning-card { min-width: 0; padding: 11px; border: 1px solid var(--border); background: white; border-radius: 5px; }
.planning-card-meta { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 10px; }
.planning-card h3 { margin: 8px 0 5px; font-size: 13px; line-height: 1.35; overflow-wrap: anywhere; }
.planning-card > p { margin: 0 0 9px; color: var(--muted); font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.planning-card form { margin: 10px 0 0; }
.planning-card form label { gap: 4px; font-size: 9px; }
.planning-card form select { min-height: 34px; padding: 6px 8px; font-size: 11px; }
.planning-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--border); }
.planning-card-footer > a { color: var(--muted); font-size: 11px; font-weight: 500; }
.planning-card-action { display: inline-flex; align-items: center; gap: 3px; color: var(--primary) !important; }
.planning-card-action svg { width: 14px; height: 14px; }
.planning-stage { min-height: 25px; display: inline-flex; align-items: center; padding: 0 9px; border-radius: 13px; background: #edf1f2; color: #475569; font-size: 10px; font-weight: 600; }
.planning-stage-production { background: #dbeafe; color: #1d4ed8; }
.planning-stage-review { background: #ffedd5; color: #9a3412; }
.planning-stage-approved { background: #ede9fe; color: #6d28d9; }
.planning-stage-scheduled { background: #ccfbf1; color: #0f766e; }
.planning-stage-published { background: #dcfce7; color: #166534; }
.planning-form { max-width: 1120px; }
.planning-form-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr); }
.planning-form-main, .planning-form-settings { display: grid; align-content: start; gap: 17px; padding: 20px; }
.planning-form-settings { background: #f8fafb; border-left: 1px solid var(--border); }
.planning-form-settings [data-role="planning-story-fields"] { display: grid; gap: 17px; }
.planning-form-settings [data-role="planning-story-fields"][hidden] { display: none; }
.planning-drive-selection { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 10px; align-items: center; padding: 9px; border: 1px solid var(--border); background: white; }
.planning-drive-selection img { width: 64px; height: 54px; display: block; object-fit: cover; background: #edf1f2; }
.planning-drive-selection span, .planning-drive-selection strong { display: block; }
.planning-drive-selection span { color: var(--muted); font-size: 10px; }
.planning-drive-selection strong { margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.planning-card > .planning-stage { margin-top: 7px; }
.planning-current-stage { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 12px; border: 1px solid var(--border); background: white; }
.planning-current-stage > span { color: var(--muted); font-size: 11px; font-weight: 500; }
.planning-current-stage > a { grid-column: 1 / -1; color: var(--primary); font-size: 12px; font-weight: 600; }
.approval-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr); gap: 16px; align-items: start; }
.approval-layout > main, .approval-layout > aside { min-width: 0; display: grid; gap: 16px; }
.approval-preview { overflow: hidden; }
.approval-media { width: 100%; max-height: 700px; display: block; object-fit: contain; background: #11191d; }
.approval-media-empty { min-height: 340px; display: grid; place-items: center; background: #edf1f2; color: var(--muted); font-weight: 500; }
.approval-copy { padding: 20px; border-top: 1px solid var(--border); }
.approval-copy h2 { margin: 0 0 10px; font-size: 15px; }
.approval-copy p { margin: 0; color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; }
.approval-copy a { display: inline-block; max-width: 100%; margin-top: 12px; color: var(--primary); font-weight: 600; overflow-wrap: anywhere; }
.approval-comments form { display: grid; gap: 12px; padding: 18px 20px; }
.approval-comments button { justify-self: end; }
.approval-actions-body { display: grid; gap: 15px; padding: 18px 20px; }
.approval-actions-body > form:not(.approval-change-form) button, .approval-actions-body > .primary-button { width: 100%; }
.approval-change-form { display: grid; gap: 10px; padding-top: 15px; border-top: 1px solid var(--border); }
.approval-change-form button { width: 100%; }
.approval-confirmation { display: grid; gap: 4px; padding: 12px; border-left: 3px solid var(--success); background: #effaf4; }
.approval-confirmation strong { color: var(--success); font-size: 12px; }
.approval-confirmation span { color: var(--muted); font-size: 10px; }
.approval-edit-link { padding: 0 20px 20px; }
.approval-edit-link a { width: 100%; }
.approval-history { margin-top: 16px; }
.approval-history > div:last-child { padding: 4px 20px 18px; }
.approval-history-item { position: relative; display: grid; grid-template-columns: 12px minmax(0, 1fr); gap: 10px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.approval-history-item:last-child { border-bottom: 0; }
.approval-history-dot { width: 9px; height: 9px; margin-top: 4px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 3px #dff3f0; }
.approval-history-item > div > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.approval-history-item strong { font-size: 12px; }
.approval-history-item time, .approval-history-item small { color: var(--muted); font-size: 10px; }
.approval-history-item p { margin: 5px 0 0; color: var(--muted); font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.approval-readonly { margin: 0; padding: 18px 20px; color: var(--muted); }

.team-list { overflow: hidden; }
.team-row { min-height: 98px; display: grid; grid-template-columns: 42px minmax(190px, .8fr) minmax(280px, 1.2fr) auto minmax(150px, auto); align-items: center; gap: 16px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.team-row:last-child { border-bottom: 0; }
.team-row > .avatar { width: 42px; height: 42px; }
.team-member { min-width: 0; }
.team-member strong, .team-member span, .team-member small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-member strong { font-size: 13px; }
.team-member span { margin-top: 4px; color: var(--text); font-size: 11px; }
.team-member small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.team-permissions { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.permission-tag { min-height: 25px; display: inline-flex; align-items: center; padding: 0 9px; border: 1px solid var(--border); border-radius: 13px; color: #87949a; font-size: 10px; font-weight: 600; }
.permission-tag.enabled { border-color: #b8dfd8; background: #e8f7f4; color: var(--primary); }
.team-row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.team-row-actions form { margin: 0; }
.team-row-actions .secondary-button { min-height: 34px; padding: 0 12px; }
.team-protected { color: var(--muted); font-size: 10px; font-weight: 500; text-align: right; }
.team-form { max-width: 1000px; }
.team-form-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(330px, .72fr); }
.team-form-grid > section, .team-form-grid > aside { display: grid; align-content: start; gap: 17px; padding: 22px; }
.team-form-grid > aside { border-left: 1px solid var(--border); background: #f8fafb; }
.team-form-grid > aside h3 { margin: 0 0 2px; font-size: 14px; }
.permission-option { min-height: 68px; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--border); background: white; cursor: pointer; }
.permission-option input { width: 18px; height: 18px; margin: 0; accent-color: var(--primary); }
.permission-option strong, .permission-option small { display: block; }
.permission-option strong { color: var(--text); font-size: 12px; }
.permission-option small { margin-top: 4px; color: var(--muted); font-size: 10px; font-weight: 500; line-height: 1.4; }
.notification-list { overflow: hidden; }
.notification-row { min-height: 92px; display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.notification-row:last-child { border-bottom: 0; }
.notification-row.unread { background: #f0faf8; }
.notification-state { width: 8px; height: 8px; border-radius: 50%; background: #cbd5da; }
.notification-row.unread .notification-state { background: var(--primary); }
.notification-row strong { font-size: 13px; }
.notification-row p { margin: 4px 0; color: var(--text); overflow-wrap: anywhere; }
.notification-row small { color: var(--muted); font-size: 10px; }
.notification-row form { margin: 0; }

.portal-welcome { min-height: 128px; display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 20px; padding: 24px 26px; border: 1px solid var(--border); background: white; }
.portal-welcome h2 { margin: 5px 0 7px; font-size: 24px; }
.portal-welcome p { margin: 0; color: var(--muted); }
.portal-metrics { margin-bottom: 20px; }
.portal-dashboard-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.portal-list { overflow: hidden; }
.portal-list-row { min-height: 72px; display: grid; grid-template-columns: minmax(0, 1fr) auto 18px; align-items: center; gap: 14px; padding: 13px 18px; border-bottom: 1px solid var(--border); color: var(--text); }
.portal-list-row:last-child { border-bottom: 0; }
.portal-list-row:hover { background: #f8fafb; }
.portal-list-row strong, .portal-list-row small { display: block; }
.portal-list-row strong { font-size: 13px; }
.portal-list-row small { margin-top: 5px; color: var(--muted); font-size: 10px; }
.portal-list-row > svg { width: 17px; color: var(--muted); }
.portal-planning-row { min-height: 82px; }
.portal-analytics-filters { grid-template-columns: minmax(180px, .7fr) minmax(180px, .7fr) auto; }
.portal-file-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.client-access-panel { margin-top: 16px; }
.client-access-list { overflow: hidden; }
.client-access-row { min-height: 78px; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto auto; align-items: center; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.client-access-row:last-child { border-bottom: 0; }
.client-access-row .avatar { width: 40px; height: 40px; }
.client-access-row strong, .client-access-row small { display: block; }
.client-access-row small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.client-access-row .secondary-button { min-height: 34px; padding: 0 12px; }
.client-access-form { max-width: 900px; }

.report-filters { display: grid; grid-template-columns: repeat(4, minmax(145px, 1fr)) auto auto; align-items: end; gap: 12px; margin-bottom: 18px; padding: 16px; border: 1px solid var(--border); background: white; }
.report-filters .secondary-button, .report-filters .primary-button { min-height: 42px; white-space: nowrap; }
.report-export { display: inline-flex; align-items: center; justify-content: center; }
.report-document { max-width: 1180px; margin: 0 auto; overflow: hidden; border: 1px solid var(--border); background: white; }
.report-header { min-height: 150px; display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 30px 34px; border-bottom: 4px solid var(--primary); }
.report-header h2 { margin: 6px 0 8px; font-size: 28px; }
.report-header p { margin: 0; color: var(--muted); }
.report-brand { display: flex; align-items: center; gap: 10px; }
.report-brand span { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 6px; background: var(--primary); color: white; font-weight: 600; }
.report-brand strong { font-size: 15px; }
.report-summary { padding: 24px 34px; background: #f5f8f8; border-bottom: 1px solid var(--border); }
.report-summary h3, .report-section-heading h3 { margin: 0 0 7px; font-size: 16px; }
.report-summary p { max-width: 950px; margin: 0; color: #405057; line-height: 1.7; }
.report-metrics { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-bottom: 1px solid var(--border); }
.report-metrics article { min-width: 0; padding: 22px 20px; border-right: 1px solid var(--border); }
.report-metrics article:last-child { border-right: 0; }
.report-metrics span, .report-metrics small, .report-metrics strong { display: block; }
.report-metrics span { color: var(--muted); font-size: 10px; font-weight: 500; text-transform: uppercase; }
.report-metrics strong { margin: 8px 0 5px; font-size: 22px; overflow-wrap: anywhere; }
.report-metrics small { color: var(--muted); font-size: 10px; }
.report-section { padding: 28px 34px; border-bottom: 1px solid var(--border); }
.report-section-heading { margin-bottom: 16px; }
.report-section-heading p { margin: 0; color: var(--muted); }
.report-network-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.report-network-card { padding: 18px; border: 1px solid var(--border); }
.report-network-card > div:first-child { display: flex; align-items: center; gap: 11px; }
.report-network-card > div:first-child > div strong, .report-network-card > div:first-child > div small { display: block; }
.report-network-card > div:first-child > div small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.report-network-card dl { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 17px 0 14px; }
.report-network-card dt { color: var(--muted); font-size: 9px; }
.report-network-card dd { margin: 4px 0 0; font-size: 14px; font-weight: 600; }
.report-bar { height: 5px; overflow: hidden; background: #e7edef; }
.report-bar span { height: 100%; display: block; background: var(--primary); }
.report-table th, .report-table td { padding: 11px 10px; }
.report-rank { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: #edf3f3; color: var(--primary-dark); font-size: 11px; }
.report-footer { display: flex; justify-content: space-between; gap: 20px; padding: 15px 34px; color: var(--muted); font-size: 9px; }

.auth-body { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: #edf1f2; }
.auth-card { width: min(430px, 100%); padding: 34px; background: white; border: 1px solid var(--border); border-radius: 7px; box-shadow: 0 18px 45px #26323814; }
.auth-card .auth-logo { margin-bottom: 28px; }
.auth-card h1 { margin: 5px 0 9px; font-size: 25px; }
.auth-card > p { margin: 0 0 24px; color: var(--muted); line-height: 1.55; }
.auth-card form { display: grid; gap: 16px; }
.auth-card .primary-button { width: 100%; margin-top: 4px; }
.auth-card > .primary-button { margin-top: 22px; }
.notice { margin: 0 0 18px; padding: 11px 12px; border-radius: 5px; font-size: 12px; }
.notice.success { background: #e5f5ed; color: var(--success); }
.notice.warning { background: #fff3d6; color: var(--warning); }
.notice.error { background: #feecec; color: #a91d1d; }

@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 20; width: 244px; transform: translateX(-100%); transition: transform .2s ease; }
  .menu-open .sidebar { transform: translateX(0); }
  .mobile-menu { display: block; }
  .topbar { justify-content: flex-start; }
  .topbar-actions { margin-left: auto; }
  .metrics, .metrics.metrics-four, .detail-grid, .client-overview-grid, .account-grid, .drive-grid, .publication-detail, .content-workspace, .drive-view-layout, .analytics-grid, .planning-form-grid, .approval-layout, .team-form-grid, .portal-dashboard-grid { grid-template-columns: 1fr; }
  .client-files-panel .drive-file-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .team-form-grid > aside { border-top: 1px solid var(--border); border-left: 0; }
  .team-row { grid-template-columns: 42px minmax(0, 1fr) auto; }
  .team-permissions { grid-column: 2 / -1; }
  .team-row-actions, .team-protected { grid-column: 2 / -1; justify-self: start; text-align: left; }
  .planning-form-settings { border-top: 1px solid var(--border); border-left: 0; }
  .planning-filters { grid-template-columns: 1fr 1fr; }
  .analytics-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .analytics-detail-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .publication-metric-row { grid-template-columns: auto minmax(0, 1fr); align-items: start; }
  .publication-metric-row dl, .publication-metric-row > .secondary-button { grid-column: 2; }
  .publication-metric-row dl { grid-template-columns: repeat(2, minmax(70px, 1fr)); }
  .content-filters { grid-template-columns: minmax(180px, .7fr) minmax(240px, 1.3fr) auto; }
  .publication-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .composer-grid, .story-composer-grid { grid-template-columns: 1fr; }
  .composer-settings { border-top: 1px solid var(--border); border-left: 0; }
  .story-preview-panel { border-top: 1px solid var(--border); border-left: 0; }
  .portal-file-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-metrics article { border-bottom: 1px solid var(--border); }
  .report-network-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .topbar { min-height: 70px; padding: 12px 16px; }
  .topbar h1 { font-size: 18px; }
  .content { padding: 22px 16px 40px; }
  .page-actions { align-items: stretch; flex-direction: column; }
  .client-grid, .form-grid { grid-template-columns: 1fr; }
  label.full { grid-column: auto; }
  .icon-button span { display: none; }
  .client-header { align-items: flex-start; flex-wrap: wrap; }
  .client-header > .status { margin-left: 0; }
  .client-header-actions { width: 100%; margin-left: 0; justify-content: space-between; }
  .detail-list > div { grid-template-columns: 1fr; gap: 5px; }
  .account-card-head { grid-template-columns: auto minmax(0, 1fr); }
  .account-card-head > .status { grid-column: 2; }
  .account-card dl > div { grid-template-columns: 86px minmax(0, 1fr); }
  .link-account-form { grid-template-columns: 1fr; }
  .integration-state { align-items: stretch; flex-direction: column; }
  .media-panel { min-height: 300px; }
  .form-row, .layout-settings, .position-controls { grid-template-columns: 1fr; }
  .story-preview-panel { padding: 16px; }
  .content-filters, .publication-filters, .drive-file-grid, .client-files-panel .drive-file-grid { grid-template-columns: 1fr; }
  .analytics-filters, .analytics-metrics { grid-template-columns: 1fr; }
  .analytics-detail-list { grid-template-columns: 1fr; }
  .planning-filters { grid-template-columns: 1fr; }
  .planning-summary { align-items: flex-start; flex-wrap: wrap; gap: 10px 20px; }
  .notification-row { grid-template-columns: 8px minmax(0, 1fr); }
  .notification-row form { grid-column: 2; }
  .notification-row button { width: 100%; }
  .approval-history-item > div > div { align-items: flex-start; flex-direction: column; gap: 3px; }
  .publication-analytics-totals { grid-template-columns: 1fr; }
  .publication-analytics-totals span { border-right: 0; border-bottom: 1px solid var(--border); }
  .publication-analytics-totals span:last-child { border-bottom: 0; }
  .drive-upload { grid-template-columns: 1fr; }
  .drive-library-toolbar { align-items: flex-start; flex-direction: column; }
  .drive-media-filter { width: 100%; }
  .drive-media-filter button { flex: 1; padding: 0 8px; }
  .drive-order-status { text-align: left; }
  .drive-viewer { min-height: 360px; }
  .content-metrics { align-items: flex-start; flex-direction: column; gap: 7px; padding: 5px 0; }
  .content-note-summary { min-height: 104px; padding: 15px 16px; }
  .content-note-expanded { padding: 0 16px 16px; }
  .content-row-actions { align-items: stretch; flex-wrap: wrap; justify-content: flex-start; }
  .content-row-actions .primary-button, .content-row-actions .secondary-button, .content-row-actions form { flex: 1 1 130px; }
  .content-row-actions form .secondary-button { width: 100%; }
  .ai-caption-field-heading { align-items: flex-start; flex-direction: column; }
  .ai-caption-toolbar .ai-caption-button { flex: 1 1 150px; }
  .selected-drive-media { grid-template-columns: 58px minmax(0, 1fr); }
  .selected-drive-media img { width: 58px; height: 50px; }
  .selected-drive-media > a { grid-column: 2; }
  .publication-media-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .team-row { grid-template-columns: 38px minmax(0, 1fr); gap: 12px; padding: 15px 16px; }
  .team-row > .avatar { width: 38px; height: 38px; }
  .team-row > .status { grid-column: 2; justify-self: start; }
  .team-permissions, .team-row-actions, .team-protected { grid-column: 1 / -1; }
  .team-row-actions { width: 100%; justify-content: space-between; }
  .team-form-grid > section, .team-form-grid > aside { padding: 18px 16px; }
  .portal-welcome { align-items: flex-start; flex-direction: column; padding: 20px 18px; }
  .portal-list-row { grid-template-columns: minmax(0, 1fr) auto; }
  .portal-list-row > svg { display: none; }
  .portal-file-grid { grid-template-columns: 1fr; }
  .portal-analytics-filters { grid-template-columns: 1fr; }
  .client-access-row { grid-template-columns: 38px minmax(0, 1fr); }
  .client-access-row > .status, .client-access-row > .secondary-button { grid-column: 2; justify-self: start; }
  .report-filters { grid-template-columns: 1fr; }
  .report-header { align-items: flex-start; flex-direction: column-reverse; padding: 24px 20px; }
  .report-header h2 { font-size: 23px; }
  .report-summary, .report-section { padding: 22px 20px; }
  .report-metrics { grid-template-columns: 1fr; }
  .report-metrics article { border-right: 0; }
  .report-network-card dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-footer { flex-direction: column; padding: 15px 20px; }
}

@media print {
  @page { size: A4 landscape; margin: 10mm; }
  body { background: white !important; color: #1f2933; }
  .sidebar, .topbar, .no-print { display: none !important; }
  .app-shell, .main-area { display: block !important; }
  .content { padding: 0 !important; }
  .report-document { max-width: none; border: 0; }
  .report-header { padding: 16px 20px; }
  .report-summary, .report-section { padding: 16px 20px; }
  .report-metrics article { padding: 14px; }
  .report-network-card, .report-metrics article, .report-table tr { break-inside: avoid; }
  .report-footer { padding: 12px 20px; }
  a { color: inherit; text-decoration: none; }
}

/* Digital Flow visual system */
@font-face {
  font-family: "Poppins";
  src: url("/assets/fonts/poppins-regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Poppins";
  src: url("/assets/fonts/poppins-medium.woff2") format("woff2");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "Poppins";
  src: url("/assets/fonts/poppins-semibold.woff2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

:root {
  --bg: #f6f8fb;
  --surface: #ffffff;
  --surface-soft: #f9fbfc;
  --surface-muted: #f1f5f7;
  --border: #e3e8ed;
  --border-strong: #cfd8df;
  --text: #15212b;
  --text-soft: #34444f;
  --muted: #687782;
  --primary: #0b8f84;
  --primary-dark: #087168;
  --primary-soft: #e8f7f5;
  --purple: #7769d7;
  --purple-soft: #efedff;
  --coral: #ed7167;
  --coral-soft: #fff0ee;
  --amber: #cc8a22;
  --amber-soft: #fff6e5;
  --success: #147a50;
  --warning: #98600a;
  --danger: #b93832;
  --sidebar: rgba(252, 253, 255, .94);
  --shadow-xs: 0 1px 2px rgba(24, 38, 49, .04);
  --shadow-sm: 0 5px 18px rgba(31, 48, 60, .055), 0 1px 3px rgba(31, 48, 60, .04);
  --shadow-md: 0 14px 34px rgba(31, 48, 60, .08), 0 3px 8px rgba(31, 48, 60, .04);
  color-scheme: light;
  font-family: "Poppins", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html { background: var(--bg); }
body { background: var(--bg); color: var(--text); line-height: 1.45; }
h1, h2, h3, h4, h5, h6, strong, b { font-weight: 600; }
button, input, select, textarea { color: inherit; }
button, a, input, select, textarea { transition: border-color .18s ease, background-color .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease; }
:focus-visible { outline: 3px solid rgba(11, 143, 132, .22); outline-offset: 2px; }

.app-shell { grid-template-columns: 252px minmax(0, 1fr); }
.sidebar {
  z-index: 12;
  width: 252px;
  padding: 20px 14px 16px;
  overflow: hidden;
  background: var(--sidebar);
  color: var(--text-soft);
  border-right: 1px solid rgba(211, 220, 226, .8);
  box-shadow: 10px 0 32px rgba(28, 48, 61, .035);
  backdrop-filter: blur(18px) saturate(130%);
}
.brand-mark { min-height: 56px; gap: 12px; padding: 0 10px 18px; border-bottom-color: var(--border); }
.brand-mark > span, .auth-logo {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--primary);
  box-shadow: 0 8px 18px rgba(11, 143, 132, .2);
  font-size: 11px;
}
.brand-copy { min-width: 0; }
.brand-copy strong, .brand-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand-copy strong { color: var(--text); font-size: 13px; }
.brand-copy small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.sidebar nav { gap: 3px; margin-top: 17px; padding-right: 1px; overflow-y: auto; scrollbar-width: thin; }
.nav-item {
  position: relative;
  min-height: 40px;
  gap: 11px;
  padding: 0 12px;
  color: #53636e;
  border: 1px solid transparent;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
}
.nav-item svg { width: 17px; height: 17px; stroke-width: 1.8; }
.nav-item:hover { color: var(--text); background: #f2f6f7; border-color: #e8edef; }
.nav-item.active { color: var(--primary-dark); background: var(--primary-soft); border-color: #d9efec; box-shadow: inset 3px 0 0 var(--primary); }
.sidebar-footer { padding: 15px 9px 0; border-top-color: var(--border); }
.sidebar-footer strong { color: var(--text); }
.sidebar-footer small { color: var(--muted); }
.avatar { background: #dff0ed; color: var(--primary-dark); box-shadow: inset 0 0 0 1px rgba(11, 143, 132, .08); }
.sidebar-scrim { display: none; }

.main-area { position: relative; min-height: 100vh; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: 82px;
  padding: 15px clamp(24px, 3.2vw, 48px);
  background: rgba(255, 255, 255, .9);
  border-bottom-color: rgba(219, 226, 231, .9);
  box-shadow: 0 4px 18px rgba(35, 51, 62, .025);
  backdrop-filter: blur(18px) saturate(130%);
}
.topbar-title { min-width: 0; }
.topbar h1 { color: var(--text); font-size: 21px; font-weight: 600; }
.eyebrow { color: var(--primary-dark); font-size: 9px; letter-spacing: 0; }
.topbar-actions { gap: 8px; }
.notification-button, .icon-button {
  min-width: 38px;
  height: 38px;
  border-color: var(--border);
  border-radius: 7px;
  background: rgba(255, 255, 255, .88);
  box-shadow: var(--shadow-xs);
}
.notification-button:hover, .icon-button:hover { color: var(--primary-dark); border-color: #b9d7d3; background: var(--primary-soft); }
.notification-button b { background: var(--coral); }
.mobile-menu { width: 38px; height: 38px; border: 1px solid var(--border); border-radius: 7px; color: var(--text-soft); }

.content { width: 100%; max-width: 1500px; padding: 30px clamp(24px, 3.2vw, 48px) 56px; }
.page-actions { margin-bottom: 20px; }
.page-actions h2, .panel h2, .integration-band h2 { color: var(--text); font-size: 16px; }
.page-actions p, .panel p, .integration-band p { color: var(--muted); }
.primary-button, .secondary-button {
  border-radius: 7px;
  font-size: 12px;
  box-shadow: var(--shadow-xs);
}
.primary-button { background: var(--primary); box-shadow: 0 7px 16px rgba(11, 143, 132, .16); }
.primary-button:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 10px 22px rgba(11, 143, 132, .2); }
.secondary-button { border-color: var(--border-strong); background: rgba(255, 255, 255, .9); }
.secondary-button:hover { color: var(--primary-dark); border-color: #b9d7d3; background: var(--primary-soft); }

.panel, .account-card, .client-card, .report-document, .portal-welcome {
  border-color: var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.panel-heading { min-height: 72px; padding: 15px 20px; border-bottom-color: var(--border); }
.panel-heading a:not(.primary-button):not(.secondary-button) { color: var(--primary-dark); }
.panel-heading a:not(.primary-button):not(.secondary-button):hover { color: var(--primary); }
.panel-heading .primary-button { color: #fff !important; }
.panel-subsection, .history-form, .composer-settings, .story-preview-panel, .planning-form-settings, .team-form-grid > aside { background: var(--surface-soft); }

.metrics, .analytics-metrics { gap: 14px; }
.metrics article, .analytics-metrics article {
  position: relative;
  min-width: 0;
  min-height: 124px;
  padding: 20px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.metrics article::after, .analytics-metrics article::after {
  position: absolute;
  inset: auto 0 0;
  height: 3px;
  content: "";
  background: var(--primary);
  opacity: .9;
}
.metrics article[data-tone="purple"]::after, .analytics-metrics article:nth-child(2)::after { background: var(--purple); }
.metrics article[data-tone="coral"]::after, .analytics-metrics article:nth-child(3)::after { background: var(--coral); }
.metrics article[data-tone="amber"]::after, .analytics-metrics article:nth-child(4)::after { background: var(--amber); }
.metrics span, .metrics small, .analytics-metrics span, .analytics-metrics small { color: var(--muted); }
.metrics strong, .analytics-metrics strong { color: var(--text); font-weight: 600; }

table { font-variant-numeric: tabular-nums; }
th, td { padding: 13px 20px; border-bottom-color: var(--border); }
th { color: #788690; background: #fbfcfd; font-size: 9px; font-weight: 500; }
tbody tr { transition: background-color .15s ease; }
tbody tr:hover { background: #f8fbfb; }
.table-link { color: var(--text); }
.table-link:hover { color: var(--primary-dark); }
.row-action { border-radius: 6px; }
.row-action:hover { color: var(--primary-dark); background: var(--primary-soft); }
.status { border-radius: 999px; font-size: 10px; }
.status-active, .status-linked, .status-published, .status-current, .status-exempt { background: #e5f6ee; }
.status-processing, .status-queued { background: #eaf3ff; color: #2564b5; }
.status-scheduled, .status-paused, .status-pending_link, .status-pending { background: var(--amber-soft); color: var(--warning); }
.status-failed, .status-overdue { background: #ffedeb; color: var(--danger); }

input, select, textarea {
  border-color: var(--border-strong);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  box-shadow: inset 0 1px 1px rgba(35, 51, 62, .02);
}
input:hover, select:hover, textarea:hover { border-color: #b8c5cd; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(11, 143, 132, .11); }
label, legend { color: var(--text-soft); }
.form-grid, .composer-fields, .story-fields { padding: 22px; }
.form-actions { background: #fbfcfd; }
.segmented { border-color: var(--border-strong); border-radius: 7px; }
.segmented span { background: #fff; }
.segmented input {
  width: 1px;
  height: 1px;
  min-height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}
.segmented input:checked + span { background: var(--primary); }
.check-option, .permission-option, .planning-drive-selection, .planning-current-stage { border-color: var(--border); border-radius: 6px; }

.client-card, .account-card, .drive-file-card, .planning-card, .report-network-card { transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.client-card:hover, .account-card:hover, .drive-file-card:hover, .planning-card:hover, .report-network-card:hover { border-color: #c8d6dd; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.client-initial { background: var(--primary-soft); color: var(--primary-dark); }
.account-card-head { border-bottom-color: var(--border); }
.integration-band { border: 1px solid #d8ece8; border-left: 4px solid var(--primary); border-radius: 8px; background: #f0faf8; box-shadow: var(--shadow-xs); }
.network-icon, .network-dot { box-shadow: 0 4px 12px rgba(34, 48, 58, .1); }

.analytics-filters, .content-filters, .planning-filters, .report-filters {
  border-color: var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.analytics-grid { gap: 16px; }
.analytics-network { border-color: var(--border); border-radius: 7px; background: var(--surface-soft); }
.analytics-bar, .report-bar { height: 7px; border-radius: 4px; background: #edf1f4; }
.analytics-bar span, .report-bar span { border-radius: inherit; background: var(--primary); }
.analytics-network:nth-child(2) .analytics-bar span { background: var(--purple); }
.analytics-summary dl > div { border-bottom-color: var(--border); }

.planning-calendar-panel, .planning-column { border-radius: 8px; box-shadow: var(--shadow-sm); }
.planning-weekdays, .planning-day.outside, .planning-column { background: var(--surface-soft); }
.planning-day { border-color: var(--border); }
.planning-day.today { box-shadow: inset 0 0 0 2px var(--primary); }
.planning-event { border-radius: 5px; }
.planning-column > header { border-radius: 8px 8px 0 0; }

.story-canvas { border-radius: 8px; border-color: #cbd5dc; box-shadow: 0 16px 36px rgba(19, 31, 40, .12); }
.story-link-sticker { box-shadow: 0 7px 20px rgba(0, 0, 0, .18); }
.media-panel, .story-preview-panel, .approval-media-empty { background: #eef3f5; }
.publication-thumb { border-radius: 6px; }

.drive-file-card { border-radius: 8px; background: var(--surface); box-shadow: var(--shadow-xs); }
.drive-file-preview { background: #edf2f4; }
.content-workspace, .drive-view-layout { gap: 18px; }
.drive-viewer, .drive-file-sidebar { overflow: hidden; }

.team-row, .notification-row, .portal-list-row, .client-access-row { border-bottom-color: var(--border); }
.notification-row.unread { background: #f0faf8; box-shadow: inset 3px 0 0 var(--primary); }
.permission-tag { border-color: var(--border); background: #fbfcfd; }
.permission-tag.enabled { border-color: #c5e5df; background: var(--primary-soft); color: var(--primary-dark); }

.report-document { overflow: hidden; }
.report-header { border-bottom-color: var(--primary); }
.report-summary { background: #f4f9f8; }
.report-metrics article, .report-section, .report-network-card { border-color: var(--border); }
.report-network-card { border-radius: 7px; background: #fff; }
.report-network-card:nth-child(2) .report-bar span { background: var(--purple); }
.report-rank { background: var(--primary-soft); }

.auth-body { background: #f1f5f7; }
.auth-card { border-radius: 8px; box-shadow: 0 24px 70px rgba(31, 49, 62, .13); }
.notice { border: 1px solid transparent; border-radius: 7px; }
.notice.success { border-color: #cde9db; }
.notice.warning { border-color: #f2dfb5; }
.notice.error { border-color: #f2cecb; }
.environment-banner { background: #9b5a12; }

.dashboard-heading { margin-bottom: 12px; }
.dashboard-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.dashboard-actions .secondary-button { min-height: 38px; }
.dashboard-overview { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, .75fr); gap: 16px; margin-bottom: 16px; }
.flow-list { display: grid; gap: 17px; padding: 20px; }
.flow-row > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.flow-row span { color: var(--muted); font-size: 11px; font-weight: 500; }
.flow-row strong { color: var(--text); font-size: 12px; }
.flow-progress { width: 100%; height: 8px; display: block; overflow: hidden; appearance: none; border: 0; border-radius: 4px; background: #edf1f4; }
.flow-progress::-webkit-progress-bar { border-radius: inherit; background: #edf1f4; }
.flow-progress::-webkit-progress-value { border-radius: inherit; background: var(--primary); }
.flow-progress::-moz-progress-bar { border-radius: inherit; background: var(--primary); }
.flow-progress.flow-scheduled::-webkit-progress-value { background: var(--purple); }
.flow-progress.flow-scheduled::-moz-progress-bar { background: var(--purple); }
.flow-progress.flow-processing::-webkit-progress-value { background: var(--coral); }
.flow-progress.flow-processing::-moz-progress-bar { background: var(--coral); }
.flow-progress.flow-draft::-webkit-progress-value { background: #a8b3bb; }
.flow-progress.flow-draft::-moz-progress-bar { background: #a8b3bb; }
.channel-composition { min-height: 210px; display: grid; grid-template-columns: 128px minmax(0, 1fr); align-items: center; gap: 24px; padding: 22px; }
.channel-ring {
  position: relative;
  width: 128px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}
.channel-ring-svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.channel-ring-svg circle { fill: none; stroke-width: 5; }
.channel-ring-track { stroke: #dce4e8; }
.channel-ring-facebook { stroke: var(--primary); }
.channel-ring-instagram { stroke: var(--purple); }
.channel-ring-copy { position: relative; z-index: 1; display: grid; text-align: center; }
.channel-ring-copy strong { font-size: 23px; }
.channel-ring-copy span { color: var(--muted); font-size: 10px; }
.channel-composition dl { margin: 0; }
.channel-composition dl > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.channel-composition dl > div:last-child { border-bottom: 0; }
.channel-composition dt { display: flex; align-items: center; gap: 8px; color: var(--text-soft); font-size: 11px; }
.channel-composition dd { margin: 0; font-weight: 600; }
.channel-key { width: 8px; height: 8px; display: block; border-radius: 2px; background: var(--primary); }
.channel-key.instagram { background: var(--purple); }
.attention-panel { margin-top: 0; margin-bottom: 16px; }
.recent-clients { margin-top: 0; }

.settings-tabs { display: flex; align-items: center; gap: 4px; margin-bottom: 20px; padding: 4px; width: max-content; max-width: 100%; border: 1px solid var(--border); border-radius: 8px; background: #fff; box-shadow: var(--shadow-xs); }
.settings-tabs a { min-height: 36px; display: grid; place-items: center; padding: 0 15px; border-radius: 6px; color: var(--muted); font-size: 12px; font-weight: 500; }
.settings-tabs a:hover { color: var(--text); background: var(--surface-soft); }
.settings-tabs a.active { color: var(--primary-dark); background: var(--primary-soft); }
.plan-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 18px; }
.plan-list-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.plan-list-card { min-width: 0; overflow: hidden; border: 1px solid var(--border); border-radius: 8px; background: #fff; box-shadow: var(--shadow-sm); }
.plan-list-card.is-inactive { opacity: .7; }
.plan-list-card > footer { min-height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 11px 18px; border-top: 1px solid var(--border); background: #fbfcfd; }
.plan-list-card > footer > div { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 11px; }
.plan-card-actions form { margin: 0; }
.plan-card-actions .secondary-button { min-height: 34px; padding: 0 12px; }
.plan-preview-card { padding: 22px; }
.plan-preview-head { min-height: 88px; display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.plan-preview-head h3 { margin: 4px 0 5px; color: var(--text); font-size: 19px; font-weight: 600; }
.plan-preview-head p { max-width: 420px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.plan-limited { flex: 0 0 auto; padding: 5px 8px; border-radius: 999px; background: var(--amber-soft); color: var(--warning); font-size: 9px; font-weight: 600; }
.plan-limited[hidden] { display: none; }
.plan-price { display: flex; align-items: baseline; gap: 7px; margin: 18px 0; }
.plan-price strong { color: var(--text); font-size: 29px; font-weight: 600; line-height: 1; }
.plan-price span { color: var(--muted); font-size: 11px; }
.plan-price b { font-weight: 500; }
.plan-preview-card ul { display: grid; gap: 9px; min-height: 80px; margin: 0; padding: 16px 0 0 20px; border-top: 1px solid var(--border); color: var(--text-soft); font-size: 11px; line-height: 1.45; }
.plan-preview-card li::marker { color: var(--primary); }
.plan-builder { max-width: 1180px; }
.plan-builder-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(330px, .75fr); }
.plan-form-fields { display: grid; align-content: start; gap: 18px; padding: 22px; }
.plan-builder-preview { padding: 22px; border-left: 1px solid var(--border); background: var(--surface-soft); }
.plan-builder-preview > .eyebrow { display: block; margin-bottom: 10px; }
.plan-live-preview { position: sticky; top: 112px; border: 1px solid var(--border); border-radius: 8px; background: #fff; box-shadow: var(--shadow-sm); }
.plan-limit-fieldset { padding: 16px; border: 1px solid var(--border); border-radius: 7px; background: #fbfcfd; }
.plan-limit-fieldset legend { padding: 0 6px; }
.plan-limit-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.plan-limit-grid label { min-width: 0; }
.plan-limit-grid label span { min-height: 30px; display: flex; align-items: end; }
.plan-options { display: grid; grid-template-columns: minmax(190px, 1.3fr) 1fr 1fr; align-items: end; gap: 12px; }
.check-option.standalone { min-height: 42px; border: 1px solid var(--border-strong); border-radius: 6px; }
.signature-preview {
  margin: 10px 0 0;
  padding: 10px 12px;
  white-space: pre-wrap;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--text-soft);
  font-size: 11px;
  line-height: 1.45;
}
.signature-link { display: grid; gap: 6px; margin-top: 10px; }
.signature-link[hidden] { display: none; }
.signature-link > label { color: var(--text-soft); font-size: 10px; font-weight: 600; }
.signature-link-control { display: grid; grid-template-columns: minmax(0, 1fr) 42px; gap: 7px; }
.signature-link-control input { min-width: 0; height: 42px; overflow: hidden; text-overflow: ellipsis; background: #fff; color: var(--text-soft); }
.signature-copy-button { width: 42px; height: 42px; display: grid; place-items: center; padding: 0; border: 1px solid var(--border-strong); border-radius: 6px; background: #fff; color: var(--muted); cursor: pointer; transition: border-color .15s ease, background .15s ease, color .15s ease; }
.signature-copy-button:hover { border-color: #b9d7d3; background: var(--primary-soft); color: var(--primary-dark); }
.signature-copy-button:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.signature-copy-button.is-copied { border-color: #9bd6c7; background: #e9f8f3; color: #08755e; }
.signature-copy-button:disabled { cursor: not-allowed; opacity: .5; }
.signature-copy-button svg { width: 17px; height: 17px; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }

@media (max-width: 1100px) {
  .dashboard-overview { grid-template-columns: 1fr; }
  .channel-composition { grid-template-columns: 140px minmax(0, 1fr); }
  .plan-limit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .client-files-panel .drive-file-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .client-drive-scroll { max-height: 700px; }
}

@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { width: 252px; box-shadow: 18px 0 48px rgba(19, 34, 44, .15); }
  .sidebar-scrim { position: fixed; inset: 0; z-index: 11; border: 0; background: rgba(20, 32, 40, .35); backdrop-filter: blur(2px); }
  .menu-open .sidebar-scrim { display: block; }
  .topbar { padding-inline: 20px; }
  .content { padding-inline: 20px; }
  .plan-builder-grid { grid-template-columns: 1fr; }
  .plan-builder-preview { border-top: 1px solid var(--border); border-left: 0; }
  .plan-live-preview { position: static; }
  .plan-list-grid { grid-template-columns: 1fr; }
  .client-files-panel .drive-file-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .topbar { min-height: 70px; padding-inline: 14px; }
  .topbar h1 { font-size: 17px; }
  .content { padding: 20px 14px 38px; }
  .dashboard-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .dashboard-actions .primary-button, .dashboard-actions .secondary-button { width: 100%; padding-inline: 11px; }
  .channel-composition { grid-template-columns: 1fr; justify-items: center; }
  .channel-composition dl { width: 100%; }
  .metrics article, .analytics-metrics article { min-height: 112px; }
  .panel-heading { align-items: flex-start; }
  .plan-metrics { grid-template-columns: 1fr; }
  .plan-options, .plan-limit-grid { grid-template-columns: 1fr 1fr; }
  .plan-options .check-option { grid-column: 1 / -1; }
  .plan-list-card > footer { align-items: flex-start; flex-direction: column; }
  .plan-card-actions { width: 100%; justify-content: space-between; }
  .plan-preview-head { min-height: 0; flex-direction: column; }
  .client-files-panel .drive-file-grid { grid-template-columns: 1fr; }
  .client-drive-scroll { max-height: 70vh; }
  .client-caption-actions { width: 100%; justify-content: flex-start; }
  .client-caption-actions .primary-button, .client-caption-actions .secondary-button { flex: 1 1 130px; }
}

@media (max-width: 420px) {
  .dashboard-actions { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

@media print {
  .sidebar, .sidebar-scrim, .topbar, .no-print { display: none !important; }
  .panel, .report-document { box-shadow: none !important; }
}
