/* Shared interaction and layout rules for the tenant and platform consoles. */
:root{--muted:#556278;--good:#087856;--warn:#975500;--bad:#b4263d}
body{font-size:14px;line-height:1.5}
:where(button,a,input,select,textarea,summary,[tabindex]):focus-visible{outline:3px solid #755b00;outline-offset:3px}
button:disabled{cursor:not-allowed;opacity:.55;transform:none!important;box-shadow:none!important}
button,a.btn{min-height:40px}.btn{display:inline-flex;justify-content:center;align-items:center;gap:6px;font-size:13px;line-height:1.35;white-space:normal;max-width:100%;text-align:center}
input,select,textarea{font-size:14px;min-height:40px;min-width:0;max-width:100%}input[type=checkbox],input[type=radio]{width:20px;height:20px;min-height:20px;padding:0;margin:0 6px 0 0;vertical-align:middle;flex:none;accent-color:var(--brand)}
label{font-size:13px;line-height:1.5;min-width:0}input::placeholder,textarea::placeholder{color:#657186;opacity:1}textarea{resize:vertical}select[multiple]{min-height:100px}
h1,h2,h3,h4,p,small,code,strong,b{overflow-wrap:anywhere}h3{font-size:17px}h4{font-size:15px}p{line-height:1.55}small{font-size:12px}summary{cursor:pointer;padding:9px 0;font-size:13px}details>summary+*{margin-top:10px}
.card p,.card h3,.feature-card p,.template-option p,.quick-template span,.event p,.schedule-card p,.tenant-card p,.section-head p,.panel-head p{font-size:13px}.card h3,.schedule-card h4,.tenant-card h4{font-size:15px}.feature-card b,.template-option b,.quick-template b,.event b{font-size:14px}.stat span,.stat small,.progress-caption,.user small{font-size:12px}.badge{font-size:11px}.eyebrow{font-size:11px}.health{font-size:11px;overflow-wrap:anywhere;max-width:100%}.codebox{font-size:12px}.validation-item{font-size:13px}.toast{font-size:14px;max-width:min(440px,calc(100vw - 32px));overflow-wrap:anywhere}.toasts{max-width:calc(100vw - 32px)}
.shell{grid-template-columns:244px minmax(0,1fr)}.workspace,.panel,.card,.split>*,.dashboard-grid>*,.fields-2>*,.fields-3>*,.card-head>*,.card-actions>*,.orders-two-column>*{min-width:0}.dashboard-grid{grid-template-columns:minmax(0,1.5fr) minmax(0,.8fr)}.fields-2{grid-template-columns:repeat(2,minmax(0,1fr))}.fields-3{grid-template-columns:repeat(3,minmax(0,1fr))}
.topbar{height:auto;min-height:96px;padding:18px 0;gap:20px;flex-wrap:wrap}.topbar>div:first-child{min-width:0;flex:1 1 240px}.top-actions{flex-wrap:wrap;justify-content:flex-end;min-width:0}.topbar h1{font-size:26px}.section-head,.panel-head,.page-head{flex-wrap:wrap;align-items:center}.page-head{display:flex;justify-content:space-between;gap:16px}.section-head>*,.panel-head>*{min-width:0}.card-actions{align-items:center;gap:8px}.card-head{flex-wrap:wrap}.card-head>div{flex:1 1 150px}.schedule-card,.tenant-card,.mini-card{flex-wrap:wrap;gap:12px}.schedule-card>div:first-child,.tenant-card>div:first-child{flex:1 1 200px}.inline-actions{flex-wrap:wrap}.inline-actions select{min-width:0;flex:1 1 200px;width:auto}.inline-actions .btn{flex-shrink:0}
.panel>h3,.panel>p,.panel>.section-head{margin-left:20px;margin-right:20px}.panel>.feature-grid,.panel>.stack{padding:0 20px 20px}.form-panel>h3,.form-panel>p,.filter-panel>p{margin-left:0;margin-right:0}#teamMembers{padding:20px}#teamMembers>h3,#teamMembers>p{margin-left:0;margin-right:0}#teamMembers>.stack{padding:0}
.table-wrap,.table-panel{overflow:auto;max-width:100%;overscroll-behavior-x:contain}table{font-size:13px}th{font-size:11px;color:#526176;letter-spacing:.04em}td{font-size:13px;overflow-wrap:anywhere}td small,.mini-card small{font-size:12px}.drawer table,.catalog-details{min-width:0}.drawer-body>table{display:block;overflow-x:auto}.catalog-details td table{table-layout:fixed}.table-wrap:focus-visible{outline-offset:-3px}.numeric{font-variant-numeric:tabular-nums;white-space:nowrap}
.modal{padding:16px}.modal-card{max-width:100%;max-height:calc(100dvh - 32px);overscroll-behavior:contain}.modal-title,.wizard-head,.drawer-head{padding-right:66px}.close{width:40px;height:40px;min-height:40px;z-index:3}.drawer-head h2{font-size:22px}.drawer-head{gap:14px}.drawer-body{overflow-x:auto}.wizard-head{align-items:center;gap:16px;flex-wrap:wrap}.wizard-head h2{font-size:21px}.wizard-step-dot{width:30px;height:30px;font-size:12px}.wizard-body{min-height:0}.wizard-footer{gap:12px;align-items:center;flex-wrap:wrap}.wizard-footer>div{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}.flow-wizard{max-width:100%;height:min(860px,calc(100dvh - 32px))}.modal-open{overflow:hidden}.order-dialog{max-width:calc(100vw - 24px)}.dialog-head{gap:16px}.dialog-content{min-width:0}.dialog-content table{min-width:600px}.kv-grid{grid-template-columns:minmax(85px,120px) minmax(0,1fr)}
.nav-toggle{display:none}.sidebar nav button,.sidebar nav a,.sidebar-bottom button{font-size:13px;min-height:40px}.sidebar-bottom{gap:8px}.sidebar-bottom .user{min-width:0}.sidebar .tenant-box label{font-size:10px}.sidebar .tenant-box{min-width:0}.sidebar nav{min-height:0}.sidebar nav button{flex-shrink:0}.skip-link{position:fixed;left:12px;top:-100px;background:#fff;color:#3428a0;padding:12px;z-index:200}.skip-link:focus{top:12px}
.filter-panel{padding:18px;margin-bottom:18px}.filter-panel details{margin-top:10px}.pagination{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:20px 0}.artifact-run{overflow:hidden}.artifact-run>summary{display:flex;align-items:center;gap:16px;padding:16px 20px;list-style:none;background:#fafbff;border-bottom:1px solid var(--line)}.artifact-run>summary:before{content:'▸';font-size:17px;color:var(--brand)}.artifact-run[open]>summary:before{content:'▾'}.artifact-run>summary>span:first-child{flex:1;min-width:0}.artifact-run summary strong{display:block;font-size:16px}.artifact-run summary small{display:block;color:var(--muted);margin-top:4px}.artifact-run-actions{padding:12px 20px;display:flex;gap:8px;flex-wrap:wrap}.artifact-table{min-width:650px;table-layout:fixed}.artifact-table th:first-child{width:38%}.artifact-table td{vertical-align:top}.artifact-table td>small,.artifact-table td>.link{display:block}.artifact-table .link{padding:8px 0;text-align:left;min-height:40px}.artifact-name{display:block;font-size:14px;overflow-wrap:anywhere}.artifact-metadata summary{font-size:12px;color:#5143ba}.artifact-metadata dl{margin:0;font-size:12px}.artifact-metadata dt{font-weight:700}.artifact-metadata dd{margin:0 0 8px;overflow-wrap:anywhere}#artifactStatus{min-height:24px;color:var(--muted)}
#catalogGroupForm{padding:16px;background:#fff;border:1px solid var(--line);border-radius:12px;margin:16px 0;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto;align-items:end}#catalogGroupForm>label{display:block}#catalogGroupForm>[role=status]{grid-column:1/-1}.catalog-product-cell{display:flex;align-items:center;gap:8px}.catalog-product-cell .btn{justify-content:flex-start;text-align:left}.catalog-tabs{gap:8px}.catalog-tabs .btn{font-weight:600}.catalog-reset{align-items:flex-start}.catalog-typed-row{min-width:0}.catalog-tabs [role=tab]{min-height:40px}
@media(max-width:1150px){.dashboard-grid{grid-template-columns:minmax(0,1fr)}.split{grid-template-columns:minmax(0,1fr)}.sticky{position:static}.feature-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.orders-two-column{grid-template-columns:minmax(0,1fr)}}
@media(max-width:900px){.shell{display:block}.sidebar{position:static;display:grid;grid-template-columns:auto minmax(0,1fr);width:100%;height:auto;overflow:visible;padding:12px 16px;gap:12px}.nav-toggle{display:inline-flex;background:#292b45;color:#fff;border-color:#555a78;grid-column:1;grid-row:1}.sidebar .logo{padding:0;justify-self:end}.sidebar .tenant-box{grid-column:1/-1;margin:0}.sidebar nav{display:none;grid-column:1/-1;flex-direction:column;overflow:visible}.sidebar.nav-open nav{display:flex}.sidebar-bottom{display:flex;grid-column:1/-1;margin:0;padding-top:8px}.sidebar-bottom .user b{font-size:12px}.workspace{padding:0 16px 36px}.topbar{margin-bottom:18px}.top-actions{justify-content:flex-start}.top-actions .btn.ghost{display:inline-flex}.artifact-table{min-width:620px}}
@media(max-width:650px){.topbar h1{font-size:23px}.topbar{gap:12px}.top-actions{width:100%}.health{flex-basis:100%;width:fit-content;border:0;padding:0;background:none}.fields-2,.fields-3,.dynamic-form,.cards-grid,.feature-grid,.template-grid,.strategy-grid,.review,.command-grid{grid-template-columns:minmax(0,1fr)}.stats-grid{gap:10px}.stat{padding:13px}.modal{padding:8px}.modal-card{padding:18px;max-height:calc(100dvh - 16px)}.flow-wizard{padding:0;height:calc(100dvh - 16px)}.wizard-head{padding:16px 60px 12px 16px}.wizard-body{padding:16px}.wizard-footer{padding:12px}.wizard-footer>div{flex:1 1 100%;justify-content:stretch}.wizard-footer>div .btn{flex:1 1 140px}.wizard-steps{display:flex;flex-wrap:wrap}.wizard-step-dot{width:26px;height:26px}.drawer{width:100vw;max-width:100vw}.drawer-head,.drawer-body{padding:16px}.drawer-head{padding-right:64px}.btn{min-height:44px}.close{min-height:40px}.toasts{bottom:12px;right:12px}.form-panel{padding:16px}.rule-row,.mapping-row{grid-template-columns:minmax(0,1fr)}.public-head{height:auto;min-height:78px;padding:12px 16px;gap:12px;flex-wrap:wrap}.public-head>div:last-child{flex-wrap:wrap}.hero-actions{flex-wrap:wrap}#catalogGroupForm{grid-template-columns:minmax(0,1fr)}.artifact-run>summary{padding:14px;gap:10px;flex-wrap:wrap}.artifact-run-actions{padding:12px 14px}.artifact-run summary strong{font-size:15px}.kv-grid{grid-template-columns:minmax(0,1fr)}.dialog-head{flex-wrap:wrap}.dialog-content{padding:14px}.order-dialog{width:calc(100vw - 16px);max-width:calc(100vw - 16px)}.filter-panel{padding:14px}.filter-panel .fields-3{gap:12px}.panel>h3,.panel>p,.panel>.section-head{margin-left:16px;margin-right:16px}.panel>.feature-grid{padding:0 16px 16px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition:none!important;animation:none!important}}

[hidden]{display:none!important}

.more-btn,dialog .icon-btn{min-width:40px;min-height:40px}

/* Orders use the same metric cards as the dashboard. */
.stat-card{background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:16px;min-width:0}
.stat-card>span,.stat-card>small{display:block;color:var(--muted);font-size:12px;overflow-wrap:anywhere}.stat-card>strong{display:block;font-size:27px;margin:4px 0}.order-stats{margin:18px 0;grid-template-columns:repeat(4,minmax(0,1fr))}
.skip-link:not(:focus){visibility:hidden}
.vf-help-question.vf-help-button{min-height:24px}
@media(max-width:900px){.order-stats{grid-template-columns:repeat(2,minmax(0,1fr))}}

.auth-tabs{margin-right:42px}.auth-form small{font-size:12px}

/* Per-destination product fields. Every editor wraps within its own card. */
.product-export{margin-top:20px;padding:16px;border:1px solid var(--border,#dce3eb);border-radius:12px;min-width:0}
.export-presets{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0}.export-field-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;align-items:start}
.export-field{border:1px solid var(--border,#dce3eb);border-radius:8px;padding:10px;min-width:0}.export-field summary{cursor:pointer}.export-field summary label{display:inline-flex;align-items:center;gap:8px;margin:0}.export-field input[type=checkbox]{width:18px;height:18px;flex:none}
.export-operation{display:grid;gap:10px;margin-top:12px}.export-part{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto;gap:6px;align-items:end;margin-bottom:8px}.export-part label,.export-operation label{min-width:0}.product-export select,.product-export input:not([type=checkbox]){width:100%;min-width:0;max-width:100%;box-sizing:border-box}.product-export [hidden]{display:none!important}.export-preview{margin-top:14px;overflow-wrap:anywhere}.export-preview summary{cursor:pointer}
@media(max-width:700px){.export-field-list{grid-template-columns:1fr}.product-export{padding:10px}.export-part{grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto}.export-presets .btn{white-space:normal}}

/* Readable persisted results, including failed and cancelled runs. */
.run-summary{border-top:4px solid #16785d}.run-summary-error{border-top-color:#c33737}
.run-summary h4{margin:22px 0 10px}.run-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:0 0 16px}
.run-metric{min-width:0;padding:14px;border:1px solid #dce3ed;border-radius:10px;background:#f8fafc}
.run-metric dt{font-size:13px;color:#526179;overflow-wrap:anywhere}.run-metric dd{margin:6px 0 0;font-size:26px;font-weight:700;color:#172d49}
.run-metric small{display:block;margin-top:5px;color:#526179;font-size:11px;line-height:1.4}.run-summary .validation-item{overflow-wrap:anywhere}
@media(max-width:600px){.run-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.run-metric{padding:10px}.run-metric dd{font-size:23px}}
