/* Shared Mac/cloud state components; same restrained visual language as the app. */
.state-pill{display:inline-flex;align-items:center;gap:7px;padding:4px 9px;border-radius:7px;font-size:12px;line-height:1.5;white-space:nowrap;background:#f4f4f3;color:#696b6a;font-weight:500}.state-pill i{width:5px;height:5px;border-radius:50%;background:currentColor}.state-pill.success{background:#edf5ef;color:#397556}.state-pill.warning{background:#fbf3e6;color:#936b29}.state-pill.danger{background:#faf0ed;color:#a65143}
.state-notice{display:flex;align-items:center;gap:20px;border:1px solid #eee5d5;border-radius:12px;padding:18px 20px;background:#fdfaf5;margin:0 0 20px;line-height:1.65}.state-notice strong{font-size:14px;font-weight:600}.state-notice p{font-size:13px;color:#74716a;margin:5px 0 0}.state-notice.neutral{background:#fafafa;border-color:#eeeeeb}.state-notice .grow{min-width:0}.field-error{color:#a4493c;font-size:13px;line-height:1.7;margin:6px 0}.state-empty{text-align:center;padding:32px 16px}.state-empty>.ui-icon{margin:0 auto 12px;color:#9a9d9a}.state-empty h3{font-size:16px}.state-empty p{color:#777;font-size:14px}.state-empty button{margin-top:12px}
.state-activity .activity-row{display:grid;grid-template-columns:24px minmax(0,1fr) 175px 142px 16px!important;gap:16px!important;padding:20px 22px;align-items:center;min-height:90px}.state-activity .activity-row .grow{min-width:0}.state-activity .activity-row p{white-space:normal;line-height:1.6;font-size:13px;margin:4px 0 0}.state-activity time{font-size:12px;color:#8a8b88}.result-symbol{color:#8f9791}.result-symbol.success{color:#5c8569}.result-symbol.danger{color:#b46a59}.result-symbol .ui-icon{width:18px;height:18px}.delivery-note{display:block;font-size:12px;color:#9a762e;margin-top:5px}.state-detail-title{display:flex;justify-content:space-between;align-items:center;gap:12px}.result-summary{font-size:15px;line-height:1.8;margin:8px 0}.state-step{display:flex;align-items:center;gap:14px;padding:12px 0;border-bottom:1px solid #f0f0ed;font-size:13px}.step-number{color:#9a9b97;width:20px}.execution-steps summary{display:flex;align-items:center;gap:12px}
.storage-note{font-size:13px;color:#858782;margin:0 0 24px}.state-account-list{border:1px solid #ecece8;border-radius:12px;overflow:hidden}.state-account{padding:22px 24px;border-bottom:1px solid #efefeb;background:white}.state-account:last-child{border-bottom:0}.state-account .row{gap:14px}.state-account h3{font-size:15px;margin:0}.state-account-foot{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-top:16px;padding-left:50px;font-size:12px;color:#888}.account-choice{display:flex;gap:10px;align-items:center;padding:10px 0;border-bottom:1px solid #f0f0ed}.account-choice .check{flex:1;min-width:0;border:0;background:none;padding:6px 0}.account-choice .check span.small,.access-app-choice .small{display:block}.account-choice button{font-size:12px;padding:6px 10px}.config-facts{display:grid;grid-template-columns:2fr 1fr 1fr 1fr;gap:20px}.config-facts>div{display:flex;flex-direction:column;gap:8px}.config-facts span{font-size:12px;color:#858782}.config-facts strong{font-size:15px;font-weight:500}.configuration-label{display:block;color:#858782;font-size:12px;margin-top:6px}.config-choice{display:flex;align-items:center;justify-content:space-between;text-align:left;padding:16px;border:1px solid #eeeee9;border-radius:10px;width:100%}.config-choice span.small{display:block;margin-top:6px}.config-choice:hover{background:#f8f9f7}.version-change{display:flex;align-items:center;gap:20px;padding:20px;background:#f8f8f6;border-radius:10px}.version-change span{color:#888}.version-change strong{font-weight:600}
.agent-state-link{display:flex;align-items:center;gap:8px;border:0!important;padding:4px 0!important;background:none!important;box-shadow:none!important;text-align:left}.agent-state-link>.small{color:#a57836}.connection-request{border:1px solid #edede8;border-radius:12px;padding:20px;margin:0}.connection-request h3{font-size:15px}.connection-request>p{font-size:13px;color:#767873;line-height:1.7}.connection-request .buttons{margin-top:16px}.request-code{display:flex;align-items:center;gap:12px;padding:12px 14px;background:#f8f8f6;border-radius:8px}.request-code span{font-size:12px;color:#858782}.request-code code{font-size:14px;letter-spacing:.04em}.connection-request details{margin-top:12px}.connection-request .row{flex-wrap:wrap}
.publish-progress{display:flex;gap:28px;padding:0;margin:0 0 30px;list-style:none}.publish-progress li{display:flex;align-items:center;gap:9px;font-size:13px;color:#959792}.publish-progress li>span{display:grid;place-items:center;width:25px;height:25px;border:1px solid #e6e7e2;border-radius:50%;font-size:12px}.publish-progress li.current{color:#252b28;font-weight:600}.publish-progress li.current>span{background:#252b28;border-color:#252b28;color:white}.publish-progress li.done{color:#62766a}.publish-form{max-width:800px;padding:28px!important;display:flex;flex-direction:column;gap:22px}.package-drop{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:40px 20px;border:1px dashed #d9ddd7;border-radius:12px;background:#fcfcfb;text-align:center}.package-drop>.ui-icon{width:28px;height:28px;color:#747e75}.package-drop strong{font-size:15px}.package-drop span{font-size:12px;color:#8b8e88}.package-drop input{max-width:100%;font-size:13px;margin-top:12px}.package-summary{display:flex;justify-content:space-between;gap:16px;font-size:14px;overflow-wrap:anywhere}.publish-form-actions{display:flex;gap:12px;align-items:center;border-top:1px solid #efefeb;padding-top:22px}.form-two{display:grid;grid-template-columns:2fr 1fr;gap:20px}.publish-form .field{margin:0}.publish-review h2{margin-top:16px;font-size:22px}.publish-review p{line-height:1.8}.publication-icon{width:48px;height:48px;object-fit:cover;border-radius:12px}.publication-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}.publication-row{border:1px solid #ecece8;border-radius:12px;padding:24px;display:flex;flex-direction:column;gap:20px}.publication-row .buttons{margin-top:auto}.publication-row h3{font-size:16px;margin:0}.publication-reason{font-size:13px;line-height:1.7;color:#a37a45}.publication-row .row{gap:12px}
.state-switch{width:42px;height:24px;padding:3px!important;border:0!important;background:#dcdfda!important;border-radius:14px!important;display:flex;align-items:center;flex-shrink:0}.state-switch span{width:18px;height:18px;background:white;border-radius:50%;box-shadow:0 1px 3px #0001;transition:transform .15s}.state-switch.on{background:#333c36!important}.state-switch.on span{transform:translateX(18px)}.settings-row progress{width:160px;height:7px;accent-color:#4b6454}.cloud-login{max-width:390px;margin:70px auto;padding-bottom:60px}.cloud-login>img{width:40px;height:40px;margin-bottom:24px}.cloud-login h1{font-size:26px;line-height:1.4;letter-spacing:-.025em;margin-bottom:12px}.cloud-login>p{color:#7c817b;font-size:14px;line-height:1.8}.cloud-login form{display:flex;flex-direction:column;gap:18px;margin-top:28px}.cloud-login .auth-primary{width:100%;height:42px;justify-content:center}.cloud-login .buttons{justify-content:space-between}.cloud-auth #nav,.cloud-auth .sidebar-apps,.cloud-auth .sidebar-bottom,.cloud-auth header .accent{visibility:hidden}.help-steps{padding-left:22px;line-height:2.3;font-size:14px}.sidebar-apps button span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media(max-width:850px){.publication-list{grid-template-columns:1fr}.state-activity .activity-row{grid-template-columns:20px minmax(0,1fr) 170px!important;gap:12px!important}.state-activity time{grid-column:2}.state-activity .activity-row>.ui-icon:last-child{display:none}.state-account-foot{padding-left:0}.agent-card-head{flex-wrap:wrap}.agent-card-actions{margin-left:auto}.config-facts{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:560px){.state-notice{align-items:flex-start;flex-direction:column;gap:12px}.state-account{padding:18px}.state-account>.row{flex-wrap:wrap}.state-account>.row>.state-pill{margin-left:50px}.state-account-foot{align-items:flex-start;flex-direction:column}.account-choice{flex-wrap:wrap}.account-choice .check{flex-basis:100%}.account-choice>.state-pill{margin-left:26px}.state-detail-title{align-items:flex-start;flex-direction:column}.state-activity .activity-row{padding:16px 12px}.state-activity .activity-row>.state-pill{font-size:11px;max-width:120px;white-space:normal}.publish-form{padding:20px!important}.publish-progress{gap:14px}.publish-progress li{font-size:12px;gap:5px}.form-two{grid-template-columns:1fr}.publication-row{padding:18px}.publication-row>.row{flex-wrap:wrap}.publish-form-actions{flex-wrap:wrap}.cloud-login{margin:30px auto}.connection-request{padding:16px}.agent-state-link{flex-wrap:wrap}.request-code{flex-wrap:wrap}}

/* Status badges must not inherit the older activity table fixed widths. */
.state-activity .activity-row>.state-pill{width:auto;min-width:0;max-width:none;justify-self:start;overflow:visible;text-overflow:clip}.state-activity .activity-row>.result-symbol{width:24px}.state-activity .activity-row>time{min-width:0}.state-activity .activity-row>.ui-icon{width:16px}
@media(max-width:850px){.agent-card .agent-card-head{display:grid!important;grid-template-columns:45px minmax(0,1fr);gap:12px;align-items:start}.agent-card-head>.grow{width:auto;min-width:0}.agent-card-head>.agent-card-actions{grid-column:1/-1;justify-self:end;margin:0}.agent-state-link{max-width:100%}.agent-state-link .state-pill{white-space:normal;text-align:left}.agent-state-link .small{white-space:nowrap}.agent-app-preview{margin-top:16px}}

@media(max-width:560px){
  .state-activity .activity-row{grid-template-columns:20px minmax(0,1fr)!important;gap:8px 12px!important}
  .state-activity .activity-row>.state-pill{grid-column:2;width:auto!important;max-width:100%;white-space:normal}
  .state-activity .activity-row>.grow{grid-column:2}
  .state-activity .activity-row>time{grid-column:2;width:auto!important}
  #content>.tabs{overflow-x:auto;flex-wrap:nowrap}
  #content>.tabs>button{flex-shrink:0;white-space:nowrap}
}

/* Review pass: long account names and pending states must fit without squeezing actions. */
.state-account .grow,.detail-list-row>div,.publication-row .grow,.config-choice>span{min-width:0;overflow-wrap:anywhere}
.config-facts strong,.publication-reason,.publish-review,.request-code code{overflow-wrap:anywhere}
.access-warning{display:flex;align-items:center;flex-wrap:wrap;gap:10px}
.settings-row>div{min-width:0}.settings-row{gap:18px}.settings-row>button{flex-shrink:0}
.state-pill i{flex-shrink:0}
@media(max-width:640px){
  .access-account-scope{display:grid;grid-template-columns:auto minmax(0,1fr);gap:8px 12px}
  .access-account-names{display:flex;flex-direction:column;min-width:0;overflow-wrap:anywhere}
  .access-account-scope .access-edit{grid-column:2;justify-self:start;padding:3px 0}
  .detail-list-row{gap:12px;flex-wrap:wrap}
  .detail-list-row>div{flex:1 1 180px}
  .settings-row{align-items:flex-start;flex-wrap:wrap}
  .config-facts{gap:20px 14px}
  .state-activity .activity-row>.state-pill{white-space:normal}
  .app-tile-bottom{align-items:flex-start;flex-wrap:wrap;gap:8px}
  .app-tile-bottom .state-pill{white-space:normal}
  #modal .check{flex-wrap:wrap}
  #modal .check>.state-pill{margin-left:26px}
}

/* Keep dialog actions visible while long account/configuration lists scroll. */
.polished-ui #modal{overflow:hidden}
#modal-content{display:flex;flex-direction:column;max-height:calc(100dvh - 106px);min-height:0}
#modal-content>.modal-head,#modal-content>.modal-foot{flex-shrink:0}
#modal-content>.stack{overflow-y:auto;min-height:0;padding:2px;overscroll-behavior:contain}
#modal-content>.modal-foot{background:#fff}
@media(max-width:640px){#modal-content{max-height:calc(100dvh - 96px)}.polished-ui #modal-content>.modal-foot{padding-top:16px;margin-top:16px}.polished-ui #modal-content>.modal-head{margin-bottom:18px}}
