@import url("ui/data-grid.css");
@import url("ui/tokens.css");
@import url("ui/components.css");
@import url("ui/floating-fields.css");
/* dev.12: shell, navigation and composition only. Business components remain shared. */
:root {--ui-header-height:48px;--app-sidebar-width:186px;--shell-shadow:0 8px 32px rgba(16,51,60,.055)}
.app-header{height:var(--ui-header-height);min-height:var(--ui-header-height);border-bottom:1px solid var(--line);background:var(--surface);display:flex;align-items:center;justify-content:space-between;padding:0 20px;gap:12px;position:relative;z-index:45}
.brand{display:inline-flex;align-items:center;gap:8px;color:var(--ink);text-decoration:none;flex-shrink:0}
.brand-mark,.login-emblem{display:grid;place-items:center;font-weight:850;letter-spacing:-.09em;background:#123e4a;color:#fff;border-radius:50%;line-height:1;aspect-ratio:1 / 1}
.brand-mark{width:28px;height:28px;font-size:22px;padding:0 3px 3px 0}
.brand-word{font-size:19px;font-weight:760;letter-spacing:-.8px;line-height:1}
.brand-word span{color:var(--accent)}
.header-tools{display:flex;align-items:center;gap:6px;min-height:0}
.header-menu-wrap{position:relative;display:flex;align-items:center}
.icon-button{width:34px;height:34px;min-height:34px;padding:7px;background:transparent;border:1px solid transparent;border-radius:9px;display:grid;place-items:center;transition:background .15s,border-color .15s;color:var(--ui-muted)}
.icon-button:hover,.icon-button[aria-expanded=true]{background:var(--ui-soft);border-color:var(--line);color:var(--ink)}
.icon-button svg,.side-link svg,.header-popover svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex:none}
.user-button{border:1px solid var(--line);color:var(--ink);background:var(--ui-bg);border-radius:50%}
.user-button svg{width:18px;height:18px}
.offline-chip{padding:4px 9px;border:1px solid var(--ui-warning);color:var(--ui-warning);border-radius:20px;background:var(--ui-warning-bg);font-size:11px;font-weight:650;line-height:1.25}
.header-attention{width:28px;height:28px;min-height:28px;border-radius:14px;padding:0;background:var(--ui-soft);border:1px solid var(--line);font-size:12px;font-weight:750;color:var(--ink)}
.header-attention.needs-review{background:var(--ui-warning-bg);border-color:var(--ui-warning);color:var(--ui-warning)}
.header-popover{position:absolute;right:0;top:calc(100% + 9px);width:230px;background:var(--surface);border:1px solid var(--line);border-radius:13px;box-shadow:0 18px 40px rgba(11,37,48,.16);padding:7px;z-index:55}
.header-popover button{display:flex;align-items:center;gap:10px;text-align:left;width:100%;padding:9px 10px;min-height:38px;border:0;border-radius:8px;background:transparent;font-size:13px;color:var(--ink)}
.header-popover button:hover,.header-popover button:focus-visible,.header-popover button[aria-current=page]{background:var(--ui-soft)}
.header-popover svg{width:17px;height:17px;color:var(--ui-muted)}
.popover-label{padding:7px 10px 5px;margin:0;color:var(--ui-muted);text-transform:uppercase;letter-spacing:1px;font-size:10px;font-weight:800}
.popover-identity{padding:10px 10px 12px;border-bottom:1px solid var(--line);margin-bottom:6px;overflow:hidden}
.popover-identity strong{display:block;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.popover-identity small{display:block;font-size:11px;color:var(--ui-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.popover-divider{border-top:1px solid var(--line);margin:5px 4px}
.shell{display:grid;grid-template-columns:var(--app-sidebar-width) minmax(0,1fr);min-height:calc(100dvh - var(--ui-header-height))}
#nav{background:var(--surface);border-right:1px solid var(--line);padding:16px 9px;min-width:0;display:flex;flex-direction:column;gap:4px;align-items:stretch}
#nav .side-link{width:100%;display:flex;align-items:center;gap:11px;text-align:left;padding:9px 11px;min-height:38px;border-radius:9px;border:1px solid transparent;background:none;color:var(--ui-muted);font-size:13px;font-weight:600;line-height:1.2}
#nav .side-link:hover{background:var(--ui-bg);color:var(--ink)}
#nav .side-link.active{background:var(--ui-soft);color:var(--ink);font-weight:750}
#nav .side-link.active svg{color:var(--accent)}
main{width:100%;max-width:1570px;min-width:0;padding:24px clamp(16px,2.65vw,36px) 50px;margin:0 auto}
main .eyebrow{margin:0 0 3px;font-size:11px;font-weight:650;letter-spacing:.7px;text-transform:none;color:var(--ui-muted)}
main h1{margin:0 0 17px;font-size:23px;line-height:1.25;font-weight:760;letter-spacing:-.65px}
main .actions{margin:0 0 14px}
main :is(.panel,.card){box-shadow:var(--shell-shadow)}
main :is(.panel,.card) h2{font-size:17px;letter-spacing:-.3px}
main .card{transition:border-color .15s,transform .15s,box-shadow .15s}
main .card:hover{border-color:var(--accent);box-shadow:0 8px 22px rgba(16,51,60,.09)}
main .grid{gap:10px}
main :is(.ui-data-grid,.ui-table-wrap){border-radius:10px}
main .dg-tools{padding:9px 10px}
/* dev.26: streamlined account entry, inspired by the user's compact login reference. */
.auth-state{--ui-bg:#e9eef0}
.auth-state.dark{--ui-bg:#10242a}
.auth-state .app-header{display:none}
.auth-state .shell{display:flex;min-height:100dvh;align-items:center;justify-content:center;padding:24px 14px}
.auth-state main{padding:0;width:100%;max-width:414px}
.auth-state #nav{display:none}
.login{width:100%;margin:0 auto}
.login-card{background:var(--surface);border:1px solid var(--line);padding:30px 31px 26px;border-radius:16px;box-shadow:0 18px 62px rgba(25,58,68,.095)}
.login-brand{display:flex;gap:9px;align-items:center;margin:0 0 23px;color:var(--ink);font-size:19px;font-weight:780;letter-spacing:-.6px}
.login-brand .login-emblem{display:grid;place-items:center;width:30px;height:30px;padding-right:3px;padding-bottom:2px;border-radius:50%;background:#123e4a;color:#fff;line-height:1;font-size:23px;font-weight:850;letter-spacing:-.07em}
.login-brand .login-brand-domain{color:var(--accent)}
.login-heading{font-size:27px!important;font-weight:760;letter-spacing:-.8px;line-height:1.18;margin:0 0 7px!important}
.login-intro{color:var(--ui-muted);font-size:13px;margin:0 0 21px;line-height:1.4}
.login-form{display:grid;gap:12px;margin:0}
.login-form .ui-float-field{margin:0}
.login-form>.login-hint{font-size:11px;color:var(--ui-muted);line-height:1.4;margin:-6px 0 2px}
.login-form button{width:100%;min-height:43px;border-radius:9px;font-weight:700}
.login-form .login-actions{margin:3px 0 0}
.login-form .auth-divider{display:flex;align-items:center;gap:14px;color:var(--ui-muted);font-size:12px;margin:0}
.login-form .auth-divider::before,.login-form .auth-divider::after{content:"";height:1px;background:var(--line);flex:1}
.login-form .passkey-secondary{background:var(--surface);color:var(--accent);border:1px solid var(--accent)}
.login-form .passkey-secondary:hover{background:var(--ui-soft)}
.login-form .ui-floating input{margin:0}
.login-form>label{margin:2px 0 -9px}
.login .panel{background:var(--surface);border:1px solid var(--line);padding:22px 24px 20px;border-radius:14px}
@media(max-width:650px){.login-card{padding:25px 22px 23px}.login-heading{font-size:25px!important}}
@media(max-width:360px){.login-card{padding:22px 17px}}
.profile-panel{max-width:610px}.profile-panel>p{margin:0 0 17px}.profile-panel input{max-width:500px}.profile-panel input[readonly]{background:var(--ui-bg);color:var(--ui-muted)}
.profile-meta{display:flex;gap:18px;flex-wrap:wrap;margin:18px 0 22px;border-top:1px solid var(--line);padding-top:13px}
.profile-meta span{display:grid;gap:2px;font-size:12px;color:var(--ui-muted)}.profile-meta strong{font-size:13px;color:var(--ink)}
.user-appearance{margin:0 0 13px;max-width:710px}
.user-appearance h2{font-size:16px}.appearance-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.appearance-grid select{max-width:none}
.appearance-grid label{display:block;margin:0 0 6px;font-size:12px;font-weight:700}
.appearance-notifications{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px;margin-top:14px;border-top:1px solid var(--line);padding-top:12px}
.appearance-notifications span{font-size:12px;font-weight:650}
#notice{position:fixed;bottom:22px;left:50%;transform:translateX(-50%);background:var(--ink);color:var(--surface);border-radius:10px;padding:10px 16px;display:none;max-width:min(480px,90vw);z-index:70;font-size:13px;box-shadow:0 12px 30px rgba(0,0,0,.15)}
/* No redundant "connected" banner. Bad connection is an exception, not permanent chrome. */
@media(max-width:800px){:root{--app-sidebar-width:162px}main{padding:20px 18px 38px}.app-header{padding:0 14px}}
@media(max-width:650px){:root{--ui-header-height:47px}.shell{display:flex;flex-direction:column}#nav{display:flex;flex-direction:row;gap:4px;overflow-x:auto;overscroll-behavior-x:contain;border-right:0;border-bottom:1px solid var(--line);padding:7px 10px;background:var(--surface)}#nav .side-link{flex:0 0 auto;width:auto;white-space:nowrap;min-height:37px;padding:8px 10px;gap:7px}#nav .side-link svg{width:17px;height:17px}main{padding:18px 14px 32px}main h1{font-size:21px}.app-header{padding:0 12px}.brand-word{font-size:18px}.header-tools{gap:4px}.header-popover{max-width:min(260px,calc(100vw - 20px))}.login .panel{padding:19px 18px}.appearance-grid{grid-template-columns:1fr}}
@media(max-width:360px){.brand-word{font-size:17px}.brand-mark{width:25px;height:25px}.app-header{padding:0 9px}.header-popover{right:-3px}.offline-chip{font-size:10px;padding:3px 5px}}
.empty-state{width:min(560px,100%);text-align:center;margin:32px auto 0;border:1px dashed var(--line);border-radius:14px;background:var(--surface);padding:36px 20px}
.empty-state-icon{display:grid;place-items:center;width:46px;height:46px;border-radius:14px;background:var(--ui-soft);color:var(--accent);font-size:27px;margin:0 auto 14px}
.empty-state h2{font-size:19px;margin:0 0 8px}.empty-state p{font-size:13px;color:var(--ui-muted);margin:0}
.list-filters{display:flex;flex-wrap:wrap;gap:9px;align-items:end;padding:10px 12px}
.list-filters label{flex:1 1 160px;margin:0;min-width:130px}.list-filters label input,.list-filters label select{margin-top:4px}
.list-filters>[data-list-clear]{align-self:end}
.list-filters>[data-list-count]{flex-basis:100%;margin:0;font-size:12px}
@media(max-width:650px){.empty-state{margin-top:12px;padding:28px 16px}.list-filters label{flex-basis:100%}.list-filters>[data-list-clear]{flex:1}}

#dialog .draft-state{margin-right:auto;align-self:center;color:var(--ui-muted);font-size:11px}

/* dev.27: updater asks for the installation token only for one-time binding or emergency rescue. */
#update-panel .update-special{border:1px solid var(--line);border-radius:var(--ui-radius-panel);background:var(--ui-bg);padding:14px 16px;margin:16px 0}
#update-panel .update-special h2{font-size:15px;margin:0 0 7px}
#update-panel .update-special p{font-size:12px;line-height:1.5;margin:0 0 12px}
#update-panel .update-special label{display:block;font-size:12px;margin-bottom:5px}
#update-panel .update-special input{max-width:450px}
#update-panel .update-special .actions{margin:12px 0 0}
#update-panel [data-recovery][hidden],#update-panel .update-special[hidden]{display:none}

/* dev.28 — an information hierarchy, not a set of stacked cards. */
:root{--ui-font-size:15px;--ui-control-height:38px;--app-sidebar-width:178px;--shell-shadow:0 3px 15px rgba(16,51,60,.028)}
#nav{padding:13px 8px}
#nav .side-link{font-size:14px;min-height:39px}
main{max-width:none;padding:23px clamp(18px,2.1vw,36px) 35px;margin:0}
main h1,main h1.page-title{font-size:25px;margin:0;font-weight:760;letter-spacing:-.6px}
.page-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;min-height:42px;margin:0 0 12px}
.page-heading .actions{margin:0;gap:6px}
.page-heading .actions button{min-height:36px}
main>h1.page-title{margin:0 0 12px}
main .panel,main .card{box-shadow:var(--shell-shadow)}
main .dg-toolbar{padding:8px 10px}
main .list-filters{display:none}
.ui-data-grid .dg-toolbar .dg-search-slot label{margin:0}
.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}
button,input,textarea,select{font-size:14px}
.ui-data-grid input[type=search]{font-size:14px}
.work-queue-toolbar{margin:0;justify-content:flex-start;gap:0}
.work-queue-toolbar .work-queue-search{margin:0;max-width:510px;flex:1 1 250px}
.work-queue-toolbar .work-queue-search input{font-size:14px}
.work-office-head{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px;margin:8px 0 11px}
.work-office-modes{margin:0;gap:3px}
.work-office-tabs{padding:3px;margin:0;display:flex;flex-wrap:wrap;gap:2px;border-radius:9px}
.work-office-tabs button{padding:6px 9px;min-height:34px;font-size:13px}
.work-office-modes button{padding:7px 13px;font-size:13px}
.work-view-container{gap:8px}
.office-empty{display:grid;justify-items:center;align-content:center;gap:7px;padding:36px 18px;min-height:145px;border:1px dashed var(--line);border-radius:11px;background:var(--surface);text-align:center;color:var(--ui-muted)}
.office-empty>span{display:grid;place-items:center;width:34px;height:34px;border-radius:9px;background:var(--ui-soft);color:var(--accent);font-size:22px}
.office-empty strong{font-size:15px;font-weight:700;color:var(--ink)}
.office-empty small{font-size:13px;line-height:1.4}
.work-agenda-hint{font-size:13px}
.work-queue-search{padding:0}
.work-queue-empty{margin:0}
.work-queue-grid{gap:10px}
@media(max-width:900px){main{padding:16px 18px 30px}.work-office-head{justify-content:flex-start}.work-office-tabs{width:100%;overflow-x:auto;flex-wrap:nowrap}.work-office-tabs button{white-space:nowrap}}
@media(max-width:650px){main{padding:13px 11px 28px}main h1,main h1.page-title{font-size:22px}.page-heading{margin-bottom:10px}#nav{padding:6px 10px}.work-queue-toolbar .work-queue-search{max-width:none}.work-office-modes button{font-size:13px}.work-office-tabs{gap:1px}.work-office-tabs button{font-size:12px;padding:7px 8px}.ui-data-grid input[type=search],.work-queue-search input{font-size:16px}}

/* dev.29 — form density and consistent modal spacing, without crowding touch actions. */
#dialog{padding:14px 16px;max-width:min(560px,96vw)}
#dialog h2{font-size:18px;margin:0 0 7px}
#dialog .actions,#dialog footer{margin-top:10px}
#dialog .contact-collection>.row{gap:8px}
#dialog .contact-collection h3{font-size:15px;margin:0}
#dialog :is(input,select,textarea){max-width:100%}
.prefs-address-country{border-top:1px solid var(--line);padding-top:12px;margin-top:12px;display:grid;grid-template-columns:repeat(auto-fit,minmax(min(225px,100%),1fr));gap:8px 12px}
.prefs-address-country h3,.prefs-address-country .field-hint{grid-column:1/-1;margin:0}
.prefs-address-country h3{font-size:15px}
.prefs-address-country label{margin:0}
.prefs-address-country select{display:block;width:100%;margin-top:3px}
@media(max-width:650px){#dialog{padding:12px 13px}}
/* dev.30 — programmatically focused error alerts should not carry an unrelated green halo. */
#main .error[tabindex="-1"]:focus{outline:none}

/* dev.31 — adaptive editor dialog with safe close and scrollable content. */
#dialog{position:relative;box-sizing:border-box;width:min(680px,calc(100vw - 24px));max-width:none;max-height:calc(100dvh - 24px);padding:16px 18px 0;overflow:hidden}
#dialog[data-size="wide"]{width:min(1180px,calc(100vw - 24px))}
#dialog #editor{display:flex;flex-direction:column;max-height:calc(100dvh - 60px);min-height:0}
#dialog #fields{min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;padding:1px 3px 8px 1px;scrollbar-gutter:stable}
#dialog #fields>h2:first-child{padding-right:35px;margin:2px 0 11px}
#dialog #editor>footer{flex-shrink:0;margin:0;min-height:55px;align-items:center;border-top:1px solid var(--line);background:var(--surface);padding:10px 0}
#dialog .collection-row{max-width:100%}
.ui-dialog-close{position:absolute;right:12px;top:12px;z-index:3;display:grid;place-items:center;width:31px;height:31px;min-height:31px;line-height:1;padding:0;border:1px solid transparent;border-radius:8px;background:transparent;color:var(--ui-muted);font-size:23px;font-weight:400}
.ui-dialog-close:hover,.ui-dialog-close:focus-visible{background:var(--ui-soft);color:var(--ink);border-color:var(--line)}
dialog:not(#dialog){position:relative}
dialog:not(#dialog)>h2:first-of-type{padding-right:32px}
@media(max-width:650px){#dialog{padding:12px 12px 0;width:calc(100vw - 14px);max-height:calc(100dvh - 14px)}#dialog[data-size="wide"]{width:calc(100vw - 14px)}#dialog #editor{max-height:calc(100dvh - 45px)}#dialog .collection-pair{grid-template-columns:minmax(0,1fr)}#dialog #editor>footer{min-height:59px}}

/* dev.31 — updater is a full-width page, not a modal. File picker is compact and accessible. */
#update-panel{width:100%;min-width:0}
#update-panel>.panel{width:100%;box-sizing:border-box;margin-bottom:12px}
#update-panel [data-upload]{max-width:800px;margin:12px 0}
#update-panel .update-file-native{position:absolute;width:1px;height:1px;opacity:0;overflow:hidden;clip-path:inset(50%);pointer-events:none}
#update-panel .update-dropzone{display:flex;align-items:center;flex-wrap:wrap;gap:8px 14px;min-height:74px;padding:15px 17px;border:1px dashed var(--ui-muted);border-radius:11px;background:var(--ui-bg);cursor:pointer;transition:border-color .15s,background .15s}
#update-panel .update-dropzone.is-dragging,#update-panel .update-dropzone:focus-visible{outline:1px solid var(--accent);outline-offset:0;border-color:var(--accent);background:var(--ui-soft)}
#update-panel .update-dropzone.has-file{border-style:solid;border-color:var(--accent)}
#update-panel .update-dropzone[aria-disabled="true"]{opacity:.55;cursor:default}
#update-panel .update-dropicon{display:grid;place-items:center;flex:none;width:34px;height:34px;border-radius:9px;background:var(--ui-soft);color:var(--accent);font-size:24px}
#update-panel .update-dropzone strong{font-size:14px;line-height:1.3}
#update-panel .update-dropzone .muted{font-size:12px}
#update-panel .update-browse{margin-left:auto;min-height:34px;white-space:nowrap}
#update-panel .update-file-details{display:block;flex:1 1 100%;min-width:0;color:var(--accent);overflow-wrap:anywhere;font-size:12px;font-weight:650}
#update-panel .update-file-details[hidden]{display:none}
#update-panel .update-upload-actions{display:flex;justify-content:flex-end;margin:10px 0 0}
#update-panel progress{display:block;max-width:800px;margin:12px 0}
#update-panel progress[hidden]{display:none}
#update-panel [data-result]{margin-top:8px;font-size:13px}
#update-panel [data-result]:empty{display:none}
#update-panel [data-review]{max-width:100%;overflow-wrap:anywhere}
#update-panel [data-review] .package-hash{font:12px/1.5 monospace;overflow-wrap:anywhere}
#update-panel [data-review] ul{max-height:30vh;overflow:auto;padding-left:22px}
@media(max-width:650px){#update-panel .update-dropzone{padding:12px;gap:8px 10px}#update-panel .update-browse{margin-left:0}#update-panel .update-dropzone .muted{flex:1 1 60%}}

/* dev.31 identity. Exact original letterforms are displayed as an optimized image. */
.brand .brand-logo{display:block;width:138px;height:auto;max-height:37px;object-fit:contain;object-position:left center}
.login-brand .login-logo{display:block;width:174px;max-width:100%;height:auto;object-fit:contain}
.login-brand{line-height:1;min-height:38px}
@media(max-width:650px){.brand .brand-logo{width:132px}.login-brand .login-logo{width:169px}}

.dark .app-header .brand picture{background:#fff;border-radius:6px;padding:3px 6px}
.dark .login-brand picture{background:#fff;border-radius:7px;padding:4px 7px}

/* dev.32 — management screens share a single, dense list + modal grammar. */
.catalog-panel{padding:14px 16px;min-width:0}
.catalog-list-header{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px;margin-bottom:12px}
.catalog-list-header h2{font-size:17px;margin:0 0 2px}
.catalog-list-header .muted{font-size:12px;margin:0;line-height:1.4}
.catalog-toolbar{display:flex;flex-wrap:wrap;gap:6px}
.catalog-toolbar button{min-height:34px}
.catalog-panel .ui-data-grid{box-shadow:none}
.catalog-panel .dg-search-slot input.catalog-search{width:min(460px,100%);margin:0;min-height:34px;padding:6px 10px}
.catalog-panel .ui-data-grid table{font-size:13px}
.catalog-panel .ui-data-grid th,.catalog-panel .ui-data-grid td{padding:8px 10px;min-width:85px}
.catalog-panel .ui-data-grid .dg-actions-cell{min-width:75px}
.catalog-panel .dg-primary-link{color:var(--ink)}
.catalog-panel .dg-primary-link:hover{color:var(--accent)}
.catalog-dialog{box-sizing:border-box;width:min(900px,calc(100vw - 26px));max-width:900px;max-height:calc(100dvh - 22px);padding:0!important;overflow:hidden;position:relative}
.catalog-dialog::backdrop{background:rgba(16,39,47,.48)}
.catalog-dialog-head{display:flex;align-items:center;justify-content:space-between;padding:14px 18px;border-bottom:1px solid var(--line);gap:10px}
.catalog-dialog-head h2{font-size:19px;margin:0}
.catalog-dialog-head .ui-dialog-close{position:static;flex:none;border-radius:8px;background:transparent}
.catalog-dialog-body{overflow-y:auto;overflow-x:hidden;max-height:calc(100dvh - 165px);padding:16px 18px;overscroll-behavior:contain;scrollbar-gutter:stable}
.catalog-dialog-footer{margin:0;padding:12px 18px;border-top:1px solid var(--line);background:var(--surface);display:flex;justify-content:flex-end;gap:8px}
.catalog-dialog>[data-modal-error]{padding:0 18px}
.catalog-type-properties{display:grid;grid-template-columns:1fr 1.25fr 1.25fr;align-items:end;gap:8px 12px}
.catalog-type-properties>label{display:grid;gap:4px;min-width:0;margin:0;font-size:12px}
.catalog-type-properties :is(input,select){min-width:0;width:100%;height:36px;min-height:36px;margin:0}
.catalog-type-properties .catalog-active{display:flex;grid-column:1/-1;align-items:center;gap:9px;margin-top:8px;min-height:30px}
.catalog-type-properties .catalog-active input{width:38px;min-width:38px;max-width:38px;height:22px;min-height:22px;flex:none;margin:0;padding:2px}
.catalog-field-group{border:1px solid var(--line);border-radius:9px;margin-top:12px;padding:8px 12px}
.catalog-field-group>summary{cursor:pointer;font-size:14px;font-weight:700;padding:5px 0}
.catalog-field-group .muted{font-size:12px}
.catalog-field-group .work-extra-field{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 11px;padding:10px 0;margin:0;border-bottom:1px solid var(--line)}
.catalog-field-group .work-extra-field>label{display:grid;gap:3px;min-width:0;margin:0;font-size:12px}
.catalog-field-group .work-extra-field :is(input,select){margin:0;min-height:36px}
.catalog-field-group .work-extra-field .ui-switch{display:flex;align-items:center;gap:7px;justify-content:flex-start}
.catalog-field-group .work-extra-field .ui-switch input{width:38px;min-width:38px;max-width:38px;height:22px;min-height:22px;flex:none;padding:2px}
.catalog-field-group .work-extra-field>button{justify-self:start;align-self:end}
.catalog-field-group>button{margin-top:10px}
.catalog-danger{display:flex;justify-content:flex-end;margin-top:12px}
.catalog-danger button{color:var(--ui-danger);border-color:var(--ui-danger-line)}
.catalog-flow-scroll{overflow-x:auto;max-width:100%}
.catalog-flow-table{min-width:510px}
.catalog-flow-table th,.catalog-flow-table td{vertical-align:middle;text-align:center}
.catalog-flow-table td input[type=checkbox]{margin:0;width:18px;height:18px}
.member-dialog.catalog-dialog{width:min(800px,calc(100vw - 26px));padding:0;}
.member-dialog.catalog-dialog>form{display:flex;flex-direction:column;max-height:calc(100dvh - 24px);overflow:hidden}
.member-dialog.catalog-dialog form>.catalog-dialog-head{flex:none}
.member-dialog.catalog-dialog form>:not(.catalog-dialog-head):not(footer){margin-left:18px;margin-right:18px}
.member-dialog.catalog-dialog form{overflow-y:auto}
.member-dialog.catalog-dialog footer{position:sticky;bottom:0;background:var(--surface);border-top:1px solid var(--line);padding:10px 18px;margin:12px 0 0}
.member-dialog.catalog-dialog .permission-grid{grid-template-columns:repeat(auto-fit,minmax(min(230px,100%),1fr))}
.template-list-tools{padding:8px 10px;border:1px solid var(--line);border-bottom:0;border-radius:9px 9px 0 0;display:flex;align-items:center}
.template-list-tools input{max-width:500px;min-height:34px;margin:0}
.template-list-scroller{border:1px solid var(--line);border-radius:0 0 9px 9px}
.template-list-table{width:100%;border-collapse:collapse;font-size:13px}
.template-list-table th{background:var(--ui-bg);font-size:12px;text-align:left}
.template-list-table :is(th,td){border-bottom:1px solid var(--line);padding:9px 12px;vertical-align:middle}
.template-list-table tbody tr:last-child td{border-bottom:0}
.template-list-table tbody tr:hover{background:var(--ui-soft)}
.template-list-table td strong{font-weight:700}
.template-code{display:block;color:var(--ui-muted);font-size:11px;margin-top:2px}
.template-list-table td:last-child,.template-list-table th:last-child{text-align:right}
.template-list-table td button{min-height:30px;padding:5px 10px}
@media(max-width:720px){
 .catalog-panel{padding:11px}
 .catalog-list-header{align-items:flex-start}
 .catalog-list-header h2{font-size:16px}
 .catalog-toolbar{width:100%}
 .catalog-toolbar button{flex:1 1 auto}
 .catalog-dialog{width:calc(100vw - 12px);max-width:none;max-height:calc(100dvh - 12px)}
 .catalog-dialog-head{padding:11px 13px}
 .catalog-dialog-body{padding:12px 13px;max-height:calc(100dvh - 140px)}
 .catalog-dialog-footer{padding:10px 13px}
 .catalog-type-properties{grid-template-columns:minmax(0,1fr)}
 .catalog-field-group .work-extra-field{grid-template-columns:minmax(0,1fr)}
 .member-dialog.catalog-dialog{width:calc(100vw - 12px);max-width:none}
 .member-dialog.catalog-dialog form>:not(.catalog-dialog-head):not(footer){margin-left:13px;margin-right:13px}
 .template-list-table th:nth-child(3),.template-list-table td:nth-child(3){display:none}
 .template-list-table :is(th,td){padding:8px 9px}
}
/* Document composition is a large native dialog, not a narrow side card. */
.template-editor-dialog{position:relative;width:min(1520px,calc(100vw - 26px));max-width:none;max-height:calc(100dvh - 26px);padding:0!important;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable;box-shadow:0 20px 70px rgba(13,37,48,.2)}
.template-editor-dialog .template-editor-toolbar{position:sticky;top:0;z-index:5;background:var(--surface);padding:11px 15px;margin:0;border-bottom:1px solid var(--line);justify-content:space-between;min-height:52px}
.template-editor-dialog .template-editor-toolbar .ui-dialog-close{position:static;flex:none}
.template-editor-dialog>[data-template-editor]{border:0;border-radius:0;margin:0;padding:15px 18px;box-shadow:none;max-width:none;width:100%}
.template-editor-dialog .template-editor-workspace{min-width:0}
@media(max-width:650px){.template-editor-dialog{width:calc(100vw - 10px);max-height:calc(100dvh - 12px)}.template-editor-dialog>[data-template-editor]{padding:11px}.template-editor-dialog .template-editor-toolbar{padding:9px 11px}}
/* Workflow policy is a compact setting row, not a marketing card. */
.workflow-compact{padding:12px 15px}
.workflow-compact .catalog-list-header{margin:0 0 9px}
.workflow-compact .catalog-list-header h2{font-size:16px;margin:0}
.workflow-switch-list{display:flex;flex-wrap:wrap;align-items:center;gap:8px 23px}
.workflow-switch-list .ui-switch{display:inline-flex;align-items:center;gap:8px;margin:0;font-size:13px;font-weight:550;min-height:34px}
.workflow-switch-list .ui-switch input{flex:none;width:38px;min-width:38px;max-width:38px;height:22px;min-height:22px;margin:0;padding:2px}
@media(max-width:650px){.workflow-switch-list{display:grid;grid-template-columns:1fr;gap:9px}.workflow-switch-list .ui-switch{align-items:center}}

/* dev.34: proper button geometry and accessible responsive update picker. */
#update-panel .update-dropzone{width:100%;box-sizing:border-box;max-width:100%;min-height:86px}
#update-panel .update-dropzone .update-browse{margin-left:auto}
#update-panel .update-return{min-height:34px;padding:8px 15px;border-radius:8px;border:1px solid var(--accent,#138778);font-size:13px;font-weight:650;text-decoration:none;line-height:1.2}
#update-panel .update-return:focus-visible{outline:1px solid var(--accent,#138778);outline-offset:2px}
@media(max-width:640px){#update-panel .update-dropzone .update-browse{margin-left:0}#update-panel .update-return{width:100%;justify-content:center}}
