/* Accounts pages  --  centered card on the shared checkout-chrome header.
   Reuses tokens from styles.css and the chrome from service-payment.css. */

.auth-main {
  padding: 2.5rem 0 4rem;
  min-height: 60vh;
}

.auth-card {
  max-width: 440px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-card);
}

.auth-card h1 {
  margin: 0 0 0.4rem;
  font-family: "Plus Jakarta Sans", "Manrope", sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-dark);
}

.auth-card__intro {
  margin: 0 0 1.5rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.auth-field label {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 600;
}

.auth-field input {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
  font-size: 0.95rem;
  color: var(--text-dark);
  background: #ffffff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-field input:focus {
  outline: none;
  border-color: var(--brand-secondary);
  box-shadow: var(--focus-ring);
}

.auth-submit {
  width: 100%;
  min-height: 48px;
  font-size: 1rem;
  margin-top: 0.25rem;
}

.auth-submit:disabled {
  opacity: 0.7;
  cursor: progress;
  transform: none !important;
}

.auth-message {
  margin: 0;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
}

.auth-message--error {
  background: rgba(184, 66, 61, 0.08);
  border: 1px solid rgba(184, 66, 61, 0.3);
  color: #b8423d;
}

.auth-message--success {
  background: rgba(var(--primary-rgb), 0.16);
  border: 1px solid rgba(var(--primary-rgb), 0.4);
  color: var(--deep-teal-strong);
}

.auth-alt {
  margin: 1.25rem 0 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
  color: var(--muted);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.auth-alt a {
  color: var(--deep-teal);
  font-weight: 700;
}

.auth-alt a:hover {
  color: var(--deep-teal-strong);
}

.auth-account-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line);
}

.auth-account-row:last-of-type {
  border-bottom: none;
}

.auth-account-row dt {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.9rem;
}

.auth-account-row dd {
  margin: 0;
  color: var(--text-dark);
  font-weight: 700;
}

.auth-disabled-note {
  max-width: 440px;
  margin: 2rem auto;
  text-align: center;
  color: var(--muted);
}

/* Account dashboard ----------------------------------------------------- */

.account-shell { max-width: 980px; margin: 0 auto; }

.account-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.account-head .kicker {
  display: inline-block;
  padding: 0.3rem 0.78rem;
  background: rgba(var(--primary-rgb), 0.18);
  color: var(--deep-teal);
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.account-head h1 {
  margin: 0.45rem 0 0;
  font-family: "Plus Jakarta Sans", "Manrope", sans-serif;
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1.15;
}

.account-head__email { color: var(--muted); font-weight: 600; }

.account-logout {
  background: transparent;
  border: 1px solid rgba(var(--textdark-rgb), 0.2);
  color: var(--text-dark);
  border-radius: 999px;
  padding: 0.6rem 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.account-logout:hover { border-color: rgba(var(--textdark-rgb), 0.4); background: var(--background-soft); }

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

@media (max-width: 720px) { .account-grid { grid-template-columns: 1fr; } }

.account-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.account-card--wide { grid-column: 1 / -1; }

.account-card__title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  font-family: "Plus Jakarta Sans", "Manrope", sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-dark);
}

.account-card__title svg {
  width: 20px; height: 20px; flex: 0 0 auto;
  fill: none; stroke: var(--deep-teal); stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}

.account-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.4rem;
  padding: 1.4rem 0.5rem 0.6rem;
  color: var(--muted);
}

.account-empty svg {
  width: 38px; height: 38px;
  fill: none; stroke: var(--brand-secondary); stroke-width: 1.5;
  stroke-linecap: round; stroke-linejoin: round; opacity: 0.7;
}

.account-empty p { margin: 0; font-size: 0.92rem; }

.account-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

.account-action {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 700;
  font-size: 0.92rem;
  background: #ffffff;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.account-action:hover {
  border-color: rgba(var(--secondary-rgb), 0.6);
  transform: translateY(-1px);
  box-shadow: var(--shadow-card);
}

.account-action svg {
  width: 18px; height: 18px; flex: 0 0 auto;
  fill: none; stroke: var(--deep-teal); stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}

.account-card__link {
  align-self: flex-start;
  color: var(--deep-teal);
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}

.account-card__link:hover { color: var(--deep-teal-strong); }

.account-soon {
  display: inline-block;
  align-self: flex-start;
  margin-top: -0.2rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: rgba(var(--textdark-rgb), 0.08);
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Lists (orders + addresses) */
.account-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.account-list__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
}

.account-list__item:last-child { border-bottom: none; }

.account-list__title {
  margin: 0;
  font-weight: 700;
  color: var(--text-dark);
  font-size: 0.97rem;
}

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

.account-list__amount {
  flex: 0 0 auto;
  font-weight: 800;
  color: var(--text-dark);
}

.account-list__remove {
  flex: 0 0 auto;
  background: transparent;
  border: none;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.account-list__remove:hover { color: #b8423d; }

/* Address form */
.account-addr-form {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.account-addr-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

.account-addr-grid input {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.65rem 0.8rem;
  font-size: 0.92rem;
  color: var(--text-dark);
  background: #ffffff;
  width: 100%;
}

.account-addr-grid input:focus {
  outline: none;
  border-color: var(--brand-secondary);
  box-shadow: var(--focus-ring);
}

/* line1 + line2 span full width for readability */
.account-addr-grid input#addr-line1,
.account-addr-grid input#addr-line2 { grid-column: 1 / -1; }

@media (max-width: 560px) {
  .account-addr-grid { grid-template-columns: 1fr; }
  .account-addr-grid input { grid-column: 1 / -1; }
}

/* Editable profile */
.account-card__hint {
  margin: -0.2rem 0 0.4rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.account-profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.account-field--full { grid-column: 1 / -1; }

.account-profile-grid input:disabled {
  background: var(--background-soft);
  color: var(--muted);
  cursor: not-allowed;
}

.account-profile-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.2rem;
}

.account-profile-since {
  color: var(--muted);
  font-size: 0.85rem;
  margin-left: auto;
}

@media (max-width: 560px) {
  .account-profile-grid { grid-template-columns: 1fr; }
  .account-profile-since { margin-left: 0; }
}
