.table-wrap { overflow: auto; }
.table-wrap table { min-width: 1500px; }
.metric-value { padding: 0; border: 0; background: transparent; color: #4856e9; font: inherit; font-weight: 650; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.metric-value:hover { border-color: transparent; background: transparent; box-shadow: none; outline: none; }
.metric-dialog { width: min(640px, calc(100% - 28px)); max-height: min(88vh, 980px); padding: 0; overflow: hidden; border: 1px solid #e4e8f0; border-radius: 16px; box-shadow: 0 24px 80px #17243d38; }
.metric-dialog::backdrop { background: #17243d80; backdrop-filter: blur(3px); }
.metric-dialog .metric-dialog-form { display: flex; flex-direction: column; max-height: min(88vh, 980px); overflow: hidden; padding: 0; }
.metric-dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 22px 26px 12px; }
.metric-dialog-header h2 { font-size: 22px; letter-spacing: -.03em; }
.metric-dialog .dialog-close { position: static; flex: 0 0 auto; width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid #e5e9f1; border-radius: 9px; background: #fff; color: #71809a; font-size: 22px; line-height: 1; }
.metric-dialog .dialog-close:hover { background: #f5f7fb; color: #26344e; }
.metric-dialog-body { min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 0 26px 18px; scrollbar-width: thin; scrollbar-color: #c5cede transparent; }
.metric-dialog-body::-webkit-scrollbar { width: 8px; }
.metric-dialog-body::-webkit-scrollbar-track { background: transparent; }
.metric-dialog-body::-webkit-scrollbar-thumb { border: 2px solid transparent; border-radius: 10px; background: #c5cede; background-clip: padding-box; }
.metric-dialog-body::-webkit-scrollbar-thumb:hover { background-color: #9eabc0; }
.edit-identity { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; margin: 0 0 12px; border-top: 1px solid #e8ecf4; }
.edit-identity div { display: flex; justify-content: space-between; gap: 14px; padding: 10px 0; border-bottom: 1px solid #e8ecf4; }
.edit-identity span { color: #71809a; }
.edit-identity strong { text-align: right; overflow-wrap: anywhere; }
.edit-warning { margin: 12px 0; padding: 10px 12px; border-radius: 7px; background: #fff8e8; color: #9d6126; font-size: 12px; }
.metric-edit-table { border: 1px solid #e3e7ef; border-radius: 11px; overflow: hidden; background: #fff; }
.metric-edit-head, .metric-edit-row { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(80px, .7fr) minmax(130px, 1fr); align-items: center; gap: 12px; padding: 10px 14px; }
.metric-edit-head { min-height: 42px; background: #f7f8fb; color: #66748c; font-size: 12px; font-weight: 700; }
.metric-edit-row { min-height: 51px; border-top: 1px solid #edf0f5; }
.metric-before { text-align: right; color: #59657a; }
.metric-edit-row input, .metric-edit-row select { width: 100%; min-width: 0; padding: 9px 11px; border: 1px solid #d8dfeb; border-radius: 8px; background: #fff; color: #17243d; font: inherit; font-weight: 650; text-align: right; transition: border-color .16s, box-shadow .16s; }
.metric-edit-row input:focus, .metric-edit-row select:focus { outline: 0; border-color: #6674ef; box-shadow: 0 0 0 3px #6674ef1c; }
.metric-edit-row output { text-align: right; font-weight: 650; }
.metric-dialog .dialog-actions { flex: 0 0 auto; margin: 0; padding: 14px 26px 18px; border-top: 1px solid #edf0f5; background: #fff; }
.history-head { margin: 8px 0 20px; }
.history-subtitle { margin: 6px 0 0; color: #71809a; font-size: 13px; }
.history-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin: 18px 0 12px; padding: 12px 14px; background: #fff; border: 1px solid #e8ecf4; border-radius: 10px; }
.history-toolbar.hidden { display: none; }
.history-header { position: relative; z-index: 5; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto; row-gap: 32px; margin-bottom: 12px; }
.history-header > div:first-child { flex: 0 0 auto; }
.history-header .history-toolbar { width: 100%; min-width: 0; justify-content: space-between; align-items: center; gap: 14px; margin: 0; padding: 0; border: 0; background: transparent; transform: none; }
.history-platform { display: flex; gap: 4px; flex: 0 0 auto; }
.history-result-count { margin-left: 9px; padding-left: 12px; border-left: 1px solid #e5e9f1; color: #7b879b; font-size: 12px; white-space: nowrap; }
.history-platform-tab { border: 0; border-radius: 7px; padding: 9px 14px; background: transparent; color: #71809a; font: inherit; font-weight: 700; }
.history-platform-tab.active { background: #eef0ff; color: #4856e9; }
.history-platform-tab:disabled { cursor: not-allowed; opacity: .55; }
.history-platform-tab span { margin-left: 4px; font-size: 10px; font-weight: 500; }
.history-filters { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.history-filters label:not(.history-search) { display: flex; align-items: center; gap: 7px; color: #71809a; font-size: 12px; }
.history-filters input[type=date] { min-width: 140px; }
.date-separator { color: #97a2b5; font-size: 12px; }
.history-search { display: flex; align-items: center; gap: 7px; border: 1px solid #dce2ed; border-radius: 7px; padding: 0 9px; color: #8190a9; }
.history-search input { width: 220px; border: 0; outline: 0; padding: 8px 0; font: inherit; }
.history-result-count { display: none; }
.history-filters .history-search { order: 1; }
.history-filters .history-range-anchor { order: 2; }
.history-filters #history-reset { order: 3; }
.history-filters #delete-selected-history { order: 4; }
.history-filters #delete-selected-history:disabled { color: #9aa5b5; background: #f1f3f6; border-color: #e2e6ed; cursor: not-allowed; box-shadow: none; }
.history-range-anchor { position: relative; }
.history-range-button { display: flex; align-items: center; gap: 9px; min-width: 236px; padding: 9px 12px; border: 1px solid #dce2ed; border-radius: 7px; background: #fff; color: #24334d; font: inherit; font-weight: 600; cursor: pointer; }
.history-range-button:hover, .history-range-button[aria-expanded="true"] { border-color: #00a99d; box-shadow: 0 0 0 1px #00a99d inset; }
.calendar-icon { color: #53617b; font-size: 16px; }
.range-chevron { margin-left: auto; color: #7b879a; }
.history-range-popover { position: absolute; z-index: 50; top: calc(100% + 8px); right: 0; width: min(770px, calc(100vw - 280px)); overflow: hidden; background: #fff; border: 1px solid #dce1e8; border-radius: 9px; box-shadow: 0 14px 42px #17243d2b; color: #232b38; }
.history-range-popover.hidden { display: none; }
.range-popover-head, .range-popover-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 17px; }
.range-popover-head { border-bottom: 1px solid #e7e9ed; }
.range-popover-head strong { font-size: 14px; }
.range-popover-head span { color: #6d7889; font-size: 12px; }
.range-popover-body { display: grid; grid-template-columns: 166px minmax(0, 1fr); min-height: 340px; }
.range-presets { display: flex; flex-direction: column; align-items: stretch; gap: 2px; max-height: 365px; overflow: auto; padding: 9px; border-right: 1px solid #e7e9ed; }
.range-preset { padding: 8px 10px; border: 0; border-radius: 5px; background: transparent; color: #303947; text-align: left; font: inherit; cursor: pointer; }
.range-preset:hover, .range-preset.active { background: #e8f8f6; color: #008f87; }
.range-calendar-area { min-width: 0; }
.range-calendar-nav { display: grid; grid-template-columns: 28px 28px 1fr 28px 28px; align-items: center; gap: 4px; min-height: 49px; padding: 0 10px; border-bottom: 1px solid #e7e9ed; text-align: center; }
.range-calendar-nav strong { font-size: 14px; }
.range-calendar-nav button { width: 28px; height: 30px; border: 0; border-radius: 4px; background: transparent; color: #444d5a; font-size: 18px; cursor: pointer; }
.range-calendar-nav button:hover { background: #f0f2f5; }
.range-calendars { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.range-calendar { min-width: 0; padding: 7px 9px 10px; }
.range-calendar + .range-calendar { border-left: 1px solid #e7e9ed; }
.range-weekdays, .range-day-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); text-align: center; }
.range-weekdays { color: #7c8491; font-size: 11px; }
.range-weekdays span { padding: 7px 0; }
.range-day { position: relative; min-width: 0; height: 34px; border: 0; border-radius: 3px; background: transparent; color: #303947; font: inherit; cursor: pointer; }
.range-day:hover { outline: 1px solid #00a99d; }
.range-day.other-month { color: #b0b5bd; }
.range-day.in-range { border-radius: 0; background: #e8f8f6; }
.range-day.selected { border-radius: 3px; background: #009f96; color: #fff; font-weight: 700; }
.range-day.today:not(.selected)::after { position: absolute; right: 50%; bottom: 3px; width: 4px; height: 4px; border-radius: 50%; background: #009f96; content: ''; transform: translateX(50%); }
.range-popover-foot { justify-content: flex-end; border-top: 1px solid #e7e9ed; }
.range-popover-foot .button { min-width: 60px; padding: 7px 12px; }
.history-table-wrap { overflow: auto; background: #fff; border: 1px solid #e8ecf4; border-radius: 10px; }
.history-footer { margin-top: -1px; border: 1px solid #e8ecf4; border-radius: 0 0 10px 10px; background: #fff; }
.history-page-size-label { display: inline-flex; align-items: center; gap: 6px; color: #77839a; white-space: nowrap; }
.history-page-size-label select { min-height: 30px; padding: 4px 7px; border: 1px solid #e0e5ed; border-radius: 6px; background: #fff; color: #46546e; font: inherit; }
.history-table { min-width: 1840px; }
.history-table th { position: sticky; top: 0; z-index: 1; white-space: nowrap; font-size: 14px; font-weight: 600; }
.history-table td { vertical-align: middle; padding: 10px 12px; white-space: nowrap; }
.history-table td:first-child, .history-table td:nth-child(2), .history-table td:nth-child(3) { min-width: 145px; max-width: 210px; white-space: normal; }
.history-table td:first-child strong, .history-table td:first-child small { display: block; }
.history-table td:first-child small { margin-top: 3px; color: #8995a9; font: 11px ui-monospace, SFMono-Regular, Consolas, monospace; }
.history-level { display: inline-block; margin-bottom: 4px; padding: 2px 7px; border-radius: 10px; background: #f0f3f8; color: #68758d; font-size: 10px; }
.history-metric { color: #46536a; font-weight: 650; }
.history-hierarchy { color: #26354f; font-weight: 700; }
.history-hierarchy small { display: block; margin-top: 3px; color: #8895aa; font: 11px ui-monospace, SFMono-Regular, Consolas, monospace; }
.history-value-pair { display: grid; justify-items: center; gap: 3px; min-width: 62px; font-variant-numeric: tabular-nums; }
.history-old-value { color: #4856e9; text-decoration: underline; text-underline-offset: 2px; }
.history-new-value, .history-value-edit { color: #52627d; font-weight: 700; }
.history-increase { color: #d64545 !important; }
.history-decrease { color: #15966f !important; }
.history-value-edit { padding: 0; border: 0; background: transparent; font: inherit; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.history-value-edit:hover { color: #2637c5; }
.history-edit-button { padding: 6px 10px; font-size: 12px; }
.history-readonly { color: #a2aabd; font-size: 11px; }
.history-toggle { position: relative; display: inline-flex; width: 38px; height: 22px; cursor: pointer; }
.history-toggle input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.history-toggle span { width: 38px; height: 22px; border-radius: 12px; background: #c9ced7; transition: background .16s ease; }
.history-toggle span::after { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px #0002; content: ''; transition: transform .16s ease; }
.history-toggle input:checked + span { background: #2864f0; }
.history-toggle input:checked + span::after { transform: translateX(16px); }
.history-toggle input:focus-visible + span { outline: 2px solid #4856e9; outline-offset: 2px; }
.history-table th:first-child, .history-table td:first-child { width: 42px; min-width: 42px; text-align: center; }
.history-table td:first-child input, .history-table th:first-child input { width: 15px; height: 15px; accent-color: #4856e9; cursor: pointer; }
.button.danger { border-color: #f0c5c7; background: #fff; color: #c63d4b; }
.button.danger:hover { border-color: #dc6670; background: #fff6f6; }
.history-empty { margin: 0; padding: 38px; border: 0; background: transparent; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.page-context { margin: 0 0 10px; color: #52627d; font-size: 13px; font-weight: 600; }
#breadcrumb { max-width: min(72vw, 1000px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: .06em; }
.toast { z-index: 1000; max-width: min(420px, calc(100vw - 32px)); border: 1px solid #ffffff24; backdrop-filter: blur(10px); transition: opacity .22s ease, transform .22s cubic-bezier(.2,.8,.2,1); }
.toast-stack { position: fixed; z-index: 1000; right: 24px; bottom: 24px; display: flex; flex-direction: column; align-items: flex-end; gap: 9px; width: max-content; max-width: calc(100vw - 32px); pointer-events: none; }
.toast-stack .toast { position: relative; inset: auto; width: fit-content; min-width: min(240px, calc(100vw - 32px)); max-width: min(420px, calc(100vw - 32px)); margin: 0; pointer-events: auto; }
.toast.toast-enter { opacity: 0; transform: translateY(10px) scale(.98); }
.toast.toast-leave { opacity: 0; transform: translateY(7px) scale(.985); }
@media (prefers-reduced-motion: reduce) { .toast { transition: none; } }
@media (max-width: 1000px) { .history-header { align-items: flex-start; flex-wrap: wrap; } .history-header .history-toolbar { flex-basis: 100%; order: 3; transform: none; } }
@media (max-width: 600px) { .history-header { flex-direction: column; gap: 14px; } .history-header .history-toolbar { width: 100%; } .history-filters #delete-selected-history { grid-column: span 2; } }
@media (max-width: 1000px) { .history-toolbar { align-items: flex-start; flex-direction: column; } .history-filters { justify-content: flex-start; width: 100%; } .history-range-popover { left: 0; right: auto; width: min(770px, calc(100vw - 110px)); } }
@media (max-width: 600px) { .history-head { align-items: flex-start; flex-direction: column; gap: 12px; } .history-filters { display: grid; grid-template-columns: 1fr auto; } .history-range-anchor { grid-column: span 2; } .history-range-button { width: 100%; } .history-search { grid-column: span 2; } .history-search input { width: 100%; } .history-range-popover { position: fixed; top: 50%; left: 50%; right: auto; width: calc(100vw - 24px); max-height: 90vh; overflow: auto; transform: translate(-50%, -50%); } .range-popover-body { grid-template-columns: 108px minmax(0, 1fr); } .range-presets { padding: 6px; } .range-preset { padding: 7px 5px; font-size: 12px; } .range-calendars { grid-template-columns: 1fr; } .range-calendar + .range-calendar { display: none; } .range-calendar-nav { grid-template-columns: 24px 24px 1fr 24px 24px; gap: 0; padding: 0 3px; } .range-calendar-nav button { width: 24px; } .range-day { height: 31px; font-size: 12px; } .range-popover-head { align-items: flex-start; flex-direction: column; gap: 4px; } }
@media (max-width: 600px) { .metric-dialog { width: calc(100% - 20px); max-height: 92vh; border-radius: 13px; } .metric-dialog-form { max-height: 92vh; } .metric-dialog-header { padding: 18px 17px 10px; } .metric-dialog-body { padding: 0 17px 14px; } .metric-dialog .dialog-actions { padding: 12px 17px 15px; } .edit-identity div { gap: 7px; font-size: 12px; } .edit-identity strong { max-width: 68%; } .metric-edit-head, .metric-edit-row { grid-template-columns: minmax(0, 1fr) minmax(58px, .65fr) minmax(92px, .95fr); gap: 7px; padding: 8px 9px; font-size: 12px; } }

/* Compact, data-forward workspace based on the selected reference direction. */
.sidebar { width: 216px; padding: 24px 12px; }
main { margin-left: 216px; padding: 28px 30px; }
header { margin-bottom: 20px; }
h1 { font-size: 25px; }
.workspace-view { min-width: 0; }

.facebook-ads-view { min-width: 0; }
.facebook-ads-card { display: flex; align-items: flex-start; gap: 24px; max-width: 980px; margin: 12px 0; padding: 32px; border: 1px solid #e4eaf4; border-radius: 18px; background: #fff; box-shadow: 0 12px 32px rgba(29, 50, 91, .06); }
.facebook-ads-mark { display: grid; flex: 0 0 64px; width: 64px; height: 64px; place-items: center; border-radius: 18px; background: #1877f2; color: #fff; font: 700 54px/1 Arial, sans-serif; }
.facebook-ads-content { max-width: 680px; }
.facebook-ads-content h2 { margin: 4px 0 10px; color: #17243d; font-size: 25px; }
.facebook-ads-content > p:not(.asset-kicker) { color: #61708b; line-height: 1.7; }
.facebook-account-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 14px; }
.facebook-account-table-wrap { max-width: 900px; overflow: auto; margin-top: 20px; border: 1px solid #e4eaf4; border-radius: 10px; }
.facebook-account-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.facebook-account-table th, .facebook-account-table td { padding: 12px 14px; border-bottom: 1px solid #edf0f5; text-align: left; white-space: nowrap; }
.facebook-account-table th { background: #f8f9fc; color: #687791; font-weight: 600; }
.facebook-account-empty { color: #8793a8; text-align: center !important; }
.facebook-account-open { border: 0; background: none; color: #2563eb; cursor: pointer; font: inherit; }
.facebook-ads-open { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; text-decoration: none; }
.facebook-ads-note { margin-top: 18px; font-size: 12px; }
.page-context { margin: -10px 0 15px; font-size: 12px; }
.toolbar { align-items: flex-end; gap: 14px; margin: 17px 0 12px; }
.levels { gap: 0; border-bottom: 1px solid #e3e8f0; flex: 1 1 auto; min-width: 0; }
.level { position: relative; border-radius: 0; padding: 10px 14px 11px; white-space: nowrap; }
.level.active { background: transparent; color: #167b73; }
.level.active::after { position: absolute; right: 10px; bottom: -1px; left: 10px; height: 2px; background: #00a99d; content: ''; }
.filters { flex: 0 0 auto; }
.filters .page-size-select { min-height: 36px; padding: 7px 9px; border: 1px solid #dce2ed; border-radius: 7px; background: #fff; color: #46546e; font: inherit; }
.table-wrap { overflow: auto; border-radius: 8px; box-shadow: 0 1px 2px #18294308; }
.table-wrap table { min-width: 1120px; font-variant-numeric: tabular-nums; }
.table-wrap th { position: sticky; top: 0; z-index: 2; padding: 12px 12px; border-bottom: 1px solid #e8ecf4; white-space: nowrap; text-transform: none; letter-spacing: 0; font-size: 14px; font-weight: 600; }
.table-wrap td { padding: 12px; white-space: nowrap; }
.table-wrap td.name { min-width: 180px; max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.table-wrap td.code { min-width: 125px; color: #46556f; font: inherit; font-variant-numeric: tabular-nums; }
.table-wrap tbody tr:hover { background: #fafcff; }
.table-wrap input[type=checkbox] { width: 15px; height: 15px; accent-color: #149b91; vertical-align: middle; }
.metric-value { max-width: 160px; overflow: hidden; padding: 2px 4px; border: 1px solid transparent; border-radius: 4px; background: transparent; color: #33415a; font: inherit; font-variant-numeric: tabular-nums; text-overflow: ellipsis; cursor: pointer; }
.metric-value:hover, .metric-value:focus, .metric-value:focus-visible { border-color: transparent; background: transparent; box-shadow: none; outline: none; }
.metric-value.metric-value-original { color: #4856e9; }
.metric-value.metric-value-increase { color: #d64545; }
.metric-value.metric-value-decrease { color: #15966f; }
.table-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 8px 14px; border-top: 1px solid #edf0f5; color: #77839a; font-size: 12px; }
.table-pagination { display: flex; align-items: center; gap: 12px; }
.table-pagination button { width: 28px; height: 28px; border: 1px solid #e0e5ed; border-radius: 6px; background: #fff; color: #48566d; font-size: 18px; line-height: 1; cursor: pointer; }
.table-pagination button:hover:not(:disabled) { border-color: #91d4cb; color: #087e75; }
.table-pagination button:disabled { color: #bdc5d0; background: #f8f9fb; cursor: default; }
.side-connection-status { display: flex; align-items: center; min-height: 22px; }
.side-connection-status .connection-dot { flex: 0 0 8px; }
.side-pair-button { display: flex; align-items: center; justify-content: center; gap: 9px; width: 100%; min-height: 40px; margin-top: 12px; padding: 8px 10px; border: 1px solid #e0e5ef; border-radius: 9px; background: #fff; color: #495775; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; transition: border-color .14s ease, background-color .14s ease, color .14s ease, box-shadow .14s ease; }
.side-pair-button img { width: 18px; height: 18px; opacity: .78; }
.side-pair-button:hover { border-color: #c8cef8; background: #f8f8ff; color: #4856e9; box-shadow: 0 2px 7px #17243d0d; }
.side-pair-button.is-connected { border-color: #d7eee5; background: #f6fcf9; color: #198264; }
.side-pair-button.is-connected img { filter: invert(45%) sepia(32%) saturate(655%) hue-rotate(106deg) brightness(92%); }
.side-connection-status { gap: 0; }
.side-connection-status #side-status { line-height: 1.4; overflow-wrap: anywhere; }
.license-gate { position: fixed; z-index: 1000; inset: 0; display: grid; place-items: center; padding: 24px; background: #f5f7fbeF; backdrop-filter: blur(8px); }
.license-gate.hidden { display: none; }
.license-gate-card { width: min(520px, 100%); padding: 34px; border: 1px solid #e1e6ef; border-radius: 18px; background: #fff; box-shadow: 0 20px 65px #17243d20; text-align: center; }
.license-gate-icon { display: grid; width: 48px; height: 48px; margin: 0 auto 18px; place-items: center; border-radius: 14px; background: linear-gradient(145deg,#6d61f7,#3149c9); color: #fff; font-size: 25px; font-weight: 800; }
.license-gate-card .eyebrow { margin-bottom: 7px; }
.license-gate-card h2 { margin: 0; font-size: 23px; }
.license-gate-card p:not(.eyebrow) { margin: 13px 0 0; color: #6f7d95; line-height: 1.75; }
.license-gate-meta { margin: 18px 0; color: #8792a5; font-size: 12px; }
.license-gate-card .button { min-width: 150px; }
.license-gate-card a.button { display: inline-block; text-decoration: none; margin-right: 8px; }
@media (max-width: 1000px) { .sidebar { width: 62px; padding: 20px 8px; } .brand { justify-content: center; padding: 0 0 25px; } .brand>span:last-child { display: none; } .nav-item { min-height: 42px; padding: 10px 8px; font-size: 0; white-space: nowrap; } .nav-item span { font-size: 16px; } .nav-item em { display: none; } .side-foot { padding-right: 0; padding-left: 10px; } main { margin-left: 62px; padding: 24px 18px; } .toolbar { align-items: stretch; flex-direction: column; } .levels { overflow-x: auto; } .filters { width: 100%; } }
@media (max-width: 600px) { .filters { flex-wrap: wrap; } .search { flex: 1 1 150px; } .search input { min-width: 0; } .table-footer { align-items: flex-start; flex-direction: column; } }

/* Sidebar platform and activity icons. */
.nav-item { display: flex; align-items: center; gap: 10px; }
.nav-item .nav-icon-image { display: block; flex: 0 0 21px; width: 21px; height: 21px; object-fit: contain; }
.nav-item .nav-icon-tiktok, .nav-item .nav-icon-facebook { flex: 0 0 22px; width: 22px; height: 22px; }
.nav-item .nav-icon-history { width: 21px; height: 21px; }
.nav-item .nav-label { display: inline; flex: 0 1 auto; min-width: 0; width: auto; color: inherit; }
.nav-item em { flex: 0 0 auto; margin-left: auto; float: none; }
.nav-item.muted { display: grid; grid-template-columns: 18px minmax(0, 1fr); column-gap: 10px; row-gap: 2px; align-items: start; min-width: 0; }
.nav-item.muted .nav-icon-image { grid-column: 1; grid-row: 1 / span 2; margin-top: 1px; }
.nav-item.muted .nav-label { grid-column: 2; min-width: 0; white-space: nowrap; }
.nav-item.muted em { grid-column: 2; justify-self: end; max-width: 100%; margin: 0; text-align: right; line-height: 1.1; }
@media (max-width: 1000px) { .nav-item .nav-icon-image { width: 19px; height: 19px; } .nav-item .nav-icon-tiktok, .nav-item .nav-icon-facebook { flex-basis: 22px; width: 22px; height: 22px; } }

.asset-kicker { margin: 0 0 5px; color: #7280a1; font-size: 10px; font-weight: 800; letter-spacing: .14em; }

/* Shared manager workspace: align TikTok, Facebook and history surfaces. */
body { background: #f7f8fa; }
main { padding: 28px 30px; }
header { margin-bottom: 18px; }
h1 { font-size: 27px; letter-spacing: -.035em; }
.button, .icon-button, .history-range-button, .facebook-manager-filters input, .facebook-manager-pagination button, .facebook-manager-pagination select { border-radius: 7px; }
.toolbar { align-items: flex-end; gap: 14px; }
.levels { border-color: #e2e5eb; }
.level { color: #667085; }
.level.active { color: #4856e9; }
.level.active::after { background: #4856e9; }
.table-wrap, .history-table-wrap, .facebook-manager-table-wrap { border: 1px solid #e1e5eb; border-radius: 9px; box-shadow: 0 1px 2px #18294308; background: #fff; }
.table-wrap th, .history-table th, .facebook-manager-table th { background: #f8f9fb; color: #667085; }
.table-wrap td, .history-table td, .facebook-manager-table td { border-color: #eceef2; }
.history-platform-tab.active { position: relative; border-radius: 0; background: transparent; color: #4856e9; }
.history-platform-tab.active::after { position: absolute; right: 8px; bottom: 0; left: 8px; height: 2px; background: #4856e9; content: ''; }
.facebook-ads-view { min-width: 0; }
.facebook-manager-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin: 20px 0 12px; }
.facebook-manager-tabs { display: flex; flex: 1 1 auto; min-width: 0; gap: 4px; border-bottom: 1px solid #e2e5eb; }
.facebook-manager-tab { position: relative; min-height: 48px; padding: 10px 15px; border: 0; background: transparent; color: #667085; font: inherit; font-weight: 700; white-space: nowrap; cursor: pointer; }
.facebook-manager-tab.active { color: #4856e9; }
.facebook-manager-tab.active::after { position: absolute; right: 8px; bottom: -1px; left: 8px; height: 2px; background: #4856e9; content: ''; }
.facebook-manager-filters { display: flex; flex: 0 0 auto; align-items: center; gap: 9px; }
.facebook-manager-filters .icon-button { width: 38px; height: 38px; padding: 2px 8px; font-size: 20px; }
.facebook-manager-search { min-height: 38px; }
.facebook-manager-search input { width: 230px; }
.facebook-manager-filters input[type=date] { min-height: 38px; padding: 7px 10px; border: 1px solid #dce1e8; color: #17243d; }
.facebook-ads-note { min-height: 20px; margin: 12px 2px; color: #667085; font-size: 12px; }
.facebook-manager-table-wrap { overflow: auto; }
.facebook-manager-table { min-width: 820px; width: 100%; border-collapse: collapse; text-align: left; font-variant-numeric: tabular-nums; }
.facebook-manager-table th { padding: 15px 13px; border-bottom: 1px solid #e2e5eb; white-space: nowrap; font-size: 13px; font-weight: 650; }
.facebook-manager-table td { height: 60px; padding: 13px; border-top: 1px solid #eceef2; white-space: nowrap; }
.facebook-manager-table tbody tr:hover { background: #fafbfc; }
.facebook-manager-table td.facebook-account-name { color: #4856e9; font-weight: 700; }
.facebook-account-empty { padding: 24px !important; color: #8793a8; text-align: center !important; }
.facebook-account-open { padding: 0; border: 0; background: transparent; color: #4856e9; cursor: pointer; font: inherit; }
.facebook-manager-footer { display: flex; min-height: 56px; align-items: center; justify-content: space-between; gap: 14px; padding: 9px 4px; color: #52627d; }
.facebook-manager-pagination { display: flex; align-items: center; gap: 8px; }
.facebook-manager-pagination button, .facebook-manager-pagination select { min-height: 36px; padding: 6px 12px; border: 1px solid #dce1e8; background: #fff; color: #52627d; font: inherit; font-weight: 600; }
.facebook-manager-pagination button:disabled { color: #a4acb8; background: #fafafa; cursor: default; }
.facebook-manager-pagination strong { display: grid; min-width: 36px; height: 36px; place-items: center; border-radius: 7px; background: #4856e9; color: #fff; }
.facebook-manager-pagination select { color: #344054; }
@media (max-width: 900px) { .facebook-manager-toolbar { align-items: stretch; flex-direction: column; } .facebook-manager-tabs { overflow-x: auto; } .facebook-manager-filters { justify-content: flex-end; flex-wrap: wrap; } }
@media (max-width: 600px) { main { padding: 22px 14px; } .facebook-manager-filters { justify-content: flex-start; } .facebook-manager-search { flex: 1 1 160px; } .facebook-manager-search input { width: 100%; } .facebook-manager-filters input[type=date] { flex: 1; } .facebook-manager-footer { align-items: flex-start; flex-direction: column; } .facebook-manager-pagination { flex-wrap: wrap; } }

/* Consistent, low-friction workspace surfaces for the active TikTok pages. */
:root { --bg: #f5f7fb; --line: #e4e8f0; --muted: #748198; --blue: #4c55e8; --blue-pale: #eef0ff; }
body { min-height: 100vh; background: var(--bg); }
.sidebar { width: 248px; padding: 24px 14px 18px; background: rgba(255,255,255,.96); }
.brand { gap: 11px; padding: 0 10px 30px; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; font-size: 18px; }
.sidebar nav { gap: 5px; }
.nav-item { min-height: 44px; padding: 10px 12px; border-radius: 9px; transition: background-color .14s ease, color .14s ease; }
.nav-item:hover:not(:disabled) { background: #f5f6fb; }
.nav-item.active:hover { background: #eef0ff; }
.nav-item.muted { cursor: not-allowed; }
.nav-item.muted em { padding: 3px 7px; border: 1px solid #e8eaf0; border-radius: 999px; background: #f7f8fa; color: #8791a3; font-size: 10px; }
.side-foot { padding-top: 14px; }
main { min-width: 0; margin-left: 248px; padding: 30px clamp(22px, 3vw, 48px); }
#app-header { min-height: 58px; margin-bottom: 20px; }
h1 { font-size: clamp(24px, 2vw, 29px); line-height: 1.25; }
.eyebrow { margin-bottom: 6px; }
.header-actions { gap: 10px; }
.header-connection { padding: 7px 10px; border-radius: 999px; background: #fff; }
.button, .icon-button, input, select { transition: border-color .14s ease, box-shadow .14s ease, background-color .14s ease, color .14s ease; }
.button { min-height: 38px; box-shadow: 0 1px 1px #17243d08; }
.button:hover:not(:disabled) { filter: brightness(.98); box-shadow: 0 2px 7px #17243d12; }
.button:disabled, .icon-button:disabled { opacity: .58; cursor: wait; }
.button:focus-visible, .icon-button:focus-visible, .nav-item:focus-visible, .level:focus-visible, .history-range-button:focus-visible { outline: 3px solid #5665ed45; outline-offset: 2px; }
.toolbar { min-height: 46px; margin: 20px 0 12px; align-items: center; }
.levels { min-width: 0; gap: 2px; border-bottom: 1px solid #e3e7ef; }
.level { position: relative; min-height: 44px; padding: 9px 15px; border-radius: 0; white-space: nowrap; }
.level.active { background: transparent; }
.level.active::after { position: absolute; right: 10px; bottom: -1px; left: 10px; height: 2px; border-radius: 2px; background: var(--blue); content: ''; }
.filters { align-items: center; flex-wrap: wrap; }
.search, input[type="date"], select, .icon-button { min-height: 38px; border-color: #dce2ec; border-radius: 8px; }
.search:focus-within { border-color: #7d86ed; box-shadow: 0 0 0 3px #5665ed18; }
.search input { min-width: 100px; }
select { padding: 7px 10px; background-color: #fff; color: #46546e; font: inherit; }
.icon-button { min-width: 38px; }
.table-wrap, .history-table-wrap { border-color: #e1e6ef; border-radius: 11px; box-shadow: 0 2px 8px #17243d06; }
.table-wrap { scrollbar-width: thin; scrollbar-color: #c5ccda transparent; }
.table-wrap table { min-width: 1280px; }
.table-wrap th, .history-table th { position: sticky; top: 0; z-index: 1; padding-top: 13px; padding-bottom: 13px; background: #f8f9fc; }
.table-wrap td { height: 54px; padding-top: 12px; padding-bottom: 12px; }
.table-wrap tbody tr, .history-table tbody tr { transition: background-color .12s ease; }
.table-wrap tbody tr:hover, .history-table tbody tr:hover { background: #f8f9fd; }
.table-footer { min-height: 54px; padding: 9px 16px; }
.table-pagination { gap: 7px; }
.table-pagination button { width: 32px; height: 32px; border-radius: 8px; }
.history-header { row-gap: 22px; }
.history-toolbar { gap: 14px; }
.history-filters { gap: 9px; }
.history-search, .history-range-button { min-height: 38px; border-radius: 8px; }
.history-search:focus-within { border-color: #7d86ed; box-shadow: 0 0 0 3px #5665ed18; }
.history-table-wrap { max-height: calc(100vh - 250px); overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #c5ccda transparent; }
.history-table { min-width: 1680px; }
.history-table th { padding: 12px 10px; }
.history-table td { padding: 9px 10px; }
.history-footer { min-height: 52px; border-color: #e1e6ef; }
.history-empty { min-height: 170px; display: grid; place-items: center; color: #818da2; }
.toast-stack { right: 22px; bottom: 20px; }
.toast-stack .toast { border-radius: 10px; box-shadow: 0 10px 28px #17243d22; }
@media (max-width: 1100px) {
  .sidebar { width: 68px; padding: 20px 8px; }
  .brand { justify-content: center; padding: 0 0 25px; }
  .brand>span:last-child { display: none; }
  .nav-item { justify-content: center; min-height: 44px; padding: 10px 8px; font-size: 0; }
  .nav-item .nav-icon-image { flex-basis: 22px; width: 22px; height: 22px; }
  .nav-item .nav-label, .nav-item em { display: none; }
  .nav-item.muted { display: flex; }
  .side-foot { display: grid; justify-items: center; gap: 9px; padding: 14px 0 0; }
  .side-connection-status { justify-content: center; }
  .side-connection-status #side-status, .side-pair-button span { display: none; }
  .side-pair-button { width: 40px; min-height: 40px; margin-top: 0; padding: 9px; }
  .side-pair-button img { width: 20px; height: 20px; }
  main { margin-left: 68px; padding: 24px clamp(18px, 2.5vw, 30px); }
}
@media (max-width: 760px) {
  main { padding: 20px 14px; }
  #app-header:not(.history-header) { align-items: flex-start; gap: 12px; }
  .header-actions { flex-wrap: wrap; justify-content: flex-end; }
  .toolbar { align-items: stretch; flex-direction: column; gap: 10px; }
  .levels { overflow-x: auto; scrollbar-width: thin; }
  .filters { display: grid; grid-template-columns: minmax(0,1fr) auto auto; }
  .filters .search { grid-column: 1 / -1; }
  .filters .search input { width: 100%; }
  .filters select { min-width: 105px; }
  .history-header { row-gap: 16px; }
  .history-header .history-toolbar { align-items: stretch; flex-direction: column; }
  .history-filters { display: grid; grid-template-columns: minmax(0,1fr) auto; justify-content: stretch; }
  .history-filters .history-search { grid-column: 1 / -1; }
  .history-search input { width: 100%; }
  .history-range-anchor, .history-range-button { min-width: 0; width: 100%; }
  .history-range-popover { position: fixed; top: 50%; right: 12px; left: 12px; width: auto; max-height: 86vh; overflow: auto; transform: translateY(-50%); }
  .range-popover-body { grid-template-columns: 118px minmax(0,1fr); }
  .range-calendars { grid-template-columns: 1fr; }
  .range-calendar + .range-calendar { display: none; }
  .history-table-wrap { max-height: calc(100vh - 280px); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
