/* App Connections WIP002 — local rendering of the existing platform admin flows.
   The shared workflow theme supplies type, colours and control geometry. */
.app-content.app-connections-content{max-width:none;min-height:100%;height:100%}
.app-connections{min-height:100%;display:flex;flex-direction:column;color:var(--studio-text);container-name:connections;container-type:inline-size}
.app-connections [hidden]{display:none!important}
.app-connections svg{stroke-width:1.65}
.ac-page-head{flex:0 0 auto;padding:28px 32px 0;background:var(--studio-surface);border-bottom:1px solid var(--studio-divider)}
.ac-heading-row{display:flex;align-items:center;justify-content:space-between;gap:24px;min-height:44px}
.ac-heading-row h1{margin:0;color:var(--studio-ink);font-size:28px;font-weight:600;line-height:36px;letter-spacing:-.025em}
.ac-heading-row p{margin:7px 0 0;color:var(--studio-muted);font-size:13px;line-height:20px}
.ac-heading-row>.studio-button{flex:0 0 auto;align-self:flex-start;margin-top:3px}
.ac-heading-row .studio-button svg{width:15px;height:15px}
.ac-tabs{gap:28px;margin-top:18px}
.ac-tabs [role=tab]{display:flex;gap:8px;align-items:center}
.ac-tabs [role=tab]:disabled{opacity:.45;cursor:not-allowed}
.ac-tab-count{padding:0 6px;border-radius:5px;background:var(--studio-hover);color:var(--studio-muted);font-size:11px;line-height:18px;font-weight:500}
.ac-tabs [aria-selected=true] .ac-tab-count{background:var(--studio-selected);color:var(--emerald)}
.ac-page-body{flex:1;padding:28px 32px 32px;background:var(--studio-canvas);min-width:0}
.ac-list-intro{display:flex;align-items:baseline;gap:16px;margin-bottom:16px}
.ac-list-intro h2,.ac-card-head h2,.ac-actions-intro h2{margin:0;color:var(--studio-ink);font-size:16px;line-height:24px;font-weight:600;letter-spacing:-.012em}
.ac-list-intro p{margin:0;color:var(--studio-muted);font-size:12px;line-height:18px}
.ac-table-wrap{overflow-x:auto;border:1px solid var(--studio-divider);border-radius:8px;background:#fff;box-shadow:var(--studio-panel-shadow)}
.ac-table{width:100%;border-collapse:collapse;text-align:left;font-size:13px;white-space:nowrap}
.ac-table th{height:43px;padding:11px 20px;background:#fafbfd;border-bottom:1px solid var(--studio-divider);color:var(--studio-muted);font-size:12px;line-height:19px;font-weight:500}
.ac-table td{height:77px;padding:16px 20px;border-bottom:1px solid var(--studio-divider);vertical-align:middle;color:var(--studio-text)}
.ac-table tbody tr:last-child td{border-bottom:0}
.ac-table tbody tr:hover{background:#fcfdfd}
.ac-table th:first-child{width:29%;min-width:205px}
.ac-table th:last-child,.ac-table td:last-child{padding-left:8px;text-align:right}
.ac-table th:nth-child(3),.ac-table th:nth-child(5){white-space:nowrap}
.ac-app-link{display:flex;align-items:center;gap:12px;border:0;padding:0;background:none;text-align:left;cursor:pointer;color:var(--studio-text)}
.ac-app-link>span:last-child{display:flex;flex-direction:column;gap:3px}
.ac-app-link strong{font-size:13px;line-height:19px;font-weight:600;color:var(--studio-ink)}
.ac-app-link:hover strong{color:var(--emerald)}
.ac-app-link>span:last-child>span{font-size:12px;line-height:17px;color:var(--studio-muted)}
.ac-brand{display:grid;place-items:center;flex:0 0 36px;width:36px;height:36px;border-radius:7px;background:#fff;border:1px solid rgb(0 0 0 / 4%);overflow:hidden}
.ac-brand img{width:23px;height:23px;object-fit:contain}
.ac-brand-fallback{background:var(--studio-hover);border-color:var(--studio-divider);color:var(--studio-muted)}
.ac-brand-fallback svg{width:18px;height:18px}
.ac-brand-large{width:40px;height:40px;flex-basis:40px;border-radius:8px}
.ac-brand-large img{width:26px;height:26px}
.ac-provider{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:11px;line-height:18px;color:#596477;background:#f5f7fa;border:1px solid var(--studio-divider);border-radius:4px;padding:3px 6px}
.ac-numeric{font-variant-numeric:tabular-nums}
.ac-status{display:inline-flex;align-items:center;gap:5px;font-size:11px;line-height:18px;font-weight:500;padding:1px 7px;border-radius:4px;border:1px solid var(--studio-divider);background:var(--studio-hover);color:var(--studio-muted);white-space:nowrap}
.ac-status>span{width:5px;height:5px;border-radius:50%;background:var(--studio-subtle)}
.ac-status-active{color:var(--emerald);background:var(--studio-selected);border-color:#d6e9de}
.ac-status-active>span{background:var(--leaf)}
.ac-row-actions{display:flex;justify-content:flex-end;align-items:center;gap:12px}
.ac-open-button{display:flex;align-items:center;gap:4px;color:var(--studio-text);font-size:12px;line-height:18px;font-weight:500;border:0;background:none;padding:5px 0;cursor:pointer}
.ac-open-button:hover{color:var(--emerald)}
.ac-open-button svg{width:14px;height:14px;color:var(--studio-subtle)}
.ac-delete-button{width:28px;height:28px;color:var(--studio-subtle)}
.ac-delete-button:hover{background:#fff1f0;color:#b54742}
.ac-delete-button svg{width:15px;height:15px}
.ac-preview-note{display:flex;align-items:flex-start;gap:7px;color:var(--studio-muted);font-size:11px;line-height:17px;margin-top:16px;max-width:850px}
.ac-preview-note>svg{flex:0 0 13px;width:13px;height:13px;margin-top:2px;color:var(--studio-subtle)}
.ac-empty{display:flex;flex-direction:column;align-items:center;text-align:center;padding:48px 24px;white-space:normal;color:var(--studio-muted)}
.ac-empty>svg{width:26px;height:26px;color:var(--studio-subtle);margin-bottom:12px}
.ac-empty h3{margin:0 0 6px;color:var(--studio-ink);font-size:14px;line-height:20px;font-weight:600}
.ac-empty p{max-width:410px;margin:0;font-size:12px;line-height:19px}
.ac-empty .studio-button{margin-top:18px}
.ac-empty .studio-button svg{width:15px;height:15px}
.ac-back-link{display:flex;align-items:center;gap:5px;padding:0;margin:0 0 18px;border:0;background:none;color:var(--studio-muted);font-size:12px;line-height:18px;font-weight:500;cursor:pointer}
.ac-back-link:hover{color:var(--emerald)}
.ac-back-link svg{width:14px;height:14px}
.ac-editor-title{display:flex;align-items:center;gap:12px;min-width:0}
.ac-editor-title h1{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ac-heading-actions{display:flex;align-items:center;gap:8px;flex-shrink:0}
.ac-editor-head .ac-tabs{margin-top:14px}
.ac-detail-layout{display:grid;grid-template-columns:minmax(0,650px) minmax(210px,260px);gap:40px;max-width:950px;margin:0 auto}
.ac-form-card{background:#fff;border:1px solid var(--studio-divider);border-radius:8px;box-shadow:var(--studio-panel-shadow);min-width:0}
.ac-card-head{padding:23px 24px;border-bottom:1px solid var(--studio-divider)}
.ac-card-head p,.ac-actions-intro p{margin:5px 0 0;color:var(--studio-muted);font-size:12px;line-height:19px}
.ac-form-fields{display:flex;flex-direction:column;gap:20px;padding:24px}
.ac-field{display:flex;flex-direction:column;align-items:stretch;gap:8px;position:relative;color:var(--studio-text);font-size:13px;line-height:19px;font-weight:600;min-width:0}
.ac-field .ui-field{width:100%;font-size:13px;font-weight:400;margin:0}
.ac-field textarea.ui-field{min-height:86px;resize:vertical}
.ac-field .ac-field-hint{display:block;color:var(--studio-muted);font-size:11px;line-height:17px;font-weight:400;margin-top:-2px}
.ac-optional{position:absolute;top:0;right:0;color:var(--studio-subtle);font-size:11px;font-weight:400}
.ac-field-row{display:grid;grid-template-columns:1fr 1fr;gap:20px}
.ac-mono-field{font-family:ui-monospace,SFMono-Regular,Menlo,monospace!important;font-size:12px!important}
.ac-form-aside{padding-top:8px;max-width:260px;color:var(--studio-muted)}
.ac-aside-icon{width:32px;height:32px;border:1px solid var(--studio-divider);border-radius:7px;display:grid;place-items:center;background:white;color:var(--studio-muted);margin-bottom:13px}
.ac-aside-icon svg{width:16px;height:16px}
.ac-form-aside h3{margin:0 0 9px;color:var(--studio-text);font-size:13px;line-height:20px;font-weight:600}
.ac-form-aside p{margin:0 0 13px;font-size:12px;line-height:20px}
.ac-aside-divider{height:1px;background:var(--studio-divider);margin:24px 0 20px}
.ac-small-label{display:block;color:var(--studio-text);font-size:11px;line-height:17px;font-weight:600;margin-bottom:6px}
.ac-catalogue-empty{max-width:950px;margin:0 auto}
.ac-actions-page{max-width:950px;margin:0 auto}
.ac-actions-intro{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:22px}
.ac-actions-intro>.studio-button{flex:0 0 auto}
.ac-actions-intro .studio-button svg{width:14px;height:14px}
.ac-action-toolbar{display:flex;align-items:center;gap:16px;justify-content:space-between}
.ac-search{display:flex;align-items:center;gap:8px;height:36px;flex:1;max-width:340px;border:1px solid var(--studio-border);border-radius:6px;background:#fff;padding:0 10px;box-shadow:0 1px 2px rgb(48 49 61 / 3%)}
.ac-search:focus-within{border-color:var(--leaf);box-shadow:var(--field-focus-ring)}
.ac-search>svg{width:15px;height:15px;flex:0 0 15px;color:var(--studio-subtle)}
.ac-search>input{border:0;outline:none!important;box-shadow:none!important;background:transparent;padding:0;width:100%;height:32px;font:inherit;font-size:12px;color:var(--studio-text)}
.ac-search>input::placeholder{color:var(--studio-subtle)}
.ac-bulk-actions{display:flex;align-items:center;gap:7px;flex:0 0 auto}
.ac-bulk-actions .studio-button{font-size:12px;min-height:34px;padding:6px 10px;font-weight:500}
.ac-catalogue-meta{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:14px 0 12px;color:var(--studio-muted);font-size:11px;line-height:18px}
.ac-catalogue-meta strong{color:var(--studio-text);font-weight:500}
.ac-catalogue-meta>span:last-child{color:var(--studio-subtle)}
.ac-action-groups{display:flex;flex-direction:column;gap:16px}
.ac-action-group{border:1px solid var(--studio-divider);border-radius:8px;background:#fff;overflow:hidden;box-shadow:var(--studio-panel-shadow)}
.ac-group-head{display:flex;align-items:center;justify-content:space-between;padding:12px 18px;background:#fafbfd;border-bottom:1px solid var(--studio-divider)}
.ac-group-head h3{display:flex;align-items:center;gap:8px;margin:0;color:var(--studio-text);font-size:12px;line-height:18px;font-weight:600}
.ac-group-head h3>span{color:var(--studio-subtle);font-size:11px;font-weight:400}
.ac-group-head>div{display:flex;align-items:center;gap:8px;font-size:11px;color:#b5beca}
.ac-group-head button{padding:0;border:0;background:none;color:var(--studio-muted);font-size:11px;line-height:18px;font-weight:500;cursor:pointer}
.ac-group-head button:hover{color:var(--emerald)}
.ac-action-row{display:flex;align-items:flex-start;gap:12px;padding:17px 18px;border-bottom:1px solid var(--studio-divider);cursor:pointer;transition:background-color 100ms}
.ac-action-row:last-child{border-bottom:0}
.ac-action-row:hover{background:#fbfdfc}
.ac-action-row:focus-within{background:#f7fbf9}
.ac-action-row>input{width:15px;height:15px;flex:0 0 15px;margin:2px 0 0;accent-color:var(--emerald);cursor:pointer}
.ac-action-copy{display:flex;flex:1;min-width:0;flex-direction:column;gap:4px}
.ac-action-title{font-size:13px;line-height:19px;font-weight:500;color:var(--studio-ink)}
.ac-action-description{font-size:12px;line-height:19px;color:var(--studio-muted);font-weight:400;max-width:690px}
.ac-effect-list{display:flex;flex:0 0 auto;gap:5px;padding-top:1px}
.ac-effect{border-radius:4px;border:1px solid var(--studio-divider);padding:0 6px;font-size:10px;line-height:18px;font-weight:500;background:#f5f7fa;color:#687284;text-transform:capitalize}
.ac-effect-write{background:#fbf7ef;border-color:#f0e5cd;color:#8b6b30}
.ac-effect-delete{background:#fff3f2;border-color:#f6dedb;color:#a44841}
.ac-search-empty{border:1px dashed var(--studio-border);border-radius:8px;background:#fff}
.ac-actions-footer{position:sticky;bottom:0;display:flex;align-items:center;justify-content:space-between;gap:16px;background:rgb(255 255 255 / 97%);border:1px solid var(--studio-divider);border-radius:8px;padding:14px 18px;margin-top:24px;box-shadow:0 -3px 12px rgb(48 49 61 / 3%);backdrop-filter:blur(6px);z-index:2}
.ac-actions-footer>span{display:flex;align-items:center;gap:14px;font-size:12px;line-height:18px;color:var(--studio-muted)}
.ac-footer-selected{padding-left:14px;border-left:1px solid var(--studio-divider);font-size:11px;color:var(--studio-subtle)}
.ac-dialog{padding:24px;border:1px solid var(--studio-divider);border-radius:12px;background:#fff;color:var(--studio-text);box-shadow:0 12px 50px rgb(35 45 61 / 20%);width:440px;max-width:calc(100vw - 32px);margin:auto;font-family:var(--font-ui)}
.ac-dialog::backdrop{background:rgb(35 45 61 / 26%)}
.ac-dialog-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:18px}
.ac-danger-icon{display:grid;place-items:center;width:36px;height:36px;border:1px solid #f3dedd;border-radius:8px;background:#fff4f2;color:#ae4843}
.ac-danger-icon svg{width:17px;height:17px}
.ac-dialog h2{margin:0 0 9px;color:var(--studio-ink);font-size:19px;line-height:26px;font-weight:600;letter-spacing:-.015em;overflow-wrap:anywhere}
.ac-dialog p{margin:0;color:var(--studio-muted);font-size:13px;line-height:21px}
.ac-dialog .ac-preview-note{margin-top:16px;padding:10px 11px;border:1px solid var(--studio-divider);border-radius:6px;background:var(--studio-hover);font-size:11px;line-height:17px}
.ac-dialog-foot{display:flex;align-items:center;justify-content:flex-end;gap:8px;margin-top:24px}
.app-connections .ac-button-danger{background:#b64d45;border-color:#b64d45;color:#fff}
.app-connections .ac-button-danger:hover{background:#9b403b;border-color:#9b403b;color:#fff}
.ac-sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.ac-spin{animation:ac-spin 1s linear infinite}
@keyframes ac-spin{to{transform:rotate(360deg)}}
@container connections (max-width:850px){.ac-detail-layout{grid-template-columns:minmax(0,1fr) 220px;gap:24px}.ac-list-intro{display:block}.ac-list-intro p{margin-top:5px}.ac-table th,.ac-table td{padding-left:16px;padding-right:16px}.ac-actions-footer>span{flex-direction:column;align-items:flex-start;gap:2px}.ac-footer-selected{border:0;padding:0}.ac-action-description{font-size:11.5px}}
@container connections (max-width:650px){.ac-page-head{padding:22px 20px 0}.ac-page-body{padding:24px 20px}.ac-heading-row{flex-wrap:wrap;gap:16px}.ac-heading-row h1{font-size:25px;line-height:32px}.ac-detail-layout{display:flex;flex-direction:column;gap:24px}.ac-form-aside{max-width:none;padding:0}.ac-form-aside .ac-aside-icon{display:none}.ac-aside-divider{margin:16px 0}.ac-action-toolbar{align-items:stretch;flex-direction:column;gap:10px}.ac-search{max-width:none;flex:0 0 36px}.ac-bulk-actions{align-self:flex-start}.ac-actions-intro{align-items:flex-start;flex-wrap:wrap;gap:14px}.ac-catalogue-meta>span:last-child{display:none}.ac-action-row{flex-wrap:wrap}.ac-effect-list{margin-left:27px;margin-top:-3px}.ac-actions-footer{bottom:0}.ac-editor-title{flex:1;flex-wrap:wrap}.ac-heading-actions{width:100%;justify-content:flex-end}.ac-form-fields,.ac-card-head{padding:20px}.ac-tabs{margin-top:14px}}
@container connections (max-width:390px){.ac-field-row{grid-template-columns:1fr;gap:22px}.ac-page-head{padding-left:16px;padding-right:16px}.ac-page-body{padding-left:16px;padding-right:16px}.ac-action-row{padding:15px}.ac-dialog{padding:20px}.ac-actions-footer{padding:12px;gap:10px}.ac-actions-footer .studio-button{font-size:12px}}
@media(prefers-reduced-motion:reduce){.ac-spin{animation:none}.ac-action-row{transition:none}}

.ac-field-error{color:#a44841;font-size:11px;line-height:17px;font-weight:400}
.ac-field [aria-invalid=true]{border-color:#c47771}

.ac-tabs [aria-selected=true]:hover{color:var(--emerald)}
.ac-count-total{color:var(--studio-subtle);font-size:12px}

.ac-classification-note{display:flex;gap:7px;align-items:flex-start;color:var(--studio-muted);font-size:11px;line-height:18px;margin-top:12px}
.ac-classification-note>svg{flex:0 0 13px;width:13px;height:13px;margin-top:2px;color:var(--studio-subtle)}

/* Production additions: real logos inside the brand tile, notices and the unsaved bar. */
.ac-brand .int-logo{width:23px;height:23px;padding:0;border:0;border-radius:0;background:none}
.ac-brand-large .int-logo{width:26px;height:26px}
.ac-brand .int-logo--ph{width:100%;height:100%;display:grid;place-items:center;background:var(--studio-hover);color:var(--studio-muted);font-size:14px;font-weight:600}
.ac-notice{display:flex;align-items:center;gap:8px;margin-bottom:16px;padding:10px 12px;border:1px solid #d6e9de;border-radius:6px;background:var(--studio-selected);color:var(--emerald);font-size:12px;line-height:18px;font-weight:500}
.ac-notice>svg{flex:0 0 14px;width:14px;height:14px}
.ac-notice-warn{border-color:#f0e5cd;background:#fbf7ef;color:#8b6b30}
.ac-notice-error{border-color:#f6dedb;background:#fff3f2;color:#a44841}
.ac-dirty{color:#8b6b30}
.ac-effect-unclassified{background:#fff;border-style:dashed}
.ac-field select.ui-field{height:36px}
.ac-disabled-hint{color:var(--studio-subtle);font-size:11px}
.app-connections a.studio-button,.app-connections a.ac-app-link,.app-connections a.ac-back-link{text-decoration:none}
.app-connections .ac-empty form{margin-top:18px}
.app-connections .ac-empty form .studio-button{margin-top:0}
