:root {
  --bg: #081423;
  --surface: #10243a;
  --surface-soft: #14314d;
  --line: #2f5675;
  --text: #f3f7ff;
  --muted: #b8cce3;
  --teal: #2bc5b4;
  --green: #2bb673;
  --royal: #0033a0;
  --danger: #ff7c7c;
  --warning: #f0c76c;
  --ok: #90e0b0;
  --max: 1160px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  max-width: 100%;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(900px 440px at 10% -20%, rgba(43, 197, 180, 0.25) 0%, transparent 62%),
    radial-gradient(840px 420px at 92% -10%, rgba(0, 51, 160, 0.3) 0%, transparent 64%),
    var(--bg);
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.4;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  z-index: 1000;
  border-radius: 0.55rem;
  background: #ffffff;
  color: #000000;
  padding: 0.45rem 0.6rem;
}

.bg-shape {
  position: fixed;
  z-index: 0;
  pointer-events: none;
  border-radius: 999px;
  filter: blur(74px);
  opacity: 0.22;
}

.shape-a {
  width: 16rem;
  height: 16rem;
  top: -3rem;
  left: -3rem;
  background: var(--teal);
}

.shape-b {
  width: 14rem;
  height: 14rem;
  right: 1rem;
  bottom: 3rem;
  background: #f3a4ad;
}

.app-header,
.app-main,
.app-footer {
  width: min(var(--max), calc(100% - 1.5rem));
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.app-header {
  padding-top: 1rem;
}

.brand-wrap {
  border: 1px solid rgba(124, 184, 234, 0.35);
  border-radius: 0.9rem;
  padding: 1rem;
  background: linear-gradient(160deg, rgba(12, 30, 49, 0.88), rgba(16, 36, 58, 0.95));
}

.brand-kicker {
  margin: 0;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--teal);
  font-weight: 700;
}

.brand-wrap h1 {
  margin: 0.35rem 0;
  font-size: clamp(1.16rem, 3.3vw, 1.9rem);
}

.brand-sub {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.header-actions {
  margin-top: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.header-actions label {
  font-size: 0.88rem;
  color: var(--muted);
}

.header-actions select {
  border-radius: 0.55rem;
  border: 1px solid rgba(124, 184, 234, 0.42);
  background: rgba(12, 30, 49, 0.9);
  color: var(--text);
  padding: 0.45rem 0.6rem;
}

.pwa-install-banner {
  margin-top: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border: 1px solid rgba(43, 182, 115, 0.42);
  border-radius: 0.8rem;
  background: rgba(13, 54, 35, 0.76);
  padding: 0.78rem;
}

.pwa-install-banner strong,
.pwa-install-banner p {
  margin: 0;
}

.pwa-install-banner p {
  color: var(--muted);
  font-size: 0.88rem;
}

.pwa-install-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.app-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  margin-top: 0.8rem;
}

.app-nav a {
  min-width: 0;
  text-decoration: none;
  color: #dce8ff;
  border: 1px solid rgba(124, 184, 234, 0.4);
  border-radius: 0.6rem;
  padding: 0.6rem 0.65rem;
  background: rgba(9, 22, 36, 0.82);
  font-size: 0.9rem;
  text-align: center;
  overflow-wrap: anywhere;
  min-height: 42px;
}

.app-nav a.active {
  border-color: rgba(43, 197, 180, 0.8);
  background: rgba(20, 57, 76, 0.95);
}

.app-main {
  margin-top: 0.95rem;
  margin-bottom: 1rem;
}

.view-card {
  border: 1px solid rgba(124, 184, 234, 0.28);
  border-radius: 0.9rem;
  background: rgba(11, 26, 42, 0.9);
  padding: 1rem;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
}

.page-head {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 0.9rem;
}

.page-head h2 {
  margin: 0;
  font-size: 1.25rem;
}

.page-head p {
  margin: 0;
  color: var(--muted);
}

.tag-row {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.tag {
  margin: 0;
  border-radius: 999px;
  font-size: 0.78rem;
  padding: 0.24rem 0.6rem;
  border: 1px solid rgba(124, 184, 234, 0.35);
  color: #dbeaff;
  background: rgba(0, 51, 160, 0.23);
}

.success-card {
  border: 1px solid rgba(43, 182, 115, 0.35);
  background: rgba(43, 182, 115, 0.12);
}

.mono-code {
  font-family: "Courier New", monospace;
  letter-spacing: 0.06em;
}

.mono-code.large {
  font-size: 1.15rem;
  font-weight: 700;
}

.voucher-code-panel {
  border: 1px solid rgba(124, 184, 234, 0.28);
  border-radius: 0.8rem;
  background: rgba(9, 22, 36, 0.86);
  padding: 1rem;
}

.action-stack {
  display: grid;
  gap: 0.6rem;
}

.partner-meta {
  display: grid;
  gap: 0.45rem;
}

.form-grid {
  display: grid;
  gap: 0.7rem;
}

.grid-two {
  display: grid;
  gap: 0.7rem;
}

.field {
  display: grid;
  gap: 0.24rem;
}

.field label,
.field legend {
  font-size: 0.9rem;
  color: #d9e8ff;
}

.input,
select,
textarea {
  width: 100%;
  border-radius: 0.55rem;
  border: 1px solid rgba(124, 184, 234, 0.38);
  background: rgba(11, 23, 37, 0.92);
  color: var(--text);
  padding: 0.58rem 0.62rem;
  font: inherit;
}

textarea {
  min-height: 96px;
  resize: vertical;
}

.readonly {
  opacity: 0.88;
}

fieldset {
  border: 1px solid rgba(124, 184, 234, 0.32);
  border-radius: 0.65rem;
  margin: 0;
  padding: 0.6rem;
}

.options-row {
  display: grid;
  gap: 0.42rem;
}

.option-line {
  display: flex;
  align-items: center;
  gap: 0.48rem;
  color: #d9e8ff;
}

.error-text {
  font-size: 0.82rem;
  color: var(--danger);
  min-height: 1.06rem;
}

.help-text {
  font-size: 0.78rem;
  color: var(--muted);
}

.stats-grid {
  display: grid;
  gap: 0.55rem;
}

.stat-box {
  border: 1px solid rgba(124, 184, 234, 0.32);
  border-radius: 0.62rem;
  padding: 0.62rem;
  background: rgba(8, 19, 33, 0.9);
}

.stat-box h3 {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 600;
}

.stat-box p {
  margin: 0.2rem 0 0;
  font-size: 1.07rem;
  font-weight: 700;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.6rem;
}

.btn {
  border-radius: 0.62rem;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 700;
  padding: 0.62rem 0.85rem;
  cursor: pointer;
  color: #04151d;
  background: linear-gradient(130deg, var(--green), #62d19a);
}

.btn.secondary {
  border-color: rgba(124, 184, 234, 0.5);
  background: transparent;
  color: #e4eeff;
}

.btn.warning {
  background: linear-gradient(130deg, #f0c76c, #f3da9c);
  color: #3a2a00;
}

.btn.danger {
  background: linear-gradient(130deg, #ff8b8b, #ffc0c0);
  color: #3f1010;
}

.btn.ghost {
  border-color: rgba(124, 184, 234, 0.45);
  background: rgba(11, 23, 37, 0.92);
  color: #e4eeff;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.banner {
  margin: 0.7rem 0;
  padding: 0.58rem 0.7rem;
  border-radius: 0.6rem;
  border: 1px solid rgba(124, 184, 234, 0.35);
  background: rgba(12, 30, 49, 0.88);
  color: #dce8ff;
}

.banner.ok {
  border-color: rgba(118, 220, 161, 0.65);
  background: rgba(16, 63, 45, 0.5);
}

.banner.warn {
  border-color: rgba(240, 199, 108, 0.7);
  background: rgba(97, 77, 27, 0.5);
}

.banner.danger {
  border-color: rgba(255, 124, 124, 0.7);
  background: rgba(93, 36, 36, 0.5);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(124, 184, 234, 0.25);
  border-radius: 0.65rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 580px;
}

th,
td {
  padding: 0.55rem;
  border-bottom: 1px solid rgba(124, 184, 234, 0.2);
  text-align: left;
  font-size: 0.86rem;
}

th {
  color: #dce8ff;
  background: rgba(10, 24, 38, 0.94);
}

td {
  color: #cfddf1;
}

.progress {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.app-footer {
  padding-bottom: 1.6rem;
}

.app-footer p {
  margin: 0;
  color: #b8cce3;
  font-size: 0.84rem;
}

.toast {
  position: fixed;
  z-index: 40;
  left: 50%;
  bottom: 1.2rem;
  transform: translateX(-50%) translateY(10px);
  opacity: 0;
  pointer-events: none;
  padding: 0.57rem 0.75rem;
  border-radius: 0.52rem;
  border: 1px solid rgba(118, 220, 161, 0.7);
  color: #d8ffe7;
  background: rgba(13, 54, 35, 0.94);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.noscript-note {
  width: min(var(--max), calc(100% - 1.5rem));
  margin: 0 auto 1.2rem;
  padding: 0.6rem;
  border-radius: 0.6rem;
  border: 1px solid rgba(255, 124, 124, 0.74);
  color: #ffd4d4;
  background: rgba(75, 25, 25, 0.84);
}

.hidden {
  display: none !important;
}

.tarjeta-shell {
  display: grid;
  gap: 1rem;
}

.session-panel,
.section-block,
.status-card {
  border: 1px solid rgba(124, 184, 234, 0.25);
  border-radius: 0.8rem;
  background: rgba(8, 20, 33, 0.76);
  padding: 0.9rem;
}

.secondary-block {
  background: rgba(9, 23, 38, 0.62);
}

.session-head,
.section-head,
.voucher-head,
.benefit-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.section-head {
  margin-bottom: 0.8rem;
}

.section-head h3,
.session-head strong,
.hero-card h3,
.benefit-card h4,
.voucher-card h4,
.campaign-card h4,
.ally-card h4,
.instruction-card h4 {
  margin: 0;
}

.section-head p,
.hero-copy,
.hero-sub,
.benefit-card p,
.voucher-card p,
.campaign-card p,
.ally-card p,
.instruction-card p {
  margin: 0;
  color: var(--muted);
}

.hero-grid,
.detail-grid,
.quick-grid,
.benefit-grid,
.voucher-list,
.campaign-list,
.ally-grid {
  display: grid;
  gap: 0.8rem;
}

.hero-card,
.quick-card,
.benefit-card,
.voucher-card,
.campaign-card,
.ally-card,
.instruction-card,
.code-card,
.detail-item,
.mini-metric {
  border: 1px solid rgba(124, 184, 234, 0.22);
  border-radius: 0.8rem;
  background: rgba(12, 30, 49, 0.84);
}

.hero-card,
.benefit-card,
.voucher-card,
.campaign-card,
.ally-card,
.instruction-card,
.code-card,
.detail-item {
  padding: 0.9rem;
}

.hero-card-main {
  background: linear-gradient(155deg, rgba(0, 51, 160, 0.44), rgba(43, 197, 180, 0.18));
}

.hero-kicker {
  margin: 0 0 0.3rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  color: var(--teal);
  font-weight: 700;
}

.hero-points {
  display: grid;
  gap: 0.15rem;
  margin: 0.8rem 0;
}

.hero-points strong {
  font-size: clamp(1.8rem, 6vw, 2.8rem);
  line-height: 1;
}

.hero-points span,
.mini-metric span,
.detail-item span,
.code-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.mini-metric {
  display: grid;
  gap: 0.15rem;
  padding: 0.7rem 0.75rem;
}

.mini-metric strong,
.detail-item strong {
  font-size: 1rem;
  color: #f3f7ff;
}

.quick-card {
  display: grid;
  gap: 0.2rem;
  text-decoration: none;
  color: #f3f7ff;
  padding: 0.9rem;
}

.quick-card span {
  color: var(--muted);
  font-size: 0.84rem;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.3rem;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(124, 184, 234, 0.34);
  background: rgba(11, 23, 37, 0.88);
  color: #e4eeff;
  text-decoration: none;
  font-size: 0.87rem;
}

.filter-chip.active {
  border-color: rgba(43, 197, 180, 0.74);
  background: rgba(20, 57, 76, 0.96);
}

.benefit-meta,
.benefit-foot,
.ally-meta,
.voucher-meta,
.voucher-expiry {
  color: var(--muted);
  font-size: 0.85rem;
}

.benefit-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.65rem;
  margin: 0.7rem 0 0.45rem;
}

.benefit-foot {
  margin: 0 0 0.7rem;
}

.voucher-head,
.benefit-top {
  margin-bottom: 0.55rem;
}

.voucher-code,
.code-value {
  font-family: "Consolas", "SFMono-Regular", "Courier New", monospace;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: #f4fbff;
}

.voucher-code {
  margin: 0.5rem 0;
  font-size: 1rem;
}

.code-card {
  display: grid;
  gap: 0.85rem;
}

.code-box,
.barcode-box {
  border: 1px dashed rgba(124, 184, 234, 0.42);
  border-radius: 0.8rem;
  background: rgba(7, 19, 31, 0.95);
  padding: 0.9rem;
}

.code-value {
  display: block;
  margin-top: 0.3rem;
  font-size: clamp(1.2rem, 5vw, 1.8rem);
}

.barcode-box code,
.snapshot-box {
  display: block;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #dff9ff;
  font-family: "Consolas", "SFMono-Regular", "Courier New", monospace;
  font-size: 0.83rem;
}

.snapshot-box {
  margin: 0;
}

.detail-item {
  display: grid;
  gap: 0.25rem;
}

.history-description {
  display: grid;
  gap: 0.18rem;
}

.history-description strong {
  font-size: 0.92rem;
  color: #f3f7ff;
}

.history-meta {
  font-size: 0.82rem;
  color: var(--muted);
}

.history-link {
  color: var(--teal);
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 700;
}

.history-link:hover {
  text-decoration: underline;
}

.table-meta {
  font-size: 0.78rem;
  color: var(--muted);
}

.tag-status {
  border-color: rgba(124, 184, 234, 0.42);
}

.tag-status.tag-submitted {
  background: rgba(240, 199, 108, 0.18);
  border-color: rgba(240, 199, 108, 0.44);
}

.tag-status.tag-approved {
  background: rgba(43, 182, 115, 0.18);
  border-color: rgba(43, 182, 115, 0.44);
}

.tag-status.tag-rejected,
.tag-status.tag-reversed {
  background: rgba(255, 124, 124, 0.16);
  border-color: rgba(255, 124, 124, 0.42);
}

.active-filter {
  border-color: rgba(43, 197, 180, 0.78) !important;
  background: rgba(20, 57, 76, 0.96) !important;
}

.status-card {
  display: grid;
  gap: 0.6rem;
  text-align: left;
}

.loading-card,
.empty-card {
  place-items: center;
  text-align: center;
}

.error-card {
  border-color: rgba(255, 124, 124, 0.5);
}

.warning-card {
  border-color: rgba(240, 199, 108, 0.45);
  background: rgba(97, 77, 27, 0.22);
}

.compact-card {
  padding: 0.75rem;
}

.compact-card p {
  margin: 0;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(124, 184, 234, 0.34);
  background: rgba(11, 23, 37, 0.88);
  color: #e4eeff;
  font-size: 0.82rem;
  font-weight: 700;
}

.status-pill.status-pill-ok {
  border-color: rgba(43, 182, 115, 0.44);
  background: rgba(43, 182, 115, 0.16);
}

.status-pill.status-pill-warn {
  border-color: rgba(240, 199, 108, 0.44);
  background: rgba(240, 199, 108, 0.16);
}

.status-pill.status-pill-danger {
  border-color: rgba(255, 124, 124, 0.44);
  background: rgba(255, 124, 124, 0.16);
}

.partner-flow-list,
.partner-checklist {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.45rem;
  color: var(--muted);
}

.partner-lookup-grid {
  align-items: start;
}

.partner-result-card {
  gap: 0.8rem;
}

.spinner {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  border: 3px solid rgba(124, 184, 234, 0.24);
  border-top-color: var(--teal);
  animation: spin 0.8s linear infinite;
}

.bottom-nav {
  position: sticky;
  bottom: 0;
  z-index: 8;
  width: min(var(--max), calc(100% - 1rem));
  margin: 0 auto 0.8rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.4rem;
  padding: 0.45rem;
  border: 1px solid rgba(124, 184, 234, 0.28);
  border-radius: 0.9rem;
  background: rgba(8, 20, 33, 0.94);
  backdrop-filter: blur(14px);
}

.bottom-nav a {
  text-decoration: none;
  color: #dce8ff;
  text-align: center;
  padding: 0.55rem 0.4rem;
  border-radius: 0.65rem;
  font-size: 0.82rem;
  border: 1px solid transparent;
}

.bottom-nav a.active {
  border-color: rgba(43, 197, 180, 0.68);
  background: rgba(20, 57, 76, 0.92);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (min-width: 820px) {
  .app-nav {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .grid-two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .hero-grid,
  .detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quick-grid,
  .ally-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .benefit-grid,
  .voucher-list,
  .campaign-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bottom-nav {
    display: none;
  }
}

@media (min-width: 1120px) {
  .benefit-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media print {
  body {
    background: #ffffff;
    color: #111111;
  }

  .app-header,
  .app-footer,
  .bottom-nav,
  .toast,
  .action-row,
  .bg-shape {
    display: none !important;
  }

  .app-main,
  .view-card {
    width: 100%;
    margin: 0;
    border: none;
    box-shadow: none;
    background: #ffffff;
    color: #111111;
  }

  table,
  th,
  td {
    color: #111111;
    border-color: #a9a9a9;
  }
}

.auth-card {
  display: grid;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid rgba(124, 184, 234, 0.24);
  border-radius: 0.9rem;
  background: linear-gradient(160deg, rgba(12, 30, 49, 0.82), rgba(16, 36, 58, 0.94));
}

.auth-copy {
  margin: 0;
  color: var(--muted);
}

.auth-form {
  gap: 0.9rem;
}

.session-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.85rem 1rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(124, 184, 234, 0.22);
  background: rgba(15, 43, 65, 0.7);
}

.session-summary.unauthenticated {
  justify-content: flex-start;
}

.session-summary-copy {
  display: grid;
  gap: 0.18rem;
}

.session-summary-copy strong {
  font-size: 0.94rem;
}

.session-summary-copy span {
  color: var(--muted);
  font-size: 0.88rem;
}

.session-status {
  margin: 0;
  padding: 0.72rem 0.82rem;
  border-radius: 0.75rem;
  font-size: 0.92rem;
  border: 1px solid rgba(124, 184, 234, 0.28);
}

.session-status.success {
  background: rgba(43, 182, 115, 0.14);
  border-color: rgba(43, 182, 115, 0.35);
  color: #dff8e8;
}

.session-status.error {
  background: rgba(255, 124, 124, 0.14);
  border-color: rgba(255, 124, 124, 0.34);
  color: #ffe1e1;
}

.session-status.warning {
  background: rgba(240, 199, 108, 0.14);
  border-color: rgba(240, 199, 108, 0.34);
  color: #fff1cb;
}

.debug-panel {
  border: 1px dashed rgba(124, 184, 234, 0.35);
  border-radius: 0.8rem;
  padding: 0.8rem;
  background: rgba(8, 20, 35, 0.45);
}

.debug-panel summary {
  cursor: pointer;
  color: var(--muted);
  font-weight: 600;
}

.visual-code-grid {
  display: grid;
  gap: 0.8rem;
  margin: 1rem 0;
}

.visual-card {
  border: 1px solid rgba(124, 184, 234, 0.24);
  border-radius: 0.85rem;
  background: rgba(15, 43, 65, 0.52);
  padding: 0.9rem;
}

.qr-stage,
.barcode-stage {
  min-height: 180px;
  display: grid;
  place-items: center;
  border-radius: 0.8rem;
  background: #f3f7ff;
  color: #081423;
  overflow: hidden;
}

.qr-stage canvas {
  width: min(100%, 180px);
  height: auto;
}

.barcode-svg {
  width: 100%;
  height: auto;
  max-width: 320px;
}

.visual-fallback {
  margin: 0;
  padding: 1rem;
  text-align: center;
  color: #21364f;
}

.action-row.compact {
  gap: 0.45rem;
}

.programa-c-shell {
  gap: 1rem;
  width: min(100%, 760px);
  margin-inline: auto;
  overflow: visible;
}

.programa-c-form {
  display: grid;
  gap: 1rem;
}

.programa-c-section {
  display: grid;
  gap: 0.85rem;
  padding: 1rem;
  border: 1px solid rgba(124, 184, 234, 0.24);
  border-radius: 8px;
  background: rgba(15, 43, 65, 0.56);
}

.programa-c-step[hidden],
.programa-c-step-actions [hidden],
#programa-c-form[hidden] {
  display: none !important;
}

.programa-c-form.is-complete > :not(#programa-c-result) {
  display: none !important;
}

.programa-c-flow-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.programa-c-flow-header :where(.eyebrow, h1) {
  margin: 0;
}

.programa-c-flow-header h1 {
  font-size: clamp(1.7rem, 7vw, 2.35rem);
  letter-spacing: -0.035em;
}

.programa-c-progress-shell {
  display: grid;
  gap: 0.7rem;
}

.programa-c-progress-copy {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 750;
}

.programa-c-progress-copy p {
  margin: 0;
}

.programa-c-progress {
  height: 0.65rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
}

.programa-c-progress span {
  display: block;
  width: 20%;
  height: 100%;
  border-radius: inherit;
  background: var(--teal);
  transition: width 180ms ease;
}

.programa-c-step-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.programa-c-step-list li {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 0.3rem;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.2;
  text-align: center;
}

.programa-c-step-list li span:first-child {
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface-2);
  font-weight: 800;
}

.programa-c-step-list li[aria-current="step"] {
  color: var(--text);
  font-weight: 800;
}

.programa-c-step-list li[aria-current="step"] span:first-child {
  border: 2px solid var(--teal);
  box-shadow: 0 0 0 3px rgba(43, 197, 180, 0.18);
}

.programa-c-step-heading {
  display: grid;
  gap: 0.35rem;
}

.programa-c-step-heading :where(h2, p) {
  margin: 0;
}

.programa-c-step-heading h2 {
  font-size: clamp(1.45rem, 6vw, 2rem);
  letter-spacing: -0.025em;
}

.programa-c-step-heading > p:last-child {
  max-width: 58ch;
  color: var(--muted);
}

.programa-c-recognition {
  margin: 0;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: var(--surface-2);
  font-weight: 700;
}

.programa-c-step-actions {
  position: sticky;
  z-index: 5;
  bottom: 0;
  display: flex;
  justify-content: flex-end;
  gap: 0.65rem;
  margin: 0 -1rem -1rem;
  padding: 0.85rem max(1rem, env(safe-area-inset-right)) max(0.85rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(12px);
}

.programa-c-step-actions .btn {
  min-width: 7.5rem;
  min-height: 48px;
}

.programa-c-review {
  display: grid;
  gap: 0.75rem;
}

.programa-c-review-card {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 0.8rem;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  background: var(--surface-2);
}

.programa-c-review-card h3 {
  margin: 0 0 0.55rem;
}

.programa-c-review-card p {
  min-width: 0;
  display: grid;
  gap: 0.12rem;
  margin: 0.4rem 0 0;
}

.programa-c-review-card p span {
  color: var(--muted);
  font-size: 0.76rem;
}

.programa-c-review-card p strong {
  overflow-wrap: anywhere;
}

.programa-c-review-notice {
  margin: 0;
  padding: 0.9rem;
  border-left: 4px solid var(--teal);
  border-radius: 0.7rem;
  background: var(--surface-2);
}

.programa-c-success {
  display: grid;
  gap: 1rem;
  padding: clamp(1rem, 4vw, 1.5rem);
}

.programa-c-success :where(h2, p) {
  margin: 0;
}

.programa-c-points {
  display: grid;
  gap: 0.2rem;
  padding: 1rem;
  border-radius: 0.8rem;
  background: var(--surface-2);
}

.programa-c-points span {
  color: var(--muted);
}

.programa-c-points strong {
  font-size: 1.35rem;
}

.programa-c-flow-view :where(a, button, input, select, textarea, [tabindex="-1"]):focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.section-heading h3 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: 0;
}

.grid-three {
  display: grid;
  gap: 0.85rem;
}

.programa-c-submit {
  display: grid;
  gap: 0.55rem;
  justify-items: start;
}

.scanner-panel {
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
  border: 1px solid rgba(43, 182, 115, 0.34);
  border-radius: 8px;
  background: rgba(7, 22, 29, 0.86);
}

.scanner-panel video {
  width: 100%;
  min-height: 260px;
  max-height: 56vh;
  border-radius: 8px;
  background: #050b12;
  object-fit: cover;
}

.programa-c-html5-scanner {
  width: 100%;
}

.programa-c-html5-scanner video {
  width: 100% !important;
  max-height: 56vh;
  border-radius: 8px;
  object-fit: cover;
}

.programa-c-html5-scanner img {
  display: none;
}

.evidence-preview {
  margin: 0;
  border: 1px solid rgba(124, 184, 234, 0.24);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(8, 20, 35, 0.58);
}

.evidence-preview img {
  display: block;
  width: 100%;
  max-height: 320px;
  object-fit: contain;
}

.metric-row {
  display: grid;
  gap: 0.7rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.metric-row div {
  display: grid;
  gap: 0.2rem;
  padding: 0.75rem;
  border-radius: 8px;
  background: rgba(8, 20, 35, 0.5);
}

.metric-row span {
  color: var(--muted);
  font-size: 0.78rem;
}

.metric-row strong {
  font-size: 1rem;
}

@media (max-width: 480px) {
  .app-nav {
    grid-template-columns: 1fr;
  }

  .pwa-install-banner {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .pwa-install-actions {
    width: 100%;
  }
}

@media (min-width: 720px) {
  .page-head {
    grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.8fr);
    align-items: start;
  }

  .visual-code-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid-three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .programa-c-step-actions {
    position: static;
    margin: 0;
    padding: 1rem 0 0;
    border-top: 1px solid var(--line);
    background: transparent;
    backdrop-filter: none;
  }
}

@media (max-width: 520px) {
  .programa-c-flow-header {
    align-items: flex-start;
  }

  .programa-c-flow-header .programa-c-back-link {
    max-width: 8.5rem;
    text-align: center;
  }

  .programa-c-step-list li span:last-child {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .programa-c-section {
    padding: 0.9rem;
  }

  .programa-c-step-actions .btn {
    flex: 1 1 0;
    min-width: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .programa-c-progress span {
    transition: none;
  }
}

/* Entrada enfocada de Programa C. El flujo autenticado conserva sus estilos funcionales. */
body.programa-c-experience {
  --programa-entry-bg: #f6faf8;
  --programa-entry-surface: #ffffff;
  --programa-entry-soft: #eef6f2;
  --programa-entry-text: #042b3f;
  --programa-entry-muted: #5d6c76;
  --programa-entry-border: #d9e6df;
  --programa-entry-primary: #28af63;
  --programa-entry-focus: #08766c;
  min-width: 320px;
  min-height: 100dvh;
  color: var(--programa-entry-text);
  background:
    radial-gradient(circle at 8% 2%, rgba(40, 175, 99, 0.13) 0, transparent 27rem),
    var(--programa-entry-bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html[data-theme="dark"] body.programa-c-experience,
html:not([data-theme]) body.programa-c-experience {
  --programa-entry-bg: #071e2b;
  --programa-entry-surface: #0d3042;
  --programa-entry-soft: #123d51;
  --programa-entry-text: #eaf7f1;
  --programa-entry-muted: #b7c8cf;
  --programa-entry-border: #255264;
  --programa-entry-primary: #21c7b7;
  --programa-entry-focus: #97cb26;
}

.programa-c-experience > .app-header,
.programa-c-experience > .bottom-nav,
.programa-c-experience > .app-footer,
.programa-c-experience > .bg-shape {
  display: none !important;
}

.programa-c-experience .app-main {
  position: relative;
  z-index: 1;
}

.programa-c-auth-view .app-main {
  width: min(31rem, calc(100% - 2rem));
  min-height: 100dvh;
  display: grid;
  place-items: center;
  margin: 0 auto;
  padding: max(1.25rem, env(safe-area-inset-top)) 0 max(1.25rem, env(safe-area-inset-bottom));
}

.programa-c-auth-shell {
  width: 100%;
}

.programa-c-auth-card {
  display: grid;
  gap: 1.15rem;
  padding: clamp(1.2rem, 5vw, 2rem);
  border: 1px solid var(--programa-entry-border);
  border-radius: 1.35rem;
  color: var(--programa-entry-text);
  background: var(--programa-entry-surface);
  box-shadow: 0 18px 46px rgba(4, 43, 63, 0.14);
}

.programa-c-auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  width: fit-content;
  color: var(--programa-entry-text);
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.programa-c-auth-brand img {
  width: 48px;
  height: 48px;
  border-radius: 0.8rem;
  box-shadow: 0 8px 22px rgba(4, 43, 63, 0.12);
}

.programa-c-auth-copy {
  display: grid;
  gap: 0.55rem;
}

.programa-c-auth-copy h1,
.programa-c-auth-copy p {
  margin: 0;
}

.programa-c-auth-copy h1 {
  color: var(--programa-entry-text);
  font-size: clamp(2rem, 9vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.programa-c-auth-copy p {
  max-width: 36ch;
  color: var(--programa-entry-muted);
}

.programa-c-auth-card .session-status {
  color: var(--programa-entry-muted);
  border-color: var(--programa-entry-border);
  background: var(--programa-entry-soft);
}

.programa-c-auth-card .session-status.success {
  color: var(--programa-entry-text);
  border-color: var(--programa-entry-primary);
  background: var(--programa-entry-soft);
}

.programa-c-auth-card .session-status.error {
  color: #b42318;
  border-color: rgba(180, 35, 24, 0.42);
  background: rgba(180, 35, 24, 0.08);
}

html[data-theme="dark"] .programa-c-auth-card .session-status.error,
html:not([data-theme]) .programa-c-auth-card .session-status.error {
  color: #ffb4ab;
}

.programa-c-auth-card .session-status.warning {
  color: #8a5a00;
  border-color: rgba(138, 90, 0, 0.42);
  background: rgba(138, 90, 0, 0.08);
}

html[data-theme="dark"] .programa-c-auth-card .session-status.warning,
html:not([data-theme]) .programa-c-auth-card .session-status.warning {
  color: #ffd27a;
}

.programa-c-auth-card .auth-form {
  gap: 0.9rem;
}

.programa-c-auth-card .field {
  gap: 0.4rem;
}

.programa-c-auth-card .field label {
  color: var(--programa-entry-text);
  font-weight: 750;
}

.programa-c-auth-card .input {
  min-height: 50px;
  padding: 0.7rem 0.8rem;
  border-color: var(--programa-entry-border);
  border-radius: 0.8rem;
  color: var(--programa-entry-text);
  background: var(--programa-entry-bg);
}

.programa-c-auth-card .input::placeholder {
  color: var(--programa-entry-muted);
  opacity: 0.8;
}

.programa-c-auth-card .programa-c-login-submit {
  width: 100%;
  min-height: 50px;
  margin-top: 0.15rem;
  border-radius: 0.85rem;
  color: #042b3f;
  background: var(--programa-entry-primary);
}

.programa-c-back-link {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: start;
  padding: 0.55rem 0;
  border-radius: 0.7rem;
  color: var(--programa-entry-text);
  font-weight: 750;
  text-underline-offset: 0.22rem;
}

.programa-c-auth-card :where(a, button, input):focus-visible {
  outline: 3px solid var(--programa-entry-focus);
  outline-offset: 3px;
}

body.programa-c-flow-view {
  color: var(--text);
  background:
    radial-gradient(900px 440px at 10% -20%, rgba(43, 197, 180, 0.25) 0%, transparent 62%),
    radial-gradient(840px 420px at 92% -10%, rgba(0, 51, 160, 0.3) 0%, transparent 64%),
    var(--bg);
}

.programa-c-flow-view .app-main {
  width: min(var(--max), calc(100% - 1.5rem));
  min-height: auto;
  display: block;
  margin: 0 auto;
  padding: max(1rem, env(safe-area-inset-top)) 0 max(1rem, env(safe-area-inset-bottom));
}

.programa-c-flow-view .programa-c-back-link {
  color: var(--text);
}

.programa-c-flow-view .programa-c-back-link:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
}

/* Programa C admin: cola y revisión mobile-first sobre el shell existente. */
.admin-programa-c {
  min-width: 0;
}

.admin-programa-c :where(a, button, textarea):focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
}

.admin-programa-c .btn {
  min-height: 48px;
}

.admin-programa-c-list {
  min-width: 0;
  display: grid;
  gap: 0.85rem;
}

.admin-programa-c-card {
  min-width: 0;
  display: grid;
  gap: 0.9rem;
  padding: 1rem;
  border: 1px solid rgba(124, 184, 234, 0.26);
  border-radius: 0.9rem;
  background: rgba(12, 30, 49, 0.84);
  overflow-wrap: anywhere;
}

.admin-programa-c-card-head,
.admin-programa-c-card-foot,
.admin-programa-c-modal-head,
.admin-programa-c-textarea-meta,
.admin-programa-c-pagination {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.admin-programa-c-card-head {
  align-items: flex-start;
}

.admin-programa-c-card-head h4,
.admin-programa-c-modal-head h3,
.admin-programa-c-result h3 {
  margin: 0;
}

.admin-programa-c-card-grid {
  min-width: 0;
  display: grid;
  gap: 0.65rem;
}

.admin-programa-c-card-grid p {
  min-width: 0;
  display: grid;
  gap: 0.15rem;
  margin: 0;
}

.admin-programa-c-card-grid span {
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.admin-programa-c-card-grid strong {
  overflow-wrap: anywhere;
}

.admin-programa-c-card-foot {
  align-items: stretch;
  flex-wrap: wrap;
}

.admin-programa-c-evidence-indicator,
.admin-programa-c-evidence-copy {
  color: var(--muted);
  font-size: 0.88rem;
}

.admin-programa-c-evidence-indicator {
  display: inline-flex;
  align-items: center;
}

.admin-programa-c-pagination {
  margin-top: 1rem;
}

.admin-programa-c-pagination span {
  color: var(--muted);
  text-align: center;
}

.admin-programa-c-result,
.admin-programa-c-reason {
  min-width: 0;
}

.admin-programa-c .detail-card {
  min-width: 0;
  display: grid;
  gap: 0.25rem;
  padding: 0.85rem;
  border: 1px solid rgba(124, 184, 234, 0.22);
  border-radius: 0.8rem;
  background: rgba(12, 30, 49, 0.84);
  overflow-wrap: anywhere;
}

.admin-programa-c .detail-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.admin-programa-c-award {
  margin: 0;
  font-size: clamp(1.25rem, 6vw, 1.75rem);
  font-weight: 800;
  color: #f3f7ff;
}

.admin-programa-c-reason {
  padding: 0.8rem;
  border-radius: 0.7rem;
  background: rgba(8, 20, 33, 0.62);
}

.admin-programa-c-reason p,
.admin-programa-c-evidence-copy {
  margin: 0.35rem 0 0;
  overflow-wrap: anywhere;
}

.tag-status.tag-pending_review {
  border-color: rgba(240, 199, 108, 0.44);
  background: rgba(240, 199, 108, 0.18);
}

.admin-programa-c-modal {
  width: min(42rem, calc(100% - 1rem));
  max-width: 100%;
  max-height: min(88dvh, 48rem);
  margin: auto;
  padding: 1rem max(1rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
  border: 1px solid rgba(124, 184, 234, 0.38);
  border-radius: 1rem;
  color: var(--text);
  background: #0a1b2d;
  box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, 0.58);
  overflow-y: auto;
}

.admin-programa-c-modal::backdrop {
  background: rgba(1, 8, 15, 0.78);
  backdrop-filter: blur(4px);
}

.admin-programa-c-modal > :where(p, form),
.admin-programa-c-modal form {
  min-width: 0;
}

.admin-programa-c-modal-head {
  align-items: flex-start;
  margin-bottom: 1rem;
}

.admin-programa-c-modal-actions {
  position: sticky;
  bottom: calc(-1rem - env(safe-area-inset-bottom));
  margin: 1rem -1rem calc(-1rem - env(safe-area-inset-bottom));
  padding: 0.8rem 1rem max(0.8rem, env(safe-area-inset-bottom));
  border-top: 1px solid rgba(124, 184, 234, 0.22);
  background: rgba(10, 27, 45, 0.98);
}

.admin-programa-c-textarea-meta {
  align-items: flex-start;
  color: var(--muted);
  font-size: 0.8rem;
}

.admin-programa-c-textarea-meta .error-text {
  margin: 0;
  text-align: right;
}

.admin-programa-c-evidence {
  max-width: 100%;
  display: grid;
  gap: 0.65rem;
  margin: 0;
}

.admin-programa-c-evidence img {
  display: block;
  width: 100%;
  max-width: 100%;
  max-height: min(68dvh, 44rem);
  border-radius: 0.8rem;
  background: rgba(4, 13, 23, 0.92);
  object-fit: contain;
}

.admin-programa-c-evidence figcaption {
  color: var(--muted);
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}

@media (min-width: 640px) {
  .admin-programa-c-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 960px) {
  .admin-programa-c-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .admin-programa-c-card-head,
  .admin-programa-c-card-foot,
  .admin-programa-c-modal-head,
  .admin-programa-c-modal-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-programa-c-card-foot .btn,
  .admin-programa-c-modal-actions .btn {
    width: 100%;
  }

  .admin-programa-c-pagination {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .admin-programa-c .spinner {
    animation-duration: 1.8s;
  }
}
