/* FCP console: presentation only; native Filament owns secured interactions. */
:root {
    color-scheme: light;
    --fcp-ink: #101828;
    --fcp-muted: #667085;
    --fcp-line: #e5eaf0;
    --fcp-surface: #fff;
    --fcp-canvas: #f4f7fa;
    --fcp-brand: #047857;
    --fcp-brand-soft: #ecfdf5;
    --fcp-sidebar: #142629;
    --fcp-radius: 12px;
    --fcp-shadow: 0 3px 12px #14262905;
}
html, body, .fi-body { background: var(--fcp-canvas); }
.fi-body { color: var(--fcp-ink); }
.fi-sidebar { background: var(--fcp-sidebar) !important; border-right: 1px solid #243b3e; }
.fi-sidebar-header { background: var(--fcp-sidebar) !important; box-shadow: none !important; min-height: 4rem; border-bottom: 1px solid #ffffff12; }
.fi-sidebar .fi-logo { content: url('/images/fcp-control-plane-logo-light.svg'); max-width: 100%; }
.fi-sidebar-nav { padding: 1rem .65rem; gap: 1.45rem; scrollbar-color: #4b6264 transparent; }
.fi-sidebar-group-label { color: #b3c6c8 !important; font-size: .65rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.fi-sidebar-group-btn .fi-icon, .fi-sidebar-header .fi-icon-btn-icon { color: #b3c6c8 !important; }
.fi-sidebar-item-btn { min-height: 2.55rem; padding: .65rem .8rem; border-radius: 8px; transition: background-color 150ms ease; }
.fi-sidebar-item-label { color: #d8e4e5 !important; font-size: .8rem; font-weight: 450; }
.fi-sidebar-item-icon { color: #b3c6c8 !important; width: 1.15rem; height: 1.15rem; }
.fi-sidebar-item-btn:hover, .fi-sidebar-item-btn:focus-visible { background: #ffffff0c !important; }
.fi-sidebar-item.fi-active .fi-sidebar-item-btn { background: #21443f !important; box-shadow: inset 3px 0 #34d399; }
.fi-sidebar-item.fi-active .fi-sidebar-item-label, .fi-sidebar-item.fi-active .fi-sidebar-item-icon { color: #f0fdf8 !important; }
.fi-sidebar-item .fi-badge { background: #31534f; color: #e6fff5; }
.fi-sidebar-footer { border-top: 1px solid #ffffff12; }
.fcp-sidebar-note { display: flex; align-items: center; gap: .65rem; padding: 1rem; color: #bed1d0; font-size: .72rem; }
.fcp-sidebar-note .fi-icon { width: 1.2rem; height: 1.2rem; flex-shrink: 0; color: #6ee7b7; }
.fcp-sidebar-note span { display: block; color: #90acab; font-size: .65rem; margin-top: .15rem; }
.fi-topbar { border-bottom: 1px solid var(--fcp-line); box-shadow: none; }
.fi-topbar nav { background: #fffffff5 !important; min-height: 4rem; box-shadow: none !important; }
.fi-global-search { width: min(32rem, 100%); }
.fi-global-search-field { width: 100%; }
.fi-global-search .fi-input-wrp { background: #f8fafb; }
.fi-global-search-results-ctn { border-radius: var(--fcp-radius); border: 1px solid var(--fcp-line); }
.fi-logo { max-width: 15rem; }
.fi-main { padding-block: 1.5rem 2.5rem; min-width: 0; }
.fi-page { gap: 1.35rem; }
.fi-header { gap: 1rem; }
.fi-header-heading { color: var(--fcp-ink); font-size: clamp(1.5rem, 2vw, 1.9rem) !important; letter-spacing: -.04em; font-weight: 750; line-height: 1.2; }
.fi-header-subheading { max-width: 65rem; color: var(--fcp-muted) !important; font-size: .8rem; line-height: 1.65; }
.fi-header-actions-ctn .fi-ac { gap: .5rem; flex-wrap: wrap; }
.fi-breadcrumbs { font-size: .75rem; }
.fi-section, .fi-ta, .fi-wi-stats-overview-stat { border: 1px solid var(--fcp-line) !important; border-radius: var(--fcp-radius) !important; background: var(--fcp-surface); box-shadow: var(--fcp-shadow) !important; }
.fi-section-not-contained { background: transparent; border: 0 !important; box-shadow: none !important; }
.fi-section-header { padding: 1rem 1.15rem; }
.fi-section-not-contained > .fi-section-header { padding: 0 0 .75rem; }
.fi-section-header-heading, .fi-ta-heading { color: var(--fcp-ink); font-size: .9rem; font-weight: 700; letter-spacing: -.02em; }
.fi-section-header-description, .fi-ta-description { color: var(--fcp-muted); font-size: .75rem; line-height: 1.6; }
.fi-sc-has-gap { gap: 1rem; }
.fi-wi-stats-overview .fi-section-content.fi-grid { gap: .75rem; grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
.fi-wi-stats-overview-stat { position: relative; height: 100%; padding: 1rem 1.1rem; min-height: 8.25rem; overflow: hidden; border-top: 2px solid #a7d9c6 !important; }
a.fi-wi-stats-overview-stat { transition: border-color 150ms ease, box-shadow 150ms ease; }
a.fi-wi-stats-overview-stat:hover { border-color: #a7d9c6 !important; box-shadow: 0 4px 16px #1426290c !important; }
.fi-wi-stats-overview-stat-content { gap: .4rem; }
.fi-wi-stats-overview-stat-label-ctn { gap: .5rem; }
.fi-wi-stats-overview-stat-label { font-size: .72rem; font-weight: 500; color: var(--fcp-muted); }
.fi-wi-stats-overview-stat-label-ctn > .fi-icon { color: var(--fcp-brand); width: 1.15rem; height: 1.15rem; }
.fi-wi-stats-overview-stat-value { color: var(--fcp-ink) !important; font-size: 1.65rem; font-weight: 700; letter-spacing: -.04em; line-height: 1.2; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.fi-wi-stats-overview-stat-description { font-size: .7rem; line-height: 1.55; gap: .35rem; align-items: flex-start; }
.fi-wi-stats-overview-stat-description .fi-icon { width: .95rem; height: .95rem; flex-shrink: 0; margin-top: .1rem; }
.fi-wi-stats-overview-stat:has(.fi-color-danger) { border-top-color: #f87171 !important; }
.fi-wi-stats-overview-stat:has(.fi-color-warning) { border-top-color: #fbbf24 !important; }
.fi-wi-stats-overview-stat:has(.fi-color-info) { border-top-color: #60a5fa !important; }
.fi-wi-stats-overview-stat:has(.fi-color-gray) { border-top-color: #cbd5e1 !important; }
.fi-wi-chart .fi-section { height: 100%; }
.fi-wi-chart .fi-section-content { padding: 1rem 1.15rem; }
.fi-ta { overflow: hidden; }
.fi-ta-header, .fi-ta-header-toolbar, .fi-ta-content, .fi-ta-footer { border-color: var(--fcp-line) !important; }
.fi-ta-header-toolbar { padding: .85rem 1rem; gap: .75rem; }
.fi-ta-header-cell { background: #f8fafb; padding-block: .7rem; }
.fi-ta-header-cell-label { color: #475467 !important; font-size: .72rem !important; font-weight: 600; letter-spacing: 0; text-transform: none; }
.fi-ta-cell { padding-block: 0; }
.fi-ta-cell .fi-ta-text { padding-block: .65rem; }
.fi-ta-text-item-label { font-size: .8rem; }
.fi-ta-text-description { font-size: .7rem; line-height: 1.5; }
.fi-ta-row { transition: background-color 150ms ease; }
.fi-ta-row:hover { background: #f8fbfa !important; }
.fi-ta-filter-indicators { background: #f1faf6; padding-block: .6rem; }
.fi-ta-filters { background: #fafcfb; }
.fi-dropdown-panel:has(.fi-ta-filters) { max-height: min(42rem, calc(100dvh - 6rem)); overflow-y: auto; }
.fi-ta-empty-state { padding: 3rem 1rem; }
.fi-pagination { font-size: .75rem; padding-block: .85rem; }
.fi-badge { border-radius: 6px !important; font-weight: 600; letter-spacing: 0; }
.fi-btn { border-radius: 8px !important; font-size: .78rem; min-height: 2.3rem; box-shadow: none; }
.fi-input-wrp { border-radius: 8px !important; box-shadow: 0 0 0 1px #d9e1e7; }
.fi-input, .fi-select-input, .fi-fo-select { font-size: .8rem; }
.fi-fo-field-label-content { font-size: .75rem; font-weight: 600; }
.fi-fo-field-wrp-helper-text { color: var(--fcp-muted); font-size: .72rem; line-height: 1.6; }
.fi-modal-window { border: 1px solid var(--fcp-line); border-radius: 16px; box-shadow: 0 24px 80px #14262926; }
.fi-modal-header { border-bottom: 1px solid var(--fcp-line); padding-bottom: 1rem; }
.fi-modal-footer { border-top: 1px solid var(--fcp-line); padding-top: 1rem; }
.fi-tabs { border-radius: 10px; box-shadow: none; gap: .25rem; }
.fi-tabs-item { border-radius: 7px; font-size: .78rem; }
.fi-in-entry-label { color: var(--fcp-muted); font-size: .75rem; }
.fi-in-text-item { font-size: .82rem; overflow-wrap: anywhere; }
.fi-simple-main { border: 1px solid var(--fcp-line); border-radius: 18px; box-shadow: 0 10px 40px #14262908; }
:where(a, button, input, select, textarea, summary):focus-visible { outline: 2px solid #64748b; outline-offset: 3px; }
.fi-sidebar :where(a, button):focus-visible { outline-color: #6ee7b7; }

/* Existing bespoke workspaces share the same surfaces and typography. */
.fi-page :is(.fleet-hero, .template-rc-hero, .ops-guide-hero) { background: #fff; color: var(--fcp-ink); border: 1px solid var(--fcp-line); border-radius: var(--fcp-radius); box-shadow: var(--fcp-shadow); padding: 1.35rem; }
.fi-page :is(.fleet-hero, .template-rc-hero, .ops-guide-hero) :is(h2, h3, strong) { color: var(--fcp-ink); }
.fi-page :is(.fleet-hero, .template-rc-hero, .ops-guide-hero) p { color: var(--fcp-muted); font-size: .8rem; line-height: 1.65; }
.fi-page :is(.fleet-card, .fleet-section, .campaign-card, .template-rc-card, .template-rc-panel, .template-rc-fleet, .analytics-card, .analytics-panel, .ops-guide-card) { border-color: var(--fcp-line); border-radius: var(--fcp-radius); box-shadow: var(--fcp-shadow); }
.fi-page :is(.template-rc-fleet-top, .campaign-creative) { background: #f8fafb; }
.fi-page :is(.template-rc-version, .template-rc-content, .analytics-tag) { background: var(--fcp-brand-soft); color: var(--fcp-brand); }
.fi-page :is(.template-rc-hero .pill, .fleet-pill) { background: var(--fcp-brand-soft); color: var(--fcp-brand); border-color: #d1eadd; }
.fi-page .template-rc-fleet-title h2 { font-size: 1.05rem; }
.fi-page .template-rc-stat { border-radius: 8px; }
.fi-page .template-rc-stat span { font-size: .7rem; }
.fi-page .template-rc-filter.active { background: var(--fcp-brand-soft); color: var(--fcp-brand); border-color: #6ac6a0; }
.fi-page .template-rc-progress > span, .fi-page .campaign-progress > span { background: #10b981; }
.fi-page .analytics-command { top: 4.5rem; background: #fff; border-color: var(--fcp-line); border-radius: var(--fcp-radius); box-shadow: var(--fcp-shadow); backdrop-filter: none; }
.fi-page .analytics-card-accent { background: #ecfdf5; border-color: #cceadd; }
.fi-page .analytics-card-accent :is(.analytics-kpi-label, small) { color: #3e7162; }
.fi-page .analytics-card-accent > strong { color: #065f46; }
.fi-page .analytics-panel p, .fi-page .analytics-card small { color: var(--fcp-muted); }
.fi-page .analytics-table th { color: #475467; }
.fi-page .analytics-table small, .fi-page .analytics-pagination { color: #667085; }
.fi-page .analytics-table-wrap thead { position: sticky; top: 0; z-index: 1; }
.fi-page :is(.analytics-kpi-label, .analytics-controls label, .analytics-table-controls label, .analytics-button) { font-size: .75rem !important; }
.fi-page :is(.analytics-table, .analytics-panel p, .analytics-panel small, .analytics-compare-row) { font-size: .75rem; }

.top-domains { height: 100%; min-width: 0; border: 1px solid var(--fcp-line); border-radius: var(--fcp-radius); background: #fff; box-shadow: var(--fcp-shadow); overflow: hidden; }
.top-domains__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1rem 1.15rem; }
.top-domains__head h3 { font-size: .9rem; font-weight: 700; letter-spacing: -.02em; }
.top-domains__head p { margin-top: .3rem; color: var(--fcp-muted); font-size: .72rem; line-height: 1.6; }
.top-domains__badge { display: inline-flex; flex-shrink: 0; padding: .3rem .6rem; border-radius: 6px; background: var(--fcp-brand-soft); color: var(--fcp-brand); font-size: .65rem; }
.top-domains__scroll { overflow-x: auto; }
.top-domains table { width: 100%; font-size: .75rem; border-collapse: collapse; }
.top-domains th { text-align: left; color: var(--fcp-muted); font-size: .67rem; font-weight: 500; background: #f8fafb; white-space: nowrap; }
.top-domains th, .top-domains td { padding: .6rem .8rem; border-bottom: 1px solid #f0f3f6; }
.top-domains td:first-child, .top-domains th:first-child { padding-left: 1.15rem; }
.top-domains tr:last-child td { border-bottom: none; }
.top-domains td.num, .top-domains th.num { text-align: right; font-variant-numeric: tabular-nums; }
.top-domains td.accepted { color: var(--fcp-brand); font-weight: 650; }
.top-domain__rank { display: inline-grid; place-items: center; width: 1.4rem; height: 1.4rem; border-radius: 50%; background: #ecfdf5; color: #047857; font-size: .65rem; }
.top-domain__rate { display: flex; align-items: center; gap: .5rem; font-variant-numeric: tabular-nums; }
.top-domain__bar { width: 4.5rem; height: 4px; border-radius: 99px; background: #e8f1ed; overflow: hidden; }
.top-domain__bar span { display: block; height: 100%; background: #10b981; }
.top-domains__empty { padding: 2rem 1.15rem; color: var(--fcp-muted); font-size: .8rem; }
.top-domains__foot { padding: .7rem 1.15rem; color: var(--fcp-muted); font-size: .65rem; border-top: 1px solid var(--fcp-line); }
.fcp-dashboard .fi-wi-stats-overview:first-child { background: #fff; border: 1px solid var(--fcp-line); border-radius: var(--fcp-radius); padding: 1rem; }
.fcp-dashboard .fi-wi-stats-overview:first-child .fi-section-header-text-ctn { display: flex; align-items: baseline; flex-wrap: wrap; gap: .25rem .75rem; }
.fcp-dashboard .fi-wi-stats-overview:first-child .fi-section-header-description { margin: 0; font-size: .68rem; }
.fcp-filter-scope { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem; font-size: .72rem; color: var(--fcp-muted); padding-top: .5rem; }
.fcp-filter-scope strong { font-weight: 600; color: #344054; }
@media (min-width: 1280px) { .fi-main { padding-inline: 1.5rem; } }
@media (max-width: 1023px) {
    .fi-main { padding-block: 1rem 2rem; }
    .fi-page, .fi-page > *, .fi-wi, .fi-wi > * { min-width: 0; max-width: 100%; }
    .fi-wi-widget.fi-grid-col { grid-column: 1 / -1 !important; }
    .fi-wi-stats-overview .fi-section-content.fi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
    .fi-global-search { width: min(25rem, 100%); }
}
@media (max-width: 639px) {
    .fi-header-heading { font-size: 1.5rem !important; }
    .fi-main { padding-inline: .85rem; }
    .fi-wi-stats-overview .fi-section-content.fi-grid { gap: .5rem; }
    .fi-wi-stats-overview-stat { padding: .8rem; min-height: 8.5rem; }
    .fi-wi-stats-overview-stat-value { font-size: 1.4rem; }
    .fi-wi-stats-overview-stat-label { font-size: .7rem; }
    .fi-header-actions-ctn { width: 100%; }
    .top-domains__head { flex-direction: column; gap: .5rem; }
    .fi-page .analytics-command { position: static; }
    .fi-page .template-rc-plan { grid-template-columns: minmax(0, 1fr); }
    .fi-page .template-rc-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 379px) { .fi-wi-stats-overview .fi-section-content.fi-grid { grid-template-columns: minmax(0, 1fr) !important; } }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
/* Use the real Filament 5 class names for header/sidebar states. */
.fi-topbar { background: #fff; }
.fi-page-main, .fi-page-header-main-ctn { gap: 1.25rem; }
.fi-page-header-main-ctn { padding-block: 0; }
.fi-sidebar-nav-groups { gap: 1.4rem; }
.fi-btn.fi-color-primary, .fi-btn.fi-color-success { background: #047857; color: #fff; }
.fi-btn.fi-color-primary:hover, .fi-btn.fi-color-success:hover { background: #065f46; }
.fi-btn.fi-color-primary .fi-icon, .fi-btn.fi-color-success .fi-icon { color: currentColor; }
.fi-page-content { row-gap: 1.25rem; }
.fi-page-header-main { padding-block: 0; }
.fcp-dashboard-filter-bar { gap: .5rem; }
.fcp-stat { display: block; height: 100%; padding: .9rem 1rem; border: 1px solid var(--fcp-line); border-top: 2px solid var(--stat-accent, #a7d9c6); border-radius: 10px; background: #fff; box-shadow: var(--fcp-shadow); --stat-color: #047857; --stat-soft: #ecfdf5; }
.fcp-stat--danger { --stat-accent: #f87171; --stat-color: #b42318; --stat-soft: #fff1f2; }
.fcp-stat--warning { --stat-accent: #fbbf24; --stat-color: #b45309; --stat-soft: #fffbeb; }
.fcp-stat--info { --stat-accent: #60a5fa; --stat-color: #2563eb; --stat-soft: #eff6ff; }
.fcp-stat--gray { --stat-accent: #cbd5e1; --stat-color: #667085; --stat-soft: #f4f7fa; }
.fcp-stat__main { display: flex; align-items: center; gap: .75rem; }
.fcp-stat__icon { width: 2.4rem; height: 2.4rem; display: grid; place-items: center; border-radius: 9px; background: var(--stat-soft); color: var(--stat-color); flex-shrink: 0; }
.fcp-stat__icon .fi-icon { width: 1.25rem; height: 1.25rem; }
.fcp-stat__body { min-width: 0; flex: 1; }
.fcp-stat__label { font-size: .71rem; line-height: 1.45; color: var(--fcp-muted); }
.fcp-stat__value { font-size: 1.65rem; line-height: 1.2; letter-spacing: -.035em; font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.fcp-stat__arrow { width: .9rem; height: .9rem; color: #98a2b3; flex-shrink: 0; align-self: flex-start; }
.fcp-stat__description { margin-top: .6rem; color: #667085; font-size: .69rem; line-height: 1.5; }
a.fcp-stat { transition: border-color 150ms ease, box-shadow 150ms ease; }
a.fcp-stat:hover { border-color: #8bcbb3; box-shadow: 0 4px 16px #1426290d; }
.fi-page .fleet-eyebrow, .fi-page .fleet-pulse span { color: #526b65; }
.fi-page .fleet-pulse div { background: #f4faf7; border: 1px solid #d9e8e0; border-radius: 10px; backdrop-filter: none; }
.fi-page .fleet-hero h2 { font-size: 1.4rem; letter-spacing: -.03em; }
.fi-page .template-rc-hero h2 { font-size: 1.4rem !important; letter-spacing: -.03em; }
.fi-page .fleet-section-head { padding: 1rem 1.15rem; }
.fi-page .fleet-section-head h3 { font-size: .95rem; }
.fi-page .campaign-grid { gap: 1rem; padding: 1rem; }
.fi-page .campaign-card { background: #fff; }
.fi-page .campaign-version { color: #667085; overflow-wrap: anywhere; }
.fi-page .campaign-stat span { font-size: .7rem; }
.fi-page .ops-tab-btn { color: #475467; background: #f8fafb; border: 1px solid var(--fcp-line); border-radius: 8px; }
.fi-page .ops-tab-btn.active { color: #047857; background: #ecfdf5; border-color: #a7d9c6; }
.fi-page .ops-guide-hero h2 { font-size: 1.5rem !important; letter-spacing: -.03em; }
.fi-page .ops-guide-card-head h3 { font-size: 1rem; }
.fi-page :is(.ap-card,.ap-table-wrap,.ap-note) { border-radius: var(--fcp-radius); box-shadow: var(--fcp-shadow); }
.fi-page .ap-card small, .fi-page .ap-sub { color: #667085; }
.fi-page .ap-tab { border-radius: 8px; }
@media (min-width: 1024px) {
    .fi-topbar { padding-left: 0; }
    .fi-topbar-start { min-height: 4rem; width: var(--sidebar-width); margin-right: 1.5rem; padding-inline: .65rem; background: var(--fcp-sidebar); flex-shrink: 0; }
    .fi-topbar-start .fi-logo { content: url('/images/fcp-control-plane-logo-light.svg'); width: 11.5rem; max-width: 100%; height: auto; margin-left: 0; }
    .fi-topbar-start .fi-icon { color: #b3c6c8; }
    .fi-topbar-start .fi-topbar-collapse-sidebar-btn-ctn { order: 1; margin-left: auto; width: 1.4rem; }
    .fi-topbar-end { flex: 1; margin-left: 0; }
    .fi-topbar-end .fi-global-search-ctn { margin-right: auto; }
    .fcp-dashboard .fi-wi-stats-overview:first-child .fi-section-content > .fi-grid-col:last-child { grid-column: span 2; }
}
@media (max-width: 639px) {
    .fcp-stat { padding: .75rem; }
    .fcp-stat__main { gap: .45rem; }
    .fcp-stat__icon { width: 1.8rem; height: 1.8rem; }
    .fcp-stat__icon .fi-icon { width: 1rem; height: 1rem; }
    .fcp-stat__value { font-size: 1.25rem; }
    .fcp-stat__arrow { display: none; }
    .fi-page .fleet-pulse { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .fi-page .campaign-stats { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .fi-page .ops-guide-grid { grid-template-columns: minmax(0,1fr); }
}
