:root {
  --bg-main: #eef2ff;
  --bg-soft: #f7f9ff;

  --primary-blue: #263B7E;
  --primary-blue-soft: #41579a;
  --primary-purple: #82378A;
  --primary-purple-soft: #9c5aa3;

  --text: #1f2747;
  --text-soft: #6f7898;
  --text-inverse: #ffffff;

  --card: rgba(255, 255, 255, 0.74);
  --card-strong: rgba(255, 255, 255, 0.9);
  --card-tint: rgba(255, 255, 255, 0.55);

  --border: rgba(38, 59, 126, 0.16);
  --border-strong: rgba(130, 55, 138, 0.22);

  --shadow: 0 12px 30px rgba(38, 59, 126, 0.14);
  --shadow-strong: 0 14px 34px rgba(130, 55, 138, 0.18);

  --radius: 18px;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(130, 55, 138, 0.22), transparent 38%),
    radial-gradient(circle at top right, rgba(38, 59, 126, 0.2), transparent 40%),
    linear-gradient(180deg, #f9fbff 0%, #eef2ff 100%);
}

body {
  padding: env(safe-area-inset-top, 0) 10px env(safe-area-inset-bottom, 0);
}

.app-shell {
  height: 100dvh;
  display: grid;
  grid-template-rows: 1.07fr auto 1fr;
  gap: 10px;
  padding: 10px 0;
}

.card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  padding: 12px;
  min-height: 0;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.38), transparent 44%);
  pointer-events: none;
}

.brand-row,
.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.brand-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 12px;
  background: rgba(255,255,255,0.72);
  padding: 4px;
  box-shadow: inset 0 0 0 1px rgba(38, 59, 126, 0.08);
}

.brand-text {
  min-width: 0;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 1.08rem;
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: var(--text);
}

h2 {
  font-size: 0.96rem;
  line-height: 1.1;
  font-weight: 700;
  color: var(--text);
}

.subtitle,
.hint {
  color: var(--text-soft);
  font-size: 0.73rem;
}

.ghost-btn {
  border: none;
  background: linear-gradient(135deg, var(--primary-blue), var(--primary-purple));
  color: var(--text-inverse);
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(68, 66, 145, 0.24);
}

.store-indicators {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.indicator-box {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.indicator-box span {
  display: block;
  font-size: 0.68rem;
  color: var(--text-soft);
  margin-bottom: 3px;
}

.indicator-box strong {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text);
}

.inputs-grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  height: auto;
  align-items: start;
}

.input-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  border-radius: 16px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,0.30);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.24),
    inset 0 -2px 0 rgba(255,255,255,0.20),
    0 8px 18px rgba(38, 59, 126, 0.10);
  overflow: hidden;
  min-height: 196px;
  height: 196px;
}

.input-card-telefonia {
  background:
    linear-gradient(135deg, #82378A, #a362aa);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.22),
    0 8px 24px rgba(130, 55, 138, 0.16);
}

.input-card-computo {
  background:
    linear-gradient(135deg, #263B7E, #4c61a3);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.22),
    0 8px 24px rgba(38, 59, 126, 0.16);
}

.input-label,
.inputs-grid label > span {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.82);
  font-weight: 600;
}

.input-card input {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text-inverse);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.input-card input::placeholder {
  color: rgba(255, 255, 255, 0.58);
}

/* BODY */
.body-section {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.checks-grid-v3 {
  display: grid;
  grid-template-columns: 1.25fr 1.25fr;
  gap: 10px;
  align-items: stretch;
  margin-top: 0;
  height: auto;
}

.check-tile,
.initiative-horizontal {
  border: 1px solid var(--border);
  background: var(--card-strong);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.52),
    0 6px 18px rgba(38,59,126,0.08);
  border-radius: 14px;
}

.check-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 10px 8px;
  text-align: center;
  cursor: pointer;
  user-select: none;
  min-height: 96px;
  height: 96px;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.check-tile span {
  font-size: 0.77rem;
  font-weight: 800;
  line-height: 1.05;
  color: var(--text);
}

.check-tile small {
  font-size: 0.66rem;
  color: var(--text-soft);
  font-weight: 600;
  line-height: 1.1;
}

.check-tile input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.check-tile.active {
  background: linear-gradient(135deg, #263B7E, #82378A);
  border: none;

  box-shadow:
    0 10px 25px rgba(130, 55, 138, 0.35);

  transform: translateY(-2px) scale(1.02);
}

.check-tile.active span,
.check-tile.active small {
  color: white;
}

.check-tile:has(input:checked) {
  background: linear-gradient(135deg, #263B7E, #82378A);
  border: none;
  box-shadow: 0 10px 25px rgba(130, 55, 138, 0.35);
  transform: translateY(-2px) scale(1.02);
}

.check-tile:has(input:checked) span,
.check-tile:has(input:checked) small {
  color: white;
}

.check-tile {
  transition: all 0.18s ease;
}

.check-tile:active {
  transform: scale(0.97);
}

.initiative-horizontal {
  padding: 10px;
  min-height: 96px;
  height: 96px;
  background: linear-gradient(135deg, #263B7E, #82378A);
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.22),
    var(--shadow-strong);
}

/* CAMBIO CLAVE AQUÍ */
.initiative-title {
  display: flex;
  flex-direction: column;
  align-items: center; /* clave */
  justify-content: center;
  text-align: center;

  gap: 2px;
  font-weight: 800;
  margin-bottom: 8px;
  font-size: 0.92rem;
  line-height: 1;
  color: var(--text-inverse);
}

.initiative-title strong {
  font-size: 1.05rem; /* ligeramente más grande */
  font-weight: 900;
  color: var(--text-inverse);
}

.initiative-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.initiative-block {
  display: flex;
  flex-direction: column;
}

.initiative-block span {
  font-size: 0.63rem;
  color: rgba(255,255,255,0.8);
  margin-bottom: 4px;
  font-weight: 700;
}

.initiative-block select {
  width: 100%;
  padding: 7px 8px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.16);
  color: var(--text-inverse);
  font-size: 0.75rem;
  font-weight: 700;
  outline: none;
  backdrop-filter: blur(4px);
}

.initiative-block select option {
  color: var(--text);
  background: #ffffff;
}

.hidden {
  display: none;
}

/* BOTTOM */
.totals-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.total-box {
  border-radius: 16px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
  border: 1px solid var(--border);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.52);
  background: var(--card-strong);
}

.total-normal,
.total-box:first-child {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.9), rgba(244,247,255,0.84));
}

.total-alto {
  background: linear-gradient(135deg, #263B7E, #82378A);
  border-color: rgba(130, 55, 138, 0.2);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.22),
    var(--shadow-strong);
}

.total-label,
.total-box span {
  font-size: 0.75rem;
  color: var(--text-soft);
  margin-bottom: 4px;
  font-weight: 600;
}

.total-alto span,
.total-alto .total-label,
.total-alto strong,
.total-alto small {
  color: var(--text-inverse);
}

.total-box strong {
  font-size: 1.42rem;
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: 0.01em;
  color: var(--text);
}

.total-box small {
  color: var(--text-soft);
  font-size: 0.67rem;
  margin-top: 4px;
}

.mini-breakdown {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

.mini-breakdown > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.79rem;
  padding: 7px 2px;
  border-bottom: 1px solid rgba(38, 59, 126, 0.08);
}

.mini-breakdown span {
  color: var(--text-soft);
}

.mini-breakdown b {
  font-weight: 800;
  color: var(--text);
}

/* Limpieza de estilos viejos que ya no usas */
.checks-grid,
.checks-grid-v2,
.initiative-tile,
.initiative-header,
.initiative-group,
.initiative-caption {
  all: unset;
}

/* Responsive */
@media (max-width: 380px) {
  .app-shell {
    gap: 8px;
    padding: 8px 0;
    grid-template-rows: 1.06fr 0.78fr 0.96fr;
  }

  .card {
    padding: 10px;
  }

  .brand-logo {
    width: 48px;
    height: 48px;
  }

  .checks-grid-v3 {
    grid-template-columns: 1.4fr 0.8fr;
    gap: 8px;
  }

  .initiative-horizontal,
  .check-tile {
    min-height: 88px;
    height: 88px;
  }

  .initiative-title {
    font-size: 0.84rem;
    margin-bottom: 7px;
  }

  .initiative-title strong {
    font-size: 0.84rem;
  }

  .check-tile span {
    font-size: 0.71rem;
  }

  .check-tile small,
  .initiative-block span {
    font-size: 0.58rem;
  }

  .initiative-block select {
    font-size: 0.7rem;
    padding: 6px 7px;
  }

  .total-box strong {
    font-size: 1.18rem;
  }

  .input-card input {
    font-size: 1.26rem;
  }

  .subtitle,
  .hint {
    font-size: 0.68rem;
  }
}
.total-alto {
  color: white;
}

.total-alto strong,
.total-alto span,
.total-alto small {
  color: white;
}
.input-card-telefonia {
  align-items: center;
  text-align: center;
}

.input-card-telefonia small {
  color: rgba(255, 255, 255, 0.9);
  text-align: center;
}
.input-money {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.input-money span {
  font-size: 1.4rem;
  font-weight: 800;
  color: rgba(255,255,255,0.9);
}

.input-money input {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 800;
  background: transparent;
  border: none;
  outline: none;
  color: white;
  width: 80%;
}