.account-page {
  min-height: 100vh;
  background: var(--surface-subtle);
}

.account-main {
  width: min(100% - 32px, 760px);
  margin: 58px auto 80px;
}

.account-card {
  padding: 42px clamp(24px, 6vw, 68px) 48px;
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.account-card-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
  color: var(--primary);
  background: var(--primary-light);
  border-radius: 50%;
}

.account-eyebrow {
  margin: 0 0 8px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .14em;
}

.account-card h1 {
  margin: 0;
  color: var(--text-dark);
  font-size: clamp(28px, 5vw, 42px);
  letter-spacing: -.03em;
}

.account-intro {
  margin: 12px 0 28px;
  color: var(--text-muted);
  font-size: 16px;
}

.account-status {
  padding: 14px 16px;
  color: var(--text-muted);
  background: var(--surface-subtle);
  border-radius: 12px;
}

.account-error {
  color: #b91c1c;
  background: #fef2f2;
}

.account-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 8px;
  text-align: left;
}

.account-detail-row {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 6px;
  min-height: 66px;
  padding: 14px 16px;
  color: var(--text-dark);
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: 12px;
  line-height: 1.4;
  box-shadow: var(--shadow-sm);
}

.account-detail-row + .account-detail-row {
  border-top: 0;
}

.account-detail-row:nth-child(even) {
  background: var(--surface-card);
}

.account-detail-label {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.account-detail-row strong {
  overflow-wrap: anywhere;
  max-width: 100%;
  font-size: 14px;
  text-align: left;
}

.account-home-link {
  margin-top: 28px;
  text-decoration: none;
}

.account-saved-section {
  margin-top: 30px;
  text-align: left;
}

.account-saved-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.account-saved-heading .account-eyebrow {
  margin-bottom: 4px;
}

.account-saved-heading h2 {
  margin: 0;
  color: var(--text-dark);
  font-size: 22px;
}

.account-saved-hint {
  color: var(--text-muted);
  font-size: 12px;
  text-align: right;
}

.account-saved-jobs {
  display: grid;
  gap: 10px;
}

.account-saved-job {
  padding: 14px 16px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-align: left;
}

.account-saved-job h3 {
  margin: 0;
  color: var(--text-dark);
  font-size: 16px;
}

.account-saved-organization {
  margin: 4px 0 10px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
}

.account-saved-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-muted);
  font-size: 12px;
}

.account-saved-deadline {
  padding: 4px 8px;
  color: var(--primary);
  background: var(--primary-light);
  border-radius: 999px;
  font-weight: 700;
  white-space: nowrap;
}

.account-empty-saved {
  margin: 0;
  padding: 16px;
  color: var(--text-muted);
  background: var(--surface-subtle);
  border: 1px dashed var(--border-strong);
  border-radius: 12px;
  text-align: center;
}

.account-applications-section {
  margin-top: 30px;
  text-align: left;
}

.account-applications {
  display: grid;
  gap: 10px;
}

.account-application {
  padding: 16px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

.account-application h3 {
  margin: 0;
  color: var(--text-dark);
  font-size: 16px;
}

.account-application-details,
.account-application-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-muted);
  font-size: 12px;
}

.account-application-details {
  margin-top: 10px;
}

.account-application-footer {
  align-items: flex-end;
  margin-top: 14px;
}

.account-application-status {
  padding: 5px 9px;
  border-radius: 999px;
  font-weight: 800;
  white-space: nowrap;
}

.account-withdraw-button {
  border: 1px solid #fecaca;
  border-radius: 999px;
  padding: 5px 10px;
  color: #b91c1c;
  background: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.account-withdraw-button:hover {
  background: #fef2f2;
}

.account-withdraw-button:disabled {
  cursor: wait;
  opacity: .65;
}

.account-application-withdrawal {
  margin: 12px 0 0;
  padding: 9px 11px;
  color: #6d28d9;
  background: #f5f3ff;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
}

.account-application-refund {
  color: #166534;
  background: #f0fdf4;
}

.status-applied { color: #0369a1; background: #e0f2fe; }
.status-under_review { color: #6d28d9; background: #ede9fe; }
.status-shortlisted { color: #b45309; background: #fef3c7; }
.status-interview_scheduled { color: #1d4ed8; background: #dbeafe; }
.status-interview_completed { color: #0f766e; background: #ccfbf1; }
.status-offered { color: #a16207; background: #fef9c3; }
.status-hired { color: #15803d; background: #dcfce7; }
.status-rejected { color: #b91c1c; background: #fee2e2; }
.status-withdrawn { color: #475569; background: #e2e8f0; }
.status-payment_pending { color: #a16207; background: #fef3c7; }

@media (max-width: 560px) {
  .account-main {
    width: min(100% - 20px, 760px);
    margin-top: 28px;
  }

  .account-details {
    grid-template-columns: 1fr;
  }

  .account-saved-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .account-saved-hint {
    text-align: left;
  }

  .account-card {
    padding: 32px 18px 36px;
  }

  .account-detail-row {
    display: flex;
    align-items: flex-start;
    gap: 5px;
  }

  .account-detail-row strong {
    max-width: 100%;
    text-align: left;
  }

  .account-application-details,
  .account-application-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Keep account content readable when labels, emails, or job titles are long. */
.account-main,
.account-card,
.account-details,
.account-detail-row,
.account-saved-section,
.account-saved-job,
.account-application {
  min-width: 0;
}

.account-card,
.account-detail-row,
.account-saved-job,
.account-application {
  overflow-wrap: anywhere;
}

.account-saved-meta,
.account-application-details,
.account-application-footer {
  flex-wrap: wrap;
}

@media (max-width: 420px) {
  .account-main {
    width: calc(100% - 16px);
    margin-top: 18px;
    margin-bottom: 48px;
  }

  .account-card {
    padding: 26px 14px 30px;
    border-radius: 16px;
  }

  .account-intro {
    font-size: 14px;
  }

  .account-saved-meta,
  .account-application-details,
  .account-application-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .account-saved-deadline,
  .account-application-status,
  .account-withdraw-button {
    max-width: 100%;
    white-space: normal;
  }
}

