/* ==========================================================================
   Alex vxntas — Cuenta
   Requiere base.css
   ========================================================================== */

.account {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: var(--s-8);
  align-items: start;
  padding: var(--s-9) 0 var(--s-7);
}

/* ==========================================================================
   Presentación
   ========================================================================== */

.account-intro {
  max-width: 520px;
}

/* Esta página no tiene menú: la acción de la cabecera se separa de la marca. */
.header-actions {
  margin-left: auto;
}

.account-intro h1 {
  margin-bottom: var(--s-5);
}

.account-intro .lede {
  font-size: 1rem;
}

/* ==========================================================================
   Panel
   ========================================================================== */

.account-panel {
  padding: var(--s-6);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, rgba(19, 25, 34, 0.97), rgba(10, 13, 19, 0.97));
  box-shadow: var(--shadow-lg);
}

.account-panel .btn {
  min-height: 52px;
}

/* Selector de modo ------------------------------------------------------- */

.mode-switch {
  display: flex;
  gap: 4px;
  margin-bottom: var(--s-5);
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: rgba(5, 8, 12, 0.6);
}

.mode-button {
  flex: 1 1 0;
  padding: 11px 12px;
  border-radius: var(--r-xs);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-align: center;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}

.mode-button:hover {
  color: var(--text);
}

.mode-button.is-active {
  background: linear-gradient(135deg, var(--brand-light), var(--brand-dark));
  color: #fff;
  box-shadow: var(--glow-brand);
}

/* Formulario ------------------------------------------------------------- */

.form-field {
  display: grid;
  gap: 8px;
  margin-top: var(--s-4);
  color: var(--text-soft);
  font-size: 0.82rem;
  font-weight: 600;
}

.form-field input {
  min-height: 52px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: rgba(5, 8, 12, 0.72);
  color: var(--text);
  outline: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.form-field input::placeholder {
  color: var(--text-dim);
  font-weight: 400;
}

.form-field input:focus {
  border-color: rgba(233, 59, 45, 0.7);
  box-shadow: 0 0 0 3px rgba(233, 59, 45, 0.13);
}

#submit-button {
  margin-top: var(--s-5);
}

.form-message {
  min-height: 22px;
  margin-top: var(--s-3);
  color: var(--text-muted);
  font-size: 0.84rem;
  line-height: 1.5;
}

.form-message.is-error {
  color: var(--danger);
}

/* Acceso con Google ------------------------------------------------------ */

.oauth-placeholder {
  display: grid;
  gap: 10px;
  margin-top: var(--s-5);
  padding-top: var(--s-5);
  border-top: 1px solid var(--line);
}

.google-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.google-button:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.3);
}

.g-mark {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.oauth-placeholder small {
  color: var(--text-dim);
  font-size: 0.76rem;
  line-height: 1.5;
}

/* ==========================================================================
   Perfil y pedidos
   ========================================================================== */

.profile-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--s-4);
  margin-bottom: var(--s-5);
  padding-bottom: var(--s-4);
  border-bottom: 1px solid var(--line);
}

.profile-heading h2 {
  font-size: 1.45rem;
}

#profile-email {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 0.86rem;
}

.profile-orders-title {
  margin-bottom: var(--s-3);
  color: var(--text);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.profile-navigation {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s-2);
  margin: 0 0 var(--s-5);
  padding-bottom: var(--s-4);
  border-bottom: 1px solid var(--line);
}

.account-tab {
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  color: var(--text-muted);
  font-size: 0.86rem;
  font-weight: 700;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.account-tab.is-active {
  border-color: var(--brand);
  background: rgba(233, 59, 45, 0.16);
  color: var(--text);
}

.profile-section {
  min-width: 0;
}

.wallet-summary {
  display: grid;
  gap: 4px;
  margin-bottom: var(--s-4);
  padding: var(--s-5);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: rgba(5, 8, 12, 0.55);
}

.wallet-summary span,
.wallet-summary small,
.account-settings-copy {
  color: var(--text-muted);
  font-size: 0.86rem;
}

.wallet-summary strong {
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.8rem;
}

.wallet-history-title {
  margin: var(--s-5) 0 var(--s-3);
  font-size: 0.95rem;
}

.wallet-transaction strong {
  color: var(--lime);
}

.wallet-transaction.is-debit strong {
  color: var(--danger);
}

.account-settings-copy {
  margin-bottom: var(--s-3);
}

#password-submit {
  margin-top: var(--s-5);
}

.orders-list {
  display: grid;
  gap: 8px;
}

.order-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: rgba(17, 22, 30, 0.72);
}

.order-row span {
  color: var(--text-muted);
  font-size: 0.84rem;
  overflow-wrap: anywhere;
}

.order-row div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.order-row small {
  color: var(--text-dim);
  font-size: 0.75rem;
}

.order-row strong {
  flex: 0 0 auto;
  font-size: 0.84rem;
  white-space: nowrap;
}

.empty-orders {
  padding: var(--s-5);
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-sm);
  color: var(--text-muted);
  font-size: 0.86rem;
  text-align: center;
}

.is-hidden {
  display: none !important;
}

/* ==========================================================================
   Adaptación
   ========================================================================== */

@media (max-width: 960px) {
  .account {
    grid-template-columns: 1fr;
    gap: var(--s-6);
    padding-top: var(--s-7);
  }

  .account-intro {
    max-width: none;
  }
}

@media (max-width: 560px) {
  .header-inner.shell {
    gap: var(--s-3);
  }

  .account-panel {
    padding: var(--s-5) var(--s-4);
  }

  .profile-heading {
    display: grid;
  }

  .order-row {
    display: grid;
    gap: 6px;
  }

  .order-row strong {
    white-space: normal;
  }
}
