/* Shared layout and semantic palette for the agency, access and client desks. */
:root {
  --bento-action:var(--primary);
  --bento-action-hover:var(--primary-deep);
  --bento-on-action:#fff;
  --bento-night:#153b62;
  --bento-photo-bed:#dce4ee;
  --bento-card-radius:14px;
  --bento-control-radius:8px;
  --bento-gap:12px;
  --bento-rail:210px;
  --bento-elevation:0 2px 8px #18324d08;
}

[data-theme="dark"] {
  --bento-on-action:var(--bg);
  --bento-night:var(--surface);
  --bento-photo-bed:#151e2b;
  --bento-elevation:0 2px 8px #0002;
}

:is(.bento-agency,.bento-client,.bento-access) {
  background:var(--bg);
  color:var(--text);
  font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}
:is(.bento-agency,.bento-client,.bento-access) :is(button,input,select,textarea) { font-family:inherit; }
:is(.bento-agency,.bento-client,.bento-access) :focus-visible { outline:2px solid var(--primary); outline-offset:3px; }
:is(.bento-agency,.bento-client,.bento-access) :is(.btn,.viewer-btn,.input,.theme-toggle,.access-form-wrap input,.access-submit) { border-radius:var(--bento-control-radius); }
:is(.bento-agency,.bento-client,.bento-access) :is(.btn-primary,.btn-accent,.access-submit) {
  background:var(--bento-action);
  border-color:var(--bento-action);
  color:var(--bento-on-action);
  box-shadow:none;
}
:is(.bento-agency,.bento-client,.bento-access) :is(.btn-primary,.btn-accent,.access-submit):hover:not(:disabled) {
  background:var(--bento-action-hover);
  border-color:var(--bento-action-hover);
  color:var(--bento-on-action);
}
:is(.bento-agency,.bento-client) .btn-secondary { background:var(--surface); color:var(--text); border-color:var(--border); box-shadow:none; }
:is(.bento-agency,.bento-client,.bento-access) :is(.input,select,textarea,input[type="search"],input[type="text"],input[type="password"]) {
  border-color:var(--border);
  color:var(--text);
  background-color:var(--surface-alt);
  accent-color:var(--primary);
}
:is(.bento-agency,.bento-client,.bento-access) :is(input[type="checkbox"],input[type="radio"],input[type="range"],progress) { accent-color:var(--primary); }
:is(.bento-agency,.bento-client) :is(.card,.app-dialog,.app-settings-dialog,.inventory-dialog.is-embedded,.work-tool-dialog,.admin-dialog,.admin-edit-dialog,.client-surface,.client-photo-card,.hub-photo-dialog,.client-photo-dialog,.price-table-dialog,.metadata-dialog) {
  border-color:var(--border);
  border-radius:var(--bento-card-radius);
  box-shadow:var(--bento-elevation);
}
:is(.bento-agency,.bento-client) :is(dialog,.zac-modal,.zac-modal-panel) { color:var(--text); }
:is(.bento-agency,.bento-client) dialog::backdrop { background:#101d3086; }
:is(.bento-agency,.bento-client) :is(.section-title,h2,h3) { letter-spacing:-.025em; }
:is(.bento-agency,.bento-client) :is(.card,.app-dialog,.admin-dialog,.client-surface) { min-width:0; }
:is(.bento-agency,.bento-client) :is(.inventory-table,.hub-inventory-table,.client-data-table,.price-table,.admin-table-scroll) th {
  background:var(--surface-alt);
  color:var(--text-muted);
  border-color:var(--border);
}
:is(.bento-agency,.bento-client) :is(.products-tabs,.studio-tabs,.client-tabs,.admin-tabs) button:is([aria-selected="true"],[aria-current]) {
  color:var(--primary);
  border-color:var(--primary);
  background:var(--primary-light);
}

/* Keep the tooltip outside the scrollable navigation and toolbar regions. */
.icon-tooltip {
  position:fixed; z-index:12000; max-width:min(260px,calc(100vw - 16px)); padding:6px 9px;
  color:var(--text); background:var(--surface-raised); border:1px solid var(--border);
  border-radius:7px; box-shadow:0 4px 16px var(--theme-shadow); font-size:12px; line-height:1.4;
  font-weight:650; overflow-wrap:anywhere;
}
:is(.theme-toggle,#bentoRailToggle,#clientRailToggle,#clientRefresh,[data-account-password],.client-account-actions a[aria-label],#reviewExpandPhoto,#touchReviewGeometry,#touchReviewDelete,#touchClearSelection) { --icon-tooltip:1; }

/* The same navigation nodes retain their original handlers at each width. */
:is(.bento-agency,.bento-client) .bento-rail-toggle {
  align-items:center; gap:8px; min-height:44px; padding:8px 10px; border:1px solid var(--border);
  border-radius:var(--bento-control-radius); background:var(--surface-alt); color:var(--text); cursor:pointer;
  font-size:13px; font-weight:650; white-space:nowrap;
}
:is(.bento-agency,.bento-client) .bento-rail-toggle:hover { background:var(--primary-light); color:var(--primary); }
.bento-rail-toggle i { font-size:16px; }
.bento-agency .bento-rail-head,.bento-client #clientRailWorks { display:none; }
.bento-agency #bentoRailBrand:empty,.bento-agency #bentoRailAccount:empty { display:none; }
.bento-agency :is(.bento-rail-context,#bentoBreadcrumb) { display:none; }
.bento-agency #appNavigation button { border-radius:var(--bento-control-radius); }
.bento-agency #appNavigation button.is-current { background:var(--primary-light); color:var(--primary); box-shadow:none; }
.bento-agency .app-header { background:var(--surface); border-bottom:1px solid var(--border); }
.bento-agency :is(#workCurrentName,#productsTitle,#batchTitle) { font-size:clamp(23px,2.7vw,38px); letter-spacing:-.045em; }
.bento-agency .app-main { padding-block-start:22px; }
@media (min-width:1180px) {
  .bento-agency[data-rail-collapsed] { --bento-rail:72px; }
  .bento-agency.has-app-shell .app-header { margin-inline-start:var(--bento-rail); padding:10px 23px; min-height:62px; gap:12px; }
  .bento-agency.has-app-shell .app-main { margin-inline-start:var(--bento-rail); margin-inline-end:0; padding-inline:clamp(18px,2vw,30px); }
  .bento-agency #bentoBreadcrumb { display:block; color:var(--text-muted); font-size:13px; font-weight:650; white-space:nowrap; }
  .bento-agency #appNavigation {
    position:fixed; inset:0 auto 0 0; z-index:100; width:var(--bento-rail);
    flex-direction:column; align-items:stretch; justify-content:flex-start;
    padding:16px 12px 14px; gap:12px; overflow:hidden auto;
    border:0; border-inline-end:1px solid var(--border);
  }
  .bento-agency .bento-rail-head { display:flex; align-items:center; justify-content:space-between; gap:8px; }
  #bentoRailBrand { min-width:0; }
  #bentoRailBrand .brand { font-size:19px; gap:7px; line-height:1; }
  #bentoRailBrand .brand.custom-platform>:not(.platform-logo) { display:none; }
  #bentoRailBrand .platform-logo { display:block; width:auto; max-width:100%; height:36px; object-fit:contain; object-position:left; }
  .bento-agency .bento-rail-context { display:grid; order:-1; gap:4px; padding:10px 11px; border:1px solid var(--border); border-radius:12px; background:var(--surface-alt); }
  .bento-agency .bento-rail-context small { color:var(--text-muted); font-size:11px; }
  .bento-agency #appContextLabel { display:block; max-width:none; text-align:left; color:var(--text); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:12px; font-weight:700; }
  .bento-agency #appNavigation .app-nav-links { display:flex; flex-direction:column; align-items:stretch; gap:3px; }
  .bento-agency #appNavigation button { justify-content:flex-start; min-height:42px; padding:7px 9px; text-align:left; border:1px solid transparent; font-size:13px; }
  .bento-agency #appNavigation .app-nav-links>button>i { flex:0 0 17px; text-align:center; margin:0; }
  .bento-agency #appNavigation button:hover { background:var(--surface-alt); }
  .bento-agency #appNavigation #settingsBtn { margin-top:7px; }
  .bento-agency:not([data-rail-collapsed]) #appNavigation #batchHeaderBtn {
    display:grid; grid-template-columns:17px minmax(0,1fr) auto; gap:6px; white-space:normal;
  }
  .bento-agency #appNavigation #queueBadge { margin:0; color:var(--primary); white-space:nowrap; }
  .bento-agency:not([data-rail-collapsed]) #appNavigation #queueBadge { padding:3px 4px; line-height:1; background:var(--surface-alt); }
  #bentoRailAccount { order:1; margin-top:auto; padding-top:11px; border-top:1px solid var(--border); }
  #bentoRailAccount .account-menu { display:flex; flex-wrap:wrap; justify-content:flex-start; gap:4px; margin:0; padding:0 2px; border:0; }
  #bentoRailAccount .account-menu>span { flex:1 0 100%; }
  #bentoRailAccount .account-menu button { min-height:34px; padding:5px 8px; font-size:12px; }
  .bento-agency #appNavigation + #stepper { margin-inline-start:var(--bento-rail); width:calc(100% - var(--bento-rail)); }
  .bento-agency #appNavigation #bentoRailToggle { flex:0 0 42px; height:42px; justify-content:center; padding:0; border-color:var(--border); }
  .bento-agency[data-rail-collapsed] #appNavigation { gap:11px; padding-inline:9px; }
  .bento-agency[data-rail-collapsed] .bento-rail-head { flex-direction:column; }
  .bento-agency[data-rail-collapsed] #bentoRailBrand .brand { justify-content:center; }
  .bento-agency[data-rail-collapsed] .bento-rail-context { display:none; }
  .bento-agency[data-rail-collapsed] #bentoRailBrand .platform-logo { max-width:100%; object-position:center; }
  .bento-agency[data-rail-collapsed] #bentoRailAccount .account-menu { justify-content:center; padding:0; }
  .bento-agency[data-rail-collapsed] #bentoRailAccount .account-menu>span { display:none; }
  .bento-agency[data-rail-collapsed] #appNavigation #bentoRailToggle { flex:none; }
  .bento-agency[data-rail-collapsed] #appNavigation :is(#bentoRailToggle,.app-nav-links button,#bentoRailAccount button) {
    --icon-tooltip:1;
    position:relative; justify-content:center; width:100%; min-height:44px; padding:0; gap:0; font-size:0;
  }
  .bento-agency[data-rail-collapsed] #appNavigation :is(#bentoRailToggle,.app-nav-links button,#bentoRailAccount button) i { font-size:17px; margin:0; }
  .bento-agency[data-rail-collapsed] #appNavigation #queueBadge:not([hidden]) {
    position:absolute; inset:7px 8px auto auto; width:7px; height:7px; padding:0; font-size:0; background:var(--primary);
  }
}
@media (max-width:700px) {
  .bento-agency .app-main { padding:12px 10px 34px; }
}

/* Agency task and collection surfaces. Keep dense result lists as tables. */
.bento-agency.is-work-queue[data-work-open] #workHome { display:none; }
.bento-agency .work-home-head { gap:var(--bento-gap); }
.bento-agency .work-home-head>div:first-child { min-width:0; }
.bento-agency #batchPanel>.batch-heading { gap:var(--bento-gap); padding-bottom:10px; }
.bento-agency .batch-heading>div { min-width:0; }
.bento-agency .bento-batch-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:6px; }
.bento-agency .bento-batch-actions .btn { padding:7px 9px; font-size:12px; }
.bento-agency #batchTitle { margin:0; font-size:clamp(18px,2vw,25px); line-height:1.25; overflow-wrap:anywhere; color:var(--text); }
.bento-agency :is(#uploadCard,.batch-execution,.bento-delivery-download,.export-format-options) { border-radius:var(--bento-card-radius); }
.bento-agency :is(.dropzone,.batch-execution) { background:var(--surface-alt); border-color:var(--border); color:var(--text); }
.bento-agency :is(.photo-camera-action,.mobile-file-label) { display:none; }
@media (any-pointer:coarse) {
  .bento-agency .photo-camera-action { display:inline-flex; align-items:center; justify-content:center; gap:7px; min-height:44px; }
  .bento-agency .photo-source-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
  .bento-agency .photo-source-actions .dropzone {
    display:grid; place-items:center; min-height:44px; padding:8px;
    border-style:solid; font-size:13px; font-weight:650;
  }
  .bento-agency .photo-source-actions .dropzone :is(.upload-symbol,h3,p) { display:none; }
  .bento-agency .mobile-file-label { display:inline-flex; align-items:center; justify-content:center; gap:7px; }
}
@media (any-pointer:coarse) and (max-width:480px) {
  .bento-agency #hubScopeUpload :is(#batchAdd,#batchPhotoCamera) { flex:1 1 calc(50% - 8px); min-height:44px; }
}
.bento-agency .batch-execution { padding:9px 12px; margin:var(--bento-gap) 0; gap:10px; }
.bento-agency .batch-execution b { color:var(--text); }
.bento-agency .batch-execution small { margin:2px 0 5px; color:var(--text-muted); }
.bento-agency .batch-execution-icon { flex-basis:32px; height:32px; border-radius:var(--bento-control-radius); background:var(--primary-light); color:var(--primary); }
.bento-agency .work-hub { grid-template-columns:clamp(210px,19vw,248px) minmax(0,1fr); gap:clamp(14px,1.2vw,22px); }
.bento-agency .hub-sidebar { border:1px solid var(--border); background:var(--surface); border-radius:var(--bento-card-radius); padding:12px; align-self:start; }
@media (min-width:801px) {
  .bento-agency .hub-sidebar { display:flex; flex-direction:column; align-items:stretch; gap:9px; }
  .bento-agency .hub-sidebar-heading { margin:0; }
  .bento-agency .hub-sidebar #hubStoreSearch { margin:0; padding:8px 10px; min-height:38px; font-size:12px; }
  .bento-agency #hubStoreList { gap:4px; padding:0 3px 0 0; scrollbar-width:thin; }
  .bento-agency .hub-store { align-items:center; gap:8px; padding:8px; min-height:50px; border-radius:var(--bento-control-radius); }
  .bento-agency .hub-store:focus-visible { outline-offset:-3px; }
  .bento-agency .hub-store-mark { flex:0 0 27px; width:27px; height:27px; border-radius:7px; font-size:12px; }
  .bento-agency .hub-store>span:last-child { flex:1; flex-flow:row wrap; gap:3px 7px; }
  .bento-agency .hub-store b { flex-basis:100%; min-width:0; line-height:1.3; }
  .bento-agency .hub-store small { min-width:0; line-height:1.3; }
  .bento-agency .hub-sidebar :is(#hubCreateStore,#hubTrash) { margin:0; min-height:40px; }
}
@media (min-width:901px) and (min-height:580px) {
  .bento-agency .hub-sidebar { position:sticky; top:12px; max-height:calc(100dvh - 24px); }
  .bento-agency .hub-sidebar> :not(#hubStoreList) { flex:none; }
  .bento-agency #hubStoreList { min-height:0; max-height:none; }
  .bento-agency #appCatalogPage #catalogPickerList { position:sticky; top:12px; align-self:start; }
  .bento-agency #appCatalogPage .inventory-catalogs { max-height:min(65dvh,calc(100dvh - 230px)); }
}
.bento-agency #appCatalogPage .inventory-table-wrap { max-height:none; }
.bento-agency .batch-job { border-radius:var(--bento-card-radius); background:var(--surface); }
.bento-agency .batch-job.is-open { border-color:var(--primary); background:var(--surface); }
.bento-agency .batch-job-actions { background:var(--surface-alt); }
.bento-agency .batch-photo-states { gap:5px; }
.bento-agency .batch-photo-states span { border-radius:7px; padding:4px 6px; background:var(--surface-alt); }
.bento-agency .batch-photo-states .is-complete { background:var(--positive-bg); color:var(--positive-text); }
.bento-agency .batch-photo-states .needs-attention { background:var(--warning-bg); color:var(--warning-text); }
.bento-agency .batch-photo-states [data-photo-state="publication"]:not(.is-complete) { color:var(--primary); background:var(--primary-light); }
.bento-agency :is(.inventory-dialog,.admin-dialog,.work-tool-dialog,#exportWizard,#analysisChatDialog,.photo-editor-dialog) { background:var(--surface); border-color:var(--border); }
.bento-agency .bento-delivery-download { background:var(--primary-light); border:1px solid var(--border); display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:10px; padding:14px; }
.bento-agency .bento-delivery-download h3,.bento-agency .bento-delivery-download p { margin:0; }
.bento-agency .bento-delivery-download + h3 { margin-block-start:16px; }
@media (max-width:900px) {
  .bento-agency .work-hub { grid-template-columns:minmax(0,1fr); }
}
@media (max-width:600px) {
  .bento-agency #batchPanel>.batch-heading { flex-wrap:wrap; }
  .bento-agency .bento-batch-actions .btn { min-height:44px; }
}

/* Keep image gestures inside the existing viewer and all tabs within reach. */
.bento-agency #operatorProgress,.bento-agency .viewer-head .preview-touch-hint { color:var(--text-muted); }
.bento-agency #operatorPhotoName { display:block; font-size:clamp(20px,2.4vw,32px); line-height:1.15; letter-spacing:-.035em; }
.bento-agency #operatorProgress { margin-top:3px; }
.bento-agency .operator-review-head,.bento-agency .photo-workbench { gap:var(--bento-gap); }
.bento-agency .photo-workbench { grid-template-columns:minmax(0,2fr) minmax(302px,1fr); }
.bento-agency .photo-workbench.portrait-photo { grid-template-columns:minmax(0,1.25fr) minmax(302px,1fr); }
.bento-agency :is(#panoWrapAnalyze,.hub-photo-original,.photo-editor-viewport) { background:var(--bento-photo-bed); border-color:var(--border); border-radius:14px; }
.bento-agency #photoCard { border-radius:var(--bento-card-radius); }
@media (min-width:1180px) and (min-height:760px) {
  .bento-agency #photoCard:not(.is-expanded-review) { position:sticky; top:12px; }
  .bento-agency #photoCard:not(.is-expanded-review) #panoWrapAnalyze { max-height:calc(100dvh - 262px); }
}
.bento-agency #operatorExtraActions #planogramTopBtn:not([hidden]) { display:inline-flex; }
.bento-agency #photoCard.is-expanded-review { border-radius:0; }
.bento-agency #touchReviewBar { background:var(--primary-light); border-color:var(--border); color:var(--text); }
.bento-agency .bento-box-loupe {
  position:absolute; z-index:1; width:96px; height:96px; border-radius:50%;
  border:3px solid #fff; box-shadow:0 2px 12px #101d30a6; pointer-events:none;
}
.bento-agency .bento-box-loupe[hidden],.bento-agency #bentoReviewUndo,.bento-agency #bentoShowFullTools { display:none; }
.bento-agency #photoCard.is-expanded-review #bentoShowFullTools { display:inline-flex; align-items:center; justify-content:center; gap:6px; }
.bento-agency #bentoReviewFooter {
  border:1px solid var(--border); border-radius:15px; padding:10px 11px;
  background:var(--surface); box-shadow:var(--bento-elevation);
}
.bento-agency #photoCard.is-expanded-review #bentoReviewFooter { position:static; flex:none; margin:0; }
@media (max-width:900px) {
  .bento-agency .photo-workbench,.bento-agency .photo-workbench.portrait-photo { grid-template-columns:minmax(0,1fr); }
  .bento-agency #studioGrid :is(#reviewPane,#measurePane,#catalogWorkspace) { max-height:none; }
}
@media (max-width:760px) {
  .bento-agency .operator-review-head #undoStudioBtn { display:none; }
  .bento-agency #bentoReviewFooter {
    padding:7px 9px; gap:5px;
    display:grid; grid-template-columns:auto auto auto minmax(0,1fr);
  }
  .bento-agency #bentoReviewFooter :is(#operatorFinish,#operatorPause,#operatorExportWizard,#bentoReviewUndo) {
    min-height:44px; padding:6px 8px; font-size:12px; min-width:44px; white-space:normal; line-height:1.22;
  }
  .bento-agency #bentoReviewFooter #operatorPause { white-space:nowrap; }
  .bento-agency #bentoReviewFooter .bento-pause-detail { display:none; }
  .bento-agency #bentoReviewFooter #operatorFinish { justify-self:end; width:100%; max-width:235px; }
  .bento-agency #bentoReviewUndo { display:inline-flex; }
  .bento-agency #bentoReviewFooter .bento-review-save-hint { display:none; }
  .bento-agency #photoCard.is-expanded-review { overflow-y:auto; min-height:0; }
  .bento-agency #photoCard.is-expanded-review #panoWrapAnalyze { min-height:130px; }
  .bento-agency #photoCard.is-expanded-review #bentoReviewFooter { box-shadow:none; border-radius:12px; padding-bottom:7px; }
}
@media (max-width:400px) {
  .bento-agency :is(#bentoReviewUndo,#operatorExportWizard) { --icon-tooltip:1; }
  .bento-agency #bentoReviewUndo span { display:none; }
  .bento-agency #bentoReviewUndo i { margin:0; }
  .bento-agency #bentoReviewFooter #operatorExportWizard { font-size:0; gap:0; }
  .bento-agency #bentoReviewFooter #operatorExportWizard i { font-size:15px; margin:0; }
}

/* Space shared with customers, including all the original views and exports. */
.bento-client { --client-glow:transparent; }
.bento-client .client-topbar { gap:var(--bento-gap); margin-bottom:var(--bento-gap); }
.bento-client .client-topbar h1 { font-size:clamp(21px,2.4vw,32px); letter-spacing:-.035em; line-height:1.15; }
.bento-client .client-topbar small { font-size:12px; letter-spacing:0; }
.bento-client .client-sidebar { gap:var(--bento-gap); }
.bento-client .bento-rail-head { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.bento-client .bento-rail-head .client-brand { min-width:0; }
.bento-client .bento-rail-head .platform-logo { max-width:100%; }
.bento-client #clientRailToggle { display:inline-flex; justify-content:center; flex:0 0 42px; padding:0; }
.bento-client #clientRailToggle span { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
.bento-client .client-eyebrow { letter-spacing:0; font-size:12px; }
.bento-client .client-work-list button.active { background:var(--primary-light); border-color:var(--border); }
.bento-client .client-avatar { background:var(--primary-light); color:var(--primary); border-radius:11px; }
.bento-client .client-scope {
  padding:8px var(--bento-gap); margin-bottom:var(--bento-gap); border-radius:var(--bento-card-radius); gap:8px;
  background:var(--surface); border:1px solid var(--border);
}
.bento-client .client-scope select { padding:7px 8px; border-radius:var(--bento-control-radius); }
.bento-client .client-scope>.btn { margin:0; }
.bento-client .client-kpis { gap:0; margin-bottom:var(--bento-gap); border:1px solid var(--border); border-radius:var(--bento-card-radius); background:var(--surface); }
.bento-client .client-kpis article { min-width:0; padding:10px var(--bento-gap); border:0; border-radius:0; box-shadow:none; background:transparent; }
.bento-client .client-kpis article+article { border-inline-start:1px solid var(--border); }
.bento-client .client-kpis b { margin-top:3px; color:var(--primary); font-size:24px; line-height:1.25; font-variant-numeric:tabular-nums; }
.bento-client .client-overview-grid { grid-template-columns:minmax(0,1fr); gap:var(--bento-gap); margin-bottom:var(--bento-gap); }
.bento-client .client-recent {
  margin-top:var(--bento-gap); grid-template-columns:repeat(auto-fit,minmax(min(100%,165px),1fr));
}
.bento-client .client-assistant-teaser {
  display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:10px;
  min-height:0; background:var(--surface); border-color:var(--border); color:var(--text);
}
.bento-client .client-assistant-teaser>i { color:var(--primary); font-size:19px; margin:0; }
.bento-client .client-assistant-teaser h2 { margin:0; font-size:16px; }
.bento-client .client-assistant-teaser p { margin:3px 0 0; }
.bento-client .client-overview-inventory .client-table-wrap { max-height:none; margin-block-start:10px; }
.client-inventory-pages { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px; margin-top:8px; font-size:12px; }
.client-inventory-pages .btn { min-height:44px; }
body.bento-client .btn-primary { background:var(--bento-action); border-color:var(--bento-action); color:var(--bento-on-action); }
body.bento-client .btn-primary:hover:not(:disabled) { background:var(--bento-action-hover); border-color:var(--bento-action-hover); }
.bento-client .client-surface { padding:14px; }
.bento-client :is(.client-recent article,.client-photo-preview) { border-radius:14px; }
.bento-client .client-photo-dialog :is(header,footer),.bento-client .client-preview-switch>div { background:var(--surface); }
.bento-client .client-photo-view { background:var(--bento-photo-bed); }
.bento-client .client-tabs { gap:7px; padding:4px; border:0; border-radius:13px; background:var(--surface); }
.bento-client .client-tabs button { border:1px solid transparent; border-radius:9px; padding:8px 10px; line-height:1.23; }
.bento-client .client-tabs button[aria-selected="true"] { border-color:transparent; }
@media (min-width:1180px) {
  .bento-client { grid-template-columns:var(--bento-rail) minmax(0,1fr); }
  .bento-client .client-sidebar { padding:16px 12px 14px; }
  .bento-client .client-main { padding:18px clamp(18px,2vw,30px); }
  .bento-client .client-scope #clientDeliveryWizard { margin-inline-start:auto; }
  #clientSectionMount .client-tabs { flex-direction:column; align-items:stretch; gap:4px; margin:0; padding:0; }
  #clientSectionMount .client-tabs button { padding:10px; text-align:left; min-height:42px; }
  #clientSectionMount .client-tabs button:hover { background:var(--surface-alt); }
  #clientSectionMount .client-tabs button[aria-selected="true"] { background:var(--primary-light); }
}
@media (min-width:761px) {
  .bento-client[data-rail-collapsed] { grid-template-columns:72px minmax(0,1fr); }
  .bento-client[data-rail-collapsed] .client-sidebar { padding-inline:9px; gap:11px; }
  .bento-client[data-rail-collapsed] .bento-rail-head { flex-direction:column; }
  .bento-client[data-rail-collapsed] .client-brand { justify-content:center; }
  .bento-client[data-rail-collapsed] .client-brand .platform-logo { max-width:100%; }
  .bento-client[data-rail-collapsed] :is(.client-eyebrow,.client-work-search,#clientWorks,.client-sidebar footer>div:nth-child(2)) { display:none; }
  .bento-client[data-rail-collapsed] #clientRailWorks { display:inline-flex; }
  .bento-client[data-rail-collapsed] .client-sidebar footer { margin-top:auto; flex-direction:column; }
  .bento-client[data-rail-collapsed] .client-sidebar :is(.bento-rail-toggle,#clientSectionMount button) {
    --icon-tooltip:1;
    align-self:stretch; justify-content:center; width:100%; min-height:44px; padding:0; gap:0; font-size:0;
  }
  .bento-client[data-rail-collapsed] #clientSectionMount button i { font-size:17px; margin:0; }
}
@media (max-width:1179px) {
  .bento-client .client-tabs { flex-wrap:wrap; }
}
@media (max-width:760px) {
  .bento-client .client-main { padding:12px; }
  .bento-client .client-recent { grid-template-columns:repeat(auto-fit,minmax(min(100%,94px),1fr)); }
  .bento-client .client-tabs { gap:3px; flex-wrap:wrap; margin-bottom:10px; }
  .bento-client .client-tabs button { flex:1 0 auto; justify-content:center; min-height:44px; padding:6px 8px; }
  .bento-client .client-scope { margin-bottom:10px; }
  .bento-client .client-kpis article:nth-child(3) { border-inline-start:0; }
  .bento-client .client-kpis article:nth-child(n+3) { border-top:1px solid var(--border); }
  .bento-client .client-surface { padding:12px; }
  .bento-client .client-photo-dialog .btn,.bento-client .client-photo-dialog .viewer-btn { min-height:44px; }
}
@media (max-width:480px) {
  .bento-client .client-assistant-teaser { grid-template-columns:auto minmax(0,1fr); }
  .bento-client .client-assistant-teaser>.btn { grid-column:2; justify-self:start; min-height:44px; }
}

/* Access, recovery and setup all share the same two-panel layout. */
.bento-access .access-layout { grid-template-columns:minmax(0,1fr) minmax(0,1.07fr); background:var(--surface); }
.bento-access .access-form-panel { grid-column:1; grid-row:1; position:relative; padding-top:104px; background:var(--surface); }
.bento-access .access-form-panel .access-brand {
  position:absolute; top:26px; left:clamp(20px,4vw,46px); color:var(--text); gap:7px;
}
.bento-access .access-form-wrap { max-width:390px; }
.bento-access .access-form-wrap h2 { font-size:clamp(25px,3vw,38px); letter-spacing:-.05em; margin-bottom:8px; }
.bento-access .access-form-icon { background:var(--primary-light); color:var(--primary); border-radius:13px; }
.bento-access :is(.access-form-description,.access-form-wrap label,.access-help) { color:var(--text-muted); }
.bento-access .access-intro {
  grid-column:2; grid-row:1; margin:14px 14px 14px 0; gap:16px;
  align-self:stretch; padding:0; border-radius:var(--bento-card-radius);
  background:var(--bento-night); overflow:hidden; color:#fff; justify-content:flex-start;
}
[data-theme="dark"] .bento-access .access-intro { border:1px solid var(--border); }
.bento-access .bento-access-photo { min-height:clamp(270px,48dvh,530px); background:center/cover url("bento-shelf.webp"); }
.bento-access .access-intro>.bento-access-photo+div { padding:0 24px 6px; }
.bento-access .access-intro h1 { margin:6px 0; color:#fff!important; font-size:clamp(24px,2.9vw,41px); letter-spacing:-.035em; }
.bento-access .access-intro p,.bento-access .access-intro>small { color:#e9f3ff; margin:6px 24px 12px; }
.bento-access .access-intro p { margin-inline:0; font-size:14px; }
.bento-access .access-intro .access-benefits { margin-top:14px; gap:8px; }
.bento-access .access-eyebrow { display:none; }
@media (max-width:850px) {
  .bento-access .access-layout { grid-template-columns:minmax(0,1fr); }
  .bento-access .access-form-panel { min-height:100dvh; padding:99px 20px 28px; }
  .bento-access .access-intro { display:none; }
}

/* Keep the selection and editor together when there is room for an inspector. */
.bento-agency .analyze-tools-card-v22 #selectionBanner.has-selection {
  margin:11px 10px 0; padding:11px; border-radius:13px;
}
.bento-agency .analyze-tools-card-v22 #selectionActionFeedback { margin:8px 10px 0; }
.bento-agency .analyze-tools-card-v22 .quick-edit-fields { grid-template-columns:repeat(2,minmax(0,1fr)); }
.bento-agency .analyze-tools-card-v22 .quick-edit { padding:10px; }
.bento-agency .analyze-tools-card-v22 #selectionMoreActions { min-width:0; }
.bento-agency :is(.analysis-chat-dialog,.review-board-dialog,.work-tool-dialog,.shelf-crop-dialog,.photo-editor-dialog) {
  background:var(--surface); color:var(--text); border-radius:var(--bento-card-radius);
}
.bento-agency :is(.chat-scope,.review-board-body,.work-tool-list li,.analysis-efficiency-summary,.admin-toolbar,.admin-usage-kpis>div) {
  background:var(--surface-alt); border-color:var(--border); color:var(--text);
}
.bento-agency :is(.board-help,.board-instructions,.chat-readonly,.admin-description) { color:var(--text-muted); }
.bento-agency :is(.board-suggestions,.board-proposal-evidence,.grouping-proposals-entry) { background:var(--primary-light); border-color:var(--border); color:var(--text); }
.bento-agency :is(#quickReviewEntry,#overlapReviewEntry,#detectionAuditEntry) { padding:12px; gap:8px; border-color:var(--border); border-radius:13px; background:var(--surface-alt); }
.bento-agency :is(#quickReviewEntry,#overlapReviewEntry,#detectionAuditEntry) p { color:var(--text-muted); }
.bento-agency .review-secondary-actions .text-button { min-height:44px; }
.bento-agency :is(.board-card,.admin-user-card) { border-radius:14px; border-color:var(--border); }
.bento-agency :is(.board-card-top,.admin-usage-kpis b) { color:var(--text); }
.bento-agency :is(.chat-scope label,.board-card-top,.board-selection,.board-help) input { accent-color:var(--primary); }

/* One bottom dock prevents review actions from covering the view shortcuts. */
#bentoStudioDock { display:none; }
@media (max-width:760px) {
  .bento-agency.has-studio-workspace:not(.is-work-queue):not(.expanded-photo-open) #bentoStudioDock {
    display:block; position:fixed; inset:auto 0 0; z-index:1000; background:var(--surface);
    box-shadow:0 -3px 16px var(--theme-shadow); border-top:1px solid var(--border); border-radius:14px 14px 0 0;
  }
  .bento-agency #bentoStudioDock #bentoReviewFooter {
    position:static; padding:6px 8px; box-shadow:none; border:0; border-radius:14px 14px 0 0;
  }
  .bento-agency.has-studio-workspace #bentoStudioDock .studio-mobile-nav {
    position:static; display:flex; gap:4px; justify-content:space-around; padding:4px 8px max(6px,env(safe-area-inset-bottom));
    background:var(--surface); border-top:1px solid var(--border);
  }
  .bento-agency #bentoStudioDock .studio-mobile-nav button {
    flex:1; min-height:44px; display:flex; flex-direction:column; justify-content:center; align-items:center;
    color:var(--primary); border:0; background:transparent; font-size:17px;
  }
  .bento-agency #bentoStudioDock .studio-mobile-nav button span { color:var(--text-muted); }
  .bento-agency.has-studio-workspace:not(.is-work-queue) .app-main { padding-bottom:calc(112px + env(safe-area-inset-bottom)); }
  .bento-agency.has-studio-workspace:not(.expanded-photo-open) .toast { bottom:calc(119px + env(safe-area-inset-bottom)); }
  .bento-agency.has-studio-workspace:has(#studioGrid :is(textarea,input:not([type="checkbox"]):not([type="radio"]):not([type="range"])):focus) #bentoStudioDock { display:none; }
}
@media (max-width:700px) {
  .bento-agency #appNavigation { padding:5px 7px; }
  .bento-agency #appNavigation .app-nav-links { display:flex; gap:4px; overflow-x:auto; scrollbar-width:thin; }
  .bento-agency #appNavigation button { flex:0 0 auto; white-space:nowrap; min-height:44px; padding-inline:8px; }
}
@media (max-width:650px) {
  .bento-agency #photoCard:not(.is-expanded-review) .viewer-head-v22 { position:relative; }
  .bento-agency #photoCard:not(.is-expanded-review) .viewer-head-v22>div:first-child { display:flex; align-items:center; min-height:44px; padding-inline-end:60px; }
  .bento-agency #photoCard:not(.is-expanded-review) .canvas-view-options { position:absolute; inset:0 0 auto auto; z-index:7; }
  .bento-agency #photoCard:not(.is-expanded-review) .canvas-view-options>summary { min-width:44px; min-height:44px; }
}
@media (max-width:600px) {
  .bento-agency :is(#helpBtn,#operatorChat) { --icon-tooltip:1; }
  .bento-agency .app-header { padding:7px 10px; gap:7px; }
  .bento-agency .header-actions #helpBtn { min-width:44px; min-height:44px; }
  .bento-agency .header-actions #helpBtn span { position:absolute; width:1px;height:1px; padding:0; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
  .bento-agency .header-actions #helpBtn i { margin:0; font-size:16px; }
  .bento-agency .operator-review-head { gap:7px; }
  .bento-agency #operatorProgress { font-size:12px; }
  .bento-agency .operator-review-head>div:last-child { gap:5px; }
  .bento-agency .operator-review-head>div:last-child .btn { min-height:44px; padding:6px 8px; }
  .bento-agency .operator-review-head #operatorChat { min-width:44px; }
  .bento-agency .operator-review-head #operatorChat i { margin:0; }
  .bento-agency .operator-review-head #operatorChat span { display:none; }
}

.mobile-review-sheet-head,#touchReviewMore { display:none; }
@media (max-width:760px) {
  .bento-agency.has-studio-workspace:not(.is-work-queue) #stepper { display:none; }
  .bento-agency.has-studio-workspace:not(.is-work-queue) .app-main {
    padding-bottom:calc(var(--review-dock-height,112px) + 16px);
  }
  .bento-agency.has-studio-workspace:not(.expanded-photo-open) .toast {
    bottom:calc(var(--review-dock-height,112px) + 10px);
  }
  .bento-agency.has-studio-workspace:not(.is-work-queue) .operator-review-head {
    display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;gap:4px 8px;
    scroll-margin-top:6px;
  }
  .bento-agency .operator-review-head .operator-review-head-actions {
    display:flex;flex-direction:row;align-items:center;gap:4px;
  }
  .bento-agency .operator-review-head-actions .btn { min-width:44px;min-height:44px;padding:6px; }
  .bento-agency :is(#operatorBack,#touchReviewMore) { --icon-tooltip:1; }
  .bento-agency .operator-review-head-actions :is(#operatorBack,#operatorChat) span { display:none; }
  .bento-agency .operator-review-head-actions :is(#operatorBack,#operatorChat) i { margin:0; }
  .bento-agency #operatorPhotoName { font-size:clamp(17px,4.7vw,21px);line-height:1.2; }
  .bento-agency #operatorStore { min-height:28px;margin:2px 0;white-space:normal; }
  .bento-agency #operatorProgress { margin:0;font-size:11px;line-height:1.35; }
  .bento-agency .operator-review-head #reviewPhotoNav {
    grid-column:1/-1;margin:0;padding:0;border:0;background:transparent;
  }
  .bento-agency .operator-review-head #reviewPhotoNav .btn { width:auto;padding-inline:8px;font-size:12px; }
  .bento-agency :is(#studioGrid,#photoWorkbench) { gap:8px; }
  .bento-agency #studioGrid #photoCard:not(.is-expanded-review) { padding:7px; }
  .bento-agency #photoCard:not(.is-expanded-review) .viewer-head-v22 { margin:0 0 5px; }
  .bento-agency #photoCard:not(.is-expanded-review) .viewer-head-v22>div:first-child {
    position:absolute;width:1px;height:1px;min-height:0;padding:0;overflow:hidden;clip-path:inset(50%);
  }
  .bento-agency #photoCard:not(.is-expanded-review) .viewer-toolbar-v22 {
    display:flex;flex-wrap:wrap;justify-content:flex-start;gap:4px;
  }
  .bento-agency #photoCard:not(.is-expanded-review) .canvas-view-options {
    position:relative;inset:auto;margin-inline-start:auto;
  }
  .bento-agency.is-space-view #photoCard .canvas-view-options { display:block; }
  .bento-agency #photoCard .canvas-view-popover { display:grid;right:0;top:calc(100% + 6px); }
  .bento-agency #photoCard .canvas-view-options:not([open]) .canvas-view-popover { display:none; }
  .bento-agency #photoCard .canvas-view-popover .viewer-zoom { text-align:center; }
  .bento-agency #bentoStudioDock.has-touch-selection #bentoReviewFooter { display:none; }
  .bento-agency #bentoStudioDock .touch-review-bar:not([hidden]) {
    display:flex;flex-direction:column;gap:4px;padding:5px 8px;
    border:0;border-radius:12px 12px 0 0;
  }
  .bento-agency #touchSelectionCount { font-size:12px;font-weight:650; }
  .bento-agency #bentoStudioDock .touch-review-actions { display:flex;flex-wrap:wrap;gap:3px; }
  .bento-agency #bentoStudioDock .touch-review-actions .btn {
    flex:1 0 auto;min-width:44px;min-height:44px;justify-content:center;padding:5px 6px;font-size:12px;
  }
  .bento-agency #bentoStudioDock .touch-review-actions .btn[hidden] { display:none; }
  .bento-agency #bentoStudioDock .touch-review-actions .btn i { margin:0; }
  .bento-agency #bentoStudioDock :is(
    .touch-review-bar[data-selection=single] #touchReviewSelection,
    .touch-review-bar[data-selection=multiple] #touchReviewMerge:not([hidden])
  ) { background:var(--bento-action);border-color:var(--bento-action);color:var(--bento-on-action); }
  .bento-agency #bentoStudioDock #touchReviewDelete { color:var(--negative-text); }
  .bento-agency #bentoStudioDock #touchReviewMore { display:inline-flex; }
  .bento-agency #bentoStudioDock #selectionActionFeedback:not([hidden]) {
    position:absolute;inset-inline:8px;bottom:calc(100% + 5px);margin:0;padding:5px 8px;
  }
  .bento-agency.mobile-review-sheet-open #bentoStudioDock #selectionActionFeedback:not([hidden]) {
    position:static;margin:4px 8px;
  }
  .bento-agency #bentoStudioDock #selectionActionUndo { min-height:44px; }
  .bento-agency #bentoStudioDock .studio-mobile-nav button[aria-expanded=true] {
    background:var(--primary-light);border-radius:8px;
  }
  .bento-agency #mobileReviewSheetToggle { position:relative; }
  .bento-agency #mobileReviewIssueCount:not([hidden]) {
    position:absolute;top:1px;left:calc(50% + 9px);min-width:16px;padding:1px 3px;border-radius:6px;
    font-size:10px;font-weight:750;background:var(--warning-bg);color:var(--warning-text);
  }
  .bento-agency #mobileReviewSheet { display:none; }
  .bento-agency.mobile-review-sheet-open #studioGrid #mobileReviewSheet {
    --sheet-bottom:calc(var(--review-dock-height,112px) + var(--review-keyboard-inset,0px));
    display:flex;flex-direction:column;position:fixed;inset:auto 0 var(--sheet-bottom);
    z-index:999;max-height:min(58dvh,calc(100dvh - var(--sheet-bottom) - 16px));margin:0;
    border-radius:16px 16px 0 0;background:var(--surface);
    box-shadow:0 -6px 26px var(--theme-shadow);
  }
  .bento-agency.mobile-review-sheet-expanded #studioGrid #mobileReviewSheet {
    max-height:calc(100dvh - var(--sheet-bottom) - 16px);
  }
  .bento-agency #mobileReviewSheet :is(#reviewPane,#measurePane,#catalogWorkspace) {
    min-height:0;overflow:auto;overscroll-behavior:contain;
  }
  .bento-agency #mobileReviewSheet .studio-tabs { flex:none; }
  .bento-agency #mobileReviewSheet :is(.input,textarea) { font-size:16px; }
  .bento-agency #mobileReviewSheet .studio-tabs button { min-height:44px; }
  .bento-agency #mobileReviewSheet .mobile-review-sheet-head {
    flex:none;display:flex;align-items:center;gap:2px;padding:2px 6px;
    border-bottom:1px solid var(--border);
  }
  .mobile-review-sheet-head strong { flex:1;min-width:0;font-size:14px; }
  .mobile-review-sheet-head .btn { min-width:44px;min-height:44px;padding:6px;justify-content:center; }
  .mobile-review-sheet-head .btn i { margin:0; }
  @media (prefers-reduced-motion:no-preference) {
    .bento-agency.mobile-review-sheet-open #mobileReviewSheet { animation:mobile-review-sheet-in .19s ease-out; }
    @keyframes mobile-review-sheet-in { from { transform:translateY(30px);opacity:0; } }
  }
}
@media (max-width:440px) {
  .bento-agency #photoCard .review-zoom-long-label { display:none; }
  .bento-agency #photoCard #analyzeZoomFitBtn { text-transform:capitalize; }
}
