/* Shared administration components, aligned with the supplied AdvertCore design. */
:root{--space-1:4px;--space-2:8px;--space-3:12px;--space-4:16px;--space-5:20px;--space-6:24px;--radius:8px;--muted:#5b6b85;--line:#e3e8ef;line-height:1.5}
.shell{font-size:14px}.sidebar{padding:20px 14px;overflow-y:auto;overscroll-behavior:contain}.sidebar .brand{padding:0 10px 20px;gap:10px}.brand .logo{width:30px;height:30px;border-radius:8px}.brand b{font-size:15px;font-weight:650}.brand small{font-size:11.5px}.nav-separator{margin:12px 10px 9px;font-size:10px}.nav{gap:2px}.nav a{font-size:13px;min-height:36px;padding:8px 10px;gap:10px}.nav .icon{width:17px;height:17px}.sidebar-foot{padding-top:24px;font-size:11.5px;line-height:1.6}
.topbar{height:56px;padding:0 24px;gap:12px}.topbar input{height:36px;max-width:460px;font-size:13px}.topbar .btn{height:32px}.topbar>.badge{font-size:11px}.global-results{top:49px;left:24px;box-shadow:0 12px 32px #0f1f3d24}.content{max-width:1440px;padding:20px 24px 48px}.breadcrumb{font-size:12px;color:#6b7a93;margin-bottom:8px}.pagehead{margin-bottom:20px;gap:16px;align-items:flex-start}.pagehead>div:first-child{min-width:0}.pagehead h1{font-size:22px;font-weight:650;line-height:1.2;letter-spacing:-.01em;margin:0 0 6px;overflow-wrap:anywhere}.pagehead p{font-size:12.5px;line-height:1.6;max-width:650px}.pagehead-actions,.pagehead .actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap;flex:none;max-width:65%}.pagehead-actions .btn{margin:0}
.btn{height:36px;padding:0 13px;font-size:12.5px;font-weight:600;line-height:1.2;border-radius:8px}.btn.primary{background:#1f5bd8;border-color:#1f5bd8}.btn.primary:hover{background:#1a4cb5}.btn.danger{background:white}.btn.danger:hover{background:#fff5f4}.btn:focus-visible{outline:2px solid #1f5bd8;outline-offset:3px}.btn:disabled{opacity:.5}.btn svg{width:16px;height:16px}.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
input:not([type=checkbox]):not([type=radio]),select{min-height:36px;height:36px;padding:0 10px;font-size:13px;border-radius:8px}input[type=color]{padding:4px!important}input[type=file]{height:auto!important;padding:8px!important}textarea{font-size:13px;line-height:1.6;padding:9px 10px;border-radius:8px}.field{gap:5px!important}.field>span{font-size:12px}.field small{font-size:11.5px;line-height:1.6;color:#5b6b85}.field:has(input:required)>span:after,.field:has(select:required)>span:after{content:' *';color:#b42318}.formgrid{gap:16px 20px}.checklist{gap:8px 14px;padding:12px;max-height:220px;overflow:auto;background:#fcfdff}.checklist label{font-size:12.5px;line-height:1.5;min-height:24px}.toggle{font-size:12.5px}.formbody h3{font-size:13.5px;margin:8px 0 14px}.formbody .formgrid+h3{padding-top:20px;border-top:1px solid var(--line)}
.card{border-radius:12px;box-shadow:none}.card-head{min-height:52px;padding:14px 18px;gap:12px}.card-head h2{font-size:15px;line-height:1.4}.card-head>a,.card-head>span{font-size:12px}.padded{padding:18px}.content>.card,.content>section{margin-bottom:20px}.grid{gap:20px;margin-bottom:20px}.metrics{gap:16px;margin-bottom:20px}.metric{padding:16px 18px}.metric .label{font-size:12px;line-height:1.5;gap:10px}.metric .label .icon{width:16px;height:16px;color:#6b7a93}.metric .value{font-size:22px;line-height:1.25;font-weight:650;letter-spacing:-.02em;margin:12px 0 6px}.metric small{font-size:11.5px;line-height:1.5;display:block}.statusitem{padding:14px 18px}.statusitem strong{font-size:12.5px}.statusitem small{font-size:11.5px;line-height:1.5}
.badge{font-size:11.5px;line-height:18px;font-weight:550;padding:2px 8px;border-radius:6px;gap:6px}.badge:before{width:6px;height:6px}.badge.muted{color:#53627a;background:#f1f4f8;border-color:#e0e5ed}.badge.plan{color:#5a3fb0;background:#efeafc;border-color:#d4c9f4}.badge.source-self{color:#1f5bd8;background:#eaf1fd;border-color:#c6d7f8}.badge.source-direct{color:#7345b0;background:#f1eafb;border-color:#dbcaef}.badge.source-affiliate{color:#08786d;background:#e2f4f0;border-color:#afe0d5}.badge.source-adsense{color:#9e5805;background:#fff1db;border-color:#f2d39d}
.toolbar{min-height:58px;padding:12px 16px;gap:8px;flex-wrap:wrap;background:white}.toolbar input[type=search]{width:240px;max-width:330px;flex:1;min-width:140px}.toolbar select{height:34px;min-height:34px;font-size:12px;max-width:200px}.toolbar .btn{height:30px;padding:0 11px;font-size:12px}.toolbar .small{font-size:12px}.list-filter-note{display:flex;gap:6px;align-items:center;color:#6b7a93;font-size:12px}.tablewrap table{font-size:13px}.tablewrap th{font-size:12px;letter-spacing:0;font-weight:600;color:#4a5670;background:#f8fafc;padding:11px 16px;line-height:1.5}.tablewrap td{height:46px;padding:10px 16px;line-height:1.5}.tablewrap td small{font-size:11.5px;line-height:1.4;margin-top:3px}.tablewrap td .btn{height:30px;font-size:12px;padding:0 10px}.tablewrap tbody tr:hover{background:#f6f9fe}.tablewrap tr.is-selected{background:#f1f6ff}.tablewrap td.num,.tablewrap th.num{text-align:right}.tablewrap th:first-child:has(+th .sort-button),.tablewrap td:first-child:has([data-row-id]){width:40px;min-width:40px;padding-right:8px}.tablewrap td:last-child:has(button){text-align:right;white-space:nowrap}.object-link{font-weight:600}.table-description{max-width:360px;white-space:normal;font-size:12px;color:#5b6b85}.topic-text{display:block;color:#3c4a63;font-size:12px;max-width:360px}.sort-button{padding:0;border:0;background:none;color:inherit;font:inherit;display:inline-flex;align-items:center;gap:6px;white-space:nowrap}.sort-button span{font-size:10px;color:#6b7a93}.pagination{border-top:1px solid var(--line);border-bottom:0;min-height:58px}.pagination-summary{font-size:12px;color:#5b6b85}.pagination-controls{display:flex;gap:8px;align-items:center;margin-left:auto;font-size:12px}.selection-summary{color:#1f5bd8;font-size:12px;min-width:44px}.select-page{display:flex;align-items:center;gap:7px;font-size:12px;color:#5b6b85;white-space:nowrap}
.empty{padding:40px 20px;display:flex;align-items:center;justify-content:center;gap:5px;flex-direction:column;font-size:12.5px;line-height:1.6}.empty strong{font-size:13px;font-weight:550;color:#3c4a63}.empty-symbol{display:grid;place-items:center;width:38px;height:38px;border:1px solid #e3e8ef;border-radius:10px;background:#f8fafc;color:#7b8aa3;margin-bottom:7px}.empty-symbol .icon{width:20px;height:20px}.empty .btn{margin-top:10px}
.tabs{gap:24px;margin-bottom:20px;border-bottom:1px solid var(--line);scrollbar-width:thin}.tabs a{font-size:12.5px;min-height:42px;padding:11px 0}.tabs a:hover{text-decoration:none;color:#1f5bd8}.tabs a.active{font-weight:600}.details{gap:0 24px}.details>div{font-size:12.5px;padding:11px 0;grid-template-columns:135px minmax(0,1fr)}.details dt{color:#5b6b85}.details dd{font-weight:500}.alert{font-size:12.5px;padding:12px 16px;margin-bottom:16px}.alert p{margin:6px 0}.trace{padding:12px 16px;background:#fafbfd;border-radius:0 8px 8px 0}pre{padding:14px 16px;line-height:1.65;font-size:12px;background:#f6f8fb}.padded h3:not(:first-child){margin-top:22px}.padded>p{font-size:13px;line-height:1.6}.padded>.btn{margin-right:6px;margin-bottom:8px}
.setup-panel{border:1px solid #d5e0f3;border-radius:12px;background:#f8faff;overflow:hidden}.setup-title{display:flex;align-items:center;gap:12px;padding:15px 18px;border-bottom:1px solid #e1e9f6}.setup-title strong{display:block;font-size:13px;font-weight:600}.setup-title small{display:block;font-size:12px;color:#5b6b85;margin-top:2px}.setup-icon{width:32px;height:32px;display:grid;place-items:center;background:#e8effd;color:#1f5bd8;border-radius:8px;flex:none}.setup-steps{display:grid;grid-template-columns:repeat(4,1fr)}.setup-steps a{padding:13px 18px;font-size:12px;color:#3c4a63;border-right:1px solid #e1e9f6}.setup-steps a:last-child{border:0}.setup-steps a:hover{background:#edf3ff;text-decoration:none}.setup-steps b{font-size:17px;font-weight:650;color:#0f1f3d;margin-right:4px}.setup-steps span{display:block;font-size:11.5px;color:#6b7a93;margin-top:1px}
dialog{width:min(820px,calc(100vw - 40px));max-height:90dvh;box-shadow:0 24px 60px #0f1f3d4d}dialog>form{margin:0}dialog header{padding:17px 20px;background:white;position:sticky;top:0;z-index:2}dialog header h2{font-size:17px;line-height:1.4}dialog header .btn{height:30px;width:30px;padding:0}dialog .formbody{padding:20px}dialog .form-actions{padding:14px 20px;gap:8px;z-index:2}dialog .form-actions .btn{height:36px}.wizard-steps{padding:16px 20px;gap:10px;background:#fafbfd}.wizard-steps b{height:22px;width:22px;font-size:11px}.wizard-steps span{font-size:10.5px;gap:5px}.wizard-steps .done b{background:#eaf1fd;color:#1f5bd8}.form-actions .btn.primary{margin-left:auto}.form-actions .btn:first-child:last-child{margin-left:0}.creative-variants figure{padding:14px;background:#f8fafc}.adpreview{margin:0 auto}.toast{font-size:13px;padding:13px 16px;max-width:380px}
@media(min-width:900px) and (max-height:800px){.sidebar{padding-top:16px;padding-bottom:16px}.sidebar .brand{padding-bottom:12px}.nav a{min-height:33px;padding-top:6px;padding-bottom:6px}.sidebar-foot{padding-top:14px}}
@media(max-width:1100px){.pagehead-actions,.pagehead .actions{max-width:58%}.topbar{padding:0 20px}.content{padding:20px 20px 40px}}
@media(max-width:899px){.topbar{padding:0 14px;gap:8px}.topbar input{min-width:50px;height:34px}.topbar .btn{height:32px;padding:0 10px}.content{padding:18px 14px 36px}.pagehead{flex-wrap:wrap;gap:12px}.pagehead h1{font-size:22px}.pagehead-actions,.pagehead .actions{max-width:100%;width:100%;justify-content:flex-start}.sidebar.open{display:flex}.global-results{left:14px}.details{grid-template-columns:1fr}.metrics{gap:10px}.metric{padding:14px}.setup-steps{grid-template-columns:repeat(2,1fr)}.setup-steps a:nth-child(2){border-right:0}.setup-steps a:nth-child(-n+2){border-bottom:1px solid #e1e9f6}.setup-title{align-items:flex-start}.sidebar-foot{padding-bottom:14px}}
@media(max-width:699px){.tablewrap{overflow:visible}.tablewrap table,.tablewrap tbody{display:block;width:100%}.tablewrap thead{display:none}.tablewrap tbody tr{display:block;padding:12px 16px;border-bottom:1px solid var(--line)}.tablewrap tbody td{display:grid;grid-template-columns:100px minmax(0,1fr);gap:12px;align-items:center;height:auto;min-height:30px;border:0;padding:6px 0;font-size:12.5px;text-align:left!important;white-space:normal!important;overflow-wrap:anywhere}.tablewrap tbody td:before{content:attr(data-label);font-size:11.5px;color:#5b6b85}.tablewrap tbody td:has([data-row-id]){min-width:0;width:auto}.tablewrap tbody td[colspan]{display:block}.tablewrap tbody td[colspan]:before{display:none}.table-description,.topic-text{max-width:100%}.toolbar input[type=search]{min-width:120px;max-width:none}.toolbar select{max-width:100%;flex:1}.pagination-controls{flex-wrap:wrap;justify-content:flex-end}.pagination-summary{width:100%}.tabs{gap:20px}.metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.metric .value{font-size:21px}.metric .label{font-size:11.5px}.metric small{font-size:11px}.card-head{padding:14px 16px}.padded{padding:16px}dialog{width:calc(100vw - 20px);max-height:94dvh;border-radius:12px}dialog .formbody{padding:16px}dialog header{padding:15px 16px}dialog .form-actions{padding:12px 16px;flex-wrap:wrap}.wizard-steps{grid-template-columns:repeat(3,1fr);padding:14px 16px}.checklist{max-height:190px}.formgrid{gap:15px}.setup-title small{font-size:11.5px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}

.menu-backdrop{display:none}@media(max-width:899px){.sidebar.open~.menu-backdrop{display:block;position:fixed;inset:0;border:0;background:#0f1f3d59;z-index:9;cursor:pointer}.sidebar.open{box-shadow:none;z-index:10}body.menu-open{overflow:hidden}}

.list-card{scroll-margin-top:76px}.tablewrap td{padding-top:8px;padding-bottom:8px}.tablewrap td>input[type=checkbox]{width:16px;height:16px;min-width:16px;justify-self:start;padding:0;margin:0;accent-color:#1f5bd8}@media(max-width:699px){.tablewrap tbody td{padding:6px 0}.tablewrap tbody td>.badge{justify-self:start}.tablewrap tbody td>small{grid-column:2}}

/* User preference: use the entire workspace, including large desktop monitors. */
.content{width:100%;max-width:none;margin:0;padding:20px 24px 40px}.report-filters{grid-template-columns:repeat(4,minmax(140px,1fr));align-items:end}.report-filter-actions{grid-column:1/-1;display:flex;gap:8px;align-items:center;flex-wrap:wrap}.report-period{font-size:12.5px;color:#5b6b85;margin:0 0 16px;line-height:1.7}.period-presets{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:16px}.period-presets .btn{height:30px;padding:0 12px;font-size:12px}.report-filter-actions .btn{margin:0}.report-comparison-note{font-size:12px;color:#5b6b85}.comparison-empty{font-size:12.5px;color:#5b6b85;padding:12px 16px;background:#f8fafc;border:1px solid #e3e8ef;border-radius:8px;margin-bottom:16px}@media(max-width:1100px){.report-filters{grid-template-columns:repeat(3,minmax(140px,1fr))}}@media(max-width:899px){.content{padding:18px 14px 36px}.report-filters{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:599px){.report-filters{grid-template-columns:1fr}}

[hidden]{display:none!important}

/* 0.4.6: shared lifecycle list views */
.list-scopes{display:flex;gap:4px;padding:14px 18px 0;border-bottom:1px solid var(--line,#e2e8f0);flex-wrap:wrap}
.scope-tab{border:0;border-bottom:2px solid transparent;background:transparent;color:#64748b;font:inherit;font-weight:600;padding:9px 12px;display:inline-flex;align-items:center;gap:8px;cursor:pointer}
.scope-tab.selected{color:#1f5bd8;border-bottom-color:#1f5bd8}
.scope-tab span{font-size:11px;background:#eef2f8;color:#475569;border-radius:10px;padding:1px 7px}
.scope-tab.selected span{background:#e7eeff;color:#1f5bd8}
.scope-tab:focus-visible{outline:2px solid #1f5bd8;outline-offset:2px}
.list-empty-help{margin:16px 18px 0;color:#64748b;font-size:13px}
.padded>.list-scopes{padding-left:0;padding-top:0;margin-bottom:16px}
@media(max-width:699px){.list-scopes{padding:10px 12px 0}.scope-tab{padding:9px 10px}.list-empty-help{margin:14px 12px 0}}

/* 0.4.7: website inventory controls */
.site-filters{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;padding:0 16px 16px;border-bottom:1px solid var(--line)}
.site-filters label{display:grid;gap:6px;min-width:0;font-size:12px;color:#5b6b85}.site-filters select{width:100%;min-width:0}
.site-filter-buttons{grid-column:1/-1;display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap}
.site-selection{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:12px 16px;background:#eef4ff;border-bottom:1px solid #cadbfa}.site-selection select{width:auto;max-width:200px}.site-selection .selection-summary{font-weight:650;color:#1f5bd8;margin-right:8px}.column-choice{display:flex;align-items:center;gap:10px;padding:9px 0}
@media(max-width:899px){.site-filters{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:499px){.site-filters{grid-template-columns:1fr}.site-selection>.btn{flex:1 1 130px}.site-selection select{width:100%;max-width:none}}

.site-filter-panel>summary{cursor:pointer;padding:12px 16px;font-size:13px;font-weight:600;color:#1f5bd8;border-bottom:1px solid var(--line)}
@media(min-width:900px){.site-filter-panel>summary{display:none}}
@media(max-width:899px){.site-filter-panel[open]>.site-filters{padding-top:14px}}

/* 0.4.8: creative editor */
dialog.creative-editor{width:min(1200px,96vw);max-width:1200px}.creative-editor .formbody{padding:20px}.creative-editor-layout{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);gap:24px;border:1px solid #bdd0f7;border-radius:10px;padding:18px}.creative-fields,.creative-inspector{min-width:0}.creative-inspector{align-self:start;position:sticky;top:0}.creative-inspector>h3{margin-top:0}.creative-type-buttons,.creative-switches{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:12px}.creative-type-buttons button,.creative-switches button{font:inherit;font-size:12px;border:1px solid #d7e1f0;background:white;color:#28405e;border-radius:7px;min-height:34px;padding:7px 10px}.creative-type-buttons [aria-pressed=true],.creative-switches [aria-pressed=true]{background:#1f5bd8;color:white;border-color:#1f5bd8}.creative-type-buttons button:disabled{opacity:.5;cursor:not-allowed}.creative-host{border:1px solid #dce4ee;border-radius:8px;padding:18px;min-height:180px;overflow:auto}.creative-host.light{background:#f7f9fc;color:#24344b}.creative-host.dark{background:#182438;color:#eef4ff}.creative-viewport{max-width:100%;margin:auto}.creative-host[data-device=mobile] .creative-viewport{width:360px}.creative-host[data-device=desktop] .creative-viewport{width:100%}.creative-card{color:white;border-radius:8px;padding:20px;overflow-wrap:anywhere}.creative-card h3{font-size:20px;margin:8px 0}.creative-card p{font-size:14px}.creative-card>span{display:inline-block;background:white;color:#173052;border-radius:6px;padding:8px 12px;font-weight:600}.creative-banner{display:block;max-width:100%;height:auto}.creative-host pre{white-space:pre-wrap;word-break:break-word;max-height:260px}.creative-missing{color:#a12e28;background:#fff2f1;border-radius:6px;padding:12px}.creative-quality{font-size:13px;line-height:1.6}.creative-quality ul{padding-left:18px}.creative-quality button{border:0;padding:2px 0;background:none;text-align:left;color:#ad3028;font:inherit;text-decoration:underline}.creative-editor [aria-invalid=true]{border-color:#d58d87}.creative-drop{display:block;border:2px dashed #bdd0f7;padding:16px;border-radius:8px;margin-top:16px}.creative-drop.dragging{border-color:#1f5bd8;background:#eaf1fd}.creative-drop>small{display:block;margin-top:8px}.creative-variant{padding:12px 0;border-top:1px solid #dce4ee;margin-top:12px}.creative-variant>div{display:flex;gap:8px;justify-content:space-between;font-size:12px;margin-bottom:8px}.creative-variant>label{font-size:12px;display:grid;gap:6px}.creative-variant>button,[data-clear-upload-errors]{margin-top:8px;border:1px solid #d7e1f0;background:white;border-radius:6px;padding:6px 10px;color:#9a302a}.creative-upload-errors{padding-left:18px;color:#9a302a;font-size:12px}.creative-editor .formbody h3{scroll-margin-top:12px}
@media(max-width:899px){.creative-editor-layout{grid-template-columns:1fr;padding:12px;gap:18px}.creative-inspector{position:static}.creative-editor .formbody{padding:12px}.creative-host{padding:12px}.creative-type-buttons button{flex:1 1 120px}}

.creative-drop{grid-column:1/-1}.creative-mobile-preview{display:none!important}
@media(max-width:899px){.creative-mobile-preview{display:inline-flex!important}.creative-inspector>.creative-mobile-preview{margin-bottom:14px}.creative-editor .form-actions{padding:12px;gap:6px}}

/* 0.4.9: campaign creative cards and relationship management */
.campaign-creative-section{min-width:0}.campaign-creative-toolbar,.campaign-preview-controls{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:14px;align-items:center}.campaign-creative-toolbar .btn{height:34px;min-height:34px}.campaign-preview-controls{justify-content:space-between}.campaign-preview-controls .creative-switches{margin:0}.campaign-creative-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-top:16px}.campaign-creative-card{min-width:0;overflow:hidden}.campaign-creative-card>header{display:flex;align-items:center;justify-content:space-between;padding:16px;gap:12px}.campaign-creative-card h3{font-size:14px;margin:0}.campaign-creative-card .creative-host{margin:0 16px;min-height:160px;max-height:360px}.campaign-creative-meta{padding:12px 16px 16px}.campaign-creative-meta p{font-size:12px;color:#5b6b85;overflow-wrap:anywhere}.campaign-creative-meta .btn{margin:4px 6px 0 0}.campaign-ad{padding:18px;border-radius:8px;color:white;overflow-wrap:anywhere}.campaign-ad h3{font-size:20px;margin:8px 0}.campaign-ad span{background:white;color:#173052;padding:7px 10px;border-radius:6px;display:inline-block}
@media(max-width:899px){.campaign-creative-grid{grid-template-columns:1fr}.campaign-creative-toolbar>.btn{flex:1 1 140px}}

.campaign-creative-card .creative-host.dark .muted{color:#bbc9dc}

.lifecycle-list{padding:12px 14px;margin:12px 0;border:1px solid #dce5ef;border-radius:8px}.lifecycle-list ul{padding-left:18px;margin:0;font-size:13px;line-height:1.7}.lifecycle-list h3{margin:0 0 6px}.lifecycle-list.kept{background:#f0faf4;border-color:#bee3ce}.lifecycle-list.affected{background:#f7f9fc}

dialog.lifecycle-dialog{width:min(560px,calc(100vw - 32px))}

dialog.lifecycle-dialog .btn.lifecycle-destructive{background:#b42318;border-color:#b42318;color:white}dialog.lifecycle-dialog .btn.lifecycle-destructive:hover{background:#942019}
