:root {
  --font-title: "Teachers", sans-serif;
  --font-body: "Poppins", sans-serif;
  --color-primary: #1e3b58;
  --color-bg: #eef3f6;
  --color-accent: #4caacd;
  --color-cta: #f3a83f;
  --color-white: #ffffff;
  --color-text-soft: #c8d8e2;
  --color-shadow: rgba(30, 59, 88, 0.18);
  --auth-hero-image: url("../fondohero.webp");
  --fs-xs: 0.84rem;
  --fs-sm: 0.96rem;
  --fs-md: 1.06rem;
  --fs-lg: 1.2rem;
  --fs-xl: clamp(1.55rem, 6.2vw, 2.05rem);
  --radius-xl: 30px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --shadow-soft: 0 18px 45px -28px var(--color-shadow);
  --bottom-nav-item-height: 52px;
  --bottom-nav-padding-y: 0.5rem;
  --bottom-nav-padding-x: 0.52rem;
  --bottom-nav-total-height: 92px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  font-size: 16px;
  background: var(--color-bg);
  color: var(--color-primary);
  min-height: 100%;
  line-height: 1.45;
}

img {
  max-width: 100%;
  display: block;
}

button,
input,
textarea,
select {
  font: inherit;
}

.auth-body {
  min-height: 100dvh;
  background: #ffffff;
}

.auth-layout {
  min-height: 100dvh;
  display: grid;
  grid-template-rows: 55dvh 45dvh;
  overflow: hidden;
}

.auth-hero {
  background-color: #ffffff;
  background-image: var(--auth-hero-image);
  background-size: contain;
  background-position: center top;
  background-repeat: no-repeat;
}

@media (display-mode: standalone), (display-mode: fullscreen) {
  .auth-layout {
    grid-template-rows: minmax(210px, 48dvh) 1fr;
  }

  .auth-hero {
    background-size: contain;
    background-position: center top;
  }
}

@media (max-height: 760px) {
  .auth-layout {
    grid-template-rows: minmax(190px, 44dvh) 1fr;
  }
}

.auth-panel {
  background: linear-gradient(180deg, #ffffff 0%, #f9fbfd 100%);
  padding: 1.1rem 1.1rem 1.2rem;
}

.auth-forms {
  margin-top: 0;
}

.auth-card-wrap {
  max-width: 430px;
  margin: 0 auto;
}

.auth-form {
  display: none;
  animation: fade-in 240ms ease both;
}

.auth-form.is-active {
  display: grid;
  gap: 0.62rem;
}

.auth-form label {
  color: #1e3b58;
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.01em;
}

.auth-form input {
  border: 0;
  border-bottom: 1.5px solid rgba(30, 59, 88, 0.45);
  padding: 0.52rem 0;
  background: transparent;
  color: #1e3b58;
  font-size: var(--fs-md);
  outline: none;
  transition: border-color 220ms ease;
}

.auth-form input::placeholder {
  color: rgba(30, 59, 88, 0.52);
}

.auth-form input:focus {
  border-color: #1e3b58;
}

.btn {
  border: 0;
  border-radius: 14px;
  padding: 0.72rem 1rem;
  font-size: var(--fs-md);
  line-height: 1.2;
  cursor: pointer;
  transition: transform 220ms ease, filter 220ms ease;
}

.btn:hover {
  filter: brightness(1.03);
}

.btn:active {
  transform: translateY(1px) scale(0.995);
}

.btn-primary {
  background: var(--color-cta);
  color: #243747;
  font-weight: 700;
}

.btn-login {
  margin-top: 0.4rem;
  background: #4caacd;
  color: #ffffff;
  font-weight: 700;
  letter-spacing: 0.045em;
}

.btn-register.link-btn {
  margin-top: 0.25rem;
  width: 100%;
  background: #e9f7fd;
  color: #1e3b58;
  font-weight: 700;
  font-size: var(--fs-sm);
  letter-spacing: 0.015em;
  border: 1px solid rgba(76, 170, 205, 0.38);
  border-radius: 12px;
  padding: 0.64rem 0.75rem;
}

.login-options-row {
  margin: 0.14rem 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
}

.remember-row {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: var(--fs-sm);
  color: #1e3b58;
}

.remember-row input {
  width: 15px;
  height: 15px;
  margin: 0;
}

.link-btn {
  border: 0;
  background: transparent;
  color: #1e3b58;
  cursor: pointer;
  padding: 0;
  font-size: var(--fs-sm);
}

.inline-link {
  margin-top: 0.3rem;
  justify-self: start;
}

.signup-row {
  margin: 0.55rem 0 0;
  text-align: center;
  color: #1e3b58;
  font-size: var(--fs-sm);
}

/* Rewards entry in products view */
.store-rewards-entry {
  margin-top: 0.8rem;
  width: 100%;
  border: 1px solid rgba(107, 169, 197, 0.3);
  border-radius: 22px;
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 255, 255, 0.42), transparent 30%),
    linear-gradient(135deg, #1e3b58 0%, #245d7f 48%, #4caacd 100%);
  color: #ffffff;
  padding: 0.9rem 0.95rem;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 0.75rem;
  align-items: center;
  box-shadow: 0 22px 34px -28px rgba(25, 69, 104, 0.78);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
  text-align: left;
}

.store-rewards-entry:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
  box-shadow: 0 24px 40px -28px rgba(25, 69, 104, 0.92);
}

.store-rewards-entry:focus-visible {
  outline: 3px solid rgba(76, 170, 205, 0.28);
  outline-offset: 2px;
}

.store-rewards-entry-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 1.38rem;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

.store-rewards-entry-content {
  min-width: 0;
  display: grid;
  gap: 0.18rem;
}

.store-rewards-entry-kicker {
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.72);
}

.store-rewards-entry-content strong {
  display: block;
  font-size: 0.94rem;
  line-height: 1.08;
  font-weight: 800;
}

.store-rewards-entry-copy {
  font-size: 0.68rem;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.82);
}

.store-rewards-entry-meta {
  display: grid;
  justify-items: end;
  gap: 0.24rem;
}

.store-rewards-entry-tier,
.store-rewards-entry-points {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0.32rem 0.7rem;
  border-radius: 999px;
  white-space: nowrap;
}

.store-rewards-entry-tier {
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 0.67rem;
  font-weight: 700;
}

.store-rewards-entry-points {
  background: #ffffff;
  color: #1e3b58;
  font-size: 0.74rem;
  font-weight: 800;
  box-shadow: 0 12px 20px -16px rgba(7, 34, 54, 0.48);
}

.store-rewards-entry-arrow {
  font-size: 1.06rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.9);
}

.signup-btn {
  background: transparent;
  font-weight: 700;
  color: #1e3b58;
  font-size: var(--fs-sm);
  padding: 0;
  cursor: pointer;
}

.feedback {
  margin: 0.55rem 0 0;
  min-height: 1.2rem;
  color: #2d7ea0;
  font-size: var(--fs-xs);
}

.app-shell {
  min-height: 100dvh;
  padding-bottom: calc(var(--bottom-nav-total-height) + 0.6rem);
  background: #ffffff;
}

.center-alert-toast {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(13, 27, 40, 0.32);
  z-index: 90;
  padding: 1rem;
}

.center-alert-toast[hidden] {
  display: none;
}

.center-alert-card {
  position: relative;
  width: min(420px, 92vw);
  border-radius: 16px;
  padding: 0.95rem 1rem;
  border: 1px solid #d5e3f0;
  background: #ffffff;
  box-shadow: 0 22px 56px -34px rgba(12, 31, 48, 0.55);
  animation: rise-in 240ms ease both;
}

.center-alert-card.is-square {
  width: min(292px, 86vw);
  min-height: 232px;
  display: grid;
  align-content: center;
  text-align: center;
  padding: 1rem;
}

.center-alert-card.level-ok {
  border-color: #bfe2c9;
  background: #effbf3;
}

.center-alert-card.level-mild {
  border-color: #efcf95;
  background: #fff7ea;
}

.center-alert-card.level-high {
  border-color: #e8a0a0;
  background: #fef2f2;
  box-shadow: 0 22px 56px -34px rgba(180, 30, 30, 0.5);
}

.center-alert-card.level-high .center-alert-level {
  color: #b11e1e;
}

.center-alert-close {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 0;
  background: rgba(30, 59, 88, 0.08);
  color: #1e3b58;
  cursor: pointer;
  font-weight: 700;
}

.center-alert-level {
  margin: 0;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.16rem 0.5rem;
  font-size: 0.7rem;
  font-weight: 700;
  color: #1e3b58;
  background: rgba(30, 59, 88, 0.1);
}

.center-alert-title {
  margin: 0.38rem 0 0;
  color: #1e3b58;
  font-size: 0.9rem;
  font-weight: 700;
}

.center-alert-message {
  margin: 0.3rem 0 0;
  color: #2e4358;
  font-size: 0.84rem;
}

.center-alert-actions {
  margin: 0.55rem 0 0;
  padding-left: 1rem;
  display: grid;
  gap: 0.25rem;
}

.center-alert-actions li {
  color: #2b4257;
  font-size: 0.8rem;
  line-height: 1.45;
}

.center-alert-footer {
  margin-top: 0.6rem;
  display: flex;
  justify-content: flex-end;
}

.center-alert-primary-btn {
  border: 0;
  border-radius: 10px;
  padding: 0.5rem 0.8rem;
  background: #1e3b58;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.app-header {
  padding: 1.2rem 1rem 0.7rem;
}

.app-header .brand {
  background: var(--color-primary);
  border-radius: var(--radius-lg);
  color: var(--color-white);
  box-shadow: var(--shadow-soft);
  padding: 1rem;
}

.app-header h1 {
  margin: 0;
  font-size: 1.55rem;
}

.app-header p {
  margin: 0.3rem 0 0;
  color: var(--color-text-soft);
}

/* Pool Points profile card tiers */
.profile-points-card {
  --tier-text: #ffffff;
  --tier-muted: rgba(255, 255, 255, 0.86);
  --tier-badge-bg: rgba(231, 246, 255, 0.95);
  --tier-badge-text: #005083;
  --tier-points: #ffffff;
  position: relative;
  width: 100%;
  min-height: 142px;
  border-radius: 14px;
  padding: 16px 17px 14px;
  overflow: hidden;
  border: 1px solid rgba(30, 59, 88, 0.08);
  box-shadow: 0 14px 34px rgba(30, 59, 88, 0.12);
  transition: background 280ms ease, color 280ms ease, box-shadow 280ms ease;
  color: var(--tier-text);
}

.profile-points-card::after {
  content: "";
  position: absolute;
  right: -34px;
  bottom: -38px;
  width: 150px;
  height: 150px;
  background: url('../isotipo.png?v=2') center / contain no-repeat;
  opacity: 0.16;
  filter: brightness(0) invert(1);
  pointer-events: none;
  z-index: 0;
}

.profile-points-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 12% 8%, rgba(255,255,255,0.18), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,0.12), rgba(255,255,255,0));
  pointer-events: none;
  z-index: 0;
}

.profile-points-card > * {
  position: relative;
  z-index: 1;
}

.profile-card-head {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.profile-points-card .avatar-sm {
  width: 54px;
  height: 54px;
  border-radius: 11px;
  flex: 0 0 54px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.92);
  display: grid;
  place-items: center;
  font-weight: 900;
  color: #0a4f7d;
  box-shadow: 0 7px 18px rgba(12, 31, 48, 0.08);
  cursor: pointer;
  border: 0;
  padding: 0;
}

.profile-points-card .avatar-sm span {
  font-size: 0.82rem;
  line-height: 1;
}

.profile-points-card .avatar-sm img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-card-user {
  min-width: 0;
  padding-right: 3px;
}

.profile-points-card .profile-card-user h3,
.profile-points-card #profile-name {
  margin: 0;
  color: var(--tier-text);
  font-size: 0.92rem;
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.015em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-points-card .profile-email-line {
  margin: 0.24rem 0 0;
  color: var(--tier-muted);
  font-size: 0.72rem;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-points-card .tier-badge {
  align-self: start;
  justify-self: end;
  margin: 0;
  padding: 0.29rem 0.56rem;
  border-radius: 999px;
  background: var(--tier-badge-bg);
  color: var(--tier-badge-text);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 5px 16px rgba(12, 30, 40, 0.08);
  font-size: 0.56rem;
  line-height: 1;
  font-weight: 900;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  white-space: nowrap;
}

.profile-points-summary {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 17px;
}

.profile-points-card .points-value {
  margin: 0;
  color: var(--tier-points);
  font-size: 2rem;
  line-height: 0.92;
  font-weight: 900;
  letter-spacing: -0.065em;
}

.profile-points-card .points-label {
  display: grid;
  gap: 0;
  color: var(--tier-muted);
  font-size: 0.58rem;
  line-height: 1.05;
  font-weight: 700;
}

.profile-points-card .points-label strong,
.profile-points-card .points-label span {
  color: inherit;
}

.profile-points-card .profile-tier-benefit {
  margin: 0.6rem 0 0;
  max-width: 76%;
  color: var(--tier-muted);
  font-size: 0.64rem;
  line-height: 1.22;
  font-weight: 600;
}

.profile-points-card #open-admin-panel-btn {
  position: relative;
  z-index: 2;
}

.profile-points-card.tier-basic {
  --tier-text: #ffffff;
  --tier-muted: rgba(236, 248, 255, 0.9);
  --tier-badge-bg: rgba(232, 246, 255, 0.96);
  --tier-badge-text: #005083;
  --tier-points: #ffffff;
}

.profile-points-card.tier-silver {
  --tier-text: #101820;
  --tier-muted: rgba(16, 24, 32, 0.72);
  --tier-badge-bg: rgba(255, 255, 255, 0.82);
  --tier-badge-text: #5a5a5a;
  --tier-points: #101820;
  box-shadow: 0 14px 34px rgba(95, 108, 120, 0.13);
}

.profile-points-card.tier-gold {
  --tier-text: #121212;
  --tier-muted: rgba(18, 18, 18, 0.72);
  --tier-badge-bg: rgba(255, 246, 216, 0.9);
  --tier-badge-text: #5b4200;
  --tier-points: #121212;
  box-shadow: 0 16px 38px rgba(158, 117, 15, 0.16);
}

.profile-points-card.tier-diamond {
  --tier-text: #0b2d3c;
  --tier-muted: rgba(11, 45, 60, 0.72);
  --tier-badge-bg: rgba(255, 255, 255, 0.82);
  --tier-badge-text: #028ca4;
  --tier-points: #0b2d3c;
  box-shadow: 0 18px 44px rgba(2, 118, 148, 0.12);
}

.profile-points-card.tier-silver::after,
.profile-points-card.tier-gold::after,
.profile-points-card.tier-diamond::after {
  filter: brightness(0) invert(1);
  opacity: 0.21;
}

@media (max-width: 700px) {
  .profile-identity-row {
    display: block;
  }

  .profile-hero-top {
    grid-template-columns: 1fr !important;
    align-items: stretch;
  }

  .profile-points-card {
    width: 100%;
    margin: 0;
  }
}

@media (max-width: 420px) {
  .profile-points-card {
    min-height: 136px;
    padding: 14px 14px 13px;
  }

  .profile-card-head {
    grid-template-columns: 48px minmax(0, 1fr) auto;
    gap: 9px;
  }

  .profile-points-card .avatar-sm {
    width: 48px;
    height: 48px;
    flex-basis: 48px;
  }

  .profile-points-card .profile-card-user h3,
  .profile-points-card #profile-name {
    font-size: 0.86rem;
  }

  .profile-points-card .profile-email-line {
    font-size: 0.66rem;
  }

  .profile-points-card .tier-badge {
    padding: 0.25rem 0.46rem;
    font-size: 0.5rem;
  }

  .profile-points-summary {
    margin-top: 14px;
  }

  .profile-points-card .points-value {
    font-size: 1.78rem;
  }

  .profile-points-card .profile-tier-benefit {
    max-width: 78%;
    font-size: 0.59rem;
  }
}

.view {
  display: none;
  padding: 0 1rem 1rem;
}

main > .view:not(.is-active) {
  display: none !important;
}

#view-tienda {
  padding: 0 0 1rem;
  overflow-x: hidden;
}

.view.is-active {
  display: block;
  animation: fade-in 260ms ease both;
}

.card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 1rem;
  margin-bottom: 1rem;
}

.card h2,
.card h3 {
  margin-top: 0;
}

.form-grid {
  display: grid;
  gap: 0.75rem;
}

.field input {
  width: 100%;
  border: 0;
  border-radius: var(--radius-md);
  padding: 0.72rem 0.85rem;
  background: #f5f8fa;
  color: var(--color-primary);
  box-shadow: inset 0 0 0 1px rgba(30, 59, 88, 0.08);
}

.alert-box {
  border-radius: 16px;
  padding: 1rem 1.1rem;
  background: #f4f8fb;
  border: 1px solid #dce8f2;
  transition: all 220ms ease;
}

.alert-box strong {
  display: block;
  margin-bottom: 0.35rem;
}

.alert-title {
  font-size: 0.95rem;
}

.alert-box p {
  margin: 0.2rem 0 0;
  font-size: 0.82rem;
  line-height: 1.5;
}

.alert-details {
  margin: 0.5rem 0 0;
  padding-left: 1.2rem;
  font-size: 0.78rem;
  line-height: 1.6;
  color: #3a5a78;
}

.alert-ok {
  border-left: 6px solid #2e9e5a;
  background: #eafaf1;
  border-color: #b8e0c9;
}

.alert-ok .alert-title {
  color: #1b7540;
}

.alert-mild {
  border-left: 6px solid #e89b2a;
  background: #fff8ed;
  border-color: #f0d6a0;
}

.alert-mild .alert-title {
  color: #996b0e;
}

.alert-high {
  border-left: 6px solid #d43b3b;
  background: #fef2f2;
  border-color: #f0b8b8;
  box-shadow: 0 2px 16px rgba(212, 59, 59, 0.12);
}

.alert-high .alert-title {
  color: #b11e1e;
}

.alert-high p {
  color: #6d2e2e;
}

.guide-steps {
  display: grid;
  gap: 0.8rem;
}

.guide-step {
  border-radius: var(--radius-md);
  padding: 0.85rem;
  background: #f5f9fc;
}

.guide-media {
  margin-top: 0.5rem;
  border-radius: var(--radius-md);
  width: 100%;
  border: 0;
  aspect-ratio: 16 / 9;
}

.whatsapp-btn {
  display: inline-flex;
  width: 100%;
  justify-content: center;
  text-decoration: none;
  font-weight: 700;
}

.store-banner {
  position: relative;
  z-index: 4;
  background: var(--color-primary);
  color: var(--color-white);
  padding: 0.45rem 0;
  margin-left: -1rem;
  margin-right: -1rem;
  border-radius: 0;
  box-shadow: none;
  margin-bottom: 0;
  overflow: hidden;
}

.store-banner-track {
  display: inline-flex;
  align-items: center;
  gap: 2.25rem;
  width: max-content;
  white-space: nowrap;
  padding-left: 1rem;
  animation: store-banner-move 12s linear infinite;
}

.store-banner-item {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.flag-peru {
  width: 24px;
  height: 15px;
  border-radius: 2px;
  background: linear-gradient(
    90deg,
    #d91023 0% 33.33%,
    #ffffff 33.33% 66.66%,
    #d91023 66.66% 100%
  );
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
  flex: 0 0 auto;
}

@keyframes store-banner-move {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(calc(-50% - 1.125rem));
  }
}

.store-video-card {
  margin-left: -1rem;
  margin-right: -1rem;
  padding: 0;
  margin-bottom: 0;
}

.store-video-wrap {
  border-radius: 0;
  overflow: hidden;
  background: #000000;
  aspect-ratio: 21 / 8;
}

.store-video-wrap video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.store-showcase {
  padding: 0.9rem 0.7rem 1rem;
  background:
    radial-gradient(circle at top right, rgba(76, 170, 205, 0.16), transparent 32%),
    radial-gradient(circle at top left, rgba(30, 59, 88, 0.1), transparent 28%),
    linear-gradient(180deg, #edf4fa 0%, #ffffff 100%);
  min-height: 100%;
}

.store-showcase-panel {
  background: transparent;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}

.store-topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 0.8rem;
  padding-right: 0.15rem;
}

.store-heading-block {
  display: grid;
  gap: 0.22rem;
}

.store-kicker {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6a84a0;
}

.store-topbar-title {
  margin: 0;
  font-size: clamp(1.7rem, 8vw, 2.3rem);
  line-height: 0.98;
  font-weight: 800;
  color: #1e3b58;
}

.store-topbar-subtitle {
  margin: 0.12rem 0 0;
  color: #60788f;
  font-size: 0.76rem;
  line-height: 1.42;
  max-width: 30ch;
}

.store-cart-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  background: #1e3b58;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  flex: 0 0 auto;
  transition: transform 0.18s, filter 0.18s;
  position: relative;
  margin-right: 0.1rem;
}

.store-cart-icon-btn:hover {
  filter: brightness(1.04);
  transform: translateY(-1px);
}

.store-cart-icon-btn svg {
  width: 21px;
  height: 21px;
  fill: #ffffff;
}

.cart-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  background: #4caacd;
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.store-toolbar {
  margin-top: 0.95rem;
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  gap: 0.55rem;
  align-items: center;
}

@media (max-width: 420px) {
  .store-rewards-entry {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas:
      "icon content arrow"
      "meta meta meta";
    align-items: center;
  }

  .store-rewards-entry-icon { grid-area: icon; }
  .store-rewards-entry-content { grid-area: content; }
  .store-rewards-entry-meta {
    grid-area: meta;
    justify-items: start;
    grid-auto-flow: column;
    justify-content: start;
    gap: 0.45rem;
    padding-left: calc(48px + 0.75rem);
  }
  .store-rewards-entry-arrow { grid-area: arrow; }
}

.store-tool-btn {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid #d9e7f2;
  background: #ffffff;
  color: #52708a;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.store-tool-btn svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

.store-info-pill {
  min-height: 38px;
  border-radius: 999px;
  background: #f2f7fb;
  color: #58748d;
  padding: 0.45rem 0.75rem;
  display: grid;
  align-content: center;
  border: 1px solid #dbe8f2;
}

.store-info-pill strong,
.store-info-pill span {
  display: block;
}

.store-info-pill strong {
  font-size: 0.7rem;
}

.store-info-pill span {
  font-size: 0.62rem;
  opacity: 0.8;
}

.store-filters {
  display: flex;
  gap: 0.45rem;
  margin-top: 0.85rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.store-filters::-webkit-scrollbar {
  display: none;
}

.store-filter-btn {
  flex-shrink: 0;
  border: 0;
  border-radius: 999px;
  padding: 0.48rem 0.9rem;
  background: #eef3f8;
  color: #1e3b58;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease;
}

.store-filter-btn.is-active {
  background: #1e3b58;
  color: #ffffff;
}

.store-filter-btn:hover {
  background: #dce6f0;
}

.store-filter-btn.is-active:hover {
  background: #152b40;
}

.store-featured-product {
  margin-top: 0.9rem;
  border-radius: 22px;
  background: linear-gradient(145deg, #f2f8fd 0%, #ffffff 100%);
  border: 1px solid #dce8f2;
  padding: 0.95rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px;
  gap: 0.7rem;
  align-items: center;
}

.store-featured-copy {
  display: grid;
  gap: 0.28rem;
}

.store-featured-chip {
  justify-self: start;
  border-radius: 999px;
  padding: 0.16rem 0.5rem;
  background: #1e3b58;
  color: #ffffff;
  font-size: 0.62rem;
  font-weight: 700;
}

.store-featured-copy h3,
.store-featured-copy p,
.store-featured-copy strong {
  margin: 0;
}

.store-featured-copy h3 {
  color: #1e3b58;
  font-size: 1rem;
}

.store-featured-copy p {
  color: #667d93;
  font-size: 0.74rem;
  line-height: 1.42;
}

.store-featured-copy strong {
  color: #1e3b58;
  font-size: 1rem;
}

.store-featured-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin-top: 0.25rem;
}

.store-featured-btn {
  border: 0;
  border-radius: 999px;
  background: #1e3b58;
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.45rem 0.8rem;
  cursor: pointer;
  touch-action: manipulation;
}

.store-featured-media {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 18px;
  background: radial-gradient(circle at top, rgba(255,255,255,0.7), rgba(207, 226, 241, 0.24));
  display: grid;
  place-items: center;
}

.store-featured-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Cart view */
#view-carrito {
  padding: 0 0 1rem;
}

.cart-view-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1rem 0.8rem;
  border-bottom: 1px solid #e4ecf4;
}

.cart-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 600;
  color: #4caacd;
  padding: 0;
  flex: 0 0 auto;
}

.cart-back-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: #4caacd;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cart-view-title {
  flex: 1;
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: #1e3b58;
}

.cart-view-count {
  font-size: 0.76rem;
  color: #5f7389;
  font-weight: 700;
  flex: 0 0 auto;
}

.cart-view-body {
  padding: 0.75rem 1rem;
}

.store-title-block {
  padding: 1rem 1rem 0;
}

.store-title-block h2 {
  margin: 0;
  font-size: 1.12rem;
  color: #1e3b58;
}

.admin-products-panel {
  margin: 0.9rem 0 0;
  background: #f6fafc;
  border: 1px solid #d9e6f2;
  border-radius: 14px;
  padding: 0.85rem;
}

.admin-product-form {
  display: grid;
  gap: 0.45rem;
}

.admin-product-form label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #20415f;
}

.admin-product-form input,
.admin-product-form textarea {
  width: 100%;
  border: 1px solid #cfddeb;
  border-radius: 10px;
  padding: 0.52rem 0.62rem;
  background: #ffffff;
}

.admin-product-form textarea {
  resize: vertical;
}

.admin-image-picker {
  border: 1px dashed #c9d9ea;
  border-radius: 10px;
  background: #f7fbff;
  padding: 0.55rem;
}

.admin-image-preview {
  width: 100%;
  max-height: 160px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 0.35rem;
}

.admin-image-hint {
  margin: 0;
  font-size: 0.75rem;
  color: #5b6f82;
}

.admin-form-grid {
  display: grid;
  gap: 0.55rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-check-row {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.25rem;
}

.admin-check-row input {
  width: auto;
}

.admin-form-actions {
  display: flex;
  gap: 0.55rem;
  margin-top: 0.25rem;
}

.btn-secondary {
  border: 1px solid #c8d7e8;
  background: #ffffff;
  color: #1e3b58;
}

.admin-products-list {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.8rem;
}

.admin-product-item {
  display: grid;
  gap: 0.35rem;
  border: 1px solid #d6e4f1;
  background: #ffffff;
  border-radius: 12px;
  padding: 0.55rem 0.65rem;
}

.admin-product-top {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  align-items: center;
}

.admin-product-meta {
  margin: 0;
  font-size: 0.8rem;
  color: #2a4660;
}

.admin-product-actions {
  display: flex;
  gap: 0.45rem;
}

.admin-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 0.7rem;
  padding: 0.15rem 0.45rem;
  font-weight: 700;
}

.admin-chip-active {
  background: #def3e5;
  color: #1d7b3f;
}

.admin-chip-inactive {
  background: #f8e0dd;
  color: #983128;
}

.products-grid {
  display: grid;
  gap: 0.7rem;
  margin-top: 1rem;
  padding: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.product-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  border-radius: 18px;
  background: #ffffff;
  padding: 0.62rem;
  box-shadow: 0 18px 34px -30px rgba(30, 32, 37, 0.45);
  border: 1px solid #dce8f2;
}

.product-thumb-wrap {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(180deg, #eef5fb 0%, #ffffff 100%);
  aspect-ratio: 0.92 / 1;
}

.product-card img {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: contain;
  object-position: center;
  padding: 0.55rem;
}

.product-stock-chip {
  position: absolute;
  left: 0.42rem;
  top: 0.42rem;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 0.18rem 0.42rem;
  backdrop-filter: blur(2px);
}

.product-stock-chip.is-available {
  background: rgba(227, 248, 234, 0.95);
  color: #1b7a3f;
}

.product-stock-chip.is-out {
  background: rgba(255, 236, 236, 0.96);
  color: #9b2d2d;
}

.product-body {
  display: grid;
  gap: 0.32rem;
}

.product-category {
  margin: 0;
  color: #7088a0;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.product-card h4 {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.2;
  color: #1e3b58;
}

.product-card p {
  margin: 0;
  color: #688096;
  font-size: 0.68rem;
  line-height: 1.3;
  min-height: 2.45em;
}

.product-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  margin-top: 0.2rem;
}

.product-price {
  color: #1e3b58;
  font-size: 1rem;
}

.product-add-btn {
  width: 34px;
  min-width: 34px;
  height: 34px;
  border-radius: 50%;
  padding: 0;
  font-size: 0;
  font-weight: 700;
  display: grid;
  place-items: center;
  position: relative;
  z-index: 1;
  touch-action: manipulation;
}

.product-add-btn::before {
  content: "+";
  font-size: 1rem;
  line-height: 1;
}

.product-add-btn.is-added::before {
  content: "\2713";
  font-size: 0.92rem;
}

.product-add-btn.is-added {
  background: #1e3b58;
  color: #ffffff;
  transform: scale(1.05);
}

.product-add-btn[disabled] {
  background: #d7e3ef;
  color: #5c7186;
}

.store-cart-card {
  margin-top: 0;
  background: transparent;
  border-radius: 0;
  padding: 0.75rem 1rem;
  border: 0;
}

#cart-count {
  font-size: 0.76rem;
  color: #5f7389;
  font-weight: 700;
}

.cart-items {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 0.7rem;
}

.cart-item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.45rem;
  border-radius: 10px;
  background: #f7fbff;
  border: 1px solid #dce8f4;
  padding: 0.45rem 0.55rem;
}

.cart-item p {
  margin: 0;
  font-size: 0.78rem;
  color: #2e4153;
}

.cart-qty-controls {
  display: inline-flex;
  gap: 0.3rem;
  align-items: center;
}

.cart-qty-btn {
  border: 0;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: #1e3b58;
  color: #ffffff;
  font-size: 0.85rem;
  cursor: pointer;
}

.cart-qty-value {
  min-width: 20px;
  text-align: center;
  font-weight: 700;
  color: #1e3b58;
  font-size: 0.8rem;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  width: min(460px, calc(100% - 0.9rem));
  bottom: max(0.38rem, env(safe-area-inset-bottom));
  background: var(--color-primary);
  border-radius: 28px;
  box-shadow: 0 18px 34px -24px rgba(13, 31, 49, 0.85);
  border: 1px solid rgba(122, 169, 194, 0.22);
  padding: 0.4rem 0.42rem calc(0.46rem + env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.2rem;
  z-index: 30;
  overflow: visible;
}

.bottom-nav::before {
  content: none;
}

.nav-plus-btn {
  border: 0;
  border-radius: 50%;
  background: #f3a83f;
  color: #1e3b58;
  width: 56px;
  height: 56px;
  min-height: 56px;
  margin: -20px auto 0;
  font-size: 1.5rem;
  line-height: 1;
  font-weight: 700;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 14px 24px -16px rgba(33, 67, 96, 0.65), 0 0 0 5px var(--color-primary);
  position: relative;
  z-index: 2;
}

.nav-btn {
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: #a7c4d6;
  display: grid;
  justify-items: center;
  gap: 0.22rem;
  min-height: var(--bottom-nav-item-height);
  padding: 0.35rem 0.14rem;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-btn svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

.nav-btn.is-active {
  background: rgba(255, 255, 255, 0.14);
  color: var(--color-white);
  transform: translateY(-1px);
}

.nav-btn span {
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.profile-info {
  display: grid;
  gap: 0.7rem;
}

.profile-view {
  display: none;
  gap: 0.8rem;
  background: #edf3f8;
  margin: 0;
  padding: 0.7rem 0.65rem 1.1rem;
}

.view.is-active.profile-view {
  display: grid !important;
}

.profile-settings-card {
  background: linear-gradient(165deg, #f7f9fc 0%, #ffffff 100%);
  border: 1px solid #dae5ef;
  border-radius: 24px;
  padding: 0.9rem 0.82rem;
  box-shadow: 0 18px 32px -30px rgba(30, 59, 88, 0.45);
  display: grid;
  gap: 0.55rem;
}

.profile-settings-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.2rem;
}

.profile-settings-header h2 {
  margin: 0;
  text-align: center;
  font-size: 1rem;
  color: #1e3b58;
  font-weight: 800;
}

.profile-header-back {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 0;
  background: #e6eef6;
  color: #355878;
  display: grid;
  place-items: center;
  padding: 0;
  opacity: 0.95;
}

.profile-header-back svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.profile-hero-top {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.72rem;
}

.profile-identity-row {
  border: 1px solid #e2ebf4;
  border-radius: 16px;
  padding: 0.58rem;
  background: #ffffff;
}

.profile-avatar {
  width: 58px;
  height: 58px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.96rem;
  background: linear-gradient(145deg, #4caacd 0%, #7ec2dc 100%);
  color: #ffffff;
  border: 0;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  padding: 0;
}

.profile-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-main-info h3 {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.2;
  color: #1e3b58;
  font-weight: 800;
}

.profile-kicker {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
}

.profile-email-line {
  margin: 0.18rem 0 0;
  font-size: 0.73rem;
  color: #6e8295;
}

.profile-row-left {
  display: inline-flex;
  align-items: center;
  gap: 0.52rem;
  min-width: 0;
}

.profile-row-left svg {
  width: 14px;
  height: 14px;
  fill: #70849a;
  flex-shrink: 0;
}

.profile-row-left span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-row-arrow {
  width: 16px;
  height: 16px;
  color: #9aaaba;
  display: inline-grid;
  place-items: center;
}

.profile-row-arrow svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.profile-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.95rem;
}

.profile-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.24rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

.profile-chip-primary {
  background: rgba(243, 168, 63, 0.92);
  color: #1f3b58;
}

.profile-settings-label {
  margin: 0.42rem 0 0.16rem;
  font-size: 0.72rem;
  color: #8b9cae;
  font-weight: 700;
}

.profile-section {
  background: #f8fbfe;
  box-shadow: 0 12px 24px -24px rgba(30, 59, 88, 0.45);
  margin: 0;
  padding: 1rem;
  border-top: 0;
  border-radius: 18px;
  border: 1px solid #dde8f2;
}

.profile-section + .profile-section {
  margin-top: 0.1rem;
}

.history-card {
  display: grid;
  gap: 0.65rem;
}

.history-filters {
  display: flex;
  gap: 0.45rem;
}

.history-filter-btn {
  border: 0;
  border-radius: 999px;
  padding: 0.42rem 0.7rem;
  background: #eef3f8;
  color: #1e3b58;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
}

.history-filter-btn.is-active {
  background: #1e3b58;
  color: #ffffff;
}

.history-list {
  display: grid;
  gap: 0.55rem;
}

.history-item {
  border-radius: 12px;
  background: #f8fbfe;
  border: 1px solid #e1ecf5;
  padding: 0.6rem;
}

.history-item-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.3rem;
  margin-bottom: 0.35rem;
}

.history-client,
.history-submitted {
  font-size: 0.62rem;
  color: #6a8aa8;
  background: #eef4f9;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
}

.log-client-field {
  grid-column: 1 / -1;
}

.log-client-field select {
  width: 100%;
  padding: 0.55rem 0.65rem;
  border-radius: 12px;
  border: 1px solid #d9e2ec;
  background: #fff;
  font-family: inherit;
  font-size: 0.85rem;
  color: #1e3b58;
}

.admin-roles-list select {
  font-family: inherit;
}

.admin-roles-list .role-save-btn {
  font-family: inherit;
}

.history-top-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.history-date {
  font-size: 0.72rem;
  color: #6a7a8c;
}

.history-level {
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.18rem 0.5rem;
}

.history-level-ok {
  background: #e7f7fb;
  color: #1b7e9f;
}

.history-level-mild {
  background: #fff4e3;
  color: #b6791f;
}

.history-level-high {
  background: #ffe8dd;
  color: #ad4f25;
}

.history-delete-btn {
  border: 0;
  border-radius: 999px;
  padding: 0.18rem 0.48rem;
  font-size: 0.66rem;
  background: #f5dfe0;
  color: #8f2f37;
  font-weight: 700;
  cursor: pointer;
}

.history-values {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.4rem;
}

.history-values p {
  margin: 0;
  font-size: 0.75rem;
  color: #2b3a48;
}

.history-empty {
  border-radius: 12px;
  background: #f7fafc;
  border: 1px dashed #d8e5f1;
  padding: 0.7rem;
  color: #627487;
  font-size: 0.78rem;
}

.account-settings-card {
  display: grid;
  gap: 0.55rem;
}

.account-settings-list {
  display: grid;
  gap: 0.24rem;
}

.account-setting-item {
  width: 100%;
  border: 0;
  background: #ffffff;
  border-radius: 12px;
  color: #1e3b58;
  padding: 0.66rem 0.16rem;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.4rem;
  text-align: left;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 1px solid #edf2f7;
}

.account-setting-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.16rem 0.45rem;
  background: #dfeefa;
  color: #1f4e72;
  font-size: 0.66rem;
  font-weight: 700;
}

.profile-aux-list {
  display: grid;
  gap: 0.24rem;
  margin-top: 0.28rem;
}

.profile-link-row {
  width: 100%;
  border: 0;
  border-bottom: 1px solid #edf2f7;
  background: transparent;
  color: #1e3b58;
  padding: 0.64rem 0.16rem;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.4rem;
  text-align: left;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.profile-link-row.profile-logout-row {
  margin-top: 0.15rem;
  color: #a64249;
}

.profile-link-row.profile-logout-row .profile-row-left svg {
  fill: #a64249;
}

.premium-footer {
  background: #ffffff;
  border: 1px solid #d6e4f1;
  color: #1e3b58;
  display: grid;
  gap: 0.4rem;
}

.premium-label {
  margin: 0;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #56718a;
}

.premium-version {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: #1e3b58;
}

.contact-card a {
  color: var(--color-accent);
  text-decoration: none;
}

.contact-list {
  display: grid;
  gap: 0.4rem;
}

.contact-list p {
  margin: 0;
  font-size: 0.82rem;
}

.profile-view .tag-new {
  background: #f3a83f;
  color: #1e3b58;
}

.view-home {
  padding: 0 0.8rem 1rem;
}

.home-hero {
  background: #ffffff;
  border-radius: 0;
  padding: 0.2rem 0 0.65rem;
  min-height: auto;
  margin: 0 0 0.8rem;
}

.home-hero::before,
.home-hero::after {
  content: none;
}

.home-hero-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.5rem;
}

.home-hero-main {
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 0.32rem;
  margin-top: 0;
  position: relative;
  z-index: 1;
  text-align: left;
}

.home-hero-card {
  margin-top: 0.72rem;
  display: grid;
  align-content: center;
  gap: 0.2rem;
  background: url("../canva.webp") center / cover no-repeat;
  border-radius: 16px;
  padding: 1rem 0.9rem 1.1rem;
  min-height: 182px;
  box-shadow: 0 16px 28px -22px rgba(20, 43, 66, 0.7);
}

.home-brand-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: #1e3b58;
  font-size: 0.96rem;
  font-weight: 800;
  min-height: 38px;
}

.home-hero-side {
  display: grid;
  justify-items: end;
  align-content: start;
  gap: 0;
}

.home-hero-logo {
  width: 96px;
  height: 96px;
  object-fit: contain;
  filter: none;
}

.home-meta-tools {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.home-bell-btn {
  border: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #e8f0f6;
  color: #1e3b58;
  display: grid;
  place-items: center;
  cursor: pointer;
  position: relative;
}

.home-bell-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.home-bell-alert-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 15px;
  height: 15px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 0.58rem;
  font-weight: 700;
  line-height: 1;
  color: #ffffff;
  background: #ee6c3d;
}

.home-bell-alert-badge.is-mild {
  background: #f3a83f;
}

.home-bell-alert-badge.is-high {
  background: #d64545;
}

.home-profile-chip {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #d9e7f1;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid #d3e0ea;
  box-shadow: none;
}

.home-profile-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-profile-initials {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #1e3b58;
}

.home-greeting-kicker {
  margin: 0;
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.home-greeting-lg {
  margin: 0;
  color: #ffffff;
  font-size: clamp(1.66rem, 5.4vw, 2rem);
  font-weight: 700;
  line-height: 1.03;
}

#welcome-name {
  color: #8fd4ef;
  font-weight: 700;
}

.home-subgreeting {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.76rem;
  line-height: 1.4;
  max-width: 30ch;
}

.home-quick-actions {
  margin-top: 0.72rem;
  display: grid;
  grid-template-columns: repeat(3, 42px);
  gap: 0.95rem;
  justify-content: start;
  justify-items: start;
  position: relative;
  z-index: 1;
}

.home-quick-btn {
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  color: #ffffff;
  display: grid;
  justify-items: center;
  gap: 0;
  cursor: pointer;
}

.home-quick-btn small {
  display: none;
}

.home-quick-icon {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: rgba(11, 28, 44, 0.54);
  box-shadow: inset 0 0 0 1px rgba(143, 212, 239, 0.18);
  display: grid;
  place-items: center;
}

.home-quick-icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.home-block {
  background: #ffffff;
  border-radius: 16px;
  padding: 0.85rem;
  box-shadow: 0 14px 32px -24px rgba(19, 31, 43, 0.35);
  margin-bottom: 0.8rem;
}

.home-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
}

.home-title-row h3 {
  margin: 0;
  font-size: 1rem;
  color: #1b2731;
}

.home-link {
  border: 0;
  background: transparent;
  color: #1e3b58;
  font-weight: 700;
  font-size: 0.8rem;
}

.home-chip-muted {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.14rem 0.45rem;
  background: #edf3f8;
  color: #577188;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.home-info-carousel {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(210px, 1fr);
  gap: 0.55rem;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0.2rem;
}

.home-info-slide {
  border-radius: 14px;
  padding: 0.78rem;
  color: #ffffff;
  scroll-snap-align: start;
  min-height: 128px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 0.3rem;
  text-align: center;
}

.home-info-slide--a {
  background: linear-gradient(135deg, #1e3b58 0%, #24537d 100%);
}

.home-info-slide--b {
  background: linear-gradient(135deg, #2b4d66 0%, #315f7f 100%);
}

.home-info-slide--c {
  background: linear-gradient(135deg, #20566b 0%, #2d7f8f 100%);
}

.home-info-slide h4 {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.2;
}

.home-info-slide p {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.86);
  max-width: 26ch;
}

.home-highlight-grid {
  display: grid;
  gap: 0.52rem;
}

.home-reels-carousel {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(142px, 1fr);
  gap: 0.6rem;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0.18rem;
}

.home-reel-card {
  position: relative;
  min-height: 228px;
  border-radius: 18px;
  overflow: hidden;
  scroll-snap-align: start;
  background: #0f1f2f;
}

.home-reel-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #000000;
}

.home-reel-card::after {
  content: none;
}

.home-reel-badge {
  position: relative;
  z-index: 1;
}

.home-reel-badge {
  position: absolute;
  top: 0.65rem;
  left: 0.65rem;
  border-radius: 999px;
  padding: 0.16rem 0.44rem;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(4px);
  font-size: 0.64rem;
  font-weight: 700;
  color: #ffffff;
}

.home-highlight-card {
  border-radius: 14px;
  padding: 0.72rem;
  background: #f7fbff;
  border: 1px solid #e2edf6;
  display: grid;
  gap: 0.24rem;
}

.home-highlight-tag {
  justify-self: start;
  border-radius: 999px;
  padding: 0.1rem 0.42rem;
  background: #e1f3fb;
  color: #2f607b;
  font-size: 0.62rem;
  font-weight: 700;
}

.home-highlight-card h4 {
  margin: 0;
  font-size: 0.9rem;
  color: #1e3b58;
}

.home-highlight-card p {
  margin: 0;
  font-size: 0.78rem;
  color: #5f7181;
  line-height: 1.42;
}

.social-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

.social-card {
  text-decoration: none;
  background: #f2f6fa;
  border-radius: 14px;
  padding: 0.7rem 0.45rem;
  text-align: center;
  color: #1e3b58;
  display: grid;
  gap: 0.18rem;
}

.social-card-icon {
  width: 28px;
  height: 28px;
  margin: 0 auto;
  fill: #1e3b58;
}

.social-card small {
  font-size: 0.72rem;
  font-weight: 600;
  color: #1e3b58;
}

.ideal-grid {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(112px, 1fr);
  gap: 0.55rem;
  overflow-x: auto;
  padding-bottom: 0.2rem;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}

.ideal-card {
  border: 0;
  background: linear-gradient(145deg, #edf6fc, #f8fbff);
  border-radius: 14px;
  padding: 0.7rem;
  text-align: center;
  color: #1e3b58;
  display: grid;
  gap: 0.28rem;
  justify-items: center;
  align-content: center;
  aspect-ratio: 1 / 1;
  scroll-snap-align: start;
}

.ideal-icon {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: #d5e9f7;
}

.ideal-icon svg {
  width: 18px;
  height: 18px;
  fill: #1e3b58;
}

.ideal-card[data-fill="ph"] .ideal-icon {
  background: #d2ecf9;
}

.ideal-card[data-fill="chlorine"] .ideal-icon {
  background: #d8f0f2;
}

.ideal-card[data-fill="volume"] .ideal-icon {
  background: #dce7fb;
}

.ideal-card small {
  color: #6f7f8f;
  font-size: 0.74rem;
  line-height: 1.2;
}

.ideal-value {
  font-size: 1rem;
  font-weight: 700;
  color: #1e3b58;
}

.media-grid {
  display: grid;
  gap: 0.72rem;
}

.media-card {
  text-decoration: none;
  background: #f8fbff;
  border-radius: 14px;
  padding: 0.72rem;
  color: #1e3b58;
  border: 1px solid #e3edf5;
}

.media-card-head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 0.15rem;
}

.media-thumb {
  height: 92px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem;
  position: relative;
  overflow: hidden;
}

.media-thumb-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.media-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.2), rgba(30, 59, 88, 0.22));
  z-index: 1;
}

.media-thumb svg {
  width: 24px;
  height: 24px;
  fill: #1e3b58;
  background: rgba(255, 255, 255, 0.82);
  border-radius: 50%;
  padding: 4px;
  position: relative;
  z-index: 2;
}

.media-thumb-video {
  background: linear-gradient(120deg, #d8ecf8, #edf7ff);
}

.media-thumb-manual {
  background: linear-gradient(120deg, #e6f2fb, #f7fbff);
}

.media-thumb-check {
  background: linear-gradient(120deg, #dff0ff, #f2f8ff);
}

.media-chip {
  font-size: 0.68rem;
  background: #1e3b58;
  color: #ffffff;
  border-radius: 999px;
  padding: 0.18rem 0.5rem;
  font-weight: 700;
  position: relative;
  z-index: 2;
}

.media-card h4 {
  margin: 0.62rem 0 0;
  font-size: 0.96rem;
}

.media-card p {
  margin: 0.28rem 0 0;
  font-size: 0.8rem;
  color: #647487;
}

.field-group {
  display: grid;
  gap: 0.15rem;
  position: relative;
  transition: all 180ms ease;
}

.field-range {
  font-weight: 400;
  color: #9aacbc;
  font-size: 0.7rem;
}

.field-msg {
  font-size: 0.65rem;
  min-height: 1em;
  line-height: 1.3;
  transition: color 180ms ease;
}

.home-parameter-form .field-group.valid .field-msg {
  color: #1f8b4c;
}

.home-parameter-form .field-group.valid input {
  border-bottom-color: #2e9e5a !important;
}

.home-parameter-form .field-group.invalid .field-msg {
  color: #c92a2a;
}

.home-parameter-form .field-group.invalid input {
  border-bottom-color: #c92a2a !important;
  background: #fff8f8;
}

.home-parameter-form .field-group.invalid .field-range {
  color: #c92a2a;
}

.home-parameter-form {
  display: grid;
  gap: 0.45rem;
}

.home-parameter-form label {
  font-size: 0.76rem;
  color: #788391;
}

.home-parameter-form input {
  border: 0;
  border-bottom: 1px solid #ccd4db;
  padding: 0.45rem 0;
  background: transparent;
  color: #202c39;
  outline: none;
  transition: border-color 180ms ease, background 180ms ease;
}

.btn-home-evaluate {
  margin-top: 0.5rem;
  border-radius: 11px;
  background: #1e3b58;
  color: #ffffff;
  font-weight: 700;
}

.btn-home-more {
  margin-top: 0.45rem;
  border-radius: 11px;
  background: #4caacd;
  color: #ffffff;
  font-weight: 700;
}

.home-feedback {
  margin-top: 0.5rem;
  min-height: 1rem;
  color: #44586f;
}

.home-status-text {
  margin: 0;
  color: #4f6072;
  font-size: 0.84rem;
  line-height: 1.5;
}

.home-status-grid {
  margin-top: 0.68rem;
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.home-status-item {
  border: 1px solid #d9e7f2;
  border-radius: 12px;
  background: #f8fbff;
  padding: 0.56rem;
  display: grid;
  gap: 0.2rem;
}

.home-status-item small {
  color: #66798d;
  font-size: 0.72rem;
}

.home-status-item strong {
  color: #1e3b58;
  font-size: 0.86rem;
}

.home-inline-actions {
  margin-top: 0.62rem;
  display: grid;
  gap: 0.5rem;
  grid-template-columns: 1fr 1fr;
}

.home-level-ok {
  background: #e6f8ee;
  color: #256a3f;
}

.home-level-mild {
  background: #fff3df;
  color: #8a5a14;
}

.home-level-high {
  background: #ffe3e3;
  color: #9a2b2b;
}

.home-task-progress {
  font-size: 0.78rem;
  font-weight: 700;
  color: #1e3b58;
  background: #edf4fa;
  border: 1px solid #d8e5f2;
  border-radius: 999px;
  padding: 0.15rem 0.45rem;
}

.home-task-list {
  display: grid;
  gap: 0.45rem;
}

.home-task-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid #deebf5;
  border-radius: 11px;
  background: #f9fcff;
  padding: 0.48rem 0.56rem;
  color: #284256;
  font-size: 0.82rem;
}

.home-task-item input {
  width: 15px;
  height: 15px;
  accent-color: #4caacd;
}

.home-maintenance-title {
  margin: 0;
  color: #1e3b58;
  font-size: 0.96rem;
  font-weight: 700;
}

.home-maintenance-text {
  margin: 0.36rem 0 0;
  color: #4f6072;
  font-size: 0.84rem;
  line-height: 1.52;
}

@media (max-width: 520px) {
  .home-status-grid {
    grid-template-columns: 1fr;
  }

  .home-inline-actions {
    grid-template-columns: 1fr;
  }
}

.notification-card {
  margin-top: 0.4rem;
  border: 1px solid #d5e3f0;
  border-radius: 14px;
  padding: 0.75rem;
  background: #f7fbff;
}

.notification-level {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #3e5f7b;
}

.notification-card h4 {
  margin: 0.22rem 0 0;
  font-size: 0.98rem;
  color: #1e3b58;
}

.notification-card p {
  margin: 0.28rem 0 0;
  color: #4f6072;
  font-size: 0.84rem;
}

.notification-card.level-high {
  border-color: #f2b5b5;
  background: #fff2f2;
}

.notification-card.level-high .notification-level {
  color: #b62d2d;
}

.notification-card.level-mild {
  border-color: #f4d7a5;
  background: #fff8ed;
}

.notification-card.level-mild .notification-level {
  color: #9a6620;
}

.notification-card.level-ok {
  border-color: #cce7d5;
  background: #eefaf2;
}

.notification-card.level-ok .notification-level {
  color: #2b7a45;
}

.notification-actions {
  margin-top: 0.7rem;
  display: grid;
  gap: 0.5rem;
}

.notification-history {
  margin-top: 0.65rem;
  border: 1px solid #d7e4f0;
  border-radius: 14px;
  background: linear-gradient(170deg, #f6fbff 0%, #f1f7fc 100%);
  padding: 0.72rem;
}

.notification-history-head h4 {
  margin: 0;
  color: #1e3b58;
  font-size: 0.86rem;
}

.notification-history-head p {
  margin: 0.2rem 0 0;
  color: #5f7387;
  font-size: 0.72rem;
}

.notification-history-state {
  margin-top: 0.52rem;
  border-radius: 10px;
  border: 1px dashed #c7d8e8;
  background: #f8fbfe;
  padding: 0.52rem;
  color: #637b91;
  font-size: 0.76rem;
}

.notification-history-chart {
  margin-top: 0.58rem;
  display: grid;
  grid-template-columns: repeat(14, minmax(0, 1fr));
  align-items: end;
  gap: 0.28rem;
  min-height: 106px;
  padding: 0.45rem 0.25rem 0.3rem;
  border-radius: 11px;
  background: #ffffff;
  border: 1px solid #e0ebf5;
}

.notification-bar {
  display: grid;
  align-items: end;
  justify-items: center;
  gap: 0.2rem;
}

.notification-bar-track {
  width: 100%;
  max-width: 12px;
  height: 74px;
  border-radius: 999px;
  background: #eaf1f8;
  position: relative;
  overflow: hidden;
}

.notification-bar-fill {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  border-radius: 999px;
  background: linear-gradient(180deg, #4caacd 0%, #1e4f76 100%);
}

.notification-bar-fill.is-chlorine {
  background: linear-gradient(180deg, #85c7de 0%, #2f6e97 100%);
}

.notification-bar-label {
  color: #64798d;
  font-size: 0.62rem;
  font-weight: 700;
}

.notification-history-list {
  margin-top: 0.55rem;
  display: grid;
  gap: 0.36rem;
}

.notification-history-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.5rem;
  align-items: center;
  border-radius: 10px;
  border: 1px solid #deebf5;
  background: #ffffff;
  padding: 0.45rem 0.52rem;
}

.notification-history-date {
  color: #60778d;
  font-size: 0.68rem;
  min-width: 54px;
}

.notification-history-values {
  color: #35506b;
  font-size: 0.72rem;
}

.notification-history-level {
  border-radius: 999px;
  padding: 0.14rem 0.45rem;
  font-size: 0.62rem;
  font-weight: 700;
}

.notification-history-level.level-ok {
  background: #e8f7ec;
  color: #2c7e49;
}

.notification-history-level.level-mild {
  background: #fff2dd;
  color: #9b6920;
}

.notification-history-level.level-high {
  background: #ffe6e6;
  color: #b73a3a;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 20, 31, 0.45);
  display: grid;
  align-items: end;
  z-index: 45;
}

.modal-overlay[hidden] {
  display: none;
}

.modal-card {
  background: #ffffff;
  border-radius: 20px 20px 0 0;
  padding: 1rem 1rem 1.2rem;
  box-shadow: 0 -14px 40px -26px rgba(10, 20, 31, 0.5);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.65rem;
}

.modal-header h3 {
  margin: 0;
  color: #1e3b58;
}

.modal-close {
  border: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #eef3f6;
  color: #1e3b58;
  cursor: pointer;
}

.terms-content {
  padding: 0.75rem 0;
  max-height: 70vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.terms-content h4 {
  margin: 1rem 0 0.25rem;
  font-size: 0.88rem;
  color: #1e3b58;
}

.terms-content p {
  margin: 0 0 0.6rem;
  font-size: 0.8rem;
  line-height: 1.5;
  color: #3a5a78;
}

.terms-footer {
  margin-top: 1rem;
  font-size: 0.72rem;
  color: #7a95af;
  text-align: center;
}

.pool-base-card h2 {
  margin: 0;
  font-size: 1.08rem;
}

.control-step-banner {
  border: 0;
  background: linear-gradient(135deg, #173b5a 0%, #1e4a70 62%, #275c85 100%);
  border-radius: 0;
  padding: 0.72rem 0.78rem;
  margin: 0 -1rem 0.58rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.65rem;
  align-items: center;
  box-shadow: none;
}

.control-step-copy {
  min-width: 0;
  display: grid;
  align-content: center;
}

.control-step-banner h3 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(1.84rem, 6.2vw, 2.32rem);
  line-height: 1.1;
  max-width: 14ch;
}

.control-step-banner p {
  margin: 0.25rem 0 0;
  color: rgba(225, 237, 247, 0.9);
  font-size: 0.84rem;
  line-height: 1.3;
}

.control-step-image {
  width: 52px;
  height: 52px;
  object-fit: contain;
  opacity: 0.95;
}

.tag-new {
  background: #f3a83f;
  color: #1e3b58;
  border-radius: 999px;
  padding: 0.2rem 0.58rem;
  font-size: 0.68rem;
  font-weight: 700;
}

.pool-base-grid {
  display: grid;
  gap: 0.45rem;
}

.pool-base-grid label {
  font-size: 0.78rem;
  color: #5b6c7d;
}

.pool-base-grid input {
  border: 0;
  border-bottom: 1px solid #cfd9e3;
  padding: 0.52rem 0;
  outline: none;
  color: #1e3b58;
}

.pool-volume-results {
  margin-top: 0.7rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
}

.pool-volume-results p {
  margin: 0;
  border-radius: 12px;
  background: #f7fafd;
  padding: 0.55rem;
  font-size: 0.78rem;
}

.control-hub {
  margin-top: 0.8rem;
  display: grid;
  gap: 0.62rem;
}

.control-tabbar {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.42rem;
}

.control-tab-btn {
  border: 0;
  border-radius: 11px;
  background: #dceaf6;
  color: #31506a;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.48rem 0.24rem;
  cursor: pointer;
}

.control-tab-btn.is-active {
  background: #1e3b58;
  color: #ffffff;
}

.control-panel {
  border-radius: 14px;
  border: 1px solid #dde8f2;
  background: #ffffff;
  overflow: hidden;
}

.control-panel-head {
  padding: 0.75rem 0.8rem;
  background: linear-gradient(145deg, #edf5fb 0%, #f8fbfe 100%);
  border-bottom: 1px solid #e5edf5;
}

.control-panel-head h3 {
  margin: 0;
  color: #1e3b58;
  font-size: 0.9rem;
}

.control-panel-head p {
  margin: 0.28rem 0 0;
  color: #5f7387;
  font-size: 0.75rem;
  line-height: 1.35;
}

.control-panel-content {
  padding: 0.8rem;
  display: grid;
  gap: 0.65rem;
}

.control-panel-log-content {
  gap: 0.72rem;
}

.module-card {
  border-radius: 12px;
  border: 1px solid #e3ecf5;
  background: #f9fbfe;
  padding: 0.7rem;
}

.module-expand {
  padding: 0;
  overflow: hidden;
}

.module-summary {
  list-style: none;
  cursor: pointer;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.55rem;
  padding: 0.62rem;
}

.module-summary::-webkit-details-marker {
  display: none;
}

.module-summary::after {
  content: "+";
  font-size: 1.05rem;
  color: #1e3b58;
  font-weight: 700;
}

.module-expand[open] .module-summary::after {
  content: "-";
}

.module-summary span {
  font-size: 0.84rem;
  font-weight: 700;
  color: #1e3b58;
}

.module-body {
  border-top: 1px solid #e8eef5;
  padding: 0.7rem;
  position: relative;
  padding-right: 88px;
}

.module-support-image {
  width: 62px;
  height: 62px;
  object-fit: contain;
  position: absolute;
  top: 0.65rem;
  right: 0.7rem;
  opacity: 0.94;
}

.module-body p,
.module-body li {
  font-size: 0.78rem;
  line-height: 1.45;
  margin-right: 0.1rem;
}

.module-body ul {
  margin: 0.35rem 0 0;
  padding-left: 1rem;
}

.module-card h4 {
  margin: 0;
  font-size: 0.88rem;
  color: #1e3b58;
}

.module-card p,
.module-card li {
  font-size: 0.76rem;
  color: #4e6274;
}

.module-card ul {
  margin: 0.35rem 0 0;
  padding-left: 1rem;
}

.module-card .dose-line {
  margin-top: 0.45rem;
  color: #1f5d83;
  font-weight: 700;
}

.module-card .dose-table-head {
  font-weight: 700;
  font-size: 0.72rem;
  color: #1f5d83;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.parameter-grid,
.problem-grid,
.action-grid,
.secret-grid {
  display: grid;
  gap: 0.55rem;
}

.parameter-input-row {
  display: grid;
  gap: 0.4rem;
  margin-top: 0.45rem;
}

.parameter-input-row input {
  border: 0;
  border-bottom: 1px solid #c8d6e5;
  background: transparent;
  padding: 0.42rem 0;
  outline: none;
}

.parameter-result {
  margin-top: 0.45rem;
  border-radius: 10px;
  background: #eef7ff;
  color: #1e3b58;
  font-size: 0.75rem;
  padding: 0.45rem;
}

.pool-chart {
  width: 100%;
  border-radius: 12px;
  border: 1px solid #e4ecf5;
  background: #fbfdff;
}

.guide-body {
  min-height: 100dvh;
  background: linear-gradient(180deg, #f5f9ff 0%, #e9f2fb 42%, #f7fbff 100%);
}

.guide-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 1rem 0.95rem 1.4rem;
  display: grid;
  gap: 0.9rem;
}

.guide-header {
  background: #ffffff;
  border: 1px solid #d7e5f3;
  border-radius: 16px;
  padding: 0.85rem;
  box-shadow: 0 15px 38px -30px rgba(30, 59, 88, 0.45);
}

.guide-back-btn {
  border: 1px solid #b7cbe0;
  border-radius: 999px;
  background: #f2f8ff;
  color: #1e3b58;
  padding: 0.35rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.guide-kicker {
  margin: 0.6rem 0 0;
  color: #3f6c90;
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.guide-header h1 {
  margin: 0.18rem 0 0;
  font-size: clamp(1.2rem, 4.5vw, 1.65rem);
}

.guide-description {
  margin: 0.32rem 0 0;
  color: #4f6072;
  font-size: 0.86rem;
}

.guide-video-card,
.guide-steps-card {
  background: #ffffff;
  border: 1px solid #d7e5f3;
  border-radius: 16px;
  padding: 0.8rem;
  box-shadow: 0 15px 38px -30px rgba(30, 59, 88, 0.45);
}

.guide-overview-grid {
  display: grid;
  gap: 0.7rem;
}

.guide-overview-card-item {
  border: 1px solid #e0ebf5;
  border-radius: 12px;
  padding: 0.7rem;
  background: linear-gradient(165deg, #f8fbff, #eef5ff);
}

.guide-overview-label {
  margin: 0 0 0.28rem;
  font-size: 0.74rem;
  font-weight: 700;
  color: #3d6f95;
  text-transform: uppercase;
}

.guide-overview-card-item p,
.guide-overview-card-item li {
  margin: 0;
  color: #52657a;
  font-size: 0.84rem;
  line-height: 1.55;
}

.guide-overview-card-item ul {
  margin: 0;
  padding-left: 1rem;
}

.guide-steps-head h2 {
  margin: 0;
  font-size: 1.08rem;
}

.guide-steps-head small {
  display: inline-block;
  margin-top: 0.2rem;
  color: #66798d;
}

.guide-steps-list {
  margin-top: 0.65rem;
  display: grid;
  gap: 0.62rem;
}

.guide-step-card {
  border: 1px solid #e0ebf5;
  border-radius: 12px;
  padding: 0.66rem;
  background: linear-gradient(165deg, #f8fbff, #eef5ff);
}

.guide-step-number {
  margin: 0;
  font-size: 0.74rem;
  font-weight: 700;
  color: #3d6f95;
  text-transform: uppercase;
}

.guide-step-card h3 {
  margin: 0.24rem 0 0;
  font-size: 0.94rem;
}

.guide-step-card p {
  margin: 0.26rem 0 0;
  color: #52657a;
  font-size: 0.84rem;
  line-height: 1.6;
}

.guide-notes-list {
  margin-top: 0.65rem;
  display: grid;
  gap: 0.62rem;
}

.guide-note-card {
  border: 1px solid #e0ebf5;
  border-radius: 12px;
  padding: 0.72rem;
  background: #f8fbff;
}

.guide-note-card p {
  margin: 0;
  color: #52657a;
  font-size: 0.84rem;
  line-height: 1.55;
}

.chart-title-row {
  margin-top: 0.2rem;
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 768px) {
  .auth-layout {
    grid-template-rows: 40dvh 60dvh;
  }

  .auth-panel {
    padding: 1.6rem;
  }

  .view {
    max-width: 920px;
    margin: 0 auto;
  }

  .view-home {
    max-width: 460px;
    margin: 0 auto;
  }

  #view-tienda {
    max-width: 100%;
    margin: 0;
  }

  .products-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.72rem;
    padding: 0 0.85rem;
  }

  .product-card img {
    max-height: 132px;
  }

  .bottom-nav {
    width: min(460px, calc(100% - 0.9rem));
  }
}

/* === Club Qhatai Rewards redesign === */
#view-premios {
  padding: 0 0 1rem;
  overflow-x: hidden;
}

.rewards-showcase {
  padding: 1rem 0.85rem 5.2rem;
  background:
    radial-gradient(circle at 18% 0%, rgba(76, 170, 205, 0.24), transparent 32%),
    radial-gradient(circle at 92% 10%, rgba(30, 59, 88, 0.18), transparent 30%),
    linear-gradient(180deg, #edf8ff 0%, #ffffff 42%, #f5f9fc 100%);
}

.rewards-hero {
  display: grid;
  gap: 0.9rem;
}

.rewards-topbar {
  align-items: center;
}

.rewards-summary-card,
.rewards-action-card,
.rewards-block,
.reward-card {
  border: 1px solid rgba(114, 154, 188, 0.22);
  box-shadow: 0 22px 48px -36px rgba(21, 58, 92, 0.52);
}

.rewards-summary-card {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  padding: 1rem;
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(30, 59, 88, 0.94), rgba(23, 106, 145, 0.92)),
    radial-gradient(circle at 85% 10%, rgba(255, 255, 255, 0.28), transparent 28%);
}

.rewards-summary-card::after {
  content: "";
  position: absolute;
  right: -52px;
  bottom: -68px;
  width: 178px;
  height: 178px;
  border-radius: 50%;
  border: 30px solid rgba(255, 255, 255, 0.09);
  pointer-events: none;
}

.rewards-summary-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.rewards-tier-pill,
.rewards-program-chip,
.rewards-head-note {
  display: inline-flex;
  align-items: center;
  width: max-content;
  border-radius: 999px;
  padding: 0.34rem 0.72rem;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.rewards-tier-pill {
  color: #1e3b58;
  background: rgba(255, 255, 255, 0.92);
}

.rewards-program-chip {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.rewards-points-display {
  position: relative;
  z-index: 1;
  margin-top: 1.05rem;
  display: grid;
  gap: 0.1rem;
}

.rewards-points-display strong {
  font-size: clamp(2.4rem, 15vw, 4.4rem);
  line-height: 0.9;
  letter-spacing: -0.06em;
}

.rewards-points-display span,
.rewards-next-text {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.84rem;
}

.rewards-progress {
  position: relative;
  z-index: 1;
  height: 9px;
  margin-top: 1rem;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.24);
}

.rewards-progress span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #82d8f3, #ffffff);
  transition: width 360ms ease;
}

.rewards-next-text {
  position: relative;
  z-index: 1;
  margin: 0.68rem 0 0;
}

.rewards-actions-grid,
.rewards-tier-grid,
.rewards-achievements-grid,
.rewards-grid {
  display: grid;
  gap: 0.75rem;
}

.rewards-actions-grid {
  margin-top: 0.9rem;
}

.rewards-action-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.72rem;
  border-radius: 20px;
  padding: 0.9rem;
  background: #ffffff;
}

.rewards-card-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: #eaf6fc;
  font-size: 1.25rem;
}

.rewards-mini-kicker {
  margin: 0;
  color: #4caacd;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.rewards-action-card h3,
.rewards-section-head h3 {
  margin: 0.16rem 0 0;
  color: #1e3b58;
  line-height: 1.08;
}

.rewards-action-card p {
  margin: 0.38rem 0 0;
  color: #60788f;
  font-size: 0.82rem;
  line-height: 1.45;
}

.rewards-block {
  margin-top: 0.9rem;
  border-radius: 24px;
  padding: 0.9rem;
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(8px);
}

.rewards-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.72rem;
}

.rewards-head-note {
  flex: 0 0 auto;
  color: #426078;
  background: #edf6fb;
  border: 1px solid #d8e9f4;
}

.rewards-tier-grid {
  grid-template-columns: 1fr;
}

.rewards-tier-card {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  padding: 0.85rem;
  background: #f8fbff;
  border: 1px solid #e0edf6;
}

.rewards-tier-card.is-active {
  outline: 2px solid #4caacd;
  box-shadow: 0 18px 42px -30px rgba(30, 59, 88, 0.72);
}

.rewards-tier-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
}

.rewards-tier-card-head strong {
  color: #1e3b58;
  font-size: 1rem;
}

.rewards-tier-card-head span {
  color: #5c7389;
  font-size: 0.68rem;
  font-weight: 800;
}

.rewards-tier-card p {
  margin: 0.42rem 0 0;
  color: #506d84;
  font-size: 0.78rem;
  line-height: 1.35;
}

.rewards-tier-card ul {
  margin: 0.55rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.34rem;
  list-style: none;
}

.rewards-tier-card li {
  color: #35556d;
  font-size: 0.73rem;
}

.rewards-tier-card li::before {
  content: "✓";
  margin-right: 0.35rem;
  color: #4caacd;
  font-weight: 900;
}

.rewards-tier-card.tier-basic {
  background: url('../images/basico-rewards.jpeg') center/cover no-repeat;
}

.rewards-tier-card.tier-silver {
  background: url('../images/plata-rewards.jpeg') center/cover no-repeat;
}

.rewards-tier-card.tier-gold {
  background: url('../images/oro-rewards.jpeg') center/cover no-repeat;
}

.rewards-tier-card.tier-diamond {
  background: url('../images/diamante-rewards.jpeg') center/cover no-repeat;
}

.rewards-achievements-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.achievement-card {
  min-height: 146px;
  border-radius: 18px;
  padding: 0.75rem;
  background: #f7fbff;
  border: 1px solid #e0edf6;
  display: grid;
  align-content: start;
  gap: 0.32rem;
  opacity: 0.74;
}

.achievement-card.is-unlocked {
  opacity: 1;
  background: linear-gradient(135deg, #effaff, #ffffff);
  border-color: rgba(76, 170, 205, 0.38);
}

.achievement-card span {
  font-size: 1.38rem;
}

.achievement-card strong {
  color: #1e3b58;
  font-size: 0.86rem;
  line-height: 1.1;
}

.achievement-card p {
  margin: 0;
  color: #60788f;
  font-size: 0.7rem;
  line-height: 1.35;
}

.achievement-card small {
  margin-top: auto;
  color: #4caacd;
  font-weight: 800;
  font-size: 0.68rem;
}

.rewards-leaderboard {
  display: grid;
  gap: 0.48rem;
}

.leaderboard-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.65rem;
  border-radius: 16px;
  padding: 0.62rem;
  background: #f8fbff;
  border: 1px solid #e3edf5;
}

.leaderboard-position {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #ffffff;
  background: #1e3b58;
  font-size: 0.82rem;
  font-weight: 900;
}

.leaderboard-client {
  display: grid;
  gap: 0.08rem;
}

.leaderboard-client strong {
  color: #1e3b58;
  font-size: 0.86rem;
}

.leaderboard-client small {
  color: #698098;
  font-size: 0.7rem;
}

.leaderboard-row b {
  color: #1e3b58;
  font-size: 0.82rem;
}

.rewards-grid {
  grid-template-columns: 1fr;
}

.reward-card {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 0.72rem;
  border-radius: 20px;
  padding: 0.62rem;
  background: #ffffff;
}

.reward-card.is-empty {
  display: block;
  padding: 1rem;
  color: #60788f;
}

.reward-thumb-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 17px;
  aspect-ratio: 1 / 1;
  background: linear-gradient(135deg, #eaf6fc, #ffffff);
}

.reward-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.reward-category-chip {
  position: absolute;
  left: 0.42rem;
  bottom: 0.42rem;
  border-radius: 999px;
  padding: 0.18rem 0.42rem;
  color: #ffffff;
  background: rgba(30, 59, 88, 0.78);
  font-size: 0.58rem;
  font-weight: 900;
  backdrop-filter: blur(4px);
}

.reward-body {
  min-width: 0;
  display: grid;
  gap: 0.32rem;
}

.reward-body h4 {
  margin: 0;
  color: #1e3b58;
  font-size: 0.94rem;
  line-height: 1.15;
}

.reward-body p {
  margin: 0;
  color: #60788f;
  font-size: 0.72rem;
  line-height: 1.35;
}

.reward-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.58rem;
  margin-top: 0.2rem;
}

.reward-meta strong {
  color: #1e3b58;
  font-size: 0.9rem;
  line-height: 1;
}

.reward-meta strong span {
  display: block;
  color: #6c8196;
  font-size: 0.6rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.reward-redeem-btn {
  width: auto;
  min-width: 84px;
  height: 34px;
  border-radius: 999px;
  padding: 0 0.78rem;
  font-size: 0.72rem;
  font-weight: 900;
}

.profile-tier-benefit {
  margin: 0.42rem 0 0;
  font-size: 0.75rem;
  line-height: 1.35;
}

@media (min-width: 720px) {
  .rewards-showcase {
    padding-left: max(1rem, calc((100% - 980px) / 2));
    padding-right: max(1rem, calc((100% - 980px) / 2));
  }

  .rewards-hero {
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: stretch;
  }

  .rewards-topbar {
    align-self: center;
  }

  .rewards-actions-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rewards-tier-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .rewards-achievements-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .rewards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 390px) {
  .reward-card {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .rewards-achievements-grid {
    grid-template-columns: 1fr;
  }

  .rewards-section-head {
    display: grid;
  }
}

@media (min-width: 768px) {
  #view-premios {
    max-width: none;
    margin: 0;
  }
}


/* === Desktop access rules and Admin dashboard === */
.desktop-mobile-gate {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  place-items: center;
  padding: 2rem;
  background:
    radial-gradient(circle at 18% 18%, rgba(76, 170, 205, 0.4), transparent 28%),
    radial-gradient(circle at 85% 12%, rgba(243, 168, 63, 0.2), transparent 28%),
    linear-gradient(135deg, #102d46 0%, #1e3b58 48%, #236b91 100%);
  color: #ffffff;
}

.desktop-mobile-gate[hidden] {
  display: none;
}

body.desktop-client-locked {
  overflow: hidden;
}

body.desktop-client-locked .desktop-mobile-gate {
  display: grid;
}

body.desktop-client-locked .app-shell,
body.desktop-client-locked .bottom-nav {
  display: none !important;
}

.desktop-mobile-gate-card {
  width: min(520px, 92vw);
  border-radius: 34px;
  padding: 2rem;
  text-align: center;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 28px 80px -42px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(12px);
}

.desktop-mobile-gate-logo {
  width: 70px;
  height: 70px;
  object-fit: contain;
  margin: 0 auto 1rem;
  border-radius: 22px;
  background: rgba(255,255,255,0.92);
  padding: 0.65rem;
}

.desktop-mobile-gate-kicker {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.74rem;
  font-weight: 800;
}

.desktop-mobile-gate-card h1 {
  margin: 0.4rem 0 0.7rem;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 0.96;
}

.desktop-mobile-gate-card p {
  margin-left: auto;
  margin-right: auto;
  max-width: 42ch;
  color: rgba(255, 255, 255, 0.82);
}

.desktop-mobile-gate-phone {
  width: 86px;
  height: 136px;
  margin: 1.2rem auto 0;
  border: 5px solid rgba(255,255,255,0.86);
  border-radius: 26px;
  display: grid;
  place-items: end center;
  padding-bottom: 0.55rem;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.18);
}

.desktop-mobile-gate-phone span {
  width: 28px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,0.78);
}

.admin-view {
  max-width: 100%;
  margin: 0;
  padding: 0;
}

.admin-dashboard-shell {
  min-height: 100dvh;
  padding: 1rem;
  padding-bottom: calc(var(--bottom-nav-total-height) + 1rem);
  background:
    radial-gradient(circle at 10% 0%, rgba(76,170,205,0.16), transparent 30%),
    linear-gradient(180deg, #f5f9fc 0%, #ffffff 48%, #eef5f9 100%);
}

.admin-dashboard-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: start;
  padding: 1.15rem;
  border-radius: 28px;
  color: #ffffff;
  background:
    radial-gradient(circle at 92% 0%, rgba(255,255,255,0.24), transparent 30%),
    linear-gradient(135deg, #1e3b58, #245d7f 55%, #4caacd);
  box-shadow: 0 24px 54px -38px rgba(30, 59, 88, 0.75);
}

.admin-dashboard-kicker,
.admin-card-kicker {
  margin: 0;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 800;
}

.admin-dashboard-kicker {
  color: rgba(255,255,255,0.7);
}

.admin-dashboard-hero h2 {
  margin: 0.25rem 0 0.4rem;
  font-size: clamp(1.85rem, 4vw, 3.2rem);
  line-height: 0.96;
}

.admin-dashboard-hero p:not(.admin-dashboard-kicker) {
  margin: 0;
  max-width: 62ch;
  color: rgba(255,255,255,0.82);
}

.admin-dashboard-back {
  background: rgba(255,255,255,0.14) !important;
  color: #ffffff !important;
  border-color: rgba(255,255,255,0.24) !important;
}

.admin-dashboard-stats {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.admin-stat-card,
.admin-card {
  border: 1px solid rgba(173, 195, 213, 0.42);
  background: rgba(255,255,255,0.9);
  box-shadow: 0 24px 48px -38px rgba(30,59,88,0.44);
}

.admin-stat-card {
  border-radius: 22px;
  padding: 1rem;
  display: grid;
  gap: 0.25rem;
}

.admin-stat-card span,
.admin-stat-card small {
  color: #6a84a0;
}

.admin-stat-card strong {
  font-size: 1.6rem;
  line-height: 1;
  color: #1e3b58;
}

.admin-dashboard-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 1rem;
  align-items: start;
}

.admin-card {
  border-radius: 26px;
  padding: 1rem;
}

.admin-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.85rem;
}

.admin-card-kicker {
  color: #4caacd;
}

.admin-card h3 {
  margin: 0.12rem 0 0;
  color: #1e3b58;
  font-size: 1.1rem;
}

.admin-searchbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: center;
}

.admin-searchbar input,
.admin-input {
  width: 100%;
  min-height: 44px;
  border: 1px solid #d9e7f2;
  border-radius: 14px;
  background: #f8fbfd;
  color: #1e3b58;
  padding: 0.72rem 0.85rem;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.admin-searchbar input:focus,
.admin-input:focus {
  background: #ffffff;
  border-color: rgba(76, 170, 205, 0.82);
  box-shadow: 0 0 0 4px rgba(76, 170, 205, 0.14);
}

.admin-client-list {
  margin-top: 0.9rem;
  display: grid;
  gap: 0.58rem;
  max-height: 55dvh;
  overflow: auto;
  padding-right: 0.2rem;
}

.admin-client-item {
  width: 100%;
  border: 1px solid #e0ebf4;
  border-radius: 18px;
  background: #ffffff;
  padding: 0.78rem;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.72rem;
  align-items: center;
  text-align: left;
  color: #1e3b58;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.admin-client-item:hover,
.admin-client-item.is-selected {
  transform: translateY(-1px);
  border-color: rgba(76, 170, 205, 0.62);
  box-shadow: 0 18px 32px -28px rgba(30,59,88,0.48);
}

.admin-client-avatar,
.admin-selected-avatar {
  width: 42px;
  height: 42px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #1e3b58, #4caacd);
  color: #ffffff;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.admin-client-main {
  min-width: 0;
}

.admin-client-main strong,
.admin-selected-user-card strong {
  display: block;
  color: #1e3b58;
  font-size: 0.94rem;
}

.admin-client-main span,
.admin-selected-user-card p,
.admin-help-text {
  display: block;
  color: #6a84a0;
  font-size: 0.78rem;
  line-height: 1.35;
}

.admin-client-points {
  justify-self: end;
  padding: 0.38rem 0.7rem;
  border-radius: 999px;
  background: #eef7fb;
  color: #1e3b58;
  font-weight: 800;
  white-space: nowrap;
  font-size: 0.78rem;
}

.admin-side-stack {
  display: grid;
  gap: 1rem;
}

.admin-selected-user-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.75rem;
  align-items: center;
  border-radius: 20px;
  padding: 0.8rem;
  background: linear-gradient(135deg, #f2f8fd, #ffffff);
  border: 1px solid #e0ebf4;
  margin-bottom: 0.8rem;
}

.admin-input-label {
  display: block;
  margin: 0.75rem 0 0.35rem;
  font-size: 0.78rem;
  color: #48667f;
  font-weight: 700;
}

.admin-wide-btn {
  width: 100%;
  margin-top: 0.8rem;
  justify-content: center;
}

.admin-help-text {
  margin: 0.6rem 0 0;
}

.admin-rewards-box {
  display: grid;
  gap: 0.75rem;
}

.admin-rewards-list {
  display: grid;
  gap: 0.55rem;
}

.admin-reward-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.65rem;
  align-items: center;
  padding: 0.72rem;
  border-radius: 16px;
  border: 1px solid #e0ebf4;
  background: #ffffff;
}

.admin-reward-row strong {
  display: block;
  color: #1e3b58;
}

.admin-reward-row small {
  color: #6a84a0;
}

.admin-reward-actions {
  display: flex;
  gap: 0.4rem;
}

.admin-reward-form {
  border-radius: 20px;
  padding: 0.9rem;
  border: 1px dashed #b8cedf;
  background: #f8fbfd;
}

.admin-reward-form[hidden] {
  display: none;
}

body.admin-desktop-mode {
  background: #eef3f6;
}

@media (min-width: 768px) {
  body.admin-desktop-mode .app-shell {
    width: 100%;
    max-width: none;
    background: #eef3f6;
    padding-bottom: calc(var(--bottom-nav-total-height) + 1.2rem);
  }

  body.admin-desktop-mode .view {
    max-width: min(1180px, calc(100% - 2rem));
    margin-left: auto;
    margin-right: auto;
  }

  body.admin-desktop-mode .view-home,
  body.admin-desktop-mode #view-diagnostico,
  body.admin-desktop-mode #view-alertas,
  body.admin-desktop-mode #view-perfil,
  body.admin-desktop-mode #view-carrito,
  body.admin-desktop-mode #view-premios {
    max-width: min(1040px, calc(100% - 2rem));
  }

  body.admin-desktop-mode #view-tienda,
  body.admin-desktop-mode #view-admin {
    max-width: min(1220px, calc(100% - 2rem));
  }

  body.admin-desktop-mode .store-showcase,
  body.admin-desktop-mode .rewards-showcase {
    border-radius: 30px;
    margin-top: 1rem;
  }

  body.admin-desktop-mode .products-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
  }

  body.admin-desktop-mode .bottom-nav {
    display: grid;
    grid-template-columns: repeat(5, minmax(86px, 1fr));
    width: min(720px, calc(100% - 2rem));
    left: 50%;
    transform: translateX(-50%);
    right: auto;
    bottom: 18px;
    border-radius: 28px;
    padding: 0.55rem 0.75rem;
    background: rgba(30, 59, 88, 0.96);
    box-shadow: 0 24px 55px -32px rgba(30, 59, 88, 0.75);
  }

  body.admin-desktop-mode .nav-btn span {
    font-size: 0.72rem;
  }

  body.admin-desktop-mode .nav-plus-btn {
    width: 58px;
    height: 58px;
    margin-top: -1.1rem;
  }

  body.admin-desktop-mode .admin-dashboard-shell {
    padding: 1.4rem;
    padding-bottom: calc(var(--bottom-nav-total-height) + 1.4rem);
    min-height: calc(100dvh - var(--bottom-nav-total-height));
  }
}

@media (min-width: 1180px) {
  body.admin-desktop-mode .admin-dashboard-shell {
    padding: 2rem 3rem;
  }

  body.admin-desktop-mode .admin-client-list {
    max-height: calc(100dvh - 350px);
  }
}

@media (max-width: 760px) {
  .admin-dashboard-hero,
  .admin-dashboard-stats,
  .admin-dashboard-grid {
    grid-template-columns: 1fr;
  }

  .admin-dashboard-hero {
    border-radius: 24px;
  }

  .admin-dashboard-stats {
    gap: 0.65rem;
  }

  .admin-searchbar {
    grid-template-columns: 1fr;
  }

  .admin-client-item {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .admin-client-points {
    grid-column: 2;
    justify-self: start;
  }
}

/* Ajuste final: navegación admin PC sin romper PWA móvil */
body.admin-desktop-mode .store-rewards-entry {
  max-width: 100%;
}

body.admin-desktop-mode #view-admin + .bottom-nav,
body.admin-desktop-mode .bottom-nav {
  z-index: 90;
}

@media (max-width: 767px) {
  .desktop-mobile-gate {
    display: none !important;
  }
}


/* === Ajuste final PC admin + carga de imagen de premios === */
.admin-upload-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 104px;
  gap: 0.72rem;
  align-items: stretch;
}

.admin-file-input {
  width: 100%;
  min-height: 48px;
  border: 1px dashed #b8cedf;
  border-radius: 16px;
  background: #ffffff;
  color: #1e3b58;
  padding: 0.68rem;
  cursor: pointer;
}

.admin-file-input::file-selector-button {
  border: 0;
  border-radius: 999px;
  background: #1e3b58;
  color: #ffffff;
  padding: 0.48rem 0.78rem;
  margin-right: 0.65rem;
  font-weight: 800;
  cursor: pointer;
}

.admin-image-preview {
  min-height: 82px;
  border-radius: 16px;
  border: 1px solid #dbe8f2;
  background: linear-gradient(145deg, #eef7fb, #ffffff);
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #6a84a0;
  font-size: 0.72rem;
  text-align: center;
  padding: 0.5rem;
}

.admin-image-preview img {
  width: 100%;
  height: 100%;
  min-height: 82px;
  object-fit: cover;
  display: block;
}

.admin-reward-thumb {
  width: 54px;
  height: 54px;
  border-radius: 15px;
  object-fit: cover;
  background: #eef7fb;
  border: 1px solid #dbe8f2;
}

@media (min-width: 768px) {
  body.admin-desktop-mode .app-shell {
    min-height: 100dvh;
  }

  body.admin-desktop-mode .view-home {
    max-width: min(1180px, calc(100% - 2.4rem));
    padding-left: 0;
    padding-right: 0;
    padding-bottom: calc(var(--bottom-nav-total-height) + 1.6rem);
  }

  body.admin-desktop-mode .home-hero {
    margin-top: 1rem;
    margin-bottom: 1rem;
    background: transparent;
  }

  body.admin-desktop-mode .home-hero-card {
    min-height: 230px;
    border-radius: 28px;
    padding: 1.45rem 1.65rem;
    background-position: center 42%;
  }

  body.admin-desktop-mode .home-greeting-lg {
    font-size: clamp(2rem, 3vw, 3.35rem);
  }

  body.admin-desktop-mode .home-subgreeting {
    max-width: 42ch;
    font-size: 0.9rem;
  }

  body.admin-desktop-mode .home-quick-actions {
    grid-template-columns: repeat(3, minmax(74px, 92px));
    gap: 0.85rem;
  }

  body.admin-desktop-mode .home-quick-btn {
    gap: 0.35rem;
  }

  body.admin-desktop-mode .home-quick-btn small {
    display: block;
    font-size: 0.72rem;
    font-weight: 800;
  }

  body.admin-desktop-mode .home-quick-icon {
    width: 54px;
    height: 54px;
  }

  body.admin-desktop-mode .home-block {
    border-radius: 28px;
    padding: 1.1rem;
    margin-bottom: 1rem;
    box-shadow: 0 22px 48px -38px rgba(19, 31, 43, 0.42);
  }

  body.admin-desktop-mode .ideal-grid {
    grid-auto-flow: initial;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: visible;
    gap: 1rem;
    padding-bottom: 0;
  }

  body.admin-desktop-mode .ideal-card {
    aspect-ratio: auto;
    min-height: 150px;
    border-radius: 24px;
    padding: 1.2rem;
  }

  body.admin-desktop-mode .ideal-icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
  }

  body.admin-desktop-mode .media-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
  }

  body.admin-desktop-mode .media-card {
    border-radius: 22px;
    padding: 0.85rem;
  }

  body.admin-desktop-mode .media-thumb {
    height: 150px;
    border-radius: 18px;
  }

  body.admin-desktop-mode .home-info-carousel,
  body.admin-desktop-mode .home-reels-carousel {
    grid-auto-flow: initial;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: visible;
  }

  body.admin-desktop-mode .home-info-slide {
    min-height: 150px;
    border-radius: 22px;
  }

  body.admin-desktop-mode .home-highlight-grid,
  body.admin-desktop-mode .social-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body.admin-desktop-mode #view-tienda {
    max-width: min(1180px, calc(100% - 2.4rem));
    margin-left: auto;
    margin-right: auto;
  }

  body.admin-desktop-mode .store-showcase {
    padding: 1.25rem 1.25rem calc(var(--bottom-nav-total-height) + 1.6rem);
  }

  body.admin-desktop-mode .store-topbar-title {
    font-size: clamp(2.2rem, 3.4vw, 3.7rem);
  }

  body.admin-desktop-mode .store-topbar-subtitle {
    max-width: 56ch;
    font-size: 0.92rem;
  }

  body.admin-desktop-mode .store-toolbar {
    max-width: 660px;
  }

  body.admin-desktop-mode .store-filters {
    max-width: 660px;
  }

  body.admin-desktop-mode .store-rewards-entry {
    max-width: 820px;
    margin-top: 1rem;
  }

  body.admin-desktop-mode .product-card img {
    max-height: 180px;
  }

  body.admin-desktop-mode #view-premios {
    max-width: min(1180px, calc(100% - 2.4rem));
  }

  body.admin-desktop-mode .rewards-showcase {
    padding: 1.35rem 1.35rem calc(var(--bottom-nav-total-height) + 1.6rem);
  }

  body.admin-desktop-mode .rewards-actions-grid,
  body.admin-desktop-mode .rewards-tier-grid,
  body.admin-desktop-mode .rewards-achievements-grid,
  body.admin-desktop-mode .rewards-grid {
    gap: 1rem;
  }

  body.admin-desktop-mode .admin-dashboard-shell {
    max-width: 1220px;
    margin: 0 auto;
    border-radius: 0;
  }
}

@media (min-width: 1280px) {
  body.admin-desktop-mode .app-shell {
    padding-left: 0;
    padding-right: 0;
  }

  body.admin-desktop-mode .home-hero-card {
    min-height: 245px;
  }
}

@media (max-width: 520px) {
  .admin-upload-control {
    grid-template-columns: 1fr;
  }
}

.admin-reward-row {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

@media (max-width: 520px) {
  .admin-reward-row {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .admin-reward-actions {
    grid-column: 1 / -1;
    justify-content: stretch;
  }
  .admin-reward-actions .btn {
    flex: 1;
  }
}

/* === Admin gamificación por cliente === */
.admin-client-item.tier-basic,
.admin-selected-user-card.tier-basic,
.admin-selected-tier-card.tier-basic {
  background: url('../images/basico-profile.jpeg') center/cover no-repeat;
}

.admin-client-item.tier-silver,
.admin-selected-user-card.tier-silver,
.admin-selected-tier-card.tier-silver {
  background: url('../images/plata-profile.jpeg') center/cover no-repeat;
  border-color: rgba(139, 158, 176, 0.38);
}

.admin-client-item.tier-gold,
.admin-selected-user-card.tier-gold,
.admin-selected-tier-card.tier-gold {
  background: url('../images/oro-profile.jpeg') center/cover no-repeat;
  border-color: rgba(218, 170, 52, 0.34);
}

.admin-client-item.tier-diamond,
.admin-selected-user-card.tier-diamond,
.admin-selected-tier-card.tier-diamond {
  background: url('../images/diamante-profile.jpeg') center/cover no-repeat;
  border-color: rgba(76, 170, 205, 0.42);
}

.admin-client-item.tier-gold .admin-client-points,
.admin-selected-tier-card.tier-gold .admin-tier-badge {
  background: #1e3b58;
  color: #ffffff;
}

.admin-client-item.tier-diamond .admin-client-points,
.admin-selected-tier-card.tier-diamond .admin-tier-badge {
  background: linear-gradient(135deg, #1e3b58, #4caacd);
  color: #ffffff;
}

.admin-client-tier {
  font-weight: 800;
  color: #2f6f91 !important;
}

.admin-selected-tier-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.9rem;
  border: 1px solid #dbe8f2;
  border-radius: 20px;
  margin-bottom: 0.8rem;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.4);
}

.admin-selected-tier-card[hidden] {
  display: none;
}

.admin-selected-tier-card strong {
  display: block;
  color: #1e3b58;
  font-size: 1rem;
  margin-top: 0.16rem;
}

.admin-selected-tier-card p {
  margin: 0.2rem 0 0;
  color: #5c768e;
  font-size: 0.76rem;
  line-height: 1.35;
}

.admin-tier-kicker {
  display: block;
  color: #4caacd;
  font-size: 0.63rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 900;
}

.admin-tier-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0.42rem 0.75rem;
  border-radius: 999px;
  background: rgba(30, 59, 88, 0.08);
  color: #1e3b58;
  font-size: 0.75rem;
  font-weight: 900;
  white-space: nowrap;
}

.admin-achievements-control {
  border: 1px solid #dbe8f2;
  border-radius: 22px;
  background: linear-gradient(180deg, #ffffff, #f6fbfe);
  padding: 0.85rem;
  margin-bottom: 0.8rem;
}

.admin-achievements-control[hidden] {
  display: none;
}

.admin-achievements-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.7rem;
  margin-bottom: 0.65rem;
}

.admin-achievements-head strong {
  display: block;
  color: #1e3b58;
  font-size: 0.92rem;
}

.admin-achievements-head small {
  color: #6a84a0;
  font-weight: 800;
  font-size: 0.72rem;
}

.admin-achievements-list {
  display: grid;
  gap: 0.48rem;
}

.admin-achievement-toggle {
  position: relative;
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: center;
  padding: 0.65rem;
  border-radius: 17px;
  background: #f5f9fc;
  border: 1px solid #e0ebf4;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.admin-achievement-toggle:hover {
  transform: translateY(-1px);
  border-color: rgba(76, 170, 205, 0.46);
}

.admin-achievement-toggle.is-unlocked {
  background: linear-gradient(135deg, #ecfbff, #ffffff);
  border-color: rgba(76, 170, 205, 0.5);
  box-shadow: 0 18px 28px -26px rgba(30, 59, 88, 0.5);
}

.admin-achievement-toggle input {
  width: 18px;
  height: 18px;
  accent-color: #1e3b58;
}

.admin-achievement-icon {
  width: 34px;
  height: 34px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: #ffffff;
  border: 1px solid #dbe8f2;
  font-size: 1rem;
}

.admin-achievement-copy {
  min-width: 0;
}

.admin-achievement-copy strong {
  display: block;
  color: #1e3b58;
  font-size: 0.8rem;
  line-height: 1.15;
}

.admin-achievement-copy small {
  display: block;
  margin-top: 0.12rem;
  color: #6a84a0;
  font-size: 0.68rem;
  line-height: 1.25;
}

.admin-achievement-points {
  justify-self: end;
  padding: 0.32rem 0.58rem;
  border-radius: 999px;
  background: #ffffff;
  color: #1e3b58;
  font-size: 0.7rem;
  font-weight: 900;
  white-space: nowrap;
  border: 1px solid #dbe8f2;
}

.admin-reward-form #embed-reward-img {
  display: none;
}

@media (min-width: 768px) {
  body.admin-desktop-mode .admin-dashboard-grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(420px, 0.9fr);
  }

  body.admin-desktop-mode .admin-selected-panel,
  body.admin-desktop-mode .admin-rewards-panel {
    border-radius: 30px;
  }

  body.admin-desktop-mode .admin-achievements-list {
    gap: 0.58rem;
  }
}

@media (max-width: 520px) {
  .admin-achievement-toggle {
    grid-template-columns: auto auto minmax(0, 1fr);
  }

  .admin-achievement-points {
    grid-column: 3;
    justify-self: start;
  }
}

body:not(.staff-mode) #field-turbidity {
  display: none !important;
}

/* === QHATAI Home Refresh: inicio compacto con contenedores redondeados === */
:root {
  --color-primary: #004b7a;
  --color-bg: #f2f8fc;
  --color-accent: #8fd4ef;
  --color-cta: #f3a83f;
  --color-soft-blue: #eaf7fd;
  --bottom-nav-item-height: 42px;
  --bottom-nav-total-height: 72px;
}

html,
body,
.app-shell {
  overflow-x: hidden;
}

.app-shell {
  background: #ffffff;
  padding-bottom: calc(var(--bottom-nav-total-height) + 0.65rem);
}

.view-home {
  padding: 0.46rem 0.62rem 0.8rem;
  background: #ffffff;
}

.home-hero {
  background: transparent;
  padding: 0 0 0.48rem;
  margin: 0;
}

.home-hero-meta {
  min-height: 44px;
}

.home-brand-chip {
  gap: 0.22rem;
  min-height: 38px;
}

.home-hero-logo {
  width: 80px;
  height: 80px;
  object-fit: contain;
}

.home-logo-word {
  display: inline-block;
  color: var(--color-primary);
  font-size: 1.05rem;
  line-height: 1;
  font-weight: 900;
  letter-spacing: -0.045em;
}

.home-meta-tools {
  gap: 0.34rem;
}

.home-bell-btn,
.home-profile-chip {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #e9f6fc;
  color: var(--color-primary);
  border: 1px solid rgba(0, 75, 122, 0.08);
  box-shadow: 0 8px 18px -14px rgba(0, 75, 122, 0.65);
}

.home-bell-btn svg {
  width: 16px;
  height: 16px;
}

.home-bell-alert-badge {
  top: -5px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  background: #f47b2f;
  border: 2px solid #ffffff;
  font-size: 0.58rem;
}

.home-profile-initials {
  color: var(--color-primary);
  font-size: 0.68rem;
  font-weight: 800;
}

.home-dashboard-shell {
  background: var(--color-soft-blue);
  border-radius: 30px;
  padding: 0.62rem;
  margin: 0 0 0.82rem;
  box-shadow: 0 20px 42px -32px rgba(0, 75, 122, 0.58);
  border: 1px solid rgba(143, 212, 239, 0.32);
}

.home-dashboard-shell .home-hero-card {
  margin: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.92fr);
  gap: 0.42rem;
  align-items: stretch;
  background: transparent;
  border-radius: 0;
  padding: 0;
  min-height: 0;
  box-shadow: none;
}

.home-dashboard-shell .home-hero-main {
  min-height: 150px;
  background: linear-gradient(145deg, #004b7a 0%, #003f6c 100%);
  border-radius: 25px;
  padding: 0.88rem 0.72rem;
  display: grid;
  align-content: center;
  gap: 0.34rem;
  overflow: hidden;
}

.home-greeting-kicker {
  display: none;
}

.home-greeting-lg {
  font-size: clamp(1.08rem, 4.8vw, 1.42rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: #ffffff;
  margin: 0;
}

#welcome-name {
  color: #82cdef;
}

.home-subgreeting {
  max-width: 18ch;
  font-size: clamp(0.62rem, 2.7vw, 0.78rem);
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.88);
}

.home-quick-actions {
  margin-top: 0.42rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(30px, 42px));
  gap: 0.34rem;
  justify-content: start;
  align-items: center;
}

.home-quick-btn {
  border: 0;
  padding: 0;
  background: transparent;
  display: grid;
  justify-items: center;
  color: var(--color-primary);
}

.home-quick-btn small {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.home-quick-icon {
  width: clamp(30px, 9.5vw, 42px);
  height: clamp(30px, 9.5vw, 42px);
  border-radius: 999px;
  background: #e7f7ff;
  color: var(--color-primary);
  box-shadow: none;
  border: 0;
}

.home-quick-icon svg {
  width: 46%;
  height: 46%;
  fill: currentColor;
}

.home-hero-photo {
  margin: 0;
  margin-left: -4.06rem;
  min-width: 0;
  min-height: 150px;
  border-radius: 25px;
  overflow: hidden;
  background: #dff2fa;
}

.home-hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 72% center;
  transform: scale(1.04);
}

.home-title-row--inside {
  margin: 0.82rem 0 0.48rem;
  padding: 0 0.18rem;
}

.home-title-row--inside h3,
.view-home .home-title-row h3 {
  color: var(--color-primary);
  font-size: clamp(0.92rem, 4.2vw, 1.08rem);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.home-dashboard-shell .ideal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.36rem;
  overflow: visible;
  padding: 0;
}

.home-dashboard-shell .ideal-card {
  width: 100%;
  min-width: 0;
  aspect-ratio: 0.92 / 1;
  border-radius: 16px;
  background: linear-gradient(145deg, #004b7a 0%, #003f6c 100%);
  color: #ffffff;
  padding: clamp(0.38rem, 2.4vw, 0.7rem) 0.28rem;
  gap: 0.22rem;
  box-shadow: 0 16px 30px -24px rgba(0, 75, 122, 0.72);
  cursor: pointer;
}

.home-dashboard-shell .ideal-icon {
  width: clamp(30px, 11vw, 46px);
  height: clamp(30px, 11vw, 46px);
  border-radius: 13px;
  margin-bottom: 0.08rem;
}

.home-dashboard-shell .ideal-icon svg {
  width: 56%;
  height: 56%;
  fill: none;
  stroke: var(--color-primary);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.home-dashboard-shell .ideal-card small {
  max-width: 105%;
  color: rgba(255, 255, 255, 0.92);
  font-size: clamp(0.52rem, 2.25vw, 0.7rem);
  line-height: 1.08;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-dashboard-shell .ideal-value {
  max-width: 100%;
  color: #ffffff;
  font-size: clamp(0.65rem, 3.5vw, 1rem);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-dashboard-shell .ideal-card[data-fill="ph"] .ideal-icon {
  background: #d8eefb;
}

.home-dashboard-shell .ideal-card[data-fill="chlorine"]:nth-of-type(2) .ideal-icon {
  background: #cdeeee;
}

.home-dashboard-shell .ideal-card:nth-of-type(3) .ideal-icon {
  background: #ffd99f;
}

.view-home > .home-block {
  border-radius: 24px;
  box-shadow: 0 14px 34px -28px rgba(0, 75, 122, 0.34);
}

.view-home > .home-block:nth-of-type(3) {
  background: transparent;
  padding: 0 0.2rem;
  box-shadow: none;
  border-radius: 0;
}

.view-home > .home-block:nth-of-type(3) .home-title-row {
  margin-bottom: 0.42rem;
}

.view-home > .home-block:nth-of-type(3) .home-link {
  font-size: 0.78rem;
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.view-home > .home-block:nth-of-type(3) .media-card {
  border-radius: 22px;
  padding: 0.35rem;
  background: #ffffff;
  border: 1px solid #d9eaf4;
  box-shadow: 0 14px 32px -28px rgba(0, 75, 122, 0.5);
}

.view-home > .home-block:nth-of-type(3) .media-thumb {
  height: clamp(78px, 23vw, 118px);
  border-radius: 18px;
}

.view-home > .home-block:nth-of-type(3) .media-chip {
  border-radius: 999px;
  background: rgba(0, 75, 122, 0.88);
  font-size: 0.66rem;
  padding: 0.26rem 0.56rem;
}

.view-home > .home-block:nth-of-type(3) .media-thumb svg {
  width: 34px;
  height: 34px;
  padding: 8px;
  fill: var(--color-primary);
}

.view-home > .home-block:nth-of-type(3) .media-card h4,
.view-home > .home-block:nth-of-type(3) .media-card p {
  display: none;
}

.bottom-nav {
  width: min(430px, calc(100% - 0.92rem));
  bottom: max(0.34rem, env(safe-area-inset-bottom));
  border-radius: 999px;
  background: var(--color-primary);
  padding: 0.28rem 0.34rem calc(0.28rem + env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: center;
  gap: 0.05rem;
  box-shadow: 0 18px 36px -24px rgba(0, 43, 70, 0.9);
  border: 1px solid rgba(143, 212, 239, 0.18);
}

.nav-btn {
  min-height: var(--bottom-nav-item-height);
  border-radius: 999px;
  color: #c7ecfb;
  padding: 0;
  gap: 0;
  display: grid;
  place-items: center;
}

.nav-btn svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.nav-btn.is-active {
  background: transparent;
  color: #dff6ff;
  transform: none;
}

.nav-btn span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.nav-plus-btn {
  width: 48px;
  height: 48px;
  min-height: 48px;
  margin: 0 auto;
  border-radius: 999px;
  background: var(--color-cta);
  color: var(--color-primary);
  font-size: 1.55rem;
  line-height: 1;
  box-shadow: inset 0 -2px 0 rgba(0, 75, 122, 0.08), 0 10px 18px -14px rgba(0, 43, 70, 0.65);
}

@media (max-width: 360px) {
  .view-home {
    padding-left: 0.44rem;
    padding-right: 0.44rem;
  }

  .home-dashboard-shell {
    border-radius: 24px;
    padding: 0.48rem;
  }

  .home-dashboard-shell .home-hero-card {
    gap: 0.32rem;
  }

  .home-dashboard-shell .home-hero-main,
  .home-hero-photo {
    min-height: 118px;
    border-radius: 20px;
  }

  .home-dashboard-shell .home-hero-main {
    padding: 0.66rem 0.52rem;
  }

  .home-quick-actions {
    grid-template-columns: repeat(3, minmax(25px, 31px));
    gap: 0.25rem;
    margin-top: 0.32rem;
  }

  .home-dashboard-shell .ideal-grid {
    gap: 0.28rem;
  }

  .home-dashboard-shell .ideal-card {
    border-radius: 14px;
    padding-left: 0.16rem;
    padding-right: 0.16rem;
  }

  .bottom-nav {
    width: calc(100% - 0.52rem);
  }
}

@media (max-width: 360px) {
  .home-quick-icon {
    width: 27px;
    height: 27px;
  }
}

/* === Ajustes solicitados: saludo degradado, guías unificadas, redes compactas === */
.home-dashboard-shell .home-hero-card {
  position: relative;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr);
  gap: 0;
  overflow: visible;
}

.home-dashboard-shell .home-hero-main {
  position: relative;
  z-index: 2;
  min-height: 148px;
  background: linear-gradient(180deg, #004b7a 0%, #006da0 58%, #8fd4ef 100%);
  box-shadow: 0 14px 28px -24px rgba(0, 43, 70, 0.78);
}

.home-dashboard-shell .home-hero-main::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255,255,255,0.10) 0%, rgba(255,255,255,0) 50%);
  pointer-events: none;
}

.home-greeting-lg,
.home-subgreeting,
.home-quick-actions {
  position: relative;
  z-index: 1;
}

.home-subgreeting {
  max-width: 26ch;
  font-size: clamp(0.58rem, 2.45vw, 0.72rem);
  line-height: 1.24;
  margin: 0;
}

.home-quick-actions {
  grid-template-columns: repeat(3, minmax(26px, 34px));
  gap: 0.28rem;
  margin-top: 0.34rem;
}

.home-quick-icon {
  width: clamp(27px, 8.2vw, 34px);
  height: clamp(27px, 8.2vw, 34px);
  background: #dff5ff;
}

.home-quick-icon svg {
  width: 43%;
  height: 43%;
}

.home-hero-photo {
  position: relative;
  z-index: 1;
  min-height: 148px;
  border-radius: 25px;
  box-shadow: 0 14px 26px -24px rgba(0, 75, 122, 0.72);
}

.home-hero-photo img {
  object-position: 64% center;
  transform: scale(1.06);
}

.home-info-carousel {
  grid-auto-columns: minmax(168px, 1fr);
  gap: 0.48rem;
}

.home-info-slide {
  min-height: 114px;
  border-radius: 16px;
  padding: 0.68rem;
}

.home-info-slide--d {
  background: linear-gradient(135deg, #004b7a 0%, #397d95 100%);
}

.home-info-slide--e {
  background: linear-gradient(135deg, #1f6f83 0%, #8fd4ef 100%);
}

.social-grid {
  grid-template-columns: repeat(3, 46px);
  justify-content: center;
  align-items: center;
  gap: 0.55rem;
}

.social-card {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  padding: 0;
  display: grid;
  place-items: center;
  background: #eaf7fd;
  border: 1px solid rgba(0, 75, 122, 0.10);
  box-shadow: 0 12px 24px -22px rgba(0, 75, 122, 0.55);
}

.social-card-icon {
  width: 20px;
  height: 20px;
  margin: 0;
  fill: var(--color-primary);
}

.social-card small {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.home-footer-copy {
  margin: 0.72rem 0 calc(var(--bottom-nav-total-height) + 0.2rem);
  text-align: center;
  color: rgba(0, 75, 122, 0.58);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

@media (max-width: 360px) {
  .home-dashboard-shell .home-hero-card {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  }

  .home-dashboard-shell .home-hero-main,
  .home-hero-photo {
    min-height: 120px;
  }

  .home-subgreeting {
    font-size: 0.56rem;
    max-width: 25ch;
  }

  .home-quick-actions {
    grid-template-columns: repeat(3, 26px);
  }

  .home-quick-icon {
    width: 26px;
    height: 26px;
  }

  .social-grid {
    grid-template-columns: repeat(3, 42px);
  }

  .social-card {
    width: 42px;
    height: 42px;
    border-radius: 13px;
  }
}

/* === Ajustes finales solicitados: saludo, reels, redes blancas y alerta PWA === */
.home-dashboard-shell .home-hero-main {
  padding-left: clamp(0.96rem, 4vw, 1.2rem);
  padding-right: 0.62rem;
}

.home-quick-actions {
  gap: 0.46rem;
}

.home-dashboard-shell .home-quick-actions {
  gap: 0.46rem;
}

.quick-reels-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.48rem;
}

.quick-reel-card {
  position: relative;
  min-width: 0;
  aspect-ratio: 0.72 / 1;
  border-radius: 18px;
  overflow: hidden;
  display: grid;
  align-items: end;
  text-decoration: none;
  color: #ffffff;
  background: #eaf7fd;
  box-shadow: 0 14px 26px -24px rgba(0, 75, 122, 0.7);
  isolation: isolate;
}

.quick-reel-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(0, 75, 122, 0.04) 0%, rgba(0, 75, 122, 0.74) 100%);
}

.quick-reel-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.08);
  z-index: 0;
}

.quick-reel-card strong {
  position: relative;
  z-index: 2;
  padding: 0 0.42rem 0.5rem;
  font-size: clamp(0.54rem, 2.35vw, 0.68rem);
  line-height: 1.05;
  font-weight: 800;
  text-align: center;
  text-shadow: 0 2px 8px rgba(0, 43, 70, 0.45);
}

.quick-reel-play {
  position: absolute;
  top: 0.46rem;
  right: 0.46rem;
  z-index: 3;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.92);
  color: var(--color-primary);
  box-shadow: 0 8px 18px -14px rgba(0, 43, 70, 0.8);
}

.quick-reel-play svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.home-social-block {
  background: #ffffff !important;
  box-shadow: none !important;
  border: 0 !important;
  padding: 0.45rem 0 0.15rem !important;
}

.home-social-block .home-title-row {
  padding: 0 0.2rem;
  justify-content: center;
  margin-bottom: 0.38rem;
}

.social-grid {
  background: #ffffff;
}

.social-card {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  color: var(--color-primary);
}

.social-card-icon {
  fill: var(--color-primary) !important;
}

.pwa-install-alert {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: end center;
  padding: 1rem 0.78rem calc(var(--bottom-nav-total-height) + 0.82rem + env(safe-area-inset-bottom));
  background: rgba(0, 28, 45, 0.28);
  backdrop-filter: blur(8px);
}

.pwa-install-alert[hidden] {
  display: none;
}

.pwa-install-card {
  width: min(420px, 100%);
  border-radius: 26px;
  background: #ffffff;
  border: 1px solid rgba(143, 212, 239, 0.42);
  box-shadow: 0 24px 58px -32px rgba(0, 43, 70, 0.85);
  padding: 0.82rem;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.66rem;
  position: relative;
}

.pwa-install-close {
  position: absolute;
  top: 0.52rem;
  right: 0.58rem;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #eaf7fd;
  color: var(--color-primary);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

.pwa-install-icon {
  width: 46px;
  height: 46px;
  border-radius: 15px;
  background: #eaf7fd;
  display: grid;
  place-items: center;
  margin-top: 0.1rem;
}

.pwa-install-icon img {
  width: 29px;
  height: 29px;
  object-fit: contain;
}

.pwa-install-copy {
  min-width: 0;
  padding-right: 1.45rem;
}

.pwa-install-kicker {
  margin: 0 0 0.08rem;
  color: #5caeca;
  font-size: 0.62rem;
  line-height: 1;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.pwa-install-copy h2 {
  margin: 0;
  color: var(--color-primary);
  font-size: 0.96rem;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.pwa-install-copy p:not(.pwa-install-kicker) {
  margin: 0.28rem 0 0;
  color: rgba(0, 75, 122, 0.72);
  font-size: 0.74rem;
  line-height: 1.28;
}

.pwa-install-actions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.5rem;
  align-items: center;
}

.pwa-install-primary,
.pwa-install-later {
  min-height: 38px;
  border: 0;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 800;
  cursor: pointer;
}

.pwa-install-primary {
  background: var(--color-primary);
  color: #dff5ff;
  padding: 0.58rem 0.9rem;
}

.pwa-install-later {
  background: transparent;
  color: rgba(0, 75, 122, 0.72);
  padding: 0.58rem 0.3rem;
}

@media (max-width: 360px) {
  .home-dashboard-shell .home-hero-main {
    padding-left: 0.84rem;
    padding-right: 0.48rem;
  }

  .home-dashboard-shell .home-quick-actions,
  .home-quick-actions {
    gap: 0.34rem;
  }

  .quick-reels-grid {
    gap: 0.34rem;
  }

  .quick-reel-card {
    border-radius: 15px;
  }

  .quick-reel-play {
    width: 22px;
    height: 22px;
    top: 0.36rem;
    right: 0.36rem;
  }

  .pwa-install-card {
    border-radius: 22px;
    padding: 0.72rem;
    gap: 0.55rem;
  }
}

/* === V4: guía rápida conservada + reels con video uno a uno === */
.home-info-carousel + .quick-reels-grid {
  margin-top: 0.72rem;
}

.quick-reel-card--video {
  border: 0;
  padding: 0;
  cursor: default;
}

.quick-reel-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.08);
  z-index: 0;
  pointer-events: none;
  background: #eaf7fd;
}

.quick-reel-control {
  position: absolute;
  inset: 0;
  z-index: 4;
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  color: #ffffff;
  font-family: inherit;
  display: grid;
  align-items: end;
  cursor: pointer;
}

.quick-reel-control:focus-visible {
  outline: 2px solid #8fd4ef;
  outline-offset: -5px;
  border-radius: inherit;
}

.quick-reel-card.is-playing .quick-reel-play {
  background: #ffad3d;
  color: var(--color-primary);
  transform: scale(0.96);
}

.quick-reel-card.is-playing::after {
  background: linear-gradient(180deg, rgba(0, 75, 122, 0.02) 0%, rgba(0, 75, 122, 0.5) 100%);
}

/* === V5: alturas ajustadas en manuales, guía rápida y reels === */
.view-home > .home-block:nth-of-type(3) .media-thumb {
  height: clamp(100px, 28vw, 134px);
}

.view-home > .home-block:nth-of-type(3) .media-card {
  padding: 0.42rem;
}

.home-info-slide {
  min-height: 132px;
  padding: 0.82rem 0.72rem;
}

.quick-reel-card {
  aspect-ratio: auto;
  height: clamp(138px, 36vw, 164px);
}

.quick-reel-card strong {
  padding-bottom: 0.58rem;
}

@media (max-width: 360px) {
  .view-home > .home-block:nth-of-type(3) .media-thumb {
    height: 104px;
  }

  .home-info-slide {
    min-height: 124px;
    padding: 0.72rem 0.62rem;
  }

  .quick-reel-card {
    height: 132px;
  }
}


/* === V6: reels más altos, menos espacio inferior y PWA visible en mobile === */
.home-info-carousel + .quick-reels-grid {
  margin-top: 0.66rem;
}

.quick-reel-card {
  height: clamp(188px, 50vw, 224px);
  aspect-ratio: auto;
  border-radius: 20px;
}

.quick-reel-video {
  transform: scale(1.03);
}

.quick-reel-card strong {
  padding: 0 0.38rem 0.66rem;
  font-size: clamp(0.56rem, 2.3vw, 0.7rem);
}

.quick-reel-play {
  width: 24px;
  height: 24px;
  top: 0.42rem;
  right: 0.42rem;
}

.home-social-block {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

.home-social-block .home-title-row {
  margin-bottom: 0.24rem;
}

.home-footer-copy {
  margin: 0.32rem 0 0.18rem !important;
  padding-bottom: calc(var(--bottom-nav-total-height) - 1.7rem + env(safe-area-inset-bottom));
}

.view-home {
  padding-bottom: 0 !important;
}

.app-shell {
  padding-bottom: 0 !important;
}

.pwa-install-alert {
  z-index: 999;
}

@media (max-width: 390px) {
  .quick-reel-card {
    height: clamp(176px, 49vw, 204px);
    border-radius: 18px;
  }

  .quick-reel-card strong {
    font-size: 0.58rem;
    padding-bottom: 0.58rem;
  }

  .home-footer-copy {
    padding-bottom: calc(var(--bottom-nav-total-height) - 1.95rem + env(safe-area-inset-bottom));
  }
}

@media (min-width: 430px) {
  .quick-reel-card {
    height: 222px;
  }
}

/* Ajustes vista Control / Volumen - Qhatai v7 */
#view-alertas {
  background: #ffffff;
  padding: 0.46rem 0.62rem 0.78rem;
}

#view-alertas .control-step-banner {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  min-height: 124px;
  margin: 0 -0.62rem 0.68rem;
  padding: 1.12rem 1rem 1.02rem;
  border-radius: 0 0 22px 22px;
  background: var(--color-primary);
  grid-template-columns: minmax(0, 1fr) 5.6rem;
  box-shadow: 0 18px 35px -28px rgba(30, 59, 88, 0.55);
}

#view-alertas .control-step-copy {
  position: relative;
  z-index: 2;
  max-width: 63%;
}

#view-alertas .control-step-banner h3 {
  max-width: 13.5ch;
  font-size: clamp(1.15rem, 5.4vw, 1.48rem);
  line-height: 1.03;
  letter-spacing: -0.018em;
}

#view-alertas .control-step-banner h3 span {
  display: block;
  white-space: nowrap;
}

#view-alertas .control-step-banner p {
  max-width: 27ch;
  margin-top: 0.42rem;
  color: rgba(238, 247, 255, 0.92);
  font-size: 0.68rem;
  line-height: 1.28;
}

#view-alertas .control-step-image {
  position: absolute;
  z-index: 1;
  right: -4.05rem;
  top: 50%;
  width: 180px;
  height: 180px;
  transform: translateY(-50%);
  object-fit: contain;
  opacity: 0.16;
  filter: brightness(0) invert(1);
  pointer-events: none;
}

#view-alertas .pool-base-card {
  border-radius: 20px;
  box-shadow: 0 16px 38px -28px rgba(30, 59, 88, 0.5);
}

#view-alertas .control-tab-btn.is-active,
#view-alertas .btn-home-evaluate {
  background: var(--color-primary);
}

#view-alertas .control-tab-btn {
  background: #e6f2fb;
  color: var(--color-primary);
}

#view-alertas .control-panel {
  border-radius: 18px;
}

#view-alertas .control-panel-head h3,
#view-alertas .module-summary span,
#view-alertas .module-card h4,
#view-alertas .module-summary::after,
#view-alertas .parameter-result,
#view-alertas .pool-volume-results strong {
  color: var(--color-primary);
}

#view-alertas .module-card {
  border-radius: 16px;
}

@media (max-width: 380px) {
  #view-alertas .control-step-banner {
    min-height: 116px;
    padding: 1rem 0.92rem 0.92rem;
  }

  #view-alertas .control-step-copy {
    max-width: 66%;
  }

  #view-alertas .control-step-banner h3 {
    font-size: clamp(1.05rem, 5.2vw, 1.28rem);
  }

  #view-alertas .control-step-banner p {
    font-size: 0.64rem;
  }

  #view-alertas .control-step-image {
    right: -4.35rem;
    width: 170px;
    height: 170px;
  }
}

/* Ajustes Control / Volumen - Qhatai v8 */
#view-alertas {
  padding-top: 0 !important;
  padding-left: 0.62rem;
  padding-right: 0.62rem;
  background: #ffffff;
}

#view-alertas .control-step-banner {
  min-height: 154px;
  margin-top: 0 !important;
  margin-bottom: 0.78rem;
  padding: 1.38rem 1.02rem 1.18rem;
  border-radius: 0 0 24px 24px;
  background: var(--color-primary) !important;
  box-shadow: 0 18px 38px -26px rgba(0, 75, 122, 0.56);
}

#view-alertas .control-step-copy {
  max-width: 68%;
}

#view-alertas .control-step-banner h3 {
  max-width: 13.5ch;
  font-size: clamp(1.15rem, 5.6vw, 1.52rem);
  line-height: 1.02;
  color: #ffffff;
}

#view-alertas .control-step-banner p {
  max-width: 30ch;
  margin-top: 0.5rem;
  font-size: 0.7rem;
  line-height: 1.34;
  color: rgba(238, 247, 255, 0.94);
}

#view-alertas .control-step-image {
  right: -5.4rem;
  width: 230px;
  height: 230px;
  opacity: 0.15;
  filter: brightness(0) invert(1);
}

#view-alertas .control-panel,
#view-alertas .module-card,
#view-alertas .pool-base-card {
  overflow: visible;
}

#view-alertas .module-expand {
  overflow: hidden;
  background: #ffffff;
}

#view-alertas .module-summary {
  padding: 0.72rem 0.74rem;
  background: #ffffff;
}

#view-alertas .module-summary span {
  color: var(--color-primary) !important;
  line-height: 1.22;
}

#view-alertas .module-expand[open] .module-summary {
  background: #edf8fe;
  border-bottom: 1px solid #dcecf7;
}

#view-alertas .module-expand[open] .module-summary span {
  color: var(--color-primary) !important;
}

#view-alertas .module-body {
  width: 100%;
  padding: 0.82rem 0.78rem 0.88rem !important;
  padding-right: 0.78rem !important;
  background: #ffffff;
}

#view-alertas .module-support-image {
  display: none !important;
}

#view-alertas .module-body p,
#view-alertas .module-body li {
  width: 100%;
  margin-right: 0 !important;
  color: #405b70;
  font-size: 0.79rem;
  line-height: 1.52;
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
}

#view-alertas .module-body p {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

#view-alertas .module-body ul {
  width: 100%;
  margin: 0.42rem 0 0.58rem;
  padding-left: 1.08rem;
}

#view-alertas .module-body strong,
#view-alertas .module-body .dose-line {
  color: var(--color-primary) !important;
  font-weight: 800;
}

#view-alertas .module-body .dose-line {
  text-align: left;
  background: #edf8fe;
  border-radius: 12px;
  padding: 0.54rem 0.6rem;
  margin-bottom: 0;
}

#view-alertas .module-body .dose-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  margin-top: 0.45rem;
}

#view-alertas .module-body .dose-grid-head {
  font-weight: 700;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #4e6274;
  padding: 0.3rem 0.5rem;
}

#view-alertas .module-body .dose-grid-prod,
#view-alertas .module-body .dose-grid-dos {
  font-size: 0.72rem;
  padding: 0.45rem 0.5rem;
  background: #edf8fe;
}

#view-alertas .module-body .dose-grid-prod {
  border-radius: 8px 0 0 8px;
  font-weight: 600;
  color: #1a4a6e;
}

#view-alertas .module-body .dose-grid-dos {
  border-radius: 0 8px 8px 0;
  color: #1f5d83;
}

#view-alertas .parameter-input-row {
  width: 100%;
}

@media (max-width: 380px) {
  #view-alertas .control-step-banner {
    min-height: 144px;
    padding: 1.2rem 0.9rem 1.06rem;
  }

  #view-alertas .control-step-copy {
    max-width: 70%;
  }

  #view-alertas .control-step-image {
    right: -5.65rem;
    width: 220px;
    height: 220px;
  }
}

/* Ajustes Control / Volumen - Qhatai v9 */
#view-alertas .control-step-banner p {
  max-width: none;
  width: max-content;
  margin-top: 0.5rem;
}

#view-alertas .control-step-banner p span {
  display: block;
  white-space: nowrap;
}

#view-alertas .control-tab-btn.is-active,
#view-alertas .control-tab-btn:active,
#view-alertas .control-tab-btn:focus-visible {
  background: var(--color-primary) !important;
  color: #ffffff !important;
}

#view-alertas .btn-home-evaluate,
#view-alertas .btn-home-evaluate:active,
#view-alertas .btn-home-evaluate:focus-visible {
  color: #ffffff !important;
}

#view-alertas .module-expand[open] {
  background: #ffffff;
}

#view-alertas .module-expand[open] .module-summary {
  margin: 0;
}

#view-alertas .module-body {
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  margin: 0 !important;
  padding: 0.84rem 0.62rem 0.9rem !important;
  border-top: 0 !important;
  border-radius: 0 0 16px 16px;
}

#view-alertas .module-body p,
#view-alertas .module-body ul,
#view-alertas .module-body li,
#view-alertas .module-body .dose-line,
#view-alertas .parameter-input-row,
#view-alertas .parameter-result {
  max-width: none !important;
  box-sizing: border-box;
}

#view-alertas .module-body p,
#view-alertas .module-body li {
  text-align: justify;
  text-justify: inter-word;
}

#view-alertas .module-body ul {
  padding-left: 1rem;
  padding-right: 0;
}

@media (max-width: 380px) {
  #view-alertas .control-step-banner p {
    font-size: 0.61rem;
    line-height: 1.28;
  }
}


/* Ajustes Control / Volumen - Qhatai v10 */
#view-alertas {
  padding-bottom: calc(var(--bottom-nav-total-height) + 1.18rem + env(safe-area-inset-bottom)) !important;
}

#view-alertas .control-panel-content {
  padding: 0.84rem 0.72rem 0.94rem;
}

#view-alertas .module-card,
#view-alertas .module-expand {
  border-radius: 16px;
}

#view-alertas .module-summary {
  grid-template-columns: minmax(0, 1fr) 1.05rem;
  padding: 0.78rem 0.88rem;
  gap: 0.72rem;
}

#view-alertas .module-summary::after {
  width: 1.05rem;
  text-align: center;
  justify-self: end;
}

#view-alertas .module-summary .tag-new {
  display: none !important;
}

#view-alertas .module-body {
  padding: 0.94rem 0.96rem 1.02rem !important;
}

#view-alertas .module-body p,
#view-alertas .module-body li {
  line-height: 1.58;
}

#view-alertas .module-body p + p {
  margin-top: 0.46rem;
}

#view-alertas .module-body ul {
  margin-top: 0.52rem;
  margin-bottom: 0.72rem;
  padding-left: 1.12rem;
}

#view-alertas .module-body .dose-line,
#view-alertas .parameter-result {
  margin-top: 0.58rem;
  padding: 0.62rem 0.74rem;
}

#view-alertas .control-tab-btn {
  white-space: nowrap;
}

@media (max-width: 380px) {
  #view-alertas {
    padding-bottom: calc(var(--bottom-nav-total-height) + 1rem + env(safe-area-inset-bottom)) !important;
  }

  #view-alertas .control-panel-content {
    padding-left: 0.6rem;
    padding-right: 0.6rem;
  }

  #view-alertas .module-body {
    padding-left: 0.82rem !important;
    padding-right: 0.82rem !important;
  }
}


/* === Qhatai Typography v12 ===
   Títulos y marca: Teachers. Cuerpos: Poppins con mejor legibilidad. */
body,
p,
li,
a,
label,
input,
textarea,
select,
button,
small {
  font-family: var(--font-body);
}

p,
li,
label,
input,
textarea,
select,
small,
.store-topbar-subtitle,
.home-hero-subtitle,
.hero-card-subtitle,
.calc-hero-copy,
.accordion-body,
.tip-content,
.profile-email-line,
.profile-tier-benefit,
.media-index-subtitle,
.guide-text,
.auth-helper,
.auth-form input,
.auth-form label,
.product-card p,
.cart-item p,
.admin-card p,
.modal-card p {
  font-size: max(0.96rem, 15px);
  line-height: 1.5;
}

h1,
h2,
h3,
h4,
h5,
h6,
[class*="title"],
[class*="heading"],
[class*="kicker"],
[class*="brand"],
[class*="logo-word"],
.points-value,
.points-label strong,
.home-logo-word,
.home-section-title,
.home-title-row,
.home-greeting-title,
.store-topbar-title,
.cart-view-title,
.profile-card-user h3,
.rewards-head-note,
.admin-card-title,
.admin-dashboard-kicker,
.tier-badge,
.nav-item,
.bottom-nav button,
.btn,
.btn-primary,
.pwa-install-title,
.pwa-install-kicker,
.center-alert-title,
.center-alert-level {
  font-family: var(--font-title);
}

.home-logo-word,
.desktop-mobile-gate-kicker,
.store-kicker,
.store-rewards-entry-kicker,
.rewards-head-note,
.admin-dashboard-kicker,
.home-footer-copy,
.media-index-kicker,
.guide-kicker,
.brand-word,
.qhatai-word {
  font-family: var(--font-title) !important;
}

.home-hero-title,
.home-greeting-title,
.store-topbar-title,
.cart-view-title,
.profile-card-user h3,
.rewards-block h3,
.admin-card h3,
.modal-card h2,
.pwa-install-card h2 {
  letter-spacing: -0.01em;
}


/* Profile tier benefit typography correction v12 */
.profile-tier-benefit {
  font-family: var(--font-body) !important;
  font-size: max(0.96rem, 15px);
  line-height: 1.45;
}

/* === Qhatai Balance v13: ajuste visual de tamaños, aire y cards === */
:root {
  --fs-xs: 0.7rem;
  --fs-sm: 0.78rem;
  --fs-md: 0.88rem;
  --fs-lg: 1rem;
  --fs-xl: clamp(1.22rem, 5vw, 1.55rem);
}

html,
body {
  font-size: 15px;
  line-height: 1.42;
}

body,
p,
li,
a,
label,
input,
textarea,
select,
button,
small,
.product-card p,
.cart-item p,
.admin-card p,
.modal-card p,
.profile-email-line,
.profile-tier-benefit,
.media-index-subtitle,
.guide-text,
.auth-helper {
  font-family: var(--font-body) !important;
}

p,
li,
label,
input,
textarea,
select,
small,
.home-status-text,
.home-highlight-card p,
.media-card p,
.store-topbar-subtitle,
.store-featured-copy p,
.store-rewards-entry-copy,
.product-card p,
.profile-tier-benefit,
.notification-card p,
.module-body p,
.module-body li,
.parameter-result,
.dose-line,
.guide-text,
.media-index-subtitle {
  font-size: 0.76rem !important;
  line-height: 1.42 !important;
}

h1,
h2,
h3,
h4,
h5,
h6,
[class*="title"],
[class*="heading"],
[class*="kicker"],
[class*="brand"],
[class*="logo-word"],
.points-value,
.points-label strong,
.home-logo-word,
.home-section-title,
.home-title-row,
.store-topbar-title,
.cart-view-title,
.profile-card-user h3,
.rewards-head-note,
.admin-card-title,
.admin-dashboard-kicker,
.tier-badge,
.nav-item,
.bottom-nav button,
.btn,
.btn-primary,
.pwa-install-kicker,
.center-alert-title,
.center-alert-level {
  font-family: var(--font-title) !important;
}

.btn {
  font-size: 0.82rem !important;
  padding: 0.62rem 0.82rem;
}

.view {
  padding-left: 0.82rem;
  padding-right: 0.82rem;
}

.home-title-row h3,
.card h2,
.card h3,
.control-panel-head h3,
.home-maintenance-title,
.notification-card h4,
.media-card h4,
.store-title-block h2,
.rewards-block h3 {
  font-size: 0.92rem !important;
  line-height: 1.12 !important;
  letter-spacing: -0.01em;
}

.home-link,
.home-chip-muted,
.media-chip,
.product-stock-chip,
.store-featured-chip,
.store-kicker,
.store-rewards-entry-kicker,
.rewards-mini-kicker,
.home-task-progress,
.tag-new {
  font-size: 0.58rem !important;
  line-height: 1.05 !important;
}

/* Inicio: cards de manuales, guía rápida y reels con más aire */
.view-home > .home-block {
  padding: 0.76rem !important;
  margin-bottom: 0.72rem !important;
  border-radius: 20px !important;
}

.view-home > .home-block:nth-of-type(3) {
  padding: 0 0.16rem !important;
}

.view-home .home-title-row {
  margin-bottom: 0.48rem !important;
}

.view-home > .home-block:nth-of-type(3) .media-thumb {
  height: clamp(108px, 29vw, 132px) !important;
}

.view-home > .home-block:nth-of-type(3) .media-card {
  padding: 0.38rem !important;
}

.home-info-carousel {
  grid-auto-columns: minmax(136px, 0.78fr) !important;
  gap: 0.5rem !important;
  padding-bottom: 0.16rem !important;
}

.home-info-slide {
  min-height: 112px !important;
  padding: 0.68rem 0.58rem !important;
  border-radius: 16px !important;
  gap: 0.24rem !important;
}

.home-info-slide h4 {
  font-size: 0.78rem !important;
  line-height: 1.12 !important;
  max-width: 13ch;
}

.home-info-slide p {
  font-size: 0.66rem !important;
  line-height: 1.28 !important;
  max-width: 21ch !important;
}

.quick-reels-grid {
  gap: 0.44rem !important;
  margin-top: 0.58rem !important;
}

.quick-reel-card {
  height: clamp(170px, 45vw, 198px) !important;
  border-radius: 18px !important;
}

.quick-reel-card strong {
  font-size: 0.58rem !important;
  line-height: 1.08 !important;
  padding: 0 0.34rem 0.56rem !important;
}

.quick-reel-play {
  width: 23px !important;
  height: 23px !important;
}

.home-social-block {
  padding-top: 0.24rem !important;
}

.home-footer-copy {
  font-size: 0.58rem !important;
  margin-top: 0.18rem !important;
}

/* Vista de control/consejos: contenido menos cargado y tabs compactos */
#view-alertas .control-step-banner {
  min-height: 134px !important;
  padding-top: 1.08rem !important;
  padding-bottom: 1rem !important;
}

#view-alertas .control-step-banner h3 {
  font-size: clamp(1.06rem, 4.7vw, 1.34rem) !important;
  line-height: 1.02 !important;
}

#view-alertas .control-step-banner p {
  font-size: 0.62rem !important;
  line-height: 1.25 !important;
  margin-top: 0.42rem !important;
}

#view-alertas .pool-base-card,
#view-alertas .control-panel,
#view-alertas .control-panel-content {
  border-radius: 18px !important;
}

#view-alertas .pool-base-card {
  padding: 0.82rem !important;
  margin-bottom: 0.66rem !important;
}

#view-alertas .pool-base-grid {
  gap: 0.42rem !important;
}

#view-alertas .pool-base-grid label {
  font-size: 0.66rem !important;
}

#view-alertas .pool-base-grid input {
  font-size: 0.78rem !important;
  padding: 0.42rem 0 !important;
}

#view-alertas .pool-volume-results p {
  font-size: 0.66rem !important;
}

#view-alertas .control-tabbar {
  gap: 0.32rem !important;
  margin-bottom: 0.56rem !important;
}

#view-alertas .control-tab-btn {
  font-size: 0.58rem !important;
  min-height: 27px !important;
  padding: 0.32rem 0.48rem !important;
}

#view-alertas .control-panel-head {
  padding: 0.72rem 0.76rem 0.3rem !important;
}

#view-alertas .control-panel-head p {
  font-size: 0.68rem !important;
  line-height: 1.34 !important;
}

#view-alertas .control-panel-content {
  padding: 0.62rem 0.62rem 0.84rem !important;
}

#view-alertas .module-card,
#view-alertas .module-expand {
  border-radius: 15px !important;
}

#view-alertas .module-summary {
  padding: 0.64rem 0.76rem !important;
  gap: 0.55rem !important;
}

#view-alertas .module-summary h4,
#view-alertas .module-summary strong,
#view-alertas .module-summary span:first-child {
  font-size: 0.76rem !important;
  line-height: 1.16 !important;
}

#view-alertas .module-body {
  padding: 0.78rem 0.86rem 0.9rem !important;
}

#view-alertas .module-body p,
#view-alertas .module-body li {
  font-size: 0.72rem !important;
  line-height: 1.5 !important;
}

#view-alertas .module-body ul {
  padding-left: 1rem !important;
  margin-top: 0.42rem !important;
  margin-bottom: 0.58rem !important;
}

#view-alertas .module-body .dose-line,
#view-alertas .parameter-result {
  font-size: 0.7rem !important;
  padding: 0.52rem 0.62rem !important;
  border-radius: 13px !important;
}

/* Tienda: diseño liviano, máximo 2 líneas por producto */
#view-tienda {
  padding-bottom: calc(var(--bottom-nav-total-height) + 0.4rem) !important;
}

.store-showcase {
  padding: 0.76rem 0.62rem 0.9rem !important;
}

.store-topbar {
  gap: 0.58rem !important;
}

.store-topbar-title {
  font-size: clamp(1.22rem, 5.8vw, 1.58rem) !important;
  line-height: 1.02 !important;
  max-width: 14ch;
}

.store-topbar-subtitle {
  font-size: 0.68rem !important;
  line-height: 1.34 !important;
  max-width: 32ch !important;
}

.store-cart-icon-btn {
  width: 40px !important;
  height: 40px !important;
}

.store-cart-icon-btn svg {
  width: 18px !important;
  height: 18px !important;
}

.store-toolbar {
  margin-top: 0.72rem !important;
  gap: 0.42rem !important;
}

.store-tool-btn {
  width: 34px !important;
  height: 34px !important;
}

.store-filters {
  margin-top: 0.72rem !important;
  gap: 0.38rem !important;
}

.store-filter-btn {
  padding: 0.4rem 0.78rem !important;
  font-size: 0.72rem !important;
}

.store-info-pill {
  min-height: 34px !important;
  padding: 0.36rem 0.62rem !important;
}

.store-info-pill strong {
  font-size: 0.66rem !important;
}

.store-info-pill span {
  font-size: 0.58rem !important;
}

.store-rewards-entry {
  margin-top: 0.68rem !important;
  padding: 0.72rem !important;
  gap: 0.56rem !important;
  border-radius: 18px !important;
}

.store-rewards-entry-icon {
  width: 40px !important;
  height: 40px !important;
  border-radius: 13px !important;
  font-size: 1.12rem !important;
}

.store-rewards-entry-content strong {
  font-size: 0.78rem !important;
  line-height: 1.1 !important;
}

.store-rewards-entry-copy {
  font-size: 0.62rem !important;
  line-height: 1.22 !important;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.store-rewards-entry-tier,
.store-rewards-entry-points {
  min-height: 23px !important;
  padding: 0.22rem 0.48rem !important;
  font-size: 0.56rem !important;
}

.store-featured-product {
  padding: 0.76rem !important;
  grid-template-columns: minmax(0, 1fr) 88px !important;
  gap: 0.56rem !important;
  border-radius: 18px !important;
}

.store-featured-copy h3 {
  font-size: 0.84rem !important;
  line-height: 1.16 !important;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.store-featured-copy p {
  font-size: 0.66rem !important;
  line-height: 1.3 !important;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.store-featured-copy strong {
  font-size: 0.86rem !important;
}

.store-featured-btn {
  font-size: 0.6rem !important;
  padding: 0.36rem 0.58rem !important;
}

.products-grid {
  gap: 0.58rem !important;
  margin-top: 0.78rem !important;
}

.product-card {
  padding: 0.5rem !important;
  gap: 0.4rem !important;
  border-radius: 16px !important;
  min-width: 0;
}

.product-thumb-wrap {
  border-radius: 14px !important;
  aspect-ratio: 1 / 0.86 !important;
}

.product-card img {
  padding: 0.42rem !important;
}

.product-body {
  gap: 0.24rem !important;
  min-width: 0;
}

.product-category {
  font-size: 0.55rem !important;
  line-height: 1.05 !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-card h4 {
  font-size: 0.74rem !important;
  line-height: 1.12 !important;
  min-height: 2.24em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card p {
  font-size: 0.64rem !important;
  line-height: 1.24 !important;
  min-height: 2.48em !important;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-meta {
  margin-top: 0.1rem !important;
  gap: 0.42rem !important;
}

.product-price {
  font-size: 0.84rem !important;
  line-height: 1 !important;
}

.product-add-btn {
  width: 30px !important;
  min-width: 30px !important;
  height: 30px !important;
}

.product-add-btn::before {
  font-size: 0.88rem !important;
}

.product-stock-chip {
  font-size: 0.52rem !important;
  padding: 0.14rem 0.34rem !important;
}

/* Perfil y rewards: conservar diseño, evitar texto pesado */
.profile-points-card .profile-card-user h3,
.profile-points-card #profile-name {
  font-size: 0.84rem !important;
}

.profile-points-card .profile-email-line {
  font-size: 0.62rem !important;
}

.profile-points-card .points-value {
  font-size: 1.78rem !important;
}

.profile-points-card .points-label {
  font-size: 0.54rem !important;
}

.profile-points-card .profile-tier-benefit {
  font-size: 0.62rem !important;
  line-height: 1.22 !important;
}

@media (max-width: 380px) {
  .view {
    padding-left: 0.68rem;
    padding-right: 0.68rem;
  }

  .home-info-carousel {
    grid-auto-columns: minmax(128px, 0.78fr) !important;
  }

  .home-info-slide {
    min-height: 106px !important;
    padding: 0.6rem 0.5rem !important;
  }

  .home-info-slide h4 {
    font-size: 0.72rem !important;
  }

  .home-info-slide p {
    font-size: 0.61rem !important;
  }

  .quick-reel-card {
    height: clamp(158px, 43vw, 184px) !important;
  }

  #view-alertas .control-tab-btn {
    font-size: 0.54rem !important;
    padding-left: 0.38rem !important;
    padding-right: 0.38rem !important;
  }

  .store-showcase {
    padding-left: 0.54rem !important;
    padding-right: 0.54rem !important;
  }

  .products-grid {
    gap: 0.46rem !important;
  }

  .product-card {
    padding: 0.44rem !important;
  }

  .product-card h4 {
    font-size: 0.69rem !important;
  }

  .product-card p {
    font-size: 0.6rem !important;
  }
}


/* === Qhatai v14: restauración de fondos azules, tienda, control y perfil === */
:root {
  --qhatai-blue: #005083;
  --qhatai-blue-dark: #004b7a;
  --qhatai-blue-deep: #003f6c;
  --qhatai-celeste: #8fd4ef;
  --qhatai-soft: #eaf7fd;
  --qhatai-soft-2: #f4fbff;
}

/* Restaurar intención de marca después del balance tipográfico */
.home-dashboard-shell {
  background: linear-gradient(180deg, #e9f8ff 0%, #f5fcff 100%) !important;
  border-color: rgba(143, 212, 239, 0.45) !important;
}

.home-dashboard-shell .home-hero-main {
  background: linear-gradient(180deg, var(--qhatai-blue-dark) 0%, #006da0 60%, var(--qhatai-celeste) 100%) !important;
  color: #ffffff !important;
}

.home-dashboard-shell .home-hero-main::after {
  background: linear-gradient(135deg, rgba(255,255,255,0.13) 0%, rgba(255,255,255,0) 52%) !important;
}

.home-dashboard-shell .ideal-card {
  background: linear-gradient(145deg, var(--qhatai-blue-dark) 0%, var(--qhatai-blue-deep) 100%) !important;
  color: #ffffff !important;
}

.home-info-slide {
  color: #ffffff !important;
  box-shadow: 0 14px 30px -24px rgba(0, 75, 122, 0.72) !important;
}

.home-info-slide--a,
.home-info-slide--d {
  background: linear-gradient(135deg, var(--qhatai-blue-dark) 0%, #24537d 100%) !important;
}

.home-info-slide--b {
  background: linear-gradient(135deg, #245d7f 0%, #357895 100%) !important;
}

.home-info-slide--c,
.home-info-slide--e {
  background: linear-gradient(135deg, #1f6f83 0%, var(--qhatai-celeste) 100%) !important;
}

.home-info-slide h4,
.home-info-slide p {
  color: #ffffff !important;
}

/* Control: tabs y cards con más aire, menos carga visual y márgenes internos */
#view-alertas .pool-volume-results p {
  background: #f2f9fd !important;
  border: 1px solid rgba(143, 212, 239, 0.28) !important;
  color: var(--qhatai-blue) !important;
}

#view-alertas .control-tabbar {
  gap: 0.36rem !important;
}

#view-alertas .control-tab-btn {
  background: #e7f5fb !important;
  color: var(--qhatai-blue) !important;
  border: 1px solid rgba(143, 212, 239, 0.26) !important;
  font-size: 0.56rem !important;
  min-height: 29px !important;
}

#view-alertas .control-tab-btn.is-active,
#view-alertas .control-tab-btn:active,
#view-alertas .control-tab-btn:focus-visible {
  background: var(--qhatai-blue) !important;
  color: #ffffff !important;
}

#view-alertas .control-panel {
  background: #f7fbfe !important;
  border-color: #dceaf4 !important;
}

#view-alertas .control-panel-head {
  padding: 0.76rem 0.88rem 0.38rem !important;
  background: linear-gradient(180deg, #f3fbff 0%, #ffffff 100%) !important;
}

#view-alertas .control-panel-head p {
  max-width: 31ch !important;
}

#view-alertas .control-panel-content {
  padding: 0.78rem 0.82rem 1rem !important;
  gap: 0.64rem !important;
  background: #f7fbfe !important;
}

#view-alertas .module-card,
#view-alertas .module-expand {
  margin-inline: 0.04rem !important;
  border-radius: 16px !important;
  background: #ffffff !important;
  border: 1px solid #dceaf4 !important;
  box-shadow: 0 12px 28px -25px rgba(0, 75, 122, 0.42) !important;
}

#view-alertas .module-summary {
  padding: 0.66rem 0.86rem !important;
  grid-template-columns: minmax(0, 1fr) 1.15rem !important;
}

#view-alertas .module-summary::after {
  color: var(--qhatai-blue) !important;
  font-weight: 900 !important;
}

#view-alertas .module-expand[open] .module-summary {
  background: #eaf7fd !important;
}

#view-alertas .module-body {
  padding: 0.84rem 1rem 0.96rem !important;
  background: #ffffff !important;
}

#view-alertas .module-body p,
#view-alertas .module-body li {
  font-size: 0.68rem !important;
  line-height: 1.42 !important;
  color: #405b70 !important;
  text-align: justify !important;
  text-justify: inter-word;
}

#view-alertas .module-body ul {
  padding-left: 0.95rem !important;
  margin: 0.38rem 0 0.54rem !important;
}

#view-alertas .module-body .dose-line,
#view-alertas .parameter-result {
  background: #eef9ff !important;
  color: var(--qhatai-blue) !important;
  border-radius: 12px !important;
  padding: 0.54rem 0.68rem !important;
}

/* Tienda: botón añadir completo y fondos recuperados */
.store-showcase {
  background: linear-gradient(180deg, #eef8ff 0%, #ffffff 54%, #f5fbff 100%) !important;
}

.store-rewards-entry {
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 255, 255, 0.36), transparent 32%),
    linear-gradient(135deg, var(--qhatai-blue-dark) 0%, #245d7f 52%, #4caacd 100%) !important;
  color: #ffffff !important;
  border-color: rgba(143, 212, 239, 0.46) !important;
}

.store-rewards-entry * {
  color: inherit;
}

.store-rewards-entry-points {
  background: #ffffff !important;
  color: var(--qhatai-blue) !important;
}

.store-rewards-entry-tier {
  background: rgba(255,255,255,0.18) !important;
  color: #ffffff !important;
}

.product-card {
  background: #ffffff !important;
  border-color: #dbeaf4 !important;
}

.product-add-btn {
  width: auto !important;
  min-width: 66px !important;
  height: 30px !important;
  border-radius: 999px !important;
  padding: 0.34rem 0.38rem 0.34rem 0.58rem !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.28rem !important;
  font-size: 0.56rem !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  background: #f3a83f !important;
  color: var(--qhatai-blue) !important;
  overflow: visible !important;
}

.product-add-btn::before {
  content: none !important;
  display: none !important;
}

.product-add-btn::after {
  content: "+";
  width: 18px;
  height: 18px;
  min-width: 18px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.54);
  color: var(--qhatai-blue);
  font-size: 0.9rem;
  line-height: 1;
  font-weight: 900;
}

.product-add-btn.is-added::after {
  content: "✓";
  font-size: 0.78rem;
}

.product-add-btn[disabled] {
  min-width: 64px !important;
  background: #d7e3ef !important;
  color: #5c7186 !important;
}

.product-add-btn[disabled]::after {
  content: none !important;
  display: none !important;
}

/* Club Qhatai / rewards: fondos y jerarquía visual */
.rewards-showcase {
  background: linear-gradient(180deg, #edf8ff 0%, #ffffff 44%, #f5f9fc 100%) !important;
}

.rewards-summary-card {
  background:
    radial-gradient(circle at 88% 6%, rgba(255,255,255,0.26), transparent 30%),
    linear-gradient(135deg, rgba(0, 75, 122, 0.96), rgba(23, 106, 145, 0.94)) !important;
  color: #ffffff !important;
}

.rewards-action-card,
.rewards-block {
  background: rgba(255,255,255,0.9) !important;
  border: 1px solid #dbeaf4 !important;
}

.rewards-tier-card.tier-basic { background: url('../images/basico-rewards.jpeg') center/cover no-repeat !important; }
.rewards-tier-card.tier-silver { background: url('../images/plata-rewards.jpeg') center/cover no-repeat !important; }
.rewards-tier-card.tier-gold { background: url('../images/oro-rewards.jpeg') center/cover no-repeat !important; }
.rewards-tier-card.tier-diamond { background: url('../images/diamante-rewards.jpeg') center/cover no-repeat !important; }

/* Perfil: restaurar fondo de la tarjeta de puntos */
.profile-settings-card {
  background: linear-gradient(165deg, #f7f9fc 0%, #ffffff 100%) !important;
}

.profile-points-card::before {
  background:
    radial-gradient(circle at 12% 8%, rgba(255,255,255,0.18), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,0.12), rgba(255,255,255,0)) !important;
}

.profile-points-card.tier-basic {
  background: url('../images/basico-profile.jpeg') center/cover no-repeat !important;
}

.profile-points-card.tier-silver {
  background: url('../images/plata-profile.jpeg') center/cover no-repeat !important;
}

.profile-points-card.tier-gold {
  background: url('../images/oro-profile.jpeg') center/cover no-repeat !important;
}

.profile-points-card.tier-diamond {
  background: url('../images/diamante-profile.jpeg') center/cover no-repeat !important;
}

@media (max-width: 380px) {
  #view-alertas .module-body {
    padding-left: 0.88rem !important;
    padding-right: 0.88rem !important;
  }

  .product-add-btn {
    min-width: 60px !important;
    height: 28px !important;
    font-size: 0.52rem !important;
    padding-left: 0.48rem !important;
  }

  .product-add-btn::after {
    width: 17px;
    height: 17px;
    min-width: 17px;
  }
}

/* === Qhatai v15: pulido final por vistas, jerarquía y rangos === */
:root {
  --qhatai-blue: #004b7a;
  --qhatai-blue-dark: #003f68;
  --qhatai-celeste: #8fd4ef;
  --qhatai-soft: #eaf7fd;
  --qhatai-gold-1: #f6d879;
  --qhatai-gold-2: #d6a82d;
  --qhatai-silver-1: #d2d2d2;
  --qhatai-silver-2: #b9b9b9;
  --qhatai-diamond-1: #d9fbff;
  --qhatai-diamond-2: #aeeef5;
}

/* Inicio: saludo legible en 2 líneas */
.home-subgreeting {
  display: grid !important;
  gap: 0.08rem !important;
  max-width: 18ch !important;
  font-size: clamp(0.58rem, 2.25vw, 0.68rem) !important;
  line-height: 1.18 !important;
  letter-spacing: -0.01em !important;
}
.home-subgreeting span {
  display: block !important;
  white-space: nowrap !important;
}

/* Inicio: guía rápida con cards más anchas y texto máximo 2 líneas */
.home-info-carousel {
  grid-auto-columns: minmax(198px, 82%) !important;
  gap: 0.68rem !important;
  padding-bottom: 0.22rem !important;
}
.home-info-slide {
  min-height: 126px !important;
  padding: 0.8rem 0.9rem !important;
  border-radius: 18px !important;
  align-content: center !important;
}
.home-info-slide h4,
.home-info-slide p {
  display: -webkit-box !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  text-align: center !important;
}
.home-info-slide h4 {
  -webkit-line-clamp: 2 !important;
  max-width: 20ch !important;
  margin-inline: auto !important;
  font-size: clamp(0.78rem, 3vw, 0.9rem) !important;
  line-height: 1.12 !important;
}
.home-info-slide p {
  -webkit-line-clamp: 2 !important;
  max-width: 30ch !important;
  margin-inline: auto !important;
  font-size: clamp(0.66rem, 2.55vw, 0.76rem) !important;
  line-height: 1.25 !important;
}

/* Control: menos carga visual dentro de Acciones / Parámetros / Secretos / Problemas / Registro */
#view-alertas .control-panel-head {
  padding: 0.74rem 0.96rem 0.46rem !important;
}
#view-alertas .control-panel-head h3 {
  font-size: 0.82rem !important;
  line-height: 1.14 !important;
}
#view-alertas .control-panel-head p {
  font-size: 0.64rem !important;
  line-height: 1.32 !important;
  max-width: 35ch !important;
}
#view-alertas .control-panel-content {
  padding: 0.78rem 0.95rem 1.06rem !important;
  gap: 0.66rem !important;
}
#view-alertas .module-summary {
  padding: 0.62rem 0.92rem !important;
}
#view-alertas .module-summary span {
  font-size: 0.74rem !important;
  line-height: 1.15 !important;
}
#view-alertas .module-body {
  padding: 0.78rem 1.05rem 0.94rem !important;
}
#view-alertas .module-body p,
#view-alertas .module-body li {
  font-size: 0.64rem !important;
  line-height: 1.38 !important;
  text-align: justify !important;
  text-justify: inter-word;
}
#view-alertas .module-body ul {
  padding-left: 0.9rem !important;
  margin: 0.34rem 0 0.48rem !important;
}
#view-alertas .module-body .dose-line,
#view-alertas .parameter-result {
  margin-top: 0.42rem !important;
  font-size: 0.62rem !important;
  line-height: 1.28 !important;
  padding: 0.52rem 0.66rem !important;
}
#view-alertas .parameter-input-row {
  gap: 0.46rem !important;
}
#view-alertas .parameter-input-row input,
#view-alertas .parameter-input-row button,
#view-alertas .pool-base-grid input,
#view-alertas .pool-base-grid button {
  font-size: 0.68rem !important;
}

/* Tienda: título solicitado, descripción en 2 líneas amplias y botón Añadir unido */
#view-tienda .store-topbar {
  grid-template-columns: minmax(0, 1fr) 40px !important;
  gap: 0.58rem !important;
  align-items: start !important;
}
#view-tienda .store-topbar-title {
  max-width: 100% !important;
  font-size: clamp(1.26rem, 5.8vw, 1.66rem) !important;
  line-height: 1.02 !important;
}
#view-tienda .store-topbar-subtitle {
  max-width: 46ch !important;
  width: 100% !important;
  font-size: clamp(0.68rem, 2.5vw, 0.76rem) !important;
  line-height: 1.28 !important;
  margin-top: 0.26rem !important;
}
#view-tienda .store-topbar-subtitle span {
  display: block !important;
}
.product-meta {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
}
.product-add-btn {
  position: static !important;
  width: auto !important;
  min-width: 70px !important;
  max-width: 82px !important;
  height: 30px !important;
  border-radius: 999px !important;
  padding: 0.34rem 0.36rem 0.34rem 0.58rem !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.28rem !important;
  font-size: 0.56rem !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
}
.product-add-btn::before {
  content: none !important;
  display: none !important;
}
.product-add-btn::after {
  content: "+" !important;
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  border-radius: 999px !important;
  display: grid !important;
  place-items: center !important;
  margin-left: 0.02rem !important;
  background: rgba(255,255,255,0.55) !important;
  color: var(--qhatai-blue) !important;
  font-size: 0.86rem !important;
  line-height: 1 !important;
  font-weight: 900 !important;
}
.product-add-btn.is-added::after {
  content: "✓" !important;
}
.product-add-btn[disabled]::after {
  content: none !important;
  display: none !important;
}

/* Perfil: card de puntos con más altura y aire inferior */
.profile-identity-row {
  padding: 0.68rem !important;
  border-radius: 18px !important;
}
.profile-points-card {
  min-height: 166px !important;
  padding: 17px 17px 18px !important;
  border-radius: 18px !important;
}
.profile-points-summary {
  margin-top: 19px !important;
}
.profile-points-card .profile-tier-benefit {
  margin-top: 0.82rem !important;
  max-width: 78% !important;
  padding-bottom: 0.02rem !important;
}
.profile-points-card::after {
  right: -24px !important;
  bottom: -28px !important;
  opacity: 0.28 !important;
}

/* Club Qhatai: botón volver con flecha e identidad por nivel */
.rewards-back-btn {
  width: 42px !important;
  height: 42px !important;
  border-radius: 50% !important;
  display: grid !important;
  place-items: center !important;
  background: var(--qhatai-blue) !important;
  color: #ffffff !important;
  font-size: 0 !important;
  padding: 0 !important;
}
.rewards-back-btn svg {
  width: 21px !important;
  height: 21px !important;
  fill: #ffffff !important;
}
.rewards-summary-card {
  transition: background 260ms ease, color 260ms ease !important;
}
.store-rewards-entry.tier-basic {
  background:
    radial-gradient(circle at 88% 6%, rgba(255,255,255,0.26), transparent 30%),
    linear-gradient(135deg, rgba(0,0,0,0.15), rgba(0,0,0,0.05)),
    var(--qhatai-store-basic-bg) center/cover no-repeat !important;
  color: #ffffff !important;
}
.rewards-summary-card.tier-basic {
  background:
    radial-gradient(circle at 88% 6%, rgba(255,255,255,0.26), transparent 30%),
    linear-gradient(135deg, rgba(0,0,0,0.15), rgba(0,0,0,0.05)),
    var(--qhatai-rewards-basic-bg) center/cover no-repeat !important;
  color: #ffffff !important;
}
.store-rewards-entry.tier-silver {
  background:
    radial-gradient(circle at 88% 6%, rgba(255,255,255,0.28), transparent 30%),
    linear-gradient(135deg, rgba(0,0,0,0.12), rgba(0,0,0,0.03)),
    var(--qhatai-store-silver-bg) center/cover no-repeat !important;
  color: #101820 !important;
}
.rewards-summary-card.tier-silver {
  background:
    radial-gradient(circle at 88% 6%, rgba(255,255,255,0.28), transparent 30%),
    linear-gradient(135deg, rgba(0,0,0,0.12), rgba(0,0,0,0.03)),
    var(--qhatai-rewards-silver-bg) center/cover no-repeat !important;
  color: #101820 !important;
}
.store-rewards-entry.tier-gold {
  background:
    radial-gradient(circle at 88% 6%, rgba(255,255,255,0.30), transparent 30%),
    linear-gradient(135deg, rgba(0,0,0,0.12), rgba(0,0,0,0.03)),
    var(--qhatai-store-gold-bg) center/cover no-repeat !important;
  color: #121212 !important;
}
.rewards-summary-card.tier-gold {
  background:
    radial-gradient(circle at 88% 6%, rgba(255,255,255,0.30), transparent 30%),
    linear-gradient(135deg, rgba(0,0,0,0.12), rgba(0,0,0,0.03)),
    var(--qhatai-rewards-gold-bg) center/cover no-repeat !important;
  color: #121212 !important;
}
.store-rewards-entry.tier-diamond {
  background:
    radial-gradient(circle at 88% 6%, rgba(255,255,255,0.34), transparent 30%),
    linear-gradient(135deg, rgba(0,0,0,0.10), rgba(0,0,0,0.02)),
    var(--qhatai-store-diamond-bg) center/cover no-repeat !important;
  color: #0b2d3c !important;
}
.rewards-summary-card.tier-diamond {
  background:
    radial-gradient(circle at 88% 6%, rgba(255,255,255,0.34), transparent 30%),
    linear-gradient(135deg, rgba(0,0,0,0.10), rgba(0,0,0,0.02)),
    var(--qhatai-rewards-diamond-bg) center/cover no-repeat !important;
  color: #0b2d3c !important;
}
.rewards-summary-card.tier-silver .rewards-points-display span,
.rewards-summary-card.tier-silver .rewards-next-text,
.rewards-summary-card.tier-gold .rewards-points-display span,
.rewards-summary-card.tier-gold .rewards-next-text,
.rewards-summary-card.tier-diamond .rewards-points-display span,
.rewards-summary-card.tier-diamond .rewards-next-text {
  color: currentColor !important;
  opacity: 0.78;
}
.rewards-summary-card.tier-silver .rewards-tier-pill,
.rewards-summary-card.tier-gold .rewards-tier-pill,
.rewards-summary-card.tier-diamond .rewards-tier-pill {
  background: rgba(255,255,255,0.76) !important;
  color: currentColor !important;
}
.rewards-summary-card.tier-silver .rewards-program-chip,
.rewards-summary-card.tier-gold .rewards-program-chip,
.rewards-summary-card.tier-diamond .rewards-program-chip {
  background: rgba(255,255,255,0.34) !important;
  color: currentColor !important;
  border-color: rgba(255,255,255,0.44) !important;
}
.rewards-summary-card.tier-basic .rewards-progress span {
  background: linear-gradient(90deg, #8fd4ef, #ffffff) !important;
}
.rewards-summary-card.tier-silver .rewards-progress {
  background: rgba(255,255,255,0.44) !important;
}
.rewards-summary-card.tier-silver .rewards-progress span {
  background: linear-gradient(90deg, #6f7780, #ffffff) !important;
}
.rewards-summary-card.tier-gold .rewards-progress {
  background: rgba(255,255,255,0.42) !important;
}
.rewards-summary-card.tier-gold .rewards-progress span {
  background: linear-gradient(90deg, #8f6700, #fff3b8) !important;
}
.rewards-summary-card.tier-diamond .rewards-progress {
  background: rgba(255,255,255,0.48) !important;
}
.rewards-summary-card.tier-diamond .rewards-progress span {
  background: linear-gradient(90deg, #009bb5, #ffffff) !important;
}

@media (max-width: 380px) {
  .home-info-carousel {
    grid-auto-columns: minmax(182px, 84%) !important;
  }
  .home-info-slide {
    min-height: 118px !important;
    padding: 0.72rem 0.78rem !important;
  }
  #view-alertas .module-body {
    padding-left: 0.96rem !important;
    padding-right: 0.96rem !important;
  }
  .profile-points-card {
    min-height: 158px !important;
    padding: 16px 15px 17px !important;
  }
  #view-tienda .store-topbar-subtitle {
    max-width: 41ch !important;
  }
  .product-add-btn {
    min-width: 66px !important;
    height: 28px !important;
    font-size: 0.52rem !important;
  }
}

/* === Ajustes 2026-06-29: iconos premium, redes compactas y fondos estables === */
.home-dashboard-shell .ideal-card {
  background:
    radial-gradient(circle at 82% 8%, rgba(255,255,255,0.18), transparent 30%),
    linear-gradient(150deg, #004b7a 0%, #003f6c 54%, #003454 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.10) !important;
}

.home-dashboard-shell .ideal-icon {
  background: rgba(233, 248, 255, 0.94) !important;
  border: 1px solid rgba(255, 255, 255, 0.62);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.78), 0 10px 22px -18px rgba(0, 30, 48, 0.9);
}

.ideal-line-svg {
  width: 74%;
  height: 74%;
  display: block;
  object-fit: contain;
}

.home-social-block .social-grid,
.social-grid {
  grid-template-columns: repeat(3, 40px) !important;
  justify-content: center !important;
  gap: 0.16rem !important;
  column-gap: 0.16rem !important;
  row-gap: 0.16rem !important;
}

.home-social-block .social-card,
.social-card {
  width: 40px !important;
  height: 40px !important;
  border-radius: 13px !important;
}

.home-social-block .social-card-icon,
.social-card-icon {
  width: 19px !important;
  height: 19px !important;
}

.home-social-block {
  padding-top: 0.28rem !important;
  padding-bottom: 0.04rem !important;
}

.home-social-block .home-title-row {
  margin-bottom: 0.16rem !important;
}

.card,
.module-card,
.media-card,
.product-card,
.reward-card,
.history-card,
.contact-card,
.account-settings-card,
.profile-settings-card,
.home-block {
  background-color: #ffffff;
  background-clip: padding-box;
}

.media-thumb,
.product-thumb-wrap,
.store-featured-media,
.quick-reel-card,
.home-hero-photo {
  background:
    linear-gradient(135deg, rgba(0, 75, 122, 0.12), rgba(143, 212, 239, 0.30)),
    #eaf7fd;
  overflow: hidden;
}

.media-thumb-image,
.product-card img,
.store-featured-media img,
.quick-reel-video,
.home-hero-photo img {
  background-color: #eaf7fd;
  display: block;
}

.home-info-slide {
  background-color: #004b7a;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

@media (max-width: 360px) {
  .home-social-block .social-grid,
  .social-grid {
    grid-template-columns: repeat(3, 38px) !important;
    gap: 0.12rem !important;
  }

  .home-social-block .social-card,
  .social-card {
    width: 38px !important;
    height: 38px !important;
  }
}

/* === FIX FINAL 2026-06-29: imágenes de nivel únicas + tienda 16:9 ===
   - Solo las tarjetas activas por puntos muestran la imagen del nivel.
   - Se eliminan overlays/pseudo-elementos que duplicaban o ensuciaban el fondo.
   - Tienda y cards de puntos quedan adaptadas a imágenes 1920x1080. */

/* El listado de niveles del Club ya no usa fondos por nivel para evitar duplicados visuales. */
.rewards-tier-card.tier-silver,
.rewards-tier-card.tier-gold,
.rewards-tier-card.tier-diamond {
  background: #ffffff !important;
  background-image: none !important;
  color: #1e3b58 !important;
}

.rewards-tier-card.tier-basic {
  background: #ffffff !important;
  background-image: none !important;
  color: #ffffff !important;
}
.rewards-tier-card.tier-basic .rewards-tier-card-head strong,
.rewards-tier-card.tier-basic .rewards-tier-card-head span,
.rewards-tier-card.tier-basic p,
.rewards-tier-card.tier-basic li {
  color: #ffffff !important;
}
.rewards-tier-card.tier-basic li::before {
  color: #ffffff !important;
}

.rewards-tier-card.is-active {
  background: linear-gradient(180deg, #f5fbff 0%, #ffffff 100%) !important;
  border-color: rgba(76, 170, 205, 0.5) !important;
}

/* Quitar gráficos generados por CSS sobre las cards con fondo de nivel. */
.profile-points-card::before,
.profile-points-card::after,
.rewards-summary-card::after {
  content: none !important;
  display: none !important;
  background: none !important;
  border: 0 !important;
}

/* Base 16:9 para las cards que sí dependen del nivel de puntos. */
#open-rewards-btn.store-rewards-entry,
.rewards-summary-card,
.profile-points-card {
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  aspect-ratio: 16 / 9;
  min-height: 176px !important;
  overflow: hidden !important;
}

/* Imagen única según nivel actual: tienda, ventana Club y perfil. */
#open-rewards-btn.store-rewards-entry.tier-basic {
  background: var(--qhatai-store-basic-bg) center / cover no-repeat !important;
}
.rewards-summary-card.tier-basic {
  background: var(--qhatai-rewards-basic-bg) center / cover no-repeat !important;
}
.profile-points-card.tier-basic {
  background: var(--qhatai-profile-basic-bg) center / cover no-repeat !important;
  color: #ffffff !important;
  --tier-text: #ffffff;
  --tier-muted: rgba(255, 255, 255, 0.88);
  --tier-points: #ffffff;
}

#open-rewards-btn.store-rewards-entry.tier-silver {
  background: var(--qhatai-store-silver-bg) center / cover no-repeat !important;
}
.rewards-summary-card.tier-silver {
  background: var(--qhatai-rewards-silver-bg) center / cover no-repeat !important;
}
.profile-points-card.tier-silver {
  background: var(--qhatai-profile-silver-bg) center / cover no-repeat !important;
  color: #101820 !important;
  --tier-text: #101820;
  --tier-muted: rgba(16, 24, 32, 0.74);
  --tier-points: #101820;
}

#open-rewards-btn.store-rewards-entry.tier-gold {
  background: var(--qhatai-store-gold-bg) center / cover no-repeat !important;
}
.rewards-summary-card.tier-gold {
  background: var(--qhatai-rewards-gold-bg) center / cover no-repeat !important;
}
.profile-points-card.tier-gold {
  background: var(--qhatai-profile-gold-bg) center / cover no-repeat !important;
  color: #121212 !important;
  --tier-text: #121212;
  --tier-muted: rgba(18, 18, 18, 0.74);
  --tier-points: #121212;
}

#open-rewards-btn.store-rewards-entry.tier-diamond {
  background: var(--qhatai-store-diamond-bg) center / cover no-repeat !important;
}
.rewards-summary-card.tier-diamond {
  background: var(--qhatai-rewards-diamond-bg) center / cover no-repeat !important;
}
.profile-points-card.tier-diamond {
  background: var(--qhatai-profile-diamond-bg) center / cover no-repeat !important;
  color: #0b2d3c !important;
  --tier-text: #0b2d3c;
  --tier-muted: rgba(11, 45, 60, 0.74);
  --tier-points: #0b2d3c;
}

/* Tienda: convertir la entrada de puntos en una card limpia 16:9. */
#open-rewards-btn.store-rewards-entry {
  position: relative !important;
  margin-top: 0.9rem !important;
  padding: 0.92rem !important;
  border-radius: 22px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  grid-template-rows: auto 1fr auto !important;
  gap: 0.42rem !important;
  align-items: start !important;
  box-shadow: 0 22px 42px -30px rgba(21, 58, 92, 0.72) !important;
  border: 1px solid rgba(255, 255, 255, 0.36) !important;
}

.store-rewards-entry-icon {
  display: none !important;
}

.store-rewards-entry-content {
  grid-column: 1 / -1 !important;
  align-self: start !important;
  max-width: 78% !important;
  gap: 0.2rem !important;
}

.store-rewards-entry-content strong {
  font-size: clamp(0.92rem, 4vw, 1.16rem) !important;
  line-height: 1.02 !important;
  max-width: 14ch;
}

.store-rewards-entry-copy {
  max-width: 24ch !important;
  font-size: 0.68rem !important;
  line-height: 1.28 !important;
}

.store-rewards-entry-kicker {
  width: max-content !important;
  padding: 0.22rem 0.52rem !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.22) !important;
  color: currentColor !important;
}

.store-rewards-entry-meta {
  grid-column: 1 / -1 !important;
  align-self: end !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 0.48rem !important;
  width: 100% !important;
}

.store-rewards-entry-tier,
.store-rewards-entry-points,
.rewards-tier-pill,
.rewards-program-chip {
  backdrop-filter: blur(8px) !important;
}

.store-rewards-entry-tier,
.store-rewards-entry-points {
  min-height: 27px !important;
  padding: 0.28rem 0.62rem !important;
  font-size: 0.62rem !important;
}

.store-rewards-entry-tier {
  background: rgba(255, 255, 255, 0.24) !important;
  color: currentColor !important;
  border-color: rgba(255, 255, 255, 0.34) !important;
}

.store-rewards-entry-points {
  background: rgba(255, 255, 255, 0.88) !important;
  color: #1e3b58 !important;
}

.store-rewards-entry-arrow {
  position: absolute !important;
  top: 0.78rem !important;
  right: 0.82rem !important;
  width: 30px !important;
  height: 30px !important;
  border-radius: 999px !important;
  display: grid !important;
  place-items: center !important;
  background: rgba(255, 255, 255, 0.24) !important;
  color: currentColor !important;
}

/* Ventana Club: card principal 16:9 sin decoraciones extra. */
.rewards-summary-card {
  padding: 1rem !important;
  border-radius: 24px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
}

.rewards-summary-head,
.rewards-points-display,
.rewards-progress,
.rewards-next-text {
  position: relative !important;
  z-index: 1 !important;
}

.rewards-points-display {
  margin-top: 0.64rem !important;
}

.rewards-points-display strong {
  font-size: clamp(2.2rem, 12vw, 3.7rem) !important;
}

.rewards-summary-card .rewards-points-display span,
.rewards-summary-card .rewards-next-text {
  color: currentColor !important;
  opacity: 0.78 !important;
}

.rewards-summary-card .rewards-tier-pill,
.rewards-summary-card .rewards-program-chip {
  background: rgba(255, 255, 255, 0.24) !important;
  color: currentColor !important;
  border-color: rgba(255, 255, 255, 0.34) !important;
}

.rewards-summary-card .rewards-progress {
  background: rgba(255, 255, 255, 0.38) !important;
}

.rewards-summary-card .rewards-progress span {
  background: rgba(255, 255, 255, 0.92) !important;
}

/* Perfil: card de puntos con proporción 1920x1080. */
.profile-points-card {
  padding: 17px !important;
  border-radius: 20px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
}

.profile-points-card > * {
  position: relative !important;
  z-index: 1 !important;
}

.profile-points-card .profile-tier-benefit {
  max-width: 74% !important;
  margin-top: 0.7rem !important;
}

.profile-points-card .tier-badge {
  background: rgba(255, 255, 255, 0.8) !important;
  color: #1e3b58 !important;
}

/* Tienda: las imágenes de productos son 1920x1080, por eso se muestran en 16:9. */
.product-thumb-wrap,
.store-featured-media,
.reward-thumb-wrap,
.admin-image-picker,
.admin-image-preview {
  aspect-ratio: 16 / 9 !important;
}

.product-thumb-wrap,
.store-featured-media,
.reward-thumb-wrap {
  border-radius: 15px !important;
  background: #eef7fc !important;
}

.product-card img,
.store-featured-media img,
.reward-thumb-wrap img,
.admin-image-preview {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
  padding: 0 !important;
  background: transparent !important;
}

.products-grid {
  gap: 0.68rem !important;
  margin-top: 0.85rem !important;
}

.product-card {
  padding: 0.52rem !important;
  gap: 0.42rem !important;
  border-radius: 17px !important;
}

.store-featured-product {
  grid-template-columns: 1fr !important;
  gap: 0.62rem !important;
}

.store-featured-media {
  order: -1 !important;
}

@media (min-width: 700px) {
  #open-rewards-btn.store-rewards-entry,
  .rewards-summary-card,
  .profile-points-card {
    min-height: 206px !important;
  }

  .products-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 380px) {
  #open-rewards-btn.store-rewards-entry,
  .rewards-summary-card,
  .profile-points-card {
    min-height: 164px !important;
  }

  .store-rewards-entry-content {
    max-width: 82% !important;
  }

  .store-rewards-entry-copy {
    -webkit-line-clamp: 2 !important;
  }
}


/* Ajustes finales tienda: menú inferior, cards cuadradas y Club Qhatai compacto. */
.nav-btn svg {
  width: 20px !important;
  height: 20px !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.95 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

.nav-btn svg path,
.nav-btn svg circle,
.nav-btn svg line,
.nav-btn svg polyline {
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.95 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

.nav-btn span {
  margin-top: 0.02rem !important;
}

.products-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 0.7rem !important;
}

.product-thumb-wrap,
.store-featured-media {
  aspect-ratio: 1 / 1 !important;
  width: 100% !important;
  background: #f2f8fc !important;
}

.product-card img,
.store-featured-media img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  object-position: center !important;
  padding: 0.44rem !important;
  border-radius: 14px !important;
  display: block !important;
}

.store-featured-product {
  grid-template-columns: minmax(0, 1fr) 112px !important;
  align-items: center !important;
}

.store-featured-media {
  order: 0 !important;
  max-width: 112px !important;
  justify-self: end !important;
}

#open-rewards-btn.store-rewards-entry {
  aspect-ratio: 16 / 6.1 !important;
  min-height: 118px !important;
  max-height: 136px !important;
  margin-top: 0.72rem !important;
  padding: 0.66rem 0.72rem !important;
  border-radius: 18px !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  grid-template-rows: auto auto 1fr !important;
  gap: 0.2rem !important;
  align-items: start !important;
  background-size: cover !important;
  background-position: center 45% !important;
}

#open-rewards-btn .store-rewards-entry-content {
  grid-column: 1 / 2 !important;
  max-width: calc(100% - 36px) !important;
  gap: 0.1rem !important;
}

#open-rewards-btn .store-rewards-entry-kicker {
  font-size: 0.55rem !important;
  padding: 0.14rem 0.42rem !important;
}

#open-rewards-btn .store-rewards-entry-content strong {
  font-size: 0.84rem !important;
  line-height: 1.05 !important;
  max-width: none !important;
}

#open-rewards-btn .store-rewards-entry-copy {
  max-width: 30ch !important;
  font-size: 0.6rem !important;
  line-height: 1.2 !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 1 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
}

#open-rewards-btn .store-rewards-entry-meta {
  grid-column: 1 / -1 !important;
  align-self: end !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 0.34rem !important;
  padding-left: 0 !important;
  width: 100% !important;
  margin-top: 0.12rem !important;
}

#open-rewards-btn .store-rewards-entry-tier,
#open-rewards-btn .store-rewards-entry-points {
  min-height: 22px !important;
  padding: 0.16rem 0.48rem !important;
  font-size: 0.56rem !important;
}

#open-rewards-btn .store-rewards-entry-arrow {
  top: 0.58rem !important;
  right: 0.62rem !important;
  width: 25px !important;
  height: 25px !important;
  font-size: 0.82rem !important;
}

@media (max-width: 380px) {
  #open-rewards-btn.store-rewards-entry {
    min-height: 112px !important;
    max-height: 128px !important;
  }

  #open-rewards-btn .store-rewards-entry-copy {
    max-width: 26ch !important;
  }
}

@media (min-width: 700px) {
  #open-rewards-btn.store-rewards-entry {
    min-height: 126px !important;
    max-height: 144px !important;
  }
}


/* === Ajustes finales PWA: sin barra visible, sin doble tap zoom, reels con preview y Club centrado === */
html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden !important;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
}

body,
button,
a,
input,
textarea,
select,
.nav-btn,
.nav-plus-btn,
.store-rewards-entry,
.quick-reel-card,
.quick-reel-control {
  touch-action: manipulation;
}

* {
  -webkit-tap-highlight-color: transparent;
}

*::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  display: none !important;
}

.app-shell,
main,
.view,
.home-reels-carousel,
.quick-reels-grid,
.control-tabbar,
.cart-view-body,
.modal-card {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

.app-shell::-webkit-scrollbar,
main::-webkit-scrollbar,
.view::-webkit-scrollbar,
.home-reels-carousel::-webkit-scrollbar,
.quick-reels-grid::-webkit-scrollbar,
.control-tabbar::-webkit-scrollbar,
.cart-view-body::-webkit-scrollbar,
.modal-card::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  display: none !important;
}

.quick-reel-video {
  object-fit: cover !important;
  background: #0f1f2f !important;
}

/* Card Club Qhatai en tienda: contenido centrado y altura compacta. */
#open-rewards-btn.store-rewards-entry {
  aspect-ratio: auto !important;
  height: 108px !important;
  min-height: 108px !important;
  max-height: 108px !important;
  padding: 0.58rem 0.72rem !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 28px !important;
  grid-template-rows: auto auto !important;
  align-content: center !important;
  align-items: center !important;
  row-gap: 0.18rem !important;
  column-gap: 0.35rem !important;
  background-size: cover !important;
  background-position: center center !important;
  overflow: hidden !important;
}

#open-rewards-btn .store-rewards-entry-content {
  grid-column: 1 / 2 !important;
  grid-row: 1 / 2 !important;
  align-self: end !important;
  max-width: calc(100% - 8px) !important;
  gap: 0.08rem !important;
}

#open-rewards-btn .store-rewards-entry-meta {
  grid-column: 1 / 2 !important;
  grid-row: 2 / 3 !important;
  align-self: start !important;
  justify-self: start !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 0.32rem !important;
  width: auto !important;
  margin-top: 0 !important;
  padding-left: 0 !important;
}

#open-rewards-btn .store-rewards-entry-kicker {
  font-size: 0.52rem !important;
  line-height: 1 !important;
  padding: 0.12rem 0.4rem !important;
}

#open-rewards-btn .store-rewards-entry-content strong {
  font-size: 0.8rem !important;
  line-height: 1.03 !important;
}

#open-rewards-btn .store-rewards-entry-copy {
  max-width: 29ch !important;
  font-size: 0.57rem !important;
  line-height: 1.16 !important;
  -webkit-line-clamp: 1 !important;
}

#open-rewards-btn .store-rewards-entry-tier,
#open-rewards-btn .store-rewards-entry-points {
  min-height: 21px !important;
  padding: 0.14rem 0.44rem !important;
  font-size: 0.54rem !important;
}

#open-rewards-btn .store-rewards-entry-arrow {
  top: 0.5rem !important;
  right: 0.58rem !important;
  width: 24px !important;
  height: 24px !important;
}

@media (max-width: 380px) {
  #open-rewards-btn.store-rewards-entry {
    height: 102px !important;
    min-height: 102px !important;
    max-height: 102px !important;
    padding: 0.52rem 0.64rem !important;
  }

  #open-rewards-btn .store-rewards-entry-content strong {
    font-size: 0.76rem !important;
  }

  #open-rewards-btn .store-rewards-entry-copy {
    max-width: 25ch !important;
  }
}

@media (min-width: 700px) {
  #open-rewards-btn.store-rewards-entry {
    height: 116px !important;
    min-height: 116px !important;
    max-height: 116px !important;
  }
}


/* === Qhatai v21: menú inferior compacto, safe-area y guía rápida sin recortes === */
:root {
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --bottom-nav-item-height: 42px;
  --bottom-nav-total-height: 66px;
}

html {
  scroll-behavior: auto !important;
  scroll-padding-top: calc(var(--safe-top) + 0.72rem);
  background: #ffffff;
}

body {
  background: #ffffff;
  min-height: 100svh;
  padding-top: var(--safe-top);
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--safe-top);
  background: #ffffff;
  z-index: 9999;
  pointer-events: none;
}

.app-shell {
  min-height: calc(100svh - var(--safe-top));
  padding-bottom: calc(var(--bottom-nav-total-height) + var(--safe-bottom) + 0.65rem) !important;
  background: #ffffff;
}

main {
  padding-bottom: calc(var(--bottom-nav-total-height) + var(--safe-bottom) + 0.35rem) !important;
}

.view,
.view.is-active,
.view-home,
#view-alertas,
#view-tienda,
#view-premios,
#view-carrito,
#view-perfil,
#view-admin {
  scroll-margin-top: calc(var(--safe-top) + 0.72rem);
}

.view.is-active {
  padding-bottom: calc(var(--bottom-nav-total-height) + var(--safe-bottom) + 0.95rem) !important;
}

.view-home {
  padding-top: max(0.46rem, calc(var(--safe-top) * 0.28 + 0.46rem)) !important;
}

.bottom-nav {
  width: min(430px, calc(100% - 0.92rem)) !important;
  height: 54px !important;
  min-height: 54px !important;
  bottom: calc(0.34rem + var(--safe-bottom)) !important;
  padding: 0.22rem 0.34rem !important;
  border-radius: 999px !important;
  align-items: center !important;
  overflow: visible !important;
}

.nav-btn {
  min-height: 42px !important;
  height: 42px !important;
  padding: 0 !important;
  border-radius: 999px !important;
}

.nav-btn svg {
  width: clamp(19px, 5.5vw, 23px) !important;
  height: clamp(19px, 5.5vw, 23px) !important;
}

.nav-plus-btn {
  width: 46px !important;
  height: 46px !important;
  min-height: 46px !important;
  margin: 0 auto !important;
  box-shadow: inset 0 -2px 0 rgba(0, 75, 122, 0.08), 0 10px 18px -14px rgba(0, 43, 70, 0.65) !important;
}

.home-info-carousel {
  display: grid !important;
  grid-auto-flow: column !important;
  grid-auto-columns: minmax(0, calc((100% - 0.58rem) / 2)) !important;
  gap: 0.58rem !important;
  overflow-x: auto !important;
  overflow-y: visible !important;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scroll-padding-inline: 0.02rem;
  padding: 0.02rem 0.02rem 0.26rem !important;
  align-items: stretch;
}

.home-info-slide {
  min-height: 128px !important;
  height: auto !important;
  padding: 0.8rem 0.72rem !important;
  border-radius: 18px !important;
  overflow: visible !important;
  display: grid !important;
  align-content: center !important;
  justify-items: center !important;
  gap: 0.34rem !important;
  scroll-snap-align: start;
}

.home-info-slide h4,
.home-info-slide p {
  display: block !important;
  -webkit-line-clamp: unset !important;
  -webkit-box-orient: initial !important;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: normal !important;
  text-align: center !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.home-info-slide h4 {
  max-width: 18ch !important;
  font-size: clamp(0.74rem, 3vw, 0.88rem) !important;
  line-height: 1.14 !important;
}

.home-info-slide p {
  max-width: 24ch !important;
  font-size: clamp(0.62rem, 2.45vw, 0.72rem) !important;
  line-height: 1.28 !important;
}

@media (max-width: 360px) {
  :root {
    --bottom-nav-total-height: 64px;
  }

  .bottom-nav {
    width: calc(100% - 0.56rem) !important;
    height: 52px !important;
    min-height: 52px !important;
    padding: 0.2rem 0.28rem !important;
  }

  .nav-btn {
    height: 40px !important;
    min-height: 40px !important;
  }

  .nav-plus-btn {
    width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
  }

  .home-info-carousel {
    grid-auto-columns: minmax(0, calc((100% - 0.48rem) / 2)) !important;
    gap: 0.48rem !important;
  }

  .home-info-slide {
    min-height: 132px !important;
    padding: 0.72rem 0.58rem !important;
  }

  .home-info-slide h4 {
    font-size: 0.7rem !important;
    max-width: 16ch !important;
  }

  .home-info-slide p {
    font-size: 0.59rem !important;
    max-width: 22ch !important;
  }
}

@media (min-width: 700px) {
  .home-info-carousel {
    grid-auto-columns: minmax(0, calc((100% - 1.16rem) / 3)) !important;
  }

  .bottom-nav {
    bottom: 18px !important;
  }
}

/* === Qhatai v22: menú con más presencia + última sección compacta + guía rápida premium === */
:root {
  --bottom-nav-item-height: 46px;
  --bottom-nav-total-height: 76px;
}

.app-shell,
main {
  padding-bottom: 0 !important;
}

.view.is-active {
  padding-bottom: calc(var(--bottom-nav-total-height) + var(--safe-bottom) + 0.28rem) !important;
}

.view-home {
  padding-bottom: calc(var(--bottom-nav-total-height) + var(--safe-bottom) + 0.2rem) !important;
}

.home-social-block {
  margin-top: 0.58rem !important;
  margin-bottom: 0.12rem !important;
  padding: 0.38rem 0 0 !important;
}

.home-social-block .home-title-row {
  margin-bottom: 0.18rem !important;
}

.home-footer-copy {
  margin: 0.16rem 0 0.18rem !important;
  padding-bottom: 0 !important;
}

.bottom-nav {
  width: min(430px, calc(100% - 0.92rem)) !important;
  height: 58px !important;
  min-height: 58px !important;
  bottom: calc(0.54rem + var(--safe-bottom)) !important;
  padding: 0.28rem 0.38rem !important;
  border-radius: 999px !important;
  box-shadow: 0 16px 32px -22px rgba(0, 43, 70, 0.88) !important;
}

.nav-btn {
  min-height: var(--bottom-nav-item-height) !important;
  height: var(--bottom-nav-item-height) !important;
  border-radius: 999px !important;
}

.nav-btn svg {
  width: clamp(20px, 5.6vw, 24px) !important;
  height: clamp(20px, 5.6vw, 24px) !important;
}

.nav-plus-btn {
  width: 50px !important;
  height: 50px !important;
  min-height: 50px !important;
  font-size: 1.32rem !important;
  box-shadow: inset 0 -2px 0 rgba(0, 75, 122, 0.1), 0 12px 22px -14px rgba(0, 43, 70, 0.72) !important;
}

/* Guía rápida: deja de verse apretada y pasa a tarjetas limpias tipo checklist. */
.home-info-carousel {
  counter-reset: qhatai-guide-step;
  display: grid !important;
  grid-auto-flow: row !important;
  grid-auto-columns: initial !important;
  grid-template-columns: 1fr !important;
  gap: 0.58rem !important;
  overflow: visible !important;
  padding: 0 !important;
  scroll-snap-type: none !important;
  align-items: stretch !important;
}

.home-info-slide {
  counter-increment: qhatai-guide-step;
  position: relative !important;
  min-height: 82px !important;
  height: auto !important;
  padding: 0.72rem 0.78rem 0.72rem 3.38rem !important;
  border-radius: 20px !important;
  background: linear-gradient(135deg, #f7fcff 0%, #e9f7fd 100%) !important;
  border: 1px solid rgba(0, 75, 122, 0.1) !important;
  box-shadow: 0 14px 28px -24px rgba(0, 75, 122, 0.42) !important;
  color: var(--color-primary) !important;
  display: grid !important;
  align-content: center !important;
  justify-items: start !important;
  gap: 0.18rem !important;
  text-align: left !important;
  overflow: hidden !important;
}

.home-info-slide::before {
  content: counter(qhatai-guide-step, decimal-leading-zero);
  position: absolute;
  left: 0.78rem;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--color-primary);
  color: #ffffff;
  font-family: var(--font-title);
  font-size: 0.72rem;
  line-height: 1;
  font-weight: 900;
  letter-spacing: -0.02em;
  box-shadow: 0 10px 20px -14px rgba(0, 43, 70, 0.65);
}

.home-info-slide::after {
  content: "";
  position: absolute;
  left: 2.82rem;
  top: 0.82rem;
  bottom: 0.82rem;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(0, 75, 122, 0.18), transparent);
}

.home-info-slide:nth-child(2)::before {
  background: #0d6b91;
}

.home-info-slide:nth-child(3)::before {
  background: #1687a8;
}

.home-info-slide:nth-child(4)::before {
  background: #00456f;
}

.home-info-slide:nth-child(5)::before {
  background: #1e8fb3;
}

.home-info-slide h4,
.home-info-slide p {
  display: block !important;
  overflow: visible !important;
  -webkit-line-clamp: unset !important;
  -webkit-box-orient: initial !important;
  text-overflow: clip !important;
  white-space: normal !important;
  text-align: left !important;
  margin: 0 !important;
  max-width: none !important;
}

.home-info-slide h4 {
  color: var(--color-primary) !important;
  font-size: clamp(0.82rem, 3.3vw, 0.96rem) !important;
  line-height: 1.12 !important;
  font-weight: 900 !important;
  letter-spacing: -0.02em !important;
}

.home-info-slide p {
  color: rgba(0, 75, 122, 0.72) !important;
  font-size: clamp(0.68rem, 2.65vw, 0.78rem) !important;
  line-height: 1.32 !important;
  font-weight: 600 !important;
}

@media (min-width: 540px) {
  .home-info-carousel {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .home-info-slide:first-child {
    grid-column: 1 / -1 !important;
  }
}

@media (max-width: 360px) {
  :root {
    --bottom-nav-item-height: 44px;
    --bottom-nav-total-height: 74px;
  }

  .bottom-nav {
    width: calc(100% - 0.6rem) !important;
    height: 56px !important;
    min-height: 56px !important;
    bottom: calc(0.42rem + var(--safe-bottom)) !important;
    padding: 0.24rem 0.3rem !important;
  }

  .nav-plus-btn {
    width: 48px !important;
    height: 48px !important;
    min-height: 48px !important;
  }

  .home-info-carousel {
    grid-template-columns: 1fr !important;
    gap: 0.5rem !important;
  }

  .home-info-slide {
    min-height: 80px !important;
    padding: 0.66rem 0.66rem 0.66rem 3.1rem !important;
    border-radius: 18px !important;
  }

  .home-info-slide::before {
    left: 0.66rem;
    width: 32px;
    height: 32px;
    font-size: 0.68rem;
  }

  .home-info-slide::after {
    left: 2.58rem;
    top: 0.72rem;
    bottom: 0.72rem;
  }

  .home-info-slide h4 {
    font-size: 0.78rem !important;
  }

  .home-info-slide p {
    font-size: 0.63rem !important;
    line-height: 1.28 !important;
  }
}

/* === Qhatai v23: guía rápida alineada + tamaños específicos Club/Profile === */
:root {
  --qhatai-guide-circle: #1687a8;
  --qhatai-club-basic-bg: var(--qhatai-store-basic-bg);
  --qhatai-club-silver-bg: var(--qhatai-store-silver-bg);
  --qhatai-club-gold-bg: var(--qhatai-store-gold-bg);
  --qhatai-club-diamond-bg: var(--qhatai-store-diamond-bg);
  --qhatai-profile-basic-bg: url('../images/basico-profile.jpeg?v=qhatai-v30-distinct-tier-routes');
  --qhatai-profile-silver-bg: url('../images/plata-profile.jpeg?v=qhatai-v30-distinct-tier-routes');
  --qhatai-profile-gold-bg: url('../images/oro-profile.jpeg?v=qhatai-v30-distinct-tier-routes');
  --qhatai-profile-diamond-bg: url('../images/diamante-profile.jpeg?v=qhatai-v30-distinct-tier-routes');
}

/* Guía rápida: círculo y bloque de texto siempre alineados. */
.home-info-carousel {
  gap: 0.68rem !important;
}

.home-info-slide {
  min-height: 84px !important;
  padding: 0.82rem 0.9rem !important;
  display: grid !important;
  grid-template-columns: 38px minmax(0, 1fr) !important;
  grid-template-areas:
    'bullet title'
    'bullet desc' !important;
  column-gap: 0.78rem !important;
  row-gap: 0.18rem !important;
  align-items: center !important;
}

.home-info-slide::before {
  content: counter(qhatai-guide-step, decimal-leading-zero) !important;
  position: static !important;
  transform: none !important;
  width: 38px !important;
  height: 38px !important;
  grid-area: bullet !important;
  place-self: center !important;
  background: var(--qhatai-guide-circle) !important;
  color: #ffffff !important;
  font-size: 0.76rem !important;
  box-shadow: 0 10px 20px -14px rgba(0, 43, 70, 0.65) !important;
}

.home-info-slide::after {
  content: none !important;
  display: none !important;
}

.home-info-slide:nth-child(2)::before,
.home-info-slide:nth-child(3)::before,
.home-info-slide:nth-child(4)::before,
.home-info-slide:nth-child(5)::before {
  background: var(--qhatai-guide-circle) !important;
}

.home-info-slide h4 {
  grid-area: title !important;
  align-self: end !important;
}

.home-info-slide p {
  grid-area: desc !important;
  align-self: start !important;
}

/* Club Qhatai: contenedor horizontal 16:9. */
#open-rewards-btn.store-rewards-entry,
.rewards-summary-card {
  aspect-ratio: 16 / 9 !important;
  min-height: 176px !important;
}

/* Perfil Pool Points: contenedor propio 4:3 para imagen distinta. */
.profile-points-card {
  aspect-ratio: 4 / 3 !important;
  min-height: 238px !important;
  padding: 17px 17px 18px !important;
}

#open-rewards-btn.store-rewards-entry.tier-basic {
  background: var(--qhatai-store-basic-bg) center / cover no-repeat !important;
}
.rewards-summary-card.tier-basic {
  background: var(--qhatai-rewards-basic-bg) center / cover no-repeat !important;
}
#open-rewards-btn.store-rewards-entry.tier-silver {
  background: var(--qhatai-store-silver-bg) center / cover no-repeat !important;
}
.rewards-summary-card.tier-silver {
  background: var(--qhatai-rewards-silver-bg) center / cover no-repeat !important;
}
#open-rewards-btn.store-rewards-entry.tier-gold {
  background: var(--qhatai-store-gold-bg) center / cover no-repeat !important;
}
.rewards-summary-card.tier-gold {
  background: var(--qhatai-rewards-gold-bg) center / cover no-repeat !important;
}
#open-rewards-btn.store-rewards-entry.tier-diamond {
  background: var(--qhatai-store-diamond-bg) center / cover no-repeat !important;
}
.rewards-summary-card.tier-diamond {
  background: var(--qhatai-rewards-diamond-bg) center / cover no-repeat !important;
}

.profile-points-card.tier-basic {
  background: var(--qhatai-profile-basic-bg) center / cover no-repeat !important;
}
.profile-points-card.tier-silver {
  background: var(--qhatai-profile-silver-bg) center / cover no-repeat !important;
}
.profile-points-card.tier-gold {
  background: var(--qhatai-profile-gold-bg) center / cover no-repeat !important;
}
.profile-points-card.tier-diamond {
  background: var(--qhatai-profile-diamond-bg) center / cover no-repeat !important;
}

.profile-points-card .profile-tier-benefit {
  max-width: 82% !important;
}

@media (min-width: 700px) {
  #open-rewards-btn.store-rewards-entry,
  .rewards-summary-card {
    min-height: 206px !important;
  }

  .profile-points-card {
    min-height: 260px !important;
  }
}

@media (max-width: 380px) {
  #open-rewards-btn.store-rewards-entry,
  .rewards-summary-card {
    min-height: 164px !important;
  }

  .profile-points-card {
    min-height: 224px !important;
  }
}

/* === Qhatai v24: Club Qhatai compacto + botón fullscreen en reels === */
/* Se devuelve el tamaño visual compacto de la card del Club en tienda. */
#open-rewards-btn.store-rewards-entry {
  aspect-ratio: auto !important;
  height: 108px !important;
  min-height: 108px !important;
  max-height: 108px !important;
}

/* Resumen del Club dentro de Qhatai Rewards: más bajo, sin agrandar el formato visual. */
.rewards-summary-card {
  aspect-ratio: auto !important;
  height: 156px !important;
  min-height: 156px !important;
  max-height: 156px !important;
  padding: 0.82rem 0.9rem !important;
}

.rewards-points-display {
  margin-top: 0.28rem !important;
}

.rewards-points-display strong {
  font-size: clamp(1.8rem, 9.5vw, 2.8rem) !important;
}

.rewards-next-text {
  font-size: 0.7rem !important;
  line-height: 1.18 !important;
  margin-bottom: 0 !important;
}

.quick-reel-fullscreen {
  position: absolute !important;
  left: 0.42rem !important;
  right: 0.42rem !important;
  bottom: 0.42rem !important;
  z-index: 6 !important;
  min-height: 28px !important;
  border: 1px solid rgba(255, 255, 255, 0.34) !important;
  border-radius: 999px !important;
  background: rgba(0, 75, 122, 0.58) !important;
  color: #ffffff !important;
  backdrop-filter: blur(8px) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.28rem !important;
  font-family: inherit !important;
  font-size: 0.54rem !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  padding: 0.28rem 0.42rem !important;
  cursor: pointer !important;
  box-shadow: 0 10px 18px -14px rgba(0, 43, 70, 0.7) !important;
}

.quick-reel-fullscreen svg {
  width: 13px !important;
  height: 13px !important;
  fill: currentColor !important;
  flex: 0 0 auto !important;
}

.quick-reel-card .quick-reel-control strong {
  padding-bottom: 2.55rem !important;
}

@media (max-width: 380px) {
  #open-rewards-btn.store-rewards-entry {
    height: 102px !important;
    min-height: 102px !important;
    max-height: 102px !important;
  }

  .rewards-summary-card {
    height: 148px !important;
    min-height: 148px !important;
    max-height: 148px !important;
  }

  .quick-reel-fullscreen {
    left: 0.34rem !important;
    right: 0.34rem !important;
    bottom: 0.36rem !important;
    min-height: 26px !important;
    font-size: 0.5rem !important;
  }
}

@media (min-width: 700px) {
  #open-rewards-btn.store-rewards-entry {
    height: 116px !important;
    min-height: 116px !important;
    max-height: 116px !important;
  }

  .rewards-summary-card {
    height: 170px !important;
    min-height: 170px !important;
    max-height: 170px !important;
  }
}

/* === Qhatai v25: perfil con foto desde BD + card de puntos más compacta === */
.profile-points-card {
  aspect-ratio: 16 / 9 !important;
  height: 136px !important;
  min-height: 136px !important;
  max-height: 136px !important;
  padding: 12px !important;
  border-radius: 18px !important;
}

.profile-points-card .profile-card-head {
  grid-template-columns: 46px minmax(0, 1fr) auto !important;
  gap: 8px !important;
}

.profile-points-card .avatar-sm {
  width: 46px !important;
  height: 46px !important;
  flex-basis: 46px !important;
  border-radius: 10px !important;
}

.profile-points-card .profile-card-user h3,
.profile-points-card #profile-name {
  font-size: 0.66rem !important;
  line-height: 1.05 !important;
}

.profile-points-card .profile-email-line {
  font-size: 0.48rem !important;
  line-height: 1.05 !important;
  margin-top: 2px !important;
}

.profile-points-card .tier-badge {
  min-height: 18px !important;
  padding: 0.18rem 0.42rem !important;
  font-size: 0.48rem !important;
  line-height: 1 !important;
}

.profile-points-card .profile-points-summary {
  margin-top: 0 !important;
  gap: 0.34rem !important;
}

.profile-points-card .points-value {
  font-size: clamp(1.05rem, 6vw, 1.38rem) !important;
  line-height: 0.98 !important;
}

.profile-points-card .points-label {
  font-size: 0.52rem !important;
  line-height: 1.06 !important;
}

.profile-points-card .profile-tier-benefit {
  margin-top: 0.22rem !important;
  max-width: 82% !important;
  font-size: 0.52rem !important;
  line-height: 1.12 !important;
  padding-bottom: 0 !important;
}

@media (max-width: 380px) {
  .profile-points-card {
    height: 128px !important;
    min-height: 128px !important;
    max-height: 128px !important;
    padding: 11px !important;
  }

  .profile-points-card .profile-card-head {
    grid-template-columns: 42px minmax(0, 1fr) auto !important;
  }

  .profile-points-card .avatar-sm {
    width: 42px !important;
    height: 42px !important;
    flex-basis: 42px !important;
  }
}

@media (min-width: 700px) {
  .profile-points-card {
    height: 150px !important;
    min-height: 150px !important;
    max-height: 150px !important;
  }
}

/* === Qhatai v30: rutas realmente separadas para tienda, Rewards y Perfil ===
   La tienda mantiene las imágenes anchas originales porque ahí se ven bien.
   Rewards y Perfil usan variantes 16:9 para evitar recortes laterales. */
:root {
  --qhatai-store-basic-bg: url('../images/basico.jpeg?v=qhatai-v30-distinct-tier-routes');
  --qhatai-store-silver-bg: url('../images/plata.jpeg?v=qhatai-v30-distinct-tier-routes');
  --qhatai-store-gold-bg: url('../images/oro.jpeg?v=qhatai-v30-distinct-tier-routes');
  --qhatai-store-diamond-bg: url('../images/diamante.jpeg?v=qhatai-v30-distinct-tier-routes');

  --qhatai-rewards-basic-bg: url('../images/basico-rewards.jpeg?v=qhatai-v30-distinct-tier-routes');
  --qhatai-rewards-silver-bg: url('../images/plata-rewards.jpeg?v=qhatai-v30-distinct-tier-routes');
  --qhatai-rewards-gold-bg: url('../images/oro-rewards.jpeg?v=qhatai-v30-distinct-tier-routes');
  --qhatai-rewards-diamond-bg: url('../images/diamante-rewards.jpeg?v=qhatai-v30-distinct-tier-routes');

  --qhatai-profile-basic-bg: url('../images/basico-profile.jpeg?v=qhatai-v30-distinct-tier-routes');
  --qhatai-profile-silver-bg: url('../images/plata-profile.jpeg?v=qhatai-v30-distinct-tier-routes');
  --qhatai-profile-gold-bg: url('../images/oro-profile.jpeg?v=qhatai-v30-distinct-tier-routes');
  --qhatai-profile-diamond-bg: url('../images/diamante-profile.jpeg?v=qhatai-v30-distinct-tier-routes');
}

#open-rewards-btn.store-rewards-entry.tier-basic { background: var(--qhatai-store-basic-bg) center / cover no-repeat !important; }
#open-rewards-btn.store-rewards-entry.tier-silver { background: var(--qhatai-store-silver-bg) center / cover no-repeat !important; }
#open-rewards-btn.store-rewards-entry.tier-gold { background: var(--qhatai-store-gold-bg) center / cover no-repeat !important; }
#open-rewards-btn.store-rewards-entry.tier-diamond { background: var(--qhatai-store-diamond-bg) center / cover no-repeat !important; }

.rewards-summary-card.tier-basic { background: var(--qhatai-rewards-basic-bg) center / cover no-repeat !important; }
.rewards-summary-card.tier-silver { background: var(--qhatai-rewards-silver-bg) center / cover no-repeat !important; }
.rewards-summary-card.tier-gold { background: var(--qhatai-rewards-gold-bg) center / cover no-repeat !important; }
.rewards-summary-card.tier-diamond { background: var(--qhatai-rewards-diamond-bg) center / cover no-repeat !important; }

.profile-points-card.tier-basic { background: var(--qhatai-profile-basic-bg) center / cover no-repeat !important; }
.profile-points-card.tier-silver { background: var(--qhatai-profile-silver-bg) center / cover no-repeat !important; }
.profile-points-card.tier-gold { background: var(--qhatai-profile-gold-bg) center / cover no-repeat !important; }
.profile-points-card.tier-diamond { background: var(--qhatai-profile-diamond-bg) center / cover no-repeat !important; }

.rewards-summary-card,
.profile-points-card {
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
}


/* === Qhatai v30 hard override: cada vista carga su propia ruta === */
#open-rewards-btn.store-rewards-entry.tier-basic { background-image: var(--qhatai-store-basic-bg) !important; }
#open-rewards-btn.store-rewards-entry.tier-silver { background-image: var(--qhatai-store-silver-bg) !important; }
#open-rewards-btn.store-rewards-entry.tier-gold { background-image: var(--qhatai-store-gold-bg) !important; }
#open-rewards-btn.store-rewards-entry.tier-diamond { background-image: var(--qhatai-store-diamond-bg) !important; }

.rewards-summary-card.tier-basic,
.rewards-tier-card.tier-basic { background-image: var(--qhatai-rewards-basic-bg) !important; }
.rewards-summary-card.tier-silver,
.rewards-tier-card.tier-silver { background-image: var(--qhatai-rewards-silver-bg) !important; }
.rewards-summary-card.tier-gold,
.rewards-tier-card.tier-gold { background-image: var(--qhatai-rewards-gold-bg) !important; }
.rewards-summary-card.tier-diamond,
.rewards-tier-card.tier-diamond { background-image: var(--qhatai-rewards-diamond-bg) !important; }

.profile-points-card.tier-basic { background-image: var(--qhatai-profile-basic-bg) !important; }
.profile-points-card.tier-silver { background-image: var(--qhatai-profile-silver-bg) !important; }
.profile-points-card.tier-gold { background-image: var(--qhatai-profile-gold-bg) !important; }
.profile-points-card.tier-diamond { background-image: var(--qhatai-profile-diamond-bg) !important; }


/* Admin y tarjetas de usuario: usar ruta profile, no la ruta de tienda. */
.admin-client-item.tier-basic,
.admin-selected-user-card.tier-basic,
.admin-selected-tier-card.tier-basic { background-image: url('../images/basico-profile.jpeg?v=qhatai-v30-distinct-tier-routes') !important; }
.admin-client-item.tier-silver,
.admin-selected-user-card.tier-silver,
.admin-selected-tier-card.tier-silver { background-image: url('../images/plata-profile.jpeg?v=qhatai-v30-distinct-tier-routes') !important; }
.admin-client-item.tier-gold,
.admin-selected-user-card.tier-gold,
.admin-selected-tier-card.tier-gold { background-image: url('../images/oro-profile.jpeg?v=qhatai-v30-distinct-tier-routes') !important; }
.admin-client-item.tier-diamond,
.admin-selected-user-card.tier-diamond,
.admin-selected-tier-card.tier-diamond { background-image: url('../images/diamante-profile.jpeg?v=qhatai-v30-distinct-tier-routes') !important; }


/* === Qhatai v31: ajustes solicitados tienda, perfil, video login y redes === */
#open-rewards-btn.store-rewards-entry {
  height: 124px !important;
  min-height: 124px !important;
  max-height: 124px !important;
  padding: 0.92rem 0.95rem !important;
  grid-template-columns: minmax(0, 1fr) 34px !important;
  row-gap: 0.38rem !important;
  column-gap: 0.55rem !important;
  align-content: center !important;
}

#open-rewards-btn .store-rewards-entry-content {
  gap: 0.2rem !important;
  max-width: calc(100% - 10px) !important;
}

#open-rewards-btn .store-rewards-entry-kicker {
  font-size: 0.58rem !important;
  line-height: 1.08 !important;
  letter-spacing: 0.085em !important;
  padding: 0.14rem 0.42rem !important;
  margin-bottom: 0.06rem !important;
}

#open-rewards-btn .store-rewards-entry-content strong {
  font-size: 0.9rem !important;
  line-height: 1.16 !important;
  letter-spacing: -0.01em !important;
}

#open-rewards-btn .store-rewards-entry-copy {
  max-width: 33ch !important;
  font-size: 0.64rem !important;
  line-height: 1.34 !important;
  -webkit-line-clamp: 2 !important;
}

#open-rewards-btn .store-rewards-entry-meta {
  gap: 0.45rem !important;
  margin-top: 0.02rem !important;
}

#open-rewards-btn .store-rewards-entry-tier,
#open-rewards-btn .store-rewards-entry-points {
  min-height: 24px !important;
  padding: 0.2rem 0.52rem !important;
  font-size: 0.58rem !important;
  line-height: 1.1 !important;
}

#open-rewards-btn .store-rewards-entry-arrow {
  width: 30px !important;
  height: 30px !important;
  top: 50% !important;
  right: 0.82rem !important;
  transform: translateY(-50%) !important;
}

.profile-points-card {
  height: 154px !important;
  min-height: 154px !important;
  max-height: 154px !important;
  padding: 14px !important;
  border-radius: 20px !important;
}

.profile-points-card .profile-card-head {
  grid-template-columns: 54px minmax(0, 1fr) auto !important;
  gap: 10px !important;
}

.profile-points-card .avatar-sm {
  width: 54px !important;
  height: 54px !important;
  flex-basis: 54px !important;
  border-radius: 13px !important;
}

.profile-points-card .profile-card-user h3,
.profile-points-card #profile-name {
  font-size: 0.86rem !important;
  line-height: 1.12 !important;
  font-weight: 800 !important;
  letter-spacing: -0.01em !important;
}

.profile-points-card .profile-email-line {
  font-size: 0.62rem !important;
  line-height: 1.18 !important;
  margin-top: 3px !important;
  max-width: 19ch !important;
}

.profile-points-card .tier-badge {
  min-height: 24px !important;
  padding: 0.25rem 0.58rem !important;
  font-size: 0.58rem !important;
  line-height: 1 !important;
}

.profile-points-card .profile-points-summary {
  margin-top: 0.34rem !important;
  gap: 0.48rem !important;
}

.profile-points-card .points-value {
  font-size: clamp(1.65rem, 8vw, 2.15rem) !important;
  line-height: 0.96 !important;
}

.profile-points-card .points-label {
  font-size: 0.62rem !important;
  line-height: 1.08 !important;
}

.profile-points-card .profile-tier-benefit {
  margin-top: 0.46rem !important;
  max-width: 88% !important;
  font-size: 0.66rem !important;
  line-height: 1.22 !important;
  font-weight: 700 !important;
}

.home-social-block .social-grid,
.social-grid {
  grid-template-columns: repeat(3, 56px) !important;
  gap: 0.75rem !important;
  justify-content: center !important;
  align-items: center !important;
}

.home-social-block .social-card,
.social-card {
  width: 56px !important;
  height: 56px !important;
  border-radius: 17px !important;
}

.home-social-block .social-card-icon,
.social-card-icon {
  width: 28px !important;
  height: 28px !important;
}

@media (max-width: 380px) {
  #open-rewards-btn.store-rewards-entry {
    height: 118px !important;
    min-height: 118px !important;
    max-height: 118px !important;
    padding: 0.82rem 0.82rem !important;
  }

  #open-rewards-btn .store-rewards-entry-content strong {
    font-size: 0.84rem !important;
  }

  #open-rewards-btn .store-rewards-entry-copy {
    font-size: 0.6rem !important;
    max-width: 30ch !important;
  }

  .profile-points-card {
    height: 148px !important;
    min-height: 148px !important;
    max-height: 148px !important;
    padding: 13px !important;
  }

  .profile-points-card .profile-card-head {
    grid-template-columns: 50px minmax(0, 1fr) auto !important;
    gap: 9px !important;
  }

  .profile-points-card .avatar-sm {
    width: 50px !important;
    height: 50px !important;
    flex-basis: 50px !important;
  }

  .profile-points-card .profile-card-user h3,
  .profile-points-card #profile-name {
    font-size: 0.8rem !important;
  }

  .profile-points-card .profile-email-line {
    font-size: 0.58rem !important;
  }

  .profile-points-card .profile-tier-benefit {
    font-size: 0.62rem !important;
    line-height: 1.18 !important;
  }

  .home-social-block .social-grid,
  .social-grid {
    grid-template-columns: repeat(3, 52px) !important;
    gap: 0.62rem !important;
  }

  .home-social-block .social-card,
  .social-card {
    width: 52px !important;
    height: 52px !important;
  }

  .home-social-block .social-card-icon,
  .social-card-icon {
    width: 26px !important;
    height: 26px !important;
  }
}

@media (min-width: 700px) {
  #open-rewards-btn.store-rewards-entry {
    height: 132px !important;
    min-height: 132px !important;
    max-height: 132px !important;
  }

  .profile-points-card {
    height: 166px !important;
    min-height: 166px !important;
    max-height: 166px !important;
  }
}
