/* Don Fulgencio Play v9 — estado de sesión y perfil sobre el sistema visual UMBRAL. */
.session-balance-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 7px 12px;
  border: 1px solid rgba(232,229,224,.16);
  border-radius: 100px;
  background: rgba(197,142,91,.10);
  color: var(--on-dark);
  font: 600 11px/1 var(--ui-font);
  white-space: nowrap;
  transition: background .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease);
}
.session-balance-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(197,142,91,.42);
  background: rgba(197,142,91,.16);
}
.session-balance-chip__value {
  font-weight: 700;
  letter-spacing: .01em;
}
.session-balance-chip__label {
  color: var(--muted-dark);
  font-weight: 500;
}


.session-balance-chip__icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
  box-shadow: 0 10px 18px rgba(0,0,0,.16);
}

.rewards-account-banner__media {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rewards-account-banner__media img {
  width: 92px;
  height: 92px;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 16px 38px rgba(38,32,27,.10);
}

.menu-account-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 18px;
  align-items: center;
  margin: 28px 0 -10px;
  padding: 18px 19px;
  border: 1px solid var(--light-line);
  border-radius: 20px;
  background: rgba(197,142,91,.08);
}
.menu-account-card small {
  grid-column: 1 / -1;
  color: var(--sage);
  font: 600 10px/1.2 var(--ui-font);
  letter-spacing: .16em;
  text-transform: uppercase;
}
.menu-account-card strong {
  min-width: 0;
  overflow: hidden;
  color: var(--on-dark);
  font: 400 21px/1.3 var(--serif);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.menu-account-card span {
  color: var(--muted-dark);
  font: 600 11px/1.2 var(--ui-font);
  white-space: nowrap;
}

.rewards-account-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
  padding: 20px 24px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 15px 40px rgba(38,32,27,.05);
}
.rewards-account-banner__copy small {
  display: block;
  margin-bottom: 4px;
  color: var(--moss);
  font: 600 10px/1.2 var(--ui-font);
  letter-spacing: .14em;
  text-transform: uppercase;
}
.rewards-account-banner__copy strong {
  display: block;
  color: var(--ink);
  font: 400 clamp(23px,2.2vw,31px)/1.15 var(--serif);
}
.rewards-account-banner__copy span {
  color: var(--stone);
  font: 500 12px/1.5 var(--ui-font);
}
.rewards-account-banner .button {
  flex: 0 0 auto;
}
.reward-live-info {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: center;
  margin-top: 7px;
  color: var(--moss);
  font: 600 11px/1.3 var(--ui-font);
}
.reward-live-info span + span::before {
  content: "·";
  margin-right: 10px;
  color: var(--stone);
}
.reward-live-info .is-out {
  color: var(--danger);
}

/* Perfil */
.profile-page {
  background: var(--off);
}
.profile-section {
  padding-top: 86px;
}
.profile-grid {
  display: grid;
  grid-template-columns: minmax(0,1.45fr) minmax(290px,.55fr);
  gap: 22px;
  align-items: stretch;
}
.profile-card,
.profile-detail-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 15px 40px rgba(38,32,27,.05);
}
.profile-card {
  padding: clamp(28px,4vw,48px);
}
.profile-card .eyebrow,
.profile-detail-card .eyebrow {
  color: var(--moss);
}
.profile-card h2 {
  margin: 12px 0 8px;
  font: 400 clamp(34px,4vw,54px)/1.08 var(--serif);
  letter-spacing: -.035em;
}
.profile-card>p:not(.eyebrow) {
  color: var(--stone);
  font-size: 14px;
}
.profile-balance {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  margin-top: 35px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.profile-balance strong {
  font: 400 clamp(45px,6vw,72px)/.95 var(--serif);
  letter-spacing: -.05em;
}
.profile-balance span {
  padding-bottom: 7px;
  color: var(--moss);
  font: 600 12px/1.2 var(--ui-font);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}
.profile-detail-card {
  display: flex;
  flex-direction: column;
  padding: 30px;
}
.profile-detail-list {
  display: grid;
  gap: 19px;
  margin: 24px 0 28px;
}
.profile-detail-list div {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.profile-detail-list div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.profile-detail-list span {
  display: block;
  margin-bottom: 3px;
  color: var(--stone);
  font: 600 10px/1.2 var(--ui-font);
  letter-spacing: .12em;
  text-transform: uppercase;
}
.profile-detail-list strong {
  display: block;
  color: var(--ink);
  font: 500 15px/1.45 var(--body-font);
}
.profile-logout {
  margin-top: auto;
}
.profile-logout .button {
  width: 100%;
}
.profile-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin: 78px 0 30px;
}
.profile-section-heading h2 {
  font: 400 clamp(34px,4vw,52px)/1.1 var(--serif);
  letter-spacing: -.035em;
}
.profile-section-heading p {
  max-width: 540px;
  color: var(--stone);
  font-size: 13px;
}
.profile-stats {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 14px;
}
.profile-stat {
  min-height: 145px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--sand);
}
.profile-stat span {
  color: var(--moss);
  font: 600 10px/1.2 var(--ui-font);
  letter-spacing: .12em;
  text-transform: uppercase;
}
.profile-stat strong {
  display: block;
  margin-top: 25px;
  font: 400 clamp(28px,3.5vw,42px)/1 var(--serif);
}
.profile-rewards-grid {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 18px;
}
.profile-reward-card {
  min-width: 0;
}
.profile-reward-card .piece-media {
  height: 280px;
}
.profile-reward-card .piece-meta {
  align-items: flex-start;
}
.profile-reward-points {
  margin-top: 5px;
  color: var(--moss);
  font: 600 11px/1.4 var(--ui-font);
}
.profile-ledger {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
}
.profile-ledger-row {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}
.profile-ledger-row:last-child {
  border-bottom: 0;
}
.profile-ledger-row strong {
  display: block;
  font: 600 14px/1.35 var(--body-font);
}
.profile-ledger-row small {
  display: block;
  margin-top: 3px;
  color: var(--stone);
  font: 500 11px/1.4 var(--ui-font);
}
.profile-ledger-amount {
  font: 600 14px/1 var(--ui-font);
  white-space: nowrap;
}
.profile-ledger-amount.is-positive { color: var(--success); }
.profile-ledger-amount.is-negative { color: var(--danger); }
.profile-empty {
  padding: 30px 22px;
  color: var(--stone);
  font-size: 13px;
}

@media (max-width:1180px) {
  .session-balance-chip { display: none; }
}
@media (max-width:900px) {
  .profile-grid { grid-template-columns: 1fr; }
  .profile-stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .profile-rewards-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width:760px) {
  .rewards-account-banner {
    align-items: flex-start;
    flex-direction: column;
    padding: 19px;
  }
  .menu-account-card { margin-top: 23px; }
  .profile-section { padding-top: 62px; }
  .profile-section-heading { align-items: flex-start; flex-direction: column; margin-top: 62px; }
  .profile-card,
  .profile-detail-card { border-radius: 22px; }
}
@media (max-width:540px) {
  .profile-stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .profile-stat { min-height: 126px; padding: 19px; }
  .profile-rewards-grid { grid-template-columns: 1fr; }
  .profile-reward-card .piece-media { height: 340px; }
  .profile-ledger-row { grid-template-columns: 1fr; gap: 8px; }
}
@media (min-width:1181px) {
  .session-balance-chip + .header-panel-link {
    margin-left: 4px;
    padding-left: 15px;
  }
}

/* v10 — avatar de sesión, canjes y perfil. Se mantiene aislado del CSS base de UMBRAL. */
.session-profile-link {
  gap: 10px;
  padding-top: 4px;
  padding-bottom: 4px;
}
.session-avatar,
.menu-account-avatar,
.profile-photo {
  display: block;
  object-fit: cover;
  object-position: center;
  border-radius: 50%;
  background: rgba(247,244,237,.96);
  border: 1px solid rgba(197,142,91,.34);
}
.session-avatar {
  width: 34px;
  height: 34px;
  box-shadow: 0 7px 20px rgba(0,0,0,.12);
}
.menu-account-card {
  grid-template-columns: auto minmax(0,1fr) auto;
}
.menu-account-avatar { width: 44px; height: 44px; }
.menu-account-card > div { min-width: 0; }
.menu-account-card > div small,
.menu-account-card > div strong { display: block; }

.reward-live-panel {
  margin-top: 8px;
}
.reward-live-action {
  margin-top: 10px;
}
.reward-redeem-button {
  min-height: 36px;
  padding: 9px 15px;
}
.reward-detail-live-action {
  display: flex;
  align-items: center;
}
.reward-redeem-dialog {
  width: min(560px, calc(100vw - 30px));
}
.reward-redeem-dialog h2 {
  margin: 12px 0 10px;
}
.reward-redeem-copy {
  margin-bottom: 24px;
  color: var(--stone);
}
.reward-redeem-branch-field {
  margin-bottom: 18px;
}
.reward-redeem-branch-field select {
  width: 100%;
  min-height: 52px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  color: var(--ink);
  font: 500 14px/1.3 var(--body-font);
}
.reward-redeem-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 18px 0 22px;
}
.reward-redeem-summary > div {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--sand);
}
.reward-redeem-summary span,
.reward-code span {
  display: block;
  margin-bottom: 5px;
  color: var(--moss);
  font: 600 9px/1.2 var(--ui-font);
  letter-spacing: .12em;
  text-transform: uppercase;
}
.reward-redeem-summary strong {
  font: 500 15px/1.3 var(--body-font);
}
.reward-redeem-error {
  margin: -6px 0 16px;
  padding: 12px 14px;
  border-radius: 13px;
  background: rgba(155,93,66,.09);
  color: var(--danger);
  font-size: 13px;
}
.reward-redeem-success > p {
  color: var(--stone);
}
.reward-code {
  margin: 24px 0 14px;
  padding: 22px;
  border: 1px solid rgba(35,31,27,.18);
  border-radius: 18px;
  background: var(--sand);
  text-align: center;
}
.reward-code strong {
  display: block;
  color: var(--forest);
  font: 600 clamp(25px,5vw,38px)/1.1 var(--ui-font);
  letter-spacing: .08em;
}
.reward-success-meta {
  display: grid;
  gap: 4px;
  color: var(--stone);
  font: 500 12px/1.45 var(--ui-font);
  text-align: center;
}
.reward-redeem-success-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 24px;
}

.profile-identity-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}
.profile-identity-copy { min-width: 0; }
.profile-photo-block {
  flex: 0 0 auto;
  display: grid;
  justify-items: center;
  gap: 10px;
}
.profile-photo {
  width: 112px;
  height: 112px;
  box-shadow: 0 14px 38px rgba(38,32,27,.12);
}
.profile-photo-form {
  display: flex;
  align-items: center;
  gap: 9px;
}
.profile-photo-picker {
  position: relative;
  cursor: pointer;
}
.profile-photo-picker input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}
.profile-photo-submit {
  padding: 7px 2px;
  font-size: 11px;
}
.profile-redemptions {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
}
.profile-redemption-row {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 22px;
  align-items: center;
  padding: 19px 22px;
  border-bottom: 1px solid var(--line);
}
.profile-redemption-row:last-child { border-bottom: 0; }
.profile-redemption-main strong {
  display: block;
  margin-top: 6px;
  font: 600 14px/1.35 var(--body-font);
}
.profile-redemption-main small,
.profile-redemption-code small {
  display: block;
  margin-top: 3px;
  color: var(--stone);
  font: 500 11px/1.4 var(--ui-font);
}
.profile-redemption-status {
  display: inline-flex;
  padding: 5px 8px;
  border-radius: 100px;
  background: rgba(197,142,91,.16);
  color: var(--forest);
  font: 700 9px/1 var(--ui-font);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.profile-redemption-status.is-redeemed { background: rgba(115,84,57,.10); color: var(--success); }
.profile-redemption-status.is-expired,
.profile-redemption-status.is-cancelled { background: rgba(155,93,66,.09); color: var(--danger); }
.profile-redemption-code {
  min-width: 170px;
  text-align: right;
}
.profile-redemption-code > span {
  display: block;
  color: var(--stone);
  font: 600 9px/1.2 var(--ui-font);
  letter-spacing: .12em;
  text-transform: uppercase;
}
.profile-redemption-code > strong {
  display: block;
  margin-top: 5px;
  color: var(--forest);
  font: 700 16px/1.2 var(--ui-font);
  letter-spacing: .06em;
}

@media (max-width:760px) {
  .header-panel-link.session-profile-link {
    display: inline-flex;
    margin: 0 5px 0 0;
    padding: 0;
    border-left: 0;
    gap: 0;
  }
  .session-profile-link .session-profile-label,
  .session-profile-link > .icon { display: none; }
  .session-avatar { width: 36px; height: 36px; }
  .profile-identity-row { align-items: flex-start; }
  .profile-photo { width: 90px; height: 90px; }
  .profile-photo-form { flex-direction: column; gap: 3px; }
  .reward-redeem-success-actions { flex-direction: column; }
  .reward-redeem-success-actions .button { width: 100%; }
}
@media (max-width:560px) {
  .profile-identity-row { flex-direction: column-reverse; }
  .profile-photo-block { justify-items: start; }
  .profile-photo-form { flex-direction: row; }
  .profile-redemption-row { grid-template-columns: 1fr; gap: 12px; }
  .profile-redemption-code { min-width: 0; text-align: left; }
  .reward-redeem-summary { grid-template-columns: 1fr; }
}
.profile-identity-copy > p:not(.eyebrow) {
  color: var(--stone);
  font-size: 14px;
}
