:root{
  --sidebar-width: 244px;
  --app-header-height: 45px;
  --app-action-height: 34px;
  --app-action-radius: 8px;
  --app-control-font-size: .9rem;
  --app-table-font-size: .9rem;
  --chef-ink: #233524;
  --chef-leaf: #4b7447;
  --chef-cream: #faf7ef;
  --chef-line: #dfe6d8;
  --idae-col-funnel-width: 76px;
  --idae-col-contact-width: 56px;
}

.btn,
.form-control,
.form-select,
.input-group-text,
.dropdown-menu,
.nav-tabs .nav-link,
.pagination,
.modal-content{
  font-size: var(--app-control-font-size);
}

.table{
  font-size: var(--app-table-font-size);
}

.chef-topbar{
  background: var(--chef-ink);
}

.chef-topbar .navbar-brand{
  font-weight: 800;
  letter-spacing: 0;
}

.recipes-page{
  display: grid;
  gap: 1rem;
}

.recipes-header{
  border-color: var(--chef-line);
}

.recipes-filters{
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(145px, 190px) minmax(145px, 190px) minmax(125px, 160px) auto;
  gap: .75rem;
  align-items: stretch;
  padding: .85rem;
  border: 1px solid var(--chef-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 .125rem .25rem rgba(35,53,36,.06);
}

.recipes-clear{
  min-height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  white-space: nowrap;
}

.recipe-region-filter{
  position: relative;
  min-width: 0;
}

.recipe-region-filter__button{
  width: 100%;
  min-height: 58px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 0 .5rem;
  padding: .55rem .75rem;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  background: #fff;
  color: #212529;
  text-align: left;
}

.recipe-region-filter__label{
  color: #6c757d;
  font-size: .78rem;
}

.recipe-region-filter__value{
  min-width: 0;
  font-size: 1rem;
}

.recipe-region-filter__value .recipe-region{
  height: 28px;
  font-size: .84rem;
}

.recipe-region-filter__button i{
  grid-column: 2;
  grid-row: 1 / span 2;
  color: #495057;
}

.recipe-region-filter__menu{
  width: 100%;
  min-width: 220px;
  max-height: 320px;
  overflow-y: auto;
  padding: .35rem;
}

.recipe-region-filter__item{
  min-height: 38px;
  display: flex;
  align-items: center;
  border-radius: 6px;
}

.recipe-region-filter__item.is-active{
  background: #eef6e8;
  color: #233524;
  font-weight: 800;
}

.recipes-summary{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  min-height: 38px;
}

.recipes-summary strong,
.recipes-summary span{
  display: inline-flex;
  align-items: center;
}

.recipes-source{
  margin-left: .35rem;
}

.recipes-chips{
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .35rem;
}

.recipes-chips span{
  padding: .18rem .52rem;
  border: 1px solid #d8e3cf;
  border-radius: 999px;
  background: #f5f9f1;
  color: #365a32;
  font-size: .78rem;
  font-weight: 700;
}

.recipes-table-wrap{
  overflow: hidden;
  border: 1px solid var(--chef-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 .25rem .9rem rgba(35,53,36,.07);
}

.recipes-table{
  min-width: 680px;
  margin-bottom: 0;
  table-layout: fixed;
}

.recipes-table th{
  color: #5f6f5d;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: 0;
}

.recipes-table th:nth-child(1){ width: 58%; }
.recipes-table th:nth-child(2){ width: 18%; }
.recipes-table th:nth-child(3){ width: 18%; }

.recipes-table td{
  vertical-align: middle;
}

.recipe-row{
  cursor: pointer;
}

.recipe-row:focus-visible{
  outline: 2px solid rgba(75,116,71,.4);
  outline-offset: -2px;
}

.recipe-name-btn{
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.recipe-name-btn strong{
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recipe-name-btn strong{
  color: #182519;
  font-size: 1rem;
}

.recipe-region{
  display: inline-flex;
  align-items: center;
  gap: .42rem;
  max-width: 100%;
  height: 32px;
  padding: 0 .62rem 0 .4rem;
  border: 1px solid #e0ead9;
  border-radius: 999px;
  background: #f8fbf5;
  color: #233524;
  font-size: .86rem;
  font-weight: 750;
  line-height: 1;
  white-space: nowrap;
}

.recipe-region__flag{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #fff;
  line-height: 1;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(35,53,36,.08);
}

.recipe-flag{
  width: 20px;
  height: 15px;
  display: block;
  border-radius: 3px;
  background: linear-gradient(135deg, #dfead8, #f8fbf5);
  box-shadow: inset 0 0 0 1px rgba(35,53,36,.08);
}

.recipe-flag--es{ background: linear-gradient(to bottom, #aa151b 0 25%, #f1bf00 25% 75%, #aa151b 75% 100%); }
.recipe-flag--us{ background: repeating-linear-gradient(to bottom, #b22234 0 2px, #fff 2px 4px); position: relative; }
.recipe-flag--us::before{ content:""; position:absolute; left:0; top:0; width:11px; height:9px; background:#3c3b6e; border-radius:3px 0 2px 0; }
.recipe-flag--it{ background: linear-gradient(to right, #009246 0 33%, #fff 33% 66%, #ce2b37 66% 100%); }
.recipe-flag--fr{ background: linear-gradient(to right, #0055a4 0 33%, #fff 33% 66%, #ef4135 66% 100%); }
.recipe-flag--de{ background: linear-gradient(to bottom, #000 0 33%, #dd0000 33% 66%, #ffce00 66% 100%); }
.recipe-flag--mx{ background: linear-gradient(to right, #006847 0 33%, #fff 33% 66%, #ce1126 66% 100%); }
.recipe-flag--gb{ background: linear-gradient(135deg, #012169 0 42%, #fff 42% 48%, #c8102e 48% 52%, #fff 52% 58%, #012169 58% 100%); }
.recipe-flag--jp{ background: radial-gradient(circle at 50% 50%, #bc002d 0 31%, transparent 32%), #fff; }
.recipe-flag--cn{ background: #de2910; }
.recipe-flag--pt{ background: linear-gradient(to right, #006600 0 42%, #ff0000 42% 100%); }
.recipe-flag--ar{ background: linear-gradient(to bottom, #75aadb 0 33%, #fff 33% 66%, #75aadb 66% 100%); }
.recipe-flag--br{ background: radial-gradient(circle at 50% 50%, #002776 0 23%, transparent 24%), linear-gradient(135deg, transparent 28%, #ffdf00 29% 71%, transparent 72%), #009b3a; }
.recipe-flag--cl{ background: linear-gradient(to bottom, #fff 0 50%, #d52b1e 50% 100%); position: relative; }
.recipe-flag--cl::before{ content:""; position:absolute; left:0; top:0; width:10px; height:9px; background:#0039a6; border-radius:3px 0 0 0; }
.recipe-flag--co{ background: linear-gradient(to bottom, #fcd116 0 50%, #003893 50% 75%, #ce1126 75% 100%); }
.recipe-flag--cu{ background: repeating-linear-gradient(to bottom, #002a8f 0 3px, #fff 3px 6px); }
.recipe-flag--gr{ background: repeating-linear-gradient(to bottom, #0d5eaf 0 2px, #fff 2px 4px); }
.recipe-flag--in{ background: linear-gradient(to bottom, #ff9933 0 33%, #fff 33% 66%, #138808 66% 100%); }
.recipe-flag--pe{ background: linear-gradient(to right, #d91023 0 33%, #fff 33% 66%, #d91023 66% 100%); }
.recipe-flag--tr{ background: #e30a17; }
.recipe-flag--ve{ background: linear-gradient(to bottom, #fcd116 0 33%, #003893 33% 66%, #ce1126 66% 100%); }
.recipe-flag--world{ background: radial-gradient(circle at 45% 45%, #63c27d 0 18%, transparent 19%), radial-gradient(circle at 58% 54%, #63c27d 0 12%, transparent 13%), #dceee8; }

.recipes-action-col{
  width: 48px;
  text-align: right;
}

#recipes_rows.is-readonly [data-recipe-edit]{
  opacity: .55;
}

.recipes-login-note{
  margin-bottom: 0;
}

.recipe-detail{
  overflow: hidden;
  border: 0;
  border-radius: 8px;
}

.recipe-detail__hero{
  position: relative;
  padding: 1.35rem 1.45rem 1.15rem;
  border-bottom: 1px solid var(--chef-line);
  background:
    radial-gradient(circle at 95% 15%, rgba(255,193,7,.22), transparent 34%),
    linear-gradient(135deg, #fffaf0 0%, #f6f9f2 100%);
}

.recipe-detail__hero .btn-close{
  position: absolute;
  top: 1rem;
  right: 1rem;
}

.recipe-detail__eyebrow{
  color: #6d7b67;
  font-size: .76rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.recipe-detail__hero h5{
  max-width: calc(100% - 44px);
  margin: .15rem 0 0;
  color: #172019;
  font-size: 1.65rem;
  font-weight: 900;
  line-height: 1.1;
}

.recipe-detail__meta{
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-top: .65rem;
}

.recipe-detail__meta > .recipe-meta-pill{
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 .72rem;
  border-radius: 999px;
  background: #eef6e8;
  color: #365a32;
  font-size: .86rem;
  font-weight: 700;
  line-height: 1;
}

.recipe-detail__meta > .recipe-region{
  height: 32px;
}

.recipe-detail__text{
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #fff;
}

.recipe-detail__text ol,
.recipe-detail__text ul{
  display: grid;
  gap: .55rem;
  margin: 0;
  padding-left: 1.25rem;
}

.recipe-detail__text li{
  padding-left: .25rem;
  color: #303832;
  line-height: 1.55;
}

.recipe-detail__text ol li::marker{
  color: #4b7447;
  font-weight: 900;
}

.recipe-detail__text ul li::marker{
  color: #d99000;
}

.recipe-tabs{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .35rem;
  padding: .25rem;
  margin-bottom: 1rem;
  border: 1px solid #dfead8;
  border-radius: 8px;
  background: #f6faf3;
}

.recipe-tab{
  min-height: 42px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #4d6049;
  font-weight: 850;
}

.recipe-tab.is-active{
  background: #fff;
  color: #233524;
  box-shadow: 0 .18rem .55rem rgba(35,53,36,.08);
}

.recipe-tab-panel{
  display: none;
}

.recipe-tab-panel.is-active{
  display: block;
}

.recipe-detail__ingredients{
  min-height: 280px;
  padding: 1rem 1.1rem;
  border: 1px solid #edf2e8;
  border-radius: 8px;
  background: #fffdf8;
}

.recipe-stepper{
  display: grid;
  gap: .9rem;
}

.recipe-stepper__top{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: #6d7b67;
  font-size: .84rem;
  font-weight: 850;
}

.recipe-stepper__dots{
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .28rem;
}

.recipe-stepper__dots span{
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #d7e3cf;
}

.recipe-stepper__dots span.is-active{
  width: 22px;
  background: #4b7447;
}

.recipe-stepper__progress{
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8efe3;
}

.recipe-stepper__progress span{
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #4b7447, #d99000);
  transition: width .22s ease;
}

.recipe-stepper__card{
  min-height: 260px;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
  padding: 1.25rem;
  border: 1px solid #dfead8;
  border-radius: 8px;
  background:
    radial-gradient(circle at 100% 0%, rgba(217,144,0,.12), transparent 34%),
    #fffdf8;
}

.recipe-stepper__number{
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #4b7447;
  color: #fff;
  font-size: 1.2rem;
  font-weight: 900;
}

.recipe-stepper__card p{
  margin: 0;
  color: #303832;
  font-size: 1.08rem;
  line-height: 1.65;
}

.recipe-stepper__actions{
  display: flex;
  justify-content: space-between;
  gap: .75rem;
}

.recipe-stepper__actions .btn{
  min-width: 132px;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
}

.recipe-form-grid{
  display: grid;
  grid-template-columns: minmax(180px, 1fr) repeat(3, minmax(120px, 180px));
  gap: .75rem;
}

.recipe-form-name,
.recipe-form-text{
  grid-column: 1 / -1;
}

.recipe-form-text textarea{
  min-height: 170px;
}

.recipe-import-mode{
  display: grid;
  gap: .5rem;
}

.recipe-import-mode label{
  display: flex;
  align-items: center;
  gap: .55rem;
  min-height: 42px;
  padding: .6rem .7rem;
  border: 1px solid var(--chef-line);
  border-radius: 8px;
  background: #fff;
  font-weight: 700;
}

.chef-login-body{
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 18%, rgba(218,235,208,.85), transparent 34%),
    radial-gradient(circle at 86% 10%, rgba(255,232,186,.65), transparent 30%),
    #f8faf6;
}

.chef-login-shell{
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(360px, 520px) minmax(420px, 540px);
  align-items: stretch;
  justify-content: center;
  column-gap: clamp(1.25rem, 3vw, 3rem);
}

.chef-login-art{
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: clamp(2rem, 5vw, 5rem) 0 clamp(2rem, 5vw, 5rem) clamp(1rem, 3vw, 3rem);
}

.chef-login-art img{
  width: min(540px, 100%);
  height: auto;
  display: block;
  filter: drop-shadow(0 22px 34px rgba(35,53,36,.12));
}

.chef-login-panel{
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: clamp(1.5rem, 5vw, 5rem) clamp(1rem, 3vw, 3rem) clamp(1.5rem, 5vw, 5rem) 0;
}

.chef-login-card{
  width: min(430px, 100%);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  border: 1px solid rgba(35,53,36,.12);
  border-radius: 8px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 20px 55px rgba(35,53,36,.12);
}

.chef-login-brand{
  display: flex;
  align-items: center;
  gap: .55rem;
  margin-bottom: 1.1rem;
  color: var(--chef-ink);
  font-weight: 850;
}

.chef-login-card h1{
  margin: 0;
  color: #172019;
  font-size: 1.9rem;
  font-weight: 850;
  line-height: 1.1;
}

.chef-login-card p{
  margin: .5rem 0 1.35rem;
  color: #60705d;
}

.chef-login-card .form-control{
  border-color: #d8e3cf;
}

.chef-login-card .btn-success{
  min-height: 48px;
  border-color: #3d6b38;
  background: #3d6b38;
  font-weight: 800;
}

.chef-login-card .btn-success:hover,
.chef-login-card .btn-success:focus-visible{
  border-color: #31582d;
  background: #31582d;
}

.chef-login-links{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.1rem;
  font-size: .9rem;
}

.chef-login-links a{
  color: #3d6b38;
  text-decoration: none;
  font-weight: 700;
}

.app-topbar .btn,
.app-header .btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--app-action-radius);
  min-height: 34px;
  font-weight: 600;
}

.app-topbar{
  position: sticky;
  top: 0;
  z-index: 1030;
}

.app-topbar #btn_sidebar,
.app-topbar .app-top-actions > .dropdown > .btn,
.app-header .app-top-icon-btn{
  width: 34px;
  height: 34px;
  min-width: 34px;
  padding: 0;
}

.app-page-header{
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  column-gap: 1rem;
  row-gap: .25rem;
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 .125rem .25rem rgba(0,0,0,.075);
  margin-bottom: 1rem;
}

.app-page-header h1,
.app-page-header h4{
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.2;
}

.app-header-actions,
.container-header-actions,
.pem-header-actions{
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: .5rem;
  justify-content: flex-end;
  margin-left: auto;
}

.app-header-actions > .btn,
.app-header-actions > a.btn,
.app-page-header > .btn,
.app-page-header > a.btn,
.container-header-actions > .btn,
.container-header-actions > a.btn,
.pem-header-actions > .btn,
.pem-header-actions > a.btn{
  width: var(--app-action-height);
  height: var(--app-action-height);
  min-width: var(--app-action-height);
  min-height: var(--app-action-height);
  border-radius: var(--app-action-radius);
  padding: 0;
  font-size: 0;
  font-weight: 600;
  line-height: 1.1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.app-header-actions > .btn i,
.app-header-actions > a.btn i,
.app-page-header > .btn i,
.app-page-header > a.btn i,
.container-header-actions > .btn i,
.container-header-actions > a.btn i,
.pem-header-actions > .btn i,
.pem-header-actions > a.btn i{
  margin: 0 !important;
  font-size: .95rem;
}

.app-card-icon-btn{
  width: var(--app-action-height);
  height: var(--app-action-height);
  min-width: var(--app-action-height);
  min-height: var(--app-action-height);
  padding: 0;
  border-radius: var(--app-action-radius);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0;
}

.app-card-icon-btn i{
  margin: 0 !important;
  font-size: .95rem;
}

.app-inline-actions > .btn,
.app-inline-actions > a.btn{
  width: var(--app-action-height);
  height: var(--app-action-height);
  min-width: var(--app-action-height);
  min-height: var(--app-action-height);
  padding: 0;
  border-radius: var(--app-action-radius);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0;
}

.app-inline-actions > .btn i,
.app-inline-actions > a.btn i{
  margin: 0 !important;
  font-size: .95rem;
}

.tiempos-header-actions{
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: start;
  display: flex !important;
  align-items: flex-start;
  justify-content: flex-end;
  gap: .5rem;
  min-width: 0;
}

.tiempos-header-actions #tiempos_refresh{
  width: 46px;
  height: calc(3.5rem + 2px);
  min-width: 46px;
  min-height: calc(3.5rem + 2px);
  flex: 0 0 auto;
  order: 2;
}

.tiempos-header-actions .form-floating:has(> #tiempos_hours),
.tiempos-header-actions #tiempos_hours{
  width: 150px;
  max-width: 150px;
  margin-top: 0;
}

.tiempos-header-actions .form-floating:has(> #tiempos_hours){
  flex: 0 0 150px;
  order: 1;
}

.input-group > .form-floating{
  flex: 1 1 auto;
  width: 1%;
  min-width: 0;
}

textarea.form-control{
  overflow-y: hidden;
  resize: vertical;
}

textarea[data-autoresize]{
  resize: none;
}

.container-header-card{
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: start;
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 .125rem .25rem rgba(0,0,0,.075);
}

.container-header-card h1{
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.2;
}

.idae-tab-content{
  min-height: 55vh;
}

.idae-filter-bar{
  display: grid;
  grid-template-columns: minmax(180px, 360px) minmax(150px, 190px) minmax(150px, 190px) repeat(2, minmax(120px, 150px)) minmax(150px, 190px) auto;
  gap: .75rem;
  align-items: center;
}

.idae-count{
  justify-self: end;
  white-space: nowrap;
}

.idae-funnel-filter-bar{
  display: grid;
  grid-template-columns: minmax(170px, 220px) minmax(150px, 190px) 1fr;
  gap: .75rem;
  align-items: center;
}

.idae-range-filter{
  min-height: 58px;
  padding: .45rem .65rem .3rem;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  background: #fff;
}

.idae-range-filter__head{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .5rem;
  margin-bottom: .1rem;
}

.idae-range-filter__head span{
  color: #6c757d;
  font-size: .78rem;
}

.idae-range-filter__head strong{
  color: #212529;
  font-size: .78rem;
  white-space: nowrap;
}

.idae-dashboard{
  display: grid;
  gap: 1rem;
}

.idae-company-merge{
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: .75rem;
  align-items: stretch;
}

.idae-company-list{
  display: grid;
  gap: .5rem;
}

.idae-company-row{
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: .75rem;
  align-items: center;
  padding: .65rem .75rem;
  border: 1px solid #edf2f7;
  border-radius: 8px;
  background: #fbfdff;
}

.idae-company-row strong,
.idae-company-row span{
  display: block;
}

.idae-company-row strong{
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.idae-company-row span{
  color: #6c757d;
  font-size: .78rem;
}

.idae-company-row > div:nth-child(2){
  text-align: right;
}

.idae-company-link{
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, .9fr);
  gap: .85rem;
  align-items: center;
  padding: .8rem .9rem;
  border: 1px solid #dfe7ef;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 .125rem .35rem rgba(15,23,42,.035);
}

.idae-company-link strong,
.idae-company-link span{
  display: block;
}

.idae-company-link span{
  color: #6c757d;
  font-size: .82rem;
}

.idae-company-link__actions{
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .55rem;
  align-items: stretch;
}

.idae-page{
  position: relative;
}

.idae-loading{
  position: absolute;
  inset: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
  min-height: 420px;
  padding-top: 13vh;
  border-radius: 10px;
  background: rgba(248,250,252,.92);
  text-align: center;
  backdrop-filter: blur(2px);
}

.idae-loading.is-hidden{
  display: none;
}

.idae-dashboard-toolbar{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .85rem .95rem;
  border: 1px solid #dfe7ef;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 .25rem .8rem rgba(15,23,42,.045);
}

.idae-dashboard-toolbar h6{
  margin: 0;
  font-weight: 850;
}

.idae-dashboard-toolbar span{
  color: #6c757d;
  font-size: .84rem;
}

.idae-dashboard-person-filter{
  width: min(320px, 100%);
}

.idae-dashboard-kpis{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .75rem;
}

.idae-dashboard-kpi{
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: .65rem;
  align-items: center;
  padding: .9rem;
  border: 1px solid #dfe7ef;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 .25rem .8rem rgba(15,23,42,.06);
}

.idae-dashboard-kpi__icon{
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: transparent;
  color: #355070;
  font-size: 1.05rem;
}

.idae-dashboard-kpi small,
.idae-dashboard-kpi span{
  display: block;
  color: #6c757d;
}

.idae-dashboard-kpi small{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
}

.idae-dashboard-kpi strong{
  display: block;
  color: #17202a;
  font-size: 1.35rem;
  line-height: 1.15;
}

.idae-dashboard-health{
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  padding: .08rem .42rem;
  border-radius: 999px;
  font-size: .68rem;
  font-style: normal;
  font-weight: 800;
  line-height: 1.35;
}

.idae-dashboard-health.is-good{
  background: #e8f6ef;
  color: #146c43;
}

.idae-dashboard-health.is-warn{
  background: #fff4d8;
  color: #9a5b00;
}

.idae-dashboard-health.is-bad{
  background: #fff1f2;
  color: #b42318;
}

.idae-dashboard-health.is-neutral{
  background: #eef2f7;
  color: #495057;
}

.idae-dashboard-kpi--money .idae-dashboard-kpi__icon{ color: #9a5b00; }
.idae-dashboard-kpi--blue .idae-dashboard-kpi__icon{ color: #174ea6; }
.idae-dashboard-kpi--green .idae-dashboard-kpi__icon{ color: #146c43; }
.idae-dashboard-kpi--red .idae-dashboard-kpi__icon{ color: #b42318; }

.idae-dashboard-grid{
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr);
  gap: .85rem;
}

.idae-dashboard-panel{
  padding: .9rem;
  border: 1px solid #dfe7ef;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 .25rem .8rem rgba(15,23,42,.055);
}

.idae-dashboard-panel--wide{
  grid-row: auto;
}

.idae-dashboard-panel__head{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .8rem;
}

.idae-dashboard-panel__head h6{
  margin: 0;
  font-weight: 800;
}

.idae-dashboard-panel__head span{
  color: #6c757d;
  font-size: .82rem;
}

.idae-dashboard-status,
.idae-dashboard-checks,
.idae-dashboard-owners,
.idae-dashboard-pace-list{
  display: grid;
  gap: .55rem;
}

.idae-dashboard-status-row{
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr) 34px 86px;
  align-items: center;
  gap: .6rem;
  padding: .42rem .5rem;
  border-radius: 7px;
  background: #f8fafc;
}

.idae-dashboard-status-row > span{
  font-weight: 700;
}

.idae-dashboard-status-row small{
  color: #6c757d;
  text-align: right;
}

.idae-dashboard-status-row__bar,
.idae-dashboard-progress{
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9ecef;
}

.idae-dashboard-status-row__bar span,
.idae-dashboard-progress span{
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #0d6efd;
}

.idae-dashboard-status-row[data-status="lead"] .idae-dashboard-status-row__bar span{ background: #4e8df5; }
.idae-dashboard-status-row[data-status="contacted"] .idae-dashboard-status-row__bar span{ background: #7b61d1; }
.idae-dashboard-status-row[data-status="qualified"] .idae-dashboard-status-row__bar span{ background: #1888ad; }
.idae-dashboard-status-row[data-status="offer"] .idae-dashboard-status-row__bar span{ background: #d99000; }
.idae-dashboard-status-row[data-status="negotiation"] .idae-dashboard-status-row__bar span{ background: #d1495b; }
.idae-dashboard-status-row[data-status="won"] .idae-dashboard-status-row__bar span{ background: #198754; }
.idae-dashboard-status-row[data-status="lost"] .idae-dashboard-status-row__bar span{ background: #6c757d; }

.idae-dashboard-metric{
  padding: .55rem .6rem;
  border: 1px solid #edf2f7;
  border-radius: 8px;
  background: #fbfdff;
}

.idae-dashboard-metric__top{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .35rem;
}

.idae-dashboard-metric__top span{
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  min-width: 0;
  color: #495057;
  font-size: .85rem;
}

.idae-dashboard-metric small{
  color: #6c757d;
  font-size: .75rem;
}

.idae-dashboard-metric.is-green .idae-dashboard-progress span{ background: #198754; }
.idae-dashboard-metric.is-red .idae-dashboard-progress span{ background: #dc3545; }
.idae-dashboard-metric.is-gold .idae-dashboard-progress span{ background: #d99000; }
.idae-dashboard-metric.is-blue .idae-dashboard-progress span{ background: #0d6efd; }

.idae-dashboard-owner{
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .65rem;
  align-items: center;
  padding: .6rem;
  border: 1px solid #edf2f7;
  border-radius: 8px;
  background: #fbfdff;
}

.idae-dashboard-owner strong,
.idae-dashboard-owner span{
  display: block;
}

.idae-dashboard-owner strong{
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.idae-dashboard-owner span{
  color: #6c757d;
  font-size: .78rem;
}

.idae-dashboard-owner__chips{
  display: grid;
  gap: .25rem;
  justify-items: end;
}

.idae-dashboard-owner__chips span{
  padding: .16rem .45rem;
  border-radius: 999px;
  background: #eef2f7;
  color: #495057;
  font-size: .72rem;
  white-space: nowrap;
}

.idae-dashboard-action{
  width: 100%;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: .05rem .55rem;
  align-items: center;
  padding: .55rem .6rem;
  border: 1px solid #edf2f7;
  border-radius: 8px;
  background: #fbfdff;
  color: inherit;
  text-align: left;
}

.idae-dashboard-action:hover,
.idae-dashboard-action:focus-visible{
  border-color: #b6d4fe;
  background: #f3f7ff;
}

.idae-dashboard-action > span{
  grid-row: 1 / span 2;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #eef2f7;
  color: #495057;
}

.idae-dashboard-action strong,
.idae-dashboard-action small{
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.idae-dashboard-action small{
  color: #6c757d;
}

.idae-dashboard-stack{
  padding: .7rem;
  border: 1px solid #edf2f7;
  border-radius: 8px;
  background: #fbfdff;
}

.idae-dashboard-stack__head{
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .5rem;
}

.idae-dashboard-stack__head span{
  color: #6c757d;
  font-size: .82rem;
}

.idae-dashboard-stack__bar{
  display: flex;
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: #eef2f7;
}

.idae-dashboard-stack__bar span{
  display: block;
  height: 100%;
}

.idae-dashboard-stack__bar .is-a{
  background: #0d6efd;
}

.idae-dashboard-stack__bar .is-b{
  background: #cfd8e3;
}

.idae-dashboard-stack.is-source .idae-dashboard-stack__bar .is-a{
  background: #198754;
}

.idae-dashboard-stack.is-source .idae-dashboard-stack__bar .is-b{
  background: #6f42c1;
}

.idae-dashboard-week-table{
  display: grid;
  overflow: hidden;
  border: 1px solid #edf2f7;
  border-radius: 8px;
  background: #fff;
}

.idae-dashboard-week-table__head,
.idae-dashboard-week-row{
  display: grid;
  grid-template-columns: minmax(64px, 1fr) repeat(4, minmax(72px, .8fr));
  gap: .5rem;
  align-items: center;
  justify-items: center;
  padding: .48rem .6rem;
}

.idae-dashboard-week-table__head{
  background: #f8fafc;
  color: #6c757d;
  font-size: .72rem;
  font-weight: 750;
  text-align: center;
}

.idae-dashboard-week-table__head span{
  display: block;
  width: 100%;
}

.idae-dashboard-week-row{
  border-top: 1px solid #edf2f7;
  font-size: .84rem;
}

.idae-dashboard-week-row--delta{
  background: #fbfdff;
}

.idae-dashboard-week-row--delta strong{
  color: #6c757d;
}

.idae-dashboard-week-row strong{
  font-size: .82rem;
}

.idae-dashboard-week-row span{
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: .25rem;
  width: fit-content;
  min-width: 34px;
  padding: .08rem .42rem;
  border-radius: 999px;
  background: #f1f3f5;
  font-weight: 750;
}

.idae-dashboard-week-row span small{
  color: #6c757d;
  font-size: .68rem;
  font-weight: 700;
}

.idae-dashboard-week-row .is-funnel{
  background: #e7f0ff;
  color: #174ea6;
}

.idae-dashboard-week-row .is-contact{
  background: #eef6f2;
  color: #146c43;
}

.idae-dashboard-week-row .is-followup{
  background: #fff7e6;
  color: #9a5b00;
}

.idae-dashboard-week-row .is-good{
  background: #eef6f2;
  color: #146c43;
}

.idae-dashboard-week-row .is-bad{
  background: #fff1f2;
  color: #b42318;
}

.idae-dashboard-week-row .is-neutral{
  background: #eef2f7;
  color: #495057;
}

.idae-dashboard-pace-main{
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: .7rem;
  align-items: center;
  padding: .75rem;
  border-radius: 8px;
  background: #eef6f2;
  color: #146c43;
  margin-bottom: .75rem;
}

.idae-dashboard-pace-main strong{
  font-size: 2rem;
  line-height: 1;
}

.idae-dashboard-pace-list > div{
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  padding-bottom: .45rem;
  border-bottom: 1px solid #edf2f7;
}

.idae-dashboard-pace-list > div:last-child{
  border-bottom: 0;
  padding-bottom: 0;
}

.idae-dashboard-pace-list span{
  color: #6c757d;
}

.idae-dual-range{
  --range-left: 0%;
  --range-right: 100%;
  position: relative;
  height: 22px;
}

.idae-dual-range__track{
  position: absolute;
  left: 0;
  right: 0;
  top: 9px;
  height: 5px;
  border-radius: 999px;
  background:
    linear-gradient(
      to right,
      #dee2e6 0%,
      #dee2e6 var(--range-left),
      #0d6efd var(--range-left),
      #0d6efd var(--range-right),
      #dee2e6 var(--range-right),
      #dee2e6 100%
    );
}

.idae-dual-range .form-range{
  position: absolute;
  inset: 0;
  height: 22px;
  padding: 0;
  margin: 0;
  background: transparent;
  pointer-events: none;
}

.idae-dual-range .form-range::-webkit-slider-runnable-track{
  background: transparent;
}

.idae-dual-range .form-range::-moz-range-track{
  background: transparent;
}

.idae-dual-range .form-range::-webkit-slider-thumb{
  pointer-events: auto;
}

.idae-dual-range .form-range::-moz-range-thumb{
  pointer-events: auto;
}

.idae-multiselect{
  min-width: 0;
}

.idae-multiselect__button{
  width: 100%;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  border-color: #dee2e6;
  color: #495057;
  background: #fff;
}

.idae-multiselect__menu{
  width: 100%;
  min-width: 180px;
  max-height: 260px;
  overflow-y: auto;
  padding: .35rem;
}

.idae-multiselect__item{
  display: flex;
  align-items: center;
  gap: .5rem;
  border-radius: 8px;
  padding: .45rem .55rem;
}

.idae-multiselect__item .form-check-input{
  margin: 0;
}

.idae-companies-toolbar{
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 240px) auto auto;
  gap: .75rem;
  align-items: center;
  margin-bottom: .85rem;
}

.idae-companies-legend{
  justify-content: flex-end;
}

.idae-company-health{
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: .2rem .5rem;
  border-radius: 999px;
  border: 1px solid #dfe7ef;
  background: #f8fafc;
  color: #495057;
  font-size: .74rem;
  font-weight: 700;
}

.idae-company-health.is-good{
  border-color: #b7e4c7;
  background: #ebfbee;
  color: #087f5b;
}

.idae-company-health.is-warn{
  border-color: #ffe8a1;
  background: #fff9db;
  color: #9a6700;
}

.idae-company-health.is-bad{
  border-color: #ffc9c9;
  background: #fff5f5;
  color: #c92a2a;
}

.idae-companies-table{
  min-width: 1180px;
  width: 100%;
  table-layout: fixed;
  font-size: .84rem;
}

col.idae-company-col-name{ width: 22%; }
col.idae-company-col-health{ width: 11%; }
col.idae-company-col-count{ width: 6%; }
col.idae-company-col-source{ width: 9%; }
col.idae-company-col-money{ width: 11%; }
col.idae-company-col-owner{ width: 17%; }
col.idae-company-col-date{ width: 10%; }

.idae-page .idae-companies-page .table-responsive{
  overflow-x: auto;
}

.idae-companies-table th,
.idae-companies-table td{
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}

.idae-companies-table th:nth-child(2),
.idae-companies-table th:nth-child(3),
.idae-companies-table th:nth-child(4),
.idae-companies-table th:nth-child(5),
.idae-companies-table th:nth-child(6),
.idae-companies-table th:nth-child(7),
.idae-companies-table th:nth-child(9),
.idae-company-table-badges,
.idae-company-cell-count,
.idae-company-cell-source,
.idae-company-cell-money,
.idae-company-cell-date{
  text-align: center;
  justify-content: center;
}

.idae-companies-table th:nth-child(8),
.idae-company-cell-owner{
  text-align: left;
}

.idae-company-table-row{
  cursor: pointer;
}

.idae-company-table-row:focus-visible{
  outline: 2px solid rgba(13,110,253,.35);
  outline-offset: -2px;
}

.idae-company-table-name{
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.idae-company-sort{
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.idae-companies-table th:nth-child(2) .idae-company-sort,
.idae-companies-table th:nth-child(3) .idae-company-sort,
.idae-companies-table th:nth-child(4) .idae-company-sort,
.idae-companies-table th:nth-child(5) .idae-company-sort,
.idae-companies-table th:nth-child(6) .idae-company-sort,
.idae-companies-table th:nth-child(7) .idae-company-sort,
.idae-companies-table th:nth-child(9) .idae-company-sort{
  text-align: center;
}

.idae-company-table-name strong,
.idae-company-table-name span{
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.idae-company-table-name strong{
  font-size: .9rem;
}

.idae-company-table-name span{
  color: #6c757d;
  font-size: .76rem;
}

.idae-company-table-badges{
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
  min-width: 0;
}

.idae-source-mix{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .7rem;
}

.idae-source-mix span,
.idae-company-detail-opportunity strong{
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}

.idae-company-detail-opportunity small{
  display: block;
  color: #6c757d;
  font-size: .8rem;
}

.idae-company-detail-opportunities{
  display: grid;
  gap: .45rem;
}

.idae-company-detail-opportunity{
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .75rem;
  align-items: center;
  width: 100%;
  padding: .65rem .75rem;
  border: 1px solid #e4ebf3;
  border-radius: 8px;
  background: #fff;
  text-align: left;
  border-left-width: 4px;
}

.idae-company-detail-opportunity.is-idae{
  border-left-color: #0d6efd;
}

.idae-company-detail-opportunity.is-other{
  border-left-color: #20c997;
}

.idae-company-detail-opportunity__actions{
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: .5rem;
}

.idae-company-detail-opportunity__actions .btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
}

.idae-company-detail-opportunity strong,
.idae-company-detail-opportunity small{
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.idae-company-modal-layout{
  display: grid;
  gap: 1rem;
}

.idae-company-health-strip{
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  align-items: center;
  padding: .1rem 0;
}

.idae-company-detail-grid{
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#idae_company_detail_contacts{
  grid-template-columns: 1fr;
}

@media (max-width: 991.98px){
  .idae-companies-toolbar{
    grid-template-columns: 1fr;
  }
}

.idae-table th,
.idae-table td{
  white-space: nowrap;
}

.idae-page .table-responsive{
  overflow-x: hidden;
}

.idae-table{
  width: 100%;
  table-layout: fixed;
  font-size: .8rem;
}

col.idae-col-funnel{ width: var(--idae-col-funnel-width); }
col.idae-col-proyecto{ width: 54px; }
col.idae-col-expediente{ width: 12%; }
col.idae-col-empresa{ width: 22%; }
col.idae-col-potencia{ width: 7%; }
col.idae-col-capacidad{ width: 7.5%; }
col.idae-col-ayuda{ width: 8%; }
col.idae-col-score-total{ width: 6.5%; }
col.idae-col-score-admin{ width: 6.5%; }
col.idae-col-score-chain{ width: 6%; }
col.idae-col-oferta{ width: 5%; }
col.idae-col-contacto{ width: var(--idae-col-contact-width); }
col.idae-col-actions{ width: 50px; }

@media (min-width: 768px){
  .idae-table .idae-col-funnel{ width: var(--idae-col-funnel-width); }
  .idae-table .idae-col-proyecto{ width: 54px; }
  .idae-table .idae-col-contacto{ width: var(--idae-col-contact-width); }
  .idae-table .idae-col-actions{ width: 50px; }
}

.idae-table th.idae-col-funnel,
.idae-table td.idae-col-funnel{
  width: var(--idae-col-funnel-width);
  min-width: var(--idae-col-funnel-width);
  max-width: var(--idae-col-funnel-width);
}

.idae-table th.idae-col-contacto,
.idae-table td.idae-col-contacto{
  width: var(--idae-col-contact-width);
  min-width: var(--idae-col-contact-width);
  max-width: var(--idae-col-contact-width);
}

.idae-table th,
.idae-table td{
  vertical-align: middle;
  padding: .5rem .45rem;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.idae-col-funnel,
.idae-col-proyecto,
.idae-col-potencia,
.idae-col-capacidad,
.idae-col-ayuda,
.idae-col-score-total,
.idae-col-score-admin,
.idae-col-score-chain,
.idae-col-oferta,
.idae-col-contacto{
  text-align: center;
}

.idae-col-empresa{
  white-space: nowrap;
}

.idae-col-actions{
  overflow: visible;
  text-overflow: clip;
  text-align: right;
}

td.idae-col-actions{
  padding-right: .55rem;
}

.idae-company-cell,
.idae-company-action{
  overflow: hidden;
  text-overflow: ellipsis;
}

.idae-company-cell{
  font-weight: 600;
}

.idae-company-open{
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.idae-company-open:hover .idae-company-cell,
.idae-company-open:focus-visible .idae-company-cell{
  color: #0d6efd;
  text-decoration: underline;
}

.idae-company-action{
  margin-top: .1rem;
  color: #6c757d;
  font-size: .78rem;
  font-style: italic;
}

.idae-table-switch{
  min-width: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding-left: 0 !important;
  margin-bottom: 0;
}

.idae-table-switch .form-check-input{
  width: 2.45rem;
  height: 1.3rem;
  margin: 0;
  cursor: pointer;
  float: none;
}

.idae-table .idae-open{
  width: 34px;
  height: 34px;
  min-width: 34px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.idae-sort{
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
  text-align: inherit;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.idae-table th{
  text-align: left;
}

.idae-col-funnel .idae-sort,
.idae-col-proyecto .idae-sort,
.idae-col-potencia .idae-sort,
.idae-col-capacidad .idae-sort,
.idae-col-ayuda .idae-sort,
.idae-col-score-total .idae-sort,
.idae-col-score-admin .idae-sort,
.idae-col-score-chain .idae-sort,
.idae-col-oferta .idae-sort,
.idae-col-contacto .idae-sort{
  justify-content: center;
}

.idae-col-actions .idae-sort{
  justify-content: flex-end;
}

.idae-contact-menu-open{
  border: 1px solid transparent;
  cursor: pointer;
}

.idae-contact-menu-open:hover,
.idae-contact-menu-open:focus-visible{
  transform: translateY(-1px);
  box-shadow: 0 .25rem .65rem rgba(13,110,253,.14);
}

.idae-contact-popover{
  position: fixed;
  z-index: 1085;
  padding: .75rem;
  border: 1px solid #dbe3ea;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1rem 2.5rem rgba(15,23,42,.18);
}

.idae-contact-popover__head{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .65rem;
}

.idae-contact-popover__head strong,
.idae-contact-popover__head span{
  display: block;
}

.idae-contact-popover__head strong{
  font-size: .95rem;
  line-height: 1.2;
}

.idae-contact-popover__head span{
  color: #6c757d;
  font-size: .78rem;
}

.idae-contact-popover__slider{
  display: flex;
  gap: .65rem;
  max-width: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: .35rem;
}

.idae-contact-pop-card{
  flex: 0 0 100%;
  min-width: 0;
  scroll-snap-align: start;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: .7rem;
  background: #fbfdff;
}

.idae-contact-pop-card__top{
  display: flex;
  align-items: center;
  gap: .65rem;
  margin-bottom: .65rem;
}

.idae-contact-pop-card__avatar{
  width: 40px;
  height: 40px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eaf2ff;
  color: #0d6efd;
  font-weight: 800;
}

.idae-contact-pop-card__top strong,
.idae-contact-pop-card__top small{
  display: block;
}

.idae-contact-pop-card__top small{
  max-width: 230px;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #6c757d;
  white-space: nowrap;
}

.idae-contact-pop-card__lines{
  display: grid;
  gap: .45rem;
  color: #495057;
  font-size: .88rem;
}

.idae-contact-pop-card__lines > div{
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: .4rem;
  min-width: 0;
}

.idae-contact-pop-card__lines span{
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.idae-contact-pop-empty{
  width: 100%;
  padding: 1rem;
  border: 1px dashed #cfd8e3;
  border-radius: 8px;
  color: #6c757d;
  text-align: center;
}

.idae-contact-popover__actions{
  margin-top: .65rem;
}

.idae-contact-pop-form{
  display: none;
  margin-top: .7rem;
  padding-top: .7rem;
  border-top: 1px solid #edf2f7;
}

.idae-contact-pop-form.is-open{
  display: block;
}

.idae-contact-pop-feedback{
  min-height: 1.1rem;
  margin-top: .45rem;
}

.idae-contact-pop-form__actions{
  display: flex;
  justify-content: flex-end;
  gap: .5rem;
}

.idae-import-choice-grid{
  display: grid;
  gap: .75rem;
}

.idae-import-choice{
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: .85rem;
  align-items: center;
  width: 100%;
  padding: .9rem;
  border: 1px solid #dbe3ea;
  border-radius: 8px;
  background: #fff;
  color: #17202a;
  text-align: left;
}

.idae-import-choice:hover,
.idae-import-choice:focus-visible{
  border-color: #0d6efd;
  background: #f8fbff;
  outline: 0;
  box-shadow: 0 0 0 .16rem rgba(13,110,253,.12);
}

.idae-import-choice i{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: #e7f0ff;
  color: #0d6efd;
  font-size: 1.15rem;
}

.idae-import-choice span,
.idae-import-choice strong,
.idae-import-choice small{
  display: block;
  min-width: 0;
}

.idae-import-choice strong{
  font-size: .98rem;
  line-height: 1.15;
}

.idae-import-choice small{
  margin-top: .18rem;
  color: #6c757d;
  font-size: .8rem;
  line-height: 1.2;
}

.idae-sort::after{
  content: "";
  width: 0;
  color: #6c757d;
  font-size: .72rem;
  line-height: 1;
}

.idae-sort.is-asc::after{
  content: "▲";
  width: .75rem;
}

.idae-sort.is-desc::after{
  content: "▼";
  width: .75rem;
}

.idae-sort:hover,
.idae-sort.is-active{
  color: #0d6efd;
}

.idae-score-pill{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 26px;
  padding: .15rem .45rem;
  border-radius: 8px;
  background: #eef6f2;
  color: #146c43;
  font-weight: 700;
}

.idae-icon-pill{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 8px;
  background: #eef2f7;
  color: #355070;
  font-size: 1.05rem;
  border: 1px solid transparent;
}

.idae-icon-pill--standalone{
  background: #fff7e6;
  color: #9a5b00;
  border-color: #ffd88a;
}

.idae-icon-pill--hybrid{
  background: #e7f0ff;
  color: #174ea6;
  border-color: #a8c7fa;
}

.idae-icon-pill--neutral{
  background: #f1f3f5;
  color: #495057;
}

.idae-icon-pill--ok{
  background: #eef6f2;
  color: #146c43;
  border-color: #a8dfc2;
}

.idae-icon-pill--muted{
  background: #fff1f2;
  color: #b42318;
  border-color: #fecdca;
}

.idae-empty,
.idae-drop-empty{
  border: 1px dashed rgba(0,0,0,.18);
  border-radius: 8px;
  padding: .85rem;
  color: #6c757d;
  background: #fff;
}

.idae-funnel-board{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(207px, 1fr));
  gap: .45rem;
  overflow-x: auto;
  padding-bottom: .5rem;
  font-size: .9em;
}

.idae-funnel-legend{
  display: inline-flex;
  align-items: center;
  gap: .9rem;
  color: #495057;
  font-size: .78rem;
  font-weight: 700;
  white-space: nowrap;
}

.idae-funnel-legend span{
  display: inline-flex;
  align-items: center;
  gap: .3rem;
}

.idae-funnel-legend__mark{
  display: inline-block;
  width: 16px;
  height: 4px;
  border-radius: 999px;
  background: #2f80ed;
}

.idae-funnel-legend__mark--other{
  background: #198754;
}

.idae-funnel-column{
  min-width: 207px;
  background: #f8f9fa;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 8px;
  overflow: hidden;
}

.idae-funnel-column__header{
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding: .55rem .65rem;
  background: #fff;
  border-bottom: 1px solid rgba(0,0,0,.08);
  font-weight: 700;
}

.idae-funnel-column[data-status="lead"] .idae-funnel-column__header{
  background: #f3f7ff;
  color: #174ea6;
}

.idae-funnel-column[data-status="contacted"] .idae-funnel-column__header{
  background: #f5f3ff;
  color: #5b3db3;
}

.idae-funnel-column[data-status="qualified"] .idae-funnel-column__header{
  background: #eef7ff;
  color: #0b6b8f;
}

.idae-funnel-column[data-status="offer"] .idae-funnel-column__header{
  background: #fff7e6;
  color: #9a5b00;
}

.idae-funnel-column[data-status="negotiation"] .idae-funnel-column__header{
  background: #fff1f2;
  color: #b42318;
}

.idae-funnel-column[data-status="won"] .idae-funnel-column__header{
  background: #eef6f2;
  color: #146c43;
}

.idae-funnel-column[data-status="lost"] .idae-funnel-column__header{
  background: #f1f3f5;
  color: #495057;
}

.idae-funnel-column__header .badge{
  background: rgba(255,255,255,.68) !important;
  color: inherit;
  border: 1px solid rgba(0,0,0,.08);
}

.idae-funnel-column__body{
  min-height: 55vh;
  padding: .5rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.idae-funnel-column__body.is-over{
  background: #eef6f2;
  outline: 2px solid rgba(25,135,84,.25);
  outline-offset: -4px;
}

.idae-card{
  position: relative;
  background: #fff;
  border: 1px solid rgba(0,0,0,.10);
  border-radius: 8px;
  padding: .54rem .54rem .54rem .64rem;
  box-shadow: 0 .25rem .65rem rgba(15,23,42,.10);
  cursor: grab;
  overflow: hidden;
}

.idae-card::before{
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: #2f80ed;
}

.idae-card--other::before{
  background: #198754;
}

.idae-card.dragging{
  opacity: .65;
}

.idae-card__top{
  display: flex;
  align-items: flex-start;
  gap: .42rem;
  padding-right: 2rem;
}

.idae-card__top .idae-card-edit{
  position: absolute;
  top: .48rem;
  right: .48rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  min-width: 20px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #64748b;
  line-height: 1;
}

.idae-card__top .idae-card-edit:hover,
.idae-card__top .idae-card-edit:focus-visible{
  background: #eef2f7;
  color: #0d6efd;
  outline: 0;
}

.idae-card__company{
  font-weight: 700;
  color: #17202a;
  overflow-wrap: anywhere;
  line-height: 1.12;
}

.idae-card__exp{
  color: #6c757d;
  font-size: .68rem;
  overflow-wrap: anywhere;
}

.idae-card__title{
  margin-top: .15rem;
  color: #343a40;
  font-size: .78rem;
  line-height: 1.12;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.idae-card__signals{
  display: flex;
  flex-wrap: wrap;
  gap: .24rem .38rem;
  margin-top: .42rem;
  padding-top: .42rem;
  border-top: 1px solid #edf2f7;
  color: #495057;
  font-size: .7rem;
}

.idae-card__meta{
  display: flex;
  flex-wrap: wrap;
  gap: .35rem .65rem;
  margin-top: .6rem;
  color: #6c757d;
  font-size: .78rem;
}

.idae-card__signals span,
.idae-card__meta span{
  display: inline-flex;
  align-items: center;
  gap: .18rem;
  min-width: 0;
}

.idae-card__signals span{
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.idae-card__signals span:first-child{
  flex-basis: 100%;
}

.idae-opportunity-profile{
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.idae-profile-hero{
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 8px;
  background: #f8fafc;
}

.idae-profile-hero__main{
  display: flex;
  gap: .85rem;
  align-items: center;
  min-width: 0;
}

.idae-profile-hero__copy{
  min-width: 0;
}

.idae-profile-hero__eyebrow{
  color: #6c757d;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: 0;
}

.idae-profile-hero h4{
  margin: .1rem 0;
  font-size: 1.2rem;
  line-height: 1.2;
  font-weight: 750;
}

.idae-profile-hero p{
  margin: 0;
  color: #6c757d;
  font-style: italic;
  overflow-wrap: anywhere;
}

.idae-profile-hero__meta{
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .4rem;
}

.idae-profile-hero__meta span{
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: .2rem .55rem;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 8px;
  background: #fff;
  color: #495057;
  font-size: .78rem;
  font-weight: 650;
}

.idae-profile-kpis{
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: .75rem;
}

.idae-kpi-card{
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: .55rem;
  align-items: center;
  min-height: 72px;
  padding: .75rem;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 8px;
  background: #fff;
}

.idae-kpi-card__icon{
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #eef2f7;
  color: #355070;
}

.idae-kpi-card--money .idae-kpi-card__icon{
  background: #fff7e6;
  color: #9a5b00;
}

.idae-kpi-card--score .idae-kpi-card__icon{
  background: #eef6f2;
  color: #146c43;
}

.idae-kpi-card--danger .idae-kpi-card__icon{
  background: #fff5f5;
  color: #c92a2a;
}

.idae-kpi-card__label{
  color: #6c757d;
  font-size: .72rem;
  font-weight: 700;
}

.idae-kpi-card__value{
  margin-top: .05rem;
  font-size: 1rem;
  line-height: 1.15;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.idae-profile-layout{
  display: grid;
  grid-template-columns: minmax(250px, .78fr) minmax(0, 1fr) minmax(300px, .86fr);
  gap: 1rem;
  align-items: start;
}

.idae-profile-panel{
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 8px;
  background: #fff;
  padding: 1rem;
}

.idae-profile-panel--commercial{
  position: sticky;
  top: .75rem;
}

.idae-profile-panel__head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .85rem;
}

.idae-profile-panel__eyebrow{
  color: #6c757d;
  font-size: .72rem;
  font-weight: 700;
}

.idae-profile-panel h6{
  margin: 0;
  font-size: 1rem;
  font-weight: 750;
}

.idae-profile-switch{
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .45rem .65rem;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  margin: 0;
}

.idae-profile-switch .form-check-input{
  margin: 0;
  width: 2.25rem;
  height: 1.2rem;
  flex: 0 0 auto;
}

.idae-profile-switch__copy{
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.idae-profile-switch__copy span{
  font-weight: 700;
  color: #212529;
}

.idae-profile-switch__copy small{
  margin-top: .1rem;
  color: #6c757d;
  font-size: .72rem;
}

.idae-commercial-fields{
  display: grid;
  grid-template-columns: 1fr;
  gap: .75rem;
}

.idae-assignment-box{
  padding: .75rem;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 8px;
  background: #f8f9fa;
}

.idae-assignment-box__head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .65rem;
}

.idae-assigned-summary{
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.idae-assigned-empty{
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  color: #6c757d;
  font-size: .88rem;
  padding: .5rem .6rem;
  border: 1px dashed rgba(0,0,0,.18);
  border-radius: 8px;
  background: #fff;
}

.idae-assigned-chip{
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 30px;
  align-items: center;
  gap: .55rem;
  padding: .5rem;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 8px;
  background: #fff;
}

.idae-assigned-chip__body{
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.idae-assigned-remove{
  width: 30px;
  height: 30px;
  min-width: 30px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.idae-assigned-chip strong,
.idae-assigned-chip small{
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.idae-assigned-chip small{
  color: #6c757d;
  font-size: .74rem;
}

.idae-activity-box{
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0;
  background: transparent !important;
  align-self: stretch;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0;
  box-shadow: none !important;
}

.idae-panel-tabs{
  border-bottom: 0;
  margin: 0;
  padding: 0 .75rem;
  background: transparent !important;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}

.idae-panel-tabs .nav-link{
  margin-top: -4px;
  padding: .6rem .85rem;
  color: #212529;
  background: #dbe3ee;
  font-weight: 700;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  border-top: 4px solid transparent;
}

.idae-panel-tabs .nav-link.active{
  color: #0d6efd;
  background: #fff;
  border-color: transparent #dbe3ea #fff;
}

.idae-panel-pane{
  display: none;
  min-height: 0;
  background: #fff;
}

.idae-panel-pane.is-active{
  display: grid;
  gap: .65rem;
  padding: .75rem 1rem 1rem;
  border: 1px solid #dbe3ea;
  border-top: 0;
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
  box-shadow: 0 .125rem .35rem rgba(15, 23, 42, .035);
}

#idae_panel_offers.is-active,
#idae_panel_actions.is-active{
  display: block;
  padding: .75rem 1rem 1rem;
}

.idae-tab-panel-head{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  min-height: 34px;
  margin-bottom: .65rem;
}

.idae-tab-panel-head > div{
  display: grid;
  gap: .05rem;
  min-width: 0;
}

.idae-activity-tab-head{
  margin-bottom: .65rem;
}

.idae-activity-system-toggle{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .3rem;
  min-width: 34px;
  height: 34px;
  padding: 0 .48rem;
}

.idae-activity-system-toggle.is-active{
  color: #0d6efd;
  border-color: rgba(13,110,253,.35);
  background: #e7f0ff;
}

.idae-activity-system-toggle span{
  min-width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #e9ecef;
  color: #495057;
  font-size: .65rem;
  font-weight: 800;
  line-height: 1;
}

.idae-offer-dropzone{
  width: 100%;
  min-height: 54px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  place-items: center start;
  gap: .18rem .55rem;
  padding: .48rem .7rem;
  border: 1px dashed #b8c6d6;
  border-radius: 8px;
  background: #fff;
  color: #495057;
  text-align: center;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}

.idae-offer-dropzone i{
  grid-row: 1 / span 2;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #e8f1ff;
  color: #0d6efd;
  font-size: 1rem;
}

.idae-offer-dropzone strong{
  align-self: end;
  font-size: .86rem;
}

.idae-offer-dropzone span{
  grid-column: 2;
  align-self: start;
  color: #6c757d;
  font-size: .76rem;
}

.idae-offer-dropzone:hover,
.idae-offer-dropzone:focus-visible,
.idae-offer-dropzone.is-dragging{
  border-color: #0d6efd;
  background: #f3f8ff;
  color: #0d6efd;
  outline: 0;
}

.idae-offer-progress{
  display: grid;
  gap: .35rem;
  padding: .65rem;
  border: 1px solid #dbe3ea;
  border-radius: 8px;
  background: #fff;
}

.idae-offer-progress__head{
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  color: #495057;
  font-size: .82rem;
}

.idae-offer-list{
  display: flex;
  flex-direction: column;
  gap: .55rem;
}

.idae-offer-item{
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: .6rem;
  align-items: center;
  padding: .6rem;
  border: 1px solid #edf2f7;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 .15rem .45rem rgba(15,23,42,.05);
}

.idae-offer-item__icon{
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #e8f1ff;
  color: #0d6efd;
}

.idae-offer-item__body{
  min-width: 0;
  display: grid;
  gap: .25rem;
}

.idae-offer-item__body small{
  color: #6c757d;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.idae-offer-name-input.is-saving{
  border-color: #0d6efd;
  box-shadow: 0 0 0 .15rem rgba(13,110,253,.12);
}

.idae-offer-item__actions{
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}

.idae-actions-toolbar{
  margin-bottom: .65rem;
}

.idae-actions-toolbar .btn{
  flex: 0 0 auto;
  min-height: 34px;
  padding: .35rem .7rem;
}

.idae-action-form{
  display: grid;
  grid-template-columns: minmax(130px, .55fr) minmax(190px, .8fr) minmax(180px, .85fr);
  gap: .65rem;
  margin-bottom: .75rem;
  padding: .75rem;
  border: 1px solid #dbe3ea;
  border-radius: 8px;
  background: #f8fafc;
}

.idae-action-form__message{
  grid-column: 1 / -1;
}

.idae-action-form__actions{
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: .5rem;
}

.idae-action-list{
  display: grid;
  gap: .45rem;
}

.idae-action-item{
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: .6rem;
  align-items: start;
  padding: .62rem .72rem;
  border: 1px solid #edf2f7;
  border-left: 4px solid #0d6efd;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 .15rem .45rem rgba(15,23,42,.05);
}

.idae-action-item.is-overdue{
  border-left-color: #dc3545;
  background: #fffafa;
}

.idae-action-item.is-done{
  border-left-color: #198754;
}

.idae-action-item.is-cancelled{
  border-left-color: #adb5bd;
  opacity: .76;
}

.idae-action-item__icon{
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #e8f1ff;
  color: #0d6efd;
}

.idae-action-item__body{
  min-width: 0;
}

.idae-action-item__top,
.idae-action-item__meta,
.idae-action-item__actions{
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .4rem;
}

.idae-action-item__top strong{
  color: #0f172a;
}

.idae-action-item__top span,
.idae-action-item__meta{
  color: #64748b;
  font-size: .82rem;
}

.idae-action-status{
  padding: .12rem .45rem;
  border-radius: 999px;
  background: #eef2f7;
  color: #475569 !important;
  font-weight: 700;
}

.idae-action-item__message{
  margin-top: .25rem;
  color: #1f2937;
  line-height: 1.3;
}

.idae-action-item__meta{
  margin-top: .3rem;
}

.idae-action-item__meta span{
  display: inline-flex;
  align-items: center;
  gap: .3rem;
}

.idae-action-item__actions{
  justify-content: flex-end;
}

.idae-action-item__actions .btn{
  width: 30px;
  height: 30px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.idae-activity-thread{
  display: flex;
  flex-direction: column;
  gap: .55rem;
  align-self: start;
  max-height: 560px;
  overflow-y: auto;
  padding: .15rem .2rem .15rem 0;
}

.idae-activity-item{
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: .5rem;
  align-items: flex-start;
}

.idae-activity-item__icon{
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #eef2f7;
  color: #495057;
}

.idae-activity-item.is-comment .idae-activity-item__icon{
  background: #e7f0ff;
  color: #174ea6;
}

.idae-activity-item__bubble{
  min-width: 0;
  padding: .55rem .65rem;
  border: 1px solid #edf2f7;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 .15rem .45rem rgba(15,23,42,.05);
}

.idae-activity-item.is-event .idae-activity-item__bubble{
  background: #f8fafc;
}

.idae-activity-item__meta{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .65rem;
  margin-bottom: .2rem;
}

.idae-activity-item__meta-right{
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  flex: 0 0 auto;
}

.idae-activity-item__meta strong{
  font-size: .82rem;
}

.idae-activity-item__meta span{
  color: #6c757d;
  font-size: .72rem;
  white-space: nowrap;
}

.idae-activity-action{
  width: 24px;
  height: 24px;
  min-width: 24px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #64748b;
  line-height: 1;
}

.idae-activity-action:hover,
.idae-activity-action:focus-visible{
  background: #eef2f7;
  color: #0d6efd;
  outline: 0;
}

.idae-activity-delete:hover,
.idae-activity-delete:focus-visible{
  color: #dc3545;
}

.idae-activity-item__message{
  color: #343a40;
  font-size: .88rem;
  line-height: 1.35;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.idae-activity-edit-form{
  display: none;
  margin-top: .45rem;
}

.idae-activity-item.is-editing .idae-activity-item__message{
  display: none;
}

.idae-activity-item.is-editing .idae-activity-edit-form{
  display: block;
}

.idae-activity-edit-actions{
  display: flex;
  justify-content: flex-end;
  gap: .4rem;
  margin-top: .45rem;
}

.idae-activity-compose{
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  gap: .5rem;
  align-items: end;
}

.idae-activity-compose textarea{
  min-height: 42px;
  max-height: 130px;
  resize: none;
}

.idae-activity-compose .btn{
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-inline: 0;
  border-radius: 8px;
}

.idae-user-picker{
  display: flex;
  flex-direction: column;
  gap: .45rem;
  max-height: 260px;
  overflow-y: auto;
}

.idae-user-option{
  display: grid;
  grid-template-columns: 18px 34px minmax(0, 1fr);
  gap: .55rem;
  align-items: center;
  padding: .5rem;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.idae-user-option:hover{
  border-color: rgba(13,110,253,.35);
}

.idae-user-option .form-check-input{
  margin: 0;
}

.idae-user-option__avatar{
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #e7f0ff;
  color: #174ea6;
  font-size: .78rem;
  font-weight: 800;
}

.idae-user-option__body{
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.idae-user-option__name{
  font-weight: 700;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.idae-user-option__meta{
  margin-top: .1rem;
  color: #6c757d;
  font-size: .74rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.idae-detail-grid{
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid rgba(0,0,0,.08);
}

.idae-detail-line{
  display: grid;
  grid-template-columns: minmax(130px, .38fr) minmax(0, 1fr);
  gap: 1rem;
  align-items: baseline;
  padding: .72rem 0;
  border-bottom: 1px solid rgba(0,0,0,.08);
}

.idae-detail-line dt{
  margin: 0;
  color: #6c757d;
  font-size: .78rem;
  font-weight: 700;
}

.idae-detail-line dd{
  margin: 0;
  color: #212529;
  overflow-wrap: anywhere;
}

.idae-contact-list{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: .65rem;
}

.idae-profile-panel__actions{
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: .45rem;
  flex-wrap: wrap;
}

.idae-contact-discovery{
  display: grid;
  grid-template-columns: minmax(180px, .8fr) minmax(240px, 1fr) minmax(110px, .45fr) auto;
  gap: .6rem;
  align-items: stretch;
  margin-bottom: .75rem;
}

.idae-contact-discovery__domain,
.idae-contact-discovery__roles,
.idae-contact-discovery__country{
  min-width: 0;
}

.idae-contact-discovery .btn{
  white-space: nowrap;
}

.idae-contact-candidates{
  display: grid;
  gap: .55rem;
  margin-bottom: .75rem;
}

.idae-contact-candidates__head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .7rem .8rem;
  border: 1px solid #dbe3ea;
  border-radius: 8px;
  background: #f8fafc;
}

.idae-contact-candidates__head strong,
.idae-contact-candidates__head span{
  display: block;
  line-height: 1.2;
}

.idae-contact-candidates__head strong{
  color: #17202a;
  font-size: .92rem;
}

.idae-contact-candidates__head span{
  color: #6c757d;
  font-size: .78rem;
}

.idae-contact-candidates__list{
  display: grid;
  gap: .5rem;
}

.idae-contact-candidate{
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .75rem;
  align-items: center;
  padding: .8rem;
  border: 1px solid #dbe3ea;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 .125rem .25rem rgba(15,23,42,.035);
}

.idae-contact-candidate__main{
  min-width: 0;
}

.idae-contact-candidate__top{
  display: flex;
  align-items: center;
  gap: .5rem;
  min-width: 0;
}

.idae-contact-candidate__top strong{
  min-width: 0;
  overflow: hidden;
  color: #17202a;
  font-size: .94rem;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.idae-contact-candidate__score{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 24px;
  padding: 0 .45rem;
  border-radius: 999px;
  background: #e9ecef;
  color: #495057;
  font-size: .78rem;
  font-weight: 800;
}

.idae-contact-candidate__score.is-strong{
  background: #e9f7ef;
  color: #146c43;
}

.idae-contact-candidate__score.is-review{
  background: #fff7e6;
  color: #9a5b00;
}

.idae-contact-candidate__score.is-low{
  background: #f1f3f5;
  color: #6c757d;
}

.idae-contact-candidate__position,
.idae-contact-candidate__email,
.idae-contact-candidate__meta{
  min-width: 0;
  overflow: hidden;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.idae-contact-candidate__position{
  margin-top: .18rem;
  color: #495057;
  font-size: .83rem;
}

.idae-contact-candidate__email{
  margin-top: .18rem;
  font-size: .84rem;
}

.idae-contact-candidate__meta{
  display: flex;
  gap: .45rem;
  margin-top: .24rem;
  color: #6c757d;
  font-size: .75rem;
}

.idae-contact-candidates__empty{
  padding: .85rem;
  border: 1px dashed #dbe3ea;
  border-radius: 8px;
  background: #f8fafc;
  color: #6c757d;
  font-size: .86rem;
  text-align: center;
}

.idae-contact-card{
  display: flex;
  flex-direction: column;
  gap: .6rem;
  padding: .75rem;
  border: 1px solid rgba(0,0,0,.10);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 .125rem .25rem rgba(0,0,0,.045);
}

.idae-contact-card__top{
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: .6rem;
  align-items: center;
}

.idae-contact-card__avatar{
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e7f0ff;
  color: #174ea6;
  font-weight: 800;
}

.idae-contact-card__identity{
  min-width: 0;
}

.idae-contact-card__name{
  font-weight: 750;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.idae-contact-card__subtitle{
  margin-top: .15rem;
  color: #6c757d;
  font-size: .8rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.idae-contact-card__actions{
  display: flex;
  gap: .35rem;
}

.idae-contact-card__actions .btn{
  width: 32px;
  height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.idae-contact-card__read{
  display: flex;
  flex-direction: column;
  gap: .35rem;
  color: #495057;
  font-size: .84rem;
}

.idae-contact-card__read > div{
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  overflow: hidden;
}

.idae-contact-card__read i{
  color: #6c757d;
  flex: 0 0 auto;
}

.idae-contact-card__read span,
.idae-contact-card__read a{
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.idae-contact-card__fields{
  display: none;
  padding-top: .25rem;
  border-top: 1px solid rgba(0,0,0,.08);
}

.idae-contact-card.is-editing .idae-contact-card__fields{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .5rem;
}

.idae-contact-card.is-editing .idae-contact-card__read{
  display: none;
}

.idae-contact-card__linkedin{
  grid-column: 1 / -1;
}

.idae-contact-card__edit-actions{
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: .5rem;
}

.idae-contact-remove{
  width: 34px;
  height: 34px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.idae-opportunity-modal .modal-content{
  border: 0;
  border-radius: 0;
  overflow: hidden;
}

.idae-opportunity-modal .modal-header{
  position: sticky;
  top: 0;
  z-index: 5;
  min-height: 72px;
  align-items: flex-start;
  background: rgba(255,255,255,.97);
  border-bottom: 1px solid #dbe3ea;
}

.idae-modal-title-block{
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, auto);
  gap: 1rem;
  align-items: center;
  width: 100%;
  min-width: 0;
  padding-right: 1rem;
}

.idae-opportunity-modal .modal-title{
  font-size: 1.05rem;
  font-weight: 800;
}

.idae-opportunity-modal .modal-body{
  background: #f5f7fa;
  padding: .9rem 1rem;
  overflow-y: auto;
}

.idae-opportunity-modal .modal-footer{
  position: sticky;
  bottom: 0;
  z-index: 5;
  background: rgba(255,255,255,.96);
  border-top: 1px solid #dbe3ea;
}

.idae-opportunity-profile{
  gap: .85rem;
}

.idae-profile-hero{
  grid-template-columns: minmax(0, 1fr) minmax(280px, auto);
  min-height: 112px;
  padding: 1rem;
  border: 1px solid #dbe3ea;
  border-radius: 10px;
  background: #fff;
  color: #212529;
  box-shadow: 0 .125rem .35rem rgba(15,23,42,.04);
}

.idae-profile-hero__eyebrow{
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  color: #6c757d;
  font-size: .76rem;
}

.idae-profile-hero__eyebrow span{
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: .15rem .45rem;
  border: 1px solid #dbe3ea;
  border-radius: 8px;
  background: #f8fafc;
  font-weight: 750;
}

.idae-profile-hero h4{
  margin-top: .55rem;
  color: #17202a;
  font-size: 1.45rem;
}

.idae-profile-hero p{
  color: #6c757d;
  font-size: 1rem;
}

.idae-profile-hero__meta{
  align-self: stretch;
  justify-content: flex-end;
  align-content: center;
  max-width: 430px;
}

.idae-profile-hero__meta span{
  gap: .35rem;
  border-color: #dbe3ea;
  background: #f8fafc;
  color: #495057;
}

.idae-profile-hero__meta span.is-ok{
  background: #eef6f2;
  border-color: #a8dfc2;
  color: #146c43;
}

.idae-profile-hero__meta span.is-warning{
  background: #fff7e6;
  border-color: #ffd88a;
  color: #9a5b00;
}

.idae-profile-hero__meta span.is-danger{
  background: #fff1f2;
  border-color: #fecdca;
  color: #b42318;
}

.idae-modal-title-block .idae-profile-hero__eyebrow span{
  min-height: 24px;
  gap: .3rem;
}

.idae-modal-title-block .idae-profile-hero h4{
  margin: 0 0 .1rem;
  font-size: 1.35rem;
}

.idae-modal-title-block .idae-profile-hero p{
  margin: 0;
  font-size: .92rem;
}

.idae-inline-title{
  display: inline-block;
  max-width: 100%;
  min-width: 2rem;
  border: 1px solid transparent;
  border-radius: 4px;
  outline: 0;
  cursor: text;
  overflow-wrap: anywhere;
}

.idae-inline-title:hover{
  border-color: #d0d7de;
  background: #f8fafc;
}

.idae-inline-title:focus{
  border-color: #0d6efd;
  background: #fff;
  box-shadow: 0 0 0 .14rem rgba(13,110,253,.18);
}

.idae-inline-title--sub{
  color: #6c757d;
}

.idae-profile-hero__exp{
  display: flex;
  flex-wrap: wrap;
  gap: .35rem .75rem;
  align-items: center;
  margin-top: .35rem;
  color: #6c757d;
  font-size: .78rem;
  font-weight: 650;
}

.idae-profile-hero__exp span{
  display: inline-flex;
  align-items: center;
  gap: .25rem;
}

.idae-modal-title-block .idae-profile-hero__meta{
  display: grid;
  gap: .28rem;
  max-width: 560px;
}

.idae-profile-hero__meta-row{
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .45rem .75rem;
}

.idae-modal-title-block .idae-profile-hero__meta span{
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #495057;
  font-size: .82rem;
  font-weight: 650;
}

.idae-modal-title-block .idae-profile-hero__meta span i{
  color: #6c757d;
}

.idae-modal-title-block .idae-profile-hero__meta span.is-ok,
.idae-modal-title-block .idae-profile-hero__meta span.is-warning,
.idae-modal-title-block .idae-profile-hero__meta span.is-danger{
  background: transparent;
  border: 0;
}

.idae-modal-title-block .idae-profile-hero__meta span.is-ok{
  color: #146c43;
}

.idae-modal-title-block .idae-profile-hero__meta span.is-warning{
  color: #9a5b00;
}

.idae-modal-title-block .idae-profile-hero__meta span.is-danger{
  color: #b42318;
}

.idae-profile-kpis{
  gap: .65rem;
}

.idae-kpi-card{
  min-height: 78px;
  border-color: #dbe3ea;
  box-shadow: 0 .125rem .35rem rgba(15,23,42,.04);
}

.idae-profile-layout{
  grid-template-columns: minmax(280px, .62fr) minmax(0, 1.38fr);
  gap: .85rem;
}

.idae-profile-panel{
  border-color: #dbe3ea;
  border-radius: 10px;
  box-shadow: 0 .125rem .35rem rgba(15,23,42,.035);
}

.idae-profile-panel--commercial{
  border-top: 4px solid #0d6efd;
}

.idae-profile-panel__head{
  padding-bottom: .65rem;
  border-bottom: 1px solid #edf1f5;
}

.idae-detail-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .55rem .75rem;
  border-top: 0;
}

.idae-detail-line{
  display: block;
  min-height: 62px;
  padding: .65rem .75rem;
  border: 1px solid #edf1f5;
  border-radius: 8px;
  background: #f8f9fa;
}

.idae-detail-line:first-child{
  padding-top: .65rem;
}

.idae-detail-line:last-child{
  padding-bottom: .65rem;
  border-bottom: 1px solid #edf1f5;
}

.idae-detail-line dt{
  margin-bottom: .2rem;
}

.idae-contact-list{
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
}

.idae-contact-card{
  border-color: #dbe3ea;
}

@media (max-width: 991.98px){
  .container-header-card,
  .idae-filter-bar,
  .idae-funnel-filter-bar{
    grid-template-columns: 1fr;
  }

  .idae-dashboard-kpis{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .idae-dashboard-grid{
    grid-template-columns: 1fr;
  }

  .idae-dashboard-toolbar{
    align-items: stretch;
    flex-direction: column;
  }

  .idae-company-merge,
  .idae-company-link,
  .idae-company-row{
    grid-template-columns: 1fr;
  }

  .idae-action-form,
  .idae-action-item{
    grid-template-columns: 1fr;
  }

  .idae-actions-toolbar{
    align-items: stretch;
    flex-direction: column;
  }

  .idae-company-link__actions{
    grid-template-columns: 1fr;
  }

  .idae-company-row > div:nth-child(2){
    text-align: left;
  }

  .idae-dashboard-person-filter{
    width: 100%;
  }

  .idae-dashboard-panel--wide{
    grid-row: auto;
  }

  .idae-count{
    justify-self: start;
  }

  .idae-modal-title-block,
  .idae-profile-hero,
  .idae-profile-layout,
  .idae-company-detail-grid,
  .idae-detail-line,
  .idae-contact-discovery,
  .idae-contact-candidate,
  .idae-contact-list,
  .idae-contact-card__fields{
    grid-template-columns: 1fr;
  }

  .idae-profile-kpis{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .idae-profile-hero__meta{
    justify-content: flex-start;
  }

  .idae-modal-title-block .idae-profile-hero__meta{
    max-width: none;
  }

  .idae-profile-panel--commercial{
    position: static;
  }

  .idae-offer-item{
    grid-template-columns: 1fr;
  }

  .idae-offer-item__actions{
    justify-content: flex-end;
  }

  .idae-contact-remove{
    justify-self: end;
  }
}

@media (max-width: 767.98px){
  .app-main .nav-tabs .nav-link i{
    display: none;
  }

  .idae-dashboard-kpis{
    grid-template-columns: 1fr;
  }

  .idae-dashboard-stack__head{
    align-items: flex-start;
    flex-wrap: wrap;
    gap: .25rem .5rem;
  }

  .idae-dashboard-stack__head strong,
  .idae-dashboard-stack__head span{
    min-width: 0;
  }

  .idae-dashboard-week-table__head,
  .idae-dashboard-week-row{
    grid-template-columns: minmax(46px, .75fr) repeat(4, minmax(38px, 1fr));
    gap: .25rem;
    padding: .42rem .38rem;
  }

  .idae-dashboard-week-table__head{
    font-size: .62rem;
    line-height: 1.2;
  }

  .idae-dashboard-week-row{
    font-size: .78rem;
  }

  .idae-dashboard-week-row strong{
    font-size: .76rem;
  }

  .idae-dashboard-week-row span{
    min-width: 28px;
    max-width: 100%;
    padding-inline: .32rem;
  }

  .idae-dashboard-status-row{
    grid-template-columns: 82px minmax(0, 1fr) 28px;
  }

  .idae-dashboard-status-row small{
    display: none;
  }

  .idae-dashboard-owner{
    grid-template-columns: 1fr;
  }

  .idae-dashboard-owner__chips{
    justify-items: start;
    grid-auto-flow: column;
    justify-content: start;
  }

  .idae-table{
    font-size: .82rem;
  }

  .idae-table colgroup{
    display: none;
  }

  .idae-table th,
  .idae-table td{
    padding: .55rem .35rem;
  }

  .idae-table .idae-col-funnel{ width: 72px; min-width: 72px; }
  .idae-table .idae-col-empresa{ width: 38%; }
  .idae-table .idae-col-capacidad{ width: 24%; }
  .idae-table .idae-col-score-chain{ width: 64px; min-width: 64px; }
  .idae-table .idae-col-contacto{ width: 54px; min-width: 54px; }

  .idae-table-switch .form-check-input{
    width: 2.2rem;
    height: 1.2rem;
  }

  .idae-company-cell{
    font-size: .84rem;
  }

  .idae-company-action{
    font-size: .74rem;
  }

  .idae-score-pill{
    min-width: 34px;
    padding-inline: .35rem;
  }

  .idae-icon-pill{
    width: 32px;
    height: 32px;
  }

  .idae-table th:nth-child(6) .idae-sort{
    justify-content: center;
  }
}

.maintenance-summary-bar{
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1rem;
  align-items: center;
  padding: .65rem .85rem;
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 8px;
}

.maintenance-summary-item{
  display: inline-flex;
  align-items: baseline;
  gap: .35rem;
  padding-right: 1rem;
  border-right: 1px solid rgba(0,0,0,.10);
  line-height: 1.1;
}

.maintenance-summary-item:last-child{
  border-right: 0;
  padding-right: 0;
}

.maintenance-summary-value{
  font-size: 1.15rem;
  font-weight: 700;
  color: #111827;
}

.maintenance-empty,
.maintenance-machine-empty{
  border: 1px dashed rgba(0,0,0,.18);
  border-radius: 8px;
  padding: 1rem;
  background: #fff;
}

.maintenance-machine-groups{
  display: flex;
  flex-direction: column;
}

.maintenance-machine-block{
  background: #fff;
  border-top: 1px solid rgba(0,0,0,.10);
}

.maintenance-machine-block:first-child{
  border-top: 0;
}

.maintenance-machine-head{
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) minmax(260px, .8fr) auto;
  gap: .75rem;
  align-items: center;
  padding: .75rem 1rem;
}

.maintenance-machine-main{
  min-width: 0;
}

.maintenance-machine-title{
  display: flex;
  align-items: center;
  gap: .45rem;
  line-height: 1.15;
}

.maintenance-machine-title .badge{
  font-size: .68rem;
  padding: .22rem .42rem;
}

.maintenance-machine-desc{
  font-size: .78rem;
  line-height: 1.2;
  margin-top: .12rem;
}

.maintenance-machine-facts{
  display: flex;
  flex-wrap: wrap;
  gap: .35rem .85rem;
  align-items: center;
  color: #4b5563;
  font-size: .84rem;
}

.maintenance-machine-facts span{
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  white-space: nowrap;
}

.maintenance-machine-actions{
  display: flex;
  justify-content: flex-end;
  gap: .35rem;
}

.maintenance-machine-empty{
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  align-items: center;
  justify-content: space-between;
  margin: 0 1rem .85rem 1rem;
  padding: .65rem .75rem;
  background: #fbfcfd;
}

.maintenance-task-table-wrap{
  border-top: 1px solid rgba(0,0,0,.06);
  padding: 0 1rem .85rem 1rem;
}

.maintenance-task-table{
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 6px;
  overflow: visible;
  table-layout: fixed;
  width: 100%;
}

.maintenance-task-col-work{
  width: 32%;
}

.maintenance-task-col-frequency{
  width: 13%;
}

.maintenance-task-col-last{
  width: 12%;
}

.maintenance-task-col-next{
  width: 15%;
}

.maintenance-task-col-alert{
  width: 8%;
}

.maintenance-task-col-doc{
  width: 8%;
}

.maintenance-task-col-actions{
  width: 12%;
}

.maintenance-task-table thead th{
  background: #f8f9fa;
  color: #5b6470;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(0,0,0,.08);
  white-space: nowrap;
}

.maintenance-task-table th,
.maintenance-task-table td{
  padding: .42rem .55rem;
  vertical-align: middle;
  font-size: .86rem;
  overflow-wrap: anywhere;
}

.maintenance-task-name{
  min-width: 0;
}

.maintenance-task-table td:not(.maintenance-task-name),
.maintenance-task-table th:not(:first-child){
  white-space: nowrap;
}

.maintenance-task-table .btn-sm,
.maintenance-machine-actions .btn-sm{
  --bs-btn-padding-y: .16rem;
  --bs-btn-padding-x: .36rem;
  --bs-btn-font-size: .82rem;
}

.maintenance-task-table .badge{
  font-size: .72rem;
  padding: .22rem .42rem;
}

.maintenance-task-table .dropdown-menu{
  font-size: .88rem;
  z-index: 1080;
}

.maintenance-task-table .dropdown-item i{
  width: 1rem;
}

.maintenance-dropdown-floating{
  position: fixed !important;
  z-index: 2055 !important;
}

#maintenancePlanModal .modal-dialog{
  max-height: calc(100dvh - 1rem);
}

#maintenancePlanModal .modal-content{
  max-height: calc(100dvh - 1rem);
}

#maintenancePlanModal .modal-header,
#maintenancePlanModal .modal-footer{
  padding: .7rem 1rem;
}

#maintenancePlanModal .modal-body{
  padding: .8rem 1rem;
}

#maintenancePlanModal .modal-title{
  font-size: 1.05rem;
}

.maintenance-plan-form .form-label{
  margin-bottom: .2rem;
  font-size: .86rem;
  color: #343a40;
}

.maintenance-attachment-dropzone{
  display: flex;
  align-items: center;
  gap: .85rem;
  min-height: 62px;
  padding: .6rem .8rem;
  border: 1px dashed rgba(13,110,253,.45);
  border-radius: 8px;
  background: #f8fbff;
  color: #1f2937;
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease;
}

.maintenance-attachment-dropzone:hover,
.maintenance-attachment-dropzone:focus,
.maintenance-attachment-dropzone.is-dragover{
  border-color: #0d6efd;
  background: #eef6ff;
  outline: none;
}

.maintenance-attachment-dropzone-icon{
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: #0d6efd;
  background: rgba(13,110,253,.10);
  font-size: 1.1rem;
}

.maintenance-attachments-table-wrap{
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 8px;
  overflow: hidden;
}

.maintenance-attachments-table thead th{
  background: #f8f9fa;
  color: #5b6470;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.maintenance-attachments-table th,
.maintenance-attachments-table td{
  padding: .42rem .55rem;
  font-size: .84rem;
}

.maintenance-attachment-name{
  max-width: 420px;
}

.maintenance-line-table th,
.maintenance-line-table td{
  padding: .55rem .75rem;
  vertical-align: middle;
}

.maintenance-line-table thead th{
  background: #f8f9fa;
  color: #5b6470;
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.maintenance-line-mobile-list{
  display:flex;
  flex-direction:column;
  gap:.75rem;
  padding:.75rem;
}

.maintenance-line-mobile-card{
  padding:.875rem;
  border:1px solid #dbe3ea;
  border-radius:8px;
  background:#fff;
  box-shadow:0 .125rem .25rem rgba(15,23,42,.06);
}

.maintenance-line-mobile-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:.75rem;
}

.maintenance-line-mobile-main{
  min-width:0;
}

.maintenance-line-mobile-code{
  color:#111827;
  font-size:1.05rem;
  font-weight:800;
  line-height:1.2;
  overflow-wrap:anywhere;
}

.maintenance-line-mobile-name{
  margin-top:.18rem;
  color:#6c757d;
  font-size:.86rem;
  line-height:1.25;
  overflow-wrap:anywhere;
}

.maintenance-line-mobile-status{
  flex:0 0 auto;
}

.maintenance-line-mobile-field{
  margin-top:.875rem;
  padding-top:.75rem;
  border-top:1px solid #eef2f7;
  min-width:0;
}

.maintenance-line-mobile-field span{
  display:block;
  margin-bottom:.25rem;
  color:#64748b;
  font-size:.72rem;
  font-weight:700;
  line-height:1.25;
  text-transform:uppercase;
}

.maintenance-line-mobile-field strong{
  display:block;
  color:#111827;
  font-size:.92rem;
  font-weight:600;
  line-height:1.28;
  overflow-wrap:anywhere;
}

.maintenance-line-mobile-actions{
  display:flex;
  justify-content:flex-end;
  margin-top:.875rem;
}

.maintenance-line-mobile-actions .btn{
  width:42px;
  height:42px;
  min-width:42px;
  padding:0;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:var(--app-action-radius);
}

.maintenance-work-toolbar{
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .5rem;
}

.maintenance-work-toolbar .form-select{
  width: 170px;
}

.maintenance-work-toolbar > .form-floating{
  width: 170px;
}

.maintenance-work-search{
  width: 280px;
}

.maintenance-kpi-filter{
  appearance: none;
  color: inherit;
  cursor: pointer;
  text-align: left;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.maintenance-kpi-filter:hover{
  border-color: rgba(13,110,253,.45);
  box-shadow: 0 6px 18px rgba(13,110,253,.08);
  transform: translateY(-1px);
}

.maintenance-kpi-filter:focus-visible{
  outline: 3px solid rgba(13,110,253,.22);
  outline-offset: 2px;
}

.maintenance-kpi-filter.is-active{
  border-color: #0d6efd;
  box-shadow: inset 0 0 0 1px #0d6efd;
}

.maintenance-work-list{
  display: flex;
  flex-direction: column;
}

.maintenance-work-item{
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: stretch;
  padding: .9rem 1rem;
  border-top: 1px solid rgba(0,0,0,.08);
  background: #fff;
}

.maintenance-work-item:first-child{
  border-top: 0;
}

.maintenance-work-item--overdue{
  box-shadow: inset 4px 0 0 #dc3545;
}

.maintenance-work-item--due_soon{
  box-shadow: inset 4px 0 0 #ffc107;
}

.maintenance-work-item--planned{
  box-shadow: inset 4px 0 0 #6c757d;
}

.maintenance-work-item--done{
  box-shadow: inset 4px 0 0 #198754;
}

.maintenance-work-date{
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 8px;
  padding: .55rem;
  text-align: center;
  background: #fbfcfd;
  min-height: 100%;
}

.maintenance-work-date-day{
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1;
  margin-top: .35rem;
}

.maintenance-work-date-month{
  color: #495057;
  font-size: .8rem;
  font-weight: 600;
  text-transform: uppercase;
}

.maintenance-work-date-relative{
  color: #6c757d;
  font-size: .75rem;
  margin-top: .25rem;
}

.maintenance-work-main{
  min-width: 0;
}

.maintenance-work-title{
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.25;
}

.maintenance-work-meta{
  display: flex;
  flex-wrap: wrap;
  gap: .35rem .85rem;
  color: #495057;
  font-size: .82rem;
}

.maintenance-work-meta span{
  display: inline-flex;
  align-items: center;
  gap: .3rem;
}

.maintenance-work-secondary{
  color: #6c757d;
  font-size: .82rem;
  margin-top: .3rem;
}

.maintenance-work-instructions{
  margin-top: .45rem;
  color: #343a40;
  font-size: .84rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.maintenance-work-attachments{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .35rem;
  margin-top: .45rem;
}

.maintenance-work-attachment-chip{
  display: inline-flex;
  align-items: center;
  max-width: 260px;
  gap: .3rem;
  min-height: 28px;
  padding: .2rem .48rem;
  border: 1px solid #d8e0ea;
  border-radius: 999px;
  background: #f8fafc;
  color: #253244;
  font-size: .78rem;
  text-decoration: none;
}

.maintenance-work-attachment-chip:hover{
  border-color: #86b7fe;
  background: #eef5ff;
  color: #0d6efd;
}

.maintenance-work-attachment-ext{
  color: #0d6efd;
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
}

.maintenance-work-attachment-name{
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.maintenance-work-attachments-more{
  position: relative;
}

.maintenance-work-attachments-more summary{
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: .2rem .48rem;
  border: 1px dashed #c8d1dc;
  border-radius: 999px;
  color: #495057;
  cursor: pointer;
  font-size: .78rem;
  list-style: none;
}

.maintenance-work-attachments-more summary::-webkit-details-marker{
  display: none;
}

.maintenance-work-attachments-more-list{
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin-top: .35rem;
}

.maintenance-work-actions{
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  align-content: center;
  justify-content: flex-end;
  min-width: 148px;
}

.maintenance-work-empty{
  display: flex;
  gap: .85rem;
  align-items: center;
  padding: 1.25rem;
  color: #6c757d;
}

.maintenance-work-empty i{
  font-size: 1.5rem;
}

.maintenance-complete-summary{
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 8px;
  background: #f8f9fa;
  padding: .75rem;
}

.maintenance-machine-controls{
  display: grid;
  grid-template-columns: minmax(150px, 220px) minmax(240px, 1fr) auto;
  gap: .75rem;
  align-items: end;
}

.maintenance-machine-controls-actions{
  display: flex;
  justify-content: flex-end;
}

.maintenance-machine-qr canvas,
.maintenance-machine-qr img{
  display: block;
  width: 220px;
  height: 220px;
  image-rendering: pixelated;
}

.maintenance-machine-qr{
  display: flex;
  align-items: center;
  justify-content: center;
  width: 264px;
  height: 264px;
  margin: 0 auto;
  padding: 20px;
  border: 1px solid #d8e0ea;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
}

.maintenance-machine-overview{
  align-items: stretch;
}

.maintenance-machine-label-wrap{
  min-width: 0;
}

.maintenance-machine-label-card{
  display: grid;
  grid-template-columns: minmax(0, 1fr) 142px;
  gap: 1rem;
  align-items: center;
  width: min(100%, 520px);
  aspect-ratio: 99.1 / 38.1;
  min-height: 172px;
  padding: .95rem 1.05rem;
  border: 1px solid #cfd8e3;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(0,78,137,.08), rgba(255,255,255,0) 38%),
    #fff;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.72),
    0 1px 2px rgba(15,23,42,.05);
}

@media (min-width: 992px){
  .maintenance-machine-label-card{
    grid-template-columns: minmax(0, 1fr) 30mm;
    gap: 3mm;
    width: 99.1mm;
    height: 38.1mm;
    min-height: 0;
    padding: 3mm 4mm;
  }

  .maintenance-machine-label-brand{
    gap: 1.8mm;
  }

  .maintenance-machine-label-brand img{
    width: 28mm;
    max-height: 7mm;
  }

  .maintenance-machine-label-brand span{
    padding-left: 1.8mm;
    font-size: 7pt;
  }

  .maintenance-machine-label-code{
    margin: 1.4mm 0 .9mm 0;
    font-size: 17pt;
  }

  .maintenance-machine-label-name{
    font-size: 9pt;
  }

  .maintenance-machine-label-desc{
    margin-top: 1.1mm;
    font-size: 7.5pt;
    line-height: 1.15;
  }

  .maintenance-machine-label-qr-frame{
    width: 30mm;
    height: 30mm;
    padding: 1.5mm;
  }

  .maintenance-machine-label-qr{
    width: 26mm;
    height: 26mm;
  }

  .maintenance-machine-label-qr canvas,
  .maintenance-machine-label-qr img{
    width: 26mm;
    height: 26mm;
  }
}

.maintenance-machine-label-main{
  min-width: 0;
}

.maintenance-machine-label-brand{
  display: flex;
  align-items: center;
  gap: .55rem;
  min-width: 0;
}

.maintenance-machine-label-brand img{
  display: block;
  width: 112px;
  max-height: 26px;
  object-fit: contain;
  object-position: left center;
}

.maintenance-machine-label-brand span{
  flex: 0 0 auto;
  padding-left: .55rem;
  border-left: 1px solid rgba(15,23,42,.18);
  color: #495057;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .04em;
  line-height: 1;
  text-transform: uppercase;
}

.maintenance-machine-label-code{
  margin: .48rem 0 .25rem 0;
  color: #071a33;
  font-size: clamp(1.6rem, 3vw, 2.05rem);
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.maintenance-machine-label-name{
  color: #343a40;
  font-size: .98rem;
  line-height: 1.2;
}

.maintenance-machine-label-desc{
  margin-top: .35rem;
  color: #495057;
  font-size: .88rem;
  line-height: 1.22;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.maintenance-machine-label-qr-frame{
  display: flex;
  align-items: center;
  justify-content: center;
  width: 142px;
  height: 142px;
  padding: 7px;
  border: 2px solid #071a33;
  border-radius: 8px;
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(135deg, #071a33, #0086c9) border-box;
  box-shadow: 0 1px 4px rgba(15,23,42,.12);
}

.maintenance-machine-label-qr{
  display: flex;
  align-items: center;
  justify-content: center;
  width: 124px;
  height: 124px;
  padding: 1px;
  background: #fff;
}

.maintenance-machine-label-qr canvas,
.maintenance-machine-label-qr img{
  display: block;
  width: 122px;
  height: 122px;
  image-rendering: pixelated;
  }

.maintenance-machine-summary-grid{
  min-width: 0;
}

.maintenance-machine-summary-card{
  height: 100%;
  padding: 1rem;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 8px;
  background: #f8f9fa;
}

.maintenance-machine-summary-value{
  color: #111827;
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1;
}

.maintenance-machine-summary-value.is-danger{
  color: #dc3545;
}

.maintenance-machine-summary-value.is-warning{
  color: #b58100;
}

.maintenance-machine-summary-label{
  margin-top: .55rem;
  color: #6c757d;
  font-size: .82rem;
  font-weight: 700;
  line-height: 1.15;
}

.gantt-it-chip {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  margin-left: .45rem;
  padding: .1rem .42rem;
  border: 1px solid #fecaca;
  border-radius: 999px;
  background: #fff7f7;
  color: #b91c1c;
  font-size: .75rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
}

.gantt-it-chip:hover {
  border-color: #f87171;
  background: #fee2e2;
  color: #991b1b;
}

.gantt-task-form-grid{
  row-gap: 1rem;
}

.gantt-task-form-topic{
  display: flex;
  align-items: center;
  gap: .55rem;
  margin-top: .35rem;
  color: #475569;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .04em;
  line-height: 1;
  text-transform: uppercase;
}

.gantt-task-form-topic::after{
  content: "";
  height: 1px;
  flex: 1 1 auto;
  background: #e2e8f0;
}

.gantt-task-form-grid > .col-12:has(.gantt-task-form-topic){
  margin-top: .35rem;
}

.gantt-task-form-grid > .col-12:first-child{
  margin-top: 0;
}

.gantt-task-form-docs{
  padding-top: .35rem;
}

.gantt-task-form-layout{
  align-items: start;
}

.gantt-task-form-group{
  padding-top: .15rem;
}

.gantt-task-form-group + .gantt-task-form-group{
  margin-top: 1.05rem;
}

.gantt-task-form-group-title{
  margin-bottom: .65rem;
  color: #475569;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .04em;
  line-height: 1;
  text-transform: uppercase;
}

.gantt-it-dropzone {
  display: flex;
  align-items: center;
  gap: .75rem;
  min-height: 68px;
  padding: .7rem .85rem;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}

.gantt-it-dropzone:hover,
.gantt-it-dropzone:focus-visible,
.gantt-it-dropzone.is-dragover {
  border-color: #2563eb;
  background: #eff6ff;
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
  outline: none;
}

.gantt-it-dropzone.has-file {
  border-style: solid;
  border-color: #fecaca;
  background: #fff7f7;
}

.gantt-it-dropzone.has-pending-file {
  border-color: #f59e0b;
  background: #fffbeb;
}

.gantt-it-dropzone-icon {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #fee2e2;
  color: #b91c1c;
  font-size: 1.15rem;
}

.gantt-it-dropzone-main {
  min-width: 0;
  flex: 1 1 auto;
}

.maintenance-machine-list{
  display: flex;
  flex-direction: column;
}

.maintenance-machine-task,
.maintenance-machine-history-item{
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  gap: .85rem;
  padding: .85rem 1rem;
  border-top: 1px solid rgba(0,0,0,.08);
}

.maintenance-machine-task:first-child,
.maintenance-machine-history-item:first-child{
  border-top: 0;
}

.maintenance-machine-task--overdue{
  box-shadow: inset 4px 0 0 #dc3545;
}

.maintenance-machine-task--due_soon{
  box-shadow: inset 4px 0 0 #ffc107;
}

.maintenance-machine-task--planned{
  box-shadow: inset 4px 0 0 #6c757d;
}

.maintenance-machine-history-item{
  box-shadow: inset 4px 0 0 #198754;
}

.maintenance-machine-history-item.is-voided{
  box-shadow: inset 4px 0 0 #6c757d;
  background: #fbfbfc;
}

.maintenance-machine-date-pill{
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 8px;
  padding: .5rem;
  text-align: center;
  background: #fbfcfd;
}

.maintenance-machine-date-day{
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1;
  margin-top: .3rem;
}

.maintenance-machine-date-month{
  color: #495057;
  font-size: .76rem;
  font-weight: 700;
  text-transform: uppercase;
}

.maintenance-machine-date-relative{
  color: #6c757d;
  font-size: .72rem;
  margin-top: .2rem;
}

.maintenance-machine-task-main{
  min-width: 0;
}

.maintenance-machine-task-title{
  font-size: .98rem;
  font-weight: 700;
  line-height: 1.25;
}

.maintenance-machine-task-actions{
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 104px;
}

.maintenance-machine-void-note{
  margin-top: .45rem;
  padding: .45rem .55rem;
  border: 1px solid rgba(108,117,125,.2);
  border-radius: 8px;
  background: #f1f3f5;
  color: #495057;
  font-size: .8rem;
}

@media (max-width: 991.98px){
  .maintenance-machine-head{
    grid-template-columns: 1fr;
  }

  .maintenance-machine-actions{
    justify-content: flex-start;
  }

  .maintenance-task-table-wrap{
    overflow: visible !important;
    padding: .5rem 1rem .85rem 1rem;
  }

  .maintenance-task-table{
    display: block;
    border: 0;
    background: transparent;
  }

  .maintenance-task-table thead{
    display: none;
  }

  .maintenance-task-table tbody{
    display: grid;
    gap: .55rem;
  }

  .maintenance-task-table tr{
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: .22rem;
    position: relative;
    overflow: visible;
    padding: .65rem 3.1rem .65rem .75rem;
    border: 1px solid rgba(0,0,0,.10);
    border-radius: 8px;
    background: #fff;
  }

  .maintenance-task-table th,
  .maintenance-task-table td{
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: .75rem;
    width: 100%;
    border: 0 !important;
    padding: .08rem 0;
    font-size: .84rem;
    white-space: normal !important;
  }

  .maintenance-task-table td::before{
    content: attr(data-label);
    flex: 0 0 auto;
    color: #6c757d;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
  }

  .maintenance-task-table .maintenance-task-name{
    display: block;
    min-width: 0;
    padding-right: .25rem;
    font-size: .9rem;
  }

  .maintenance-task-table .maintenance-task-name::before,
  .maintenance-task-table .maintenance-task-actions::before{
    display: none;
  }

  .maintenance-task-table .maintenance-task-doc{
    justify-content: flex-start;
  }

  .maintenance-task-table .maintenance-task-actions{
    position: absolute;
    top: .45rem;
    right: .55rem;
    width: auto;
    padding: 0;
  }

  .maintenance-task-table .maintenance-task-actions .dropdown-menu{
    z-index: 1080;
  }

  .maintenance-work-item{
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .maintenance-work-actions{
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .maintenance-machine-controls{
    grid-template-columns: 1fr;
  }

  .maintenance-machine-controls-actions{
    justify-content: flex-start;
  }

  .maintenance-machine-task,
  .maintenance-machine-history-item{
    grid-template-columns: 86px minmax(0, 1fr);
  }

  .maintenance-machine-task-actions{
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .maintenance-machine-overview{
    row-gap: .75rem;
  }

  .maintenance-machine-label-card{
    width: 100%;
    min-height: 0;
  }

  .maintenance-machine-summary-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767.98px){
  .app-page-header{
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start !important;
    column-gap: .75rem;
    row-gap: .25rem;
  }

  .container-page .container-header-card{
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    column-gap: .75rem;
    row-gap: .25rem;
    padding: .85rem;
  }

  .app-page-header > div:first-child,
  .container-page .container-header-card > div:first-child{
    min-width: 0;
  }

  .app-header-actions,
  .container-header-actions{
    width: auto;
    flex-wrap: nowrap;
    gap: .4rem;
    justify-content: flex-end;
    overflow-x: auto;
    margin-left: 0;
  }

  .tiempos-header-actions #tiempos_hours{
    width: 150px !important;
  }

  .tiempos-header-actions .form-floating:has(> #tiempos_hours){
    width: 150px !important;
  }

  .app-header-actions > .btn,
  .app-header-actions > a.btn,
  .app-page-header > .btn,
  .app-page-header > a.btn,
  .container-header-actions > .btn,
  .container-header-actions > a.btn,
  .container-header-actions .btn{
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    padding: 0;
    font-size: 0;
  }

  .teams-access-mobile{
    padding: .65rem;
  }

  .maintenance-machine-label-card{
    grid-template-columns: minmax(0, 1fr) 108px;
    gap: .7rem;
    max-width: 350px;
    padding: .75rem;
  }

  .maintenance-machine-label-brand{
    gap: .4rem;
  }

  .maintenance-machine-label-brand img{
    width: 92px;
    max-height: 22px;
  }

  .maintenance-machine-label-brand span{
    padding-left: .4rem;
    font-size: .62rem;
  }

  .maintenance-machine-label-code{
    margin-top: .38rem;
    font-size: 1.35rem;
  }

  .maintenance-machine-label-name{
    font-size: .86rem;
  }

  .maintenance-machine-label-desc{
    font-size: .76rem;
    line-height: 1.16;
  }

  .maintenance-machine-label-qr-frame{
    width: 108px;
    height: 108px;
    padding: 5px;
  }

  .maintenance-machine-label-qr{
    width: 94px;
    height: 94px;
  }

  .maintenance-machine-label-qr canvas,
  .maintenance-machine-label-qr img{
    width: 92px;
    height: 92px;
  }

  .team-access-meta{
    grid-template-columns: 1fr 1fr;
  }

  .maintenance-work-toolbar{
    justify-content: stretch;
    width: 100%;
  }

  .maintenance-work-toolbar .btn-group,
  .maintenance-work-toolbar .form-select,
  .maintenance-work-toolbar > .form-floating,
  .maintenance-work-search{
    width: 100%;
  }

  .maintenance-work-item{
    grid-template-columns: 1fr;
  }

  .maintenance-work-date{
    text-align: left;
    min-height: 0;
  }

  .maintenance-work-date-day,
  .maintenance-work-date-month,
  .maintenance-work-date-relative{
    display: inline-block;
    margin-right: .35rem;
  }

  .maintenance-machine-task,
  .maintenance-machine-history-item{
    grid-template-columns: 1fr;
  }

  .maintenance-machine-date-pill{
    text-align: left;
  }

  .maintenance-machine-date-day,
  .maintenance-machine-date-month,
  .maintenance-machine-date-relative{
    display: inline-block;
    margin-right: .35rem;
  }

}

@media (max-width: 359.98px){
  .team-access-meta{
    grid-template-columns: 1fr;
  }
}

/* =========================
   PDMU Assembly AR/3D
   ========================= */
.pdmu-assembly-page {
  color: #172033;
  max-width: 100%;
  overflow-x: clip;
}

.pdmu-assembly-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.pdmu-status-pill {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  min-height: 34px;
  padding: .38rem .65rem;
  border: 1px solid #d7e1ea;
  border-radius: 999px;
  background: #fff;
  color: #405064;
  font-size: .85rem;
  white-space: nowrap;
}

.pdmu-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 1rem;
  align-items: start;
  max-width: 100%;
  min-width: 0;
}

.pdmu-viewer-shell,
.pdmu-control-panel {
  min-width: 0;
  border: 1px solid #dbe3ec;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 .35rem .9rem rgba(15, 23, 42, .06);
}

.pdmu-viewer-shell {
  overflow: hidden;
}

.pdmu-modebar {
  margin-bottom: 0;
}

.pdmu-scene-wrap {
  display: none;
  position: relative;
  min-height: 540px;
  max-width: 100%;
  overflow: hidden;
  background: #f8fafc;
}

.pdmu-scene-wrap.is-active {
  display: block;
}

#pdmu_ar_panel.is-live {
  position: fixed;
  top: var(--app-header-height);
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1035;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  padding: .75rem;
  background: #0f172a;
}

#pdmu_ar_panel.is-live:fullscreen {
  top: 0;
  padding: .5rem;
}

#pdmu_ar_panel.is-live .pdmu-ar-scene {
  height: 100%;
  min-height: 0;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 8px;
}

.pdmu-ar-toolbar {
  display: none;
}

#pdmu_ar_panel.is-live .pdmu-ar-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-width: 0;
  padding-bottom: .65rem;
  color: #fff;
}

.pdmu-ar-toolbar-title {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  min-width: 0;
  font-weight: 700;
}

.pdmu-ar-controls {
  display: none;
}

#pdmu_ar_panel.is-live .pdmu-ar-controls {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  left: 1rem;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: .7rem;
  align-items: end;
  max-width: 880px;
  padding: .75rem;
  margin: 0 auto;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 8px;
  background: rgba(15, 23, 42, .78);
  color: #fff;
  box-shadow: 0 .75rem 1.8rem rgba(0, 0, 0, .28);
  backdrop-filter: blur(10px);
}

.pdmu-ar-control {
  display: grid;
  gap: .4rem;
  min-width: 0;
  margin: 0;
  font-size: .86rem;
  font-weight: 700;
}

.pdmu-ar-control .form-range {
  margin: 0;
  min-height: 34px;
  padding: .35rem 0;
}

.pdmu-ar-control .form-range::-webkit-slider-runnable-track {
  height: 10px;
  border-radius: 999px;
}

.pdmu-ar-control .form-range::-webkit-slider-thumb {
  width: 28px;
  height: 28px;
  margin-top: -9px;
}

.pdmu-ar-control .form-range::-moz-range-track {
  height: 10px;
  border-radius: 999px;
}

.pdmu-ar-control .form-range::-moz-range-thumb {
  width: 28px;
  height: 28px;
  border: 0;
}

.pdmu-ar-reset {
  width: 46px;
  height: 42px;
  padding: .25rem;
}

.pdmu-scene {
  position: relative;
  width: 100%;
  height: min(66vh, 650px);
  min-height: 540px;
  overflow: hidden;
}

.pdmu-scene a-scene {
  display: block;
  position: relative;
  width: 100%;
  height: 100%;
}

.pdmu-ar-scene {
  isolation: isolate;
  background: #111827;
  contain: layout paint size;
}

.pdmu-ar-scene > video,
.pdmu-ar-scene > a-scene,
.pdmu-ar-scene canvas,
.pdmu-ar-scene .a-canvas {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  transform: none !important;
}

.pdmu-ar-scene > video {
  object-fit: cover;
  z-index: 0 !important;
  pointer-events: none;
}

.pdmu-ar-scene > a-scene,
.pdmu-ar-scene canvas,
.pdmu-ar-scene .a-canvas {
  z-index: 1 !important;
  background: transparent !important;
}

.pdmu-ar-scene .a-enter-vr,
.pdmu-ar-scene .a-enter-ar,
.pdmu-ar-scene .a-orientation-modal {
  display: none !important;
}

body.pdmu-ar-contained {
  overflow-x: hidden;
}

html.pdmu-ar-contained-root,
body.pdmu-ar-contained {
  height: 100% !important;
  overflow: hidden !important;
}

.pdmu-ar-start {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  padding: 1.25rem;
  background: linear-gradient(180deg, rgba(248, 250, 252, .96), rgba(226, 232, 240, .92));
  text-align: center;
}

.pdmu-ar-start.is-hidden {
  display: none;
}

.pdmu-ar-start > i {
  color: #0d6efd;
  font-size: 2rem;
}

.pdmu-ar-start span {
  max-width: 360px;
  color: #64748b;
  font-size: .92rem;
}

.pdmu-control-panel {
  padding: .9rem;
}

.pdmu-panel-section {
  padding-bottom: .95rem;
  margin-bottom: .95rem;
  border-bottom: 1px solid #e5ebf2;
}

.pdmu-panel-section:last-child {
  padding-bottom: 0;
  margin-bottom: 0;
  border-bottom: 0;
}

.pdmu-section-title {
  margin-bottom: .55rem;
  color: #243244;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.pdmu-marker-preview {
  display: flex;
  justify-content: center;
  padding: .8rem;
  margin-top: .7rem;
  border: 1px dashed #c8d4e2;
  border-radius: 8px;
  background: #f8fafc;
}

.pdmu-marker-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 96px;
  aspect-ratio: 1;
  border: 14px solid #111827;
  background: #fff;
  color: #111827;
  font-weight: 800;
  letter-spacing: .08em;
}

.pdmu-steps {
  padding-left: 1.15rem;
  margin: 0;
  color: #526173;
  font-size: .88rem;
}

.pdmu-steps li + li {
  margin-top: .45rem;
}

@media (max-width: 991.98px) {
  .pdmu-layout {
    grid-template-columns: 1fr;
  }

  .pdmu-control-panel {
    order: -1;
  }
}

@media (max-width: 575.98px) {
  .pdmu-assembly-head {
    flex-direction: column;
  }

  .pdmu-status-pill {
    width: 100%;
    justify-content: center;
  }

  .pdmu-scene-wrap,
  .pdmu-scene {
    min-height: 440px;
  }

  .pdmu-scene {
    height: 62vh;
  }

  #pdmu_ar_panel.is-live {
    padding: .5rem;
  }

  #pdmu_ar_panel.is-live .pdmu-ar-controls {
    right: .5rem;
    bottom: .5rem;
    left: .5rem;
    grid-template-columns: 1fr;
    gap: .5rem;
    padding: .75rem;
  }

  .pdmu-ar-reset {
    width: 100%;
  }
}

@media (pointer: coarse) {
  #pdmu_ar_panel.is-live {
    top: 0;
    padding: .5rem;
  }

  #pdmu_ar_panel.is-live .pdmu-ar-toolbar {
    min-height: 48px;
    padding: .15rem .15rem .55rem;
    font-size: .98rem;
  }

  #pdmu_ar_panel.is-live .pdmu-ar-toolbar .btn {
    min-height: 40px;
    padding: .45rem .75rem;
    font-size: .9rem;
  }

  #pdmu_ar_panel.is-live .pdmu-ar-controls {
    right: .75rem;
    bottom: calc(.75rem + env(safe-area-inset-bottom, 0px));
    left: .75rem;
    grid-template-columns: 1fr;
    gap: .65rem;
    max-width: none;
    padding: .85rem;
  }

  .pdmu-ar-control {
    gap: .45rem;
    font-size: .95rem;
  }

  .pdmu-ar-control .form-range {
    min-height: 42px;
    padding: .45rem 0;
  }

  .pdmu-ar-control .form-range::-webkit-slider-runnable-track {
    height: 12px;
  }

  .pdmu-ar-control .form-range::-webkit-slider-thumb {
    width: 34px;
    height: 34px;
    margin-top: -11px;
  }

  .pdmu-ar-control .form-range::-moz-range-track {
    height: 12px;
  }

  .pdmu-ar-control .form-range::-moz-range-thumb {
    width: 34px;
    height: 34px;
  }

  .pdmu-ar-reset {
    width: 100%;
    height: 44px;
  }
}

.app-wrap{
  display:flex;
  min-height: calc(100vh - var(--app-header-height));
}

/* =========================
   SIDEBAR (Drawer flotante)
   ========================= */
.app-sidebar{
  width: var(--sidebar-width);
  background:#fff;
  border-right:1px solid rgba(0,0,0,.08);
  position: fixed;
  top: var(--app-header-height);
  bottom: 0;
  left:0;
  height: auto;
  max-height: calc(100vh - var(--app-header-height));
  display: flex;
  flex-direction: column;
  overflow: hidden;

  transform: translateX(-110%);
  transition: transform .18s ease;
  z-index:1050;

  box-shadow: 0 .5rem 1.25rem rgba(0,0,0,.20);
}

.app-sidebar.open{
  transform: translateX(0);
}

/* Contenido principal: nunca se empuja */
.app-main{
  flex:1;
  width:100%;
  margin-left: 0;
}

/* Overlay siempre (mobile y desktop) */
.app-overlay{
  position:fixed;
  top: var(--app-header-height); left:0; right:0; bottom:0;
  background: rgba(0,0,0,.35);
  z-index:1040;

  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
}

.app-overlay.show{
  opacity: 1;
  pointer-events: auto;
}

/* Bloquear scroll al abrir el drawer */
body.sidebar-open{
  overflow: hidden;
}

.app-sidebar > .p-3{
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: .65rem .75rem calc(.65rem + env(safe-area-inset-bottom, 0px)) !important;
}

@supports (height: 100dvh) {
  .app-wrap{
    min-height: calc(100dvh - var(--app-header-height));
  }

  .app-sidebar{
    bottom: auto;
    height: calc(100dvh - var(--app-header-height));
    max-height: calc(100dvh - var(--app-header-height));
  }

  .app-overlay{
    bottom: auto;
    height: calc(100dvh - var(--app-header-height));
  }
}

.app-sidebar .list-group-item i{
  width: 1.25rem;
  text-align: center;
}

.app-sidebar .list-group{
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-bottom: .35rem;
}

.min-w-0{
  min-width: 0;
}

.sidebar-section-label{
  margin: .48rem .45rem .16rem;
  color: #6c757d;
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .045em;
  text-transform: uppercase;
}

.app-sidebar .list-group-flush > .list-group-item{
  border: 0;
}

.app-sidebar .list-group-item{
  min-height: 30px;
  margin: 1px 0;
  padding: .34rem .5rem;
  border-radius: 6px;
  color: #252b32;
  font-size: .8rem;
  line-height: 1.18;
}

.app-sidebar .list-group-item i{
  color: #4d5965;
  font-size: .92rem;
}

.app-sidebar .mt-auto{
  padding-top: .55rem !important;
}

.app-sidebar .mt-auto .fw-semibold{
  font-size: .9rem;
  line-height: 1.15;
}

.app-sidebar .mt-auto .small{
  font-size: .76rem;
}

.app-sidebar .mt-auto .btn-sm{
  --bs-btn-padding-y: .22rem;
  --bs-btn-padding-x: .34rem;
}

.app-sidebar .list-group-item:hover{
  background: rgba(13,110,253,.08);
  color: #0b3c8c;
}

.app-sidebar .list-group-item:hover i{
  color: #0b3c8c;
}

.app-sidebar .list-group-item.active,
.app-sidebar .list-group-item.active:hover,
.app-sidebar .list-group-item.active:focus{
  background: #0d6efd;
  color: #fff;
}

.app-sidebar .list-group-item.active i{
  color: #fff;
}

.settings-hub-card{
  border: 1px solid rgba(0,0,0,.08);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.settings-hub-card:hover,
.settings-hub-card:focus{
  transform: translateY(-1px);
  border-color: rgba(13,110,253,.28);
  box-shadow: 0 .5rem 1rem rgba(0,0,0,.10) !important;
}

.settings-hub-icon{
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: #0d6efd;
  background: rgba(13,110,253,.10);
  font-size: 1.25rem;
}

.settings-list-card{
  overflow: hidden;
}

.settings-hub-page{
  display: grid;
  gap: 1rem;
}

.settings-hub-page > .app-page-header{
  margin-bottom: 0;
}

.settings-section-stack{
  display: grid;
  gap: 1rem;
}

.settings-section-stack--hub{
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
}

.settings-group{
  min-width: 0;
  overflow: hidden;
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 .125rem .25rem rgba(15,23,42,.05);
}

.settings-group-head{
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: .7rem;
  align-items: center;
  min-height: 78px;
  padding: .9rem 1rem;
  border-bottom: 1px solid #dbe3ee;
  background: #f3f6fa;
}

.settings-group-icon{
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #e2e8f0;
  color: #334155;
  font-size: 1rem;
}

.settings-group-head h5{
  margin: 0;
  color: #0f172a;
  font-size: .92rem;
  font-weight: 800;
  line-height: 1.15;
  text-transform: uppercase;
}

.settings-group-head p{
  margin: .18rem 0 0;
  color: #64748b;
  font-size: .78rem;
  line-height: 1.25;
}

.settings-list{
  display: grid;
}

.settings-breadcrumb{
  --bs-breadcrumb-divider-color: #8a94a0;
  --bs-breadcrumb-item-active-color: #6c757d;
  font-size: .78rem;
  line-height: 1.2;
}

.settings-breadcrumb .breadcrumb-item a{
  color: #0d6efd;
  text-decoration: none;
}

.settings-breadcrumb .breadcrumb-item a:hover{
  text-decoration: underline;
}

.settings-list-item{
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: .8rem;
  align-items: center;
  padding: .82rem 1rem;
  color: inherit;
  text-decoration: none;
  border-top: 1px solid #edf1f5;
  transition: background-color .15s ease, box-shadow .15s ease;
}

.settings-list > .settings-list-item:first-child{
  border-top: 0;
}

.settings-list-card .settings-list-item:first-child,
.list-group-flush > .settings-list-item:first-child{
  border-top: 0;
}

.settings-list-item:hover,
.settings-list-item:focus-visible{
  background: #f8fbff;
  box-shadow: inset 3px 0 0 #0d6efd;
  outline: 0;
}

.settings-list-icon{
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: #0d6efd;
  background: rgba(13,110,253,.10);
  font-size: .98rem;
}

.settings-list-copy{
  min-width: 0;
}

.settings-list-copy .small{
  line-height: 1.25;
}

.settings-list-copy .fw-semibold{
  font-size: .94rem;
  line-height: 1.2;
}

.settings-list-arrow{
  color: #8a94a0;
  font-size: .95rem;
}

.settings-list-item:hover .settings-list-arrow,
.settings-list-item:focus-visible .settings-list-arrow{
  color: #0d6efd;
}

@media (max-width: 1199.98px){
  .settings-section-stack--hub{
    grid-template-columns: 1fr;
  }

  .settings-group-head{
    min-height: 0;
  }
}

@media (max-width: 767.98px){
  .settings-section-stack{
    gap: .85rem;
  }

  .settings-group{
    border-radius: 8px;
  }

  .settings-group-head{
    grid-template-columns: 30px minmax(0, 1fr);
    gap: .65rem;
    min-height: 0;
    padding: .72rem .85rem;
  }

  .settings-group-icon{
    width: 30px;
    height: 30px;
    font-size: .92rem;
  }

  .settings-group-head h5{
    font-size: .82rem;
  }

  .settings-group-head p{
    font-size: .72rem;
  }

  .settings-list-item{
    grid-template-columns: 30px minmax(0, 1fr) 18px;
    gap: .65rem;
    min-height: 74px;
    padding: .72rem .85rem;
  }

  .settings-list-icon{
    width: 30px;
    height: 30px;
    font-size: .9rem;
  }

  .settings-list-copy .fw-semibold{
    font-size: .9rem;
  }

  .settings-list-copy .small{
    font-size: .78rem;
  }

  .settings-list-arrow{
    justify-self:end;
  }
}

.container-page{
  max-width: 100%;
  margin: 0 auto;
}

.container-page .container-header-card{
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 8px;
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  box-shadow: 0 .125rem .25rem rgba(0,0,0,.075);
  margin-bottom: 1rem;
}

.container-page .container-header-card > div:first-child{
  min-width: 0;
}

.container-page .container-header-card h1{
  font-size: 1.35rem;
  font-weight: 700;
}

.container-page .kpi-card{
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 8px;
  padding: 1rem;
  box-shadow: none;
  height: 100%;
}

.container-page .kpi-label{
  color: #6c757d;
  font-size: .78rem;
  font-weight: 600;
}

.container-page .kpi-value{
  margin-top: .15rem;
  font-size: 1.35rem;
  font-weight: 700;
}

.container-labor-access-page{
  font-size: .9rem;
}

.container-labor-access-page .app-page-header{
  padding: .85rem 1rem;
}

.container-labor-access-page .app-page-header h4{
  font-size: 1.25rem;
}

.container-labor-access-page .nav-tabs .nav-link{
  font-size: .9rem;
  padding: .62rem .85rem;
}

.container-labor-access-page .container-page .kpi-card{
  padding: .85rem 1rem;
}

.container-labor-access-page .container-page .kpi-value{
  font-size: 1.25rem;
}

.container-labor-access-page .card-header,
.container-labor-access-page .card-body{
  padding: .85rem 1rem;
}

.container-labor-access-page .fs-5{
  font-size: 1.12rem !important;
}

.container-labor-team-block{
  width: 100%;
  display: block;
  margin: 0 0 1rem;
  padding: .55rem .6rem;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.container-labor-team-block:hover,
.container-labor-team-block:focus-visible{
  border-color: #b6d4fe;
  background: #f3f7ff;
}

.container-labor-team-block.is-active{
  border-color: #86b7fe;
  background: #eef5ff;
  box-shadow: 0 .25rem .75rem rgba(13, 110, 253, .08);
}

.container-labor-team-block:last-child{
  margin-bottom: 0;
}

.container-labor-dashboard-actions{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: .5rem;
}

.container-labor-dashboard-actions > .btn{
  width: var(--app-action-height);
  height: var(--app-action-height);
  min-width: var(--app-action-height);
  min-height: var(--app-action-height);
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--app-action-radius);
}

.container-labor-failure-filter .dropdown-menu{
  min-width: 260px;
}

.container-labor-failure-option{
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: .55rem;
  border-radius: 6px;
  cursor: pointer;
}

.container-labor-failure-option .form-check-input{
  margin: 0;
}

.container-labor-failure-option span:nth-child(2){
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tiempos-page > h6{
  margin: 0;
  padding: 1rem 1rem .35rem;
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  box-shadow: 0 .125rem .25rem rgba(0,0,0,.075);
}

.tiempos-page > h6 + .table-responsive{
  padding: 0 1rem 1rem;
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
  border-top: 0;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 .125rem .25rem rgba(0,0,0,.075);
}

.bom-search{
  width: min(360px, 100%);
}

.bom-context-bar{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .75rem;
}

.bom-version-select-wrap{
  width: min(420px, 100%);
}

.bom-context-meta{
  color: #6c757d;
  font-size: .84rem;
  font-weight: 600;
}

.bom-version-list .list-group-item{
  border-left: 0;
  border-right: 0;
}

.bom-version-list .list-group-item:first-child{
  border-top: 0;
}

.bom-version-list .list-group-item:last-child{
  border-bottom: 0;
}

.bom-page .card-header{
  padding: 1rem 1.25rem;
}

.bom-page .table th,
.bom-page .table td{
  padding: .7rem 1rem;
  vertical-align: middle;
}

.bom-page .table th:first-child,
.bom-page .table td:first-child{
  padding-left: 1.25rem;
}

.bom-page .table th:last-child,
.bom-page .table td:last-child{
  padding-right: 1.25rem;
}

.bom-version-list .list-group-item{
  padding: .9rem 1.25rem;
}

.bom-horizon-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: .75rem;
}

.bom-horizon-card{
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 96px;
  padding: .8rem .9rem;
  border: 1px solid rgba(0,0,0,.10);
  border-radius: 8px;
  background: #fff;
  text-align: left;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.bom-horizon-card:hover,
.bom-horizon-card:focus-visible{
  border-color: rgba(13,110,253,.45);
  box-shadow: 0 .35rem 1rem rgba(13,110,253,.08);
}

.bom-horizon-card.is-active{
  border-color: #0d6efd;
  background: #eef5ff;
  box-shadow: inset 0 0 0 1px #0d6efd;
}

.bom-horizon-card__label{
  color: #495057;
  font-size: .78rem;
  font-weight: 700;
}

.bom-horizon-card__value{
  margin-top: .25rem;
  color: #111827;
  font-size: 1.12rem;
  font-weight: 800;
  line-height: 1.15;
}

.bom-horizon-card__meta{
  margin-top: auto;
  color: #6c757d;
  font-size: .76rem;
}

.bom-horizon-summary{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: .65rem;
}

.bom-horizon-summary > div{
  padding: .65rem .75rem;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 8px;
  background: #fbfcfd;
}

.bom-horizon-summary span{
  display: block;
  color: #6c757d;
  font-size: .74rem;
  font-weight: 700;
}

.bom-horizon-summary strong{
  display: block;
  margin-top: .15rem;
  color: #111827;
  font-size: .98rem;
}

.bom-sale-summary{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: .65rem;
}

.bom-sale-summary > div{
  padding: .65rem .75rem;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 8px;
  background: #fbfcfd;
}

.bom-sale-summary span{
  display: block;
  color: #6c757d;
  font-size: .74rem;
  font-weight: 700;
}

.bom-sale-summary strong{
  display: block;
  margin-top: .15rem;
  color: #111827;
  font-size: 1rem;
}

.bom-projection-list .list-group-item{
  padding: .72rem 1rem;
  border-left: 0;
  border-right: 0;
}

.bom-projection-list .list-group-item:first-child{
  border-top: 0;
}

.bom-projection-list .list-group-item:last-child{
  border-bottom: 0;
}

.bom-projection-saving{
  width: 112px;
  margin: 0 auto;
}

.bom-page .card{
  font-size: .92rem;
}

.bom-page .card-header{
  padding: .8rem 1rem;
}

.bom-page .card-header strong{
  font-size: .98rem;
}

.bom-page .card-header .small{
  font-size: .82rem;
}

.bom-tracking-filters{
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(160px, 1fr) minmax(280px, 2fr);
  gap: .5rem;
}

.bom-status-picker{
  display: flex;
  flex-direction: column;
  gap: .4rem;
  padding: .45rem;
  border: 1px solid #d8dee6;
  border-radius: 6px;
  background: #fff;
}

.bom-status-selected{
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  min-height: 1.45rem;
  align-items: center;
}

.bom-status-chip{
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  border: 1px solid #cfd8e3;
  border-radius: 999px;
  background: #e7f1ff;
  color: #0d6efd;
  padding: .22rem .28rem .22rem .55rem;
  font-size: .8rem;
  line-height: 1.1;
  font-weight: 600;
}

.bom-status-remove{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(13,110,253,.12);
  color: inherit;
  font-size: .6rem;
}

.bom-status-empty{
  color: #64748b;
  font-size: .8rem;
}

.bom-status-pill{
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: .18rem .45rem;
  background: #eef2f7;
  color: #334155;
  font-size: .78rem;
  font-weight: 600;
}

.bom-kanban{
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(210px, 1fr);
  gap: .3rem;
  padding: .3rem;
  overflow-x: auto;
  border-bottom: 1px solid #d8dee6;
  background: #f8fafc;
}

.bom-kanban-column{
  min-height: 220px;
  border: 1px solid #d8dee6;
  border-top-width: 3px;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.bom-kanban-column--candidate{
  border-color: #d8dee6;
  border-top-color: #94a3b8;
}

.bom-kanban-column--analysis{
  border-color: #d8dee6;
  border-top-color: #f2c94c;
}

.bom-kanban-column--validated{
  border-color: #d8dee6;
  border-top-color: #4dabf7;
}

.bom-kanban-column--approved{
  border-color: #d8dee6;
  border-top-color: #4c6ef5;
}

.bom-kanban-column--implemented{
  border-color: #d8dee6;
  border-top-color: #2f9e44;
}

.bom-kanban-column--discarded{
  border-color: #d8dee6;
  border-top-color: #adb5bd;
}

.bom-kanban-column.is-drop-target{
  border-color: rgba(13,110,253,.65);
  box-shadow: inset 0 0 0 2px rgba(13,110,253,.12);
}

.bom-kanban-column__header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding: .5rem .55rem;
  border-bottom: 1px solid #e6ebf1;
  background: #fff;
}

.bom-kanban-column__header strong{
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}

.bom-kanban-column__header span{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  height: 1.25rem;
  border-radius: 999px;
  background: #eef2f7;
  color: #475569;
  font-size: .75rem;
}

.bom-kanban-column__cards{
  display: flex;
  flex-direction: column;
  gap: .4rem;
  padding: .45rem;
}

.bom-kanban-card{
  cursor: grab;
  border: 1px solid #d8dee6;
  border-radius: 7px;
  background: #fff;
  padding: .45rem;
  box-shadow: 0 1px 2px rgba(15,23,42,.06);
}

.bom-kanban-card:hover{
  border-color: #b8c4d2;
  box-shadow: 0 2px 6px rgba(15,23,42,.1);
}

.bom-kanban-card:active{
  cursor: grabbing;
}

.bom-kanban-card__top{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .5rem;
}

.bom-kanban-card__top strong{
  font-size: .78rem;
  line-height: 1.2;
}

.bom-kanban-card__saving{
  flex: 0 0 auto;
  font-size: .78rem;
  font-weight: 700;
  line-height: 1.2;
}

.bom-kanban-card__desc{
  margin-top: .25rem;
  color: #334155;
  font-size: .78rem;
  line-height: 1.2;
}

.bom-kanban-card__meta{
  display: flex;
  flex-wrap: wrap;
  gap: .25rem;
  margin-top: .35rem;
}

.bom-kanban-card__meta span{
  border-radius: 999px;
  background: rgba(241,245,249,.65);
  color: #718096;
  padding: .08rem .3rem;
  font-size: .64rem;
  font-weight: 500;
}

.bom-kanban-empty{
  color: #94a3b8;
  font-size: .82rem;
  padding: .65rem;
  text-align: center;
}

.bom-context-menu{
  position: fixed;
  z-index: 1080;
  min-width: 12rem;
  padding: .3rem;
  border: 1px solid #cfd8e3;
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 .5rem 1.25rem rgba(15,23,42,.18);
}

.bom-context-menu__title{
  padding: .25rem .45rem .35rem;
  border-bottom: 1px solid #edf2f7;
  color: #64748b;
  font-size: .72rem;
  font-weight: 700;
}

.bom-context-menu__item{
  display: flex;
  align-items: center;
  gap: .45rem;
  width: 100%;
  padding: .42rem .45rem;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #111827;
  font-size: .84rem;
  text-align: left;
}

.bom-context-menu__item:hover,
.bom-context-menu__item:focus-visible{
  background: #eef5ff;
  outline: 0;
}

.bom-context-menu__item:disabled{
  color: #94a3b8 !important;
  cursor: not-allowed;
  background: transparent;
}

@media (max-width: 767.98px){
  .bom-tracking-filters{
    grid-template-columns: 1fr;
  }
}

.bom-page .table th,
.bom-page .table td{
  padding: .52rem .85rem;
}

.bom-page .table th:first-child,
.bom-page .table td:first-child{
  padding-left: 1rem;
}

.bom-page .table th:last-child,
.bom-page .table td:last-child{
  padding-right: 1rem;
}

.bom-sort-btn{
  display: inline-flex;
  align-items: center;
  width: 100%;
  gap: .3rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
  text-align: inherit;
  white-space: nowrap;
}

.bom-sort-btn:hover,
.bom-sort-btn:focus-visible,
.bom-sort-btn.is-active{
  color: #0d6efd;
}

.bom-sort-btn:focus-visible{
  outline: 2px solid rgba(13,110,253,.35);
  outline-offset: 2px;
  border-radius: 4px;
}

.bom-sort-icon{
  display: inline-flex;
  width: .9rem;
  justify-content: center;
  color: #6c757d;
  font-size: .76rem;
}

.bom-sort-btn.is-active .bom-sort-icon{
  color: #0d6efd;
}

.bom-scope-filter-row{
  cursor: pointer;
}

.bom-scope-filter-row:hover > *{
  background: #f3f8ff;
}

.bom-scope-filter-row.is-active > *{
  background: #e7f1ff;
}

.bom-scope-excluded > *{
  color: #6c757d;
  background: #f8f9fa;
}

.bom-filter-badge{
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  margin-left: .4rem;
  padding: .12rem .38rem;
  border: 1px solid rgba(13,110,253,.25);
  border-radius: 999px;
  background: #eef5ff;
  color: #0d6efd;
  font-size: .76rem;
  font-weight: 600;
}

.bom-clear-scope-filter{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: .68rem;
  line-height: 1;
}

.bom-table-footer{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding: .45rem .75rem;
}

.bom-page-meta{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  color: #6c757d;
  font-size: .82rem;
}

.bom-page-size{
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  margin: 0;
  color: #6c757d;
  font-size: .82rem;
  white-space: nowrap;
}

.bom-page-size-select{
  width: 3.25rem;
  height: 1.65rem;
  padding: 0 .35rem;
  border: 1px solid #cfd8e3;
  border-radius: 5px;
  background: #fff;
  color: #111827;
  font-size: .82rem;
  line-height: 1.2;
}

.bom-pagination-wrap .pagination{
  gap: .15rem;
}

.bom-pagination-wrap .page-link{
  min-width: 1.8rem;
  height: 1.8rem;
  padding: 0 .45rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  font-size: .82rem;
}

.bom-pagination-wrap .page-item:not(.active) .page-link{
  color: #334155;
  background: #fff;
}

.bom-pagination-wrap .page-item.disabled .page-link{
  color: #94a3b8;
  background: #f8fafc;
}

.bom-element-has-candidate > *{
  background: rgba(25,135,84,.035);
}

.bom-candidate-summary{
  display: grid;
  grid-template-columns: minmax(110px, .7fr) minmax(110px, .7fr) minmax(0, 2fr);
  gap: .75rem;
  align-items: stretch;
  padding: .75rem;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 8px;
  background: #f8fafc;
}

.bom-candidate-summary > div{
  min-width: 0;
}

.bom-candidate-summary-desc{
  align-self: center;
  overflow-wrap: anywhere;
}

@media (max-width: 767.98px){
  .bom-candidate-summary{
    grid-template-columns: 1fr;
  }
}

.teams-access-mobile{
  display: flex;
  flex-direction: column;
  gap: .75rem;
  padding: .75rem;
  background: #f8fafc;
}

.team-access-card{
  padding: .875rem;
  border: 1px solid #dbe3ea;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 .125rem .25rem rgba(15,23,42,.06);
}

.team-access-card-head{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .75rem;
}

.team-access-main{
  min-width: 0;
}

.team-access-title{
  color: #111827;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.team-access-code{
  margin-top: .125rem;
  color: #6c757d;
  font-size: .9rem;
  overflow-wrap: anywhere;
}

.team-access-badge{
  flex: 0 0 auto;
  padding-top: .0625rem;
}

.team-access-meta{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .65rem .75rem;
  margin-top: .875rem;
}

.team-access-meta span,
.team-access-token span{
  display: block;
  color: #64748b;
  font-size: .72rem;
  font-weight: 700;
  line-height: 1.25;
  text-transform: uppercase;
}

.team-access-meta strong,
.team-access-token strong{
  display: block;
  margin-top: .125rem;
  color: #111827;
  font-size: .98rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.team-access-token{
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: .5rem;
  margin-top: .75rem;
  padding-top: .75rem;
  border-top: 1px solid #eef2f7;
}

.team-access-action{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  width: 100%;
  min-height: 42px;
  margin-top: .75rem;
  border-radius: var(--app-action-radius);
  font-weight: 700;
}

.alert-rules-mobile{
  display: flex;
  flex-direction: column;
  gap: .75rem;
  padding: .75rem;
  background: #f8fafc;
}

.alert-rule-card{
  padding: .875rem;
  border: 1px solid #dbe3ea;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 .125rem .25rem rgba(15,23,42,.06);
}

.alert-rule-card-head{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .75rem;
}

.alert-rule-main{
  min-width: 0;
}

.alert-rule-title{
  color: #111827;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.alert-rule-code{
  margin-top: .125rem;
  color: #6c757d;
  font-size: .9rem;
  overflow-wrap: anywhere;
}

.alert-rule-status{
  flex: 0 0 auto;
  padding-top: .0625rem;
}

.alert-rule-section{
  margin-top: .875rem;
  padding-top: .75rem;
  border-top: 1px solid #eef2f7;
}

.alert-rule-section > span{
  display: block;
  margin-bottom: .45rem;
  color: #64748b;
  font-size: .72rem;
  font-weight: 700;
  line-height: 1.25;
  text-transform: uppercase;
}

.alert-rule-emails{
  min-width: 0;
}

.alert-rule-emails .badge{
  max-width: 100%;
  white-space: normal;
  text-align: left;
  overflow-wrap: anywhere;
}

.alert-rule-action{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  width: 100%;
  min-height: 42px;
  margin-top: .75rem;
  border-radius: var(--app-action-radius);
  font-weight: 700;
}

.alert-rule-emails-textarea{
  min-height: 11rem;
  font-size: .95rem;
  line-height: 1.35;
  resize: vertical;
  overflow-wrap: anywhere;
}

.users-mobile-list{
  display:flex;
  flex-direction:column;
  gap:.75rem;
}

.users-toolbar{
  display:grid;
  grid-template-columns:minmax(260px, 1fr) minmax(180px, 240px);
  gap:.75rem;
  align-items:center;
}

.users-search,
.users-role-filter{
  min-width:0;
}

.user-mobile-card{
  padding:.875rem;
  border:1px solid #dbe3ea;
  border-radius:8px;
  background:#fff;
  box-shadow:0 .125rem .25rem rgba(15,23,42,.06);
}

.user-mobile-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:.75rem;
}

.user-mobile-main{
  min-width:0;
}

.user-mobile-name{
  color:#111827;
  font-size:1.05rem;
  font-weight:800;
  line-height:1.2;
  overflow-wrap:anywhere;
}

.user-mobile-email{
  margin-top:.18rem;
  color:#6c757d;
  font-size:.86rem;
  line-height:1.25;
  overflow-wrap:anywhere;
}

.user-mobile-status{
  flex:0 0 auto;
}

.user-mobile-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:.7rem .75rem;
  margin-top:.875rem;
  padding-top:.75rem;
  border-top:1px solid #eef2f7;
}

.user-mobile-field{
  min-width:0;
}

.user-mobile-field span{
  display:block;
  margin-bottom:.25rem;
  color:#64748b;
  font-size:.72rem;
  font-weight:700;
  line-height:1.25;
  text-transform:uppercase;
}

.user-mobile-field strong{
  display:block;
  color:#111827;
  font-size:.92rem;
  line-height:1.28;
  overflow-wrap:anywhere;
}

.user-role-select{
  min-height:38px;
}

.user-mobile-actions .user-actions,
.user-actions{
  display:flex;
  justify-content:flex-end;
  gap:.5rem;
}

.user-mobile-actions{
  margin-top:.875rem;
}

.user-mobile-actions .btn{
  width:42px;
  height:42px;
  min-width:42px;
  padding:0;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:var(--app-action-radius);
}

@media (max-width: 767.98px){
  .container-page .container-header-card{
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    column-gap: .75rem;
    row-gap: .25rem;
    padding: .85rem;
  }

  .container-page .container-header-card > div:first-child{
    min-width: 0;
  }

  .container-page .container-header-actions{
    width: auto;
    flex-wrap: nowrap;
    gap: .4rem;
    justify-content: flex-end;
    overflow-x: auto;
    margin-left: 0;
  }

  .teams-access-mobile{
    padding: .65rem;
  }

  .team-access-meta{
    grid-template-columns: 1fr 1fr;
  }

  #alertas_tabs{
    display: flex;
    flex-wrap: nowrap;
    gap: .25rem;
    overflow-x: auto;
    padding-bottom: 1px;
  }

  #alertas_tabs .nav-link{
    white-space: nowrap;
  }

  .alert-rules-mobile{
    padding: .65rem;
  }

  #alertRuleModal .modal-dialog{
    margin: .75rem;
  }

  #alertRuleModal .modal-header,
  #alertRuleModal .modal-body,
  #alertRuleModal .modal-footer{
    padding: 1rem;
  }

  #alertRuleModal .modal-title{
    font-size: 1.35rem;
    line-height: 1.15;
  }

  .alert-rule-emails-textarea{
    min-height: 9.5rem;
    font-size: .9rem;
    line-height: 1.32;
  }

  #alertRuleModal .form-check-label{
    font-size: 1rem;
    line-height: 1.25;
  }

  .users-mobile-list{
    margin:-.25rem;
    padding:.25rem;
  }

  .users-toolbar{
    grid-template-columns:1fr;
  }

  .user-mobile-grid{
    grid-template-columns:1fr;
  }
}

@media (max-width: 359.98px){
  .team-access-meta{
    grid-template-columns: 1fr;
  }
}

.users-page{
  display:grid;
  gap:1rem;
}

.users-toolbar{
  display:grid;
  grid-template-columns:minmax(240px, 1fr) minmax(150px, 190px) minmax(150px, 190px);
  gap:.75rem;
  align-items:stretch;
  padding:.85rem;
  border:1px solid var(--chef-line);
  border-radius:8px;
  background:#fff;
  box-shadow:0 .125rem .25rem rgba(35,53,36,.06);
}

.users-summary{
  display:flex;
  align-items:center;
  gap:.6rem;
  min-height:32px;
}

.users-table-wrap{
  overflow:hidden;
  border:1px solid var(--chef-line);
  border-radius:8px;
  background:#fff;
  box-shadow:0 .25rem .9rem rgba(35,53,36,.07);
}

.users-table{
  min-width:760px;
  margin-bottom:0;
  table-layout:fixed;
}

.users-table th{
  color:#5f6f5d;
  font-size:.78rem;
  text-transform:uppercase;
  letter-spacing:0;
}

.users-table th:nth-child(1){ width:40%; }
.users-table th:nth-child(2){ width:16%; }
.users-table th:nth-child(3){ width:16%; }
.users-table th:nth-child(4){ width:18%; }
.users-table th:nth-child(5){ width:10%; }

.users-person{
  display:grid;
  gap:.12rem;
  min-width:0;
}

.users-person strong,
.users-person span{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.users-person strong{
  color:#182519;
  font-size:.98rem;
  font-weight:800;
}

.users-person span{
  color:#667085;
  font-size:.84rem;
}

.users-role,
.users-status{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:30px;
  padding:0 .68rem;
  border-radius:999px;
  font-size:.82rem;
  font-weight:800;
  line-height:1;
  white-space:nowrap;
}

.users-role{
  border:1px solid #dae8d0;
  background:#f5f9f1;
  color:#2f552c;
}

.users-role--admin{
  border-color:#f1d49f;
  background:#fff8e8;
  color:#7a4a00;
}

.users-role--viewer{
  border-color:#d8e1ea;
  background:#f6f8fa;
  color:#465665;
}

.users-status.is-active{
  border:1px solid #cfe5c4;
  background:#f0f8ec;
  color:#2f6b2d;
}

.users-status.is-inactive{
  border:1px solid #e3d2d2;
  background:#fbf3f3;
  color:#8a3232;
}

.users-action-col{
  text-align:right;
}

.users-action-col .app-inline-actions{
  justify-content:flex-end;
}

.user-form .modal-header{
  background:#fbfaf5;
  border-bottom-color:var(--chef-line);
}

@media (max-width: 767.98px){
  .users-toolbar{
    grid-template-columns:1fr;
  }

  .users-table{
    min-width:680px;
  }
}

.token-qr-box{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid #dde3ea;
  border-radius: 12px;
  padding: 1rem;
}

.gantt-table-wrap{
  overflow-x: auto;
}

.gantt-table{
  min-width: 1200px;
  width: 100%;
  border-collapse: collapse;
}

.gantt-table th,
.gantt-table td{
  border-bottom: 1px solid #edf0f4;
  padding: .6rem;
  vertical-align: middle;
}

.gantt-table th{
  background: #f8fafc;
  color: #475569;
  font-size: .82rem;
  white-space: nowrap;
}

.gantt-table tbody tr[data-task-id]{
  cursor: pointer;
}

.gantt-task-title{
  font-weight: 700;
}

.gantt-task-meta{
  color: #64748b;
  font-size: .75rem;
}

.task-section{
  background: #eef4fb;
  color: #0B2232;
  font-weight: 800;
}

.gantt-day-cell{
  width: 50px;
  min-width: 42px;
  text-align: center;
  padding: .25rem !important;
}

.gantt-row-days{
  position: relative;
  height: 76px;
  min-width: 420px;
}

.gantt-bar,
.gantt-continuous-bar{
  position: relative;
  height: 26px;
  border: 1px solid #93c5fd;
  border-radius: 999px;
  background: #dbeafe;
  cursor: grab;
  user-select: none;
}

.gantt-continuous-bar{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

.gantt-bar.electrical,
.gantt-continuous-bar.electrical{
  background: #fef3c7;
  border-color: #f59e0b;
}

.gantt-bar.plumbing,
.gantt-continuous-bar.plumbing{
  background: #e0f2fe;
  border-color: #0284c7;
}

.gantt-bar.mechanical,
.gantt-continuous-bar.mechanical{
  background: #dcfce7;
  border-color: #16a34a;
}

.gantt-disabled{
  opacity: .45;
}

.gantt-row-actions{
  white-space: nowrap;
  text-align: center;
}

.task-section-actions{
  background: #eef4fb;
  border-top: 1px solid #dde3ea;
  border-bottom: 1px solid #dde3ea;
}

.gantt-resize-handle{
  position: absolute;
  right: -5px;
  top: 50%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #0f172a;
  transform: translateY(-50%);
  cursor: ew-resize;
}

.gantt-row-days.drag-over{
  background: #f8fafc;
}

.gantt-drop-marker{
  position: absolute;
  top: 6px;
  bottom: 6px;
  width: 3px;
  border-radius: 999px;
  background: #0d6efd;
  pointer-events: none;
  z-index: 5;
}

.dependency-pill{
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  margin-top: .35rem;
  padding: .15rem .45rem;
  border-radius: 999px;
  background: #fff7ed;
  color: #9a3412;
  font-size: .75rem;
  font-weight: 600;
}

.dependency-remove{
  border: 0;
  background: transparent;
  color: inherit;
  line-height: 1;
}

.gantt-continuous-bar.dependency-drop-target{
  outline: 3px dashed #7c3aed;
  outline-offset: 4px;
}

.gantt-dependency-source .gantt-task-title{
  color: #b45309;
}

.gantt-dependency-target .gantt-task-title{
  color: #0d6efd;
}

.gantt-dependency-source .gantt-continuous-bar{
  outline: 2px dashed #f59e0b;
  outline-offset: 3px;
}

.gantt-dependency-target .gantt-continuous-bar{
  outline: 2px dashed #0d6efd;
  outline-offset: 3px;
}

.gantt-order-handle{
  border: 0;
  border-radius: .5rem;
  background: transparent;
  color: #6c757d;
  cursor: grab;
  font-size: 1.25rem;
  padding: .35rem .5rem;
}

.gantt-order-handle:hover{
  background: rgba(13,110,253,.08);
  color: #0d6efd;
}

.gantt-order-dragging{
  opacity: .45;
}

.gantt-order-drop-before{
  box-shadow: inset 0 3px 0 #0d6efd;
}

.gantt-order-drop-after{
  box-shadow: inset 0 -3px 0 #0d6efd;
}

/* =========================
   PEM compact table
   ========================= */
.pem-board-card{
  border-color:#dfe6ee;
  border-radius:8px;
  overflow:hidden;
}

#pem_page .app-page-header{
  margin-bottom:0;
}

.pem-board-card > .card-body{
  padding:1rem 1.25rem 1.15rem;
}

.pem-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1rem;
}

.pem-search{
  position:relative;
  flex:1 1 420px;
  max-width:520px;
}

.pem-search .form-floating{
  width:100%;
}

.pem-search i{
  position:absolute;
  left:.85rem;
  top:1.45rem;
  z-index:2;
  color:#64748b;
}

.pem-search-input{
  min-height:58px;
  padding-left:2.45rem !important;
  padding-right:2.25rem !important;
  border-color:#d8e0ea;
  border-radius:8px;
  box-shadow:none;
}

.pem-search .form-floating > label{
  left:1.95rem;
  color:#64748b;
  padding-left:.5rem;
}

.pem-search .form-floating > .pem-search-input:focus ~ label,
.pem-search .form-floating > .pem-search-input:not(:placeholder-shown) ~ label{
  color:#475569;
}

.pem-search-input:focus{
  border-color:#86b7fe;
  box-shadow:0 0 0 .2rem rgba(13,110,253,.12);
}

.pem-tabs{
  flex-wrap:wrap;
}

.pem-tab i{
  font-size:1rem;
}

.pem-tab-panel{
  display:none;
}

.pem-tab-panel.is-active{
  display:block;
}

.pem-tab-panel:not(#pem_panel_dashboard){
  font-size:90%;
}

.pem-tab-panel:not(#pem_panel_dashboard) .pem-dashboard-card{
  min-height:70px;
  padding:.68rem .76rem;
}

.pem-tab-panel:not(#pem_panel_dashboard) .pem-dashboard-card i{
  width:31px;
  height:31px;
  font-size:.95rem;
}

.pem-tab-panel:not(#pem_panel_dashboard) .pem-dashboard-card strong{
  font-size:1.3rem;
}

.pem-desktop-summary{
  flex-wrap:wrap;
  justify-content:flex-end;
  gap:.45rem;
}

.pem-desktop-summary span,
.pem-mobile-summary span{
  flex:0 0 auto;
  border:1px solid #dbe3ee;
  border-radius:999px;
  background:#f8fafc;
  color:#334155;
  font-size:.8rem;
  font-weight:600;
  line-height:1;
  padding:.45rem .65rem;
}

.pem-dashboard-grid{
  display:grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap:.75rem;
}

.pem-overview-summary{
  display:grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  gap:.75rem;
  align-items:stretch;
}

.pem-dashboard-card{
  display:grid;
  grid-template-columns:auto minmax(0, 1fr);
  grid-template-rows:1rem 1.55rem .85rem;
  column-gap:.65rem;
  row-gap:.04rem;
  align-items:start;
  min-width:0;
  min-height:78px;
  padding:.75rem .85rem;
  border:1px solid #dbe3ee;
  border-radius:8px;
  background:#f8fafc;
  color:#334155;
}

.pem-dashboard-card i{
  grid-row:1 / 3;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  align-self:start;
  width:34px;
  height:34px;
  border-radius:8px;
  background:#e8edf3;
  color:#475569;
  font-size:1rem;
}

.pem-dashboard-card span,
.pem-dashboard-card small{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.pem-dashboard-card span{
  align-self:end;
  color:#64748b;
  font-size:.76rem;
  font-weight:650;
  line-height:1.1;
}

.pem-dashboard-card strong{
  align-self:start;
  color:#0f172a;
  font-size:1.45rem;
  font-weight:700;
  line-height:1.05;
}

.pem-dashboard-card small{
  grid-column:2;
  align-self:start;
  color:#64748b;
  font-size:.72rem;
  line-height:1.1;
}

.pem-dashboard-card.is-warning{
  border-color:rgba(245,159,0,.42);
  background:#fffaf0;
}

.pem-dashboard-card.is-warning i{
  background:#fff3cd;
  color:#9a6700;
}

.pem-overview-refresh{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:42px;
  min-height:78px;
  border:1px solid #dbe3ee;
  border-radius:8px;
  background:#fff;
  color:#475569;
}

.pem-overview-refresh:hover,
.pem-overview-refresh:focus{
  border-color:#b8c7da;
  background:#f8fafc;
  outline:none;
}

.pem-overview-toolbar{
  display:flex;
  align-items:flex-end;
  justify-content:flex-end;
  gap:.75rem;
}

.pem-overview-filter{
  width:min(320px, 100%);
}

.pem-overview-filter:has(.pem-segmented){
  width:auto;
  min-width:310px;
}

.pem-overview-filter .form-label{
  margin-bottom:.25rem;
  color:#64748b;
  font-size:.74rem;
  font-weight:700;
  letter-spacing:0;
  text-transform:uppercase;
}

.pem-segmented{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  min-height:38px;
  padding:3px;
  border:1px solid #d8e0ea;
  border-radius:8px;
  background:#eef3f8;
  box-shadow:inset 0 1px 2px rgba(15,23,42,.04);
}

.pem-segmented button{
  min-width:120px;
  padding:.35rem .75rem;
  border:0;
  border-radius:7px;
  background:transparent;
  color:#64748b;
  font-size:.82rem;
  font-weight:700;
  line-height:1.1;
  transition:background .15s ease, color .15s ease, box-shadow .15s ease;
}

.pem-segmented button:hover,
.pem-segmented button:focus{
  color:#0f172a;
  outline:none;
}

.pem-segmented button.is-active{
  background:#fff;
  color:#0f172a;
  box-shadow:0 1px 3px rgba(15,23,42,.14);
}

.pem-workload-board{
  display:grid;
  width:100%;
  border:1px solid #e3e8ef;
  border-radius:8px;
  background:#fff;
  overflow:hidden;
}

.pem-workload-head,
.pem-workload-row summary{
  display:grid;
  grid-template-columns:minmax(220px, 1.45fr) repeat(6, minmax(92px, .7fr)) minmax(78px, .5fr);
  align-items:center;
  gap:.35rem;
  width:100%;
}

.pem-workload-head{
  padding:.7rem .85rem;
  background:#f8fafc;
  border-bottom:1px solid #d8e0ea;
  color:#475569;
  font-size:.74rem;
  font-weight:800;
  letter-spacing:0;
  text-transform:uppercase;
}

.pem-workload-head span:not(:first-child){
  text-align:center;
}

.pem-workload-row{
  border-bottom:1px solid #edf1f5;
}

.pem-workload-row:last-child{
  border-bottom:0;
}

.pem-workload-row summary{
  cursor:pointer;
  padding:.72rem .85rem;
  list-style:none;
}

.pem-workload-row summary::-webkit-details-marker{
  display:none;
}

.pem-workload-row summary:hover{
  background:#f8fbff;
}

.pem-workload-person{
  display:grid;
  min-width:0;
}

.pem-workload-person strong,
.pem-workload-person small{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.pem-workload-person strong{
  color:#0f172a;
  font-weight:750;
}

.pem-workload-person small{
  color:#64748b;
  font-size:.78rem;
}

.pem-workload-cell,
.pem-workload-total{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:30px;
  border:1px solid #dbe3ee;
  border-radius:8px;
  background:#fff;
  color:#334155;
  font-weight:800;
}

.pem-workload-cell.is-warning{
  border-color:rgba(245,159,0,.38);
  background:#fff7e6;
  color:#7c4a00;
}

.pem-workload-cell.is-critical{
  border-color:rgba(220,53,69,.35);
  background:#fff1f2;
  color:#842029;
}

.pem-workload-cell.is-soon{
  border-color:rgba(13,110,253,.22);
  background:#eff6ff;
  color:#0b5ed7;
}

.pem-workload-total{
  background:#f8fafc;
  color:#0f172a;
}

.pem-workload-detail{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:.65rem;
  padding:.75rem;
  background:#fbfdff;
  border-top:1px solid #edf1f5;
}

.pem-workload-detail-group{
  min-width:0;
  border:1px solid #e3e8ef;
  border-radius:8px;
  background:#fff;
  overflow:hidden;
}

.pem-workload-detail-group h6{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin:0;
  padding:.58rem .7rem;
  background:#f8fafc;
  border-bottom:1px solid #edf1f5;
  color:#475569;
  font-size:.74rem;
  font-weight:800;
  letter-spacing:0;
  text-transform:uppercase;
}

.pem-workload-task-list{
  display:grid;
}

.pem-overview-list,
.pem-pending-overview-sections{
  display:grid;
  gap:.75rem;
}

.pem-pending-overview-sections{
  grid-template-columns:repeat(4, minmax(0, 1fr));
  align-items:start;
}

.pem-pending-overview-sections.is-workload-view{
  grid-template-columns:1fr;
}

.pem-pending-overview-sections.is-container-view{
  grid-template-columns:1fr;
}

.pem-container-pending-card{
  overflow:visible;
}

.pem-container-pending-counts{
  display:flex;
  flex-wrap:wrap;
  justify-content:flex-end;
  gap:.35rem;
}

.pem-container-pending-counts span{
  display:inline-flex;
  align-items:center;
  min-height:24px;
  padding:.18rem .48rem;
  border:1px solid #dbe3ee;
  border-radius:999px;
  background:#fff;
  color:#475569;
  font-size:.74rem;
  font-weight:700;
  white-space:nowrap;
}

.pem-container-pending-grid{
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
}

.pem-container-pending-section{
  min-width:0;
}

.pem-container-pending-section + .pem-container-pending-section{
  border-left:1px solid #edf1f5;
}

.pem-container-pending-section-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:.75rem;
  padding:.7rem .85rem .35rem;
}

.pem-container-pending-section-head h6{
  margin:0;
  color:#475569;
  font-size:.78rem;
  font-weight:700;
  letter-spacing:0;
  text-transform:uppercase;
}

.pem-container-pending-section-head strong{
  color:#0f172a;
  font-size:1.15rem;
  line-height:1;
}

.pem-container-pending-section-body{
  display:grid;
}

.pem-overview-card{
  min-width:0;
  border:1px solid #e3e8ef;
  border-radius:8px;
  background:#fff;
  overflow:hidden;
}

.pem-overview-card-head,
.pem-overview-section-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:.75rem;
  padding:.75rem .85rem;
  border-bottom:1px solid #edf1f5;
  background:#f8fafc;
}

.pem-overview-project{
  color:#0f172a;
  font-weight:700;
  line-height:1.1;
}

.pem-overview-serial{
  margin-top:.15rem;
  color:#64748b;
  font-family:ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size:.78rem;
}

.pem-overview-columns{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
}

.pem-overview-columns section + section{
  border-left:1px solid #edf1f5;
}

.pem-overview-columns h6,
.pem-overview-section-head h5{
  margin:0;
  color:#475569;
  font-size:.78rem;
  font-weight:700;
  letter-spacing:0;
  text-transform:uppercase;
}

.pem-overview-columns h6{
  padding:.7rem .85rem .35rem;
}

.pem-overview-section-head strong{
  color:#0f172a;
  font-size:1.3rem;
  line-height:1;
}

.pem-overview-section-list{
  display:grid;
}

.pem-overview-row{
  display:grid;
  grid-template-columns:auto minmax(0, 1fr);
  gap:.2rem .6rem;
  width:100%;
  padding:.62rem .85rem;
  border:0;
  border-top:1px solid #f0f3f7;
  background:#fff;
  color:#0f172a;
  text-align:left;
}

.pem-overview-row:hover,
.pem-overview-row:focus{
  background:#f8fbff;
  outline:none;
}

.pem-overview-row:focus-visible{
  box-shadow:inset 0 0 0 2px rgba(13,110,253,.22);
}

.pem-overview-state{
  grid-row:1 / 3;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  align-self:start;
  min-width:74px;
  min-height:24px;
  padding:.2rem .42rem;
  border:1px solid #d8e0ea;
  border-radius:999px;
  background:#f8fafc;
  color:#475569;
  font-size:.72rem;
  font-weight:700;
  line-height:1;
}

.pem-overview-state.is-warning{
  border-color:rgba(245,159,0,.38);
  background:#fff7e6;
  color:#7c4a00;
}

.pem-overview-state.is-critical{
  border-color:rgba(220,53,69,.35);
  background:#fff1f2;
  color:#842029;
}

.pem-task-overview-row{
  grid-template-columns:34px minmax(0, 1fr);
  gap:.18rem .55rem;
  padding:.58rem .7rem;
}

.pem-task-overview-icon{
  min-width:0;
  width:30px;
  min-height:24px;
  height:24px;
  padding:0;
  font-size:.74rem;
}

.pem-overview-text{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-weight:650;
}

.pem-overview-row small{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:#64748b;
}

.pem-overview-muted,
.pem-overview-empty{
  padding:.9rem;
  color:#64748b;
  font-size:.86rem;
}

.pem-overview-empty{
  border:1px dashed #d8e0ea;
  border-radius:8px;
  background:#f8fafc;
  text-align:center;
}

.pem-list-wrap{
  border:1px solid #e3e8ef;
  border-radius:8px;
  overflow:visible;
  background:#fff;
}

.pem-compact-table{
  --bs-table-cell-padding-y: .72rem;
  --bs-table-cell-padding-x: .85rem;
  border-collapse:separate;
  border-spacing:0;
  table-layout:fixed;
  width:100%;
}

.pem-col-project{
  width:20%;
}

.pem-col-state{
  width:15%;
}

.pem-col-position{
  width:29%;
}

.pem-col-actions{
  width:6%;
}

@media (max-width: 991.98px){
  .pem-col-fat{
    width:0;
    visibility:collapse;
  }

  .pem-col-project{
    width:24%;
  }

  .pem-col-state{
    width:18%;
  }

  .pem-col-position{
    width:34%;
  }

  .pem-col-actions{
    width:6%;
  }
}

.pem-compact-table thead th{
  padding-top:.72rem;
  padding-bottom:.72rem;
  vertical-align: middle;
  background:#f8fafc;
  border-bottom:1px solid #d8e0ea;
  color:#475569;
  font-size:.76rem;
  font-weight:650;
  letter-spacing:0;
  text-transform:uppercase;
}

.pem-compact-table tbody td{
  vertical-align: middle;
  border-bottom:1px solid #edf1f5;
}

.pem-compact-table tbody tr{
  transition:background .15s ease, box-shadow .15s ease;
}

.pem-compact-table tbody tr:hover{
  background:#fbfdff;
  box-shadow:inset 3px 0 0 #0d6efd;
}

.pem-click-cell{
  cursor:pointer;
}

.pem-click-cell:hover,
.pem-click-cell:focus{
  background:#f8fbff;
  outline:none;
}

.pem-click-cell:focus-visible{
  box-shadow:inset 0 0 0 2px rgba(13,110,253,.28);
}

.pem-project-code{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:96px;
  color:#0f172a;
  font-weight:650;
  line-height:1.1;
}

.pem-serial{
  color:#172033;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size:.9rem;
}

.pem-metric-value{
  color:#0f172a;
  font-weight:650;
  line-height:1.1;
}

.pem-metric-sub{
  margin-top:.32rem;
  color:#64748b;
  font-size:.78rem;
  line-height:1.15;
}

.pem-progress{
  height:7px !important;
  max-width:240px;
  margin:.45rem auto 0 !important;
  border-radius:999px;
  background:#e8edf3;
}

.pem-progress .progress-bar{
  border-radius:999px;
}

.pem-progress.is-empty .progress-bar{
  background:#cbd5e1;
}

.pem-progress.is-progress .progress-bar{
  background:#0d6efd;
}

.pem-progress.is-complete .progress-bar{
  background:#198754;
}

.pem-incident-summary{
  display:inline-grid;
  width:120px;
  max-width:100%;
  gap:.15rem;
  padding:.38rem .55rem;
  border:1px solid #d8e0ea;
  border-radius:8px;
  background:#f8fafc;
  color:#334155;
}

.pem-incident-summary span{
  font-weight:700;
  line-height:1.1;
}

.pem-incident-summary small{
  color:#64748b;
  font-size:.72rem;
  line-height:1.1;
}

.pem-incident-summary.is-warning{
  border-color:rgba(245,159,0,.42);
  background:#fff7e6;
  color:#7c4a00;
}

.pem-incident-summary.is-critical{
  border-color:rgba(220,53,69,.35);
  background:#fff1f2;
  color:#842029;
}

.pem-pending-summary{
  display:inline-grid;
  width:120px;
  max-width:100%;
  gap:.15rem;
  padding:.38rem .55rem;
  border:1px solid #d8e0ea;
  border-radius:8px;
  background:#f8fafc;
  color:#334155;
}

.pem-pending-summary span{
  font-weight:700;
  line-height:1.1;
}

.pem-pending-summary small{
  color:#64748b;
  font-size:.72rem;
  line-height:1.1;
}

.pem-pending-summary.is-warning{
  border-color:rgba(245,159,0,.42);
  background:#fff7e6;
  color:#7c4a00;
}

.pem-pending-form{
  padding:1rem;
  border:1px solid #dbe3ee;
  border-radius:8px;
  background:#f8fafc;
}

.modal-content.pem-pending-form{
  padding:0;
  border:0;
  border-radius:8px;
  background:#fff;
}

.pem-pending-layout{
  display:flex;
  flex-direction:column;
  gap:1rem;
}

.pem-pending-form-grid{
  display:grid;
  grid-template-columns: minmax(150px, .8fr) minmax(230px, 1fr) minmax(260px, 1.5fr) minmax(130px, .7fr);
  gap:.75rem;
  align-items:start;
}

.pem-pending-form-grid .form-label{
  color:#475569;
  font-size:.78rem;
  font-weight:650;
  margin-bottom:.3rem;
}

.pem-pending-task-field textarea{
  min-height:74px;
}

.pem-pending-form-actions{
  display:flex;
  justify-content:flex-end;
  gap:.5rem;
  margin-top:.75rem;
}

.pem-pending-responsible-control{
  display:flex;
  flex-direction:column;
  gap:.5rem;
}

.pem-pending-responsible-control .form-select,
.pem-pending-responsible-control .form-control{
  min-width:0;
  width:100%;
}

.pem-audio-task-box{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:.75rem;
  padding:.75rem;
  border:1px solid #dbe3ee;
  border-radius:8px;
  background:#f8fafc;
}

.pem-audio-task-actions{
  display:flex;
  flex-wrap:wrap;
  gap:.5rem;
  justify-content:flex-end;
}

.pem-audio-task-box.is-recording{
  border-color:rgba(220,53,69,.35);
  background:#fff5f5;
}

#pem_pending_form,
#line_stop_form{
  position:relative;
}

.audio-processing-overlay{
  display:none;
  position:absolute;
  inset:0;
  z-index:20;
  align-items:center;
  justify-content:center;
  padding:1.25rem;
  border-radius:inherit;
  background:rgba(248,250,252,.78);
  backdrop-filter:blur(2px);
}

.modal-content.is-audio-processing .audio-processing-overlay{
  display:flex;
}

.modal-content.is-audio-processing .modal-header,
.modal-content.is-audio-processing .modal-body,
.modal-content.is-audio-processing .modal-footer{
  opacity:.38;
  pointer-events:none;
  user-select:none;
}

.audio-processing-card{
  display:flex;
  align-items:center;
  gap:1rem;
  max-width:420px;
  padding:1.15rem 1.25rem;
  border:1px solid #cfe0ff;
  border-radius:8px;
  background:#fff;
  box-shadow:0 18px 48px rgba(15,23,42,.16);
}

.audio-processing-card strong,
.audio-processing-card span{
  display:block;
}

.audio-processing-card strong{
  color:#0f172a;
}

.audio-processing-card span{
  margin-top:.15rem;
  color:#64748b;
  font-size:.9rem;
  line-height:1.3;
}

#pem_pending_responsible_user_wrap.d-none,
#pem_pending_responsible_external_wrap.d-none{
  display:none !important;
}

.pem-pending-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1rem;
  margin-bottom:.75rem;
}

.pem-pending-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:.5rem;
  flex:0 0 auto;
}

.pem-pending-more-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:34px;
  height:31px;
  padding:0;
}

.pem-pending-more-menu .dropdown-item{
  display:flex;
  align-items:center;
  cursor:pointer;
}

@media (max-width: 575.98px){
  .pem-pending-head{
    align-items:flex-start;
    gap:.75rem;
  }

  .pem-pending-head .fw-semibold{
    line-height:1.25;
  }

  .pem-pending-actions{
    padding-top:.1rem;
  }

  .pem-pending-actions .btn-primary{
    white-space:nowrap;
  }
}

.pem-pending-list{
  display:flex;
  flex-direction:column;
  gap:.4rem;
  overflow:visible;
}

.pem-pending-filters{
  display:grid;
  grid-template-columns:repeat(2, minmax(180px, 240px));
  gap:.75rem;
  align-items:end;
}

.pem-pending-filters .form-label{
  color:#64748b;
  font-size:.75rem;
  font-weight:600;
  margin-bottom:.25rem;
}

.pem-pending-empty{
  padding:2rem 1rem;
  border:1px solid #e3e8ef;
  border-radius:8px;
  background:#fff;
  color:#64748b;
  text-align:center;
}

.pem-check-item{
  display:grid;
  grid-template-columns:64px minmax(0, 1fr) 48px;
  min-height:54px;
  overflow:visible;
  border:1px solid #e3e8ef;
  border-radius:8px;
  background:#fff;
}

.pem-check-item.is-done{
  background:#fbfdff;
}

.pem-check-item.is-overdue{
  border-color:#fecaca;
  background:#fffafa;
}

.pem-check-toggle{
  display:flex;
  align-items:center;
  justify-content:center;
  width:64px;
  min-height:100%;
  padding:0;
  border:0;
  border-right:1px solid #e3e8ef;
  border-radius:7px 0 0 7px;
  background:#f1f5f9;
}

.pem-check-toggle span{
  position:relative;
  display:block;
  width:38px;
  height:22px;
  border:1px solid #cbd5e1;
  border-radius:999px;
  background:#e2e8f0;
  transition:background-color .15s ease, border-color .15s ease;
}

.pem-check-toggle span::before{
  content:"";
  position:absolute;
  left:2px;
  top:2px;
  width:16px;
  height:16px;
  border-radius:999px;
  background:#fff;
  box-shadow:0 1px 2px rgba(15,23,42,.22);
  transition:transform .15s ease;
}

.pem-check-item.is-done .pem-check-toggle{
  background:#e9f7ef;
}

.pem-check-item.is-done .pem-check-toggle span{
  border-color:#198754;
  background:#198754;
}

.pem-check-item.is-done .pem-check-toggle span::before{
  transform:translateX(16px);
}

.pem-check-title{
  display:grid;
  gap:.12rem;
  min-width:0;
  overflow:hidden;
  padding:.5rem .75rem;
  border:0;
  background:transparent;
  text-align:left;
}

.pem-check-owner{
  display:flex;
  align-items:center;
  justify-content:center;
  border-left:1px solid #e3e8ef;
  border-radius:0 7px 7px 0;
  background:#fff;
}

.pem-check-icon-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:34px;
  height:34px;
  padding:0;
  border:1px solid transparent;
  border-radius:8px;
  background:transparent;
  color:#64748b;
}

.pem-check-icon-btn:hover,
.pem-check-icon-btn:focus-visible,
.pem-check-owner .dropdown.show .pem-check-icon-btn{
  border-color:#d8e0ea;
  background:#f8fafc;
  color:#0f172a;
}

.pem-check-owner-menu{
  max-height:280px;
  overflow:auto;
  z-index:1100;
}

.pem-check-title:hover .pem-check-task,
.pem-check-title:focus-visible .pem-check-task{
  color:#0d6efd;
}

.pem-check-task{
  position:relative;
  display:block;
  width:100%;
  max-width:100%;
  min-width:0;
  overflow:hidden;
  color:#0f172a;
  font-weight:500;
  line-height:1.25;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.pem-check-meta{
  min-width:0;
  overflow:hidden;
  color:#64748b;
  font-size:.75rem;
  line-height:1.2;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.pem-check-due{
  display:inline-flex;
  align-items:center;
  gap:.25rem;
  width:max-content;
  max-width:100%;
  margin-top:.1rem;
  padding:.12rem .42rem;
  border-radius:999px;
  background:#eef6ff;
  color:#1d4ed8;
  font-size:.72rem;
  font-weight:650;
  line-height:1.2;
}

.pem-check-due.is-overdue{
  background:#fee2e2;
  color:#b91c1c;
}

.pem-check-item.is-done .pem-check-task{
  color:#64748b;
  text-decoration-line:line-through;
  text-decoration-color:rgba(100,116,139,.45);
  text-decoration-thickness:1px;
  text-decoration-skip-ink:auto;
}

.pem-pending-item{
  display:grid;
  grid-template-columns:minmax(0, 1fr) auto;
  gap:1rem;
  align-items:center;
  padding:.85rem 1rem;
  border:1px solid #e3e8ef;
  border-radius:8px;
  background:#fff;
}

.pem-pending-item.is-done{
  color:#64748b;
  background:#fbfdff;
}

.pem-pending-item.is-done .pem-pending-task{
  text-decoration:line-through;
}

.pem-pending-main{
  min-width:0;
}

.pem-pending-state{
  display:flex;
  align-items:center;
  gap:.55rem;
}

.pem-pending-tags{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:.35rem;
  margin-bottom:.35rem;
}

.pem-pending-tags span,
.pem-pending-tags small{
  display:inline-flex;
  align-items:center;
  max-width:260px;
  min-height:24px;
  padding:.18rem .45rem;
  border:1px solid #dbe3ee;
  border-radius:999px;
  background:#f8fafc;
  color:#475569;
  font-size:.72rem;
  font-weight:650;
  line-height:1;
}

.pem-pending-tags small{
  color:#64748b;
  font-weight:500;
}

.pem-pending-area,
.pem-pending-responsible{
  color:#172033;
  font-weight:650;
  line-height:1.2;
}

.pem-pending-task{
  color:#0f172a;
  white-space:pre-wrap;
  line-height:1.3;
}

.pem-pending-meta{
  margin-top:.22rem;
  color:#64748b;
  font-size:.74rem;
  line-height:1.1;
}

.pem-position-stack{
  display:grid;
  gap:.45rem;
  width:100%;
  max-width:520px;
  min-width:240px;
  margin:0 auto;
}

.pem-position-line{
  display:grid;
  grid-template-columns:56px 52px minmax(90px, 1fr);
  gap:.45rem;
  align-items:center;
}

.pem-position-line span{
  color:#64748b;
  font-size:.72rem;
  font-weight:650;
  line-height:1;
  text-align:left;
}

.pem-position-line strong{
  color:#0f172a;
  font-size:.82rem;
  font-weight:700;
  line-height:1;
  text-align:right;
}

.pem-position-line .pem-progress{
  width:100%;
  max-width:none;
  margin:0 !important;
}

.pem-user{
  color:#172033;
  font-weight:600;
  line-height:1.2;
}

.pem-date{
  margin-top:.2rem;
  color:#64748b;
  font-size:.78rem;
  line-height:1.2;
}

.pem-compact-table .btn-sm{
  --bs-btn-padding-y: .18rem;
  --bs-btn-padding-x: .38rem;
  --bs-btn-font-size: .82rem;
  min-width: 34px;
  min-height: 30px;
}

.pem-actions-btn{
  width:38px;
  height:38px;
  min-width:38px;
  min-height:38px;
  border-color:#cbd5e1;
  border-radius:8px;
  background:#fff;
  color:#475569;
}

.pem-actions-btn:hover,
.pem-actions-btn.show{
  border-color:#0d6efd;
  background:#eef5ff;
  color:#0d6efd;
}

.pem-actions-cell .dropdown-menu{
  min-width:12rem;
  padding:.3rem;
  border:1px solid #cfd8e3;
  border-radius:7px;
  box-shadow:0 .5rem 1.25rem rgba(15,23,42,.18);
}

.pem-actions-cell .dropdown-item{
  display:flex;
  align-items:center;
  gap:.45rem;
  padding:.42rem .45rem;
  border-radius:5px;
  color:#111827;
  font-size:.84rem;
  font-weight:400;
}

.pem-actions-cell .dropdown-item i{
  color:#0d6efd;
  width:1rem;
}

.js-pem-slot,
.js-pem-pdmu{
  position:relative;
}

.pem-chiller-card{
  background:#f8fbff;
}

#pem_chiller_grid{
  padding-bottom:.85rem;
  border-bottom:1px solid #edf1f5;
}

.pem-chiller-element{
  width:100%;
  min-height:74px;
  padding:.55rem .65rem;
  border:1px solid #cfd8e3;
  border-radius:7px;
  text-align:left;
  color:#334155;
  background:#fff;
  cursor:pointer;
  transition:border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.pem-chiller-element.is-linked{
  border-color:#0dcaf0;
  background:#eafcff;
  color:#0f3f4a;
}

.pem-chiller-element:hover,
.pem-chiller-element:focus{
  border-color:#0d6efd;
  box-shadow:0 0 0 .15rem rgba(13,110,253,.12);
  outline:0;
}

.pem-chiller-element i{
  color:#0dcaf0;
}

.pem-chiller-source{
  margin-top:.35rem;
  color:#64748b;
  font-size:.72rem;
}

.js-pem-slot.pem-incident-ok,
.js-pem-pdmu.pem-incident-ok{
  --bs-btn-bg:#198754;
  --bs-btn-border-color:#198754;
  --bs-btn-hover-bg:#157347;
  --bs-btn-hover-border-color:#146c43;
}

.js-pem-slot.pem-incident-warning,
.js-pem-pdmu.pem-incident-warning{
  --bs-btn-bg:#f59f00;
  --bs-btn-border-color:#f59f00;
  --bs-btn-hover-bg:#e67700;
  --bs-btn-hover-border-color:#e67700;
  color:#1f2937;
}

.js-pem-slot.pem-incident-critical,
.js-pem-pdmu.pem-incident-critical{
  --bs-btn-bg:#dc3545;
  --bs-btn-border-color:#dc3545;
  --bs-btn-hover-bg:#bb2d3b;
  --bs-btn-hover-border-color:#b02a37;
}

.pem-incident-dot{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:18px;
  height:18px;
  border-radius:999px;
  background:rgba(255,255,255,.22);
  color:inherit;
  font-size:.82rem;
  line-height:1;
}

.pem-incident-context-backdrop{
  position:fixed;
  z-index:1080;
  inset:0;
  background:rgba(15,23,42,.38);
}

.pem-nested-modal-backdrop{
  position:fixed;
  z-index:1060;
  inset:0;
  background:rgba(15,23,42,.38);
}

.pem-incident-menu{
  position:fixed;
  z-index:1085;
  left:50%;
  top:50%;
  transform:translate(-50%, -50%);
  width:min(1420px, calc(100vw - 72px));
  max-height:calc(100vh - 64px);
  padding:0;
  overflow:hidden;
  border:1px solid #d8e0ea;
  border-radius:8px;
  background:#fff;
  box-shadow:0 .75rem 2rem rgba(15,23,42,.24);
}

.pem-nested-modal{
  z-index:1065;
}

.pem-action-menu{
  position:fixed;
  z-index:1080;
  width:min(300px, calc(100vw - 24px));
  min-width:12rem;
  padding:.3rem;
  border:1px solid #cfd8e3;
  border-radius:7px;
  background:#fff;
  box-shadow:0 .5rem 1.25rem rgba(15,23,42,.18);
}

.pem-action-menu-title{
  display:grid;
  gap:.08rem;
  padding:.25rem .45rem .35rem;
  border-bottom:1px solid #edf2f7;
}

.pem-action-menu-title span{
  color:#64748b;
  font-size:.72rem;
  font-weight:700;
}

.pem-action-menu-title strong{
  color:#111827;
  font-family:ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size:.8rem;
  font-weight:600;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.pem-action-menu-item{
  display:flex;
  align-items:center;
  gap:.45rem;
  width:100%;
  margin:0;
  padding:.42rem .45rem;
  border:0;
  border-radius:5px;
  background:transparent;
  color:#111827;
  font-size:.84rem;
  font-weight:400;
  text-align:left;
}

.pem-action-menu-item:hover,
.pem-action-menu-item:focus{
  background:#eef5ff;
  color:#0d6efd;
  outline:0;
}

.pem-action-menu-item i{
  color:#0d6efd;
  width:1rem;
  font-size:1rem;
  text-align:center;
}

.pem-incident-form{
  display:flex;
  flex-direction:column;
  max-height:calc(100vh - 66px);
  min-height:560px;
}

.pem-incident-modal-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:1rem;
  padding:1.25rem 1.25rem 1rem;
  border-bottom:1px solid #d8e0ea;
}

.pem-incident-modal-header h5{
  color:#1f2937;
  font-size:1.35rem;
  font-weight:600;
}

.pem-incident-modal-body{
  display:grid;
  grid-template-columns:minmax(360px, .72fr) minmax(420px, 1fr);
  gap:1.25rem;
  min-height:0;
  padding:1.25rem;
  overflow:auto;
}

.pem-incident-editor{
  display:flex;
  flex-direction:column;
  gap:.95rem;
  min-width:0;
  align-self:start;
  padding:.85rem;
  border:1px solid #e2e8f0;
  border-radius:8px;
  background:#fff;
}

.pem-incident-form-title{
  display:grid;
  gap:.12rem;
}

.pem-incident-form-title span{
  color:#475569;
  font-size:.78rem;
  font-weight:650;
}

.pem-incident-form-title strong{
  color:#111827;
  font-family:ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size:.88rem;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.pem-incident-form-title small{
  color:#64748b;
  font-size:.76rem;
  line-height:1.2;
}

.pem-incident-levels{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:.45rem;
}

.pem-incident-level{
  cursor:pointer;
}

.pem-incident-level input{
  position:absolute;
  opacity:0;
  pointer-events:none;
}

.pem-incident-level span{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:42px;
  padding:.45rem .55rem;
  border:1px solid #d8e0ea;
  border-radius:7px;
  background:#f8fafc;
  color:#334155;
  font-size:.86rem;
  font-weight:650;
  text-align:center;
}

.pem-incident-level input:checked + span{
  color:#fff;
}

.pem-incident-level.is-ok input:checked + span{
  border-color:#198754;
  background:#198754;
}

.pem-incident-level.is-warning input:checked + span{
  border-color:#f59f00;
  background:#f59f00;
  color:#1f2937;
}

.pem-incident-level.is-critical input:checked + span{
  border-color:#dc3545;
  background:#dc3545;
}

.pem-incident-text{
  width:100%;
  min-height:152px;
  padding:.45rem .55rem;
  border:1px solid #ced4da;
  border-radius:7px;
  resize:vertical;
  font-size:.875rem;
}

.pem-incident-text:focus{
  border-color:#86b7fe;
  outline:0;
  box-shadow:0 0 0 .2rem rgba(13,110,253,.12);
}

.pem-incident-photo{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:.45rem .65rem;
}

.pem-incident-photo-label{
  display:inline-flex;
  align-items:center;
  gap:.4rem;
  min-height:34px;
  margin:0;
  padding:.35rem .65rem;
  border:1px solid #d8e0ea;
  border-radius:7px;
  background:#f8fafc;
  color:#334155;
  font-size:.82rem;
  font-weight:600;
  cursor:pointer;
}

.pem-incident-photo-label:hover{
  border-color:#86b7fe;
  background:#eef5ff;
  color:#0d6efd;
}

.pem-incident-photo-label input{
  position:absolute;
  width:1px;
  height:1px;
  opacity:0;
  pointer-events:none;
}

.pem-incident-photo-help{
  color:#64748b;
  font-size:.76rem;
}

.pem-incident-current-photo{
  font-size:.78rem;
  font-weight:600;
  text-decoration:none;
}

.pem-incident-actions{
  display:flex;
  justify-content:flex-end;
  gap:.45rem;
}

.pem-incident-modal-footer{
  display:flex;
  justify-content:space-between;
  gap:1rem;
  padding:1rem 1.25rem;
  border-top:1px solid #d8e0ea;
  background:#fff;
}

.pem-incident-history{
  min-width:0;
}

.pem-incident-history-title{
  color:#475569;
  font-size:.78rem;
  font-weight:650;
  margin-bottom:.55rem;
}

.pem-incident-history-list{
  display:flex;
  flex-direction:column;
  gap:.65rem;
  max-height:calc(100vh - 260px);
  overflow:auto;
  padding-right:.2rem;
}

.pem-container-incident-form{
  padding:.85rem;
  border:1px solid #e2e8f0;
  border-radius:8px;
  background:#fff;
}

.pem-container-incident-history{
  display:flex;
  flex-direction:column;
  gap:.65rem;
  max-height:30vh;
  overflow:auto;
  padding-right:.25rem;
}

.pem-container-incident-elements{
  display:flex;
  flex-direction:column;
  gap:.55rem;
  max-height:28vh;
  overflow:auto;
  padding-right:.25rem;
}

.pem-container-incident-element{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:.75rem;
  width:100%;
  padding:.6rem .75rem;
  border:1px solid #e2e8f0;
  border-left-width:4px;
  border-radius:8px;
  background:#fff;
  color:#1f2937;
  text-align:left;
}

.pem-container-incident-element:hover,
.pem-container-incident-element:focus{
  border-color:#86b7fe;
  border-left-color:#0d6efd;
  outline:0;
  box-shadow:0 0 0 .16rem rgba(13,110,253,.1);
}

.pem-container-incident-element.pem-incident-ok{
  border-left-color:#198754;
}

.pem-container-incident-element.pem-incident-warning{
  border-left-color:#f59f00;
}

.pem-container-incident-element.pem-incident-critical{
  border-left-color:#dc3545;
}

.pem-container-incident-element span{
  display:grid;
  gap:.1rem;
  min-width:0;
}

.pem-container-incident-element span:last-child{
  flex:0 0 auto;
  text-align:right;
}

.pem-container-incident-element strong{
  font-size:.86rem;
  font-weight:650;
}

.pem-container-incident-element small{
  color:#64748b;
  font-size:.76rem;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.pem-incident-history-item{
  position:relative;
  padding:.55rem .65rem .55rem .8rem;
  border:1px solid #e2e8f0;
  border-left-width:4px;
  border-radius:8px;
  background:#fff;
}

.pem-incident-history-item.pem-incident-ok{
  border-left-color:#198754;
}

.pem-incident-history-item.pem-incident-warning{
  border-left-color:#f59f00;
}

.pem-incident-history-item.pem-incident-critical{
  border-left-color:#dc3545;
}

.pem-incident-history-head{
  display:flex;
  justify-content:space-between;
  gap:.55rem;
  align-items:baseline;
}

.pem-incident-history-head-end{
  display:inline-flex;
  flex:0 0 auto;
  align-items:center;
  gap:.45rem;
}

.pem-incident-history-actions{
  display:inline-flex;
  align-items:center;
  gap:.25rem;
}

.pem-incident-history-actions .btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:1.75rem;
  height:1.75rem;
  padding:0;
  border-radius:6px;
}

.pem-incident-history-head span{
  min-width:0;
  color:#111827;
  font-size:.84rem;
  font-weight:600;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.pem-incident-history-head small{
  flex:0 0 auto;
  color:#64748b;
  font-size:.72rem;
}

.pem-incident-history-source{
  margin-top:.2rem;
  color:#475569;
  font-family:ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size:.75rem;
  overflow-wrap:anywhere;
}

.pem-incident-history-meta{
  display:flex;
  flex-wrap:wrap;
  gap:.35rem;
  align-items:center;
  margin-top:.2rem;
  color:#64748b;
  font-size:.76rem;
}

.pem-incident-history-meta strong{
  color:#334155;
  font-weight:600;
}

.pem-incident-history-notes{
  margin-top:.35rem;
  color:#1f2937;
  font-size:.82rem;
  line-height:1.3;
  overflow-wrap:anywhere;
}

.pem-incident-history-photo{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin-top:.5rem;
  padding:.25rem;
  border-radius:7px;
  background:#f8fafc;
  border:1px solid #e2e8f0;
  overflow:hidden;
}

.pem-incident-history-photo img{
  display:block;
  width:120px;
  height:82px;
  object-fit:cover;
  border-radius:5px;
}

.pem-incident-history-empty{
  padding:.9rem;
  border:1px dashed #cbd5e1;
  border-radius:8px;
  color:#64748b;
  font-size:.84rem;
  text-align:center;
}

.pem-mobile-summary{
  display:flex;
  align-items:center;
  gap:.45rem;
  overflow-x:auto;
  padding-bottom:.1rem;
}

.pem-status-chip{
  display:inline-flex;
  align-items:center;
  border-radius:999px;
  font-size:.74rem;
  font-weight:600;
  line-height:1;
  padding:.3rem .5rem;
  margin-top:.45rem;
}

.pem-incident-summary-chip{
  display:inline-flex;
  align-items:center;
  border-radius:999px;
  font-size:.74rem;
  font-weight:600;
  line-height:1;
  padding:.3rem .5rem;
  margin-top:.35rem;
  color:#334155;
  background:#f1f3f5;
}

.pem-incident-summary-chip.is-warning{
  color:#7c4a00;
  background:#fff3cd;
}

.pem-incident-summary-chip.is-critical{
  color:#842029;
  background:#f8d7da;
}

@media (min-width: 768px){
  .pem-status-chip{
    display:none;
  }
}

.pem-mobile-item.is-pending .pem-status-chip{
  color:#495057;
  background:#f1f3f5;
}

.pem-mobile-item.is-progress .pem-status-chip{
  color:#084298;
  background:#cfe2ff;
}

.pem-mobile-item.is-complete .pem-status-chip{
  color:#0f5132;
  background:#d1e7dd;
}

.pem-detail-tabs{
  flex-wrap:wrap;
}

.pem-detail-tab-content > .tab-pane{
  width:100%;
}

.pem-fat-dialog{
  max-width:100vw;
}

.pem-nested-modal.show{
  z-index:1070;
}

.modal-backdrop.pem-nested-backdrop{
  z-index:1060;
}

.pem-fat-summary{
  display:grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap:.75rem;
}

.pem-fat-summary-item{
  min-width:0;
  padding:.65rem .75rem;
  border:1px solid rgba(0,0,0,.08);
  border-radius:8px;
  background:#f8f9fa;
}

.pem-fat-summary-item span,
.pem-fat-summary-item strong{
  display:block;
}

.pem-fat-summary-item span{
  color:#6c757d;
  font-size:.76rem;
  font-weight:600;
  letter-spacing:0;
}

.pem-fat-summary-item strong{
  margin-top:.15rem;
  color:#111827;
  font-size:1.12rem;
  font-weight:650;
  line-height:1.1;
}

.pem-fat-summary-item.is-danger{
  border-color:rgba(220,53,69,.28);
  background:#fff5f5;
}

.pem-fat-list{
  display:flex;
  flex-direction:column;
  gap:.8rem;
}

.pem-fat-tabs-wrap{
  display:grid;
  grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
  gap:1rem;
  align-items:start;
}

.pem-fat-tabs{
  position:sticky;
  top:0;
  display:flex;
  flex-direction:column;
  gap:.35rem;
  max-height:calc(100dvh - 270px);
  overflow-x:hidden;
  overflow-y:auto;
  padding:.35rem;
  border:1px solid #dbe3ee;
  border-radius:8px;
  background:#f8fafc;
}

.pem-fat-tabs .nav-link{
  display:grid;
  grid-template-columns:minmax(0, 1fr) auto;
  align-items:center;
  gap:.6rem;
  width:100%;
  min-width:0;
  min-height:42px;
  padding:.5rem .6rem;
  border:1px solid transparent;
  border-radius:6px;
  color:#334155;
  text-align:left;
}

.pem-fat-tabs .nav-link span{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:.86rem;
}

.pem-fat-tabs .nav-link strong{
  min-width:44px;
  padding:.18rem .4rem;
  border-radius:999px;
  background:#e8edf3;
  color:#475569;
  font-size:.76rem;
  font-weight:650;
  text-align:center;
}

.pem-fat-tabs .nav-link.active{
  border-color:#86b7fe;
  background:#fff;
  color:#0d3f8a;
  box-shadow:0 .35rem .9rem rgba(15,23,42,.08);
}

.pem-fat-tabs .nav-link.active strong{
  background:#0d6efd;
  color:#fff;
}

.pem-fat-tabs .nav-link.is-complete strong{
  background:#d1e7dd;
  color:#0f5132;
}

.pem-fat-tabs .nav-link.is-complete.active strong{
  background:#198754;
  color:#fff;
}

.pem-fat-tabs .nav-link.is-progress strong{
  background:#cfe2ff;
  color:#084298;
}

.pem-fat-tab-content{
  min-width:0;
}

.pem-fat-accordion .accordion-button{
  display:flex;
  justify-content:space-between;
  gap:.75rem;
  padding:.65rem .85rem;
  color:#343a40;
  font-size:.86rem;
  font-weight:650;
  letter-spacing:0;
}

.pem-fat-accordion .accordion-button small{
  margin-right:1.5rem;
  color:#64748b;
  font-size:.78rem;
  font-weight:500;
  white-space:nowrap;
}

.pem-fat-accordion-body{
  padding:0;
}

.pem-fat-group{
  border:1px solid rgba(0,0,0,.08);
  border-radius:8px;
  overflow:hidden;
  background:#fff;
}

.pem-fat-group-title{
  display:flex;
  flex-wrap:wrap;
  justify-content:space-between;
  gap:.5rem;
  padding:.55rem .75rem;
  background:#f8f9fa;
  color:#343a40;
  font-size:.82rem;
  font-weight:650;
  letter-spacing:0;
}

.pem-fat-group-title small{
  color:#64748b;
  font-size:.78rem;
  font-weight:500;
}

.pem-fat-item{
  display:grid;
  grid-template-columns:minmax(320px, 1fr) minmax(460px, 1.15fr);
  gap:.8rem;
  align-items:center;
  padding:.75rem;
  border-top:1px solid rgba(0,0,0,.08);
}

.pem-fat-main,
.pem-fat-controls{
  min-width:0;
}

.pem-fat-title{
  margin-top:.35rem;
  color:#111827;
  font-weight:600;
  line-height:1.25;
}

.pem-fat-meta{
  margin-top:.2rem;
  color:#6c757d;
  font-size:.8rem;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.pem-fat-controls{
  display:grid;
  grid-template-columns: 150px 34px 34px 34px 34px;
  gap:.45rem;
  align-items:center;
  justify-content:end;
}

.pem-fat-status{
  width:100%;
  border:1px solid #ced4da;
  border-radius:6px;
  background:#fff;
  color:#212529;
  font-size:.875rem;
  line-height:1.4;
}

.pem-fat-status{
  min-height:34px;
  padding:.25rem 1.8rem .25rem .5rem;
}

.pem-fat-file-btn,
.pem-fat-chat-btn,
.pem-fat-save,
.pem-fat-no-evidence{
  width:34px;
  height:34px;
  min-width:34px;
  min-height:34px;
  padding:0;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:8px;
}

.pem-fat-chat-btn,
.pem-fat-gallery-btn,
.pem-fat-save{
  position:relative;
}

.pem-fat-chat-badge{
  position:absolute;
  top:-.45rem;
  right:-.45rem;
  min-width:1.05rem;
  height:1.05rem;
  padding:0 .22rem;
  border-radius:999px;
  background:#0d6efd;
  color:#fff;
  font-size:.62rem;
  font-weight:700;
  line-height:1.05rem;
  text-align:center;
}

.pem-fat-no-evidence{
  border:1px solid #dee2e6;
  color:#adb5bd;
  background:#f8f9fa;
}

.pem-fat-thread-list{
  display:flex;
  flex-direction:column;
  gap:.35rem;
  max-height:min(52vh, 520px);
  overflow-y:auto;
  padding:.85rem;
  border:1px solid #e5e7eb;
  border-radius:8px;
  background:#f1f5f9;
}

.pem-fat-thread-empty{
  padding:1rem;
  border:1px dashed #ced4da;
  border-radius:8px;
  color:#6c757d;
  text-align:center;
}

.pem-fat-thread-row{
  display:flex;
  justify-content:flex-start;
}

.pem-fat-thread-row.is-own{
  justify-content:flex-end;
}

.pem-fat-thread-bubble{
  max-width:min(78%, 620px);
  padding:.48rem .65rem .34rem;
  border:1px solid #bfdbfe;
  border-radius:8px 8px 2px 8px;
  background:#dbeafe;
  color:#111827;
  box-shadow:0 1px 1px rgba(15,23,42,.04);
}

.pem-fat-thread-meta{
  margin-top:.2rem;
  color:#64748b;
  font-size:.68rem;
  font-weight:500;
  text-align:right;
}

.pem-fat-thread-message{
  color:#111827;
  line-height:1.35;
  white-space:pre-wrap;
}

.pem-fat-thread-file{
  display:grid;
  grid-template-columns:38px minmax(0, 1fr);
  gap:.55rem;
  align-items:center;
  color:#111827;
  text-decoration:none;
}

.pem-fat-thread-file:hover{
  color:#0d6efd;
}

.pem-fat-thread-file img,
.pem-fat-thread-file > i{
  width:38px;
  height:38px;
  border:1px solid rgba(15,23,42,.12);
  border-radius:6px;
  background:#f8fafc;
}

.pem-fat-thread-file img{
  object-fit:cover;
}

.pem-fat-thread-file > i{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color:#64748b;
  font-size:1.25rem;
}

.pem-fat-thread-file strong,
.pem-fat-thread-file small{
  display:block;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.pem-fat-thread-file small{
  color:#6c757d;
  font-size:.76rem;
}

.pem-fat-thread-form{
  padding-top:.35rem;
}

.pem-fat-photos-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(150px, 1fr));
  gap:.75rem;
}

.pem-fat-photo-thumb{
  display:block;
  min-width:0;
  padding:.45rem;
  border:1px solid #dee2e6;
  border-radius:8px;
  background:#fff;
  color:#111827;
  text-decoration:none;
}

.pem-fat-photo-thumb:hover{
  border-color:#86b7fe;
  color:#0d6efd;
  box-shadow:0 .35rem .9rem rgba(15,23,42,.08);
}

.pem-fat-photo-thumb img{
  width:100%;
  aspect-ratio:4 / 3;
  border-radius:6px;
  background:#f8f9fa;
  object-fit:cover;
}

.pem-fat-photo-thumb span{
  display:block;
  min-width:0;
  margin-top:.4rem;
  overflow:hidden;
  color:inherit;
  font-size:.78rem;
  font-weight:600;
  text-overflow:ellipsis;
  white-space:nowrap;
}

@media (max-width: 767.98px){
  #pem_page > .row{
    --bs-gutter-y: .85rem;
  }

  #pem_page .card{
    border-radius: .65rem;
  }

  #pem_page .card-body{
    padding: 1rem;
  }

  #pem_page h4{
    font-size: 1.28rem;
  }

  #pem_page .card-body > div:first-child .text-muted{
    font-size: .95rem;
    line-height: 1.35;
  }

  #pem_page #pem_filter_text{
    min-height: 44px;
    font-size: .95rem;
  }

  .pem-board-card > .card-body{
    padding:1rem;
  }

  .pem-toolbar{
    display:block;
  }

  .pem-search{
    max-width:none;
  }

  .pem-dashboard-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap:.55rem;
  }

  .pem-overview-summary{
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap:.55rem;
  }

  .pem-overview-refresh{
    width:100%;
    min-height:42px;
  }

  .pem-overview-toolbar{
    justify-content:stretch;
    flex-direction:column;
  }

  .pem-overview-filter{
    width:100%;
  }

  .pem-overview-filter:has(.pem-segmented){
    width:100%;
    min-width:0;
  }

  .pem-segmented{
    grid-template-columns:1fr;
    width:100%;
  }

  .pem-workload-board{
    overflow-x:auto;
  }

  .pem-workload-head,
  .pem-workload-row summary{
    min-width:820px;
  }

  .pem-workload-detail{
    grid-template-columns:1fr;
  }

  .pem-pending-overview-sections,
  .pem-overview-columns,
  .pem-container-pending-grid{
    grid-template-columns:1fr;
  }

  .pem-overview-columns section + section,
  .pem-container-pending-section + .pem-container-pending-section{
    border-left:0;
    border-top:1px solid #edf1f5;
  }

  .pem-overview-card-head{
    align-items:flex-start;
  }

  .pem-overview-row:not(.pem-task-overview-row){
    grid-template-columns:1fr;
  }

  .pem-overview-state:not(.pem-task-overview-icon){
    grid-row:auto;
    justify-self:start;
  }

  .pem-dashboard-card{
    min-height:70px;
    padding:.65rem;
  }

  .pem-dashboard-card strong{
    font-size:1.25rem;
  }

  .pem-list-wrap{
    overflow: visible;
    border:0;
    background:transparent;
  }

  .pem-compact-table{
    display:block;
    border-collapse: separate;
    border-spacing:0;
  }

  .pem-compact-table thead{
    display:none;
  }

  .pem-compact-table tbody{
    display:flex;
    flex-direction:column;
    gap:.72rem;
  }

  .pem-compact-table tbody tr.pem-mobile-item{
    display:grid;
    grid-template-columns:minmax(0, 1fr) 46px;
    grid-template-areas:
      "project actions"
      "progress progress";
    align-items:start;
    border:1px solid rgba(0,0,0,.08);
    border-radius:.65rem;
    background:#fff;
    box-shadow:0 .12rem .45rem rgba(15,23,42,.07);
    padding:.78rem .82rem;
    --bs-table-bg: #fff;
    --bs-table-hover-bg: transparent;
    --bs-table-accent-bg: transparent;
    --bs-table-bg-state: transparent;
  }

  .pem-compact-table tbody tr.pem-mobile-item:hover{
    box-shadow:0 .12rem .45rem rgba(15,23,42,.07);
  }

  .pem-compact-table tbody tr.pem-mobile-item:hover,
  .pem-compact-table tbody tr.pem-mobile-item:focus-within{
    background:#fff !important;
    --bs-table-bg-state: transparent;
    --bs-table-hover-bg: transparent;
  }

  .pem-compact-table tbody tr:not(.pem-mobile-item){
    display:block;
  }

  .pem-compact-table tbody tr.pem-mobile-item > td{
    display:block;
    border:0;
    padding:0;
    background:transparent !important;
    box-shadow:none !important;
  }

  .pem-compact-table tbody tr.pem-mobile-item > td.d-none{
    display:none !important;
  }

  .pem-compact-table tbody tr.pem-mobile-item > *{
    background:transparent !important;
    box-shadow:none !important;
  }

  .pem-project-cell{
    grid-area:project;
    text-align:left !important;
    min-width:0;
  }

  .pem-project-code{
    justify-content:flex-start;
    min-width:0;
    font-size:1.04rem;
  }

  .pem-project-cell .small{
    font-size:.86rem;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }

  .pem-progress-cell{
    grid-area:progress;
    text-align:left !important;
    margin-top:.8rem;
  }

  .pem-mobile-progress-label{
    color:#6c757d;
    font-size:.78rem;
    font-weight:700;
    letter-spacing:0;
    margin-bottom:.25rem;
  }

  .pem-progress-cell .fw-semibold{
    font-size:1rem;
    line-height:1.1;
  }

  .pem-progress-cell .pem-progress{
    height:8px !important;
    margin-top:.42rem !important;
    max-width:none;
  }

  .pem-position-stack{
    min-width:0;
  }

  .pem-position-line{
    grid-template-columns:52px 48px minmax(0, 1fr);
  }

  .pem-progress-cell .pem-metric-sub{
    font-size:.82rem;
  }

  .pem-actions-cell{
    grid-area:actions;
    justify-self:end;
    text-align:right !important;
  }

  .pem-actions-cell .dropdown{
    position:relative;
  }

  .pem-compact-table .pem-actions-btn{
    width:42px;
    height:42px;
    min-width:42px;
    min-height:42px;
    padding:0;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border-radius:.55rem;
  }

  .pem-compact-table .pem-actions-btn.show,
  .pem-compact-table .pem-actions-btn:focus,
  .pem-compact-table .pem-actions-btn:active{
    background:#fff;
    color:#6c757d;
    border-color:#6c757d;
    box-shadow:0 0 0 .18rem rgba(108,117,125,.12);
  }

  .pem-actions-cell .dropdown-menu{
    z-index:1080;
    min-width:14rem;
    border-radius:.55rem;
    box-shadow:0 .5rem 1.25rem rgba(15,23,42,.16);
  }
}

@media (max-width: 991.98px) and (min-width: 576px){
  .pem-list-wrap{
    overflow:visible;
    border:0;
    background:transparent;
  }

  .pem-compact-table{
    display:block;
    width:100%;
  }

  .pem-compact-table thead{
    display:none;
  }

  .pem-compact-table tbody{
    display:flex;
    flex-direction:column;
    gap:.65rem;
  }

  .pem-compact-table tbody tr.pem-mobile-item{
    display:grid;
    grid-template-columns:minmax(150px, .9fr) minmax(132px, .65fr) minmax(300px, 1.4fr) 54px;
    grid-template-areas:"project pending progress actions";
    align-items:center;
    column-gap:.75rem;
    width:100%;
    border:1px solid #dfe6ee;
    border-radius:8px;
    background:#fff;
    box-shadow:0 .12rem .45rem rgba(15,23,42,.05);
    padding:.62rem .7rem;
  }

  .pem-compact-table tbody tr.pem-mobile-item > td{
    display:block;
    min-width:0;
    padding:0;
    border:0;
    background:transparent !important;
    box-shadow:none !important;
  }

  .pem-compact-table thead th.d-none,
  .pem-compact-table tbody tr.pem-mobile-item > td.d-none{
    display:none !important;
  }

  .pem-compact-table tbody tr.pem-mobile-item > td.pem-pending-cell,
  .pem-compact-table tbody tr.pem-mobile-item > td:nth-child(4){
    display:block !important;
    grid-area:pending;
  }

  .pem-project-cell{
    grid-area:project;
    text-align:center !important;
  }

  .pem-project-code{
    justify-content:center;
    font-size:.92rem;
  }

  .pem-serial{
    font-size:.78rem;
  }

  .pem-status-chip,
  .pem-incident-summary-chip,
  .pem-mobile-progress-label{
    display:none !important;
  }

  .pem-pending-summary,
  .pem-incident-summary{
    width:100%;
    min-width:0;
  }

  .pem-position-stack{
    grid-area:progress;
    max-width:none;
    min-width:0;
  }

  .pem-progress-cell{
    grid-area:progress;
    margin-top:0;
    text-align:left !important;
  }

  .pem-position-line{
    grid-template-columns:48px 52px minmax(120px, 1fr);
    gap:.35rem;
  }

  .pem-position-line span,
  .pem-position-line strong{
    font-size:.72rem;
  }

  .pem-actions-cell{
    grid-area:actions;
    justify-self:end;
    text-align:center !important;
  }

  .pem-compact-table .pem-actions-btn{
    width:38px;
    height:38px;
    min-width:38px;
    min-height:38px;
  }
}

@media (max-width: 991.98px){
  .pem-fat-tabs-wrap{
    grid-template-columns:1fr;
  }

  .pem-fat-tabs{
    position:static;
    display:grid;
    grid-template-columns:repeat(auto-fit, minmax(180px, 1fr));
    max-height:none;
    overflow:hidden;
  }

  .pem-fat-tabs .nav-link{
    width:100%;
  }

  .pem-fat-summary{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pem-fat-item{
    grid-template-columns:1fr;
  }

  .pem-fat-controls{
    grid-template-columns:minmax(110px, 140px) minmax(0, 1fr) 34px 34px 34px;
  }
}

@media (max-width: 575.98px){
  .pem-incident-menu{
    width:calc(100vw - 16px);
    max-height:calc(100vh - 112px);
    overflow:auto;
  }

  .pem-incident-form{
    min-height:0;
  }

  .pem-incident-modal-header{
    padding:1rem;
  }

  .pem-incident-modal-body{
    grid-template-columns:1fr;
    padding:1rem;
  }

  .pem-incident-history{
    padding:0;
  }

  .pem-incident-history-list{
    max-height:none;
  }

  .pem-incident-modal-footer{
    flex-direction:column;
    padding:1rem;
  }

  .pem-incident-modal-footer > div,
  .pem-incident-modal-footer .d-flex{
    width:100%;
  }

  .pem-incident-modal-footer .btn{
    flex:1 1 auto;
  }

  .pem-fat-summary{
    grid-template-columns:1fr;
  }

  .pem-fat-controls{
    grid-template-columns:1fr 34px 34px 34px 34px;
  }

  .pem-fat-status{
    grid-column:1 / -1;
  }

  .pem-fat-meta{
    white-space:normal;
  }
}

/* =========================
   KPI styles
   ========================= */
.kpi-pill{
  display:inline-flex;
  align-items:center;
  gap:.5rem;
  padding:.35rem .6rem;
  border-radius:999px;
  width:100%;
  font-weight:600;
  font-size:.9rem;
  border:1px solid rgba(0,0,0,.08);
  background: rgba(13,110,253,.08);
}

.kpi-pill .dot{
  width:10px;
  height:10px;
  border-radius:50%;
  background: currentColor;
  opacity:.9;
}

.kpi-meta{
  font-size:.85rem;
  color:#6c757d;
}

.kpi-progress{
  height:8px;
  border-radius:999px;
  background: rgba(0,0,0,.06);
  overflow:hidden;
  margin-top:.35rem;
}

.kpi-progress > div{
  height:100%;
  width:0%;
  border-radius:999px;
  background: linear-gradient(90deg, rgba(13,110,253,.9), rgba(25,135,84,.9));
  transition: width .25s ease;
}

.dashboard-forecast-text{
  margin-top:.35rem;
  color:#64748b;
  font-size:.78rem;
  font-weight:650;
  line-height:1.2;
  overflow-wrap:anywhere;
}

.dashboard-container-head{
  margin-bottom:.65rem;
  color:#0f172a;
  font-size:.92rem;
  font-weight:800;
}

.dashboard-container-head > div{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:32px;
  padding:.2rem .55rem;
  border:1px solid #dbe3ea;
  border-radius:999px;
  background:#f8fafc;
  text-align:center;
}

.dashboard-container-head span{
  display:inline;
}

.manufacturing-shifts-table{
  min-width:900px;
}

.manufacturing-shifts-table th,
.manufacturing-shifts-table td{
  vertical-align:middle;
}

.manufacturing-shifts-table .form-select,
.manufacturing-shifts-table .form-control{
  min-width:130px;
}

.kpi-time{
  display:flex;
  justify-content:space-between;
  gap:.75rem;
  margin-top:.5rem;
  padding-top:.5rem;
  border-top:1px solid rgba(0,0,0,.06);
}

.kpi-time .label{
  color:#6c757d;
}

.kpi-time .value{
  font-weight:600;
}

.kpi-card{
  display:flex;
  flex-direction:column;
  height:100%;
  width:100%;
  flex: 1 1 auto;
}

.kpi-body{
  flex: 1 1 auto;
  min-height: 0;
}

.kpi-footer{
  margin-top:auto;
}

/* =========================
   Trace items + list-group active readability
   ========================= */

/* Item activo */
.trace-item.active{
  background-color:#0d6efd;
  color:#fff;
  border-radius:6px;
}

.trace-item.active .text-muted,
.trace-item.active small{
  color: rgba(255,255,255,0.75) !important;
}

/* Item base (no activo): azul claro */
.trace-item{
  background:#e7f1ff;
  color:#0b3c8c;
  border-radius:8px;
  padding:.6rem .75rem;
  cursor:pointer;
  transition:background .15s ease;
}

/* Cuando un item está activo (Bootstrap) hazlo legible sobre azul */
.list-group-item.active,
.list-group-item.active:hover,
.list-group-item.active:focus{
  color:#fff;
}

.list-group-item.active .text-muted,
.list-group-item.active .small.text-muted{
  color: rgba(255,255,255,.85) !important;
}

.list-group-item.active .badge{
  color:#fff;
  border:1px solid rgba(255,255,255,.35);
}

/* Opcional: badges “oscuros” se ven mejor así cuando el fondo es azul */
.list-group-item.active .badge.text-bg-dark,
.list-group-item.active .badge.text-bg-secondary{
  background-color: rgba(0,0,0,.35) !important;
}

/* =========================
   Trazabilidad grid panels
   ========================= */
.traz-grid{
  display:grid;
  gap:12px;
}

.traz-grid--4{
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.traz-grid--5{
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

/* Asegura que el área scrollable es el body del panel */
.traz-panel{
  display:flex;
  flex-direction:column;
  min-height:0;
}

.traz-panel__head{
  flex: 0 0 auto;
}

.traz-panel__body{
  flex: 1 1 auto;
  min-height: 0;              /* clave */
  padding-top: .25rem;
  scrollbar-gutter: stable;   /* opcional: evita “saltos” al aparecer scroll */
  overflow: visible;
  overscroll-behavior: auto;
}

/* Responsive: en pantallas pequeñas, apila */
@media (max-width: 1199.98px){
  .traz-grid--4,
  .traz-grid--5{
    grid-template-columns: 1fr;
  }
}

@media (min-width: 1200px){
  #traz_panel_detail,
  #traz_panel_components{
    position: sticky;
    top: 10px;
    align-self: start;
    z-index: 5;
    max-height: calc(100vh - 20px);
    display: flex;
    flex-direction: column;
    overflow: auto;
    overscroll-behavior: contain;
  }
}


/* Footer */
.app-footer{
  height: 44px;
  background: #fff;
  border-top: 1px solid rgba(0,0,0,.08);
  display: flex;
  align-items: center;
}

/* =========================
   KPI flash on change
   ========================= */
.kpi-flash {
  display: inline-block;
  background: rgba(0, 255, 246, .25);
  border-radius: .25rem;
  transform: scale(1.05);
  transition: background .8s ease, transform .8s ease;
}

.kpi-flash.kpi-flash-off {
  background: transparent;
  transform: none;
}

.traz-grid .text-break { 
  word-break: break-word; 
  overflow-wrap: anywhere; 
}

.kpi-icon {
  max-height: 48px;
  opacity: 0.9;
}

/* =========================
   Login (selector)
   ========================= */

.login-bg{
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 20% 10%, rgba(13,110,253,.18), transparent 60%),
    radial-gradient(900px 500px at 80% 0%, rgba(25,135,84,.16), transparent 55%),
    radial-gradient(900px 500px at 60% 100%, rgba(111,66,193,.14), transparent 55%),
    #f8f9fa;
}

.card-login{
  border-radius: 18px;
}

.btn-login{
  padding: 14px 16px;
  border-radius: 14px;
}

.auth-revalidating-wrap {
  min-height: calc(100dvh - 50px);
  padding: 1rem;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.app-global-loading{
  position: fixed;
  inset: 50px 0 0 0;
  z-index: 2050;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 1rem;
  background: rgba(248, 249, 250, .82);
  backdrop-filter: blur(2px);
}

.app-global-loading.is-visible{
  display: flex;
}

.pem-initial-loading{
  position: fixed;
  inset: 50px 0 0 0;
  z-index: 2050;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 1.1rem;
  padding: calc(9vh + 1rem) 1rem 1rem;
  background: rgba(248, 249, 250, .92);
  text-align: center;
  backdrop-filter: blur(2px);
}

.pem-initial-loading.is-hidden{
  display: none;
}

.auth-revalidating {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  width: min(520px, calc(100vw - 2rem));
  max-width: 520px;
  margin-top: 9vh;
  padding: 1.5rem 1.35rem;
  border: 1px solid #d9e4f2;
  border-radius: .75rem;
  background: #fff;
  text-align: center;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .08);
}

.auth-revalidating > div:last-child {
  min-width: 0;
}

.auth-cable-loader {
  --auth-charge-travel: 106px;
  position: relative;
  isolation: isolate;
  flex: 0 0 auto;
  width: 148px;
  height: 70px;
}

.auth-cable-loader::before,
.auth-cable-loader::after {
  content: "";
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 24px;
  height: 24px;
  border: 4px solid #0d6efd;
  border-radius: 50%;
  background: #fff;
  transform: translateY(-50%);
  box-shadow: 0 0 0 5px rgba(13, 110, 253, .12);
}

.auth-cable-loader::before {
  left: 0;
}

.auth-cable-loader::after {
  right: 0;
}

.auth-cable-loader__wire {
  position: absolute;
  z-index: 1;
  left: 20px;
  right: 20px;
  top: 50%;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #d8e4f4;
  transform: translateY(-50%);
}

.auth-cable-loader__wire::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(13, 110, 253, .1), rgba(0, 214, 201, .45), rgba(13, 110, 253, .1));
  animation: auth-wire-glow 1.1s ease-in-out infinite;
}

.auth-cable-loader__charge {
  position: absolute;
  z-index: 3;
  left: -10px;
  top: 50%;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #00d6c9;
  transform: translateY(-50%);
  box-shadow: 0 0 10px rgba(0, 214, 201, .95), 0 0 20px rgba(13, 110, 253, .45);
  animation: auth-current-travel 1.1s cubic-bezier(.45, 0, .25, 1) infinite;
}

.auth-cable-loader__bolt {
  position: absolute;
  z-index: 9999;
  right: 9px;
  top: 8px;
  width: 24px;
  height: 32px;
  background: #ffc107;
  clip-path: polygon(58% 0, 18% 53%, 49% 53%, 36% 100%, 84% 38%, 53% 38%);
  filter: drop-shadow(0 0 7px rgba(255, 193, 7, .65));
  animation: auth-bolt-flicker 1.1s ease-in-out infinite;
}

@keyframes auth-current-travel {
  0% {
    transform: translate(-2px, -50%) scale(.72);
    opacity: 0;
  }
  18% {
    opacity: 1;
  }
  78% {
    opacity: 1;
  }
  100% {
    transform: translate(var(--auth-charge-travel), -50%) scale(1);
    opacity: 0;
  }
}

@keyframes auth-wire-glow {
  0%, 100% {
    opacity: .45;
  }
  50% {
    opacity: 1;
  }
}

@keyframes auth-bolt-flicker {
  0%, 45%, 100% {
    transform: scale(.9);
    opacity: .45;
  }
  58%, 72% {
    transform: scale(1.08);
    opacity: 1;
  }
}

.auth-revalidating__title {
  color: #0b2232;
  font-weight: 700;
  line-height: 1.2;
}

.auth-revalidating__text {
  margin-top: .2rem;
  color: #667085;
  font-size: .92rem;
}

@media (max-width: 575.98px) {
  .auth-revalidating-wrap {
    min-height: calc(100dvh - 50px);
    padding: 0;
  }

  .auth-revalidating {
    justify-content: center;
    width: 100%;
    min-height: calc(100dvh - 50px);
    margin-top: 0;
    padding: 2rem 1.25rem;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .auth-cable-loader {
    --auth-charge-travel: 126px;
    width: 170px;
    height: 82px;
  }
}

.audio-processing-card .auth-cable-loader {
  --auth-charge-travel: 82px;
  width: 122px;
  height: 58px;
}

@media (max-width: 575.98px) {
  .audio-processing-card {
    align-items: flex-start;
    max-width: min(420px, calc(100vw - 2.5rem));
  }

  .audio-processing-card .auth-cable-loader {
    --auth-charge-travel: 72px;
    width: 112px;
    height: 54px;
  }
}

.brand-dot{
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #0d6efd;
  box-shadow: 0 0 0 6px rgba(13,110,253,.15);
}

/* =========================
   Elementos soporte
   ========================= */
.elementos-type-item {
  text-align: left;
  padding: .95rem 1rem;
}

.elementos-type-item .min-w-0 {
  min-width: 0;
}

.elementos-type-item.active .badge.text-bg-light,
.elementos-type-item.active .badge.text-bg-secondary {
  border-color: rgba(255,255,255,.35) !important;
}

.elementos-sap-panel {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid #e2e8f0;
  border-radius: .85rem;
  background: #fff;
}

.elementos-sap-value {
  margin-top: .15rem;
  color: #0b2232;
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.2;
}

.elementos-image-panel {
  display: grid;
  grid-template-columns: minmax(160px, 220px) minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid #e2e8f0;
  border-radius: .85rem;
  background: linear-gradient(180deg, #fff, #f8fafc);
}

.elementos-image-panel.is-dragover {
  border-color: #0d6efd;
  background: #f0f6ff;
}

.elementos-product-image-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 220px;
  min-height: 120px;
  max-height: 150px;
  aspect-ratio: 16 / 10;
  border: 1px solid #dbe3ee;
  border-radius: .75rem;
  background:
    radial-gradient(circle at 50% 18%, rgba(13,110,253,.12), transparent 42%),
    #eef3f8;
  overflow: hidden;
}

.elementos-product-image-preview img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 140px;
  object-fit: contain;
  padding: .55rem;
  display: block;
}

.elementos-product-image-empty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  color: #64748b;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15,23,42,.08);
}

.elementos-doc-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid #e2e8f0;
  border-radius: .85rem;
  background: #f8fafc;
}

.elementos-doc-table > :not(caption) > * > * {
  padding-top: .8rem;
  padding-bottom: .8rem;
}

.elementos-doc-row--folder {
  background: rgba(25,135,84,.035);
}

.elementos-upload-zone {
  display: flex;
  align-items: center;
  gap: .9rem;
  padding: 1rem;
  border: 1px dashed #9fb1c5;
  border-radius: .85rem;
  background: #fff;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}

.elementos-stale-notice {
  padding: 1rem;
  border: 1px solid #f3d18a;
  border-radius: .85rem;
  background: #fff9e8;
}

.elementos-stale-notice ul {
  margin: .75rem 0 0;
  padding-left: 1.15rem;
}

.elementos-stale-notice li {
  margin-bottom: .45rem;
}

.elementos-stale-notice li:last-child {
  margin-bottom: 0;
}

.elementos-stale-notice li strong,
.elementos-stale-notice li span {
  display: block;
}

.elementos-stale-notice li span {
  color: #64748b;
  font-size: .84rem;
}

.elementos-upload-zone:hover,
.elementos-upload-zone.is-dragover {
  border-color: #0d6efd;
  background: #f0f6ff;
}

.elementos-upload-zone.is-dragover {
  transform: translateY(-1px);
}

.elementos-upload-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: #e7f1ff;
  color: #0d6efd;
  font-size: 1.25rem;
  flex: 0 0 auto;
}

.elementos-upload-progress {
  display: grid;
  gap: .65rem;
}

.pwa-install-prompt {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 1080;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: .75rem;
  width: min(440px, calc(100vw - 2rem));
  padding: .85rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: #172033;
  box-shadow: 0 .8rem 2rem rgba(15, 23, 42, .18);
}

.pwa-install-prompt__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: #0b2232;
  color: #fff;
  font-size: 1.1rem;
}

.pwa-install-prompt__body {
  min-width: 0;
}

.pwa-install-prompt__title {
  font-weight: 700;
  line-height: 1.2;
}

.pwa-install-prompt__text {
  color: #64748b;
  font-size: .86rem;
  line-height: 1.3;
}

.pwa-install-prompt__close {
  width: 32px;
  height: 32px;
  padding: .25rem;
}

@media (max-width: 575.98px) {
  .pwa-install-prompt {
    right: .75rem;
    bottom: .75rem;
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .pwa-install-prompt #btn_pwa_install {
    grid-column: 1 / -1;
  }
}

.elementos-upload-progress:empty {
  display: none;
}

.elementos-upload-progress-row {
  padding: .8rem .9rem;
  border: 1px solid #e2e8f0;
  border-radius: .75rem;
  background: #fff;
  transition: opacity .2s ease, transform .2s ease, max-height .22s ease, margin .22s ease, padding .22s ease;
  max-height: 110px;
  overflow: hidden;
}

.elementos-upload-progress-row.is-complete {
  opacity: 0;
  transform: translateY(-4px);
  max-height: 0;
  margin: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-width: 0;
}

.elementos-upload-progress-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .5rem;
}

.elementos-upload-progress-head strong,
.elementos-upload-progress-head span {
  display: block;
  overflow-wrap: anywhere;
}

.elementos-upload-progress-head span,
.elementos-upload-progress-head small {
  color: #64748b;
  font-size: .82rem;
}

.elementos-upload-progress .progress {
  height: 8px;
}

.elementos-drag-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .15rem;
  min-width: 42px;
  cursor: grab;
  font-size: .78rem;
}

.elementos-drag-handle:active {
  cursor: grabbing;
}

.elementos-row-dragging {
  opacity: .58;
}

@media (max-width: 767.98px) {
  .elementos-sap-panel,
  .elementos-image-panel,
  .elementos-doc-toolbar {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .elementos-product-image-preview {
    max-width: 100%;
    min-height: 150px;
    max-height: 190px;
  }

  .elementos-product-image-preview img {
    max-height: 180px;
  }

  .elementos-doc-table {
    min-width: 0;
  }

  .elementos-doc-table thead {
    display: none;
  }

  .elementos-doc-table,
  .elementos-doc-table tbody {
    display: block;
  }

  .elementos-doc-table tbody tr[data-doc-id] {
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-areas:
      "order doc actions"
      "publish doc required";
    gap: .45rem .65rem;
    padding: .75rem;
    margin-bottom: .65rem;
    border: 1px solid #e2e8f0;
    border-radius: .8rem;
    background: #fff;
  }

  .elementos-doc-table tbody tr[data-doc-id] > td {
    display: block;
    padding: 0;
    border: 0;
  }

  .elementos-doc-table tbody tr[data-doc-id] > td:nth-child(1) {
    grid-area: order;
  }

  .elementos-doc-table tbody tr[data-doc-id] > td:nth-child(2) {
    grid-area: publish;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .elementos-doc-table tbody tr[data-doc-id] > td:nth-child(3) {
    grid-area: doc;
    min-width: 0;
  }

  .elementos-doc-table tbody tr[data-doc-id] > td:nth-child(5) {
    grid-area: required;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .elementos-doc-table tbody tr[data-doc-id] > td:nth-child(6) {
    grid-area: actions;
  }

  .elementos-doc-table tbody tr[data-doc-id] > td:nth-child(3) .fw-semibold {
    font-size: .95rem;
    line-height: 1.25;
    overflow-wrap: normal;
    word-break: normal;
  }

  .elementos-doc-table tbody tr[data-doc-id] > td:nth-child(3) .small.text-muted {
    display: block;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .elementos-doc-table tbody tr[data-doc-id] .badge {
    font-size: .72rem;
  }

  .elementos-drag-handle {
    min-width: 38px;
    height: 34px;
  }

  .elementos-doc-delete {
    width: 34px;
    height: 34px;
    padding: .25rem;
  }
}


.periodic-alert-config {
  padding: 1.25rem;
}

.periodic-alert-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e2e8f0;
}

.periodic-alert-title,
.periodic-alert-section-head {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
}

.periodic-alert-icon,
.periodic-alert-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: .65rem;
}

.periodic-alert-icon {
  color: #0d6efd;
  background: #eef5ff;
}

.periodic-alert-step {
  color: #475569;
  background: #f1f5f9;
  font-weight: 700;
}

.periodic-alert-active {
  min-width: 180px;
  padding: .75rem .9rem;
  border: 1px solid #dbe3ef;
  border-radius: .75rem;
  background: #f8fafc;
}

.periodic-alert-active .form-check {
  display: flex;
  align-items: center;
  gap: .55rem;
  padding-left: 0;
}

.periodic-alert-active .form-check-input {
  float: none;
  margin-left: 0;
}

.periodic-alert-grid {
  display: grid;
  grid-template-columns: minmax(280px, .85fr) minmax(360px, 1.15fr);
  gap: 1rem;
  margin-top: 1rem;
}

.periodic-alert-section {
  min-width: 0;
  padding: 1rem;
  border: 1px solid #dbe3ef;
  border-radius: .75rem;
  background: #fff;
}

.periodic-alert-section-recipients {
  background: #fbfdff;
}

.periodic-alert-emails {
  min-height: 72px;
  resize: vertical;
}

.periodic-alert-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e2e8f0;
}

@media (max-width: 991.98px) {
  .periodic-alert-toolbar,
  .periodic-alert-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .periodic-alert-grid {
    grid-template-columns: 1fr;
  }

  .periodic-alert-active {
    width: 100%;
  }
}

.periodic-email-preview {
  background: #f8fafc;
  padding: 1rem;
  border-radius: .75rem;
}

.periodic-email-card {
  max-width: 980px;
  margin: 0 auto;
  padding: 1.25rem;
  border: 1px solid #dbe3ef;
  border-radius: .75rem;
  background: #fff;
}

.periodic-email-card h3 {
  margin: .15rem 0 .25rem;
  color: #0f172a;
  font-size: 1.2rem;
  line-height: 1.25;
}

.periodic-email-card h4 {
  margin: 0 0 .65rem;
  color: #0f172a;
  font-size: .98rem;
}

.periodic-email-meta {
  color: #64748b;
  font-size: .82rem;
  font-weight: 600;
  text-transform: uppercase;
}

.periodic-email-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .75rem;
  margin: 1rem 0;
}

.periodic-email-summary > div {
  padding: .8rem;
  border: 1px solid #e2e8f0;
  border-radius: .65rem;
  background: #f8fafc;
  color: #475569;
  font-size: .88rem;
}

.periodic-email-summary span {
  display: block;
  color: #0f172a;
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.1;
}

.periodic-email-section {
  margin-top: 1.1rem;
}

.periodic-email-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-bottom: .45rem;
}

.periodic-email-tags span {
  display: inline-flex;
  align-items: center;
  padding: .35rem .55rem;
  border: 1px solid #dbe3ef;
  border-radius: 999px;
  background: #fff;
  color: #334155;
  font-size: .84rem;
}

.periodic-email-callout {
  margin-top: 1rem;
  padding: .85rem 1rem;
  border-left: 4px solid #0d6efd;
  border-radius: .55rem;
  background: #eef5ff;
  color: #1e3a8a;
}

@media (max-width: 767.98px) {
  .periodic-email-summary {
    grid-template-columns: 1fr;
  }
}

.app-floating-alert-host {
  position: fixed;
  left: 50%;
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 2140;
  width: min(560px, calc(100vw - 2rem));
  transform: translateX(-50%);
  pointer-events: none;
}

.app-floating-alert {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: .7rem;
  margin: 0;
  padding: .8rem .9rem;
  border-radius: 8px;
  box-shadow: 0 .85rem 2rem rgba(15,23,42,.22);
  pointer-events: auto;
}

.app-floating-alert__icon {
  font-size: 1.15rem;
  line-height: 1;
}

.app-floating-alert__message {
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 600;
  line-height: 1.25;
}

/* =========================
   Engineering sprints
   ========================= */
.engineering-context-bar{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:.75rem;
}

.engineering-sprint-select-wrap{
  min-width:260px;
}

.engineering-context-meta{
  color:#6c757d;
  font-size:.88rem;
}

.engineering-work-grid{
  display:grid;
  grid-template-columns:minmax(280px, .34fr) minmax(0, 1fr);
  gap:1rem;
  align-items:start;
}

.engineering-planning-grid,
.engineering-teams-grid,
.engineering-settings-grid{
  display:grid;
  grid-template-columns:minmax(280px, .38fr) minmax(0, 1fr);
  gap:1rem;
  align-items:start;
}

.engineering-settings-grid{
  grid-template-columns:minmax(520px, .42fr) minmax(420px, 1fr);
}

.engineering-settings-grid .form-label{
  white-space:nowrap;
}

.engineering-settings-grid .form-control{
  min-width:0;
}

.engineering-search{
  width:min(280px, 100%);
}

.engineering-task-list{
  display:flex;
  flex-direction:column;
  gap:.65rem;
  padding:.75rem;
}

.engineering-sprint-list{
  display:flex;
  flex-direction:column;
  gap:.5rem;
  padding:.75rem;
}

.engineering-sprint-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:.75rem;
  width:100%;
  padding:.75rem;
  border:1px solid #dce4ee;
  border-radius:8px;
  background:#fff;
  color:#172033;
  text-align:left;
}

.engineering-sprint-row:hover,
.engineering-sprint-row.is-active{
  border-color:#0d6efd;
  background:#f0f6ff;
}

.engineering-sprint-row small{
  display:block;
  color:#64748b;
  margin-top:.2rem;
}

.engineering-sprint-row__meta{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:.25rem;
  flex:0 0 auto;
}

.engineering-board{
  display:grid;
  grid-template-columns:repeat(5, minmax(180px, 1fr));
  gap:.75rem;
  padding:.75rem;
  overflow-x:auto;
}

.engineering-board--planning{
  grid-template-columns:repeat(4, minmax(0, 1fr));
}

.engineering-board-column{
  min-width:180px;
  border:1px solid #dbe3ee;
  border-radius:8px;
  background:#f8fafc;
}

.engineering-board-column.is-drop-target,
.engineering-planning-column.is-drop-target{
  border-color:#0d6efd;
  box-shadow:0 0 0 3px rgba(13,110,253,.14);
}

.engineering-planning-column{
  min-width:0;
  border:1px solid #dbe3ee;
  border-radius:8px;
  background:#f8fafc;
}

.engineering-planning-column__head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:.65rem;
  padding:.65rem .75rem;
  border-bottom:1px solid #e5ecf4;
}

.engineering-planning-column__head strong,
.engineering-planning-column__head small{
  display:block;
}

.engineering-planning-column__head strong{
  color:#172033;
  font-size:.88rem;
}

.engineering-planning-column__head small{
  color:#64748b;
  margin-top:.15rem;
}

.engineering-planning-column__body{
  display:flex;
  flex-direction:column;
  gap:.6rem;
  min-height:280px;
  padding:.65rem;
}

.engineering-board-column__head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:.5rem;
  padding:.65rem .75rem;
  border-bottom:1px solid #e5ecf4;
}

.engineering-board-column__head strong{
  color:#172033;
  font-size:.88rem;
}

.engineering-board-column__body{
  display:flex;
  flex-direction:column;
  gap:.6rem;
  min-height:280px;
  padding:.65rem;
}

.engineering-task-card{
  padding:.6rem;
  border:1px solid #dce4ee;
  border-radius:8px;
  background:#fff;
  box-shadow:0 .125rem .25rem rgba(15,23,42,.05);
}

.engineering-task-card[draggable="true"]{
  cursor:grab;
}

.engineering-task-card[draggable="true"]:active{
  cursor:grabbing;
}

.engineering-task-card__head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:.6rem;
}

.engineering-task-card__title{
  display:flex;
  align-items:flex-start;
  gap:.45rem;
  min-width:0;
  color:#111827;
  font-weight:700;
  line-height:1.25;
}

.engineering-task-card__title i{
  flex:0 0 auto;
  color:#0d6efd;
  margin-top:.05rem;
}

.engineering-task-card__title span{
  min-width:0;
  overflow-wrap:anywhere;
}

.engineering-task-card__desc{
  margin-top:.3rem;
  color:#4b5563;
  font-size:.8rem;
  line-height:1.25;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

.engineering-task-card__meta{
  display:flex;
  flex-wrap:wrap;
  gap:.25rem .6rem;
  margin-top:.4rem;
  padding-right:4.25rem;
  color:#64748b;
  font-size:.76rem;
}

.engineering-task-card__meta span{
  display:inline-flex;
  align-items:center;
  gap:.28rem;
  min-width:0;
}

.engineering-task-card__actions{
  display:flex;
  justify-content:flex-end;
  gap:.3rem;
  margin-top:-1.8rem;
  min-height:28px;
}

.engineering-task-card__actions .btn{
  width:28px;
  height:28px;
  padding:0;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:var(--app-action-radius);
}

.engineering-empty,
.engineering-column-empty{
  display:flex;
  align-items:center;
  gap:.5rem;
  color:#6c757d;
  padding:.9rem;
  border:1px dashed #cbd5e1;
  border-radius:8px;
  background:#fff;
  font-size:.88rem;
}

.engineering-column-empty{
  justify-content:center;
  min-height:84px;
}

.engineering-backlog-table th,
.engineering-backlog-table td,
.engineering-sprints-table th,
.engineering-sprints-table td{
  padding:.65rem .75rem;
  vertical-align:middle;
}

.engineering-backlog-table thead th,
.engineering-sprints-table thead th{
  color:#5b6470;
  font-size:.75rem;
  font-weight:700;
  letter-spacing:0;
  text-transform:uppercase;
}

.engineering-table-desc{
  max-width:560px;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

.engineering-team-item{
  text-align:left;
}

.engineering-member-item{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:.75rem;
}

.engineering-member-remove{
  width:34px;
  height:34px;
  min-width:34px;
  padding:0;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:var(--app-action-radius);
}

@media (max-width: 1199.98px){
  .engineering-work-grid{
    grid-template-columns:1fr;
  }

  .engineering-planning-grid,
  .engineering-teams-grid,
  .engineering-settings-grid{
    grid-template-columns:1fr;
  }
}

@media (max-width: 767.98px){
  .engineering-context-bar{
    align-items:stretch;
    flex-direction:column;
  }

  .engineering-sprint-select-wrap,
  .engineering-search{
    width:100%;
    min-width:0;
  }

  .engineering-board{
    grid-template-columns:1fr;
    overflow-x:visible;
  }

  .engineering-board-column{
    min-width:0;
  }

  .engineering-planning-column{
    min-width:0;
  }
}

@media (max-width: 575.98px) {
  .app-floating-alert-host {
    bottom: max(.75rem, env(safe-area-inset-bottom));
    width: calc(100vw - 1rem);
  }

  .app-floating-alert {
    padding: .75rem;
  }
}

.settings-notification-card{
  border:1px solid #dbe3ee;
  border-radius:8px;
}

.account-settings-page{
  max-width:980px;
}

.account-settings-tabs{
  margin-bottom:1rem;
}

.app-main .nav-tabs{
  gap: 0;
  padding: 0;
  border-bottom:1px solid #dbe3ee;
  background: transparent;
}

.app-main .nav-tabs .nav-link{
  display:inline-flex;
  align-items:center;
  gap:.45rem;
  min-height:38px;
  margin-top:0;
  margin-bottom:-1px;
  color:#475569;
  background:transparent;
  border:1px solid transparent;
  border-radius:8px 8px 0 0;
  font-weight:600;
  font-size:.95rem;
  line-height:1.25;
  padding:.7rem .95rem;
}

.app-main .nav-tabs .nav-link i{
  font-size:1rem;
  line-height:1;
}

.app-main .nav-tabs .nav-link.active{
  color:#0d6efd;
  background:#fff;
  border-color:#dbe3ee #dbe3ee #fff;
}

.account-settings-tab-content{
  max-width:100%;
}

.settings-profile-card .card-body,
.settings-notification-card .card-body{
  padding:1.25rem;
}

.settings-profile-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:1rem 1.5rem;
  max-width:720px;
}

.settings-profile-grid__full{
  grid-column:1 / -1;
}

.settings-name-form{
  max-width:720px;
}

.settings-profile-card{
  border:1px solid #dbe3ee;
  border-radius:8px;
}

.settings-notification-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:1rem;
}

.settings-notification-title{
  display:flex;
  align-items:flex-start;
  gap:.75rem;
  min-width:0;
}

.settings-notification-icon{
  width:42px;
  height:42px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
  border-radius:8px;
  background:#eef5ff;
  color:#0d6efd;
  font-size:1.15rem;
}

.settings-push-state{
  flex:0 0 auto;
}

.settings-device-panel{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1rem;
  margin-top:1rem;
  padding:.85rem 1rem;
  border:1px solid #dbe3ee;
  border-radius:8px;
  background:#f8fafc;
}

.settings-device-panel__label{
  color:#64748b;
  font-size:.78rem;
  font-weight:700;
  letter-spacing:0;
  text-transform:uppercase;
}

.settings-device-panel__value{
  margin-top:.15rem;
  color:#111827;
  font-weight:700;
}

.settings-device-panel__count{
  min-width:42px;
  height:42px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:8px;
  background:#fff;
  border:1px solid #dbe3ee;
  color:#0f172a;
  font-weight:800;
}

.settings-push-actions{
  display:flex;
  flex-wrap:wrap;
  gap:.5rem;
  margin-top:.85rem;
}

.settings-push-actions .btn{
  display:inline-flex;
  align-items:center;
  gap:.45rem;
  border-radius:8px;
}

.settings-channel-section{
  margin-top:1rem;
  padding-top:1rem;
  border-top:1px solid #e5ecf4;
}

.settings-channel-section__head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:1rem;
  margin-bottom:.65rem;
}

.settings-channel-list{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:.55rem;
}

.settings-channel-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1rem;
  padding:.75rem .85rem;
  border:1px solid #dbe3ee;
  border-radius:8px;
  background:#fff;
}

.settings-channel-row__copy{
  min-width:0;
}

.settings-channel-row__title{
  color:#111827;
  font-weight:600;
  line-height:1.2;
}

.settings-channel-row__desc{
  margin-top:.15rem;
  color:#64748b;
  font-size:.86rem;
  line-height:1.3;
}

.settings-channel-row__switch{
  flex:0 0 auto;
  min-height:0;
  margin:0;
  padding-left:2.75rem;
}

.settings-channel-row__switch .form-check-input{
  width:2.35rem;
  height:1.25rem;
  margin-top:0;
  cursor:pointer;
}

.settings-push-detail{
  margin-top:.85rem;
  color:#64748b;
  font-size:.86rem;
}

@media (max-width: 575.98px){
  .account-settings-page{
    max-width:none;
  }

  .settings-profile-grid{
    grid-template-columns:1fr;
  }

  .settings-notification-head,
  .settings-device-panel,
  .settings-channel-row{
    align-items:stretch;
  }

  .settings-notification-head{
    flex-direction:column;
  }

  .settings-device-panel{
    flex-direction:row;
  }

  .settings-push-actions .btn{
    flex:1 1 100%;
    justify-content:center;
  }
}

@media (max-width: 1199.98px){
  .settings-channel-list{
    grid-template-columns:1fr;
  }
}

/* Line stops */
.line-stops-page .kpi-grid{
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:1rem;
}

.line-stops-page .kpi-card{
  min-height:108px;
  padding:1.15rem 1.25rem;
  border:1px solid #e4ebf3;
  border-radius:8px;
  background:#fff;
  box-shadow:0 8px 22px rgba(15, 23, 42, .04);
}

.line-stops-page .kpi-value{
  margin-top:.6rem;
  font-size:1.75rem;
  line-height:1.1;
}

.line-stops-filters{
  display:grid;
  grid-template-columns:minmax(150px, 1.1fr) minmax(160px, 1.1fr) minmax(130px, .8fr) minmax(130px, .8fr) minmax(180px, 1.4fr);
  gap:.65rem;
  align-items:center;
}

.line-stops-dashboard-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:1rem;
}

.line-stops-panel,
.line-stops-list-shell{
  background:#fff;
  border:1px solid #e4ebf3;
  border-radius:8px;
  box-shadow:0 8px 22px rgba(15, 23, 42, .04);
}

.line-stops-panel__head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1rem;
  padding:.9rem 1rem;
  border-bottom:1px solid #edf2f7;
}

.line-stops-bars{
  display:grid;
  gap:.85rem;
  padding:1rem;
}

.line-stops-bar-row{
  display:grid;
  grid-template-columns:minmax(145px, .55fr) minmax(0, 1fr);
  gap:.85rem;
  align-items:center;
}

.line-stops-bar-row__label{
  min-width:0;
}

.line-stops-bar-row__label strong,
.line-stops-bar-row__label span{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.line-stops-bar-row__label strong{
  color:#0f172a;
  font-size:.92rem;
}

.line-stops-bar-row__label span{
  color:#64748b;
  font-size:.82rem;
}

.line-stops-bar-track{
  height:.65rem;
  overflow:hidden;
  border-radius:999px;
  background:#edf2f7;
}

.line-stops-bar-track span{
  display:block;
  height:100%;
  border-radius:999px;
  background:#0f766e;
}

.line-stops-list,
.line-stops-recent{
  display:grid;
  gap:.75rem;
  padding:1rem;
}

.line-stop-item{
  display:grid;
  grid-template-columns:minmax(0, 1fr) auto;
  gap:1rem;
  align-items:start;
  padding:.95rem 1rem;
  border:1px solid #e4ebf3;
  border-radius:8px;
  background:#fff;
}

.line-stop-item.is-open{
  border-color:#fecaca;
  background:#fffafa;
}

.line-stop-item__main{
  min-width:0;
}

.line-stop-item__title,
.line-stop-item__meta,
.line-stop-item__actions{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:.5rem;
}

.line-stop-item__title strong{
  color:#0f172a;
}

.line-stop-item__title span,
.line-stop-item__meta{
  color:#64748b;
  font-size:.88rem;
}

.line-stop-item__meta{
  margin-top:.45rem;
  gap:.85rem;
}

.line-stop-item__meta span{
  display:inline-flex;
  align-items:center;
  gap:.35rem;
}

.line-stop-item__detail{
  margin-top:.35rem;
  color:#1f2937;
  font-weight:600;
}

.line-stop-item__cause{
  margin-top:.25rem;
  color:#64748b;
  font-size:.9rem;
}

.line-stop-item__notes{
  margin-top:.55rem;
  color:#475569;
  font-size:.9rem;
  line-height:1.35;
}

.line-stops-empty{
  padding:1rem;
  color:#64748b;
}

@media (max-width: 991.98px){
  .line-stops-page .kpi-grid{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }

  .line-stops-filters,
  .line-stops-dashboard-grid{
    grid-template-columns:1fr;
  }

  .line-stop-item{
    grid-template-columns:1fr;
  }

  .line-stop-item__actions{
    justify-content:flex-end;
  }
}

@media (max-width: 575.98px){
  .line-stops-page .kpi-grid{
    grid-template-columns:1fr;
  }

  .line-stops-bar-row{
    grid-template-columns:1fr;
    gap:.35rem;
  }

  .line-stop-item__actions .btn{
    flex:1 1 0;
  }
}
.gantt-version-panel {
  margin-top: 16px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid #dde3ea;
  border-radius: 8px;
  box-shadow: 0 .125rem .25rem rgba(0,0,0,.06);
}

.container-header-actions #btn_create_gantt_version {
  display: none;
}

.gantt-version-control {
  display: grid;
  grid-template-columns: minmax(280px, 420px) minmax(240px, 1fr) auto;
  align-items: center;
  gap: 16px;
}

.gantt-version-select-wrap .form-label {
  margin-bottom: 5px;
  color: #475569;
  font-size: 13px;
  font-weight: 700;
}

.gantt-version-select-wrap .form-select {
  min-height: 42px;
  border-radius: 8px;
  font-weight: 600;
}

.gantt-version-meta {
  min-width: 0;
  padding-left: 2px;
}

.gantt-version-meta-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 5px;
}

.gantt-version-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 9px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.gantt-version-status.is-active {
  border-color: #bbf7d0;
  background: #ecfdf5;
  color: #047857;
}

.gantt-version-description {
  color: #334155;
  font-size: 14px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gantt-version-actions {
  display: flex;
  justify-content: flex-end;
}

.gantt-version-actions .btn {
  min-height: 42px;
  border-radius: 8px;
  white-space: nowrap;
}

.container-gantt-version-modal-top {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: .75rem;
  align-items: end;
  margin-bottom: 1rem;
  padding: .9rem;
  border: 1px solid #dbe3ea;
  border-radius: 8px;
  background: #f8fafc;
}

.container-gantt-version-modal-top .btn {
  min-height: 38px;
  white-space: nowrap;
}

#container_gantt_versions_force_wrap {
  padding: .75rem .85rem;
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fff5f5;
}

.container-gantt-finished-toggle-row td {
  padding: 0;
  background: #f8fafc;
}

.container-gantt-finished-toggle {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .65rem .75rem;
  border: 0;
  border-top: 1px solid #dbe3ea;
  border-bottom: 1px solid #dbe3ea;
  background: #f8fafc;
  color: #334155;
  font-weight: 800;
  text-align: left;
}

.container-gantt-finished-toggle i {
  color: #64748b;
}

.container-gantt-finished-toggle strong {
  min-width: 26px;
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: .15rem;
  padding: .1rem .45rem;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
  font-size: .78rem;
}

.container-gantt-finished-row {
  background: #fbfbfc;
}

@media (max-width: 991.98px) {
  .gantt-version-control {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .gantt-version-description {
    white-space: normal;
  }

  .gantt-version-actions {
    justify-content: flex-start;
  }

  .container-gantt-version-modal-top {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 575.98px) {
  .gantt-version-panel {
    padding: 12px;
  }

  .gantt-version-actions .btn {
    width: 100%;
  }
}

@media (max-width: 991.98px) {
  .chef-login-shell{
    grid-template-columns: 1fr;
    column-gap: 0;
  }

  .chef-login-art{
    justify-content: center;
    padding: 1.5rem 1rem .5rem;
  }

  .chef-login-art img{
    width: min(330px, 78vw);
  }

  .chef-login-panel{
    justify-content: center;
    padding: .5rem 1rem 1.5rem;
  }

  .recipes-filters{
    grid-template-columns: 1fr 1fr;
  }

  .recipes-clear{
    grid-column: 1 / -1;
  }

  .recipe-detail__grid,
  .recipe-form-grid{
    grid-template-columns: 1fr;
  }

  .recipe-detail__grid{
    gap: 1rem;
  }

  .recipe-form-name,
  .recipe-form-text{
    grid-column: auto;
  }
}

@media (max-width: 575.98px) {
  .chef-login-art{
    padding: 1.25rem 1rem .25rem;
  }

  .chef-login-panel{
    padding: .75rem 1rem 1.5rem;
  }

  .chef-login-card{
    padding: 1.25rem;
  }

  .chef-login-links{
    align-items: flex-start;
    flex-direction: column;
  }

  .recipes-filters{
    grid-template-columns: 1fr;
  }

  .recipes-summary{
    align-items: flex-start;
    flex-direction: column;
  }

  .recipes-chips{
    justify-content: flex-start;
  }
}
