/* Scope everything to .account-page so navbar styles are untouched */
.account-page .account-container {
  min-height: 80vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #f9fafb;
  padding: 2rem;
}

.account-page .account-card {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  padding: 2.5rem;
  max-width: 500px;
  width: 100%;
  text-align: center;
}

.account-page .account-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: #0d2b2c;
  margin-bottom: 0.5rem;
}

.account-page .account-subtitle {
  font-size: 1rem;
  color: #666;
  margin-bottom: 2rem;
}

.account-page .account-info {
  text-align: left;
  margin-bottom: 2rem;
}

.account-page .info-row {
  display: flex;
  justify-content: space-between;
  padding: 0.6rem 0;
  border-bottom: 1px solid #e5e5e5;
}

.account-page .label {
  font-weight: 600;
  color: #0d2b2c;
}

.account-page .value {
  color: #333;
  text-align: right;
}

.account-page .value.incomplete {
  color: #d9534f; /* danger red */
  font-style: italic;
}

/* Buttons row */
.account-page .account-actions {
  display: flex;
  justify-content: center;
  align-items: stretch;
  flex-wrap: nowrap;
  gap: 1rem;
}

/* Two-column variant for action rows that have two controls */
.account-page .account-actions--two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  gap: 1rem;
}

/* Make the form flex like the link so both occupy equal width */
.account-page .account-actions--two .logout-form { margin: 0; display: contents; }

/* Force equal column widths for both children */
.account-page .account-actions--two > * { width: 100%; }

/* Ensure inner controls fill their columns */
.account-page .account-actions--two .btn-primary,
.account-page .account-actions--two .logout-form button {
  width: 100%;
  display: block;
}

/* Attention pulse for the Complete Details button */
.account-page .btn-attn { position: relative; }
.account-page .btn-attn::after {
  content: "";
  position: absolute;
  top: -8px;
  right: -8px;
  width: 14px;  /* was 10px */
  height: 14px; /* was 10px */
  background: #f97316; /* amber */
  border-radius: 50%;
  box-shadow: 0 0 0 2px #fff;
}
.account-page .btn-attn::before {
  content: "";
  position: absolute;
  top: -12px;
  right: -12px;
  width: 22px;  /* was 16px */
  height: 22px; /* was 16px */
  border-radius: 9999px;
  border: 2px solid rgba(249, 115, 22, 0.45);
  animation: nav-attn-ping 1.6s cubic-bezier(0.2, 0, 0.2, 1) infinite;
}

@media (prefers-reduced-motion: reduce) {
  .account-page .btn-attn::before { animation: none; }
}

/* Unified buttons (scoped) */
.account-page .btn-primary,
.account-page .logout-form button {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 3rem;
  min-width: 140px;
  padding: 0.9rem 1rem;
  box-sizing: border-box;

  border: none;
  border-radius: 8px;
  background: #155e63;
  color: #fff;

  font-size: 1rem;
  line-height: 1.2;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;

  transition: background 0.25s, transform 0.15s;
}

.account-page .btn-primary:hover,
.account-page .logout-form button:hover {
  background: #124f54;
  transform: translateY(-1px);
}

/* Ensure the form behaves as a flex child */
.account-page .logout-form {
  flex: 1;
  margin: 0;
  display: flex;
}

/* Mobile: stack vertically */
@media (max-width: 768px) {
  .account-page .account-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .account-page .btn-primary,
  .account-page .logout-form button {
    width: 100%;
  }
}

/* ===== Password Reset Styling ===== */
.account-page .password-reset-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-align: left;
}

.account-page .password-reset-form input[type="email"] {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
  box-sizing: border-box;
}

.account-page .password-reset-form input[type="email"]:focus {
  outline: none;
  border-color: #155e63;
  box-shadow: 0 0 0 2px rgba(21, 94, 99, 0.2);
}

/* Button matches your green theme */
.account-page .password-reset-form button {
  background: #155e63;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  padding: 0.9rem;
  cursor: pointer;
  transition: background 0.25s, transform 0.15s;
}

.account-page .password-reset-form button:hover {
  background: #124f54;
  transform: translateY(-1px);
}

/* Back link below form */
.account-page .back-to-login {
  margin-top: 1.5rem;
  text-align: center;
}

.account-page .back-to-login a {
  color: #155e63;
  font-weight: 600;
  text-decoration: none;
}

.account-page .back-to-login a:hover {
  text-decoration: underline;
}


/* ===== Password Reset Done Page ===== */
.account-page .email-icon {
  display: flex;
  justify-content: center;
  margin: 2rem 0 1rem 0;
}


.account-page .email-icon img {
  width: 74px;
  height: 74px;
  opacity: 0.8;
}

.account-page .account-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: #155e63;
  margin-bottom: 0.8rem;
}

.account-page .account-subtitle {
  font-size: 1rem;
  color: #333;
  line-height: 1.6;
  margin-bottom: 1.8rem;
  text-align: center;
}

.account-page .back-to-login a {
  color: #155e63;
  font-weight: 600;
  text-decoration: none;
}

.account-page .back-to-login a:hover {
  text-decoration: underline;
}


/* ===== Password Reset (Set New Password Page) ===== */
.account-page .account-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 80vh;
  padding: 1.5rem;
}

.account-page .account-card {
  background: #fff;
  padding: 2rem 1.8rem;
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  max-width: 420px;
  width: 100%;
  text-align: center;
}

.account-page .email-icon {
  margin: 0.3rem 0 0.7rem;
}

.account-page .email-icon img {
  width: 50px;
  height: auto;
  display: block;
  margin: 0 auto;
  opacity: 0.9;
}

.account-page .account-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: #155e63;
  margin-bottom: 0.6rem;
}

.account-page .account-subtitle {
  font-size: 0.95rem;
  color: #333;
  line-height: 1.5;
  margin-bottom: 1.2rem;
}

.account-page form p {
  text-align: left;
  margin-bottom: 0.9rem;
}

.account-page input[type="password"] {
  width: 100%;
  padding: 0.85rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
  box-sizing: border-box;
}

.account-page input[type="password"]:focus {
  border-color: #155e63;
  box-shadow: 0 0 0 3px rgba(21, 94, 99, 0.2);
  outline: none;
}

.account-page .btn-primary {
  width: 100%;
  margin-top: 1rem;
  padding: 0.9rem;
  background: #155e63;
  color: white;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.account-page .btn-primary:hover {
  background: #124f54;
}


.form-input {
  width: 100%;
  padding: 0.9rem 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
  margin-bottom: 1rem;
  box-sizing: border-box;
}

.form-input:focus {
  border-color: #155e63;
  box-shadow: 0 0 0 3px rgba(21,94,99,0.2);
  outline: none;
}

/* hide labels but keep spacing */
form p > label {
  display: none;
}

form p {
  margin-bottom: 1rem;
}

form input[type="password"] {
  width: 100%;
  padding: 0.9rem 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
  box-sizing: border-box;
}

form input[type="password"]:focus {
  border-color: #155e63;
  box-shadow: 0 0 0 3px rgba(21,94,99,0.2);
  outline: none;
}

/* Make sure password inputs are always visible */
input[type="password"] {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  width: 100%;
  padding: 0.9rem 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
  margin-top: 0.5rem;
}

/* Fix potential layout conflicts */
.form-group {
  margin-bottom: 1rem;
  display: block;
}

/* Form grid for complete profile */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1rem;
  margin-bottom: 1rem;
}

.form-grid .form-span {
  grid-column: 1 / -1;
}

.btn-secondary {
  display: inline-block;
  background: #e5e7eb;
  color: #111827;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  padding: 0.8rem 1.2rem;
  text-decoration: none;
}

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

/* Error message styling */
.errorlist {
  color: #d9534f;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.btn-primary {
  background-color: #155e63;
  color: white;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  padding: 0.8rem 1.5rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
  width: 100%;
}

.btn-primary:hover {
  background-color: #0b3c3f;
}


/* Show field-level errors properly */
ul.errorlist {
  list-style: none;
  margin: 0.3rem 0 0.4rem 0;
  padding: 0;
  color: #d9534f;
  font-size: 0.9rem;
  text-align: left;
}

ul.errorlist:empty {
  display: none;
}

/* Ensure equal-width buttons inside account actions (override global .btn-primary width) */
.account-page .account-actions .btn-primary,
.account-page .account-actions .logout-form button {
  width: auto; /* allow flex-basis to control width */
}

/* Force equal flex sizing for both children (link + form) */
.account-page .account-actions > * {
  flex: 1 1 0;
  display: flex;
}

/* Make inner controls fill their flex item width */
.account-page .account-actions > a.btn-primary {
  width: 100%;
}
.account-page .account-actions .logout-form button {
  width: 100%;
}

/* Remove extra top margin that pushes the left button down */
.account-page .account-actions .btn-primary,
.account-page .account-actions .logout-form button {
  margin-top: 0;
}
