/* Keep styles minimal and in the same design language as global/listing */
.acct-pad { padding: 16px; }
.acct-h2 { margin: 0 0 10px; font-size: 18px; }
.acct-h3 { margin: 0 0 10px; font-size: 16px; }

.acct-avatar-row { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.acct-avatar { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; background: #f1f5f9; border: 1px solid #e5e7eb; }
.acct-avatar-ctas { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.acct-kv {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 720px) { .acct-kv { grid-template-columns: 1fr; } }
.acct-span-2 { grid-column: 1 / -1; }

.acct-field span { display: block; font-size: 12px; color: var(--muted,#6b7280); margin-bottom: 4px; }
.acct-field input,
.acct-field textarea,
.acct-field select {
  width: 100%;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 10px;
}

.acct-actions {
  display: flex; gap: 8px; align-items: center; margin-top: 14px;
}
.acct-actions #saveNote { margin-left: auto; font-size: 12px; }

.acct-preview { display: flex; gap: 12px; align-items: flex-start; }
.acct-name { font-weight: 600; }
.acct-preview-about { white-space: pre-wrap; }

.acct-note { font-size: 12px; margin-top: 4px; }

/* Make controls inherit the site font (Poppins from global.css) */
input, textarea, select, button { font: inherit; }

/* Match the listing page spacing between stacked cards */
.main .card + .card { margin-top: 12px; }
.aside .card + .card { margin-top: 12px; }

/* Ensure consistent gap between columns (in case listing.css isn't loaded for any reason) */
.layout { gap: 20px; }

/* Sticky preview/billing offset (so it doesn't kiss the top) */
.acct-sticky { position: sticky; top: 16px; }

/* Form grid + spacing */
.acct-form .row { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
@media (max-width:900px){ .acct-form .row { grid-template-columns:1fr; } }

.acct-field { margin-bottom:12px; }
.acct-form label { display:block; font-weight:600; margin-bottom:6px; }

/* Make controls sane-sized and non-overlapping */
.acct-form input[type="text"],
.acct-form input[type="email"],
.acct-form input[type="tel"],
.acct-form input[type="url"],
.acct-form input[type="file"],
.acct-form select,
.acct-form textarea {
  width:100%;
  box-sizing:border-box;
  min-height:42px;
  padding:10px 12px;
  border:1px solid #e5e7eb;
  border-radius:10px;
  line-height:1.35;
  font:inherit;             /* ensures Poppins */
}
.acct-form textarea { min-height:96px; resize:vertical; }

/* Ensure stacked card spacing is even */
.main .card + .card { margin-top:12px; }
.aside .card + .card { margin-top:12px; }

/* --- Account form: compact controls + no overlap --- */
#acctForm { --field-gap: 12px; --control-h: 38px; }

/* Make grids behave and never overflow */
#acctForm .grid,
#acctForm .row,
#acctForm .form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--field-gap);
}
@media (max-width: 980px) {
  #acctForm .grid,
  #acctForm .row,
  #acctForm .form-grid { grid-template-columns: 1fr; }
}
/* If you have a 4-up row (e.g., region/country/postal), it will collapse nicely */
#acctForm .row-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--field-gap); }
@media (max-width: 980px) { #acctForm .row-4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 680px) { #acctForm .row-4 { grid-template-columns: 1fr; } }

/* Prevent children from pushing out of the grid */
#acctForm .grid > *,
#acctForm .row > *,
#acctForm .form-grid > * { min-width: 0; }

/* Labels + controls */
#acctForm label { display:block; font-size:13px; margin:0 0 6px; }
#acctForm input,
#acctForm select,
#acctForm textarea {
  display:block;
  width:100%;
  height:auto;
  min-height: var(--control-h);
  padding: 9px 12px;
  border:1px solid #e5e7eb;
  border-radius: 10px;
  box-sizing: border-box;
  /* Match the rest of the site */
  font: 14px/1.4 "Poppins", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
#acctForm textarea { min-height: 104px; resize: vertical; }

/* Avatar file input keeps a sane size */
#acctForm input[type="file"] { min-height: unset; padding: 6px 0; }

/* Ensure the little preview card is NOT sticky */
.acct-preview { position: static !important; top: auto !important; }
