:root {
  --ms-panel: #07111f;
  --ms-panel-2: #0c1b2c;
  --ms-line: rgba(68, 171, 255, 0.22);
  --ms-blue: #0099ff;
  --ms-text: #f7fbff;
  --ms-muted: #91a4b8;
  --ms-green: #24d47b;
  --ms-red: #ff657a;
}
.ms-account-zone {
  display: flex;
  align-items: center;
  gap: 9px;
}
.ms-balance {
  display: none;
  padding: 8px 12px;
  border: 1px solid rgba(36, 212, 123, 0.3);
  border-radius: 999px;
  color: var(--ms-green);
  background: rgba(36, 212, 123, 0.08);
  font-size: 0.78rem;
  font-weight: 850;
}
.ms-balance.is-visible {
  display: inline-flex;
}
.ms-account-button {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(135deg, #068ddd, #075cae);
  font-weight: 850;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0, 120, 220, 0.2);
}
.ms-stock {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 2px 0 12px;
  color: var(--ms-green);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.05em;
}
.ms-stock::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 10px currentColor;
}
.ms-stock.low {
  color: #ffbf3f;
}
.ms-stock.out {
  color: var(--ms-red);
}
.producto > button:disabled {
  cursor: not-allowed;
  filter: grayscale(0.65);
  opacity: 0.55;
}
.ms-backdrop {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 4, 12, 0.78);
  backdrop-filter: blur(12px);
  opacity: 0;
  visibility: hidden;
  transition: 0.2s;
}
.ms-backdrop.open {
  opacity: 1;
  visibility: visible;
}
.ms-modal {
  position: relative;
  width: min(94vw, 480px);
  max-height: 92vh;
  overflow: auto;
  border: 1px solid var(--ms-line);
  border-radius: 24px;
  color: var(--ms-text);
  background:
    radial-gradient(circle at 95% 0, rgba(0, 153, 255, 0.17), transparent 30%),
    linear-gradient(145deg, var(--ms-panel-2), var(--ms-panel));
  box-shadow: 0 35px 100px rgba(0, 0, 0, 0.65);
  transform: translateY(14px) scale(0.98);
  transition: 0.2s;
}
.ms-backdrop.open .ms-modal {
  transform: none;
}
.ms-modal.wide {
  width: min(96vw, 980px);
}
.ms-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 24px 16px;
  border-bottom: 1px solid var(--ms-line);
}
.ms-modal-head h2 {
  margin: 0;
  font-size: 1.35rem;
}
.ms-modal-close {
  width: 38px;
  height: 38px;
  border: 1px solid var(--ms-line);
  border-radius: 11px;
  color: var(--ms-muted);
  background: transparent;
  font-size: 1.45rem;
  cursor: pointer;
}
.ms-modal-body {
  padding: 24px;
}
.ms-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-bottom: 22px;
  padding: 5px;
  border: 1px solid var(--ms-line);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.18);
}
.ms-tabs button {
  padding: 10px;
  border: 0;
  border-radius: 10px;
  color: var(--ms-muted);
  background: transparent;
  font-weight: 850;
  cursor: pointer;
}
.ms-tabs button.active {
  color: #fff;
  background: linear-gradient(135deg, #078fde, #075cb2);
}
.ms-form {
  display: grid;
  gap: 15px;
}
.ms-form label {
  display: grid;
  gap: 7px;
  color: #cfdae6;
  font-size: 0.83rem;
  font-weight: 750;
}
.ms-form input,
.ms-form select,
.ms-form textarea {
  width: 100%;
  padding: 12px 13px;
  border: 1px solid var(--ms-line);
  border-radius: 11px;
  outline: 0;
  color: var(--ms-text);
  background: #050d18;
  font: inherit;
}
.ms-form input:focus,
.ms-form select:focus,
.ms-form textarea:focus {
  border-color: var(--ms-blue);
  box-shadow: 0 0 0 3px rgba(0, 153, 255, 0.12);
}
.ms-primary,
.ms-secondary,
.ms-danger {
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 11px;
  color: white;
  background: linear-gradient(135deg, #079bea, #0755aa);
  font-weight: 850;
  cursor: pointer;
}
.ms-secondary {
  border: 1px solid var(--ms-line);
  background: rgba(255, 255, 255, 0.04);
}
.ms-danger {
  background: linear-gradient(135deg, #dc3855, #9e1935);
}
.ms-primary:disabled {
  opacity: 0.55;
  cursor: wait;
}
.ms-note {
  margin: 0;
  color: var(--ms-muted);
  font-size: 0.8rem;
}
.ms-message {
  min-height: 18px;
  margin: 0;
  color: var(--ms-red);
  font-size: 0.82rem;
}
.ms-account-card {
  display: grid;
  gap: 16px;
  text-align: center;
}
.ms-user-avatar {
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  margin: auto;
  border: 1px solid rgba(0, 153, 255, 0.4);
  border-radius: 20px;
  color: #fff;
  background: linear-gradient(145deg, #078fde, #5246c8);
  font-size: 1.55rem;
  font-weight: 950;
}
.ms-account-card h3 {
  margin: 0;
}
.ms-account-card p {
  margin: -10px 0 4px;
  color: var(--ms-muted);
}
.ms-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.ms-method {
  padding: 14px;
  border: 1px solid var(--ms-line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.03);
}
.ms-method strong {
  display: block;
  margin-bottom: 6px;
  color: #fff;
}
.ms-method p {
  white-space: pre-line;
  margin: 0;
  color: #bfd0df;
  font-size: 0.82rem;
}
.ms-list {
  display: grid;
  gap: 10px;
}
.ms-row {
  padding: 14px;
  border: 1px solid var(--ms-line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.025);
}
.ms-row-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.ms-credential {
  margin-top: 10px;
  padding: 12px;
  border-radius: 10px;
  color: #cae6ff;
  background: #030912;
  word-break: break-word;
}
.ms-admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.ms-metrics {
  grid-column: 1/-1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.ms-metric {
  padding: 15px;
  border: 1px solid var(--ms-line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.03);
}
.ms-metric strong {
  display: block;
  font-size: 1.45rem;
}
.ms-inline {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.ms-delivery {
  display: grid;
  gap: 12px;
}
.ms-hidden {
  display: none !important;
}
@media (max-width: 760px) {
  .ms-balance {
    display: none !important;
  }
  .ms-account-button {
    padding: 0 11px;
  }
  .ms-admin-grid {
    grid-template-columns: 1fr;
  }
  .ms-metrics {
    grid-template-columns: 1fr 1fr;
  }
  .ms-actions {
    grid-template-columns: 1fr;
  }
  .ms-modal-body {
    padding: 18px;
  }
  .ms-modal-head {
    padding: 18px;
  }
}

#ms-toast {
  position: fixed;
  z-index: 4000;
  left: 50%;
  bottom: 24px;
  max-width: min(90vw, 520px);
  padding: 12px 18px;
  border: 1px solid rgba(36, 212, 123, 0.4);
  border-radius: 12px;
  color: #eafff5;
  background: #0b3929;
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 15px);
  transition: 0.2s;
}

#ms-toast.show {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

#ms-toast.bad {
  border-color: rgba(255, 101, 122, 0.5);
  background: #4a1520;
}

/* Experiencia de clientes 2.2 */
.header-main-bar { grid-template-columns: 74px minmax(0, 1fr) auto; }
.top-bar-right-elements { gap: 14px; }
.top-bar-right-elements .theme-toggle { flex: 0 0 auto; margin-right: 2px; }
.ms-account-zone { display: flex; flex: 0 0 auto; align-items: center; gap: 11px; padding-left: 14px; border-left: 1px solid rgba(114,164,204,.2); }
.ms-account-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, #087fd0, #055a9f);
}
.ms-account-icon { font-size: 1.1rem; line-height: 1; }
.ms-auth-brand {
  display: grid;
  justify-items: center;
  align-items: center;
  gap: 8px;
  margin: -12px 0 25px;
  text-align: center;
}
.ms-auth-brand img { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 28px rgba(0,153,255,.2); }
.ms-auth-brand strong, .ms-auth-brand span { display: block; }
.ms-auth-brand strong { color: #fff; font-size: 1.35rem; letter-spacing: .16em; }
.ms-auth-brand span { margin-top: 3px; color: #21a9ff; font-size: .8rem; font-weight: 900; letter-spacing: .32em; }
.ms-input-wrap { position: relative; display: flex; align-items: center; }
.ms-input-wrap > span { position: absolute; left: 13px; z-index: 1; color: #7590a8; }
.ms-input-wrap > span + input { padding-left: 39px; }
.ms-password-eye {
  position: absolute;
  right: 8px;
  width: 36px;
  height: 34px;
  border: 0;
  color: #9eb0c2;
  background: transparent;
  cursor: pointer;
}
.ms-input-wrap input[type="password"], .ms-input-wrap input[type="text"] { padding-right: 46px; }
.ms-link-button {
  justify-self: end;
  margin-top: -7px;
  border: 0;
  color: #51b9ff;
  background: transparent;
  font-size: .78rem;
  cursor: pointer;
}
.ms-auth-submit { min-height: 48px; font-size: .93rem; }
.ms-auth-submit.login { background: linear-gradient(135deg, #ff174f, #d90037); box-shadow: 0 8px 23px rgba(255,0,65,.23); }
.ms-auth-alternate { min-height: 48px; border: 0; border-radius: 12px; color: #fff; font-weight: 900; cursor: pointer; }
.ms-auth-alternate.register { background: linear-gradient(135deg, #ff8617, #ff5c00); box-shadow: 0 8px 23px rgba(255,101,0,.2); }
.ms-between-label { margin: -4px 0 -7px; color: #a7b3c0; text-align: center; font-size: .72rem; }
.ms-switch-copy { margin: -4px 0 0; text-align: center; color: var(--ms-muted); font-size: .8rem; }
.ms-switch-copy button { border: 0; color: #51b9ff; background: transparent; font-weight: 800; cursor: pointer; }
.ms-optional { color: var(--ms-muted); font-weight: 500; }
.ms-community, .ms-panel-community { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.ms-community { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--ms-line); }
.ms-community-button, .ms-panel-community a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 8px 11px;
  border-radius: 12px;
  color: white;
  text-align: center;
  text-decoration: none;
  font-size: .82rem;
  font-weight: 850;
}
.ms-community-button { flex-direction: column; }
.ms-community-button small { margin-top: 2px; font-size: .63rem; opacity: .8; }
.ms-community-button.whatsapp { background: linear-gradient(135deg, #20bd67, #128549); }
.ms-community-button.telegram { background: linear-gradient(135deg, #25aee8, #147fb5); }
.is-unconfigured { opacity: .55; }
.ms-profile-row { display: flex; align-items: center; gap: 13px; text-align: left; }
.ms-profile-row .ms-user-avatar { flex: 0 0 auto; margin: 0; }
.ms-profile-row h3 { font-size: 1.05rem; }
.ms-profile-row p { margin: 3px 0 2px; }
.ms-profile-row small { color: #7890a8; }
.ms-wallet-card {
  position: relative;
  display: grid;
  gap: 5px;
  padding: 18px;
  overflow: hidden;
  border: 1px solid rgba(36,212,123,.25);
  border-radius: 17px;
  text-align: left;
  background: linear-gradient(135deg, rgba(15,83,72,.9), rgba(8,43,55,.95));
}
.ms-wallet-card::after { content: "$"; position: absolute; right: 15px; top: -16px; color: rgba(255,255,255,.05); font-size: 6.5rem; font-weight: 950; }
.ms-wallet-card span { color: #9fddc3; font-size: .76rem; font-weight: 750; }
.ms-wallet-card strong { color: #fff; font-size: 1.7rem; }
.ms-wallet-add { position: absolute; z-index: 1; right: 14px; bottom: 16px; padding: 8px 11px; border: 1px solid rgba(255,255,255,.2); border-radius: 10px; color: #fff; background: rgba(255,255,255,.1); font-weight: 800; cursor: pointer; }
.ms-customer-menu { display: grid; gap: 8px; }
.ms-customer-item {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--ms-line);
  border-radius: 13px;
  color: #fff;
  text-align: left;
  background: rgba(255,255,255,.025);
  cursor: pointer;
}
.ms-customer-item > span { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; color: #5bc1ff; background: rgba(0,153,255,.1); }
.ms-customer-item strong, .ms-customer-item small { display: block; }
.ms-customer-item small { margin-top: 3px; color: var(--ms-muted); font-size: .7rem; }
.ms-customer-item > b { color: #70859a; font-size: 1.4rem; }
.ms-panel-community a { border: 1px solid var(--ms-line); background: rgba(0,153,255,.08); font-size: .74rem; }
.ms-logout { min-height: 42px; border: 1px solid rgba(255,101,122,.22); border-radius: 11px; color: #ff8394; background: rgba(255,101,122,.06); font-weight: 800; cursor: pointer; }
.menu-mobile-ul .ms-mobile-account-item { margin-top: 6px; }
.ms-mobile-client-state { display: flex; justify-content: space-between; gap: 10px; padding: 12px 14px 2px; color: #84a397; font-size: .65rem; }
.ms-mobile-client-state strong { color: #31d886; text-align: right; font-size: .72rem; }
.menu-mobile-ul .ms-mobile-account-item button {
  display: block;
  width: 100%;
  padding: 13px 14px;
  border: 1px solid rgba(36,212,123,.24);
  border-radius: 12px;
  color: #fff;
  text-align: left;
  background: rgba(36,212,123,.07);
  cursor: pointer;
}
.menu-mobile-ul .ms-mobile-account-item span,
.menu-mobile-ul .ms-mobile-account-item small { display: block; }
.menu-mobile-ul .ms-mobile-account-item small { margin-top: 3px; color: #8eaa9d; }

@media (max-width: 760px) {
  .header-main-bar { grid-template-columns: 42px minmax(0, 1fr) 42px; }
  .top-bar-right-elements { gap: 0; }
  .ms-account-zone { display: none !important; }
  .ms-modal { width: min(94vw, 430px); border-radius: 18px; }
  .ms-modal-head h2 { font-size: 1.12rem; }
  .ms-community, .ms-panel-community { grid-template-columns: 1fr; }
  .ms-wallet-card strong { font-size: 1.45rem; }
}

#ms-auth { background: radial-gradient(circle at 22% 30%, rgba(0,116,217,.14), transparent 34%), radial-gradient(circle at 82% 74%, rgba(255,31,78,.08), transparent 32%), rgba(0,3,9,.9); }
#ms-auth .ms-modal { width: min(94vw, 390px); border-radius: 15px; background: linear-gradient(150deg, #0b0f15, #06080c 72%); box-shadow: 0 35px 100px rgba(0,0,0,.8), 0 0 0 1px rgba(0,153,255,.05); }
#ms-auth .ms-modal-head { min-height: 48px; padding: 9px 12px 0; border: 0; }
#ms-auth .ms-modal-head h2 { visibility: hidden; font-size: 0; }
#ms-auth .ms-modal-close { margin-left: auto; border-color: rgba(255,255,255,.1); }
#ms-auth .ms-modal-body { padding: 9px 26px 24px; }
#ms-auth .ms-form input { min-height: 44px; border-radius: 4px; background: #101318; }
#ms-auth .ms-community { margin-top: 14px; padding-top: 14px; }
#ms-auth .ms-community-button { min-height: 44px; border-radius: 999px; }

@media (max-width: 420px) {
  #ms-auth { padding: 10px; }
  #ms-auth .ms-modal { width: min(96vw, 390px); max-height: 96dvh; }
  #ms-auth .ms-modal-body { padding: 6px 18px 20px; }
  #ms-auth .ms-auth-brand img { width: 70px; height: 70px; }
  #ms-auth .ms-auth-brand { margin-bottom: 18px; }
}

@media (max-width: 410px) {
  .ms-account-button { font-size: .76rem; }
  .ms-modal-body { padding: 15px; }
  .ms-form { gap: 12px; }
}
