/* Heart 2 Heart Customer Invoices — standalone module styles */
.h2h-billing { --h2h-teal:#0f766e; --h2h-teal-dark:#115e59; --h2h-ink:#0f172a; --h2h-muted:#64748b; --h2h-border:#e2e8f0; --h2h-bg:#f8fafc; }
.h2h-billing .h2h-page-header { display:flex; flex-wrap:wrap; gap:1rem; align-items:center; justify-content:space-between; margin-bottom:1.25rem; }
.h2h-billing .h2h-page-header__brand { display:flex; gap:.85rem; align-items:center; }
.h2h-billing .h2h-page-header__brand img { width:58px; height:auto; object-fit:contain; }
.h2h-billing .h2h-page-header h2 { margin:0; font-size:1.45rem; color:var(--h2h-ink); }
.h2h-billing .h2h-page-header p { margin:.15rem 0 0; color:var(--h2h-muted); font-size:.92rem; }
.h2h-billing .h2h-actions { display:flex; flex-wrap:wrap; gap:.5rem; }
.h2h-billing .h2h-btn { display:inline-flex; align-items:center; gap:.4rem; padding:.55rem .9rem; border-radius:8px; border:1px solid transparent; font-weight:600; font-size:.9rem; text-decoration:none; cursor:pointer; background:#e2e8f0; color:#0f172a; }
.h2h-billing .h2h-btn--primary { background:var(--h2h-teal); color:#fff; }
.h2h-billing .h2h-btn--primary:hover { background:var(--h2h-teal-dark); color:#fff; }
.h2h-billing .h2h-btn--secondary { background:#fff; border-color:var(--h2h-border); }
.h2h-billing .h2h-btn--danger { background:#b91c1c; color:#fff; }
.h2h-billing .h2h-subnav { display:flex; flex-wrap:wrap; gap:.35rem; margin:0 0 1.25rem; padding:.5rem; background:#fff; border:1px solid var(--h2h-border); border-radius:10px; }
.h2h-billing .h2h-subnav a { padding:.45rem .75rem; border-radius:7px; text-decoration:none; color:#334155; font-size:.88rem; font-weight:600; }
.h2h-billing .h2h-subnav a.is-active, .h2h-billing .h2h-subnav a:hover { background:#ccfbf1; color:#115e59; }
.h2h-billing .h2h-cards { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:.75rem; margin-bottom:1.25rem; }
.h2h-billing .h2h-card { background:#fff; border:1px solid var(--h2h-border); border-radius:12px; padding:1rem; }
.h2h-billing .h2h-card__label { font-size:.78rem; color:var(--h2h-muted); text-transform:uppercase; letter-spacing:.04em; }
.h2h-billing .h2h-card__value { font-size:1.35rem; font-weight:750; color:var(--h2h-ink); margin-top:.25rem; }
.h2h-billing .h2h-panel { background:#fff; border:1px solid var(--h2h-border); border-radius:12px; padding:1rem 1.1rem; margin-bottom:1rem; }
.h2h-billing .h2h-panel h3 { margin:0 0 .75rem; font-size:1.05rem; }
.h2h-billing table.h2h-table { width:100%; border-collapse:collapse; font-size:.92rem; }
.h2h-billing table.h2h-table th, .h2h-billing table.h2h-table td { padding:.65rem .5rem; border-bottom:1px solid var(--h2h-border); text-align:left; vertical-align:top; }
.h2h-billing table.h2h-table th { font-size:.75rem; text-transform:uppercase; letter-spacing:.04em; color:var(--h2h-muted); }
.h2h-badge { display:inline-block; padding:.2rem .55rem; border-radius:999px; font-size:.75rem; font-weight:700; }
.h2h-billing .h2h-form-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:.85rem; }
.h2h-billing label { display:block; font-size:.82rem; font-weight:600; color:#334155; margin-bottom:.3rem; }
.h2h-billing input, .h2h-billing select, .h2h-billing textarea { width:100%; padding:.55rem .65rem; border:1px solid #cbd5e1; border-radius:8px; font:inherit; }
.h2h-billing .h2h-alert { padding:.75rem 1rem; border-radius:8px; margin-bottom:1rem; }
.h2h-billing .h2h-alert--ok { background:#ecfdf5; color:#065f46; border:1px solid #a7f3d0; }
.h2h-billing .h2h-alert--err { background:#fef2f2; color:#991b1b; border:1px solid #fecaca; }
.h2h-billing .h2h-alert--info { background:#ecfeff; color:#155e75; border:1px solid #a5f3fc; }
.h2h-invite-guide strong { display:inline-flex; align-items:center; gap:.4rem; }
.h2h-invite-guide ol { margin:.55rem 0 0; padding-left:1.25rem; }
.h2h-invite-guide li { margin:.3rem 0; line-height:1.4; }
.h2h-invite-guide__note { margin:.55rem 0 0; font-size:.88rem; opacity:.9; }
.h2h-badge--ok { background:#ccfbf1; color:#115e59; }
.h2h-badge--warn { background:#fef3c7; color:#92400e; }
.h2h-badge--info { background:#e0f2fe; color:#075985; }
.h2h-badge--muted { background:#f1f5f9; color:#475569; }
a.h2h-card--status.is-active {
  border-color:#5eead4;
  box-shadow:0 0 0 2px rgba(15,118,110,.12);
}

.h2h-pay-options { margin-top:1.25rem; }
.h2h-pay-options__title { margin:0 0 .75rem; font-size:1.05rem; color:#0f4c5c; letter-spacing:.04em; text-transform:uppercase; }
.h2h-pay-options__grid { display:grid; grid-template-columns:1fr 1fr; gap:1rem; }
.h2h-pay-card { border-radius:12px; padding:1.1rem 1.15rem; border:1px solid; }
.h2h-pay-card--nofee { background:#f0fdf4; border-color:#86efac; }
.h2h-pay-card--card { background:#eff6ff; border-color:#93c5fd; }
.h2h-pay-card__eyebrow { font-size:.72rem; font-weight:800; text-transform:uppercase; letter-spacing:.06em; opacity:.8; }
.h2h-pay-card h4 { margin:.25rem 0 .5rem; font-size:1.05rem; }
.h2h-pay-card__methods { margin:0 0 .75rem; color:#14532d; font-size:.92rem; }
.h2h-pay-card__amount { font-size:1.15rem; color:#14532d; }
.h2h-pay-card__note { margin:.55rem 0 0; font-size:.85rem; color:#166534; }
.h2h-pay-card__breakdown { list-style:none; margin:0; padding:0; }
.h2h-pay-card__breakdown li { display:flex; justify-content:space-between; gap:1rem; padding:.3rem 0; font-size:.92rem; color:#1e3a8a; border-bottom:1px solid rgba(147,197,253,.45); }
.h2h-pay-card__breakdown li.is-grand { border-bottom:0; font-size:1.05rem; margin-top:.25rem; }
.h2h-pay-options__disclosure { margin:.85rem 0 0; font-size:.85rem; color:#475569; line-height:1.45; }

.h2h-doc { background:#fff; color:#0f172a; }
.h2h-doc__header { display:flex; justify-content:space-between; gap:1rem; flex-wrap:wrap; margin-bottom:1.25rem; padding-bottom:1rem; border-bottom:3px solid #0f766e; }
.h2h-doc__brand { display:flex; gap:.85rem; align-items:center; }
.h2h-doc__brand img { width:128px; max-width:40vw; height:auto; object-fit:contain; }
.h2h-doc__title { font-size:1.6rem; font-weight:800; color:#0f766e; letter-spacing:.04em; }
.h2h-doc__billto { margin-bottom:1rem; line-height:1.45; }
.h2h-label { font-size:.72rem; font-weight:800; text-transform:uppercase; letter-spacing:.06em; color:#0f766e; margin-bottom:.35rem; }
.h2h-doc__table { width:100%; border-collapse:collapse; margin:1rem 0; font-size:.92rem; }
.h2h-doc__table th { background:#0f766e; color:#fff; text-align:left; padding:.55rem .6rem; }
.h2h-doc__table td { padding:.55rem .6rem; border-bottom:1px solid #e2e8f0; }
.h2h-doc__totals { margin-left:auto; width:min(320px,100%); }
.h2h-doc__totals > div { display:flex; justify-content:space-between; padding:.35rem 0; }
.h2h-doc__totals .is-balance { border-top:2px solid #0f766e; margin-top:.35rem; padding-top:.55rem; font-size:1.1rem; font-weight:800; color:#b91c1c; }
.h2h-doc__footer { margin-top:1.5rem; padding-top:1rem; border-top:2px solid #0f766e; text-align:center; color:#64748b; font-size:.88rem; line-height:1.5; }

/* Searchable customer picker */
.h2h-billing .h2h-customer-picker { position:relative; }
.h2h-billing .h2h-customer-picker__row { display:flex; flex-wrap:wrap; gap:.5rem; align-items:stretch; }
.h2h-billing .h2h-customer-picker__search-wrap { flex:1; min-width:220px; position:relative; }
.h2h-billing .h2h-customer-picker__results {
  position:absolute; left:0; right:0; top:calc(100% + 4px); z-index:40;
  background:#fff; border:1px solid #cbd5e1; border-radius:8px;
  box-shadow:0 10px 28px rgba(15,23,42,.12); max-height:260px; overflow:auto; display:none;
}
.h2h-billing .h2h-customer-picker__results.is-open { display:block; }
.h2h-billing .h2h-customer-picker__results button {
  display:block; width:100%; text-align:left; padding:.65rem .8rem; border:0; border-bottom:1px solid #f1f5f9;
  background:#fff; cursor:pointer; font:inherit; color:#0f172a;
}
.h2h-billing .h2h-customer-picker__results button:hover,
.h2h-billing .h2h-customer-picker__results button.is-active { background:#ecfeff; }
.h2h-billing .h2h-customer-picker__results .is-empty { padding:.75rem .8rem; color:#64748b; font-size:.9rem; }
.h2h-billing .h2h-customer-picker__clear { white-space:nowrap; }
.h2h-billing .h2h-customer-picker__hint { margin:.35rem 0 0; font-size:.8rem; color:#64748b; }

.h2h-modal-backdrop {
  position:fixed; inset:0; background:rgba(15,23,42,.45); z-index:80;
  display:none; align-items:center; justify-content:center; padding:1rem;
}
.h2h-modal-backdrop.is-open { display:flex; }
.h2h-modal {
  width:min(560px,100%); background:#fff; border-radius:14px; padding:1.25rem;
  box-shadow:0 20px 50px rgba(15,23,42,.25);
  max-height:90vh; max-height:90dvh; overflow:auto;
}
@media (max-width:700px) {
  .h2h-modal-backdrop {
    align-items:flex-end;
    padding: max(0.5rem, env(safe-area-inset-top, 0px)) max(0.5rem, env(safe-area-inset-right, 0px)) 0 max(0.5rem, env(safe-area-inset-left, 0px));
  }
  .h2h-modal {
    width:100%;
    max-height:calc(100dvh - env(safe-area-inset-top, 0px) - 0.5rem);
    border-radius:14px 14px 0 0;
    padding-bottom:max(1.25rem, env(safe-area-inset-bottom, 0px));
  }
  .h2h-modal__actions .h2h-btn { min-height:44px; flex:1 1 auto; justify-content:center; }
}
.h2h-modal h3 { margin:0 0 .75rem; font-size:1.15rem; }
.h2h-modal__actions { display:flex; flex-wrap:wrap; gap:.5rem; margin-top:1rem; }
.h2h-modal__error { color:#b91c1c; font-size:.9rem; margin:.5rem 0 0; display:none; }
.h2h-modal__error.is-visible { display:block; }

@media (max-width:800px) {
  .h2h-pay-options__grid { grid-template-columns:1fr; }
  .h2h-billing .h2h-page-header { align-items:flex-start; }
  .h2h-doc__table { display:block; overflow-x:auto; }
}
@media print {
  .admin-sidebar, .admin-topbar, .admin-tabs, .h2h-subnav, .h2h-actions, .admin-topbar__menu { display:none !important; }
  .h2h-doc { box-shadow:none; }
}

/* ===== Full-width professional Customer Invoices / Customers layout ===== */
body.admin-page .admin-main:has(.h2h-billing),
body.admin-page .admin-main.container:has(.h2h-billing) {
  max-width: none !important;
  width: 100%;
  margin-left: 0;
  margin-right: 0;
  box-sizing: border-box;
}

.h2h-billing.h2h-dashboard { width: 100%; }

.h2h-brand-header {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border: 1px solid var(--h2h-border);
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}
.h2h-brand-header__left { display: flex; gap: 1rem; align-items: center; min-width: 0; flex: 1; }
.h2h-brand-header__logo img {
  width: 84px;
  height: auto;
  max-height: 84px;
  object-fit: contain;
  display: block;
}
.h2h-brand-header__text h2 {
  margin: 0;
  font-size: clamp(1.45rem, 2vw, 1.85rem);
  color: var(--h2h-ink);
  letter-spacing: -0.02em;
}
.h2h-brand-header__company { margin: .2rem 0 0; font-weight: 650; color: #134e4a; }
.h2h-brand-header__phone { margin: .15rem 0 0; }
.h2h-brand-header__phone a { color: var(--h2h-teal); font-weight: 650; text-decoration: none; }
.h2h-brand-header__desc { margin: .45rem 0 0; color: var(--h2h-muted); max-width: 42rem; line-height: 1.45; }
.h2h-brand-header__actions { display: flex; flex-wrap: wrap; gap: .55rem; align-items: center; }

/* Segmented module tabs */
.h2h-billing .h2h-subnav {
  position: sticky;
  top: 0;
  z-index: 5;
  margin: 0 0 1.25rem;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}
.h2h-billing .h2h-subnav__track {
  display: flex;
  flex-wrap: nowrap;
  gap: .35rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: .45rem;
  background: #fff;
  border: 1px solid var(--h2h-border);
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.03);
  scrollbar-width: thin;
}
.h2h-billing .h2h-subnav__link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  flex: 0 0 auto;
  padding: .55rem .9rem;
  border-radius: 8px;
  text-decoration: none;
  color: #334155;
  font-size: .88rem;
  font-weight: 650;
  white-space: nowrap;
  border: 1px solid transparent;
}
.h2h-billing .h2h-subnav__link:hover { background: #f0fdfa; color: #115e59; }
.h2h-billing .h2h-subnav__link:focus-visible {
  outline: 2px solid var(--h2h-teal);
  outline-offset: 2px;
}
.h2h-billing .h2h-subnav__link.is-active {
  background: var(--h2h-teal);
  color: #fff;
  border-color: var(--h2h-teal-dark);
}
.h2h-billing .h2h-subnav__link.is-active i { color: #fff; }

.h2h-primary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}
.h2h-card--primary {
  display: flex;
  gap: .9rem;
  align-items: flex-start;
  padding: 1.15rem 1.2rem;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04);
  border-top: 3px solid var(--h2h-teal);
}
.h2h-card--primary .h2h-card__icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #ecfeff;
  color: var(--h2h-teal);
  flex: 0 0 auto;
}
.h2h-card--primary h3 {
  margin: 0;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--h2h-muted);
  font-weight: 750;
}
.h2h-card__amount {
  margin: .35rem 0 0;
  font-size: clamp(1.45rem, 2.2vw, 1.85rem);
  font-weight: 800;
  color: var(--h2h-ink);
  letter-spacing: -0.02em;
}
.h2h-card__meta { margin: .25rem 0 0; color: var(--h2h-muted); font-size: .86rem; }
.h2h-card--overdue { border-top-color: #dc2626; }
.h2h-card--overdue .h2h-card__icon { background: #fef2f2; color: #b91c1c; }
.h2h-card--collected { border-top-color: #15803d; }
.h2h-card--collected .h2h-card__icon { background: #ecfdf5; color: #15803d; }
.h2h-card--fees { border-top-color: #2563eb; }
.h2h-card--fees .h2h-card__icon { background: #eff6ff; color: #1d4ed8; }

.h2h-status-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: .65rem;
  margin-bottom: 1.25rem;
}
a.h2h-card--status {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
  min-height: 96px;
}
a.h2h-card--status:hover {
  transform: translateY(-2px);
  border-color: #99f6e4;
  box-shadow: 0 8px 20px rgba(15, 118, 110, 0.08);
}
a.h2h-card--status:focus-visible { outline: 2px solid var(--h2h-teal); outline-offset: 2px; }
.h2h-card--status .h2h-card__icon {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #f1f5f9;
  color: #0f766e;
  font-size: .85rem;
}
.h2h-card--status .h2h-card__count {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--h2h-ink);
  line-height: 1.1;
}
.h2h-card--status .h2h-card__label {
  font-size: .78rem;
  color: var(--h2h-muted);
  font-weight: 650;
}

.h2h-dash-columns {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  gap: 1rem;
  margin-bottom: 1rem;
  align-items: start;
}
.h2h-dash-bottom {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.h2h-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .75rem;
}
.h2h-panel__head h3 { margin: 0; font-size: 1.05rem; }
.h2h-link { color: var(--h2h-teal); font-weight: 700; text-decoration: none; font-size: .88rem; }
.h2h-link:hover { text-decoration: underline; }
.h2h-muted { color: var(--h2h-muted); font-size: .85rem; }

.h2h-chart-wrap {
  display: grid;
  grid-template-columns: minmax(180px, 240px) 1fr;
  gap: 1rem;
  align-items: center;
}
.h2h-chart-wrap--compact { grid-template-columns: 1fr; justify-items: center; }
.h2h-chart-wrap canvas { max-width: 240px; width: 100%; height: auto !important; }
.h2h-chart-legend {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .4rem;
  font-size: .86rem;
  color: #334155;
}
.h2h-chart-legend .swatch {
  display: inline-block;
  width: .7rem;
  height: .7rem;
  border-radius: 999px;
  margin-right: .4rem;
  vertical-align: middle;
}
.h2h-chart-legend em { color: var(--h2h-muted); font-style: normal; font-weight: 650; }

.h2h-quick-actions__grid { display: grid; gap: .55rem; }
.h2h-quick-actions__grid a {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  padding: .75rem .85rem;
  border: 1px solid var(--h2h-border);
  border-radius: 10px;
  text-decoration: none;
  color: var(--h2h-ink);
  background: #f8fafc;
  transition: background .15s ease, border-color .15s ease;
}
.h2h-quick-actions__grid a:hover { background: #ecfeff; border-color: #99f6e4; }
.h2h-quick-actions__grid i {
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #ccfbf1;
  color: #0f766e;
  flex: 0 0 auto;
}
.h2h-quick-actions__grid strong { display: block; font-size: .92rem; }
.h2h-quick-actions__grid small { display: block; color: var(--h2h-muted); margin-top: .1rem; font-size: .78rem; }

.h2h-due-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .65rem; }
.h2h-due-list li {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  padding: .65rem 0;
  border-bottom: 1px solid #f1f5f9;
}
.h2h-due-list li:last-child { border-bottom: 0; }
.h2h-due-list strong { display: block; }
.h2h-due-list span { color: var(--h2h-muted); font-size: .85rem; }
.h2h-due-list__meta { text-align: right; }
.h2h-due-list__meta time { display: block; font-size: .8rem; color: var(--h2h-muted); }
.h2h-due-list__meta em { font-style: normal; font-weight: 750; color: var(--h2h-ink); }

.h2h-table-wrap { overflow-x: auto; }
.h2h-row-actions { display: flex; flex-wrap: wrap; gap: .4rem; }
.h2h-row-actions a {
  font-size: .8rem;
  font-weight: 700;
  color: var(--h2h-teal);
  text-decoration: none;
}
.h2h-row-actions a:hover { text-decoration: underline; }
.h2h-badge--danger { background: #fee2e2; color: #b91c1c; }

.h2h-empty {
  text-align: center;
  padding: 1.75rem 1rem;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
}
.h2h-empty__icon {
  width: 3rem;
  height: 3rem;
  margin: 0 auto .75rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #ecfeff;
  color: var(--h2h-teal);
  font-size: 1.2rem;
}
.h2h-empty h4 { margin: 0 0 .35rem; color: var(--h2h-ink); }
.h2h-empty p { margin: 0 0 1rem; color: var(--h2h-muted); max-width: 28rem; margin-left: auto; margin-right: auto; }
.h2h-empty--compact { padding: 1rem; border-style: solid; }
.h2h-empty--compact p { margin: 0; }
.h2h-empty--positive .h2h-empty__icon { background: #ecfdf5; color: #15803d; }

.h2h-activity { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; max-height: 420px; overflow: auto; }
.h2h-activity li { display: flex; gap: .7rem; align-items: flex-start; }
.h2h-activity__icon {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #f1f5f9;
  color: #0f766e;
  flex: 0 0 auto;
}
.h2h-activity strong { display: block; font-size: .9rem; }
.h2h-activity span { display: block; color: #475569; font-size: .84rem; }
.h2h-activity time { display: block; color: var(--h2h-muted); font-size: .75rem; margin-top: .15rem; }

.h2h-sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

@media (prefers-reduced-motion: reduce) {
  a.h2h-card--status, .h2h-quick-actions__grid a { transition: none; }
}

@media (max-width: 1200px) {
  .h2h-primary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .h2h-status-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .h2h-dash-bottom { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  body.admin-page .admin-main.container:has(.h2h-billing) {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .h2h-dash-columns { grid-template-columns: 1fr; }
  .h2h-brand-header__logo img { width: 72px; }
  .h2h-brand-header__actions { width: 100%; }
  .h2h-brand-header__actions .h2h-btn { flex: 1 1 auto; justify-content: center; }
}
@media (max-width: 640px) {
  .h2h-primary-grid,
  .h2h-status-grid,
  .h2h-dash-bottom { grid-template-columns: 1fr; }
  .h2h-chart-wrap { grid-template-columns: 1fr; justify-items: center; }
  .h2h-brand-header__left { flex-direction: column; align-items: flex-start; }
  .h2h-billing .h2h-form-grid,
  .h2h-billing .h2h-actions { display: flex; flex-direction: column; gap: .65rem; }
  .h2h-billing .h2h-btn--primary { width: 100%; justify-content: center; min-height: 44px; }
  .h2h-billing input,
  .h2h-billing select,
  .h2h-billing textarea { font-size: 16px; max-width: 100%; }
  .h2h-billing .admin-table-wrapper,
  .h2h-billing .h2h-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .h2h-subnav { overflow-x: auto; -webkit-overflow-scrolling: touch; flex-wrap: nowrap; }
  .h2h-subnav a, .h2h-subnav__link { flex-shrink: 0; min-height: 44px; }
  .h2h-billing dialog,
  .h2h-billing .h2h-modal {
    width: calc(100% - 1rem);
    max-height: calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 1rem);
  }
}

/* Cross-module entity links (admin) */
.h2h-entity-links {
  margin-top: .4rem;
  font-size: .82rem;
  line-height: 1.45;
  color: #475569;
}
.h2h-entity-link {
  color: #0f766e;
  font-weight: 600;
  text-decoration: none;
}
.h2h-entity-link:hover {
  text-decoration: underline;
}


/* Portal users manage menu */
.h2h-user-actions { position: relative; display: inline-block; }
.h2h-user-actions > summary {
  list-style: none;
  cursor: pointer;
}
.h2h-user-actions > summary::-webkit-details-marker { display: none; }
.h2h-user-actions__panel {
  position: absolute;
  right: 0;
  top: calc(100% + .35rem);
  z-index: 20;
  width: min(280px, 85vw);
  background: #fff;
  border: 1px solid var(--h2h-border);
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
  padding: .75rem;
  display: grid;
  gap: .55rem;
}
.h2h-user-actions__form label {
  margin-bottom: .25rem;
}
.h2h-user-actions__panel .h2h-btn { width: 100%; justify-content: center; }
@media (max-width: 640px) {
  .h2h-user-actions__panel { position: static; width: 100%; box-shadow: none; margin-top: .5rem; }
}
