*{
  box-sizing: border-box;
}

body{
  margin: 0;
  font-family: Arial, sans-serif;
  background: #eef2f7;
  color: #081735;
}

.tp-app{
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0;
}

.tp-header{
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: center;
  margin-bottom: 24px;
}

.tp-header img{
  width: 150px;
}

.tp-header h1{
  margin: 0;
  font-size: 28px;
}

.tp-header p{
  margin: 6px 0 0;
  color: #64748b;
}

#estadoPortal{
  background: #ffffff;
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 800;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .08);
}

.tp-profile{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.tp-profile > div,
.service-card,
.empty-state,
.loading{
  background: #ffffff;
  border: 1px solid #d8e0ec;
  border-radius: 8px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, .06);
}

.tp-profile > div{
  padding: 16px;
}

.tp-profile span,
.service-grid span,
.offer-box span,
.offer-box label{
  display: block;
  color: #64748b;
  font-size: 13px;
  margin-bottom: 6px;
}

.tp-profile strong{
  font-size: 18px;
}

.tp-tabs{
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
}

.tp-tabs button{
  border: 1px solid #d8e0ec;
  background: #ffffff;
  color: #081735;
  border-radius: 8px;
  padding: 12px 16px;
  cursor: pointer;
  font-weight: 800;
}

.tp-tabs button.active{
  background: #172554;
  color: #ffffff;
  border-color: #172554;
}

.tab-panel{
  display: none;
}

.tab-panel.active{
  display: block;
}

.panel-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.panel-head h2{
  margin: 0;
}

.panel-head button,
.offer-box button{
  border: 0;
  background: #ff7a00;
  color: #ffffff;
  border-radius: 8px;
  padding: 12px 18px;
  font-weight: 900;
  cursor: pointer;
}

.service-list{
  display: grid;
  gap: 14px;
}

.service-card{
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 18px;
  padding: 18px;
}

.badge{
  display: inline-flex;
  background: #fff3e7;
  color: #d86400;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 10px;
}

.service-main h3{
  margin: 0;
  font-size: 24px;
}

.service-main p{
  color: #64748b;
  margin: 8px 0 16px;
}

.service-grid{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.service-grid div{
  background: #f8fafc;
  border: 1px solid #e1e8f2;
  border-radius: 8px;
  padding: 12px;
}

.service-grid strong{
  font-size: 16px;
}

.offer-box{
  background: #f8fafc;
  border: 1px solid #e1e8f2;
  border-radius: 8px;
  padding: 14px;
}

.offer-box > strong{
  display: block;
  font-size: 24px;
  color: #172554;
  margin-bottom: 14px;
}

.offer-box input{
  width: 100%;
  height: 44px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0 12px;
  font-weight: 800;
  margin-top: 6px;
  margin-bottom: 12px;
}

.offer-box button{
  width: 100%;
}

.empty-state,
.loading{
  padding: 24px;
}

.empty-state h2{
  margin: 0 0 8px;
}

.empty-state p{
  margin: 0;
  color: #64748b;
}

@media (max-width: 760px){
  .tp-header{
    grid-template-columns: 1fr;
  }

  .tp-profile,
  .service-card,
  .service-grid{
    grid-template-columns: 1fr;
  }

  .tp-tabs{
    overflow-x: auto;
  }

  .tp-tabs button{
    white-space: nowrap;
  }
}

.tp-card.compact{
  align-items: center;
}

.tp-money-box{
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  padding: 14px 16px;
  min-width: 180px;
  background: #f8fafc;
}

.tp-money-box span,
.tp-money-box small,
.tp-service-grid span{
  display: block;
  color: #52627a;
  font-size: 13px;
}

.tp-money-box strong,
.tp-service-grid strong{
  display: block;
  color: #06163a;
  font-size: 20px;
  margin-top: 4px;
}

.tp-service-grid{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 16px;
}

.tp-service-grid div{
  background: #f8fafc;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  padding: 12px;
}

.pill{
  display: inline-flex;
  border-radius: 999px;
  padding: 7px 12px;
  font-weight: 800;
  font-size: 13px;
  margin-bottom: 10px;
}

.pill.pending{
  background: #fff7ed;
  color: #c75a00;
}

.pill.accepted,
.pill.assigned{
  background: #e8f7ef;
  color: #087344;
}

.pill.rejected{
  background: #fee2e2;
  color: #b91c1c;
}

.empty-state{
  background: #ffffff;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  padding: 22px;
  color: #52627a;
  font-weight: 700;
}

.empty-state.error{
  color: #c2410c;
}

@media (max-width: 800px){
  .tp-service-grid{
    grid-template-columns: 1fr 1fr;
  }

  .tp-card.compact{
    align-items: stretch;
  }

  .tp-money-box{
    min-width: 0;
  }
}

.tp-tabs .tab-btn{
  background: #ffffff;
  color: #06163a;
  border: 1px solid #d7dfec;
  border-radius: 8px;
  font-weight: 800;
  padding: 14px 18px;
  cursor: pointer;
}

.tp-tabs .tab-btn.active{
  background: #172452;
  color: #ffffff;
  border-color: #172452;
}

.tp-card{
  background: #ffffff;
  border: 1px solid #d8e0ec;
  border-radius: 8px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, .06);
  padding: 18px;
}

.tp-card.compact{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.tp-card h3{
  margin: 0;
  font-size: 22px;
}

.tp-card p{
  margin: 8px 0 0;
  color: #64748b;
}

.tp-money-box{
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  padding: 14px 16px;
  min-width: 180px;
  background: #f8fafc;
}

.tp-money-box span,
.tp-money-box small,
.tp-service-grid span{
  display: block;
  color: #52627a;
  font-size: 13px;
}

.tp-money-box strong,
.tp-service-grid strong{
  display: block;
  color: #06163a;
  font-size: 20px;
  margin-top: 4px;
}

.tp-service-grid{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 16px;
}

.tp-service-grid div{
  background: #f8fafc;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  padding: 12px;
}

.pill{
  display: inline-flex;
  border-radius: 999px;
  padding: 7px 12px;
  font-weight: 800;
  font-size: 13px;
  margin-bottom: 10px;
}

.pill.pending{
  background: #fff7ed;
  color: #c75a00;
}

.pill.accepted,
.pill.assigned{
  background: #e8f7ef;
  color: #087344;
}

.pill.rejected{
  background: #fee2e2;
  color: #b91c1c;
}

@media (max-width: 800px){
  .tp-card.compact{
    display: block;
  }

  .tp-money-box{
    margin-top: 14px;
    min-width: 0;
  }

  .tp-service-grid{
    grid-template-columns: 1fr 1fr;
  }
}

.assigned-card{
  display: block;
}

.assigned-head{
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.assigned-head h3{
  margin: 8px 0 6px;
  font-size: 24px;
}

.assigned-head p{
  margin: 0;
  color: #52627a;
}

.assigned-status{
  border-radius: 999px;
  padding: 9px 13px;
  font-weight: 900;
  white-space: nowrap;
}

.assigned-status.ok{
  background: #e8f7ef;
  color: #087344;
}

.assigned-status.blocked{
  background: #fff7ed;
  color: #c75a00;
}

.assigned-detail{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.assigned-detail > div{
  background: #f8fafc;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  padding: 12px;
}

.assigned-detail span{
  display: block;
  color: #52627a;
  font-size: 13px;
  margin-bottom: 5px;
}

.assigned-detail strong{
  display: block;
  font-size: 17px;
}

.assigned-detail small{
  display: block;
  color: #52627a;
  margin-top: 5px;
  line-height: 1.35;
}

.assigned-actions{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.primary-action,
.secondary-action,
.disabled-action{
  border: 0;
  border-radius: 8px;
  padding: 12px 10px;
  font-weight: 900;
  cursor: pointer;
}

.primary-action{
  background: #ff7a00;
  color: #ffffff;
}

.secondary-action{
  background: #172452;
  color: #ffffff;
}

.disabled-action{
  background: #aab3c2;
  color: #ffffff;
  cursor: not-allowed;
}

.assigned-warning{
  color: #c75a00;
  font-weight: 800;
  margin: 14px 0 0;
}

@media (max-width: 800px){
  .assigned-head,
  .assigned-detail{
    display: grid;
    grid-template-columns: 1fr;
  }

  .assigned-actions{
    grid-template-columns: 1fr;
  }
}

.cajas-detail{
  margin-top: 12px;
  background: #f8fafc;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  padding: 12px 14px;
  max-width: 360px;
}

.cajas-detail span{
  display: block;
  color: #52627a;
  font-size: 13px;
  margin-bottom: 8px;
}

.cajas-detail p{
  margin: 4px 0;
  color: #06163a;
  font-weight: 800;
}

.package-box{
  border-width: 2px;
}

.package-box strong{
  display: block;
  font-size: 17px;
}

.package-box small{
  display: block;
  margin-top: 5px;
  color: #52627a;
  font-size: 12px;
  line-height: 1.25;
}

.package-premium{
  background: #fff7ed !important;
  border-color: #ff7a00 !important;
}

.package-premium strong{
  color: #c75a00;
}

.package-standard{
  background: #eef6ff !important;
  border-color: #0b63ce !important;
}

.package-standard strong{
  color: #0b3d91;
}

.package-basic{
  background: #f4f7fb !important;
  border-color: #94a3b8 !important;
}

.package-basic strong{
  color: #172033;
}

.offer-box input{
  width: 100%;
  height: 44px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0 12px;
  margin-top: 6px;
  margin-bottom: 12px;
  color: #06163a;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0;
  background: #ffffff;
}

.offer-box input:focus{
  outline: none;
  border-color: #ff7a00;
  box-shadow: 0 0 0 3px rgba(255, 122, 0, .14);
}

.offer-date{
  display: block;
  margin-top: 6px;
  color: #52627a;
  font-size: 13px;
  font-weight: 700;
}

.tp-progress-box{
  margin: 14px 0;
  background: #f8fafc;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  padding: 12px;
}

.tp-progress-head{
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: #52627a;
  margin-bottom: 8px;
}

.tp-progress-head strong{
  color: #06163a;
}

.tp-progress-bar{
  height: 8px;
  background: #e5eaf2;
  border-radius: 999px;
  overflow: hidden;
}

.tp-progress-bar span{
  display: block;
  height: 100%;
  background: #ff7a00;
  border-radius: 999px;
}

.tp-progress-steps{
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  margin-top: 10px;
}

.tp-progress-steps div{
  color: #94a3b8;
  font-size: 11px;
  text-align: center;
  font-weight: 700;
}

.tp-progress-steps div.done{
  color: #087344;
}

.evidence-action{
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  background: #0f766e;
  color: #ffffff;
  font-weight: 900;
  cursor: pointer;
  text-align: center;
  padding: 12px 16px;
}

.evidence-action input{
  display: none;
}

.evidence-action:hover{
  background: #0d665f;
}

.tp-detail-modal{
  position: fixed;
  inset: 0;
  z-index: 9999;
}

.tp-detail-backdrop{
  position: absolute;
  inset: 0;
  background: rgba(8, 23, 53, .55);
}

.tp-detail-panel{
  position: relative;
  width: min(980px, calc(100% - 32px));
  max-height: calc(100vh - 32px);
  margin: 16px auto;
  background: #ffffff;
  border-radius: 10px;
  overflow: auto;
  box-shadow: 0 30px 80px rgba(8, 23, 53, .28);
}

.tp-detail-head{
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #172554;
  color: #ffffff;
  padding: 18px;
}

.tp-detail-head span,
.tp-detail-head p{
  color: #dbeafe;
}

.tp-detail-head h2,
.tp-detail-head p{
  margin: 0;
}

.tp-detail-head button{
  border: 0;
  background: #ff7a00;
  color: #ffffff;
  border-radius: 8px;
  padding: 12px 16px;
  font-weight: 900;
  cursor: pointer;
}

.tp-detail-body{
  display: grid;
  gap: 14px;
  padding: 18px;
}

.tp-detail-card{
  border: 1px solid #d8e0ec;
  border-radius: 8px;
  padding: 16px;
  background: #ffffff;
}

.tp-detail-card h3{
  margin: 0 0 12px;
  color: #081735;
}

.tp-detail-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.detail-item,
.detail-route,
.detail-link,
.detail-locked{
  background: #f8fafc;
  border: 1px solid #e1e8f2;
  border-radius: 8px;
  padding: 12px;
}

.detail-item span,
.detail-route span,
.detail-link span{
  display: block;
  color: #52627a;
  font-size: 13px;
  margin-bottom: 5px;
}

.detail-item strong,
.detail-route strong,
.detail-link strong{
  color: #081735;
  font-size: 16px;
}

.detail-route p,
.detail-route small{
  margin: 4px 0 0;
  color: #334155;
}

.detail-locked{
  grid-column: 1 / -1;
  color: #c2410c;
  font-weight: 800;
  background: #fff7ed;
  border-color: #fed7aa;
}

.detail-text{
  grid-column: 1 / -1;
  white-space: pre-wrap;
  margin: 0;
  background: #f8fafc;
  border: 1px solid #e1e8f2;
  border-radius: 8px;
  padding: 12px;
  font-family: Arial, sans-serif;
  color: #081735;
}

.detail-list{
  grid-column: 1 / -1;
  margin: 0;
  padding-left: 20px;
}

.detail-muted{
  grid-column: 1 / -1;
  margin: 0;
  color: #52627a;
  font-weight: 700;
}

.detail-link{
  text-decoration: none;
}

.detail-link:not(.disabled){
  border-color: #bfdbfe;
  background: #eff6ff;
}

.detail-link.disabled{
  opacity: .7;
}

@media (max-width: 760px){
  .tp-detail-panel{
    width: 100%;
    max-height: 100vh;
    margin: 0;
    border-radius: 0;
  }

  .tp-detail-head{
    align-items: flex-start;
  }

  .tp-detail-grid{
    grid-template-columns: 1fr;
  }
}