.account-page {
  min-height: 100vh;
  background: #f3f8f2;
}

.account-header { min-height: 5.35rem; }
.account-header .account-navigation { grid-column: -2 / -1; grid-row: 1; }

.account-layout {
  display: grid;
  grid-template-columns: .96fr 1fr;
  align-items: stretch;
  max-width: 66rem;
  min-height: min(38.5rem, calc(100vh - 8.5rem));
  margin-block: .75rem 2.5rem;
  overflow: hidden;
  border: 1px solid #dce4d9;
  border-radius: 1.35rem;
  background: var(--white);
  box-shadow: 0 1.5rem 4rem #102e2410;
}

.account-layout-signup {
  grid-template-columns: minmax(15rem, .78fr) minmax(0, 1.35fr);
  max-width: 72rem;
}
.account-layout-signup .account-story { justify-content: flex-start; }
.signup-journey h3 { font-size: 1.17rem; }
.signup-journey ol { display: grid; gap: .8rem; margin: 1rem 0 0; padding-inline-start: 1.35rem; color: #e4eee3; line-height: 1.5; }
.signup-journey li { padding-inline-start: .3rem; }
.signup-journey li::marker { color: var(--lime); font-weight: 750; }

.account-story {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2rem;
  padding: clamp(2rem, 5vw, 4rem);
  color: var(--white);
  background:
    radial-gradient(ellipse at 0 100%, #315e46 0, transparent 65%),
    radial-gradient(ellipse at 100% 0, #25513e 0, transparent 65%),
    var(--green);
}
.account-story .eyebrow { margin-bottom: .85rem; }
.account-story h2 { max-width: 11ch; font-size: clamp(2.4rem, 4.1vw, 3.85rem); line-height: .98; }
.account-story-copy > p:last-child { margin: 1.05rem 0 0; color: #e4eee3; line-height: 1.55; }

.account-receipt {
  width: min(100%, 22rem);
  padding: 1.1rem 1.15rem;
  color: var(--green);
  background: #f9fcf5;
  border-radius: .75rem;
  box-shadow: 0 1.1rem 2.5rem #071e15a0, 0 0 0 .35rem #e3f8d322;
}
.account-receipt-header, .account-receipt dl > div, .account-receipt-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}
.account-receipt-header { font-weight: 750; }
.account-receipt-header span:last-child { color: #486454; font-size: .875rem; font-weight: 600; }
.account-receipt dl { margin: .75rem 0; }
.account-receipt dl > div { padding-block: .55rem; border-bottom: 1px solid var(--line); font-size: .92rem; }
.account-receipt dd { margin: 0; font-variant-numeric: tabular-nums; }
.account-receipt-total { padding: .65rem .75rem; border-radius: .4rem; background: #eaf4df; font-weight: 700; }

.account-panel { align-self: center; min-width: 0; padding: clamp(2rem, 5vw, 4.1rem); }
.account-panel h1 { margin-bottom: .75rem; font-size: clamp(2rem, 3.3vw, 3rem); line-height: 1.03; }
.account-intro, .account-switch, .field-help { color: var(--muted); line-height: 1.55; }
.account-intro { margin: 0 0 1.65rem; overflow-wrap: anywhere; }
.account-notice {
  margin: 0 0 1.25rem;
  padding: .78rem .9rem;
  border: 1px solid #dce6ce;
  border-radius: .55rem;
  background: #f0f6e9;
  color: #34533f;
  font-size: .94rem;
  line-height: 1.45;
}
.account-form { display: grid; gap: 1rem; }
.account-fieldset { min-inline-size: 0; margin: 0 0 .35rem; padding: 0; border: 0; }
.account-fieldset legend { margin-bottom: .78rem; padding: 0; font-size: 1.13rem; font-weight: 800; }
.account-field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: .85rem 1rem; }
.account-field-wide { grid-column: 1 / -1; }
.account-field { display: grid; gap: .42rem; }
.account-field label { font-weight: 700; }
.account-field input, .account-field select {
  width: 100%;
  min-height: 3.15rem;
  padding: .6rem .75rem;
  border: 1px solid #abbcaf;
  border-radius: .52rem;
  background: var(--white);
  color: var(--green);
  font: inherit;
}
.account-field input:disabled, .account-field select:disabled { background: #f6f8f4; }
.account-field [aria-invalid="true"] { border-color: #a7373d; }
.barangay-lookup-error { margin-top: .45rem; }
.barangay-retry {
  padding: .35rem 0;
  border: 0;
  background: transparent;
  color: #225c3e;
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}
.password-control { position: relative; }
.password-control input { padding-right: 4.4rem; }
.password-toggle {
  position: absolute;
  inset: .25rem .3rem .25rem auto;
  padding-inline: .6rem;
  border: 0;
  border-radius: .3rem;
  background: transparent;
  color: #2b6547;
  font: inherit;
  font-size: .875rem;
  font-weight: 750;
  cursor: pointer;
}
.password-toggle:hover { background: #eef3ea; }
.account-reset-link { justify-self: end; }
.account-panel a:not(.button) { color: #225c3e; font-weight: 700; text-underline-offset: .22em; }
.account-submit { width: 100%; border: 0; font: inherit; font-weight: 750; cursor: pointer; }
.account-submit:disabled { color: #3f5146; background: #e6eee1; cursor: default; }
.account-switch { margin: 1.5rem 0 0; }
.field-help { margin: 0; font-size: .9rem; }
.account-errors { color: #9a2536; font-size: .94rem; line-height: 1.45; }
.account-errors ul { margin: 0; padding: 0; list-style: none; }

.account-layout-activity { grid-template-columns: minmax(0, 1fr); max-width: 72rem; min-height: 0; }
.account-layout-activity .account-panel { padding: clamp(1.25rem, 3vw, 3rem); }
.activity-heading, .activity-filters, .activity-pagination {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: .65rem 1.2rem;
}
.activity-heading { justify-content: space-between; }
.activity-filters { margin: .75rem 0 1.25rem; }
.activity-filters a { padding: .45rem .65rem; border-radius: .45rem; }
.activity-filters [aria-current="page"] { background: #eaf4df; text-decoration: none; }
.activity-table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: .6rem; }
.activity-table { width: 100%; min-width: 52rem; border-collapse: collapse; text-align: left; }
.activity-table th, .activity-table td { padding: .8rem; vertical-align: top; overflow-wrap: anywhere; }
.activity-table th { background: #f0f6e9; font-size: .9rem; }
.activity-table td { border-top: 1px solid var(--line); font-size: .92rem; line-height: 1.45; }
.activity-table time { white-space: nowrap; }
.activity-pagination { margin-top: 1.1rem; }
.activity-source { margin: 1.15rem 0 0; font-size: .85rem; }

@media (max-width: 48rem) {
  .account-header { min-height: 4.7rem; }
  .account-header .site-navigation { display: none; }
  .account-layout { grid-template-columns: minmax(0, 1fr); max-width: 30rem; min-height: 0; }
  .account-story { display: none; }
  .account-panel { padding: clamp(1.25rem, 6vw, 2.4rem); }
  .store-location-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 38rem) {
  .account-field-grid { grid-template-columns: minmax(0, 1fr); }
}

.back-office-layout {
  grid-template-columns: minmax(12rem, .65fr) minmax(0, 2fr);
  align-items: start;
  gap: 1.5rem;
}
.back-office-layout .account-panel { width: 100%; min-width: 0; }
.back-office-nav {
  display: grid;
  gap: .75rem;
  padding: 1.25rem;
  border: 1px solid #cad8cc;
  border-radius: 1rem;
  background: #fff;
  color: #102e24;
}
.back-office-nav h2, .back-office-nav p { margin: 0; overflow-wrap: anywhere; }
.back-office-nav nav { display: grid; gap: .25rem; }
.back-office-nav nav a { padding: .65rem .75rem; border-radius: .5rem; }
.back-office-nav nav a[aria-current="page"] { background: #dcf5d7; color: #096223; font-weight: 700; }
.back-office-list { margin: 1rem 0 1.5rem; padding: 0; list-style: none; }
.back-office-list > * {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .5rem 1rem;
  border-bottom: 1px solid #cad8cc;
  padding: .75rem 0;
  overflow-wrap: anywhere;
}
.back-office-list dd { margin: 0; font-weight: 700; }
@media (max-width: 740px) {
  .back-office-layout { grid-template-columns: 1fr; }
  .back-office-nav nav { grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); }
}

.owner-steps { padding-inline-start: 1.25rem; line-height: 1.65; }
.owner-overview { display: grid; gap: 1rem; }
.owner-overview section { padding-top: 1rem; border-top: 1px solid #cad8cc; }
.owner-overview h2 { margin: 0; font-size: 1.15rem; }
.owner-overview p { margin: .3rem 0 .5rem; color: var(--muted); }

.role-guide { margin: 0 0 1rem; }
.role-guide summary { cursor: pointer; font-weight: 700; }
.role-guide dl { display: grid; gap: .55rem; padding-inline-start: 1rem; }
.role-guide dt { font-weight: 700; }
.role-guide dd { margin: 0; color: var(--muted); }

.account-story { background: linear-gradient(145deg, #123e26, #087c2c); }
.account-panel .button:disabled { background: #e1e9df; color: #526058; }

.idle-dialog {
  width: min(28rem, calc(100% - 2rem));
  padding: 1.5rem;
  border: 1px solid #dbe7da;
  border-radius: 1rem;
  color: #131b20;
  background: #fff;
}
.idle-dialog::backdrop { background: #131b20a8; }
.idle-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .65rem; }
.idle-dialog [data-countdown] { font-variant-numeric: tabular-nums; }
.idle-dialog [data-idle-error] { color: #9c271e; }

.resend-code-button { gap: .25rem; }
.resend-code-button:disabled {
  cursor: not-allowed;
  border-color: #d5ded3;
  background: #f0f4ef;
  color: #56645a;
}
.resend-code-button [data-resend-seconds] { font-variant-numeric: tabular-nums; }

.staff-page-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; }
.staff-page-heading h1 { margin: 0; }
.staff-credentials code { overflow-wrap: anywhere; }

.staff-function-list { padding: 1rem; border: 1px solid #dbe7da; border-radius: .75rem; }
.staff-function-list legend { padding-inline: .35rem; }
.staff-function-list .field-help { margin: 0 0 .65rem; }
.staff-function-option label { display: flex; align-items: center; gap: .6rem; min-height: 2.5rem; }
.staff-function-option input { width: 1.05rem; height: 1.05rem; accent-color: #087c2c; }

.staff-credentials > div { align-items: center; }
.staff-credentials dd:has(.staff-secret) { flex: 1 1 15rem; max-width: 20rem; }
.staff-secret input { width: 100%; padding: .65rem 3rem .65rem .7rem; border: 1px solid #cad8cc; border-radius: .5rem; font: inherit; }
.staff-secret .password-toggle { min-width: 2.75rem; }
.staff-secret .secret-eye-closed, .staff-secret [aria-pressed="true"] .secret-eye-open { display: none; }
.staff-secret [aria-pressed="true"] .secret-eye-closed { display: inline-block; }
