:root {
  --bg: #F8F9FA;
  --surface: #FFFFFF;
  --surface-soft: #E8F0FE;
  --text: #202124;
  --muted: #5F6368;
  --border: #DADCE0;
  --primary: #4285F4;       
  --primary-dark: #1967D2;  
  --accent: #FBBC04;        
  --success: #34A853;      
  --danger: #EA4335;        
  --shadow: 0 12px 30px rgba(66, 133, 244, 0.12);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
}

button,
input,
select,
textarea {
  font: inherit;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 52px 20px 76px;
}

.hero__content,
.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.eyebrow,
.section-kicker {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
}

.hero h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.05;
}

.hero p:last-child {
  max-width: 760px;
  margin: 16px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.05rem;
}

.container {
  margin-top: 0;
  padding-bottom: 56px;
}

.panel,
.colleague-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.panel {
  padding: 28px;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.section-heading h2 {
  margin: 0;
  font-size: 1.45rem;
}

.helper-text {
  margin: 8px 0 0;
  color: var(--muted);
}

.identity-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr auto;
  gap: 18px;
  align-items: end;
}

label > span,
.field-label {
  display: block;
  margin-bottom: 7px;
  font-weight: 650;
  font-size: 0.93rem;
}

select,
input,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: white;
  color: var(--text);
  padding: 11px 12px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

select:focus,
input:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(23, 63, 103, 0.12);
}

input[readonly] {
  background: var(--surface-soft);
}

.button {
  border: 0;
  border-radius: 12px;
  padding: 11px 18px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s, opacity 0.15s, background 0.15s;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.button--primary {
  background: var(--primary);
  color: white;
}

.button--primary:hover:not(:disabled) {
  background: var(--primary-dark);
}

.button--secondary {
  background: var(--surface-soft);
  color: var(--primary);
  border: 1px solid var(--border);
}

.summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 22px 0 34px;
}

.summary-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 20px;
}

.summary-card span {
  display: block;
  color: var(--muted);
  font-size: 0.88rem;
}

.summary-card strong {
  display: block;
  margin-top: 4px;
  font-size: 1.7rem;
}

.colleagues-list {
  display: grid;
  gap: 18px;
}

.colleague-card {
  overflow: hidden;
}

.colleague-card__header {
  width: 100%;
  border: 0;
  background: var(--surface);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 20px 22px;
  cursor: pointer;
  text-align: left;
}

.colleague-card__header > div:first-child {
  display: flex;
  align-items: center;
  gap: 13px;
}

.colleague-number {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--surface-soft);
  color: var(--primary);
  font-weight: 800;
}

.colleague-name {
  margin: 0;
  font-size: 1.05rem;
}

.header-status {
  display: flex;
  align-items: center;
  gap: 14px;
}

.status-badge {
  border-radius: 999px;
  padding: 5px 10px;
  background: #fff4e5;
  color: #8a4b08;
  font-size: 0.78rem;
  font-weight: 750;
}

.status-badge.complete {
  background: #e8f7ef;
  color: var(--success);
}

.chevron {
  color: var(--muted);
  transition: transform 0.2s;
}

.colleague-card.collapsed .chevron {
  transform: rotate(180deg);
}

.colleague-card__body {
  padding: 0 22px 24px;
  border-top: 1px solid var(--border);
}

.colleague-card.collapsed .colleague-card__body {
  display: none;
}

.criteria-section {
  padding-top: 22px;
}

.criteria-section h4 {
  margin: 0 0 14px;
  font-size: 1rem;
}

.criteria-section h4 small {
  margin-left: 8px;
  font-weight: 500;
  color: var(--muted);
}

.criteria-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.special-grid {
  grid-template-columns: minmax(0, 1fr) minmax(160px, 0.35fr);
}

.criterion-field {
  border-radius: 14px;
  background: var(--surface-soft);
  padding: 12px;
}

.criterion-field label {
  display: block;
  min-height: 42px;
  margin-bottom: 8px;
  font-size: 0.9rem;
  font-weight: 650;
}

.criterion-field select {
  background: white;
}

.comments-field {
  display: block;
  margin-top: 20px;
}

.average-row {
  margin-top: 18px;
  padding: 15px 17px;
  border-radius: 14px;
  background: var(--primary);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.average-value {
  font-size: 1.45rem;
}

.footer-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

.form-message {
  margin: 12px 0 0;
  text-align: right;
  font-weight: 650;
}

.form-message.error {
  color: var(--danger);
}

.form-message.success {
  color: var(--success);
}

.hidden {
  display: none !important;
}

@media (max-width: 900px) {
  .identity-grid,
  .criteria-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .identity-actions {
    grid-column: 1 / -1;
  }

  .identity-actions .button {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .hero {
    padding-top: 38px;
  }

  .panel {
    padding: 22px 18px;
  }

  .identity-grid,
  .summary,
  .criteria-grid,
  .special-grid {
    grid-template-columns: 1fr;
  }

  .section-heading,
  .footer-actions {
    flex-direction: column;
  }

  .footer-actions .button,
  .section-heading--evaluation .button {
    width: 100%;
  }

  .colleague-card__header {
    align-items: flex-start;
  }

  .header-status {
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
  }
}

.encabezado-principal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  width: 100%;
  margin-bottom: 0;
}

.encabezado-texto {
  flex: 1;
}

.encabezado-texto h1 {
  margin: 0 0 8px;
}

.encabezado-texto p {
  margin: 0;
}

.logos-encabezado {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 22px;
  flex-shrink: 0;
  max-width: 48%;
}

.logo-encabezado {
  width: clamp(140px, 18vw, 220px);
  height: auto;
  object-fit: contain;
}

@media (max-width: 700px) {
  .encabezado-principal {
    flex-direction: column-reverse;
    align-items: flex-start;
  }

  .logos-encabezado {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
  }

  .logo-encabezado {
    width: 160px;
    max-width: 45%;
  }
}

.criteria-guide {
  width: min(1180px, calc(100% - 32px));
  margin: -38px auto 22px;
  position: relative;
  z-index: 2;
}

.guide-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.guide-panel summary {
  cursor: pointer;
  padding: 20px 24px;
  font-weight: 800;
  color: var(--primary);
  list-style: none;
}

.guide-panel summary::-webkit-details-marker {
  display: none;
}

.guide-panel summary::after {
  content: "+";
  float: right;
  font-size: 1.4rem;
  line-height: 1;
}

.guide-panel[open] summary::after {
  content: "−";
}

.guide-content {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  padding: 0 24px 24px;
  border-top: 1px solid var(--border);
}

.guide-section {
  padding-top: 22px;
}

.guide-section h2 {
  margin: 0 0 16px;
  color: var(--primary);
  font-size: 1.2rem;
}

.guide-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.guide-item:last-child {
  border-bottom: 0;
}

.guide-item h3 {
  margin: 0 0 6px;
  font-size: 0.98rem;
}

.guide-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 0.92rem;
}

@media (max-width: 700px) {
  .guide-content {
    grid-template-columns: 1fr;
  }

  .criteria-guide {
    margin-top: -24px;
  }
}

/* ============================================================
   TEMA SIUMA CORREGIDO
   ============================================================ */

.theme-siuma {
  --siuma-blue: #0b2d6b;
  --siuma-blue-medium: #2563c7;
  --siuma-blue-light: #dcecff;
  --siuma-blue-lighter: #edf5ff;
  --siuma-yellow: #f4b900;
}

/* Portada blanca, texto negro y detalles corporativos discretos. */
.theme-siuma .hero {
  color: #111111;
  background:
    linear-gradient(
      130deg,
      transparent 0%,
      transparent 68%,
      rgba(37, 99, 199, 0.045) 68%,
      rgba(37, 99, 199, 0.045) 76%,
      transparent 76%
    ),
    linear-gradient(
      130deg,
      transparent 0%,
      transparent 80%,
      rgba(244, 185, 0, 0.055) 80%,
      rgba(244, 185, 0, 0.055) 85%,
      transparent 85%
    ),
    #ffffff;
  border-bottom: 1px solid #dce4ee;
  box-shadow: 0 12px 30px rgba(15, 45, 95, 0.06);
}

.theme-siuma .hero h1 {
  color: #111111;
}

.theme-siuma .hero p:last-child {
  color: #4b5563;
}

.theme-siuma .hero .eyebrow {
  color: var(--siuma-blue-medium);
}

/* Los logos se muestran normales, sin filtros ni recuadros. */
.theme-siuma .logos-encabezado {
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.theme-siuma .logo-siuma,
.theme-siuma .logo-secundario {
  filter: none;
  opacity: 1;
}

/* Barra completa del colega en azul claro. */
.theme-siuma .colleague-card {
  border: 1px solid #bfd4ef;
  border-top: 4px solid var(--siuma-yellow);
  box-shadow: 0 12px 28px rgba(19, 66, 126, 0.09);
}

.theme-siuma .colleague-card__header {
  position: relative;
  background:
    linear-gradient(
      90deg,
      #d8eaff 0%,
      #e4f1ff 55%,
      #dcecff 100%
    );
  border-left: 6px solid var(--siuma-blue-medium);
  color: var(--text);
}

.theme-siuma .colleague-name {
  color: var(--text);
  font-weight: 800;
}

.theme-siuma .colleague-number {
  background: rgba(255, 255, 255, 0.78);
  color: var(--siuma-blue-medium);
  border: 1px solid rgba(37, 99, 199, 0.18);
}

.theme-siuma .header-status {
  gap: 12px;
}

/* Puntuación visible antes del estado. */
.header-score {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  color: #172235;
  font-size: 0.92rem;
  font-weight: 700;
}

.score-star {
  color: var(--siuma-yellow);
  font-size: 1.12rem;
  line-height: 1;
  text-shadow: 0 1px 1px rgba(128, 91, 0, 0.18);
}

.header-score-value {
  font-weight: 800;
}

/* Desplegables con etiquetas descriptivas manteniendo valor numérico. */
.theme-siuma .criterion-field select {
  font-size: 0.86rem;
}

.theme-siuma .status-badge {
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.03);
}

/* La barra no cambia a verde al completarse; solo cambia la insignia. */
.theme-siuma .colleague-card[data-complete="true"] .colleague-card__header {
  background:
    linear-gradient(
      90deg,
      #d8eaff 0%,
      #e4f1ff 55%,
      #dcecff 100%
    );
}

.guide-content {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.guide-item p:empty {
  display: none;
}

.criteria-section.hidden {
  display: none;
}

@media (max-width: 700px) {
  .theme-siuma .logos-encabezado {
    max-width: 100%;
  }

  .theme-siuma .header-status {
    gap: 7px;
  }

  .header-score {
    font-size: 0.82rem;
  }
}
