/* Consolidated Principal layout. Edit existing rules here instead of appending overrides. */
@media (min-width: 640px) {
  .chkit-workspace-site-cell:nth-child(2n+1) { padding-right: 20px; }
  .chkit-workspace-site-cell:nth-child(2n) { border-left: 1px solid rgb(82, 82, 82); padding-left: 20px; }
}

.chkit-roles-heading { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding-bottom: 8px; border-bottom: 1px solid rgb(66, 71, 78); }

.chkit-roles-heading h2 { font-size: 11px; white-space: nowrap; gap: 5px; }

.chkit-create-role { flex: 0 0 auto; border: 0px; border-radius: 8px; padding: 6px 9px; font-size: 11px; font-weight: 700; cursor: pointer; white-space: nowrap; background: rgb(255, 121, 0) !important; color: white !important; }

#rbac-manager-container .chkit-role-card { border-radius: 9px; cursor: pointer; padding: 7px 10px !important; border: 1px solid rgb(62, 68, 76) !important; background: rgb(37, 42, 48) !important; color: rgb(243, 244, 246) !important; }

#rbac-manager-container .chkit-role-selected { background: rgb(59, 66, 76) !important; border-color: rgb(255, 144, 0) !important; }

#rbac-manager-container .chkit-role-card p { font-size: 10px !important; line-height: 1.2 !important; margin-top: 3px !important; color: rgb(203, 208, 216) !important; }

#rbac-manager-container .chkit-role-card .text-neutral-900 { color: rgb(248, 250, 252) !important; }

#rbac-manager-container .chkit-role-card span { font-size: 10px; }

#chkit-rbac-tabs-host { display: inline-flex; vertical-align: middle; margin-left: 14px; margin-top: 4px; }

.chkit-rbac-header-tabs { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

.chkit-rbac-header-tabs button { white-space: nowrap; padding: 6px 9px !important; font-size: 11px !important; }

#rbac-manager-container { padding-top: 8px !important; }

@media (max-width: 700px) {
  #chkit-rbac-tabs-host { display: flex; margin-left: 0px; }
  .chkit-rbac-header-tabs button { font-size: 10px !important; }
  .chkit-roles-heading h2 { font-size: 10px; }
}

#desktop-sidebar .space-y-6 > :not([hidden]) ~ :not([hidden]) { margin-top: 12px !important; }

#desktop-sidebar button.w-full { padding-top: 7px !important; padding-bottom: 7px !important; line-height: 1.25 !important; }

#desktop-sidebar .space-y-1 > :not([hidden]) ~ :not([hidden]) { margin-top: 2px !important; }

#chkit-own-portfolio-backup { padding-top: 8px !important; padding-bottom: 8px !important; }

button:disabled { cursor: not-allowed !important; }

button:disabled svg.lucide-trash-2 { opacity: 0.3; }

.chkit-asset-panel[hidden] { display: none !important; }



.chkit-asset-panel-heading > div:first-child { width: 100%; min-width: 0px; }

.chkit-asset-panel-heading > div:first-child > div { width: 100%; min-width: 0px; }

.chkit-asset-panel-heading h2 { white-space: nowrap; flex: 1 1 0%; min-width: 0px; overflow-x: auto; }

.chkit-asset-panel-heading h2 svg { flex-shrink: 0; }

.chkit-asset-panel-heading p { white-space: nowrap; width: 100%; overflow-x: auto; }

#desktop-view-container { width: 100%; box-sizing: border-box; max-width: none !important; margin-left: 0px !important; margin-right: 0px !important; padding: 6px !important; }

#desktop-view-container > :not([hidden]) ~ :not([hidden]) { margin-top: 6px !important; }







.chkit-asset-panel .grid:has([id^="asset-card-"]) { gap: 4px !important; margin-top: 5px !important; }

.chkit-asset-panel-heading { display:grid;grid-template-columns:minmax(0,1fr) auto 36px 36px 36px;align-items:center;border-bottom:1px solid rgb(54,60,67);min-width:0;gap:8px!important;padding-right:0!important;padding-bottom:5px!important; }

#desktop-view-container > .grid { gap: 6px !important; }

.chkit-asset-panel > div { padding: 8px !important; }

[id^="asset-card-"]:not([data-chkit-expanded="true"]) { padding: 6px !important; min-height: 0px !important; }

[id^="asset-card-"] .chkit-card-location { margin-top: 1px !important; line-height: 13px !important; }

#desktop-top-header { flex-wrap: nowrap; gap: 8px !important; padding: 4px 10px !important; }

#desktop-top-header > div:first-child { flex: 0 0 auto; align-self:flex-start; }








#chkit-header-account { flex: 0 0 auto; }



#chkit-header-account > button:last-child { font-weight: 600; background: rgb(255, 107, 0) !important; border-color: rgb(255, 107, 0) !important; color: rgb(255, 255, 255) !important; }

#chkit-header-account > button:last-child:hover { background: rgb(232, 95, 0) !important; }

#desktop-sidebar #chkit-profile-nav { display: none !important; }

[id^="chat-message-msg_err_"] > div:last-child > div:first-child { background: rgb(255, 241, 242) !important; color: rgb(153, 27, 27) !important; border-color: rgb(253, 164, 175) !important; }

[id^="chat-message-msg_err_"] > div:last-child > div:first-child * { color: rgb(153, 27, 27) !important; }

[id^="asset-card-"] h3[data-user-taxonomy="true"] { color: rgb(255, 133, 0) !important; }

/* V1.75: compact role permission matrix. */
.chkit-role-details{padding:12px!important}.chkit-role-details>div+div{margin-top:12px!important}.chkit-role-details>div:first-child{padding-bottom:9px!important}.chkit-role-permission-matrix{table-layout:fixed!important;line-height:1.15!important}.chkit-role-permission-matrix th{padding:6px 8px!important;font-size:12px!important;line-height:1.2!important;width:18.66%!important}.chkit-role-permission-matrix th:first-child{width:44%!important}.chkit-role-permission-matrix td{padding:3px 8px!important;vertical-align:middle!important;line-height:1.15!important}.chkit-role-permission-matrix td:first-child>div:first-child{font-size:12px!important;line-height:14px!important}.chkit-role-permission-matrix td:first-child>div+div{font-size:10.5px!important;line-height:12px!important;margin-top:1px!important}.chkit-role-permission-matrix td button{width:20px!important;height:20px!important;min-width:20px!important;min-height:20px!important;margin:0!important;padding:0!important}.chkit-role-permission-matrix td button svg{width:12px!important;height:12px!important}

#chkit-header-taxonomies{flex:1 1 380px;min-width:0;display:flex;justify-content:flex-start;align-self:flex-start}
.chkit-header-taxonomy-links{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:40px 40px;gap:6px 8px;min-width:0;height:86px;box-sizing:border-box}
.chkit-header-taxonomy-links button{display:inline-flex;align-items:center;gap:8px;padding:9px 13px;background:#202428;color:#e5e7eb;border:1px solid #454b52;border-radius:12px;font-size:13px;font-weight:700;cursor:pointer}
.chkit-header-taxonomy-links button:hover{border-color:#ff7900;color:#ff7900}
.chkit-header-taxonomy-links svg{width:19px;height:19px;color:#ff7900}
@media(max-width:900px){#chkit-header-taxonomies{order:3;flex-basis:100%}#desktop-top-header{flex-wrap:wrap}}



/* Cabecera: dos filas de accesos, alineados con cada taxonomía. */
#chkit-locations-pc-nav,#chkit-sidebar-configuration{display:none!important}
#desktop-sidebar>div:first-child>div:first-child{padding:4px 8px 0!important}
#desktop-sidebar>div:first-child>div:nth-child(2){padding-top:0!important;padding-bottom:4px!important}
#desktop-sidebar #chkit-brand-logo img{height:64px!important;width:auto!important;max-width:120px!important}

/* Dashboard: cabecera con navegación corta y contenido a todo el ancho. */
#chkit-desktop-layout:has(#desktop-view-container){display:grid!important;grid-template-columns:180px minmax(0,1fr);grid-template-rows:var(--chkit-banner-height,auto) 1fr;position:relative;align-items:start}
#chkit-desktop-layout:has(#desktop-view-container)>#desktop-sidebar{position:relative!important;grid-column:1;grid-row:1;top:0;left:0;height:auto!important;min-height:0!important;align-self:start;z-index:60;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important}
#chkit-desktop-layout:has(#desktop-view-container)>div:last-child{display:contents!important}
#chkit-desktop-layout:has(#desktop-view-container) #desktop-top-header{grid-column:1/-1;grid-row:1;align-self:stretch;box-sizing:border-box;padding-left:326px!important;min-height:0!important;align-items:flex-start;background:#202428!important;border:0!important;border-radius:0!important;box-shadow:none!important}
#chkit-dashboard-columns{display:grid!important;grid-template-columns:280px minmax(0,1fr)!important;align-items:start}
#chkit-dashboard-columns>#chkit-locations-panel,#chkit-dashboard-columns>.chkit-asset-panel{grid-column:auto!important;min-width:0}
.chkit-dashboard-assets-grid{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important}
@media(max-width:1100px){#chkit-dashboard-columns{grid-template-columns:240px minmax(0,1fr)!important}.chkit-dashboard-assets-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media(max-width:800px){#chkit-dashboard-columns{grid-template-columns:minmax(0,1fr)!important}#chkit-locations-panel{height:auto!important}.chkit-dashboard-assets-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media(max-width:500px){.chkit-dashboard-assets-grid{grid-template-columns:minmax(0,1fr)!important}}

#chkit-header-account{margin-right:54px}
#chkit-header-system-manager-slot #chkit-system-manager-menu{width:100%}
#chkit-header-system-manager-slot #chkit-system-manager-options{left:auto;right:0}
#chkit-header-system-manager-slot #chkit-system-manager-toggle{font-size:14px;white-space:nowrap}

.chkit-assets-loading{display:flex;align-items:center;justify-content:center;gap:12px;min-height:240px;color:#f1f5f9;font-size:16px}.chkit-loading-clock{font-size:32px;animation:chkit-clock-turn 1.4s linear infinite}@keyframes chkit-clock-turn{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.chkit-loading-clock{animation:none}}

/* Título compacto y versión con idioma en una sola línea. */
#chkit-desktop-layout>#desktop-sidebar{width:180px!important}
#desktop-top-header>div:first-child>div{display:grid;grid-template-columns:max-content max-content;align-items:center;column-gap:7px}
#desktop-top-header>div:first-child h1{grid-column:1/-1;margin:0!important}
#desktop-top-header>div:first-child p:empty{display:none}
#desktop-top-header>div:first-child p:last-of-type{grid-column:1;grid-row:2;margin:3px 0 0!important;white-space:nowrap}
#desktop-top-header #chkit-principal-language{grid-column:2;grid-row:2;margin:3px 0 0!important;padding:1px 7px!important;font-size:10px!important;line-height:16px!important;white-space:nowrap}

#chkit-desktop-layout:has(#desktop-view-container)>div:last-child>main{grid-column:1/-1;grid-row:2;min-width:0}
#chkit-desktop-layout:has(#desktop-view-container)>#desktop-sidebar>div:first-child>div:first-child{border:0!important}

/* Acercar el título al logo sin reducir el botón Dashboard. */
#chkit-desktop-layout:has(#desktop-view-container) #desktop-top-header>div:first-child{position:absolute;left:136px;top:4px}
#chkit-header-portfolio{box-sizing:border-box;height:86px!important;min-height:86px!important;align-self:flex-start;display:flex;flex-direction:column;justify-content:center;gap:3px}
#chkit-header-portfolio>div:last-child{width:100%}
#chkit-header-portfolio strong{font-size:16px!important;line-height:20px}
@media(max-width:800px){#chkit-desktop-layout:has(#desktop-view-container) #desktop-top-header{padding-left:190px!important}#chkit-desktop-layout:has(#desktop-view-container) #desktop-top-header>div:first-child{position:static}}

.chkit-header-taxonomy-links>button{box-sizing:border-box;height:40px;min-height:0;padding-top:7px;padding-bottom:7px}
#chkit-header-account{align-self:flex-start}

/* La franja toma solo la altura necesaria, hasta debajo de Dashboard. */
#desktop-top-header{height:auto!important;padding-bottom:4px!important}
.chkit-header-taxonomy-links{width:100%}
@media(min-width:901px) and (max-width:1150px){#chkit-desktop-layout:has(#desktop-view-container) #desktop-top-header{padding-left:300px!important;gap:6px!important}#desktop-top-header h1{font-size:16px!important}#chkit-header-portfolio{min-width:140px!important}#chkit-header-taxonomies{flex-basis:340px}#chkit-header-account{width:156px!important;margin-right:44px}.chkit-header-taxonomy-links button{font-size:12px;padding-left:6px;padding-right:6px;gap:5px}.chkit-header-taxonomy-links .chkit-access-badge{display:none}}

.chkit-asset-panel-heading>div:first-of-type{grid-column:1;grid-row:1}
.chkit-asset-panel-heading>div:last-of-type{grid-column:2;grid-row:1;display:flex;align-items:center;justify-content:flex-end;gap:8px}
.chkit-asset-panel-heading>.chkit-open-ticket-filter{position:static!important;grid-column:4;grid-row:1;align-self:center}
.chkit-asset-panel-heading>.chkit-future-ticket-filter{position:static!important;grid-column:5;grid-row:1;align-self:center}
.chkit-asset-panel-heading .chkit-principal-category-filter,.chkit-asset-panel-heading .chkit-principal-zone-filter{box-sizing:border-box;width:180px;max-width:210px;margin:0;height:36px;padding:6px 10px;font-size:12px}
@media(max-width:1100px){.chkit-asset-panel-heading>div:first-of-type{grid-column:1/-1;grid-row:1}.chkit-asset-panel-heading>div:last-of-type{grid-column:1/3;grid-row:2;justify-content:flex-start}.chkit-asset-panel-heading>.chkit-open-ticket-filter,.chkit-asset-panel-heading>.chkit-future-ticket-filter{grid-row:2}.chkit-asset-panel-heading .chkit-principal-category-filter,.chkit-asset-panel-heading .chkit-principal-zone-filter{width:150px;max-width:100%}}

.chkit-asset-panel-heading>.chkit-public-asset-filter{grid-column:3;grid-row:1;display:flex;align-items:center;justify-content:center;width:36px;height:36px}
@media(max-width:1100px){.chkit-asset-panel-heading>.chkit-public-asset-filter{grid-row:2}}

.chkit-asset-panel-heading h2.chkit-asset-title-help{position:relative;overflow:visible;cursor:help}
.chkit-asset-drag-tooltip{display:none;position:absolute;left:0;top:calc(100% + 8px);z-index:100;box-sizing:border-box;width:340px;max-width:80vw;padding:10px 12px;border:1px solid #ff7900;border-radius:8px;background:#16191d;color:#fff;white-space:normal;font-size:13px;font-weight:400;line-height:1.5;box-shadow:0 4px 16px #0008;pointer-events:none}
.chkit-asset-title-help:hover .chkit-asset-drag-tooltip,.chkit-asset-title-help:focus .chkit-asset-drag-tooltip{display:block}

[id^="asset-card-"] .chkit-card-location-zone{display:flex!important;align-items:center;gap:4px;white-space:nowrap;font-size:12px;line-height:18px;margin-top:3px;max-width:100%;overflow-x:auto;color:#a3a3a3}
.chkit-card-location-zone>.chkit-card-location-name{color:#f97316;flex-shrink:0}
.chkit-card-location-zone>.chkit-dashboard-qr-zone{margin-top:0!important;white-space:nowrap;flex-shrink:0}

[id^="asset-card-"] .chkit-asset-icon-handle{padding-top:0!important}

.chkit-location-directory-row{position:relative;gap:8px}
.chkit-location-directory-name{flex:1;min-width:0}
.chkit-location-directory-count{flex-shrink:0;margin-left:auto}
.chkit-location-directory-count>span{text-align:right;min-width:24px}
.chkit-location-directory-count>button{position:absolute;top:50%;transform:translateY(-50%);visibility:hidden;background:#202428}
.chkit-location-directory-count>button:nth-of-type(1){right:64px}
.chkit-location-directory-count>button:nth-of-type(2){right:38px}
.chkit-location-directory-row:hover .chkit-location-directory-count>button,.chkit-location-directory-row:focus-within .chkit-location-directory-count>button{visibility:visible;opacity:1}

.chkit-card-quick-actions{display:flex;align-items:center;gap:6px;flex-shrink:0}.chkit-card-duplicate{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;padding:4px;border:1px solid #454c54;border-radius:7px;background:transparent;color:#ff8500;cursor:pointer}.chkit-card-duplicate:hover{background:#ff850022}.chkit-card-duplicate:focus-visible{outline:2px solid #ff8500;outline-offset:2px}

/* Roles: compact language badge and stacked navigation. */
#desktop-top-header #chkit-principal-language{width:max-content!important;min-width:0!important;max-width:max-content!important;justify-self:start;flex:0 0 auto;box-sizing:border-box}
#desktop-top-header[data-chkit-view="RBAC_CONFIG"]{box-sizing:border-box;min-width:0;max-width:100%;align-items:flex-start;gap:10px!important}
#desktop-top-header[data-chkit-view="RBAC_CONFIG"]>div:first-child{flex:1 1 320px;min-width:0;max-width:100%}
#desktop-top-header[data-chkit-view="RBAC_CONFIG"]>div:first-child>div{width:100%;min-width:0;grid-template-columns:max-content minmax(0,1fr)}
#desktop-top-header[data-chkit-view="RBAC_CONFIG"]>div:first-child h1{white-space:normal}
#desktop-top-header[data-chkit-view="RBAC_CONFIG"]>div:first-child p:not(:last-of-type){grid-column:1/-1;grid-row:3;white-space:normal;overflow-wrap:anywhere}
#desktop-top-header[data-chkit-view="RBAC_CONFIG"] #chkit-rbac-tabs-host{grid-column:1/-1;grid-row:4;margin:6px 0 0;display:flex;min-width:0}
#desktop-top-header[data-chkit-view="RBAC_CONFIG"] .chkit-rbac-header-tabs{flex-direction:column;align-items:flex-start;flex-wrap:nowrap;max-width:100%}
#desktop-top-header[data-chkit-view="RBAC_CONFIG"] .chkit-rbac-header-tabs button{max-width:100%;white-space:normal;text-align:left}
#desktop-top-header[data-chkit-view="RBAC_CONFIG"] #chkit-header-portfolio{flex:0 0 194px;min-width:0!important}
#desktop-top-header[data-chkit-view="RBAC_CONFIG"]>div:last-child{flex:0 0 auto;min-width:0}
@media(max-width:1100px){#desktop-top-header[data-chkit-view="RBAC_CONFIG"]{flex-wrap:wrap}#desktop-top-header[data-chkit-view="RBAC_CONFIG"]>div:first-child{flex-basis:100%}}

/* Roles: unified banner and full-width content. */
#chkit-desktop-layout:has(#rbac-manager-container){display:grid!important;grid-template-columns:180px minmax(0,1fr);grid-template-rows:var(--chkit-banner-height,auto) 1fr;position:relative;align-items:start}
#chkit-desktop-layout:has(#rbac-manager-container)>#desktop-sidebar{position:relative!important;grid-column:1;grid-row:1;top:0;left:0;height:auto!important;min-height:0!important;align-self:start;z-index:60;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important}
#chkit-desktop-layout:has(#rbac-manager-container)>#desktop-sidebar>div:first-child{border:0!important}
#chkit-desktop-layout:has(#rbac-manager-container)>div:last-child{display:contents!important}
#chkit-desktop-layout:has(#rbac-manager-container) #desktop-top-header{grid-column:1/-1;grid-row:1;align-self:stretch;padding-left:190px!important;min-height:0!important;border:0!important;border-radius:0!important;box-shadow:none!important;background:#202428!important}
#chkit-desktop-layout:has(#rbac-manager-container) main{grid-column:1/-1;grid-row:2;min-width:0}
#rbac-manager-container{max-width:none!important;width:100%;box-sizing:border-box;margin:0!important;padding:8px 10px!important}
#desktop-top-header[data-chkit-view="RBAC_CONFIG"] #chkit-rbac-tabs-host{grid-row:3;margin-top:3px}
#desktop-top-header[data-chkit-view="RBAC_CONFIG"]>div:first-child p:empty{display:none!important}

@media(min-width:1024px){#rbac-manager-container .chkit-role-details{width:50%;box-sizing:border-box;min-width:0}#rbac-manager-container .chkit-role-details>div:first-child>div>div{flex-wrap:wrap}#rbac-manager-container .chkit-role-details table{width:100%;table-layout:fixed}#rbac-manager-container .chkit-role-details th,#rbac-manager-container .chkit-role-details td{overflow-wrap:anywhere;white-space:normal}}

.chkit-role-primary-column,.chkit-role-secondary-column{min-width:0;display:flex;flex-direction:column;gap:20px}.chkit-role-primary-column>div:first-child>div>div{flex-wrap:wrap}@media(min-width:1024px){#rbac-manager-container .chkit-role-details{width:100%;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:start;gap:24px}#rbac-manager-container .chkit-role-details>div+div{margin-top:0!important}}

