:root{font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#172d3e;background:#f3f6f9;font-size:14px}*{box-sizing:border-box}body{margin:0}main{max-width:1260px;margin:auto;padding:38px 30px}header,.section-head,.toolbar,.profile,.pagination{display:flex;align-items:center;gap:16px}header,.section-head{justify-content:space-between}header{margin-bottom:28px}h1{font-size:32px;margin:8px 0;letter-spacing:-1px}h2{font-size:18px;margin:0 0 8px}.eyebrow{font-size:11px;font-weight:750;letter-spacing:1.5px;color:#297367}.subtitle,p{color:#536b7d;line-height:1.5}.subtitle{margin:0}.connection{text-align:right;display:grid;gap:9px}small,.muted{color:#62788a;font-size:12px}.stats{display:grid;grid-template-columns:repeat(5,1fr);gap:14px;margin-bottom:22px}.stats article{background:white;border:1px solid #dce5ec;border-radius:12px;padding:20px}.stats span{color:#62788a}.stats strong{display:block;font-size:30px;margin-top:12px;font-weight:650}.stats #available{color:#167b62}.stats #blocked{color:#ac6220}.card{background:white;border:1px solid #dce5ec;border-radius:14px;padding:24px;margin:20px 0}.section-head p{margin:0;font-size:13px}.section-head{margin-bottom:22px}button{font:inherit;font-weight:600;border:1px solid #cedce6;border-radius:7px;background:white;padding:10px 14px;cursor:pointer;color:#254c67;white-space:nowrap}button:hover{background:#edf4f8}button:disabled{opacity:.45;cursor:default}button.primary{background:#173e53;color:white;border-color:#173e53}button.primary:hover{background:#23546d}button.danger{color:#a33f36}input,select{font:inherit;border:1px solid #cad8e2;border-radius:7px;padding:10px;color:#203d50;background:white}input:focus,select:focus,button:focus-visible{outline:2px solid #299883;outline-offset:2px}label{font-size:12px;color:#536b7d}.profile{padding:16px;background:#f6f9fb;border-radius:9px;flex-wrap:wrap}.profile input{min-width:240px}.client-grid{display:flex;flex-wrap:wrap;gap:10px}.client{border:1px solid #e0e8ee;border-radius:8px;padding:12px;min-width:200px;flex:1}.client strong{display:block;margin-bottom:6px}.client p{margin:5px 0 0;font-size:12px}.badge{display:inline-block;padding:4px 8px;border-radius:5px;font-size:11px;font-weight:650;background:#e9eff4;color:#476176}.badge.available,.badge.ok{color:#16684f;background:#e4f4ed}.badge.in_use{color:#1e60a3;background:#e7f1fb}.badge.blocked,.badge.warning{color:#965610;background:#fff1df}.badge.disabled{color:#67778a;background:#ecf0f3}.toolbar{align-items:end}.toolbar label{display:grid;gap:6px}.search-label{flex:1}.hint{font-size:12px;background:#f6f9fb;border-left:3px solid #b5cbd8;padding:10px 14px;margin:18px 0}.table-wrap{overflow-x:auto}table{width:100%;border-collapse:collapse;text-align:left}th{font-size:11px;letter-spacing:.5px;text-transform:uppercase;color:#6e8394;padding:12px;border-bottom:1px solid #d6e2eb}td{border-bottom:1px solid #edf2f6;padding:13px 12px;vertical-align:middle}td strong{font-size:13px}td small{display:block;margin-top:5px}td.actions{white-space:nowrap}td.actions button{font-size:12px;padding:7px 9px;margin:2px}.pagination{justify-content:flex-end;margin-top:16px}.pagination span{margin-right:auto;color:#62788a;font-size:12px}footer{text-align:center;font-size:11px;color:#7e909e;margin-top:24px}#message{position:sticky;top:12px;z-index:2;background:#e6f5ee;border:1px solid #acdac5;padding:13px 16px;border-radius:8px;margin:12px 0}#message.error{background:#fff0eb;border-color:#f0c3b3;color:#942e23}dialog{width:530px;border:1px solid #d2e0e9;border-radius:14px;padding:28px;color:#172d3e;box-shadow:0 20px 80px #17354b33}dialog::backdrop{background:#17354b70}dialog input#address{width:100%;margin:8px 0 15px}.show-password{display:flex;align-items:center;gap:8px}.dialog-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:24px}#editor-error{color:#a33f36;min-height:20px}#empty{padding:24px;text-align:center}[hidden]{display:none!important}@media(max-width:820px){main{padding:22px 14px}.stats{grid-template-columns:repeat(3,1fr)}header,.section-head{align-items:flex-start;flex-direction:column}.connection{text-align:left}.toolbar{flex-wrap:wrap}.card{padding:16px}h1{font-size:27px}}

.bulk-toolbar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:14px 0}.bulk-toolbar label{display:flex;gap:8px;align-items:center}textarea{font:inherit;border:1px solid #cad8e2;border-radius:7px;padding:10px;width:100%;resize:vertical}#bulk-editor{width:700px}#bulk-form label{display:block;margin-top:12px}#bulk-text{margin-top:8px}#bulk-error,#customer-error{color:#a33f36}#customer-editor{width:850px;max-height:90vh}.customer-fields{display:grid;grid-template-columns:1fr 1fr;gap:15px}.customer-fields label{display:grid;gap:6px;min-width:0}.customer-fields input,.customer-fields select{width:100%;min-width:0}.customer-fields .wide{grid-column:1/-1}#customer-search{display:block;width:100%;margin:8px 0 18px}#active-customer{max-width:480px;flex:1}#customer-list .client{min-width:260px;max-width:100%;margin-bottom:8px}@media(max-width:650px){.customer-fields{grid-template-columns:1fr}.bulk-toolbar button{font-size:12px}.profile select{width:100%;max-width:100%}}

#customer-editor .dialog-actions{position:sticky;bottom:0;background:white;padding:12px 0;margin-top:12px}

/* Navegación y vistas 1.4 */
.panel-tabs{display:flex;gap:8px;padding:6px;background:#e7eef3;border-radius:12px;margin:0 0 28px;position:sticky;top:0;z-index:3}.panel-tabs button{flex:1;background:transparent;border-color:transparent;color:#526b7c}.panel-tabs [aria-selected="true"]{background:white;color:#173e53;box-shadow:0 2px 5px #193b5014}.overview-heading{display:flex;justify-content:space-between;align-items:center;gap:20px;margin:28px 0 20px}.overview-heading h2{font-size:23px}.overview-heading p{margin:4px 0}.overview-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}.overview-stats button{text-align:left;background:white;border:1px solid #dce5ec;border-radius:14px;padding:24px;white-space:normal}.overview-stats span{font-weight:500;color:#526b7c}.overview-stats strong{display:block;font-size:38px;color:#173e53;margin:12px 0}.overview-stats small{display:block;font-weight:400}.summary-grid{display:grid;grid-template-columns:1.2fr 1fr;gap:20px}.summary-grid .card{margin-bottom:0}.issue{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:12px 0;border-bottom:1px solid #edf2f6}.issue:last-child{border-bottom:0}.issue p{margin:0;font-size:13px}.issue button{font-size:12px}.customers-table td{vertical-align:top}.customers-table td:first-child{min-width:145px;white-space:nowrap}.customers-table td:nth-child(2){min-width:170px}.customers-table td:nth-child(3){min-width:210px;max-width:300px}.customers-table td:nth-child(4){min-width:150px}.customers-table .row-actions{min-width:165px}.row-actions button{font-size:12px;padding:6px 8px;margin:0 5px 6px 0}.customer-toolbar{margin:22px 0 18px}#customer-search{margin:0}#customer-empty{padding:24px;text-align:center;color:#62788a}.profile-tags{display:flex;flex-wrap:wrap;gap:5px}.client-name{margin-top:10px!important;font-weight:600;color:#173e53}.customer-fields .wide{grid-column:1/-1}fieldset{border:1px solid #dce5ec;border-radius:10px;padding:18px;margin:20px 0}legend{font-size:14px;font-weight:650;padding:0 8px;color:#173e53}#customer-editor{padding:26px;max-width:calc(100vw - 24px)}#customer-editor h2{font-size:23px}#customer-editor .dialog-actions{z-index:1}.archived-label{margin-top:8px}#summary-customer{display:block;font-size:19px;margin:12px 0}.stats article{cursor:default}[role="tabpanel"]:focus{outline:none}
@media(max-width:820px){.overview-heading{align-items:flex-start;flex-direction:column}.overview-stats{gap:10px}.overview-stats button{padding:16px}.overview-stats strong{font-size:30px}.summary-grid{grid-template-columns:1fr;gap:0}.customer-toolbar label{flex:1;min-width:150px}.panel-tabs{gap:0}.panel-tabs button{padding:10px 8px}.customer-toolbar .search-label{flex-basis:100%}}@media(max-width:480px){.overview-stats{grid-template-columns:1fr}.overview-stats button{display:grid;grid-template-columns:1fr auto;gap:8px}.overview-stats strong{grid-column:2;grid-row:1/3;margin:0}.overview-stats small{grid-column:1}.profile input{min-width:0;width:100%}dialog{max-width:calc(100vw - 20px)}fieldset{padding:12px}}
.error-toolbar{flex-wrap:wrap}.error-toolbar label{min-width:130px;flex:1}.error-toolbar input,.error-toolbar select{width:100%}#errors-list td:nth-child(2){min-width:220px;max-width:330px}#errors-list td:nth-child(3){min-width:170px}#errors-list .badge{white-space:normal}.last-portal-error{padding-top:8px;border-top:1px solid #e0e8ee;color:#965610!important}#summary-errors .issue{align-items:flex-start}#summary-errors .badge{white-space:normal;text-align:right;max-width:180px}@media(max-width:480px){.panel-tabs button{font-size:12px;padding:10px 6px}#summary-errors .issue{flex-direction:column}#summary-errors .badge{text-align:left}}

.customer-head-actions,.customer-categories{display:flex;gap:8px;flex-wrap:wrap}.customer-categories{margin-top:20px}.customer-categories button[aria-pressed="true"]{background:#173e53;color:white;border-color:#173e53}.customer-categories button{font-size:12px}#import-editor{width:1050px;max-width:95vw;max-height:90vh}#import-editor .table-wrap{max-height:45vh}#import-status.error{color:#a33f36}#import-original{background:#f6f9fb;padding:14px;border-radius:8px}#import-original summary{cursor:pointer;font-weight:600}#import-source-values{display:grid;grid-template-columns:1fr 2fr;gap:8px;font-size:12px;overflow-wrap:anywhere}#import-source-values dd{margin:0;white-space:pre-wrap}#import-review label{display:flex;align-items:center;gap:8px}

.panel-tabs{flex-wrap:wrap}#errors-customer-list td,#managed-customer-list td{min-width:110px}#errors-customer-list td:last-child,#managed-customer-list td:last-child{min-width:180px}

/* Reglas compartidas de importación. */
#import-rules-fields,#test-import-rules-fields{border:0;padding:0;margin:0;min-width:0}.rules-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px}.rules-grid .card{margin:0;min-width:0}.rules-grid h3,#view-import-rules h3{margin:0 0 10px;font-size:17px}.rules-grid label,.rule-pair label,.rules-sample label{display:grid;gap:8px;margin:12px 0}.rule-toggle{display:flex!important;align-items:flex-start;gap:10px!important;line-height:1.5;margin:14px 0}.rule-toggle input{margin-top:3px}.rule-pair{display:grid;grid-template-columns:1fr 1fr;gap:12px}.rule-pair input,.rules-sample input{width:100%;min-width:0}.rules-save{display:flex;align-items:center;justify-content:space-between;gap:16px}.rules-sample{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.rules-results{display:grid;grid-template-columns:160px 1fr;gap:10px}.rules-results dd{margin:0;overflow-wrap:anywhere}.rules-results dt{color:#62788a}.rules-error{color:#a33f36!important}#import-rules-status{margin-right:auto}.rules-grid textarea{font-size:13px;line-height:1.6}#view-import-rules{max-width:100%}@media(max-width:820px){.rules-grid,.rule-pair,.rules-sample{grid-template-columns:1fr}.rules-save{align-items:stretch;flex-direction:column}.rules-results{grid-template-columns:1fr}.rules-results dd{margin-bottom:10px}}
#default-office-rules select{width:100%;min-width:130px}.default-offices-table th:last-child,.default-offices-table td:last-child{width:1%;white-space:nowrap}.default-offices-table button{padding:7px 10px}.default-offices-wrap{margin-top:12px}@media(max-width:640px){.default-offices-table,.default-offices-table tbody,.default-offices-table tr,.default-offices-table td{display:block;width:100%}.default-offices-table thead{display:none}.default-offices-table tr{border:1px solid #dce5ec;border-radius:10px;padding:8px;margin-bottom:10px}.default-offices-table td{border:0;padding:5px}.default-offices-table td::before{display:block;font-size:12px;font-weight:650;color:#526b7c;margin-bottom:4px}.default-offices-table td:nth-child(1)::before{content:'Provincia'}.default-offices-table td:nth-child(2)::before{content:'Trámite'}.default-offices-table td:nth-child(3)::before{content:'Oficina predeterminada'}.default-offices-table td:nth-child(4)::before{content:'Acción'}#default-office-rules select{min-width:0}}

#delete-all-customers-dialog{width:650px;max-width:calc(100vw - 28px)}#delete-all-customers-count{font-size:20px;font-weight:700;color:#a33f36}#delete-all-customers-dialog .dialog-actions{flex-wrap:wrap}#delete-all-customers-result:empty{display:none}.customer-head-actions{flex-wrap:wrap}

.renewal-table-wrap{max-height:400px;overflow:auto;margin:12px 0}.renewal-table-wrap table{min-width:560px}.renewal-table-wrap thead{position:sticky;top:0;background:#fff;z-index:1}.renewal-table-wrap input{width:90px;min-width:0}.renewal-table-wrap select{min-width:140px}.renewal-table-wrap td:first-child{font-weight:600}#renewal-settings{margin-bottom:24px}#renewal-preview-fields{margin-top:20px}#renewal-rules-status{max-width:700px}
#renewal-rules-fields,#renewal-preview-fields{min-width:0;padding:0;border:0}#renewal-settings{min-width:0}.renewal-table-wrap{max-width:100%;min-width:0}

/* Compact row controls; native popovers escape scrollable tables. */
.row-action-controls{display:flex;gap:6px;align-items:center;flex-wrap:wrap}
.row-action-controls button{margin:0;white-space:nowrap}
.row-action-menu{position:fixed;margin:0;width:248px;max-width:calc(100vw - 16px);max-height:300px;overflow:auto;padding:8px;background:#fff;border:1px solid #d6e2de;border-radius:12px;box-shadow:0 12px 40px #173d3429}
.row-action-menu:popover-open{display:grid;gap:4px}
.row-action-menu button{text-align:left;margin:0;width:100%;padding:10px 12px;border:0;background:transparent}
.row-action-menu button:hover,.row-action-menu button:focus-visible{background:#edf5f1}
.row-action-menu button.danger{color:#a33f36;border-top:1px solid #eee}
.row-action-result{display:block;max-width:260px;margin-top:7px;line-height:1.4;color:#50645e}
.row-action-result:empty{display:none}
.row-action-result[data-stage="completed"]{color:#17634f}
.row-action-result[data-stage="attention"],.row-action-result[data-stage="submitted"],.row-action-result[data-stage="interrupted"]{color:#85591d}
.import-run-list{display:grid;gap:8px;padding:0;list-style:none;max-height:360px;overflow:auto}
.import-run-list li{border:1px solid #dbe5e0;border-radius:10px;padding:12px;background:#f7faf8}
.import-run-list small{display:block;margin-top:5px;color:#52675e}

.settings-tabs{display:flex;gap:8px;margin:20px 0}.settings-tabs [aria-selected="true"]{background:#173e50;color:#fff;border-color:#173e50}.general-delay{max-width:360px}.settings-tabs button:focus-visible{outline:3px solid #267f77;outline-offset:3px}
.selected-profile{border:2px solid #177988;box-shadow:0 0 0 2px #17798818}#local-profile-context{font-size:14px;overflow-wrap:anywhere}#profile-count{margin:12px 0}

#import-duplicates label{display:block;margin:16px 0;font-weight:600}#import-duplicates select{display:block;width:100%;max-width:100%;margin-top:8px;min-height:44px}#import-duplicates{overflow-wrap:anywhere}

#profile-identity-form label{display:block;margin:16px 0 7px}#profile-identity-form input{width:100%;min-width:0}#identity-error{color:#a33f36}#identity-current{overflow-wrap:anywhere}.client details{font-size:12px;margin-top:12px;overflow-wrap:anywhere}.client details summary{cursor:pointer;color:#62788a}.client>button{margin-top:12px;width:100%}.profile input{max-width:100%}

/* Una fila por registro, con desplazamiento horizontal dentro de la tabla. */
main{max-width:1640px}
.table-wrap{max-width:100%;min-width:0}
.table-wrap:has(>.data-grid){overflow:auto;border:1px solid #d5e0e8;border-radius:8px;background:white;max-height:68vh;scrollbar-gutter:stable}
.data-grid{width:max-content;min-width:100%;border-collapse:separate;border-spacing:0;font-size:12px}
.data-grid th{position:sticky;top:0;z-index:1;background:#eaf0f5;color:#405c70;border-right:1px solid #d5e0e8;border-bottom:1px solid #c5d4df;padding:10px 12px;white-space:nowrap}
.data-grid td{min-width:0!important;max-width:none!important;border-right:1px solid #e2e9ef;border-bottom:1px solid #e2e9ef;padding:7px 12px;vertical-align:middle;white-space:nowrap;line-height:1.4}
.data-grid th:last-child,.data-grid td:last-child{border-right:0}
.data-grid tr:last-child td{border-bottom:0}
.data-grid tbody tr:nth-child(even){background:#f7fafc}
.data-grid tbody tr:hover{background:#eef5f8}
.data-grid td>small,.data-grid td>p,.data-grid td>strong,.data-grid td>span{display:inline;margin:0;white-space:nowrap}
.data-grid td>*+small,.data-grid td>*+p,.data-grid td>*+span{margin-left:10px}
.data-grid td>.badge{display:inline-block}
.data-grid .profile-tags,.data-grid .row-action-controls{display:inline-flex;flex-wrap:nowrap;vertical-align:middle}
.data-grid .profile-tags small{display:inline;margin:0}
.data-grid .row-action-result{display:inline;margin:0 0 0 10px;max-width:none;white-space:nowrap}
.data-grid .row-action-result:empty{display:none}
.data-grid :is(.actions,.row-actions,.profile-row-actions) button{font-size:12px;padding:6px 9px;margin:0;min-height:32px;vertical-align:middle}
.data-grid .actions button+button{margin-left:6px}
.data-grid .row-action-menu{white-space:normal}
.data-grid .row-action-menu button{white-space:normal;padding:10px 12px;text-align:left;width:100%}
.data-grid .selected-profile{border:0;box-shadow:none;background:#e6f4f3}
.data-grid .selected-profile td:first-child{box-shadow:inset 3px 0 #177988}
.data-grid .last-portal-error{display:inline;margin:0;padding:0;border:0;white-space:nowrap}
.data-grid .badge,.data-grid #errors-list .badge{white-space:nowrap}
@media(max-width:820px){.toolbar>label{min-width:0;grid-template-columns:minmax(0,1fr)}.toolbar select,.toolbar input{min-width:0;max-width:100%}}
@media(max-width:640px){.data-grid td{padding:6px 10px}.data-grid :is(.actions,.row-actions,.profile-row-actions) button{min-height:40px}.table-wrap:has(>.data-grid){max-height:65dvh}.data-grid .row-action-menu button{min-height:40px}}

#view-proxies .stats{display:flex;flex-wrap:nowrap;gap:0;overflow-x:auto;border:1px solid #d5e0e8;border-radius:8px;background:white}#view-proxies .stats article{flex:1 0 auto;padding:12px 18px;border:0;border-right:1px solid #e2e9ef;border-radius:0;background:transparent;white-space:nowrap}#view-proxies .stats article:last-child{border-right:0}#view-proxies .stats strong{display:inline;font-size:20px;margin:0 0 0 12px}

/* Listados de clientes y perfiles ajustados al ancho disponible. */
.table-wrap:has(>.fit-grid){scrollbar-gutter:auto;overflow-x:hidden}
.data-grid.fit-grid{table-layout:fixed;width:100%;min-width:100%;font-size:11px}
.fit-grid th{white-space:normal;overflow-wrap:anywhere;letter-spacing:0;text-transform:none;font-size:10px;padding:9px 5px;line-height:1.3}
.fit-grid td{padding:7px 5px;overflow:hidden;text-overflow:ellipsis}
.fit-grid td>.cell-value,.fit-grid td>.client-state{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin:0}
.fit-grid .client-name-link{display:block;border:0;background:transparent;padding:0;width:100%;min-height:0;text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#173e53}
.fit-grid .client-name-link,.fit-grid .client-name-link strong{font-weight:400}.fit-grid .client-name-link strong{font-size:11px}.fit-grid .client-name-link:hover{text-decoration:underline}
.fit-grid td>.client-state{font-size:10px;color:#62788a;margin-top:2px}
.fit-grid .row-action-controls{gap:3px;max-width:100%}
.fit-grid :is(.row-actions,.profile-row-actions) button{padding:4px;min-width:24px;min-height:28px;font-size:14px}
.fit-grid .row-action-result{display:block;margin:2px 0 0;max-width:100%;font-size:9px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.fit-grid .row-action-result:empty{display:none}
.fit-grid .row-action-menu button{font-size:12px;padding:10px 12px;min-height:36px}
.client-list-help{font-size:11px;margin:10px 0;color:#62788a}.mobile-list-help{display:none}
.fit-grid.profiles-table th:nth-child(1){width:7%}.fit-grid.profiles-table th:nth-child(2){width:14%}.fit-grid.profiles-table th:nth-child(3){width:13%}.fit-grid.profiles-table th:nth-child(4){width:9%}.fit-grid.profiles-table th:nth-child(5){width:16%}.fit-grid.profiles-table th:nth-child(6){width:6%}.fit-grid.profiles-table th:nth-child(7){width:6%}.fit-grid.profiles-table th:nth-child(8){width:10%}.fit-grid.profiles-table th:nth-child(9){width:12%}.fit-grid.profiles-table th:nth-child(10){width:7%}
.fit-grid.profiles-table td strong{font-size:11px}.fit-grid.profiles-table .badge{font-size:10px;padding:3px 4px}
.fit-grid.profiles-table td:nth-child(2)>.badge{display:none}
.fit-grid.profiles-table .remote-profile-actions{margin-left:3px}
@media(max-width:1100px){.customers-table.fit-grid{font-size:10px}.fit-grid th{font-size:9px}.fit-grid .client-name-link strong{font-size:10px}.fit-grid :is(.row-actions,.profile-row-actions) button{min-width:20px;padding:3px}.fit-grid .row-action-controls{gap:2px}}
@media(max-width:760px){
 .customers-table.fit-grid colgroup{display:none}
 .customers-table.fit-grid :is(th,td):not(:nth-child(1),:nth-child(2),:nth-child(4),:nth-child(9)){display:none}
 .customers-table.fit-grid :is(th,td):nth-child(1){width:29%}.customers-table.fit-grid :is(th,td):nth-child(2){width:19%}.customers-table.fit-grid :is(th,td):nth-child(4){width:17%}.customers-table.fit-grid :is(th,td):nth-child(9){width:35%}
 .fit-grid td{padding:7px 4px}.fit-grid th{font-size:10px}.fit-grid .client-name-link strong{font-size:12px}.customers-table.fit-grid{font-size:11px}
 .fit-grid :is(.row-actions,.profile-row-actions) button{min-width:24px;min-height:40px;padding:3px}
 .fit-grid .row-action-controls{gap:2px}.fit-grid .client-name-link{min-height:40px}
 .mobile-list-help{display:inline}.desktop-list-help{display:none}
 .profiles-table.fit-grid :is(th,td):nth-child(n+6){display:none}
 .fit-grid.profiles-table th:nth-child(1){width:18%}.fit-grid.profiles-table th:nth-child(2){width:22%}.fit-grid.profiles-table th:nth-child(3){width:20%}.fit-grid.profiles-table th:nth-child(4){width:17%}.fit-grid.profiles-table th:nth-child(5){width:23%}
}
.fit-grid col.width-4{width:4%}
.fit-grid col.width-5{width:5%}
.fit-grid col.width-6{width:6%}
.fit-grid col.width-7{width:7%}
.fit-grid col.width-8{width:8%}
.fit-grid col.width-9{width:9%}
.fit-grid col.width-10{width:10%}
.fit-grid col.width-11{width:11%}

.list-details{display:grid;grid-template-columns:minmax(90px,1fr) minmax(0,3fr);gap:6px 12px;font-size:12px}.list-details dt{color:#62788a}.list-details dd{margin:0;overflow-wrap:anywhere}

@media(max-width:760px){.fit-grid th{font-size:9px;overflow-wrap:normal}#view-customers .profile{gap:8px}#view-customers .profile select{flex-basis:100%;max-width:100%}.fit-grid .row-action-controls{gap:1px}}
/* Reservar espacio real para todas las acciones en pantallas intermedias. */
@media(min-width:761px) and (max-width:1279px){
 .customers-table.fit-grid col:nth-child(1){width:12%}
 .customers-table.fit-grid col:nth-child(5){width:9%}
 .customers-table.fit-grid col:nth-child(6){width:7%}
 .customers-table.fit-grid col:nth-child(9){width:10%}
 .customers-table.fit-grid col:nth-child(11){width:9%}
 .fit-grid.profiles-table th:nth-child(1){width:8%}.fit-grid.profiles-table th:nth-child(2){width:13%}
}
@media(max-width:760px){.fit-grid.profiles-table .remote-profile-actions{margin-left:2px}.fit-grid.profiles-table td:first-child{padding-left:3px;padding-right:3px}}

/* Centro de órdenes compartido por la extensión y el panel remoto. */
.order-center{margin-bottom:24px;background:linear-gradient(145deg,#fff 0%,#f3f8f7 100%)}
.order-center .section-head{align-items:flex-start}.order-center .section-head .badge{display:flex;gap:5px;align-items:baseline;white-space:nowrap}.order-center .section-head .badge strong{font-size:18px}
.order-actions{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:18px 0}.order-actions button{min-height:42px}.order-actions button[aria-pressed="true"]{box-shadow:inset 0 0 0 2px #173e5329}
.order-target{display:grid;grid-template-columns:minmax(180px,.65fr) minmax(260px,1.35fr);gap:12px}.order-target label,.order-command-label{display:grid;gap:6px;font-weight:650}.order-target select,.order-command-label input{width:100%;min-width:0}
.order-command-label{margin-top:12px}.order-quick,.order-favorites{display:flex;gap:7px;flex-wrap:wrap;margin-top:9px}.order-quick button,.order-favorites button{padding:7px 10px;font-size:12px;background:#fff}
.order-schedule{display:flex;align-items:center;gap:12px;margin:16px 0;padding:12px;border:1px solid #d7e4df;border-radius:10px;background:#fff}.order-schedule .rule-toggle{margin:0;flex:1}.order-schedule input[type="datetime-local"]{min-width:220px}
.order-submit{display:flex;justify-content:flex-end;gap:8px}.order-favorite-head,.order-runs-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin-top:20px}.order-favorite-head h3,.order-runs-head h3{margin:0}.order-runs-head p{margin:0;color:#62788a;font-size:12px}
.order-runs{display:grid;gap:9px;margin-top:10px}.order-run{padding:12px;border:1px solid #d6e2de;border-radius:10px;background:#fff}.order-run-head{display:flex;justify-content:space-between;gap:12px;align-items:baseline}.order-run-head small{color:#526b7c;text-align:right}.order-run>p{margin:7px 0 0}.order-run-actions{display:flex;gap:7px;flex-wrap:wrap;margin-top:9px}.order-run-actions:empty{display:none}.order-run details{margin-top:8px}.order-run details summary{cursor:pointer;color:#26716a}.order-run-items,.order-review-list{max-height:38vh;overflow:auto;padding-left:22px}.order-run-items li,.order-review-list li{padding:4px 0}
#order-status:empty{display:none}#order-status.error{color:#a33f36}
@media(max-width:760px){.order-actions{grid-template-columns:repeat(2,minmax(0,1fr))}.order-target{grid-template-columns:1fr}.order-schedule{align-items:stretch;flex-direction:column}.order-schedule input[type="datetime-local"]{width:100%;min-width:0}.order-submit{display:grid;grid-template-columns:1fr 1fr}.order-run-head,.order-favorite-head,.order-runs-head{align-items:flex-start;flex-direction:column}.order-run-head small{text-align:left}.order-quick,.order-favorites{display:grid;grid-template-columns:1fr 1fr}.order-quick button,.order-favorites button{white-space:normal;text-align:left}}
@media(max-width:420px){.order-submit,.order-quick,.order-favorites{grid-template-columns:1fr}.order-center{padding-left:12px;padding-right:12px}}

.certificate-dropzone.dragging{outline:3px dashed #297367;background:#e7f4ef}.certificate-dropzone progress{width:100%;margin-top:12px}#search-automation-form label{display:flex;gap:8px;align-items:center}#search-automation-form input{width:auto}
