/* Account, listing-management and messaging pages (panel layout, forms, buttons). */
.accounts-service {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--page);
}

.accounts-header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  width: min(1040px, calc(100% - 48px));
  min-height: 76px;
  margin-inline: auto;
}

.accounts-main { width: min(540px, calc(100% - 32px)); margin: clamp(24px, 5vh, 48px) auto 28px; }
.accounts-panel { padding: clamp(22px, 4vw, 36px); border: 1px solid var(--border); border-top: 3px solid var(--ink); border-radius: var(--radius); background: var(--surface); box-shadow: 0 2px 8px #00000004; overflow-wrap: anywhere; }
.accounts-service .accounts-panel { border-top: 1px solid var(--border); border-radius: 4px; box-shadow: none; }
.accounts-service > .site-footer { margin-top: auto; }
.accounts-panel h1 { margin-bottom: 12px; font-size: clamp(25px, 4vw, 30px); font-weight: 700; letter-spacing: -.035em; }
.accounts-panel h2 { margin-block: 24px 12px; font-size: 19px; }
.accounts-panel p { margin-bottom: 18px; font-size: 14px; line-height: 1.65; }
.accounts-panel > :last-child { margin-bottom: 0; }
.accounts-panel .accounts-intro { color: var(--muted); margin-bottom: 24px; }
.accounts-panel .accounts-kicker { margin-bottom: 8px; font-size: 12px; font-weight: 650; color: var(--muted); }
.accounts-panel a:not(.accounts-button) { text-decoration: underline; text-underline-offset: 3px; }
.accounts-panel hr { margin-block: 24px; border: 0; border-top: 1px solid var(--border); }

/* Native Django/as_p and allauth element output share these controls. */
.accounts-panel form { margin: 0; }
.accounts-panel form p, .accounts-field { margin-block: 0 18px; }
.accounts-panel label { display: block; margin-bottom: 6px; color: var(--ink); font-size: 14px; font-weight: 600; }
.accounts-panel input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="range"]),
.accounts-panel select, .accounts-panel textarea { display: block; width: 100%; min-width: 0; max-width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #8a8a8a; border-radius: 4px; background: var(--surface); color: var(--ink); font: inherit; font-size: 16px; line-height: 1.4; }
.accounts-panel input[type="checkbox"], .accounts-panel input[type="radio"] { width: 20px; height: 20px; margin: 12px 8px 12px 0; vertical-align: middle; accent-color: var(--accent-hover); }
.accounts-panel label:has(+ input[type="checkbox"]), .accounts-panel label:has(+ input[type="radio"]),
.accounts-panel input[type="checkbox"] + label, .accounts-panel input[type="radio"] + label { display: inline; font-weight: 400; padding-block: 12px; cursor: pointer; }
.accounts-panel [aria-invalid="true"] { border-color: #a63625 !important; }
.accounts-panel input:disabled { background: var(--page); color: var(--muted); }
.accounts-panel .helptext { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.accounts-panel .helptext ul, .accounts-panel form ul:not(.errorlist) { padding-left: 19px; margin-block: 8px 18px; color: var(--muted); font-size: 12px; line-height: 1.65; }
.accounts-panel .errorlist { margin-block: 8px 12px; padding: 10px 12px; border-left: 3px solid #a63625; border-radius: 3px; font-size: 13px; }
.accounts-panel .errorlist li + li { margin-top: 5px; }
.accounts-panel button, .accounts-panel input[type="submit"], .accounts-panel input[type="button"], .accounts-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; max-width: 100%; padding: 11px 18px; border: 1px solid transparent; border-radius: 4px; background: var(--accent); color: var(--on-accent); font: inherit; font-size: 14px; font-weight: 600; line-height: 1.4; text-align: center; text-decoration: none; cursor: pointer; }
.accounts-panel form > button[type="submit"], .accounts-panel > .accounts-button { width: 100%; }
.accounts-panel form > button + button { margin-top: 8px; }
.accounts-panel button:hover, .accounts-panel input[type="submit"]:hover, .accounts-panel input[type="button"]:hover, .accounts-button:hover { background: var(--accent-hover); color: var(--on-accent); text-decoration: none; }
.accounts-panel .accounts-secondary, .accounts-panel button[name="action_primary"], .accounts-panel button[name="action_remove"] { background: var(--surface); color: var(--ink); border-color: #9a9a9a; }
.accounts-panel .accounts-secondary:hover, .accounts-panel button[name="action_primary"]:hover { background: var(--page); border-color: var(--ink); }
.accounts-panel button[name="action_remove"] { color: #913a29; }
.accounts-panel button[name="action_remove"]:hover { background: #fff1ee; }
.accounts-panel button:disabled { opacity: .65; cursor: not-allowed; }
.accounts-service :focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.accounts-panel button:focus-visible, .accounts-button:focus-visible { box-shadow: 0 0 0 2px var(--surface); }
.accounts-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.accounts-actions > * { flex: 1 1 auto; }
.accounts-alternatives { display: grid; gap: 12px; margin-top: 18px; }
.accounts-panel .accounts-switch { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--border); text-align: center; color: var(--muted); font-size: 13px; }
.accounts-panel .accounts-switch a { display: inline-block; padding-block: 8px; }
.accounts-panel .accounts-fine-print { color: var(--muted); font-size: 12px; line-height: 1.65; }
.accounts-panel .accounts-privacy { margin-top: 18px; }
.accounts-mail-note { margin-block: 22px; padding: 16px 18px; background: var(--page); border-left: 3px solid #b4b4b4; }
.accounts-mail-note h2 { margin: 0 0 8px; font-size: 14px; }
.accounts-mail-note p { margin-bottom: 10px; font-size: 13px; }
.accounts-mail-note p:last-child { margin-bottom: 0; }
.accounts-mail-note code { display: inline; font-size: 12px; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.accounts-email { padding: 12px 14px; background: var(--page); font-weight: 600; overflow-wrap: anywhere; }
.accounts-status { display: inline-block; border-radius: 3px; padding: 3px 8px; font-size: 12px; font-weight: 600; }
.accounts-status-verified { color: #255c40; background: #eaf5ed; }
.accounts-status-pending { color: #72500f; background: #fff5d8; }
.accounts-messages { display: grid; gap: 10px; margin: 0 0 18px; padding: 0; list-style: none; }
.accounts-message { padding: 13px 16px; border: 1px solid #c5d7ed; border-left: 3px solid var(--accent); border-radius: 4px; background: var(--tint); font-size: 13px; overflow-wrap: anywhere; }
.accounts-message.error { color: #913a29; border-color: #dcb3a9; background: #fff1ee; }
.accounts-message.success { color: #255c40; border-color: #b1cbbb; background: #eaf5ed; }
.accounts-message.warning { color: #72500f; border-color: #d9c68d; background: #fff5d8; }

@media (max-width: 600px) {
  .accounts-main { margin-top: 24px; }
}

@media (max-width: 359px) {
  .accounts-panel { padding: 20px; }
}
/* Account page: identity, shortcuts to the personal areas, then grouped settings. */
.accounts-main.account-home { width: min(640px, calc(100% - 32px)); }
.account-head { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; }
.account-head h1 { margin: 0 0 4px; font-size: 24px; }
.account-head p { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; color: var(--muted); font-size: 14px; }
.account-head .accounts-status { text-decoration: none; }
.account-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); gap: 10px; margin-bottom: 28px; }
.accounts-panel .account-tiles a { position: relative; display: grid; justify-items: center; gap: 8px; padding: 16px 8px 14px; border: 1px solid var(--border); border-radius: 8px; color: var(--ink); font-size: 13px; font-weight: 600; text-align: center; text-decoration: none; }
.accounts-panel .account-tiles a:hover { border-color: #aaaaaa; background: var(--page); }
.account-tiles svg { width: 24px; height: 24px; color: var(--ink); }
.account-tiles .menu-badge { position: absolute; top: 8px; right: 8px; }
.account-section { padding-top: 22px; border-top: 1px solid var(--border); }
.account-section + .account-section { margin-top: 28px; }
.account-section h2 { margin: 0 0 16px; font-size: 17px; }
.accounts-name-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 14px; margin-bottom: 18px; }
.accounts-name-row .accounts-field { margin-bottom: 0; }
.accounts-panel .accounts-name-row > .helptext { grid-column: 1 / -1; margin: 6px 0 0; }
.account-rows { display: grid; }
.accounts-panel .account-rows a { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 50px; border-bottom: 1px solid var(--border); color: var(--ink); font-size: 15px; text-decoration: none; }
.accounts-panel .account-rows a:first-child { border-top: 1px solid var(--border); }
.accounts-panel .account-rows a:hover { color: var(--link); }
.account-rows svg { width: 18px; height: 18px; color: var(--muted); }
@media (max-width: 560px) {
  .account-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .accounts-name-row { grid-template-columns: minmax(0, 1fr); }
  .accounts-name-row .accounts-field + .accounts-field { margin-top: 18px; }
  .account-head .account-avatar { width: 48px; height: 48px; font-size: 18px; }
  .account-head h1 { font-size: 21px; }
}

/* Contact form: the trap field stays out of sight and out of the tab order. */
.contact-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.accounts-panel .account-rows a.account-row-danger { color: #913a29; }
.accounts-panel .account-delete-button { width: 100%; border-color: #913a29; background: #913a29; color: #ffffff; }
.accounts-panel .account-delete-button:hover { background: #74291c; color: #ffffff; }
.account-notifications { margin: 4px 0 20px; padding: 0; border: 0; }
.account-notifications legend { margin-bottom: 4px; font-size: 14px; font-weight: 600; }
.accounts-panel .account-check { display: flex; align-items: center; gap: 4px; margin: 0; font-weight: 400; cursor: pointer; }
.accounts-panel .account-check input { flex: none; margin: 10px 8px 10px 0; }
