/* Account pages (individual and organization) and the Employer Dashboard:
   a two-column layout, compact stat strips and calmer cards, matching the
   admin dashboard. Colours are the site's existing tokens and values only. */

/* ---------- page head ---------- */
#accountDashboard.account-dashboard, .account-dashboard { max-width: 1180px; }
#accountDashboard .account-head { display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; margin: 0 0 22px; }
.account-identity { display: flex; align-items: center; gap: 16px; min-width: 0; }
.account-identity > div { min-width: 0; }
.account-initials { flex: none; display: grid; place-items: center; width: 60px; height: 60px; border-radius: 18px; background: var(--green-soft); color: var(--green-dark); font-size: 22px; font-weight: 850; letter-spacing: .02em; }
#accountDashboard .account-head h1 { margin: 2px 0 2px; font-size: 32px; line-height: 1.15; letter-spacing: -.03em; overflow-wrap: anywhere; }
#accountDashboard .account-head p { margin: 0; color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.account-head-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- two columns ---------- */
.account-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.account-main, .account-side { display: grid; gap: 16px; min-width: 0; }
/* The side column scrolls with the page: an open settings form can be taller than the screen. */

/* ---------- cards ---------- */
#accountDashboard .account-panel { margin: 0; padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: 0 8px 22px rgba(34,32,28,.04); }
#accountDashboard .account-panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 12px; }
#accountDashboard .account-panel h2 { margin: 0; font-size: 18px; line-height: 1.3; letter-spacing: 0; }
#accountDashboard .application-note { margin: 0 0 14px; padding: 10px 12px; border-radius: 12px; font-size: 13px; line-height: 1.5; }

/* ---------- stat strips (one card, divided) ---------- */
#accountDashboard .account-stats, #accountDashboard .organization-summary { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 0; margin: 0; border: 1px solid var(--line); border-radius: 16px; background: #fff; overflow: hidden; box-shadow: 0 8px 22px rgba(34,32,28,.04); }
#accountDashboard .account-stat { margin: 0; padding: 16px 18px; border: 0; border-left: 1px solid var(--line); border-radius: 0; background: transparent; color: var(--muted); font-size: 13px; line-height: 1.35; text-align: left; }
#accountDashboard .account-stat:first-child { border-left: 0; }
#accountDashboard .account-stat b { display: block; margin-bottom: 2px; color: var(--ink); font-size: 26px; line-height: 1.15; letter-spacing: -.02em; }
#accountDashboard .account-stat.account-stat-clickable:hover, #accountDashboard .account-stat.account-stat-clickable:focus-visible { background: var(--canvas); box-shadow: none; transform: none; }
#accountDashboard .organization-summary .account-stat span { font-size: 13px; }

/* ---------- application history ---------- */
#accountDashboard .application-list { display: grid; gap: 10px; }
#accountDashboard .application-row { padding: 14px 16px; border-color: var(--line); border-radius: 14px; }
#accountDashboard .application-row h3 { margin: 8px 0 2px; font-size: 16px; }
#accountDashboard .application-org, #accountDashboard .application-meta { font-size: 13px; }
#accountDashboard .application-empty, #accountDashboard .organization-panel-empty { padding: 22px 16px; border: 1px dashed #cfd9d2; border-radius: 14px; color: var(--muted); font-size: 14px; text-align: center; line-height: 1.5; }

/* ---------- activity chart ---------- */
#accountDashboard .activity-chart { min-height: 0; margin-top: 4px; }
#accountDashboard .activity-bars { height: 110px; }
#accountDashboard .activity-empty { margin: 0; font-size: 14px; }

/* ---------- side column ---------- */
#accountDashboard .profile-prompt { display: block; margin: 0; padding: 18px; border-radius: 16px; }
#accountDashboard .profile-prompt h3 { margin: 0 0 4px; font-size: 16px; }
#accountDashboard .profile-prompt p { font-size: 13px; line-height: 1.5; }
#accountDashboard .profile-prompt .btn { width: 100%; margin-top: 14px; }
#accountDashboard .plan-card { margin: 0; padding: 18px; }
#accountDashboard .plan-card-main, #employerRoot .plan-card-main { gap: 12px; }
#accountDashboard .plan-card .plan-card-main { flex-direction: column; }
#accountDashboard .plan-card .plan-card-actions { justify-content: flex-start; width: 100%; }
#accountDashboard .plan-card .plan-card-actions .btn { flex: 1; }
#accountDashboard .plan-card h2 { margin: 4px 0 6px; font-size: 20px; }
#accountDashboard .plan-usage { flex-direction: column; gap: 4px; font-size: 13px; }
#accountDashboard .plan-when { margin: 6px 0 0; font-size: 12px; }
#accountDashboard .organization-account-panel { display: block; padding: 18px; }
#accountDashboard .organization-account-panel h2 { margin: 4px 0 4px; font-size: 20px; overflow-wrap: anywhere; }
#accountDashboard .organization-account-panel p { margin: 0; font-size: 13px; }
#accountDashboard .organization-account-actions { display: grid; margin-top: 14px; }

/* Settings: one card with a short list instead of four large boxes. */
#accountDashboard .settings-menu { gap: 0; }
#accountDashboard .settings-option { padding: 12px 4px; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: transparent; box-shadow: none; transform: none; }
#accountDashboard .settings-option:first-child { border-top: 0; padding-top: 4px; }
#accountDashboard .settings-option:hover { background: transparent; color: var(--green-dark); }
#accountDashboard .settings-option b { font-size: 14px; }
#accountDashboard .settings-option small { font-size: 12px; }
#accountDashboard .account-side .settings-detail .form { grid-template-columns: 1fr; }
#accountDashboard .settings-detail { margin-top: 12px; }
#accountDashboard .seats-panel p { margin: 0 0 10px; font-size: 13px; line-height: 1.5; }
#accountDashboard .device-row { padding: 10px; }

/* ---------- organization jobs and activity ---------- */
#accountDashboard .organization-job-row, #accountDashboard .organization-activity-row { border-color: var(--line); border-radius: 14px; }
#accountDashboard .organization-job-row h3 { font-size: 16px; }

/* ---------- employer dashboard ---------- */
#employerRoot .employer-head { align-items: center; margin-bottom: 18px; }
#employerRoot .employer-head h1 { margin: 2px 0 4px; font-size: 32px; letter-spacing: -.03em; }
#employerRoot .employer-head p { font-size: 14px; }
#employerRoot .employer-kpis { gap: 0; margin: 0 0 16px; border: 1px solid var(--line); border-radius: 16px; background: #fff; overflow: hidden; box-shadow: 0 8px 22px rgba(34,32,28,.04); }
#employerRoot .employer-kpi { padding: 16px 18px; border: 0; border-left: 1px solid var(--line); border-radius: 0; color: var(--muted); font-size: 13px; }
#employerRoot .employer-kpi:first-child { border-left: 0; }
#employerRoot .employer-kpi b { margin-bottom: 2px; color: var(--ink); font-size: 26px; }
/* The plan sits as a slim bar. */
#employerRoot #employerPlan .plan-card { margin: 0; padding: 14px 18px; border-radius: 16px; }
#employerRoot #employerPlan .plan-card-main { align-items: center; }
#employerRoot #employerPlan .plan-card h2 { margin: 2px 0 4px; font-size: 17px; }
#employerRoot #employerPlan .plan-usage, #employerRoot #employerPlan .plan-when { font-size: 13px; }
#employerRoot .employer-panel { margin-top: 16px; padding: 20px; border-color: var(--line); border-radius: 16px; }
#employerRoot .employer-panel h2 { font-size: 18px; }
#employerRoot .employer-job-card { padding: 18px; border-color: var(--line); border-radius: 14px; }
#employerRoot .employer-job-card h3 { font-size: 18px; }
#employerRoot .employer-status { background: #f0ede7; color: #4b5563; }
#employerRoot .employer-status.status-active { background: var(--green-soft); color: var(--green-dark); }
#employerRoot .employer-status.status-expired, #employerRoot .employer-status.status-rejected { background: #fff0ee; color: #8a1c13; }
#employerRoot .employer-status.status-pending_review, #employerRoot .employer-status.status-needs_changes { background: #fdf0e3; color: #8a4513; }
/* Per-job numbers: one divided strip. */
#employerRoot .employer-job-metrics { gap: 0; margin-top: 14px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
#employerRoot .employer-job-metric { padding: 10px 14px; border-left: 1px solid var(--line); border-radius: 0; background: #fcfbf8; }
#employerRoot .employer-job-metric:first-child { border-left: 0; }
#employerRoot .employer-job-metric b { font-size: 20px; }
#employerRoot .employer-job-actions { margin-top: 14px; }

/* ---------- admin account ---------- */
#accountDashboard .account-badge { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px; background: var(--green-soft); color: var(--green-dark); font-size: 12px; font-weight: 800; }
#accountDashboard .account-details { display: grid; }
#accountDashboard .account-detail-row { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); font-size: 14px; line-height: 1.45; }
#accountDashboard .account-detail-row:first-child { border-top: 0; padding-top: 2px; }
#accountDashboard .account-detail-row span { color: var(--muted); }
#accountDashboard .account-detail-row b { font-weight: 650; color: var(--ink); overflow-wrap: anywhere; }
#accountDashboard .account-panel-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
#accountDashboard .account-shortcuts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
#accountDashboard .account-shortcut { position: relative; display: block; width: 100%; padding: 14px 34px 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: #fff; color: var(--ink); text-align: left; cursor: pointer; font: inherit; }
#accountDashboard .account-shortcut:hover, #accountDashboard .account-shortcut:focus-visible { border-color: var(--green); background: var(--canvas); }
#accountDashboard .account-shortcut b { display: block; font-size: 15px; }
#accountDashboard .account-shortcut small { display: block; margin-top: 2px; color: var(--muted); font-size: 13px; line-height: 1.4; }
#accountDashboard .account-shortcut > span { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 22px; line-height: 1; }

/* ---------- my applications page ---------- */
#applicationsRoot .my-applications { max-width: 980px; }
.apps-head { display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; margin: 0 0 22px; }
#applicationsRoot .apps-head h1 { margin: 2px 0 4px; font-size: 32px; line-height: 1.15; letter-spacing: -.03em; }
.apps-head p { margin: 0; color: var(--muted); font-size: 14px; }
.apps-head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.apps-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0 0 20px; border: 1px solid var(--line); border-radius: 16px; background: #fff; overflow: hidden; box-shadow: 0 8px 22px rgba(34,32,28,.04); }
.apps-stat { padding: 16px 18px; border-left: 1px solid var(--line); color: var(--muted); font-size: 13px; line-height: 1.35; }
.apps-stat:first-child { border-left: 0; }
.apps-stat b { display: block; margin-bottom: 2px; color: var(--ink); font-size: 26px; line-height: 1.15; letter-spacing: -.02em; }
.apps-section { margin: 0 0 20px; }
.apps-section-head { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; }
.apps-section-head h2 { margin: 0; font-size: 18px; letter-spacing: 0; }
.apps-section-head span { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px; background: #f0ede7; color: var(--muted); font-size: 12px; font-weight: 800; }
.apps-section-empty { margin: 0; padding: 18px 16px; border: 1px dashed #cfd9d2; border-radius: 14px; color: var(--muted); font-size: 14px; text-align: center; }
#applicationsRoot .my-application-list { display: grid; gap: 10px; margin: 0; border: 0; background: transparent; }
#applicationsRoot .my-application { display: block; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: 0 6px 16px rgba(34,32,28,.03); }
#applicationsRoot .my-application-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; }
#applicationsRoot .my-application-main { min-width: 0; }
#applicationsRoot .my-application-main h3 { margin: 0 0 3px; font-size: 16px; line-height: 1.35; overflow-wrap: anywhere; }
#applicationsRoot .my-application-main h3 a { color: var(--ink); }
#applicationsRoot .my-application-main h3 a:hover { color: var(--green-dark); }
#applicationsRoot .my-application-main span { color: var(--muted); font-size: 13px; }
#applicationsRoot .my-application .stage-pill { flex: none; }
.my-application-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 14px 0 0; }
.my-application-steps span { display: grid; gap: 5px; color: var(--muted); font-size: 12px; }
.my-application-steps i { display: block; height: 5px; border-radius: 999px; background: #ebe7e0; }
.my-application-steps span.done i { background: var(--green); }
.my-application-steps span.done small { color: var(--green-dark); font-weight: 700; }
.my-application-steps small { font-size: 12px; }
#applicationsRoot .my-application-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 16px; margin: 12px 0 0; padding: 10px 0 0; border-top: 1px solid #f0ece6; font-size: 13px; }
.apps-empty { padding: 34px 20px; border: 1px dashed #cfd9d2; border-radius: 16px; background: #fff; text-align: center; }
.apps-empty h2 { margin: 0 0 6px; font-size: 18px; }
.apps-empty p { margin: 0 auto 16px; max-width: 460px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.apps-note { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.apps-note a { color: var(--green-dark); font-weight: 700; }

/* ---------- smaller screens ---------- */
@media (max-width: 980px) {
  .account-layout { grid-template-columns: 1fr; }
  .account-side { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .account-side > #accountSettingsPanel, .account-side > .seats-panel { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .apps-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .apps-stat:nth-child(odd) { border-left: 0; }
  .apps-stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  #accountDashboard .account-shortcuts { grid-template-columns: 1fr; }
  #accountDashboard .account-stats { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #accountDashboard .account-stats .account-stat:nth-child(odd) { border-left: 0; }
  #accountDashboard .account-stats .account-stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  #employerRoot .employer-kpis, #employerRoot .employer-job-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #employerRoot .employer-kpi:nth-child(odd), #employerRoot .employer-job-metric:nth-child(odd) { border-left: 0; }
  #employerRoot .employer-kpi:nth-child(n+3), #employerRoot .employer-job-metric:nth-child(n+3) { border-top: 1px solid var(--line); }
  .account-side { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .apps-head { align-items: flex-start; }
  #applicationsRoot .apps-head h1 { font-size: 26px; }
  .apps-head-actions { width: 100%; }
  .apps-head-actions .btn { flex: 1; }
  #accountDashboard .account-detail-row { grid-template-columns: 1fr; gap: 2px; }
  #applicationsRoot .my-application { padding: 14px; }
  #applicationsRoot .my-application-top { flex-direction: column; gap: 8px; }
  #applicationsRoot .my-application-actions { justify-content: flex-start; }
  .my-application-steps small { font-size: 11px; }
  #accountDashboard .account-head, #employerRoot .employer-head { align-items: flex-start; }
  .account-initials { width: 48px; height: 48px; border-radius: 14px; font-size: 18px; }
  #accountDashboard .account-head h1, #employerRoot .employer-head h1 { font-size: 26px; }
  .account-head-actions { width: 100%; }
  .account-head-actions .btn { flex: 1; }
  #accountDashboard .organization-summary .account-stat { padding: 14px 12px; }
  #accountDashboard .organization-summary .account-stat b { font-size: 22px; }
  #accountDashboard .account-panel, #employerRoot .employer-panel { padding: 16px; }
  #employerRoot #employerPlan .plan-card-main { align-items: stretch; }
}
#accountDashboard .organization-account-actions { justify-content: stretch; }
#accountDashboard .organization-account-actions .btn { width: 100%; }
#employerRoot .employer-job-top .employer-status { align-self: flex-start; width: auto; flex: none; }
