.page-ficha {
  --radius: 14px;
  --radius-md: 14px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .06);
  --shadow-md: 0 10px 24px rgba(16, 24, 40, .10);
  --shadow-lg: 0 16px 34px rgba(16, 24, 40, .14);
}

.page-ficha .surface {
  box-shadow: var(--shadow-sm);
  border-radius: var(--radius);
  border: 1px solid #eef0f4;
  background: #fff;
}

.page-ficha .card.surface-card {
  box-shadow: var(--shadow-md);
  border-radius: var(--radius);
  border: 1px solid #eef0f4;
  background: #fff;
  overflow: hidden;
}

.page-ficha .chart-shell {
  position: relative;
  min-height: 220px;
}

.page-ficha .chart-shell canvas {
  display: block;
  width: 100% !important;
  height: 220px !important;
}

.page-ficha .elevate-hover {
  transition: transform .18s ease, box-shadow .18s ease;
}

.page-ficha .elevate-hover:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.page-ficha .section-title {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin: 0;
  font-size: 1rem;
}

.page-ficha .section-title i { opacity: .78; }
.page-ficha .page-title { font-size: 1.25rem; }

.page-ficha .pill-ruc {
  border-radius: 999px;
  background: #198754;
  color: #fff;
  padding: .25rem .75rem;
  font-weight: 700;
  display: inline-block;
}

.page-ficha .badge-soft {
  background: #eef2ff;
  border: 1px solid #dbe3ff;
  color: #1d4ed8;
  font-weight: 600;
  border-radius: 999px;
  padding: .18rem .6rem;
  display: inline-block;
}

.page-ficha .badge-soft.orange {
  background: #fff4e5;
  border-color: #ffd9b0;
  color: #b45309;
}

.page-ficha .addr {
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  line-height: 1.35;
}

.page-ficha .meta-dim { font-size: .94rem; color: #475569; }
.page-ficha .chip { border: 1px solid #e5e7eb; border-radius: 999px; padding: .2rem .55rem; font-size: .8rem; }
.page-ficha .rank-badge { border-radius: 999px; padding: .25rem .55rem; }
.page-ficha .rank-ok { background: #e9f0ff; color: #1d4ed8; border: 1px solid #cfe0ff; }
.page-ficha .rank-na { background: #f3f4f6; color: #6b7280; border: 1px solid #e5e7eb; }

.page-ficha .kpi-business {
  border: 1px dashed #e5e7eb;
  border-radius: 12px;
  padding: .75rem .85rem;
  background: #fff;
}

.page-ficha .kpi-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #F1F5FF;
  color: #4F46E5;
  font-size: 1.1rem;
  flex: 0 0 40px;
}

.page-ficha .kpi-icon.kpi-blue { background: #ECF3FF; color: #1D4ED8; }
.page-ficha .kpi-icon.kpi-purple { background: #F2ECFF; color: #5A47FF; }
.page-ficha .kpi-icon.kpi-teal { background: #E9FBF7; color: #0F766E; }
.page-ficha .card-table-pad { padding: .75rem .9rem; }

.page-ficha .table-skin { overflow: hidden; background: #fff; }
.page-ficha .dlist { margin: 0; padding: 0; list-style: none; font-size: .85rem; }
.page-ficha .ditem { margin: 0; }
.page-ficha .drow {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  justify-content: space-between;
  padding: .5rem .9rem;
  cursor: pointer;
  background: #fff;
}

.page-ficha .drow:hover { background: #fafcff; }
.page-ficha .drow .c1 { flex: 1 1 auto; min-width: 0; white-space: normal; overflow: visible; text-overflow: clip; }
.page-ficha .drow .cell { margin: .3rem 0; }
.page-ficha .drow .caret { color: #64748b; display: inline-flex; align-items: center; }
.page-ficha .drow .caret i { font-size: 18px; transition: transform .18s ease; }
.page-ficha details[open] .drow .caret i { transform: rotate(180deg); }
.page-ficha .dcontent { padding: .55rem .9rem .8rem; border-top: 1px dashed #e5e7eb; background: #fcfcff; }
.page-ficha .m-label { display: block; font-size: .72rem; letter-spacing: .02em; text-transform: uppercase; color: #6b7280; margin-bottom: .1rem; }
.page-ficha .f-sizing { font-size: .95rem; }

.page-ficha .badge-role {
  background: #f6f9ff;
  border: 1px solid #e3ecff;
  color: #1d4ed8;
  border-radius: 999px;
  padding: .15rem .5rem;
  font-size: .78rem;
  white-space: nowrap;
  display: inline-block;
  line-height: 1.2;
}

.page-ficha .badge-role.role-green { background: #E8F6EE; border-color: #CBEAD8; color: #0E7A4D; }
.page-ficha .badge-role.role-blue { background: #EAF3FF; border-color: #D5E7FF; color: #1D4ED8; }
.page-ficha .badge-role.role-indigo { background: #EEF1FF; border-color: #DCE2FF; color: #4F46E5; }
.page-ficha .badge-role.role-amber { background: #FFF7E6; border-color: #FFE1B0; color: #B45309; }
.page-ficha .badge-role.role-teal { background: #E9FBF7; border-color: #C8F3EA; color: #0F766E; }
.page-ficha .badge-role.role-purple { background: #F5EAFE; border-color: #E6D4FB; color: #7C3AED; }
.page-ficha .badge-role.role-slate { background: #F1F5F9; border-color: #E2E8F0; color: #475569; }

.page-ficha .count-badge {
  display: inline-block;
  min-width: 28px;
  padding: .15rem .45rem;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #f8fafc;
  font-weight: 600;
  line-height: 1;
  font-size: .82rem;
  color: #334155;
}

.page-ficha .dheader { display: none; }
.page-ficha .ditem + .ditem .drow { border-top: 1px solid #e5e7eb; }

@media (min-width: 576px) {
  .page-ficha .drow { cursor: default; }
  .page-ficha .drow .caret { display: none; }
  .page-ficha .dcontent { display: none !important; }
  .page-ficha .dheader {
    display: grid;
    align-items: center;
    background: #f7f9ff;
    color: #6b7280;
    font-size: .85rem;
    font-weight: 600;
    border-bottom: 2px solid #cbd5e1;
    padding: .5rem .9rem;
  }

  .page-ficha .gcols-2 { grid-template-columns: 1fr 1.2fr; }
  .page-ficha .gcols-3 { grid-template-columns: 1fr 160px 100px; }
  .page-ficha .gcols-4 { grid-template-columns: 1.7fr .6fr 80px 84px; }
  .page-ficha .drow.gcols-2,
  .page-ficha .drow.gcols-3,
  .page-ficha .drow.gcols-4 { display: grid; }
  .page-ficha .drow.gcols-2 { grid-template-columns: 1fr 1.2fr; }
  .page-ficha .drow.gcols-3 { grid-template-columns: 1fr 160px 100px; }
  .page-ficha .drow.gcols-4 { grid-template-columns: 1.7fr .6fr 80px 84px; }
}

.page-ficha .chartjs-legend {
  padding: 2px 6px;
  border: 1px solid #E5E7EB;
  border-radius: 6px;
  display: inline-block;
  background: #fff;
}

.page-ficha .info-grid { row-gap: .75rem; }
.page-ficha .info-item { display: flex; align-items: flex-start; gap: .65rem; padding: .5rem .65rem; border: 1px solid #eef0f4; border-radius: 12px; background: #fff; }
.page-ficha .info-ico { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 16px; color: #1e40af; background: #eef2ff; }
.page-ficha .info-ico.green { background: #e9fdf3; color: #0f766e; }
.page-ficha .info-ico.orange { background: #fff4e5; color: #b45309; }
.page-ficha .info-ico.purple { background: #f4e9ff; color: #6d28d9; }
.page-ficha .info-ico.slate { background: #f1f5f9; color: #334155; }
.page-ficha .info-label { font-size: .75rem; text-transform: uppercase; letter-spacing: .02em; color: #6b7280; margin-top: .05rem; margin-bottom: .15rem; }
.page-ficha .info-value { line-height: 1.35; }

.page-ficha .hl-grid { row-gap: .75rem; }

.page-ficha .hl-item {
  display: flex;
  gap: .65rem;
  align-items: flex-start;
  border: 1px solid #eef0f4;
  border-radius: 12px;
  background: #fff;
  padding: .6rem .75rem;
}

.page-ficha .hl-ico {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #1e40af;
  background: #eef2ff;
}

.page-ficha .hl-ico.green { background: #e9fdf3; color: #0f766e; }
.page-ficha .hl-ico.orange { background: #fff4e5; color: #b45309; }
.page-ficha .hl-ico.violet { background: #f4e9ff; color: #6d28d9; }
.page-ficha .hl-ico.gray { background: #f1f5f9; color: #334155; }

.page-ficha .hl-label {
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .02em;
  color: #6b7280;
  margin-top: .05rem;
  margin-bottom: .15rem;
}

.page-ficha .hl-value { line-height: 1.35; }

.page-ficha .readmore {
  max-height: 3.2em;
  overflow: hidden;
  position: relative;
}

.page-ficha .readmore.expanded { max-height: none; }

.page-ficha .readmore-toggle {
  font-size: .85rem;
  text-decoration: none;
}

@media (min-width: 576px) {
  .page-ficha .info-grid > [class*="col-"] {
    padding-right: .5rem;
    padding-left: .5rem;
  }
}
