@font-face{font-family:BioSans;src:url("/static/branding/fonts/BioSans-SemiBold.798520d6d5fb.otf") format("opentype");font-weight:600;font-style:normal;font-display:swap}
@font-face{font-family:Ubuntu;src:url("/static/branding/fonts/Ubuntu-Regular.2505bfbd9bde.ttf") format("truetype");font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:NotoSans;src:url("/static/branding/fonts/NotoSans-Regular.5a87cce84010.ttf") format("truetype");font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:NotoSans;src:url("/static/branding/fonts/NotoSans-Bold.98f0cacc6bb6.ttf") format("truetype");font-weight:700;font-style:normal;font-display:swap}
:root{--navy:#011826;--blue:#03318C;--deep:#021F59;--mid:#033E8C;--sea:#03588C;--ink:#122638;--muted:#53697a;--line:#d7e1e9;--paper:#f3f7fa;--surface:#fff;--soft-blue:#eaf1fb;--ok:#176442;--ok-bg:#e7f4ec;--warn:#805000;--warn-bg:#fff3d7;--bad:#9c302c;--bad-bg:#fbeceb;--shadow:0 10px 28px rgba(1,24,38,.07);--radius:12px}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;background:var(--paper);color:var(--ink);font:400 15px/1.55 NotoSans,sans-serif}
a{color:var(--blue);text-underline-offset:3px}
a:hover{color:var(--deep)}
button,input,select,textarea{font:inherit}
button,a,input,select,textarea{outline-offset:3px}
:focus-visible{outline:3px solid #a66a00}
h1,h2,h3{font-family:BioSans,sans-serif;font-weight:600;color:var(--navy);line-height:1.2;margin:0 0 .6em}
h1{font-size:clamp(1.65rem,3vw,2.2rem);letter-spacing:-.025em}
h2{font-size:1.35rem}h3{font-size:1.08rem}
p{margin:.3rem 0 1rem}
.subhead,.eyebrow{font-family:Ubuntu,sans-serif}
.subhead{color:var(--muted);font-size:1.02rem}
.site-header{background:var(--deep);color:#fff;border-bottom:4px solid var(--blue)}
.header-inner{max-width:1240px;min-height:76px;margin:auto;padding:10px 24px;display:flex;align-items:center;gap:28px}
.brand{display:flex;align-items:center;min-width:150px}
.brand img{display:block;width:154px;height:auto}
.main-nav{display:flex;align-items:center;gap:4px;flex:1;min-width:0;flex-wrap:wrap}
.main-nav a{color:#eaf1fb;text-decoration:none;font-size:.92rem;font-weight:700;padding:10px 12px;border-radius:7px}
.main-nav a:hover,.main-nav a:focus-visible{background:rgba(255,255,255,.13);color:#fff}
.account-nav{display:flex;align-items:center;gap:12px;margin-left:auto;font-size:.88rem}
.account-nav .profile-link{color:#fff;text-decoration:none}
.account-nav form{margin:0}
.logout{background:transparent;color:#fff;border:1px solid rgba(255,255,255,.45);border-radius:6px;padding:7px 10px;cursor:pointer}
.logout:hover{background:rgba(255,255,255,.12)}
.mobile-nav{display:none}
.page-shell{max-width:1240px;margin:0 auto;padding:34px 24px 56px;min-height:calc(100dvh - 150px)}
.page-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:20px;margin-bottom:24px}
.page-heading p{color:var(--muted);max-width:760px;margin:0}
.eyebrow{font-size:.76rem;letter-spacing:.1em;text-transform:uppercase;color:var(--sea);font-weight:700;margin-bottom:7px}
.on-dark{color:#d7e5f7}
.panel,.e5-card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow)}
.panel-pad,.e5-card-pad{padding:22px}
.section-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:16px}
.section-heading h2{margin:0}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:42px;padding:9px 15px;border:1px solid var(--blue);border-radius:7px;background:var(--blue);color:#fff;text-decoration:none;font-weight:700;line-height:1.2;cursor:pointer}
.btn:hover{background:var(--deep);border-color:var(--deep);color:#fff}
.btn-secondary{background:#fff;color:var(--blue);border-color:#b5c8dd}
.btn-secondary:hover{background:var(--soft-blue);color:var(--deep)}
.btn-danger{background:var(--bad);border-color:var(--bad)}
.btn-danger:hover{background:#79221f;border-color:#79221f}
.btn-small{min-height:34px;padding:6px 10px;font-size:.86rem}
.btn:disabled{opacity:.58;cursor:not-allowed}
.actions{display:flex;flex-wrap:wrap;align-items:center;gap:9px}
.inline-form{display:inline-flex;margin:0}
.filter-bar{display:flex;flex-wrap:wrap;align-items:end;gap:12px;padding:16px;margin-bottom:18px;background:#eaf0f5;border:1px solid var(--line);border-radius:10px}
.field{display:grid;gap:6px;min-width:0}
.field label{font-weight:700;color:var(--navy);font-size:.9rem}
.field input,.field select,.field textarea{width:100%;min-height:43px;padding:9px 11px;border:1px solid #9eb1c1;border-radius:6px;background:#fff;color:var(--ink)}
.field textarea{min-height:110px;resize:vertical}
.field input:focus,.field select:focus,.field textarea:focus{border-color:var(--blue);box-shadow:0 0 0 3px rgba(3,49,140,.13)}
.search-field{flex:1 1 260px}
.filter-state{flex:0 1 190px}
.table-wrap{overflow-x:auto;border:1px solid var(--line);border-radius:9px;background:#fff}
table{border-collapse:collapse;width:100%;text-align:left}
th,td{padding:12px 14px;border-bottom:1px solid #e4ebf0;vertical-align:top}
th{font:400 .88rem Ubuntu,sans-serif;letter-spacing:.02em;color:var(--deep);background:#edf3f8}
tbody tr:last-child td{border-bottom:0}
tbody tr:hover{background:#f8fbfd}
td strong{color:var(--navy)}
.secondary-text{display:block;color:var(--muted);font-size:.86rem;margin-top:3px}
.status{display:inline-flex;align-items:center;gap:6px;padding:4px 9px;border-radius:99px;font-weight:700;font-size:.8rem;white-space:nowrap}
.status-active{color:#145c3b;background:var(--ok-bg)}
.status-inactive{color:#7a2b27;background:var(--bad-bg)}
.status-pending{color:#704a00;background:var(--warn-bg)}
.status-neutral{color:#334b5e;background:#eaf0f4}
.stat-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:22px 0}
.stat-card{padding:19px 20px;border-radius:10px;background:var(--deep);color:white;position:relative;overflow:hidden}
.stat-card:nth-child(2){background:var(--mid)}.stat-card:nth-child(3){background:var(--sea)}
.stat-label{font:400 .93rem Ubuntu,sans-serif;opacity:.9}
.stat-value{display:block;font:600 2rem BioSans,sans-serif;margin-top:6px}
.stat-value.compact-metric{font-size:1.3rem;overflow-wrap:anywhere}
.stat-card a{color:white}
.detail-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.detail-item{padding:14px 0;border-bottom:1px solid #e7edf2}
.detail-item dt{font-size:.82rem;color:var(--muted);font-weight:700;margin-bottom:3px}
.detail-item dd{margin:0;overflow-wrap:anywhere}
.record-list{display:grid;gap:0}
.record-row{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:15px 0;border-bottom:1px solid #e6edf2}
.record-row:last-child{border-bottom:0}
.record-row time{font-size:.84rem;color:var(--muted);white-space:nowrap}
.empty-state{padding:32px 20px;text-align:center;border:1px dashed #a9bdcc;border-radius:9px;background:#f8fbfd}
.empty-state h2,.empty-state h3{margin-bottom:7px}
.empty-state p{color:var(--muted);margin:0 auto 15px;max-width:500px}
[data-pagination-region]{overflow-anchor:none;display:flex;flex-direction:column}
[data-pagination-region]>.pagination,
[data-pagination-region]>.configuration-pagination{margin-top:auto;padding-top:16px}
.pagination{display:flex;justify-content:space-between;align-items:center;gap:14px;margin-top:16px;color:var(--muted)}
.pagination-links{display:flex;gap:8px}
.pagination a{border:1px solid #b5c8d8;background:#fff;border-radius:6px;padding:7px 11px;text-decoration:none}
.form-panel{max-width:760px}
.form-content{display:grid;gap:18px}
.form-field,.e5-field{display:grid;gap:5px}
.form-field label,.e5-field label{font-weight:700;color:var(--navy)}
.form-field input,.form-field select,.form-field textarea,.e5-field input,.e5-field select,.e5-field textarea{width:100%;min-height:44px;padding:10px 12px;border:1px solid #9eb1c1;border-radius:6px;background:#fff;color:var(--ink)}
.form-field textarea,.e5-field textarea{min-height:120px}
.help-text{font-size:.85rem;color:var(--muted)}
.field-errors,.errorlist{color:var(--bad);font-size:.86rem;margin:0;padding-left:20px}
.form-error,.alert{padding:12px 15px;border-radius:8px;margin-bottom:16px}
.form-error,.alert-error{color:#76231f;background:var(--bad-bg);border:1px solid #e7b9b6}
.alert-success{color:#145c3b;background:var(--ok-bg);border:1px solid #b8d9c4}
.alert-info{color:var(--deep);background:var(--soft-blue);border:1px solid #c6d5ea}
.alert-warning{color:#704a00;background:var(--warn-bg);border:1px solid #ead59c}
.confirmation{max-width:700px}
.confirmation-symbol{width:44px;height:44px;border-radius:50%;display:grid;place-items:center;background:var(--warn-bg);color:var(--warn);font:600 1.4rem BioSans,sans-serif;margin-bottom:15px}
.auth-shell{min-height:100dvh;display:grid;grid-template-columns:minmax(280px, .92fr) minmax(360px,1.08fr);background:var(--paper)}
.auth-brand{background:var(--deep);color:white;padding:clamp(28px,6vw,76px);display:flex;flex-direction:column;justify-content:space-between;position:relative;overflow:hidden}
.auth-brand:after{content:"";position:absolute;width:390px;height:390px;border:1px solid rgba(255,255,255,.12);border-radius:50%;right:-160px;bottom:-180px;box-shadow:0 0 0 38px rgba(255,255,255,.035),0 0 0 78px rgba(255,255,255,.025)}
.auth-brand img{width:min(230px,80%);height:auto;position:relative;z-index:1}
.auth-brand-copy{max-width:440px;position:relative;z-index:1}
.auth-brand-copy h1{color:#fff;font-size:clamp(2rem,4vw,3.25rem)}
.auth-brand-copy p{color:#dce7f5;font-size:1.04rem}
.auth-meta{color:#cad9ec;font-size:.85rem}
.auth-main{display:grid;place-items:center;padding:30px}
.auth-card{width:min(100%,480px);padding:clamp(23px,4vw,40px);background:#fff;border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadow)}
.auth-card h1{font-size:1.8rem}
.auth-card .form-content{gap:17px}
.auth-card .btn{width:100%;margin-top:4px}
.auth-links{display:grid;gap:10px;margin-top:19px;font-size:.92rem}
.auth-mobile-logo{display:none}
.site-footer{border-top:1px solid var(--line);padding:17px 24px;text-align:center;color:var(--muted);font-size:.84rem}
.dev-banner{background:#fff3d7;color:#694600;text-align:center;font-weight:700;padding:6px 12px;font-size:.8rem}
.audit-meta{font-size:.85rem;color:var(--muted)}
.public-page>.site-header,.public-page>.site-footer{display:none}
@media(max-width:900px){.header-inner{flex-wrap:wrap;gap:10px;padding:12px 18px}.main-nav{order:3;flex-basis:100%;overflow-x:visible}.account-nav{margin-left:auto}.page-shell{padding:26px 18px 44px}.auth-shell{grid-template-columns:minmax(250px,.75fr) minmax(340px,1.25fr)}}
@media(max-width:650px){body{font-size:14px}.header-inner{padding:10px 14px;min-height:auto}.brand{min-width:0}.brand img{width:128px}.main-nav{gap:2px;padding-bottom:2px}.main-nav a{font-size:.84rem;padding:8px 9px;white-space:nowrap}.account-nav{gap:8px;font-size:.8rem}.account-nav .profile-link{max-width:100px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.logout{padding:6px 8px}.page-shell{padding:23px 14px 38px}.page-heading{display:block}.page-heading .actions{margin-top:16px}.stat-grid{gap:8px}.stat-card{padding:15px 12px}.stat-label{font-size:.82rem}.stat-value{font-size:1.6rem}.detail-grid{grid-template-columns:1fr}.panel-pad{padding:17px}.filter-bar{padding:12px}.search-field,.filter-state{flex:1 1 100%}.table-wrap{overflow:visible;border:0;background:transparent}table,tbody,tr,td{display:block;width:100%}thead{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}tbody{display:grid;gap:10px}tbody tr{padding:8px 13px;background:#fff;border:1px solid var(--line);border-radius:8px;box-shadow:0 2px 7px rgba(1,24,38,.04)}td{display:grid;grid-template-columns:minmax(96px,34%) 1fr;gap:10px;padding:8px 0;border-bottom:1px solid #e8eef3}td:last-child{border-bottom:0}td:before{content:attr(data-label);font:400 .83rem Ubuntu,sans-serif;color:var(--muted)}.users-table-wrap{width:100%;min-width:0;max-width:100%;overflow:visible}.users-table,.users-table tbody,.users-table tr,.users-table td{width:100%;min-width:0;max-width:100%}.users-table td{grid-template-columns:minmax(0,7rem) minmax(0,1fr);overflow-wrap:anywhere}.users-table td>*{min-width:0;max-width:100%;overflow-wrap:anywhere}.users-table td a{word-break:break-word}.users-table .status{white-space:normal}.users-table details,.users-table summary,.users-table p{min-width:0;max-width:100%;overflow-wrap:anywhere}.users-table td[data-label="Acciones"] .actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch;gap:7px}.users-table td[data-label="Acciones"] .actions>a,.users-table td[data-label="Acciones"] .actions>form{width:100%;min-width:0}.users-table td[data-label="Acciones"] .actions .btn{width:100%;min-width:0;white-space:normal;text-align:center;overflow-wrap:anywhere}.pagination{align-items:flex-start;flex-direction:column}.record-row{display:block}.record-row time{display:block;margin-top:6px}.auth-shell{display:block;background:var(--paper)}.auth-brand{display:none}.auth-main{min-height:100dvh;align-content:center;padding:22px 15px}.auth-card{padding:23px 20px}.auth-mobile-logo{display:block;width:150px;height:auto;margin:0 auto 22px}.auth-card h1{font-size:1.65rem}.site-footer{padding:14px}}
@media(max-width:650px){.users-table td[data-label="Acciones"] .actions{grid-template-columns:minmax(0,1fr)}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}

/* Shared, exact operational/result badges. State and technical outcome are
   deliberately independent dimensions and must remain readable together. */
.operational-badges{display:inline-flex;flex-wrap:wrap;align-items:center;gap:5px;max-width:100%;vertical-align:middle}
.status-state-draft,.status-state-sent,.status-state-scheduled,.status-state-preparing,
.status-state-executing,.status-state-pending-close,.status-state-closed,
.status-state-cancelled,.status-state-police,.status-state-info,.status-state-rejected,
.status-result-ok,.status-result-fail,.status-result-pending,.status-result-na{
  display:inline-flex;align-items:center;justify-content:center;max-width:100%;
  padding:4px 9px;border:1px solid transparent;border-radius:7px;
  font-size:.79rem;font-weight:700;line-height:1.3;white-space:normal;
  overflow-wrap:anywhere;text-align:center
}
.status-state-draft{color:#46596b;background:#edf1f4;border-color:#d9e1e7}
.status-state-sent{color:#373c78;background:#eeeffb;border-color:#d6d8f0}
.status-state-scheduled{color:#145276;background:#e5f3fa;border-color:#c5e3f1}
.status-state-preparing{color:#60427b;background:#f2eafa;border-color:#e1d1ef}
.status-state-executing{color:#174c80;background:#e5eff9;border-color:#c9dced}
.status-state-pending-close{color:#714b00;background:#fff3d7;border-color:#ebd59f}
.status-state-closed{color:#145a50;background:#e4f3ef;border-color:#c6e4dc}
.status-state-cancelled{color:#495560;background:#e9edef;border-color:#d3dade}
.status-state-cancelled:before{content:"×";font-weight:800;margin-right:4px}
.status-state-police{color:#762a27;background:#fbeceb;border-color:#e9c1bf}
.status-state-info{color:#714b00;background:#fff3d7;border-color:#ebd59f}
.status-state-rejected{color:#762a27;background:#fbeceb;border-color:#e9c1bf}
.status-result-ok{color:#145c3b;background:#e7f4ec;border-color:#bfdfca}
.status-result-fail{color:#762a27;background:#fbeceb;border-color:#e9c1bf}
.status-result-pending{color:#704a00;background:#fff3d7;border-color:#ead59c}
.status-result-na{color:#46596b;background:#edf1f4;border-color:#d9e1e7}
.home-ops-heading{display:flex;align-items:center;justify-content:space-between;gap:18px;margin:0 0 14px}
.home-ops-heading h1{margin:0;font-size:clamp(1.5rem,2.7vw,2rem)}
.home-ops-heading-meta{display:flex;align-items:center;flex-wrap:wrap;gap:10px 16px;color:#d7e4f2}
.home-ops-heading-meta time{font:400 .9rem Ubuntu,sans-serif}
.home-greeting{color:var(--muted);font-size:.9rem;margin:0 0 17px}
.home-ops-section{margin:14px 0;padding:17px 19px}
.home-ops-section .section-heading{margin-bottom:9px}
.home-ops-section .section-heading h2{font-size:1.13rem}
.home-ops-section.is-compact{padding:12px 16px}
.home-ops-section.is-compact .section-heading{margin:0}
.home-ops-help{margin:8px 0 0;color:var(--muted);font-size:.82rem}
.home-ops-list{display:grid}
.home-ops-row{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr) minmax(170px,1.1fr) minmax(150px,.8fr);gap:13px;align-items:start;padding:13px 0;border-top:1px solid #e4ebf0}
.home-ops-row:first-child{border-top:1px solid #e4ebf0}
.home-ops-cell{min-width:0;overflow-wrap:anywhere}
.home-ops-primary{font-weight:700;color:var(--navy)}
.home-ops-primary a{text-decoration:none}
.home-ops-primary a:hover{text-decoration:underline}
.home-ops-secondary{display:block;margin-top:3px;color:var(--muted);font-size:.83rem}
.home-ops-times{display:grid;gap:3px;color:#40576a;font-size:.83rem}
.home-ops-times strong{font-weight:700;color:#263e53}
.home-ops-actions{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.home-ops-action{display:inline-flex;align-items:center;min-height:31px;padding:5px 9px;border:1px solid #b5c8dd;border-radius:5px;background:#fff;color:var(--blue);font-size:.8rem;font-weight:700;text-decoration:none}
.home-ops-action:hover{background:var(--soft-blue);color:var(--deep)}
.home-attention-item{padding:12px 0;border-top:1px solid #e4ebf0}
.home-attention-top{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}
.home-attention-actions{display:flex;flex-wrap:wrap;gap:7px;margin-top:8px}
.home-attention-meta{display:flex;flex-wrap:wrap;gap:4px 14px;color:var(--muted);font-size:.84rem;margin-top:4px}
.home-attention-kind{font-size:.78rem;font-weight:700;color:#714b00}
.home-mini-access{display:flex;flex-wrap:wrap;gap:8px}
.home-mini-access a{display:inline-flex;align-items:center;gap:7px;padding:7px 10px;border:1px solid var(--line);border-radius:6px;background:#f8fafb;color:var(--deep);font-size:.84rem;font-weight:700;text-decoration:none}
.home-mini-access strong{font-family:BioSans,sans-serif;font-size:1.05rem}
.home-pending-compact{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
.home-pending-compact h3{margin:0 0 7px;font-size:.98rem}
.home-compact-links{display:grid;gap:6px}
.home-compact-links a{display:flex;justify-content:space-between;gap:9px;padding:7px 0;border-top:1px solid #e8eef2;color:var(--ink);text-decoration:none;font-size:.85rem}
.home-compact-links a:hover{color:var(--blue)}
.home-service-ref{display:block}
.home-service-ref .secondary-text{margin-top:1px;font-size:.78rem}
.home-monitor-controls{display:grid;gap:4px;margin-top:7px;font-size:.8rem}
.home-monitor-controls a{color:var(--blue)}
.home-monitor-controls--overdue{padding:7px 9px;background:#fff3d7;border-radius:5px}
.home-assignment-details{margin-top:11px;border-top:1px solid var(--line);padding-top:10px}
.home-assignment-details summary,.home-finalized summary{cursor:pointer;color:var(--blue);font-weight:700;font-size:.88rem}
.home-finalized{margin-top:10px;padding-top:10px;border-top:1px solid var(--line)}
.home-client-orders{display:grid;grid-template-columns:minmax(150px,.8fr) minmax(150px,1fr) minmax(150px,1.1fr) minmax(120px,.7fr);align-items:center}
.home-client-orders .home-order-row{display:contents}
.home-client-orders .home-order-row>span,.home-client-orders .home-order-row>time{min-width:0;padding:11px 10px;border-top:1px solid #e5ebef;overflow-wrap:anywhere}
.home-client-orders .home-order-row:first-child>span,.home-client-orders .home-order-row:first-child>time{border-top:0}
.home-client-orders-heading{display:grid;grid-template-columns:minmax(150px,.8fr) minmax(150px,1fr) minmax(150px,1.1fr) minmax(120px,.7fr);padding:8px 10px;background:#edf3f8;color:var(--deep);font:400 .84rem Ubuntu,sans-serif}
.home-client-orders .status{white-space:normal;justify-self:start}
@media(max-width:650px){
  .home-attention-top{flex-direction:column;align-items:flex-start}
  .home-attention-top>.operational-badges{flex:none;max-width:100%;align-self:flex-start}
  .home-attention-top>.operational-badges>span{max-width:100%;white-space:normal}
}
.home-service-list .status,.home-ops-row .status{white-space:normal}
@media(max-width:850px){
 .home-ops-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
 .home-ops-actions{grid-column:1/-1}
}
@media(max-width:650px){
 .home-ops-heading{align-items:flex-start}
 .home-ops-heading-meta{justify-content:flex-end}
 .home-ops-section{padding:14px}
 .home-ops-row{grid-template-columns:minmax(0,1fr);gap:7px}
 .home-ops-actions{grid-column:auto}
 .home-pending-compact{grid-template-columns:minmax(0,1fr)}
 .home-client-orders{display:block}
 .home-client-orders-heading{display:none}
 .home-client-orders .home-order-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);padding:9px 0;border-top:1px solid #e5ebef}
 .home-client-orders .home-order-row>span,.home-client-orders .home-order-row>time{padding:5px 6px;border:0}
}

/* E2 operations: compact decision surfaces, retaining the PGA brand system. */
.e2-stack{display:grid;gap:18px}
.e2-panel{margin-bottom:18px}
.e2-note{padding:13px 16px;border-left:4px solid var(--sea);background:#eaf1f5;border-radius:5px;color:#294457}
.e2-note.pending{border-left-color:#a36b00;background:#fff4dc}
.e2-section-title{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:12px}
.e2-section-title h2{margin:0}
.e2-record{padding:16px 0;border-bottom:1px solid #e4ebf0}
.e2-record:last-child{border-bottom:0}
.e2-record-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.e2-record-head h3{margin:0}
.e2-mono{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:.84rem}
.e2-pre{max-height:440px;overflow:auto;padding:15px;background:#f1f5f7;border:1px solid var(--line);border-radius:7px;white-space:pre-wrap;overflow-wrap:anywhere;font: .82rem/1.5 ui-monospace,SFMono-Regular,Consolas,monospace}
.e2-readable{margin:12px 0 20px}
.e2-data-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1px;margin:0;background:var(--line);border:1px solid var(--line);border-radius:8px;overflow:hidden}
.e2-data-item{min-width:0;padding:12px 14px;background:#f8faf9}
.e2-data-item dt{margin:0 0 5px;color:var(--muted);font-size:.78rem;font-weight:650;letter-spacing:.025em}
.e2-data-item dd{margin:0;overflow-wrap:anywhere;white-space:pre-wrap}
.e2-data-item--wide{grid-column:1/-1}
.e2-data-nested{margin-top:8px}
.e2-data-nested>.e2-data-list{grid-template-columns:repeat(2,minmax(0,1fr));border-radius:6px}
.e2-data-list--flat{display:block;border:0;background:transparent}
.e2-data-list--flat>.e2-data-item{padding:6px 0;background:transparent;border-bottom:1px solid #e4ebf0}
.e2-protocol-definition{margin-top:12px}
.e2-protocol-definition pre{max-width:100%;margin:8px 0 0;padding:14px;border:1px solid var(--line);border-radius:7px;background:#f8faf9;white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;line-height:1.6}
.e2-protocol-definition summary{cursor:pointer;font-weight:650}
.e2-version-list .e2-record{padding:12px 0}
.e2-photo-link{display:inline-flex;align-items:center;min-height:36px;margin:3px 8px 3px 0;padding:6px 10px;border:1px solid var(--line);border-radius:6px;text-decoration:none}
@media(max-width:560px){.e2-data-list,.e2-data-nested>.e2-data-list{grid-template-columns:minmax(0,1fr)}.e2-data-item--wide{grid-column:auto}.e2-record-head{gap:8px}.e2-record-head time{display:block;margin-top:5px}}
.e2-photo-links{display:flex;flex-wrap:wrap;gap:8px}
.e2-actions{margin-top:14px}
.e2-inline{display:inline}
.e2-timeline{border-left:2px solid #cbd9e4;margin:8px 0 4px 8px;padding-left:18px}
.e2-timeline-item{position:relative;padding:0 0 17px}
.e2-timeline-item:before{content:"";position:absolute;left:-24px;top:7px;width:9px;height:9px;border-radius:50%;background:var(--sea);border:2px solid #fff;box-shadow:0 0 0 1px var(--sea)}
.e2-split{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(270px,.65fr);gap:18px;align-items:start}
.e2-filter{align-items:end}
.e2-filter .field{min-width:180px;flex:1}
.e2-form-section{padding-top:7px;border-top:1px solid var(--line)}
.e2-form-section h3{margin:0 0 12px}
.e2-protocol{border-top:1px solid #e4ebf0;padding:13px 0}
.e2-protocol:first-child{border-top:0}
.e2-muted{color:var(--muted)}
@media(max-width:760px){.e2-split{grid-template-columns:1fr}.e2-record-head{display:block}.e2-record-head .status{margin-top:8px}.e2-section-title{display:block}.e2-section-title .actions{margin-top:10px}}

/* Keep the mobile agenda cards inside the page instead of allowing the
   intrinsic width of a date, client name or status badge to expand the grid. */
@media(max-width:650px){
  .e2-agenda-wrap,.e2-agenda-table,.e2-agenda-table tbody,
  .e2-agenda-table tr,.e2-agenda-table td{width:100%;min-width:0;max-width:100%}
  .e2-agenda-table td{grid-template-columns:minmax(0,7rem) minmax(0,1fr);overflow-wrap:anywhere}
  .e2-agenda-table td>*{min-width:0;max-width:100%;overflow-wrap:anywhere}
  .e2-agenda-table .status{white-space:normal}
}

/* PGA workspace — navigation rail and compact operational surfaces. */
:root{
  --navy:#011826;
  --blue:#03318C;
  --deep:#021F59;
  --mid:#033E8C;
  --sea:#03588C;
  --ink:#172d43;
  --muted:#617488;
  --line:#d8e2e9;
  --paper:#f2f6f8;
  --surface:#fff;
  --soft-blue:#e8f0f7;
  --shadow:0 8px 24px rgba(6,38,81,.055);
}
html,body{min-height:100%}
body:not(.public-page){background:#f2f6f8}
.site-header{position:fixed;inset:0 auto 0 0;width:252px;z-index:20;background:var(--deep);color:#fff;border:0;box-shadow:5px 0 24px rgba(6,38,81,.09)}
.header-inner{height:100%;max-width:none;min-height:0;margin:0;padding:21px 16px 18px;display:flex;align-items:stretch;flex-direction:column;gap:0}
.brand{display:flex;min-width:0;padding:1px 10px 23px;border-bottom:1px solid rgba(255,255,255,.16)}
.brand img{width:158px}
.main-nav{display:grid;align-content:start;gap:5px;flex:1;padding-top:24px}
.main-nav a{display:flex;align-items:center;gap:12px;min-height:43px;padding:10px 12px;color:#e3edf8;border:1px solid transparent;border-radius:7px;font-size:.9rem}
.main-nav a:hover,.main-nav a:focus-visible,.main-nav a[aria-current="page"]{background:#143e77;border-color:rgba(255,255,255,.07);color:#fff}
.main-nav a[aria-current="page"]{box-shadow:inset 3px 0 #8db5d4}
.nav-section-label{margin:0 10px 8px;color:#9cb4cf;font:700 .68rem Ubuntu,sans-serif;letter-spacing:.13em;text-transform:uppercase}
.nav-group{display:grid;gap:5px}
.account-nav{display:grid;align-items:start;gap:10px;margin:18px 0 0;padding:16px 9px 0;border-top:1px solid rgba(255,255,255,.16);font-size:.86rem}
.account-nav .profile-link{color:#fff;text-decoration:none;font-weight:700}
.logout{min-height:34px;padding:6px 0;border:0;color:#d7e4f2;text-align:left}
.logout:hover{background:transparent;color:#fff;text-decoration:underline}
.mobile-nav{display:block}
.mobile-nav>summary{display:none}
.mobile-nav:not([open])>.main-nav{display:grid}
.workspace{min-width:0;min-height:100dvh;margin-left:252px;display:flex;flex-direction:column}
.workspace-topbar{height:57px;display:flex;align-items:center;justify-content:space-between;gap:14px;padding:0 clamp(20px,3vw,42px);background:#f8fafb;border-bottom:1px solid #e0e8ed;color:var(--muted);font-size:.83rem}
.workspace-topbar a{color:#375674;text-decoration:none}
.workspace-topbar a:hover{text-decoration:underline}
.topbar-kicker{font:400 .84rem Ubuntu,sans-serif}
.page-shell{width:100%;max-width:1500px;min-height:calc(100dvh - 105px);margin:0 auto;padding:32px clamp(20px,3vw,42px) 52px}
.site-footer{background:#f2f6f8}
.public-page .site-header,.public-page .site-footer{display:none}
.page-heading{margin-bottom:22px}
.page-heading h1{margin-bottom:7px}
.form-panel{max-width:860px}
.form-content{gap:14px}
.form-field input,.form-field select,.form-field textarea,.field input,.field select,.field textarea{min-height:40px}
.filter-bar{padding:13px 15px;gap:10px}
.filter-bar .field{flex:1 1 185px}
.table-wrap{max-width:100%;overflow-x:auto;overscroll-behavior-inline:contain}
.table-wrap table{min-width:600px}
.table-wrap th,.table-wrap td{padding:11px 12px}
.request-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.request-grid>*{min-width:0}
.context-create{display:grid;grid-template-columns:minmax(0,1fr) minmax(220px,.72fr);align-items:start;gap:14px}
.context-create>details{padding:12px 14px;border:1px solid var(--line);border-radius:8px;background:#f8fafb}
.context-create summary{cursor:pointer;color:var(--blue);font-weight:700}
.selector-actions{display:flex;align-items:end;gap:10px;flex-wrap:wrap}
.selector-actions>.field{flex:1 1 210px}
.selector-actions>details{position:relative}
.service-accesses{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.service-access{position:relative;display:flex;min-height:104px;flex-direction:column;justify-content:space-between;padding:16px 17px;background:#fff;border:1px solid var(--line);border-radius:8px;color:var(--ink);text-decoration:none;transition:transform .18s ease,border-color .18s ease}
.service-access:hover{transform:translateY(-2px);border-color:#9bb5ca;color:var(--ink)}
.service-access strong{font:600 1.02rem BioSans,sans-serif;color:var(--navy)}
.service-access span{font-size:.87rem;color:var(--muted)}
.service-access .access-arrow{align-self:flex-end;color:var(--blue);font-size:1.1rem;line-height:1}
.service-accesses-heading{margin:0 0 12px}
.home-welcome{position:relative;overflow:hidden;margin-bottom:25px;padding:25px 28px;background:var(--deep);border-radius:9px;color:#e5edf7}
.home-welcome:after{content:"";position:absolute;right:7%;top:-85px;width:205px;height:205px;border:1px solid rgba(255,255,255,.1);border-radius:50%;box-shadow:0 0 0 25px rgba(255,255,255,.035),0 0 0 54px rgba(255,255,255,.025);pointer-events:none}
.home-welcome .eyebrow{color:#a9c6df}
.home-welcome h1{position:relative;z-index:1;margin:0 0 8px;color:#fff;font-size:clamp(1.7rem,3.2vw,2.25rem)}
.home-welcome p{position:relative;z-index:1;max-width:620px;margin:0;color:#d7e4f2}
.home-section{margin:24px 0}
.home-section h2{margin:0 0 12px;font-size:1.18rem}
.home-lower-grid{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(245px,.65fr);gap:14px;align-items:start}
.reference-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.reference-grid>*{min-width:0}
.client-tabs{display:flex;flex-wrap:wrap;gap:5px;margin:0 0 23px;padding:5px;background:#e6edf2;border:1px solid #d6e0e7;border-radius:8px}
.client-tabs a{display:inline-flex;align-items:center;min-height:38px;padding:7px 12px;border-radius:5px;text-decoration:none;color:#3d5870;font-size:.87rem;font-weight:700}
.client-tabs a:hover,.client-tabs a[aria-current="page"]{background:#fff;color:var(--deep);box-shadow:0 1px 4px rgba(6,38,81,.08)}
.client-tabs a[aria-current="page"]{box-shadow:inset 0 -2px var(--blue),0 1px 4px rgba(6,38,81,.08)}
.client-tabs .tab-spacer{flex:1}
.stat-grid{margin:18px 0 22px}
.stat-card{border-radius:8px}
.stat-card:nth-child(2){background:var(--mid)}
.stat-card:nth-child(3){background:var(--sea)}
.panel,.e5-card{border-radius:8px;box-shadow:0 4px 17px rgba(6,38,81,.035)}
.table-wrap{border-radius:7px}
.dev-banner{margin-left:252px}
@media(max-width:900px){
  .site-header{width:220px}
  .workspace{margin-left:220px}
  .dev-banner{margin-left:220px}
  .header-inner{height:100%;padding:18px 13px;flex-wrap:nowrap;gap:0}
  .main-nav{order:initial;flex-basis:auto;overflow:visible}
  .page-shell{padding:25px 20px 42px}
  .home-lower-grid{grid-template-columns:1fr}
}
@media(max-width:700px){
  .site-header{position:relative;inset:auto;width:auto;height:auto}
  .header-inner{position:relative;height:auto;padding:10px 14px;display:grid;grid-template-columns:1fr auto;align-items:center;gap:0}
  .brand{padding:0;border:0}
  .brand img{width:133px}
  .mobile-nav{display:block;grid-column:2;grid-row:1}
  .mobile-nav summary{list-style:none;display:flex;align-items:center;gap:8px;padding:9px 11px;border:1px solid rgba(255,255,255,.35);border-radius:6px;color:white;font-size:.85rem;cursor:pointer}
  .mobile-nav summary::-webkit-details-marker{display:none}
  .mobile-nav summary:after{content:"";width:7px;height:7px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(45deg);margin:-4px 2px 0 4px}
  .mobile-nav[open] summary:after{transform:rotate(225deg);margin:4px 2px 0 4px}
  .mobile-nav:not([open])>.main-nav{display:none}
  .mobile-nav[open]>.main-nav{position:absolute;top:100%;left:0;right:0;max-width:100%;z-index:30;display:grid;gap:3px;padding:12px 14px 16px;background:var(--deep);box-shadow:0 10px 18px rgba(6,38,81,.2)}
  .mobile-nav .main-nav a{min-height:40px;padding:8px 10px}
  .mobile-nav .nav-section-label{margin-top:8px}
  .header-inner>.account-nav{grid-column:1/-1;grid-row:3;margin:7px 0 0;padding:10px 3px 0;display:flex;align-items:center;justify-content:space-between}
  .workspace{min-height:calc(100dvh - 62px);margin-left:0}
  .workspace-topbar{height:43px;padding:0 15px}
  .page-shell{min-height:calc(100dvh - 110px);padding:22px 15px 38px}
  .dev-banner{margin-left:0}
  .main-nav a{white-space:normal}
  .service-accesses{grid-template-columns:repeat(2,minmax(0,1fr))}
  .request-grid,.context-create{grid-template-columns:minmax(0,1fr)}
  .reference-grid{grid-template-columns:minmax(0,1fr)}
  .client-tabs{gap:3px}
  .client-tabs a{padding:7px 9px}
  .table-wrap{overflow-x:auto;border:1px solid var(--line);background:#fff}
  .table-wrap table{display:table;min-width:620px}
  .table-wrap thead{position:static;width:auto;height:auto;overflow:visible;clip:auto;white-space:normal}
  .table-wrap tbody{display:table-row-group}
  .table-wrap tr{display:table-row;padding:0;border:0;border-radius:0;box-shadow:none}
  .table-wrap td{display:table-cell;width:auto;padding:9px 10px;border-bottom:1px solid #e4ebf0}
  .table-wrap td:before{content:none}
  .users-table-wrap{overflow-x:auto}
  .home-welcome{padding:22px 19px}
  .home-welcome:after{right:-70px}
  .stat-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .stat-card{padding:13px 10px}
  .stat-value{font-size:1.45rem}
}

/* E3 audit surfaces — trace attempts without blending internal and client records. */
.audit-stack,.audit-checklist-stack{gap:14px}
.audit-service-card{border-top:3px solid var(--sea)}
.audit-service-meta{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px 18px;margin:0}
.audit-service-meta>div{min-width:0;padding:8px 0;border-bottom:1px solid #e6edf2}
.audit-service-meta dt,.audit-json-fields dt{font-size:.78rem;font-weight:700;color:var(--muted);letter-spacing:.025em}
.audit-service-meta dd{margin:3px 0 0;overflow-wrap:anywhere}
.audit-action-panel .e2-section-title,.audit-controls>.e2-section-title,.audit-summary-panel>.e2-section-title{margin-bottom:12px}
.audit-control{min-width:0;padding:16px 0;border-top:1px solid var(--line)}
.audit-control:first-of-type{border-top:0}
.audit-control-heading{display:flex;justify-content:space-between;gap:12px}
.audit-control-label{font:600 1.05rem/1.35 BioSans,sans-serif;color:var(--navy);overflow-wrap:anywhere}
.audit-chips{display:flex;flex-wrap:wrap;gap:6px;margin:8px 0}
.audit-chip{display:inline-flex;align-items:center;min-height:25px;padding:3px 8px;border:1px solid #d6e0e6;border-radius:99px;background:#f3f7f9;color:#405a6e;font-size:.75rem;font-weight:700}
.audit-chip-required{color:#174a72;background:#eaf2f8;border-color:#cbdce8}
.audit-chip-warning,.audit-chip-pending{color:#704a00;background:var(--warn-bg);border-color:#ead59c}
.audit-chip-failure{color:#7a2b27;background:var(--bad-bg);border-color:#e7b9b6}
.audit-procedure{margin:10px 0 2px;padding:11px 13px;border-left:3px solid var(--mist);background:#f5f8f9;border-radius:4px}
.audit-procedure p{margin:4px 0 0;white-space:pre-wrap}
.audit-attempt-list{display:grid;gap:9px;margin-top:12px}
.audit-attempt{min-width:0;padding:12px;border:1px solid #e1e9ee;border-radius:7px;background:#fbfcfd}
.audit-attempt-top{display:flex;justify-content:space-between;gap:12px}
.audit-attempt-top span,.audit-snapshot-attempt>span{color:var(--muted);font-size:.82rem}
.audit-attempt p,.audit-snapshot-attempt p{margin:7px 0 0;overflow-wrap:anywhere}
.audit-empty-history{margin:10px 0;color:var(--muted);font-size:.88rem}
.audit-evidence-links{display:flex;flex-wrap:wrap;align-items:center;gap:7px;margin-top:8px}
.audit-evidence-links a{display:inline-flex;min-height:34px;align-items:center;padding:5px 9px;border:1px solid #c7d6e0;border-radius:5px;background:#fff;overflow-wrap:anywhere}
.audit-internal-note{margin-top:10px;padding:9px 11px;border-left:3px solid #657b8e;border-radius:4px;background:#edf1f4}
.audit-internal-note p{margin:4px 0 0;white-space:pre-wrap}
.audit-attempt-form{margin-top:20px}
.audit-scope,.audit-note{margin-top:12px;padding:11px 13px;border:1px solid var(--line);border-radius:6px;background:#f8fafb}
.audit-scope p,.audit-note p{margin:4px 0 0}
.audit-report-list{display:grid}
.audit-report-row{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:12px;padding:12px 0;border-top:1px solid var(--line)}
.audit-published-snapshot{margin:5px 0 14px;padding:12px;border:1px solid var(--line);border-radius:7px;background:#f8fafb}
.audit-published-snapshot summary{cursor:pointer;color:var(--blue);font-weight:700}
.audit-snapshot-meta{margin-top:12px}
.audit-snapshot-control{padding:13px 0}
.audit-snapshot-control h3{margin:0}
.audit-snapshot-attempt{display:grid;gap:3px;margin:9px 0;padding:10px;border-left:2px solid #bdced9;background:#fff}
.audit-client-empty{margin-top:3px}
.audit-json-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1px;margin:14px 0;background:var(--line);border:1px solid var(--line);border-radius:7px;overflow:hidden}
.audit-json-fields>div{min-width:0;padding:11px 13px;background:#f8fafb}
.audit-json-fields dt code,.audit-json-fields dd code{font:600 .86rem ui-monospace,SFMono-Regular,Consolas,monospace;color:var(--deep)}
.audit-json-fields dd{margin:4px 0 0;font-size:.88rem;overflow-wrap:anywhere}
.audit-example-warning{padding:12px 14px;border:1px solid #e7d19a;border-left:4px solid #a36b00;border-radius:5px;background:#fff8e8}
.audit-example-warning p{margin:4px 0 0}
.audit-service-links{margin:12px 0}
@media(max-width:700px){
 .audit-service-meta{grid-template-columns:1fr}
 .audit-report-row{grid-template-columns:minmax(0,1fr) auto;align-items:start}
 .audit-report-row>.btn{grid-column:1/-1;width:100%}
 .audit-json-fields{grid-template-columns:1fr}
 .audit-attempt-top{display:grid;gap:2px}
 .audit-control{padding:13px 0}
}
@media(max-width:420px){
  .service-accesses{grid-template-columns:1fr}
  .stat-grid{grid-template-columns:1fr}
  .stat-card{padding:12px 15px}
  .stat-value{font-size:1.35rem}
  .home-welcome h1{font-size:1.65rem}
}

/* Compact selector and in-flow context panel for request forms. */
.selector-actions{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:9px 11px}
.selector-actions>select{grid-column:1;min-width:0;width:100%;max-width:100%;flex:1 1 auto}
.selector-actions>details.context-create{display:contents}
.selector-actions>details.context-create>summary{grid-column:2;align-self:center;min-height:40px;display:inline-flex;align-items:center;justify-content:center;padding:7px 11px;border:1px solid #b5c8dd;border-radius:7px;background:#fff;color:var(--blue);font-size:.87rem;font-weight:700;line-height:1.2;white-space:nowrap;cursor:pointer}
.selector-actions>details.context-create>summary:hover{background:var(--soft-blue);color:var(--deep)}
.selector-actions>details.context-create[open]>.context-panel{grid-column:1/-1;min-width:0;width:100%;max-width:100%;padding:14px;border:1px solid var(--line);border-radius:8px;background:#f8fafb}
.selector-actions .context-panel{position:static;max-height:none;overflow:visible}
.selector-actions .context-panel>*{min-width:0;max-width:100%}
.selector-actions .context-panel input,.selector-actions .context-panel select,.selector-actions .context-panel textarea{min-width:0;max-width:100%}
.request-grid fieldset{min-width:0;margin:0;padding:13px 15px;border:1px solid var(--line);border-radius:8px;background:#fff}
.request-grid legend{padding:0 6px;color:var(--deep);font:600 .98rem BioSans,sans-serif}
.service-accesses a.panel.panel-pad{text-decoration:none;color:var(--ink);transition:transform .18s ease,border-color .18s ease}
.service-accesses a.panel.panel-pad:hover{transform:translateY(-2px);border-color:#9bb5ca;color:var(--ink)}
fieldset.request-grid{min-width:0;margin:0;padding:14px;border:1px solid var(--line);border-radius:8px}
.selector-actions>details.context-create[open]::details-content{display:contents}
.selector-actions>details.context-create:not([open])>.context-panel{display:none}
.workspace-topbar>span{min-width:0;overflow-wrap:anywhere}
.service-accesses{margin-bottom:20px}
@media(min-width:701px){.site-header{overflow-y:auto}}

/* E2 refinement — compact lists, explicit service language, and one-step validation. */
:root{--blue:#033E8C;--deep:#021F59;--mid:#03588C;--sea:#0378A6;--mist:#84B0BF}
.service-accesses{gap:10px}
.service-access{min-height:105px;padding:14px 15px}
.service-access-title,.service-list-label{display:inline-flex;align-items:center;gap:9px;min-width:0}
.service-access-title strong{font:600 1rem BioSans,sans-serif;color:var(--navy)}
.service-mark{display:inline-grid;place-items:center;flex:none;width:29px;height:29px;border:1px solid #c7dbe5;border-radius:7px;background:#f2f7f9;color:var(--sea)}
.service-mark svg{display:block;width:18px;height:18px}
.service-mark-monitor{color:var(--blue);background:#eff4fa}
.service-mark-escort{color:var(--deep);background:#edf3f8}
.service-list-label{white-space:nowrap}
.service-list-label strong{font-size:.91rem}
.service-list-label .service-mark{width:25px;height:25px;border-radius:6px}
.catalog-filters{align-items:end}
.catalog-filters .search-field{flex:1 1 230px}
.catalog-results-bar{display:flex;justify-content:space-between;gap:12px;margin:0 2px 8px;color:var(--muted);font-size:.82rem}
.catalog-table-wrap table{min-width:920px}
.catalog-table th,.catalog-table td{padding:9px 10px}
.catalog-table td{vertical-align:middle}
.catalog-table td strong{display:block}
.catalog-row-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;min-width:260px}
.catalog-row-actions>.btn{white-space:nowrap}
.catalog-validation-form{display:flex;gap:5px;grid-column:1/-1}
.catalog-validation-form input{width:100%;min-width:0;min-height:34px;padding:5px 7px;border:1px solid #b7c6d1;border-radius:5px;font-size:.78rem}
.catalog-validation-form .btn{flex:0 0 auto}
.catalog-detail-layout{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(270px,.55fr);gap:14px;align-items:start}
.catalog-detail-list{margin:0}
.catalog-detail-row{display:grid;grid-template-columns:minmax(150px,.42fr) minmax(0,1fr);gap:16px;padding:10px 0;border-bottom:1px solid #e7edf2}
.catalog-detail-row:last-child{border-bottom:0}
.catalog-detail-row dt{color:var(--muted);font-size:.84rem;font-weight:700}
.catalog-detail-row dd{margin:0;overflow-wrap:anywhere}
.catalog-validation-meta{display:grid;gap:3px;color:var(--muted);font-size:.88rem}
.catalog-note,.order-response-note{margin-top:13px;padding:12px 14px;background:#f3f7f9;border-left:3px solid var(--mist);border-radius:4px}
.catalog-note p,.order-response-note p{margin:5px 0 0;white-space:pre-wrap}
.catalog-detail-validation{margin-top:18px;padding-top:15px;border-top:1px solid var(--line)}
.catalog-detail-validation textarea{min-height:58px;resize:vertical}
.catalog-edit-form .form-fields-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px 16px}
.form-fields-grid>*{min-width:0}
.form-fields-grid .form-field:has(textarea),.form-fields-grid .form-field-validation{grid-column:1/-1}
.form-fields-grid .form-field-validation{padding:11px 13px;border:1px solid #c9d9e1;border-radius:7px;background:#f3f8fa}
.form-fields-grid .form-field-validation label{display:flex;align-items:center;gap:10px}
.form-fields-grid .form-field-validation input[type=checkbox]{width:18px;min-height:18px;accent-color:var(--sea)}
.form-fields-grid textarea[name=stops],.form-fields-grid textarea[name=cargo],.request-form textarea[name=stops],.request-form textarea[name=cargo],.request-form textarea[name=requirements]{min-height:58px;resize:vertical}
.request-grid textarea{min-height:58px;resize:vertical}
.request-form-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding-top:8px;border-top:1px solid var(--line)}
.draft-warning ul{margin:.4rem 0;padding-left:21px}
.draft-warning p{margin:.5rem 0 0}
.home-metrics .stat-card{text-align:left;text-decoration:none;transition:transform .16s ease,filter .16s ease}
.home-metrics .stat-card:hover{transform:translateY(-2px);filter:brightness(1.04)}
.home-metrics .stat-card:nth-child(2),.home-metrics .stat-card:nth-child(3){background:#03588C}
.home-priority-grid{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(290px,.8fr);gap:14px;align-items:start}
.home-order-list,.home-service-list,.home-pending-list{display:grid}
.home-order-row,.home-service-row{display:grid;grid-template-columns:minmax(145px,.8fr) minmax(120px,1.1fr) auto auto;align-items:center;gap:12px;padding:11px 0;border-bottom:1px solid #e6edf2;color:var(--ink);text-decoration:none}
.home-priority-grid .home-order-row{grid-template-columns:minmax(145px,.85fr) minmax(140px,1fr) minmax(100px,.65fr) auto auto}
.home-order-row:last-child,.home-service-row:last-child{border-bottom:0}
.home-order-row:hover,.home-service-row:hover{background:#f8fbfc}
.home-order-row time{color:var(--muted);font-size:.82rem;white-space:nowrap}
.home-service-row{grid-template-columns:minmax(145px,.75fr) minmax(190px,1.4fr) minmax(100px,.8fr) auto}
.home-pending-list a{display:grid;gap:2px;padding:9px 0;border-bottom:1px solid #e6edf2;color:var(--ink);text-decoration:none}
.home-pending-list a:hover strong{color:var(--sea)}
.home-pending-list a span{color:var(--muted);font-size:.82rem}
.home-subheading{margin:20px 0 4px;padding-top:15px;border-top:1px solid var(--line)}
.admin-shortcuts{padding:16px 18px;border:1px solid #d3e0e7;border-left:4px solid var(--sea);border-radius:7px;background:#f8fbfc}
.admin-shortcuts h2{margin:0 0 10px}
.admin-shortcut-links{display:flex;flex-wrap:wrap;gap:8px}
.admin-shortcut-links a{padding:7px 10px;border:1px solid #c7d7e1;border-radius:5px;background:#fff;text-decoration:none;font-weight:700;font-size:.87rem}
.agenda-filters .field{flex:1 1 155px}
.agenda-assigned{display:flex;align-items:center;gap:8px;padding:9px 12px;border:1px solid #d1dde4;border-radius:6px;background:#fff;font-size:.88rem;font-weight:700}
.agenda-assigned input{width:17px;height:17px;accent-color:var(--sea)}
.e2-agenda-table{min-width:1000px}
.e2-agenda-table td{vertical-align:middle}
.e2-agenda-table td .status{white-space:normal}
.agenda-detail-link{display:inline-flex;margin-top:7px}
.order-title-line{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.order-title-line h1{margin:0}
.order-meta{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin-top:12px!important;color:var(--muted);font-size:.85rem}
.order-summary-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1px;margin:0;background:#dfe8ed;border:1px solid #dfe8ed;border-radius:7px;overflow:hidden}
.order-summary-item{min-width:0;padding:11px 13px;background:#f8fafb}
.order-summary-item dt,.service-summary-grid dt{margin-bottom:4px;color:var(--muted);font-size:.77rem;font-weight:700;letter-spacing:.02em}
.order-summary-item dd,.service-summary-grid dd{margin:0;overflow-wrap:anywhere;white-space:normal}
.order-summary-wide{grid-column:1/-1}
.order-particulars{margin-top:13px;padding-top:12px;border-top:1px solid var(--line)}
.order-particulars h3{margin:0 0 5px;font-size:.98rem}
.order-particulars p{margin:0;white-space:pre-wrap}
.service-summary-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:0}
.service-summary-grid>div{padding:11px 12px;border:1px solid var(--line);border-radius:6px;background:#f8fafb}
.order-history-disclosure{margin-top:15px}
.order-history-disclosure>summary,.revision-history-item>summary{cursor:pointer;font-weight:700;color:var(--deep)}
.compact-history-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;padding:12px 0;border-bottom:1px solid #e6edf2}
.compact-history-row:last-child{border-bottom:0}
.compact-history-row>div{min-width:0}
.compact-history-row strong{display:block;font-size:.86rem}
.revision-history-list{display:grid}
.revision-history-item{padding:10px 0;border-bottom:1px solid #e6edf2}
.revision-history-item>summary{display:flex;justify-content:space-between;gap:16px;list-style:none}
.revision-history-item>summary::-webkit-details-marker{display:none}
.revision-history-item>summary:after{content:"+";color:var(--sea);font-size:1.1rem}
.revision-history-item[open]>summary:after{content:"−"}
.revision-history-item>summary>span:first-child{display:flex;align-items:center;gap:8px}
.revision-history-item>summary>span:last-of-type{color:var(--muted);font-size:.83rem}
.revision-history-item ul{margin:10px 0 0;padding-left:20px}
.revision-history-item li{padding:3px 0}
.order-primary-action{display:flex;justify-content:space-between;align-items:center;gap:18px;padding:14px 0;border-bottom:1px solid var(--line)}
.order-primary-action p{margin:3px 0 0;color:var(--muted);font-size:.88rem}
.order-secondary-action{display:flex;align-items:center;gap:11px;margin-top:14px}
.decision-form{grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}
.decision-form .form-field:has(textarea),.decision-form .form-error,.decision-form .field-errors,.decision-form>button{grid-column:1/-1}
.cancel-dialog{width:min(92vw,510px);max-width:510px;padding:24px;border:1px solid #bdccd6;border-radius:10px;background:#fbfcfd;color:var(--ink);box-shadow:0 18px 50px rgba(1,24,38,.26)}
.cancel-dialog::backdrop{background:rgba(3,31,61,.48)}
.cancel-dialog h2{margin:0 0 7px}
.cancel-dialog p{color:var(--muted)}
.cancel-dialog textarea{min-height:80px;resize:vertical}
.visually-hidden{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}
/* Keep every multi-line field compact on first render, while leaving its
   lower edge available for manual expansion. This overrides legacy per-form
   heights without imposing a maximum. */
textarea,
.form-field textarea,
.field textarea,
.cancel-dialog textarea{height:7.3em;min-height:7.3em;max-height:none;resize:vertical}
@media(max-width:980px){
 .home-priority-grid{grid-template-columns:1fr}
 .catalog-detail-layout{grid-template-columns:1fr}
 .order-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .service-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:700px){
 .catalog-edit-form .form-fields-grid,.decision-form{grid-template-columns:1fr}
 .form-fields-grid .form-field:has(textarea),.form-fields-grid .form-field-validation,.decision-form .form-field:has(textarea),.decision-form .form-error,.decision-form .field-errors,.decision-form>button{grid-column:auto}
 .catalog-results-bar{display:block}
 .home-order-row,.home-service-row{grid-template-columns:minmax(0,1fr) auto;gap:7px 10px}
 .home-priority-grid .home-order-row{grid-template-columns:minmax(0,1fr) auto}
 .home-order-row>*:nth-child(2),.home-service-row>*:nth-child(2){grid-column:1}
 .home-order-row>*:nth-child(3),.home-service-row>*:nth-child(3){grid-column:2;grid-row:1}
 .home-order-row>*:nth-child(4),.home-service-row>*:nth-child(4){grid-column:2}
 .home-service-row>*:nth-child(2){grid-row:2}
 .order-summary-grid,.service-summary-grid{grid-template-columns:1fr}
 .order-summary-wide{grid-column:auto}
 .compact-history-row{grid-template-columns:1fr}
 .revision-history-item>summary{align-items:flex-start}
 .revision-history-item>summary>span:last-of-type{max-width:43%;text-align:right}
 .order-primary-action{align-items:flex-start;flex-direction:column}
 .order-primary-action form,.order-primary-action .btn{width:100%}
 .order-secondary-action{align-items:flex-start;flex-direction:column}
 .order-meta{gap:7px 11px}
}
@media(max-width:430px){
 .catalog-row-actions{min-width:235px}
 .catalog-validation-form input{width:88px}
 .catalog-detail-row{grid-template-columns:1fr;gap:3px}
 .cancel-dialog{padding:19px}
}

/* E2 mobile working lists: expose values/actions instead of hidden columns. */
@media(max-width:700px){
 .catalog-table-wrap .catalog-table,
 .e2-agenda-wrap .e2-agenda-table,
 .table-wrap .e2-orders-table{
  display:block;width:100%;min-width:0;max-width:100%
 }
 .catalog-table thead,.e2-agenda-table thead,.e2-orders-table thead{display:none}
 .catalog-table tbody,.e2-agenda-table tbody,.e2-orders-table tbody{display:block;width:100%}
 .catalog-table tbody>tr,.e2-agenda-table tbody>tr,.e2-orders-table tbody>tr{
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%;
  padding:8px;border:0;border-bottom:1px solid var(--line);border-radius:0;box-shadow:none
 }
 .catalog-table td,.e2-agenda-table td,.e2-orders-table td{
  display:block;width:auto;min-width:0;max-width:100%;padding:6px;
  border:0;overflow-wrap:anywhere
 }
 .catalog-table td:before,.e2-agenda-table td:before,.e2-orders-table td:before{
  display:block;content:attr(data-label);font-size:11px;font-weight:600;
  line-height:1.3;color:var(--muted);margin-bottom:4px
 }
 .catalog-table td[data-label="Acciones"],
 .e2-agenda-table td[data-label="Intervalo de inicio"],
 .e2-agenda-table td[data-label="Referencias"],
 .e2-orders-table td:last-child{grid-column:1/-1}
 .catalog-table .catalog-row-actions{min-width:0;flex-wrap:wrap;gap:7px}
 .catalog-table .catalog-validation-form{min-width:0;max-width:100%;flex-wrap:wrap}
 .catalog-table .status,.e2-orders-table .status{white-space:normal}
 .e2-agenda-table td[data-label="Referencias"]{display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px}
 .e2-agenda-table td[data-label="Referencias"]:before{flex-basis:100%}
 .e2-agenda-table .agenda-detail-link{margin-left:auto}
}

/* Prioritized work remains readable inside the available dashboard column. */
.home-priority-grid{grid-template-columns:minmax(0,1.1fr) minmax(280px,.9fr)}
.home-priority-grid>.panel{min-width:0}
.home-priority-grid .home-order-row{
  grid-template-columns:minmax(110px,.8fr) minmax(0,1.25fr) minmax(66px,.5fr) auto;
  gap:8px;min-width:0
}
.home-order-row>*{min-width:0;overflow-wrap:anywhere}
.home-order-row time{white-space:normal}
.home-order-reference{display:block;min-width:0;overflow-wrap:anywhere}
.home-order-reference strong{display:block;line-height:1.35}
.home-order-reference .secondary-text{font-size:.77rem}
.home-priority-grid .service-list-label{white-space:normal}
.home-priority-grid .service-list-label strong{white-space:nowrap;overflow-wrap:normal}
.protocol-panel .section-heading>div{min-width:0;flex:1;overflow-wrap:anywhere}
.home-priority-grid .status{white-space:normal;text-align:center;justify-content:center}
@media(max-width:1180px){
  .home-priority-grid{grid-template-columns:minmax(0,1fr)}
}
@media(max-width:700px){
  .home-priority-grid .home-order-row{grid-template-columns:minmax(0,1fr) auto;gap:7px 10px;padding:11px 0}
  .home-priority-grid .home-order-row>*{grid-column:auto;grid-row:auto}
  .home-priority-grid .home-order-row .service-list-label{grid-column:1}
  .home-priority-grid .home-order-reference{grid-column:1/-1}
  .home-priority-grid .home-order-row time{grid-column:1}
  .home-priority-grid .home-order-row .status{grid-column:2;grid-row:3;align-self:center}
  .home-pending-list a{min-width:0;overflow-wrap:anywhere}
}

/* Small repeat actions use real SVGs, accessible names and focus-visible help. */
.icon-action{
  position:relative;isolation:isolate;display:inline-grid;place-items:center;
  flex:0 0 auto;width:34px;height:34px;min-width:34px;min-height:34px;
  padding:0;border:1px solid #c4d2dc;border-radius:6px;background:#fff;
  color:var(--blue);text-decoration:none;cursor:pointer;
  transition:background-color .14s ease,border-color .14s ease,color .14s ease
}
.icon-action:hover,.icon-action:focus-visible{background:var(--soft-blue);border-color:#8ba9bf;color:var(--deep)}
.icon-action.is-danger{color:var(--bad)}
.icon-action.is-danger:hover,.icon-action.is-danger:focus-visible{background:var(--bad-bg);border-color:#d99e99;color:#76231f}
.icon-action:disabled{opacity:.5;cursor:not-allowed}
.icon-action svg{display:block;width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.icon-action[data-tooltip]:after{
  content:attr(data-tooltip);position:absolute;z-index:80;left:50%;bottom:calc(100% + 8px);
  width:max-content;max-width:min(220px,70vw);padding:5px 8px;border-radius:4px;
  background:var(--navy);color:#fff;font:600 11px/1.35 NotoSans,sans-serif;
  text-align:center;white-space:normal;pointer-events:none;opacity:0;
  transform:translate(-50%,3px);transition:opacity .12s ease,transform .12s ease
}
.icon-action[data-tooltip]:hover:after,.icon-action[data-tooltip]:focus-visible:after{
  opacity:1;transform:translate(-50%,0)
}
/* The rightmost protocol action has no table scroller to contain its help.
   Even a transparent absolutely-positioned tooltip contributes scroll overflow. */
.protocol-panel .icon-action[data-tooltip]:after{
  left:auto;right:0;transform:translateY(3px)
}
.protocol-panel .icon-action[data-tooltip]:hover:after,
.protocol-panel .icon-action[data-tooltip]:focus-visible:after{transform:translateY(0)}
.icon-action:focus-visible{z-index:5}
.actions .inline-form,.actions form{display:inline-flex;margin:0}
.catalog-row-actions .icon-action{width:34px;min-width:34px}
.catalog-validation-form .icon-action{flex:0 0 36px}
.configuration-pagination{
  display:flex;align-items:center;justify-content:flex-end;gap:8px;margin-top:14px;
  color:var(--muted);font-size:.86rem
}
.configuration-pagination a,.configuration-pagination .is-disabled{
  display:inline-flex;align-items:center;justify-content:center;min-height:36px;
  padding:6px 10px;border:1px solid #b5c8d8;border-radius:6px;background:#fff;
  color:var(--blue);text-decoration:none;font-weight:700
}
.configuration-pagination a:hover,.configuration-pagination a:focus-visible{background:var(--soft-blue);color:var(--deep)}
.configuration-pagination .is-disabled{background:#f1f4f6;color:#8796a2;border-color:#d7e0e6}
.configuration-page-number{padding:0 5px}

/* Decision fields have a stable two-column composition on desktop and reflow
   without changing DOM order when a POST returns validation errors. */
.decision-fields{
  display:grid;grid-template-columns:minmax(0,1.12fr) minmax(0,.88fr);
  align-items:start;gap:14px 20px;min-width:0
}
.decision-fields-primary,.decision-fields-window{display:grid;align-content:start;gap:14px;min-width:0}
.decision-fields-comment{grid-column:1/-1;min-width:0}
.form-fields-grid>.decision-fields{grid-column:1/-1}
.decision-fields .form-field{min-width:0}
.decision-form{display:grid;grid-template-columns:minmax(0,1fr);gap:15px}
.decision-form>.form-error,.decision-form>.field-errors,.decision-form>button{grid-column:1}
@media(max-width:700px){
  .decision-fields{grid-template-columns:minmax(0,1fr);gap:14px}
  .decision-fields-comment{grid-column:auto}
  .decision-fields-primary,.decision-fields-window{gap:12px}
}
@media(max-width:700px){
  .icon-action{width:44px;height:44px;min-width:44px;min-height:44px}
  .catalog-row-actions .icon-action{width:44px;min-width:44px}
  .catalog-validation-form .icon-action{flex-basis:44px}
  .configuration-pagination{justify-content:space-between;flex-wrap:wrap}
  .configuration-page-number{order:-1;flex-basis:100%;text-align:center}
}
@media(max-width:650px){
  .users-table td[data-label="Acciones"] .actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
  .users-table td[data-label="Acciones"] .actions>a.icon-action{width:44px}
  .users-table td[data-label="Acciones"] .actions>form{width:auto}
}

/* E3 authorization history and mobile-safe control surfaces. */
.audit-authorization-history{margin-top:13px;padding:11px 13px;border:1px solid #d7e1e9;border-radius:7px;background:#f7f9fa}
.audit-authorization-history>summary{cursor:pointer;color:var(--deep);font-weight:700}
.audit-authorization-entry{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:5px 12px;padding:10px 0;border-top:1px solid var(--line)}
.audit-authorization-entry>span{color:var(--muted);font-size:.82rem}
.audit-authorization-entry>p{grid-column:1/-1;margin:0;white-space:pre-wrap}
.audit-authorization-control{margin:6px 0;padding:8px 10px;border-left:3px solid #a36b00;background:#fff8e8;overflow-wrap:anywhere}
.audit-client-empty{max-width:760px;margin-left:auto;margin-right:auto}
@media(max-width:420px){
 .audit-report-row{grid-template-columns:minmax(0,1fr)}
 .audit-report-row>.status{justify-self:start}
 .audit-report-row>.btn{grid-column:auto}
 .audit-authorization-entry{grid-template-columns:minmax(0,1fr)}
 .audit-authorization-entry>p{grid-column:auto}
 .audit-evidence-links a{max-width:100%;word-break:break-word}
 .audit-checklist-form .actions{display:grid;grid-template-columns:minmax(0,1fr)}
 .audit-checklist-form .actions>*{width:100%}
}

/* Structured checklist formset, progressively enhanced with external JS. */
.audit-checklist-legend{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin:16px 0}
.audit-checklist-legend>div{display:grid;align-content:start;gap:4px;padding:12px;border:1px solid var(--line);border-radius:7px;background:#f8fafb}
.audit-checklist-legend strong{color:var(--deep);font-size:.9rem}
.audit-checklist-legend span{color:var(--muted);font-size:.84rem}
.audit-checklist-form-panel .e2-section-title{margin-bottom:18px}
.audit-checklist-settings{display:grid;gap:13px}
.audit-checklist-settings .form-field:has(textarea){grid-column:1/-1}
.audit-checklist-settings textarea[name="definition"]{min-height:110px}
.audit-controls-builder{padding-top:18px;border-top:1px solid var(--line)}
.audit-controls-builder-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:14px}
.audit-controls-builder-heading h3{margin:0 0 4px}
.audit-controls-builder-heading p{margin:0}
.audit-controls-count{display:grid;justify-items:center;min-width:83px;padding:8px 12px;border:1px solid #d6e1e7;border-radius:7px;background:#f4f8fa;color:var(--muted);font-size:.76rem}
.audit-controls-count strong{font:600 1.35rem BioSans,sans-serif;color:var(--deep)}
.audit-control-form-list{display:grid;gap:11px}
.audit-control-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 15px;min-width:0;margin:0;padding:15px;border:1px solid #d7e1e8;border-radius:8px;background:#fbfcfd}
.audit-control-form legend{max-width:100%;padding:0 7px;color:var(--deep);font:600 .96rem BioSans,sans-serif}
.audit-control-form>.form-field{min-width:0}
.audit-control-form>.form-field:has(textarea){grid-column:1/-1}
.audit-control-form>.form-field:has(input[type="checkbox"]){display:flex;align-items:flex-start;gap:9px;padding:9px 10px;border:1px solid #e1e9ee;border-radius:6px;background:#fff}
.audit-control-form>.form-field:has(input[type="checkbox"]) label{order:2;margin:0;color:var(--ink);font-size:.86rem;line-height:1.4}
.audit-control-form>.form-field input[type="checkbox"]{order:1;flex:0 0 19px;width:19px;min-height:19px;height:19px;margin:2px 0 0;accent-color:var(--sea)}
.audit-control-form>.form-field input:not([type="checkbox"]),.audit-control-form>.form-field select,.audit-control-form>.form-field textarea{min-width:0;max-width:100%}
.audit-draft-badge{display:inline-flex;margin-left:8px;padding:3px 7px;border:1px solid #e7d19a;border-radius:99px;background:#fff4dc;color:#704a00;font:700 .68rem NotoSans,sans-serif;vertical-align:middle}
.audit-controls-builder-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:13px}
.audit-controls-builder-footer p{max-width:590px;margin:0}
.audit-checklist-submit{padding-top:5px}
.audit-checklist-form [hidden]{display:none!important}
@media(max-width:700px){
 .audit-checklist-legend{grid-template-columns:1fr}
 .audit-control-form{grid-template-columns:minmax(0,1fr);padding:13px}
 .audit-control-form>.form-field:has(textarea){grid-column:auto}
 .audit-controls-builder-heading{gap:9px}
 .audit-controls-builder-footer{align-items:stretch;flex-direction:column}
 .audit-controls-builder-footer>.btn{width:100%}
}
@media(max-width:380px){
 .audit-controls-builder-heading{display:grid;grid-template-columns:minmax(0,1fr) auto}
 .audit-controls-count{min-width:70px;padding:7px}
 .audit-draft-badge{display:flex;width:max-content;margin:6px 0 0}
}

/* Client protocol workspace: compact, readable and grounded in the E2 identity. */
.protocol-groups{display:grid;gap:18px}
.protocol-kind-section{overflow:hidden}
.protocol-kind-heading{display:flex;align-items:center;gap:12px;margin:0;padding:17px 20px;border-bottom:1px solid var(--line);background:#f4f7f9}
.protocol-kind-heading h2{margin:0;font-size:1.15rem}
.protocol-kind-icon{display:grid;place-items:center;width:36px;height:36px;border:1px solid #c8d8e3;border-radius:9px;background:#fff;color:var(--sea)}
.protocol-kind-icon svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.protocol-list{display:grid}
.protocol-row{display:grid;grid-template-columns:minmax(210px,1.15fr) minmax(220px,1fr) auto;align-items:center;gap:12px;padding:13px 18px;border-bottom:1px solid #e8edf0}
.protocol-row:last-child{border-bottom:0}
.protocol-row:hover{background:#fbfcfd}
.protocol-main{display:flex;align-items:center;gap:10px;min-width:0}
.protocol-main>div{min-width:0}
.protocol-main strong{display:block;overflow-wrap:anywhere;color:var(--navy)}
.protocol-meta{display:flex;flex-wrap:wrap;align-items:center;gap:6px 9px;color:var(--muted);font-size:.78rem}
.protocol-meta .status{font-size:.72rem}
.protocol-actions{display:flex;justify-content:flex-end;align-items:center;gap:6px;white-space:nowrap}
.protocol-actions .btn{min-height:31px;padding:5px 9px;font-size:.78rem}
.protocol-action-form{display:inline-flex;margin:0}
.protocol-actions .protocol-action-link{font-size:.8rem;font-weight:700}
.protocol-summary{min-width:0;color:var(--muted);font-size:.82rem}
.protocol-summary strong{color:var(--ink)}
.protocol-audit-summary{display:grid;grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr);gap:10px}
.protocol-audit-overview{min-width:0;padding-right:11px;border-right:1px solid #e4eaee}
.protocol-audit-overview>p{display:-webkit-box;overflow:hidden;margin:3px 0 6px;color:var(--muted);font-size:.8rem;line-height:1.4;-webkit-box-orient:vertical;-webkit-line-clamp:2}
.protocol-audit-summary .protocol-review-summary{gap:5px;margin-top:6px}
.protocol-audit-summary .protocol-review-summary span{padding:3px 6px;font-size:.72rem}
.protocol-compact-controls{display:grid;gap:3px;margin:4px 0 0;padding:0;list-style:none}
.protocol-compact-controls li{display:flex;justify-content:space-between;align-items:baseline;gap:8px}
.protocol-compact-controls li span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.protocol-compact-controls em{flex:none;color:var(--ok);font-size:.72rem;font-style:normal;font-weight:700}
.protocol-empty{padding:16px 19px;color:var(--muted);font-size:.88rem}
.protocol-inactive-link{display:inline-flex;align-items:center;min-height:38px;padding:6px 10px;border:1px solid #c7d5df;border-radius:7px;background:#fff;color:var(--blue);font-size:.84rem;font-weight:700;text-decoration:none}
.protocol-inactive-link:hover{background:var(--soft-blue)}
.protocol-detail-stack{display:grid;gap:16px}
.protocol-detail-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}
.protocol-detail-head h2{margin:0 0 5px}
.protocol-detail-version{display:grid;grid-template-columns:minmax(150px,.35fr) minmax(0,1fr);gap:10px 18px;padding:15px 0;border-bottom:1px solid var(--line)}
.protocol-detail-version:last-child{border-bottom:0}
.protocol-version-label{color:var(--muted);font-size:.83rem}
.protocol-definition-copy{white-space:pre-wrap;overflow-wrap:anywhere}
.protocol-review-summary{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.protocol-review-summary span{padding:5px 9px;border:1px solid #d6e2e9;border-radius:6px;background:#f5f8fa;color:#36556d;font-size:.8rem}
.protocol-controls{display:grid;gap:8px;margin:10px 0 0;padding:0;list-style:none}
.protocol-control{display:grid;grid-template-columns:minmax(160px,.8fr) minmax(200px,1.2fr);gap:4px 15px;padding:11px 12px;border:1px solid #e0e8ed;border-radius:7px;background:#fbfcfd}
.protocol-control strong{color:var(--navy)}
.protocol-control span{color:var(--muted);font-size:.83rem}
.protocol-control-note{grid-column:1/-1;color:var(--ink)!important}
.protocol-legacy{padding-top:10px}
.protocol-detail-admin{display:flex;gap:8px;flex-wrap:wrap}
.audit-control-form>legend{display:flex;align-items:center;flex-wrap:wrap;gap:8px}
.audit-control-delete{justify-self:end;min-height:32px;padding:5px 10px;border:1px solid #d6a4a0;border-radius:6px;background:#fff;color:var(--bad);font-size:.8rem;font-weight:700;cursor:pointer}
.audit-control-delete:hover{background:var(--bad-bg)}
.audit-control-form [name$="-DELETE"]{display:none}
.audit-control-form label[for$="-DELETE"]{display:none}
.audit-control-form[data-deleted="true"]{display:none}
.audit-checklist-form .audit-checklist-code-help{display:none}
.decision-blockers{display:grid;gap:8px;margin:0 0 17px}
.decision-blocker{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px 14px;padding:11px 13px;border:1px solid #ecd8a8;border-left:3px solid #bd8423;border-radius:6px;background:#fffaf0}
.decision-blocker strong{display:block;color:#513d19}
.decision-blocker p{margin:2px 0 0;color:#66583d;font-size:.84rem}
.decision-blocker a{font-size:.82rem;font-weight:700}
.order-cancel-action{background:#fff}
.order-cancel-action .btn-secondary{flex:0 0 auto}
.cancel-dialog{background:#fff}

/* Catalog decisions stay in the row as clear text actions; the decision
   reason belongs to the focused confirmation dialog, never an inline field. */
.catalog-table .catalog-row-actions-text{
  display:flex;align-items:center;justify-content:flex-start;flex-wrap:wrap;
  gap:0;min-width:0;text-align:left
}
.catalog-table .catalog-row-actions-text>a,
.catalog-table .catalog-row-actions-text .catalog-text-action{
  display:inline-flex;align-items:center;min-height:36px;padding:4px 2px;
  border:0;background:transparent;color:var(--blue);font:700 .84rem/1.3 NotoSans,sans-serif;
  text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:3px;
  cursor:pointer;white-space:nowrap
}
.catalog-table .catalog-row-actions-text>a:hover,
.catalog-table .catalog-row-actions-text .catalog-text-action:hover{color:var(--deep)}
.catalog-table .catalog-action-separator{padding:0 7px;color:#8293a1}
.catalog-table .catalog-enable-form{display:inline-flex;margin:0}
.catalog-inhibit-dialog{margin:auto}
.catalog-inhibit-dialog .form-content{gap:14px}
.catalog-inhibit-dialog .eyebrow{margin-bottom:5px}
.catalog-inhibit-dialog h2{overflow-wrap:anywhere}
.catalog-inhibit-dialog .catalog-dialog-record{margin:0;color:var(--muted);font-size:.9rem}
.catalog-inhibit-dialog .actions{justify-content:flex-start}
@media(max-width:700px){
  .catalog-table .catalog-row-actions-text>a,
  .catalog-table .catalog-row-actions-text .catalog-text-action{min-height:44px;padding:6px 2px}
  .catalog-inhibit-dialog .actions{align-items:stretch;flex-direction:column}
  .catalog-inhibit-dialog .actions .btn{width:100%}
}
@media(max-width:760px){
 .protocol-row{grid-template-columns:minmax(0,1fr) auto;gap:8px 12px}
 .protocol-summary{grid-column:1/-1;grid-row:2}
 .protocol-actions{grid-column:1/-1;justify-content:flex-start;flex-wrap:wrap}
 .protocol-audit-summary{grid-template-columns:1fr}
 .protocol-audit-overview{padding:0 0 9px;border-right:0;border-bottom:1px solid #e4eaee}
 .protocol-detail-version{grid-template-columns:1fr;gap:4px}
 .protocol-control{grid-template-columns:1fr;gap:4px}
 .protocol-control-note{grid-column:auto}
}
@media(max-width:520px){
 .protocol-row{grid-template-columns:minmax(0,1fr)}
 .protocol-summary,.protocol-actions{grid-column:auto;grid-row:auto}
 .protocol-actions{justify-content:flex-start}
 .protocol-detail-head{display:grid}
 .decision-blocker{grid-template-columns:1fr}
 .order-cancel-action{align-items:stretch;flex-direction:column}
 .order-cancel-action .btn-secondary{width:100%}
}

/* Trazabilidad E3: definiciones archivadas, asignaciones seguras y cambios de ventana. */
.page-heading:has(.protocol-toolbar){display:block}
.page-heading .protocol-toolbar{justify-content:flex-start;margin-top:16px}
.protocol-toolbar .btn,.protocol-toolbar .protocol-inactive-link{min-height:38px}
.protocol-table-wrap{margin:0;border:0;border-radius:0;overflow-x:auto}
.protocol-table{width:100%;min-width:0}
.protocol-table th,.protocol-table td{padding:9px 12px;vertical-align:middle}
.protocol-table th:nth-child(1){width:30%}
.protocol-table th:nth-child(2){width:22%}
.protocol-table th:nth-child(3){width:20%}
.protocol-table th:nth-child(4){width:13%}
.protocol-table th:nth-child(5){width:15%}
.protocol-table-main>td{border-bottom:0}
.protocol-table-main>td[data-label="Estado"] .status{margin:2px 4px 2px 0}
.protocol-table-disclosure-row>td{padding:0 12px 7px;border-bottom:1px solid #e5ebef}
.protocol-row-disclosure>summary{display:inline-flex;align-items:center;gap:7px;width:max-content;max-width:100%;padding:3px 0;list-style:none;cursor:pointer;color:var(--blue);font-size:.78rem;font-weight:700;white-space:nowrap}
.protocol-row-disclosure>summary::-webkit-details-marker{display:none}
.protocol-disclosure-mark{display:grid;place-items:center;width:21px;height:21px;border:1px solid #c4d2dc;border-radius:5px;background:#fff}
.protocol-disclosure-mark svg{width:13px;height:13px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.protocol-row-disclosure[open] .protocol-disclosure-mark svg{transform:rotate(180deg)}
.protocol-row-detail{min-width:0;margin:5px 0 3px;padding:12px 15px;border-left:3px solid var(--sea);border-radius:0 6px 6px 0;background:#f4f8fa;color:var(--ink);font-size:.86rem}
.protocol-row-detail>p{margin:0 0 7px}
.protocol-row-detail>a{display:inline-block;margin-top:9px;font-weight:700}
.protocol-compact-controls{margin:8px 0 0}
.protocol-row-detail .protocol-compact-controls li{padding:3px 0;border-top:1px solid #e2eaf0}
.protocol-actions{display:flex;justify-content:flex-end;align-items:center;gap:6px;white-space:nowrap}
.protocol-actions .protocol-action-form{display:inline-flex}
.protocol-actions .icon-action{width:34px;height:34px;min-width:34px;min-height:34px}
.protocol-row{
  display:grid;grid-template-columns:minmax(210px,1.25fr) minmax(155px,.8fr) minmax(150px,.7fr) auto;
  align-items:center;gap:10px 16px;padding:11px 16px;border-bottom:1px solid #e5ebef
}
.protocol-row:last-child{border-bottom:0}
.protocol-main strong{font:600 .97rem/1.3 BioSans,sans-serif}
.protocol-row-meta{display:flex;align-items:center;gap:7px 12px}
.protocol-row-meta time{color:var(--muted);font-size:.78rem}
.protocol-row-state{display:flex;flex-wrap:wrap;gap:5px}
.protocol-actions{display:flex;justify-content:flex-end;align-items:center;gap:6px;white-space:nowrap}
.protocol-actions .protocol-action-form{display:inline-flex}
.protocol-actions .icon-action{width:34px;height:34px;min-width:34px;min-height:34px}
.protocol-row-disclosure{grid-column:1/-1;display:grid;grid-template-columns:40px minmax(0,1fr);align-items:start;gap:9px}
.protocol-row-disclosure>summary{list-style:none;cursor:pointer}
.protocol-row-disclosure>summary::-webkit-details-marker{display:none}
.protocol-row-disclosure[open]>summary svg{transform:rotate(180deg)}
.protocol-row-detail{min-width:0;padding:12px 15px;border-left:3px solid var(--sea);border-radius:0 6px 6px 0;background:#f4f8fa;color:var(--ink);font-size:.86rem}
.protocol-row-detail>p{margin:0 0 7px}
.protocol-row-detail>a{display:inline-block;margin-top:9px;font-weight:700}
.protocol-compact-controls{margin:8px 0 0}
.protocol-row-disclosure .protocol-compact-controls li{padding:3px 0;border-top:1px solid #e2eaf0}
.protocol-detail-version[id]{scroll-margin-top:20px}
.protocol-version-label a{color:inherit;text-decoration:none}
.protocol-version-label a:hover{text-decoration:underline}
.accepted-protocol{margin-top:14px;padding:14px 15px;border:1px solid #d5e1e8;border-left:4px solid var(--sea);border-radius:7px;background:#f8fafb}
.accepted-protocol-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}
.accepted-protocol-heading{list-style:none;cursor:pointer}
.accepted-protocol-heading::-webkit-details-marker{display:none}
.accepted-protocol-heading:after{content:"+";flex:0 0 auto;color:var(--sea);font-weight:700}
.accepted-protocol[open]>.accepted-protocol-heading:after{content:"−"}
.accepted-protocol-body{padding-top:9px}
.accepted-protocol-heading h3{margin:0;font-size:1rem}
.accepted-protocol-heading .eyebrow{margin-bottom:4px;font-size:.68rem}
.accepted-protocol-definition{margin:9px 0 0;white-space:pre-wrap}
.accepted-protocol-disclosure{margin-top:9px;border-top:1px solid #dfe8ed}
.accepted-protocol-disclosure>summary{padding:9px 0 2px;cursor:pointer;color:var(--deep);font-weight:700}
.accepted-control-list,.accepted-catalog-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:9px}
.accepted-control{display:grid;gap:3px;padding:10px 11px;border:1px solid #e0e8ed;border-radius:6px;background:#fff}
.accepted-control>span,.accepted-control p{margin:0;color:var(--muted);font-size:.82rem}
.accepted-catalog-group{padding:10px 11px;border:1px solid #e0e8ed;border-radius:6px;background:#fff}
.accepted-catalog-group h4{margin:0 0 6px;color:var(--deep);font-size:.88rem}
.accepted-catalog-group dl{display:grid;gap:5px;margin:0}
.accepted-catalog-group dl>div{display:grid;grid-template-columns:minmax(90px,.55fr) minmax(0,1fr);gap:8px}
.accepted-catalog-group dt{color:var(--muted);font-size:.79rem;font-weight:700}
.accepted-catalog-group dd{margin:0;overflow-wrap:anywhere;font-size:.82rem}
.window-change-row{display:grid;gap:3px;padding:10px 0;border-top:1px solid var(--line);font-size:.85rem}
.window-change-row>span{color:var(--muted)}
.window-change-row p{margin:3px 0 0;white-space:pre-wrap}
.compact-history-row>.accepted-protocol{grid-column:1/-1;width:100%;margin-top:2px}
.audit-window-current{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-top:13px;padding:11px 13px;border:1px solid #cbdce5;border-radius:6px;background:#f7fafb}
.audit-window-current>span{color:var(--deep);font-weight:700}
.audit-declaration-blocker{margin:10px 0;padding:11px 13px;border:1px solid #ead59c;border-left:4px solid #a36b00;border-radius:5px;background:#fff8e8}
.audit-declaration-blocker p{margin:4px 0;color:#66583d}
.audit-declaration-blocker a{font-size:.86rem;font-weight:700}
.audit-declaration-form{scroll-margin-top:20px}
.audit-attempt-form input[type="checkbox"]{width:19px;min-height:19px;height:19px;accent-color:var(--sea);vertical-align:middle}
.audit-attempt-form label:has(input[type="checkbox"]){display:flex;align-items:center;gap:9px}
.audit-attempt-form label:has(input[type="checkbox"]) input{flex:0 0 19px}
.order-row-actions{display:flex;gap:6px}
.e2-orders-table td[data-label="Acceso"]{white-space:nowrap}

@media(max-width:760px){
  .protocol-row{grid-template-columns:minmax(0,1fr) auto;gap:8px 10px;padding:11px 12px}
  .protocol-main{grid-column:1/-1}
  .protocol-row-meta{grid-column:1}
  .protocol-row-state{grid-column:1/-1}
  .protocol-actions{grid-column:2;grid-row:2;align-self:start}
  .protocol-row-disclosure{grid-template-columns:40px minmax(0,1fr)}
  .accepted-protocol-heading{display:grid}
  .accepted-control-list,.accepted-catalog-list{grid-template-columns:1fr}
}
@media(max-width:520px){
  .protocol-toolbar{display:flex;flex-direction:column;align-items:flex-start}
  .protocol-row{grid-template-columns:minmax(0,1fr)}
  .protocol-main,.protocol-row-meta,.protocol-row-state,.protocol-actions,.protocol-row-disclosure{grid-column:1;grid-row:auto}
  .protocol-actions{justify-content:flex-start}
  .protocol-row-disclosure{grid-template-columns:40px minmax(0,1fr)}
  .accepted-catalog-group dl>div{grid-template-columns:minmax(75px,.6fr) minmax(0,1fr)}
  .audit-window-current{align-items:flex-start;flex-direction:column}
}
@media(max-width:700px){
  .protocol-table-wrap{overflow:visible;border:0;background:transparent}
  .protocol-table{display:block;width:100%;min-width:0;max-width:100%}
  .protocol-table thead{display:none}
  .protocol-table tbody{display:block;width:100%}
  .protocol-table-main{display:grid;grid-template-columns:minmax(0,1fr) auto;width:100%;padding:10px 12px 4px;border:1px solid var(--line);border-bottom:0;border-radius:8px 8px 0 0;background:#fff}
  .protocol-table-main>td{display:block;width:auto;min-width:0;max-width:100%;padding:5px;border:0;overflow-wrap:anywhere}
  .protocol-table-main>td:before{display:block;content:attr(data-label);margin-bottom:3px;color:var(--muted);font:600 .68rem/1.3 NotoSans,sans-serif}
  .protocol-table-main>td[data-label="Nombre"]{grid-column:1/-1}
  .protocol-table-main>td[data-label="Última versión"]{grid-column:1}
  .protocol-table-main>td[data-label="Estado"]{grid-column:1/-1}
  .protocol-table-main>td[data-label="Controles"]{grid-column:1}
  .protocol-table-main>td[data-label="Acciones"]{grid-column:2;grid-row:2/4;align-self:center}
  .protocol-table-disclosure-row{display:block;width:100%;padding:0 12px 5px;border:1px solid var(--line);border-top:0;border-radius:0 0 8px 8px;background:#fff}
  .protocol-table-disclosure-row>td{display:block;width:100%;padding:2px 5px 8px;border:0}
  .protocol-row-detail{padding:10px}
  .protocol-actions{justify-content:flex-end}
}

/* Dashboard additions follow legacy dashboard selectors so stable client
   columns and the ordered work queues are not reshaped by older rules. */
.home-ops-section{margin:14px 0;padding:17px 19px}
.home-ops-section.is-compact{padding:12px 16px}
.home-ops-section .section-heading{margin-bottom:9px}
.home-ops-section.is-compact .section-heading{margin:0}
.home-client-orders .home-order-row{display:contents}
.home-client-orders .home-order-row>span,.home-client-orders .home-order-row>time{
  min-width:0;padding:11px 10px;border-top:1px solid #e5ebef;overflow-wrap:anywhere
}
.home-client-orders .home-order-row:first-child>span,.home-client-orders .home-order-row:first-child>time{border-top:0}
.home-client-orders .status{white-space:normal;justify-self:start}
@media(max-width:650px){
  .home-ops-heading{align-items:flex-start}
  .home-ops-heading-meta{justify-content:flex-end}
  .home-ops-section{padding:14px}
  .home-client-orders{display:block}
  .home-client-orders-heading{display:none}
  .home-client-orders .home-order-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);padding:9px 0;border-top:1px solid #e5ebef}
  .home-client-orders .home-order-row>*{grid-column:auto;grid-row:auto;min-width:0}
  .home-client-orders .home-order-row>span,.home-client-orders .home-order-row>time{padding:5px 6px;border:0}
}