body.er-guard-public-page {
  --bg: #0b0f14;
  --bg-soft: #11161d;
  --panel: #151b23;
  --panel-2: #1b2430;
  --border: #27313f;
  --border-light: #324253;
  --text: #e5edf5;
  --muted: #93a3b5;
  --muted-soft: #6b7a8a;
  --brand: #3ecf8e;
  --brand-strong: #2fb979;
  --brand-glow: rgba(62, 207, 142, 0.15);
  --ok-bg: #1b3327;
  --ok-text: #9ef0c5;
  --danger: #ff6b86;
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background: radial-gradient(ellipse at top right, #163826 0%, var(--bg) 60%);
  background-attachment: fixed;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: Roboto, ui-sans-serif, system-ui, -apple-system, Segoe UI, Helvetica, Arial, sans-serif;
}

html[data-dashboard-theme="light"] body.er-guard-public-page {
  --bg: #eef4f0;
  --bg-soft: #ffffff;
  --panel: #ffffff;
  --panel-2: #f7faf8;
  --border: #d6e0dc;
  --border-light: #c6d5cf;
  --text: #18232d;
  --muted: #64748b;
  --muted-soft: #94a3b8;
  --brand: #23885f;
  --brand-strong: #1b704d;
  --brand-glow: rgba(35, 136, 95, 0.15);
  --ok-bg: #e3f8ee;
  --ok-text: #176347;
  --danger: #b42342;
  color: var(--text);
  background:
    radial-gradient(ellipse at top right, rgba(80, 169, 116, 0.16) 0%, rgba(238, 244, 240, 0) 52%),
    linear-gradient(180deg, #eef4f0 0%, #f8faf9 100%);
}

html[data-dashboard-theme="light"] body.er-guard-public-page .er-kicker {
  color: #047857;
  text-shadow: none;
}

html[data-dashboard-theme="light"] body.er-guard-public-page .er-public-topbar h1,
html[data-dashboard-theme="light"] body.er-guard-public-page .er-card h2 {
  color: #0f172a;
}

html[data-dashboard-theme="light"] body.er-guard-public-page .er-card {
  border-color: rgba(15, 23, 42, 0.1);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 22px 48px rgba(15, 23, 42, 0.12);
}

html[data-dashboard-theme="light"] body.er-guard-public-page .er-field span,
html[data-dashboard-theme="light"] body.er-guard-public-page .er-upload-field span {
  color: #57708f;
}

html[data-dashboard-theme="light"] body.er-guard-public-page .er-field input,
html[data-dashboard-theme="light"] body.er-guard-public-page .er-field select,
html[data-dashboard-theme="light"] body.er-guard-public-page .er-upload-field input {
  border-color: #d9e2ea;
  color: #0f172a;
  background: #ffffff;
}

html[data-dashboard-theme="light"] body.er-guard-public-page .er-field input::placeholder,
html[data-dashboard-theme="light"] body.er-guard-public-page .er-field select:invalid {
  color: #738196;
}

html[data-dashboard-theme="light"] body.er-guard-public-page .er-field input:focus,
html[data-dashboard-theme="light"] body.er-guard-public-page .er-field select:focus,
html[data-dashboard-theme="light"] body.er-guard-public-page .er-upload-field input:focus {
  border-color: #23885f;
  box-shadow: 0 0 0 3px rgba(35, 136, 95, 0.14);
}

html[data-dashboard-theme="light"] body.er-guard-public-page .er-field input:disabled {
  color: #64748b;
  background: #eef3f7;
}

/* Multi-file ER Guard imports are submitted one workbook at a time. */
body.er-guard-dashboard-page .er-upload-queue {
  margin-top: 0.9rem;
  padding: 0.8rem 0.95rem;
  border: 1px solid rgba(154, 224, 207, 0.22);
  border-radius: 0.75rem;
  background: rgba(6, 17, 35, 0.42);
}

body.er-guard-dashboard-page .er-upload-queue-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  color: var(--of-text, #dce7f8);
  font-size: 0.82rem;
}

body.er-guard-dashboard-page .er-upload-queue-header span {
  min-width: 0;
  max-width: 100%;
  color: var(--of-muted, #9db1d1);
  font-size: 0.74rem;
  text-align: right;
  overflow-wrap: anywhere;
}

body.er-guard-dashboard-page .er-upload-queue-list {
  display: grid;
  gap: 0.35rem;
  max-height: 12rem;
  margin: 0.65rem 0 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
}

body.er-guard-dashboard-page .er-upload-queue-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.75rem;
}

body.er-guard-dashboard-page .er-upload-queue-actions button {
  min-width: 9rem;
}

body.er-guard-dashboard-page .er-upload-queue-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.45rem 0.55rem;
  border-radius: 0.45rem;
  background: rgba(255, 255, 255, 0.035);
  color: var(--of-muted, #b4c2dc);
  font-size: 0.76rem;
}

body.er-guard-dashboard-page .er-upload-queue-file {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.er-guard-dashboard-page .er-upload-queue-status {
  flex: 0 0 auto;
  color: #9ae0cf;
  font-weight: 700;
  white-space: nowrap;
}

body.er-guard-dashboard-page .er-upload-queue-item[data-queue-status="failed"] .er-upload-queue-status {
  color: #ffb3ad;
}

body.er-guard-dashboard-page .er-upload-queue-item[data-queue-status="waiting"] .er-upload-queue-status {
  color: #9db1d1;
}

body.er-guard-dashboard-page .er-upload-queue-item[data-queue-status="cancelled"] .er-upload-queue-status {
  color: #ffcf8a;
}

/* Keep the queue readable when the dashboard switches to light mode. */
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-upload-queue {
  border-color: #d2e0e8;
  background: #f7fafc;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-upload-queue-header {
  color: #15202b;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-upload-queue-header span {
  color: #5b6b7b;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-upload-queue-item {
  background: #edf3f7;
  color: #46566a;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-upload-queue-status {
  color: #087f5b;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-upload-queue-item[data-queue-status="waiting"] .er-upload-queue-status {
  color: #55779b;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-upload-queue-item[data-queue-status="failed"] .er-upload-queue-status {
  color: #b42318;
}

/* The shared compact button can otherwise clip the temporary Uploading... label. */
body.er-guard-dashboard-page form.upload-form[data-upload-kind] > .of-upload-zone > .of-upload-actions .of-export-btn.is-busy {
  box-sizing: border-box;
  flex: 0 1 112px;
  width: 112px;
  min-width: 0;
  max-width: 112px;
  padding-inline: 6px;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.er-availed-company-other {
  position: relative;
}

.er-availed-company-other[hidden] {
  display: none;
}

.er-availed-company-other input {
  min-width: 0;
  width: 100%;
  padding-right: 2.6rem;
}

.er-availed-company-reset {
  position: absolute;
  top: 50%;
  right: 0.4rem;
  width: 2rem;
  height: 2rem;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: var(--muted);
  background: transparent;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
  z-index: 2;
  touch-action: manipulation;
}

.er-availed-company-reset:hover,
.er-availed-company-reset:focus-visible {
  color: var(--text);
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-glow);
}

.er-vidacure-branch-other {
  position: relative;
}

.er-vidacure-branch-other[hidden] {
  display: none;
}

.er-vidacure-branch-other input {
  width: 100%;
  min-width: 0;
  padding-right: 2.6rem;
}

.er-vidacure-branch-reset {
  position: absolute;
  top: 50%;
  right: 0.4rem;
  width: 2rem;
  height: 2rem;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: var(--muted);
  background: transparent;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
  z-index: 2;
  touch-action: manipulation;
}

.er-vidacure-branch-reset:hover,
.er-vidacure-branch-reset:focus-visible {
  color: var(--text);
  background: var(--bg-soft);
  box-shadow: 0 0 0 3px var(--brand-glow);
}

html[data-dashboard-theme="light"] body.er-guard-public-page .er-no-middle-toggle {
  color: #64748b;
}

html[data-dashboard-theme="light"] body.er-guard-public-page .er-secondary {
  color: #334155;
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

html[data-dashboard-theme="light"] body.er-guard-public-page .er-form-actions button {
  color: #052e1b;
  background: #39d58b;
  box-shadow: 0 12px 24px rgba(35, 136, 95, 0.18);
}

html[data-dashboard-theme="light"] body.er-guard-public-page .er-form-actions button:hover {
  background: #2fb979;
}

html[data-dashboard-theme="light"] body.er-guard-public-page .er-step-pill {
  border-color: #cbd5e1;
  background: #ffffff;
  color: #475569;
}

html[data-dashboard-theme="light"] body.er-guard-public-page .er-step-pill strong {
  color: #0f172a;
}

html[data-dashboard-theme="light"] body.er-guard-public-page .er-step-pill.is-active {
  border-color: #1d6043;
  background: #1d6043;
  color: #ecfdf5;
  box-shadow: 0 0 0 4px rgba(29, 96, 67, 0.14);
}

html[data-dashboard-theme="light"] body.er-guard-public-page .er-step-pill.is-active strong,
html[data-dashboard-theme="light"] body.er-guard-public-page .er-step-pill.is-active span {
  color: #ffffff;
}

.er-public-shell {
  width: min(100% - 1.5rem, 820px);
  margin: auto;
  padding: clamp(1rem, 2vw, 1.4rem) 0 clamp(1.5rem, 3vw, 2rem);
}

.er-public-topbar,
.er-dashboard-panel-head,
.er-form-actions,
.er-pagination {
  display: flex;
  align-items: center;
}

.er-public-topbar {
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.er-public-branding {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-width: 0;
}

.er-public-title {
  min-width: 0;
}

.er-public-topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex: 0 0 auto;
}

.er-brand-lockup {
  position: relative;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  flex: 0 0 auto;
  width: clamp(6rem, 8vw, 7.5rem);
  height: auto;
  border: 0;
  padding: 0;
  background: transparent !important;
  box-shadow: none !important;
  line-height: 0;
  pointer-events: none;
}

.er-brand-lockup img {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  border: 0;
  padding: 0;
  background: transparent !important;
  box-shadow: none !important;
  object-fit: contain;
  pointer-events: none;
}

.er-support-open {
  position: fixed;
  right: clamp(1rem, 3vw, 2rem);
  bottom: clamp(1rem, 3vw, 2rem);
  z-index: 55;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 3.35rem;
  max-width: calc(100vw - 2rem);
  border: 1px solid rgba(62, 207, 142, 0.6);
  border-radius: 999px;
  padding: 0.72rem 1.2rem 0.72rem 0.82rem;
  color: #ecfdf5;
  background: linear-gradient(135deg, #176442, #2a9b68);
  box-shadow: 0 14px 30px rgba(7, 47, 31, 0.28), 0 0 0 4px rgba(62, 207, 142, 0.1);
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.15;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.er-support-open:hover,
.er-support-open:focus-visible {
  color: #ffffff;
  background: linear-gradient(135deg, #125535, #238657);
  box-shadow: 0 18px 34px rgba(7, 47, 31, 0.34), 0 0 0 5px rgba(62, 207, 142, 0.16);
  transform: translateY(-2px);
}

.er-support-open:focus-visible {
  outline: 3px solid rgba(62, 207, 142, 0.48);
  outline-offset: 2px;
}

.er-support-open-icon {
  display: inline-grid;
  width: 1.8rem;
  height: 1.8rem;
  place-items: center;
  border: 1px solid rgba(236, 253, 245, 0.7);
  border-radius: 50%;
  color: #ffffff;
  background: rgba(4, 33, 21, 0.24);
  font-size: 1rem;
  font-weight: 900;
  line-height: 1;
}

html[data-dashboard-theme="light"] body.er-guard-public-page .er-support-open {
  border-color: rgba(29, 96, 67, 0.34) !important;
  color: #145236 !important;
  background: linear-gradient(135deg, #ffffff, #e7f8ef) !important;
  box-shadow: 0 14px 30px rgba(29, 96, 67, 0.18), 0 0 0 4px rgba(29, 96, 67, 0.08);
}

html[data-dashboard-theme="light"] body.er-guard-public-page .er-support-open:hover,
html[data-dashboard-theme="light"] body.er-guard-public-page .er-support-open:focus-visible {
  border-color: rgba(29, 96, 67, 0.52) !important;
  color: #0b3b25 !important;
  background: linear-gradient(135deg, #f8fffb, #d8f3e4) !important;
  box-shadow: 0 18px 34px rgba(29, 96, 67, 0.24), 0 0 0 5px rgba(29, 96, 67, 0.12);
}

html[data-dashboard-theme="light"] body.er-guard-public-page .er-support-open-icon {
  border-color: rgba(29, 96, 67, 0.4);
  color: #145236;
  background: rgba(62, 207, 142, 0.14);
}

.er-support-modal[hidden] {
  display: none;
}

.er-support-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 1rem;
  isolation: isolate;
}

.er-support-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 8, 12, 0.78);
  backdrop-filter: blur(8px);
}

.er-support-dialog {
  position: relative;
  z-index: 1;
  width: min(680px, 100%);
  max-height: min(90vh, 760px);
  overflow: auto;
  border-color: rgba(62, 207, 142, 0.22);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0)), #151b23;
  color: #e5edf5;
  padding: clamp(1.15rem, 3vw, 2rem);
}

.er-support-header,
.er-support-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.er-support-header {
  margin-bottom: 0.6rem;
}

.er-support-header h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.35rem, 3vw, 1.6rem);
}

.er-support-close {
  min-width: 2.7rem;
  min-height: 2.7rem;
  padding: 0.35rem 0.7rem;
  font-size: 1.4rem;
  line-height: 1;
}

.er-support-intro {
  margin: 0 0 1.15rem;
  color: #b8c5d2;
  line-height: 1.5;
}

.er-support-hours {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.82rem;
  opacity: 0.86;
}

html[data-dashboard-theme="light"] .er-support-dialog {
  border-color: rgba(29, 96, 67, 0.18);
  background: linear-gradient(180deg, #ffffff, #f5fbf7);
  color: #15202b;
}

html[data-dashboard-theme="light"] .er-support-intro {
  color: #526477;
}

.er-support-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem 1rem;
}

.er-support-form .er-field {
  grid-column: span 1;
  min-height: 0;
}

.er-support-form .er-support-concern-field {
  grid-column: 1 / -1;
}

.er-support-concern-field textarea {
  box-sizing: border-box;
  height: 8.5rem;
  min-height: 8.5rem;
  max-height: 8.5rem;
  resize: none;
  line-height: 1.45;
}

.er-support-email-checkbox {
  grid-column: 1 / -1;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--er-border, rgba(148, 163, 184, 0.35));
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.28);
  cursor: pointer;
}

.er-support-email-checkbox input {
  width: 1.1rem;
  height: 1.1rem;
  margin-top: 0.15rem;
  accent-color: var(--er-accent, #20c997);
}

.er-support-email-checkbox span,
.er-support-email-checkbox small {
  display: block;
}

.er-support-email-checkbox small {
  margin-top: 0.25rem;
  color: var(--er-muted, #94a3b8);
  font-weight: 400;
}

html[data-dashboard-theme="light"] .er-support-email-checkbox {
  background: #f8fafc;
}

.er-support-actions {
  grid-column: 1 / -1;
  justify-content: flex-end;
  margin-top: 0.35rem;
}

html[data-dashboard-theme="light"] .er-support-backdrop {
  background: rgba(15, 23, 42, 0.46);
}

.er-kicker,
.er-step {
  margin: 0 0 0.25rem;
  color: var(--brand);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.er-public-topbar h1,
.er-card h2 {
  margin: 0;
  letter-spacing: 0;
}

.er-activation-notice {
  margin: 0 0 1.25rem;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(29, 96, 67, 0.2);
  border-left: 4px solid #1d6043;
  border-radius: var(--radius-sm);
  background: #f0fdf4;
  color: #294638;
}

.er-activation-notice-title {
  margin: 0 0 0.5rem;
  color: #14532d;
  font-weight: 800;
}

.er-activation-notice ul {
  display: grid;
  gap: 0.4rem;
  margin: 0;
  padding-left: 1.15rem;
  line-height: 1.45;
}

html[data-dashboard-theme="light"] body.er-guard-public-page .er-activation-notice {
  border-color: #bbf7d0;
  border-left-color: #15803d;
  background: #f0fdf4;
  color: #365244;
}

html[data-dashboard-theme="light"] body.er-guard-public-page .er-activation-notice-title {
  color: #166534;
}

.er-public-topbar h1 {
  color: var(--text);
  font-size: clamp(1.8rem, 4vw, 2.35rem);
  font-weight: 800;
  line-height: 1.08;
}

.er-public-topbar .login-theme-toggle {
  flex: 0 0 auto;
}

.er-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0)), var(--panel);
  box-shadow: 0 20px 35px rgba(0, 0, 0, 0.3);
}

.er-activation-card {
  padding: clamp(1.15rem, 3vw, 2rem);
}

.er-card-head {
  margin-bottom: 1rem;
}

.er-card h2 {
  color: var(--text);
  font-size: clamp(1.35rem, 3vw, 1.6rem);
  font-weight: 800;
  line-height: 1.22;
}

.er-alert {
  margin-bottom: 1.25rem;
  padding: 0.85rem 1rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-weight: 700;
  line-height: 1.45;
}

.er-alert-success {
  color: #baf7d4;
  background: #123a28;
  border-color: rgba(62, 207, 142, 0.55);
}

.er-alert-error {
  color: #ffd1dc;
  background: #471827;
  border-color: rgba(255, 91, 124, 0.58);
}

.er-email-retry-panel {
  margin: 0 0 1.5rem;
  padding: 1.1rem 1.2rem 1.2rem;
  border: 1px solid rgba(35, 136, 95, 0.32);
  border-radius: var(--radius-md);
  background: rgba(35, 136, 95, 0.08);
}

.er-email-retry-panel h3 {
  margin: 0.15rem 0 0.45rem;
  color: var(--text);
  font-size: 1.1rem;
}

.er-email-retry-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.er-email-retry-kicker {
  color: var(--brand-strong) !important;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.er-email-retry-form {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1rem;
}

.er-email-retry-form .er-field {
  flex: 1 1 20rem;
}

.er-email-retry-form button {
  flex: 0 0 auto;
  min-height: 3rem;
  border: 0;
  border-radius: var(--radius-md);
  padding: var(--space-md) 1.1rem;
  color: #032012;
  background: var(--brand);
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.er-email-retry-form button:hover {
  background: var(--brand-strong);
}

html[data-dashboard-theme="light"] body.er-guard-public-page .er-alert-success {
  color: #064e3b;
  background: #dcfce7;
  border-color: #86efac;
}

html[data-dashboard-theme="light"] body.er-guard-public-page .er-alert-error {
  color: #b42348;
  background: #fff1f4;
  border-color: #fecdd8;
}

html[data-dashboard-theme="light"] body.er-guard-public-page .er-email-retry-panel {
  border-color: #a7d7bd;
  background: #f0faf4;
}

html[data-dashboard-theme="light"] body.er-guard-public-page .er-email-retry-panel h3 {
  color: #123b2c;
}

.er-form {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1rem;
}

.er-step-form {
  align-items: start;
}

.er-stepper {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  margin-bottom: 0.25rem;
}

.er-step-pill {
  display: grid;
  gap: 0.2rem;
  min-height: 4rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.75rem 0.85rem;
  color: var(--muted);
  background: var(--bg-soft);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, color 0.2s;
}

.er-step-pill span {
  color: inherit;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.er-step-pill strong {
  color: var(--text);
  font-size: 0.94rem;
  font-weight: 800;
  line-height: 1.2;
}

.er-step-pill:hover,
.er-step-pill:focus-visible {
  border-color: rgba(62, 207, 142, 0.62);
  color: var(--brand);
  background: color-mix(in srgb, var(--bg-soft) 88%, var(--brand));
  outline: none;
  box-shadow: 0 0 0 3px var(--brand-glow);
}

.er-step-pill:hover strong,
.er-step-pill:focus-visible strong {
  color: var(--text);
}

.er-step-pill:hover span,
.er-step-pill:focus-visible span {
  color: var(--brand);
}

.er-step-pill.is-active {
  border-color: rgba(62, 207, 142, 0.72);
  color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-glow);
}

.er-step-pill.is-active strong {
  color: #f8fafc;
}

.er-step-pill.is-active span {
  color: #d7ffe9;
}

.er-step-panel {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1rem;
  min-width: 0;
  margin: 0;
  border: 0;
  padding: 0;
}

.er-step-panel[hidden] {
  display: none;
}

.er-step-panel legend {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.er-field {
  display: grid;
  grid-column: span 2;
  align-content: start;
  gap: 0.4rem;
  min-width: 0;
  min-height: 5.85rem;
}

/* .er-field has an explicit display value, so restore the native hidden
   behavior for conditionally rendered public-form fields. */
body.er-guard-public-page .er-field[hidden] {
  display: none !important;
}

.er-field span,
.er-upload-field span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  line-height: 1.25;
  text-transform: uppercase;
}

.er-field .er-field-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
}

.er-field .er-field-label em {
  color: var(--muted);
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.2;
  text-transform: none;
}

body.er-guard-public-page .required-mark,
body.er-guard-dashboard-page .required-mark {
  display: inline-block;
  width: 0.43rem;
  height: 0.43rem;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #ff5b78;
  box-shadow: 0 0 0 3px rgba(255, 91, 120, 0.12);
}

body.er-guard-public-page .required-mark[hidden] {
  display: none;
}

body.er-guard-dashboard-page .required-mark[hidden] {
  display: none;
}

body.er-guard-dashboard-page .member-field-hint {
  color: var(--muted);
  font-size: 0.76rem;
  font-style: normal;
  font-weight: 600;
  line-height: 1.35;
}

.er-field .er-field-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}

.er-field .er-field-head em {
  max-width: 14rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.25;
  text-align: right;
  text-transform: none;
}

.er-field input,
.er-field select,
.er-upload-field input {
  width: 100%;
  min-height: 3rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-md) 0.85rem;
  color: var(--text);
  background: var(--bg-soft);
  font: inherit;
  color-scheme: dark;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.er-field input[type="file"] {
  padding: 0.72rem 0.85rem;
}

.er-field select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 3rem;
  background-color: var(--bg-soft);
  background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2393a3b5' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1rem 1rem;
}

.er-field select::-ms-expand {
  display: none;
}

/* Long Philippine location lists use an accessible, searchable combobox. The
   native select remains in the form as the canonical value for normal picks;
   the visible input takes over when the user chooses Other. */
.er-search-select {
  position: relative;
  width: 100%;
}

.er-search-select-input {
  width: 100%;
  min-height: 3rem;
  padding-right: 3.25rem !important;
  background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 1rem center !important;
  background-size: 1rem 1rem !important;
}

.er-search-select-list {
  position: absolute;
  z-index: 30;
  top: calc(100% + 0.35rem);
  left: 0;
  right: 0;
  max-height: 16rem;
  overflow-y: auto;
  padding: 0.35rem;
  border: 1px solid #d9e2ea;
  border-radius: 0.75rem;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.16);
}

.er-search-select-option {
  display: block;
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 0;
  border-radius: 0.5rem;
  background: transparent;
  color: #172033;
  text-align: left;
  cursor: pointer;
}

.er-search-select-option:hover,
.er-search-select-option:focus-visible {
  background: #eefaf5;
  color: #087443;
  outline: none;
}

.er-search-select-option--other {
  margin-top: 0.25rem;
  border-top: 1px solid #e7edf1;
  border-radius: 0;
  color: #087443;
  font-weight: 700;
}

.er-search-select-clear {
  position: absolute;
  z-index: 2;
  top: 50%;
  right: 0.7rem;
  width: 1.7rem;
  height: 1.7rem;
  padding: 0;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #f8fafc;
  color: #64748b;
  font-size: 1.2rem;
  line-height: 1;
  transform: translateY(-50%);
  cursor: pointer;
}

body.er-guard-dashboard-page .er-create-form .er-search-select-input {
  border-color: rgba(15, 23, 42, 0.13);
  background-color: #fff;
  color: #172033;
}

body.er-guard-dashboard-page .er-create-form .er-search-select-clear {
  color: #536276;
}

.er-field input[type="file"]::file-selector-button {
  min-height: 2rem;
  margin-right: 0.75rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.7rem;
  color: var(--text);
  background: var(--panel-2);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.er-field input:focus,
.er-field select:focus,
.er-upload-field input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-glow);
}

.er-field.is-invalid input,
.er-field.is-invalid select,
.er-field input[aria-invalid="true"],
.er-field select[aria-invalid="true"] {
  border-color: rgba(255, 91, 120, 0.8);
  box-shadow: 0 0 0 3px rgba(255, 91, 120, 0.12);
}

.er-field input:disabled {
  color: var(--muted);
  background: color-mix(in srgb, var(--bg-soft) 78%, var(--panel-2));
  cursor: not-allowed;
  opacity: 0.85;
}

html[data-dashboard-theme="light"] .er-field input,
html[data-dashboard-theme="light"] .er-field select,
html[data-dashboard-theme="light"] .er-upload-field input {
  color-scheme: light;
  box-shadow: inset 0 1px 0 rgba(15, 23, 42, 0.02);
}

html[data-dashboard-theme="light"] .er-field select {
  background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-position: right 1rem center;
  background-repeat: no-repeat;
  background-size: 1rem 1rem;
}

html[data-dashboard-theme="light"] .er-field input[type="date"]::-webkit-calendar-picker-indicator {
  filter: none;
}

.er-field em,
.er-field small {
  color: var(--muted);
  font-size: 0.8rem;
  font-style: normal;
  line-height: 1.35;
}

.er-field small {
  display: block;
  min-height: 1.1rem;
  color: var(--danger);
  font-weight: 700;
}

.er-field small.er-field-hint {
  color: var(--muted);
  font-weight: 400;
}

.er-field small[hidden] {
  display: none;
}

.er-blocked-email-domain {
  color: #ef4444;
  font-weight: 800;
}

.er-step-verification-error {
  grid-column: 1 / -1;
  margin: -0.35rem 0 0;
  color: var(--danger);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.35;
}

.er-step-verification-error[hidden] {
  display: none;
}

.er-no-middle-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  width: fit-content;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.3;
  text-transform: none;
}

.er-no-middle-toggle input {
  width: 1rem;
  min-height: 1rem;
  height: 1rem;
  margin: 0;
  accent-color: var(--brand);
}

.er-no-middle-toggle span {
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: 0;
  text-transform: none;
}

/* Compact variant that sits beside the field label so the inputs below stay
   aligned with the neighbouring fields. */
.er-no-middle-toggle--inline {
  gap: 0.3rem;
  font-size: 0.68rem;
  font-weight: 600;
  white-space: nowrap;
}

.er-no-middle-toggle--inline input {
  width: 0.8rem;
  min-height: 0.8rem;
  height: 0.8rem;
}

/* Middle-name label row: keep the toggle beside the text on one line so the
   input stays level with the neighbouring fields. */
.er-field.er-middle-field .er-field-label {
  flex-wrap: nowrap;
  white-space: nowrap;
}

/* If the viewport is too narrow for one line, the step-2 name labels reserve
   equal height so the inputs below still line up. */
.er-step-panel[data-er-step-panel="2"] .er-field-label--name-row {
  min-height: 2.5em;
}

.er-span-3 {
  grid-column: span 6;
}

.er-span-15 {
  grid-column: span 3;
}

.er-span-4 {
  grid-column: span 4;
}

.er-span-2 {
  grid-column: span 2;
}

.er-form-actions {
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.5rem;
}

.er-form-actions button {
  min-height: 3rem;
  border: 0;
  border-radius: var(--radius-md);
  padding: var(--space-md) 1.1rem;
  color: #032012;
  background: var(--brand);
  font-weight: 600;
  cursor: pointer;
}

.er-form-actions button:hover {
  background: var(--brand-strong);
}

.er-form-actions button:disabled,
.er-form-actions button.is-processing {
  cursor: wait;
  opacity: 0.72;
  filter: saturate(0.72);
  pointer-events: none;
}

.er-step-actions [data-er-submit] {
  text-transform: none;
}

.er-step-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
}

.er-step-actions [hidden] {
  display: none;
}

.er-step-actions .er-secondary {
  color: #d7e0ea;
  background: #243244;
}

html[data-dashboard-theme="light"] .er-step-actions .er-secondary {
  color: #334155;
  background: #ffffff;
}

.er-secondary,
.er-public-link,
.er-pagination a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  border: 1px solid #33465d;
  border-radius: var(--radius-md);
  padding: var(--space-md) 1.1rem;
  color: #d7e0ea;
  background: #243244;
  text-decoration: none;
  font-weight: 600;
}

html[data-dashboard-theme="light"] .er-secondary,
html[data-dashboard-theme="light"] .er-public-link,
html[data-dashboard-theme="light"] .er-pagination a {
  color: #334155;
  background: #ffffff;
  border-color: var(--border);
}

.er-dashboard-main {
  display: grid;
  gap: 1rem;
  max-width: min(var(--content-max-width-wide), calc(100% - 1.5rem));
  padding-inline: 0;
  overflow-x: clip;
}

body.er-guard-dashboard-page .sd-main-column > .er-dashboard-main {
  width: min(var(--content-max-width-wide), calc(100% - 1.5rem));
  max-width: min(var(--content-max-width-wide), calc(100% - 1.5rem));
  margin: 1rem auto 2rem;
}

body.er-guard-dashboard-page .er-dashboard-main > .panel-block {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

body.er-guard-dashboard-page .er-dashboard-actions-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.68fr) minmax(360px, 1fr);
  gap: 1.25rem;
  align-items: stretch;
}

body.er-guard-dashboard-page .er-dashboard-main > .er-dashboard-actions-grid > .panel-block {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  overflow: hidden;
}

body.er-guard-dashboard-page .er-dashboard-create {
  min-height: 226px;
}

body.er-guard-inventory-page .er-dashboard-create.member-create-panel::before {
  content: "+ ADD CARD";
}

body.er-guard-inventory-page .er-dashboard-create .member-create-panel-cta::before {
  content: "Register a generated ER Guard card before activation.";
}

body.er-guard-dashboard-page .er-dashboard-create .member-create-panel-cta {
  height: 100%;
}

body.er-guard-dashboard-page .er-dashboard-create .member-panel-copy {
  display: none;
}

body.er-guard-dashboard-page .er-create-member-button {
  width: 100%;
  min-height: 3.75rem;
}

.er-dashboard-panel-head {
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.er-dashboard-search {
  margin: 1rem 0 0;
}

body.er-guard-dashboard-page .er-guard-status-filter-options {
  flex: 1 1 auto;
  justify-content: flex-start;
  flex-wrap: nowrap;
  min-width: 0;
  margin: 0;
  padding: 0;
  overflow-x: auto;
}

body.er-guard-dashboard-page .er-guard-status-filter-options .ticket-filter-pill {
  flex: 0 0 auto;
}

body.er-guard-dashboard-page .member-search-toolbar {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

body.er-guard-dashboard-page .member-search-toolbar > .member-filter-toggle {
  flex: 0 0 auto;
  order: 2;
}

body.er-guard-inventory-page .er-inventory-toolbar-actions {
  align-items: center;
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  width: auto;
}

body.er-guard-inventory-page .er-inventory-toolbar-actions button {
  flex: 0 0 auto;
}

/* The filter form has no visible content while collapsed. Keep the table
   header's divider as the single separator instead of leaving an empty strip. */
body.er-guard-inventory-page .er-dashboard-search:has(.er-filter-panel[hidden]) {
  border-bottom: 0;
  padding: 0;
}

body.er-guard-dashboard-page .er-dashboard-upload {
  width: 100%;
  min-width: 0;
}

body.er-guard-dashboard-page .er-dashboard-upload .er-dashboard-panel-head {
  margin-bottom: 0;
}

body.er-guard-dashboard-page .er-file-picker {
  width: 100%;
}

body.er-guard-dashboard-page .er-create-dialog {
  width: min(1240px, calc(100vw - 2rem));
  max-height: min(88vh, 980px);
}

body.er-guard-dashboard-page .er-create-form {
  display: grid;
  gap: 0;
}

body.er-guard-dashboard-page .er-create-form.is-hidden {
  display: none !important;
}

body.er-guard-dashboard-page .er-create-form .member-form-error {
  margin: 1rem 1.5rem 0;
}

body.er-guard-dashboard-page .er-create-step {
  padding: 1.35rem 1.5rem 1.4rem;
}

body.er-guard-dashboard-page .er-create-step.is-hidden,
body.er-guard-dashboard-page .er-create-actions.is-hidden {
  display: none !important;
}

body.er-guard-dashboard-page .er-create-form-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.15rem 1.35rem;
}

body.er-guard-dashboard-page .er-create-form .member-field {
  gap: 0.42rem;
}

body.er-guard-dashboard-page .er-create-form .member-field input,
body.er-guard-dashboard-page .er-create-form .member-field select,
body.er-guard-dashboard-page .er-create-form .member-field textarea {
  min-height: 3rem;
}

body.er-guard-dashboard-page .er-create-form textarea {
  resize: none;
}

body.er-guard-dashboard-page .er-create-form .member-field[data-er-create-field="address"] textarea {
  height: 7.5rem;
  min-height: 7.5rem;
  max-height: 7.5rem;
  overflow-y: auto;
}

body.er-guard-dashboard-page .er-create-form .er-create-step[data-er-create-step="member"] .member-field-head {
  min-height: 2.65rem;
  align-items: center;
}

body.er-guard-dashboard-page .er-create-form .member-field[data-er-create-field="street_address"],
body.er-guard-dashboard-page .er-create-form .member-field[data-er-create-field="remarks_status_client_account_name"] {
  grid-column: span 2;
}

body.er-guard-dashboard-page .er-create-form .member-field[data-er-create-field="first_name"] .member-field-head,
body.er-guard-dashboard-page .er-create-form .member-field[data-er-create-field="middle_name"] .member-field-head,
body.er-guard-dashboard-page .er-create-form .member-field[data-er-create-field="last_name"] .member-field-head {
  min-height: 2.65rem;
}

body.er-guard-dashboard-page .er-create-form .member-field[data-er-create-field="first_name"] .member-field-head,
body.er-guard-dashboard-page .er-create-form .member-field[data-er-create-field="last_name"] .member-field-head,
body.er-guard-dashboard-page .er-create-form .member-field[data-er-create-field="birthday"] .member-field-head {
  align-items: center;
}

body.er-guard-dashboard-page .er-create-form .member-field[data-er-create-field="birthday"] .member-field-head {
  min-height: 2.65rem;
}

body.er-guard-dashboard-page .er-create-form .member-field[data-er-create-field="middle_name"] .member-field-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.5rem;
}

body.er-guard-dashboard-page .er-create-form .member-field[data-er-create-field="middle_name"] .member-field-head label {
  min-width: 0;
  white-space: nowrap;
}

body.er-guard-dashboard-page .er-create-form .member-field[data-er-create-field="middle_name"] .er-no-middle-toggle {
  white-space: nowrap;
}

body.er-guard-dashboard-page .er-create-form .member-field[data-er-create-field="policy_number"] .member-field-head {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: nowrap;
  gap: 0.85rem;
  min-width: 0;
  min-height: 0;
  white-space: nowrap;
}

body.er-guard-dashboard-page .er-create-form .member-field[data-er-create-field="policy_number"] .member-field-head label {
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
}

body.er-guard-dashboard-page .er-create-form .member-field[data-er-create-field="policy_number"] .er-policy-auto-toggle {
  flex: 0 0 auto;
  margin-left: 0;
  white-space: nowrap;
}

body.er-guard-dashboard-page .er-create-form .member-field select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 3rem;
  background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2393a3b5' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1.5rem center;
  background-size: 0.95rem 0.95rem;
}

body.er-guard-dashboard-page .er-create-form .er-create-branch-field[hidden],
body.er-guard-dashboard-page .er-create-form .er-create-other-control[hidden] {
  display: none !important;
}

body.er-guard-dashboard-page .er-create-form .er-create-other-control {
  position: relative;
}

body.er-guard-dashboard-page .er-create-form .er-create-other-control input {
  width: 100%;
  padding-right: 3.25rem;
}

body.er-guard-dashboard-page .er-create-form .er-create-other-reset {
  position: absolute;
  top: 50%;
  right: 0.8rem;
  width: 1.7rem;
  height: 1.7rem;
  min-height: 0;
  padding: 0;
  border: 1px solid rgba(174, 190, 214, 0.28);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.92);
  color: var(--muted);
  box-shadow: none;
  font-size: 1.15rem;
  line-height: 1;
  transform: translateY(-50%);
}

body.er-guard-dashboard-page .er-create-form .er-create-other-reset:hover,
body.er-guard-dashboard-page .er-create-form .er-create-other-reset:focus-visible {
  border-color: rgba(62, 207, 142, 0.65);
  color: var(--text);
  background: rgba(25, 34, 48, 0.96);
  outline: none;
}

/* Keep the policy-number modal select chevron comfortably inside the field. */
body.er-guard-dashboard-page .er-policy-start-dialog select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 3rem;
  background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2393a3b5' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 0.95rem 0.95rem;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-policy-start-dialog select {
  background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2364758b' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}

body.er-guard-dashboard-page .er-create-age-field input {
  opacity: 0.72;
  cursor: default;
}

body.er-guard-dashboard-page .er-create-form .member-form-actions {
  gap: 0.8rem;
  justify-content: space-between;
  align-items: center;
  margin-top: 0;
  padding: 1.15rem 1.5rem 1.35rem;
  border-top: 1px solid var(--border);
}

body.er-guard-dashboard-page .er-create-form .member-form-actions .secondary {
  min-width: 8rem;
}

body.er-guard-dashboard-page .er-create-action-left,
body.er-guard-dashboard-page .er-create-action-right {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-create-dialog {
  border-color: rgba(15, 23, 42, 0.1);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 252, 0.99));
  color: #15202b;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.14);
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-create-form .member-form-section {
  border-color: rgba(15, 23, 42, 0.1);
  background: transparent;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-create-form .member-field input,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-create-form .member-field select,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-create-form .member-field textarea {
  border-color: rgba(15, 23, 42, 0.13);
  background: #ffffff;
  color: #15202b;
  -webkit-text-fill-color: #15202b;
  color-scheme: light;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-create-form .member-field select {
  background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-position: right 1.5rem center;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-create-form .member-form-actions {
  border-color: rgba(15, 23, 42, 0.1);
  background: rgba(248, 250, 252, 0.82);
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-create-form .member-form-actions .secondary {
  border-color: rgba(15, 23, 42, 0.14);
  background: #ffffff;
  color: #1e293b;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-create-form .member-form-actions .secondary:hover,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-create-form .member-form-actions .secondary:focus-visible {
  border-color: rgba(29, 96, 67, 0.22);
  background: rgba(29, 96, 67, 0.08);
  color: #123526;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-create-form .member-add-submit-button {
  border-color: rgba(29, 96, 67, 0.38);
  background: #1d6043;
  color: #f7fbff;
  box-shadow: 0 10px 24px rgba(29, 96, 67, 0.16);
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-create-form .member-add-submit-button:hover,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-create-form .member-add-submit-button:focus-visible {
  background: #174d36;
  color: #ffffff;
}

body.er-guard-dashboard-page .er-table-wrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin-top: 0.95rem;
  padding: 0;
  overflow-x: auto;
  border: 1px solid rgba(37, 49, 68, 0.98);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(21, 28, 43, 0.98), rgba(14, 19, 31, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.035),
    0 18px 36px rgba(0, 0, 0, 0.35);
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-table-wrap {
  border-color: rgba(15, 23, 42, 0.1);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-dashboard-upload,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-dashboard-create,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-dashboard-table-panel {
  border-color: rgba(15, 23, 42, 0.1) !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 250, 252, 0.98)) !important;
  color: #15202b !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 18px 40px rgba(15, 23, 42, 0.08) !important;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-dashboard-upload .section-head,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-dashboard-create .section-head,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-dashboard-upload .member-panel-copy .section-head,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-dashboard-create .member-panel-copy .section-head {
  color: #16202b !important;
  text-shadow: none !important;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-dashboard-upload .muted,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-dashboard-create .muted,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-dashboard-upload .member-panel-copy p,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-dashboard-create .member-panel-copy p {
  color: #15202b !important;
  -webkit-text-fill-color: #15202b !important;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .upload-template-link {
  color: #1d6043 !important;
  background: transparent !important;
  text-shadow: none !important;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .upload-template-link:hover,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .upload-template-link:focus-visible {
  color: #124832 !important;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-filter-panel {
  border-color: rgba(15, 23, 42, 0.1);
  background: #ffffff;
}

body.er-guard-dashboard-page .er-grid-head,
body.er-guard-dashboard-page .er-activation-grid {
  min-width: 1750px;
  width: 1750px;
  grid-template-columns: 220px 140px 220px 220px 190px 240px 300px 220px;
}

body.er-guard-dashboard-page .er-inventory-grid {
  min-width: 1120px;
  width: max-content;
  justify-items: center;
  grid-template-columns:
    minmax(220px, 1.25fr)
    minmax(150px, 0.8fr)
    minmax(170px, 0.95fr)
    minmax(180px, 0.95fr)
    minmax(160px, 0.8fr);
}

body.er-guard-dashboard-page .er-billing-grid {
  min-width: 1450px;
  width: max-content;
  grid-template-columns:
    minmax(240px, 1.3fr)
    minmax(190px, 1fr)
    minmax(150px, 0.78fr)
    minmax(160px, 0.86fr)
    minmax(170px, 0.9fr)
    minmax(170px, 0.86fr)
    minmax(130px, 0.62fr);
}

body.er-guard-billing-page .er-dashboard-main {
  padding-top: 0;
}

body.er-guard-billing-page .er-dashboard-table-panel {
  margin-top: 0;
}

body.er-guard-dashboard-page .er-billing-grid > * {
  justify-content: center;
  text-align: center;
}

body.er-guard-dashboard-page .er-billing-actions {
  display: flex;
  justify-content: center;
}

body.er-guard-dashboard-page .er-billing-actions .secondary {
  min-height: 2.5rem;
  padding: 0.62rem 0.95rem;
}

body.er-guard-dashboard-page .member-status-pill.status-payment_pending {
  border-color: rgba(250, 204, 21, 0.34);
  background: rgba(250, 204, 21, 0.12);
  color: #fde68a;
}

body.er-guard-dashboard-page .member-status-pill.status-paid {
  border-color: rgba(62, 207, 142, 0.36);
  background: rgba(62, 207, 142, 0.13);
  color: #9ff2c9;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-status-pill.status-payment_pending {
  border-color: rgba(180, 83, 9, 0.24);
  background: rgba(251, 191, 36, 0.18);
  color: #92400e;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-status-pill.status-paid {
  border-color: rgba(29, 96, 67, 0.24);
  background: rgba(29, 96, 67, 0.12);
  color: #17523a;
}

body.er-guard-dashboard-page .member-status-pill.status-utilized {
  border-color: rgba(59, 130, 246, 0.36);
  background: rgba(59, 130, 246, 0.13);
  color: #93c5fd;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-status-pill.status-utilized {
  border-color: rgba(30, 64, 175, 0.24);
  background: rgba(30, 64, 175, 0.12);
  color: #1e40af;
}

body.er-guard-dashboard-page .er-billing-confirm-form[hidden] {
  display: none;
}

/* Billing confirmation modal — cohesive, sleek confirmation dialog */
body.er-guard-dashboard-page .er-billing-modal .manual-ticket-dialog {
  width: min(680px, calc(100vw - 1.5rem));
  max-height: min(88vh, 720px);
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(62, 207, 142, 0.16);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(18, 26, 36, 0.98), rgba(11, 16, 23, 0.98));
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.48);
}

body.er-guard-dashboard-page .er-billing-modal .manual-ticket-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin: 0;
  padding: 1.35rem 1.5rem 1.15rem;
  border-bottom: 1px solid rgba(39, 49, 63, 0.85);
  background:
    linear-gradient(180deg, rgba(20, 29, 40, 0.98), rgba(14, 20, 28, 0.98));
}

body.er-guard-dashboard-page .er-billing-modal .member-detail-header-copy {
  min-width: 0;
}

body.er-guard-dashboard-page .er-billing-modal .member-detail-header-copy small {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--brand);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

body.er-guard-dashboard-page .er-billing-modal .member-detail-title-row {
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.25rem;
}

body.er-guard-dashboard-page .er-billing-modal .member-detail-title-row h2 {
  margin: 0;
  font-size: clamp(1.45rem, 2.4vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

body.er-guard-dashboard-page .er-billing-modal .member-detail-title-row .member-status-pill {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

body.er-guard-dashboard-page .er-billing-modal .member-detail-header-copy p {
  margin: 0;
  color: var(--muted-soft);
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

body.er-guard-dashboard-page .er-billing-modal .manual-ticket-close {
  color: #f8fafc;
}

body.er-guard-dashboard-page .er-billing-modal .manual-ticket-close:hover,
body.er-guard-dashboard-page .er-billing-modal .manual-ticket-close:focus-visible {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-glow);
}

body.er-guard-dashboard-page .er-billing-modal .member-detail-panels {
  display: block;
  gap: 0;
}

body.er-guard-dashboard-page .er-billing-modal .member-detail-panel {
  display: block;
  gap: 0;
  padding: 1.35rem 1.75rem 0;
}

body.er-guard-dashboard-page .er-billing-modal .er-billing-confirm-form {
  display: grid;
  gap: 0;
}

body.er-guard-dashboard-page .er-billing-modal .er-billing-summary-grid {
  margin-bottom: 1.35rem;
}

body.er-guard-dashboard-page .er-billing-confirm-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem 1.25rem;
  padding: 0;
  margin-top: 0.25rem;
  margin-bottom: 0.9rem;
}

body.er-guard-dashboard-page .er-billing-modal .member-field {
  gap: 0.55rem;
}

body.er-guard-dashboard-page .er-billing-modal .member-field-head {
  gap: 0.35rem;
  min-height: 0;
}

body.er-guard-dashboard-page .er-billing-modal .member-field-head label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.25;
}

body.er-guard-dashboard-page .er-billing-modal .member-field-head label .required-mark {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 999px;
  background: #ff5b78;
  box-shadow: 0 0 0 2px rgba(255, 91, 120, 0.12);
}

body.er-guard-dashboard-page .er-billing-modal .member-field input,
body.er-guard-dashboard-page .er-billing-modal .member-field input[type="date"],
body.er-guard-dashboard-page .er-billing-modal .member-field input[type="file"] {
  min-height: 3rem;
  border: 1px solid rgba(39, 49, 63, 0.95);
  border-radius: var(--radius-md);
  background: rgba(9, 14, 20, 0.72);
  color: var(--text);
  color-scheme: dark;
  font-size: 0.95rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

body.er-guard-dashboard-page .er-billing-modal .member-field input::placeholder {
  color: var(--muted-soft);
}

body.er-guard-dashboard-page .er-billing-modal .member-field input:focus,
body.er-guard-dashboard-page .er-billing-modal .member-field input[type="date"]:focus,
body.er-guard-dashboard-page .er-billing-modal .member-field input[type="file"]:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-glow);
}

body.er-guard-dashboard-page .er-billing-modal .member-field input[type="file"] {
  padding: 0.35rem;
  cursor: pointer;
}

body.er-guard-dashboard-page .er-billing-modal .member-field input[type="file"]::file-selector-button {
  min-height: 2.3rem;
  padding: 0 1rem;
  margin-right: 0.85rem;
  border: 1px solid rgba(39, 49, 63, 0.95);
  border-radius: calc(var(--radius-md) - 2px);
  background: rgba(36, 50, 68, 0.8);
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease;
}

body.er-guard-dashboard-page .er-billing-modal .member-field input[type="file"]::file-selector-button:hover {
  background: rgba(51, 70, 93, 0.95);
  border-color: var(--brand);
}

body.er-guard-dashboard-page .er-billing-modal .member-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.85rem;
  padding: 1.25rem 1.75rem 1.35rem;
  border-top: 1px solid rgba(39, 49, 63, 0.85);
  background: transparent;
}

body.er-guard-dashboard-page .er-billing-modal .member-form-actions button {
  min-width: 8.5rem;
  min-height: 2.85rem;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 700;
}

body.er-guard-dashboard-page .er-billing-modal .member-form-actions button.secondary {
  background: rgba(36, 50, 68, 0.8);
  color: #d7e0ea;
  border-color: rgba(51, 70, 93, 0.95);
}

body.er-guard-dashboard-page .er-billing-modal .member-form-actions button.secondary:hover,
body.er-guard-dashboard-page .er-billing-modal .member-form-actions button.secondary:focus-visible {
  background: rgba(51, 70, 93, 0.95);
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(62, 207, 142, 0.12);
  transform: translateY(-1px);
}

body.er-guard-dashboard-page .er-billing-modal .member-form-actions button[type="submit"] {
  background: var(--brand);
  color: #032012;
  border-color: transparent;
}

body.er-guard-dashboard-page .er-billing-modal .member-form-actions button[type="submit"]:hover,
body.er-guard-dashboard-page .er-billing-modal .member-form-actions button[type="submit"]:focus-visible {
  background: var(--brand-strong);
  box-shadow: 0 0 0 3px var(--brand-glow);
  transform: translateY(-1px);
}

body.er-guard-dashboard-page .er-billing-modal .member-field-error {
  display: block;
  margin-top: 0.35rem;
  color: #ff5b78;
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.35;
}

/* Light theme */
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-billing-modal .manual-ticket-dialog {
  border-color: rgba(15, 23, 42, 0.1);
  background: #ffffff;
  box-shadow: 0 28px 72px rgba(15, 23, 42, 0.16);
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-billing-modal .manual-ticket-header {
  border-color: rgba(15, 23, 42, 0.1);
  background: #f8fafc;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-billing-modal .manual-ticket-close {
  color: #0f172a;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-billing-modal .member-detail-title-row h2,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-billing-modal .member-detail-header-copy p {
  color: #15202b;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-billing-modal .member-field input,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-billing-modal .member-field input[type="date"],
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-billing-modal .member-field input[type="file"] {
  border-color: #d9e2ea;
  background: #ffffff;
  color: #0f172a;
  color-scheme: light;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-billing-modal .member-field input::placeholder {
  color: #738196;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-billing-modal .member-field input:focus,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-billing-modal .member-field input[type="date"]:focus,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-billing-modal .member-field input[type="file"]:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(35, 136, 95, 0.14);
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-billing-modal .member-field input[type="file"]::file-selector-button {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #d9e2ea;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-billing-modal .member-field input[type="file"]::file-selector-button:hover {
  background: #e2e8f0;
  border-color: var(--brand);
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-billing-modal .member-form-actions {
  border-color: rgba(15, 23, 42, 0.1);
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-billing-modal .member-form-actions button.secondary {
  background: #f1f5f9;
  color: #334155;
  border-color: #d9e2ea;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-billing-modal .member-form-actions button.secondary:hover,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-billing-modal .member-form-actions button.secondary:focus-visible {
  background: #e2e8f0;
  border-color: var(--brand);
}

/* Responsive */
@media (max-width: 640px) {
  body.er-guard-dashboard-page .er-billing-modal .member-detail-panel {
    padding: 1.15rem 1.15rem 0;
  }

  body.er-guard-dashboard-page .er-billing-modal .er-billing-confirm-grid {
    grid-template-columns: 1fr;
    gap: 1.35rem;
    padding: 1.15rem;
    margin-bottom: 0.75rem;
  }

  body.er-guard-dashboard-page .er-billing-modal .manual-ticket-header {
    padding: 1.15rem;
  }

  body.er-guard-dashboard-page .er-billing-modal .member-detail-title-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  body.er-guard-dashboard-page .er-billing-modal .member-form-actions {
    flex-direction: column-reverse;
    gap: 0.75rem;
    padding: 1.15rem;
  }

  body.er-guard-dashboard-page .er-billing-modal .member-form-actions button {
    width: 100%;
    min-width: 0;
  }
}

body.er-guard-dashboard-page .er-inventory-grid > * {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
}

body.er-guard-inventory-page .er-dashboard-table-panel .member-roster-head {
  margin-bottom: 0.55rem;
}

body.er-guard-inventory-page .er-dashboard-table-head {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

body.er-guard-inventory-page .er-inventory-header-top {
  align-items: flex-start;
  border-bottom: 1px solid var(--of-outline-variant);
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding-bottom: 0.9rem;
}

body.er-guard-inventory-page .er-inventory-view-note {
  color: var(--muted);
  font-size: 0.78rem;
  margin: 0.35rem 0 0;
}

body.er-guard-inventory-page .er-inventory-tab-stack {
  align-items: stretch;
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  justify-items: stretch;
  justify-self: center;
  width: min(100%, 900px);
}

body.er-guard-inventory-page .er-inventory-tab-group {
  display: grid;
  gap: 0.45rem;
  min-width: 0;
}

body.er-guard-inventory-page .er-inventory-tab-group-label {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

body.er-guard-inventory-page .er-inventory-usage-tabs {
  align-items: stretch;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  justify-content: stretch;
}

body.er-guard-inventory-page .er-inventory-usage-tab:last-child,
body.er-guard-inventory-page .er-inventory-type-tab:last-child {
  grid-column: 1 / -1;
}

body.er-guard-inventory-page .er-inventory-usage-tab {
  align-items: center;
  background: rgba(126, 184, 255, 0.06);
  border: 1px solid rgba(126, 184, 255, 0.22);
  border-radius: 0.65rem;
  color: var(--muted);
  display: inline-flex;
  flex: 1 1 0;
  gap: 0.45rem;
  min-height: 2.35rem;
  padding: 0.35rem 0.75rem;
  text-decoration: none;
  transition: border-color .18s ease, color .18s ease, background .18s ease;
}

body.er-guard-inventory-page .er-inventory-usage-tab strong {
  background: rgba(126, 184, 255, 0.16);
  border-radius: 999px;
  color: var(--text);
  font-size: 0.8rem;
  min-width: 1.65rem;
  padding: 0.12rem 0.35rem;
  text-align: center;
}

body.er-guard-inventory-page .er-inventory-usage-tab:hover,
body.er-guard-inventory-page .er-inventory-usage-tab.is-active {
  background: rgba(62, 207, 142, 0.12);
  border-color: var(--accent);
  color: var(--text);
}

body.er-guard-inventory-page .er-inventory-type-tabs {
  align-items: stretch;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  justify-content: stretch;
}

body.er-guard-inventory-page .er-inventory-type-tab {
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 0.65rem;
  color: var(--muted);
  display: inline-flex;
  flex: 1 1 0;
  gap: 0.45rem;
  min-height: 2.35rem;
  padding: 0.35rem 0.75rem;
  text-decoration: none;
  transition: border-color .18s ease, color .18s ease, background .18s ease;
}

body.er-guard-inventory-page .er-inventory-type-tab strong {
  background: rgba(126, 184, 255, 0.14);
  border-radius: 999px;
  color: var(--text);
  font-size: 0.8rem;
  min-width: 1.65rem;
  padding: 0.12rem 0.35rem;
  text-align: center;
}

body.er-guard-inventory-page .er-inventory-type-tab:hover,
body.er-guard-inventory-page .er-inventory-type-tab.is-active {
  background: rgba(62, 207, 142, 0.12);
  border-color: var(--accent);
  color: var(--text);
}

/* Inventory filters use the same compact pill language as the rest of the
   ER Guard dashboard. */
body.er-guard-inventory-page .er-inventory-usage-tabs,
body.er-guard-inventory-page .er-inventory-type-tabs {
  gap: 0.5rem;
}

body.er-guard-inventory-page .er-inventory-usage-tab,
body.er-guard-inventory-page .er-inventory-type-tab {
  background: rgba(6, 13, 29, 0.34);
  border: 1px solid rgba(126, 157, 208, 0.15);
  border-radius: 999px;
  color: var(--of-on-surface-variant, #c8d7ec);
  font-family: var(--of-font-body, inherit);
  font-size: 0.75rem;
  font-weight: 750;
  gap: 0.4rem;
  justify-content: center;
  min-height: 34px;
  padding: 5px 13px;
  transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease, transform 150ms ease;
}

body.er-guard-inventory-page .er-inventory-usage-tab strong,
body.er-guard-inventory-page .er-inventory-type-tab strong {
  background: transparent;
  border-radius: 0;
  color: inherit;
  font: inherit;
  min-width: 0;
  opacity: 0.86;
  padding: 0;
}

body.er-guard-inventory-page .er-inventory-usage-tab:hover,
body.er-guard-inventory-page .er-inventory-usage-tab:focus-visible,
body.er-guard-inventory-page .er-inventory-type-tab:hover,
body.er-guard-inventory-page .er-inventory-type-tab:focus-visible {
  background: rgba(94, 234, 212, 0.075);
  border-color: rgba(167, 243, 208, 0.38);
  color: var(--of-primary, #a7f3d0);
  transform: translateY(-1px);
}

body.er-guard-inventory-page .er-inventory-usage-tab.is-active,
body.er-guard-inventory-page .er-inventory-type-tab.is-active {
  background: linear-gradient(135deg, #a7f3d0, #8cebd2);
  border-color: rgba(167, 243, 208, 0.62);
  color: #06231c;
  box-shadow: 0 5px 14px rgba(45, 212, 191, 0.12);
}

html[data-dashboard-theme="light"] body.er-guard-inventory-page .er-inventory-usage-tab,
html[data-dashboard-theme="light"] body.er-guard-inventory-page .er-inventory-type-tab {
  background: #f8fafc;
  border-color: rgba(148, 163, 184, 0.28);
  color: #334155;
}

html[data-dashboard-theme="light"] body.er-guard-inventory-page .er-inventory-usage-tab:hover,
html[data-dashboard-theme="light"] body.er-guard-inventory-page .er-inventory-usage-tab:focus-visible,
html[data-dashboard-theme="light"] body.er-guard-inventory-page .er-inventory-type-tab:hover,
html[data-dashboard-theme="light"] body.er-guard-inventory-page .er-inventory-type-tab:focus-visible {
  border-color: rgba(16, 185, 129, 0.38);
  color: #047857;
}

html[data-dashboard-theme="light"] body.er-guard-inventory-page .er-inventory-usage-tab.is-active,
html[data-dashboard-theme="light"] body.er-guard-inventory-page .er-inventory-type-tab.is-active {
  background: linear-gradient(135deg, #ccfbf1, #a7f3d0);
  border-color: rgba(16, 185, 129, 0.5);
  color: #064e3b;
}

@media (max-width: 900px) {
  body.er-guard-inventory-page .er-dashboard-table-head {
    align-items: flex-start;
    flex-direction: column;
  }

  body.er-guard-inventory-page .er-inventory-type-tabs {
    grid-template-columns: 1fr;
    justify-content: flex-start;
    width: 100%;
  }

  body.er-guard-inventory-page .er-inventory-tab-stack {
    justify-items: start;
    grid-template-columns: 1fr;
    width: 100%;
  }

  body.er-guard-inventory-page .er-inventory-header-top {
    flex-direction: column;
    width: 100%;
  }

  body.er-guard-inventory-page .er-inventory-toolbar-actions {
    width: 100%;
  }

  body.er-guard-inventory-page .er-inventory-usage-tabs {
    grid-template-columns: 1fr;
    justify-content: flex-start;
    width: 100%;
  }

  body.er-guard-inventory-page .er-inventory-usage-tab:last-child,
  body.er-guard-inventory-page .er-inventory-type-tab:last-child {
    grid-column: auto;
  }
}

body.er-guard-inventory-page .er-inventory-row {
  cursor: pointer;
}

body.er-guard-inventory-page .er-inventory-row:hover,
body.er-guard-inventory-page .er-inventory-row:focus-visible {
  background: rgba(62, 207, 142, 0.08);
  outline: none;
}

body.er-guard-inventory-page .er-inventory-card-cell {
  align-items: center;
  display: flex;
  gap: 0.65rem;
  justify-content: center;
  text-align: center;
}

body.er-guard-inventory-page .er-inventory-link-cell {
  display: grid;
  gap: 0.35rem;
  justify-items: center;
  text-align: center;
}

body.er-guard-inventory-page .er-inventory-card-copy {
  display: grid;
  gap: 0.35rem;
  justify-items: center;
  text-align: center;
}

body.er-guard-inventory-page .er-inventory-card-cell strong,
body.er-guard-inventory-page .er-inventory-link-cell strong {
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.25;
}

body.er-guard-inventory-page .er-inventory-card-cell .record-source-pill {
  display: inline-flex;
  margin-left: auto;
  margin-right: auto;
}

body.er-guard-inventory-page .er-inventory-usage-badge {
  border: 1px solid rgba(62, 207, 142, 0.42);
  border-radius: 999px;
  color: #8ee8bd;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 0.16rem 0.45rem;
  text-transform: uppercase;
}

body.er-guard-inventory-page .er-inventory-usage-badge.is-pending {
  border-color: rgba(246, 196, 83, 0.45);
  color: #f6c453;
}

body.er-guard-inventory-page .er-inventory-link-meta {
  display: block;
  max-width: 100%;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

body.er-guard-inventory-page .er-inventory-create-dialog {
  width: min(760px, calc(100vw - 2rem));
}

body.er-guard-inventory-page .er-inventory-create-form {
  gap: 0;
}

body.er-guard-inventory-page .er-inventory-create-form .member-form-error {
  margin: 1rem 1.5rem 0;
}

body.er-guard-inventory-page .er-inventory-create-grid {
  padding: 1.35rem 1.5rem 1.2rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.15rem 1.3rem;
}

body.er-guard-inventory-page .er-inventory-generate-button {
  margin-left: auto;
  padding: 5px 9px;
  min-height: 30px;
  font-size: 0.72rem;
  line-height: 1.2;
}

body.er-guard-inventory-page .er-inventory-filter-grid {
  grid-template-columns: repeat(4, minmax(170px, 1fr));
}

body.er-guard-inventory-page .er-inventory-create-form .member-form-actions {
  margin-top: 0;
  padding: 1.15rem 1.5rem 1.35rem;
  border-top: 1px solid var(--border);
}

body.er-guard-dashboard-page .er-grid-head > *,
body.er-guard-dashboard-page .er-activation-grid > * {
  justify-content: flex-start;
  text-align: left;
}

body.er-guard-dashboard-page .er-grid-head > :nth-child(1),
body.er-guard-dashboard-page .er-grid-head > :nth-child(2),
body.er-guard-dashboard-page .er-grid-head > :nth-child(3),
body.er-guard-dashboard-page .er-grid-head > :nth-child(8),
body.er-guard-dashboard-page .er-grid-head > :nth-child(9),
body.er-guard-dashboard-page .er-activation-grid > :nth-child(1),
body.er-guard-dashboard-page .er-activation-grid > :nth-child(2),
body.er-guard-dashboard-page .er-activation-grid > :nth-child(3),
body.er-guard-dashboard-page .er-activation-grid > :nth-child(8),
body.er-guard-dashboard-page .er-activation-grid > :nth-child(9) {
  justify-content: center;
  text-align: center;
}

body.er-guard-dashboard-page .er-activation-row .member-row-name span:not(.record-source-pill) {
  display: block;
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
}

body.er-guard-dashboard-page .er-activation-row .member-row-name {
  display: grid;
  justify-items: center;
  text-align: center;
}

body.er-guard-dashboard-page .er-activation-row .member-row-name .record-source-pill {
  display: inline-flex;
  margin-left: auto;
  margin-right: auto;
}

body.er-guard-dashboard-page .member-filter-toggle {
  width: fit-content;
  min-width: 0;
  min-height: 44px;
  padding: 0.62rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--panel-2);
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
  transform: none;
}

body.er-guard-dashboard-page .member-filter-toggle .icon {
  width: 0.95rem;
  height: 0.95rem;
  color: #5ce8d4;
}

body.er-guard-dashboard-page .member-filter-toggle:hover,
body.er-guard-dashboard-page .member-filter-toggle:focus-visible {
  background: rgba(18, 26, 37, 0.98);
  border-color: var(--border-light);
  color: var(--text);
  transform: none;
}

body.er-guard-dashboard-page .member-status-pill.status-activated {
  color: #9ef0c5;
  background: rgba(46, 204, 113, 0.14);
  border-color: rgba(46, 204, 113, 0.32);
}

body.er-guard-dashboard-page .member-status-pill.status-available {
  color: #b7f7da;
  background: rgba(62, 207, 142, 0.14);
  border-color: rgba(62, 207, 142, 0.32);
}

body.er-guard-dashboard-page .member-status-pill.status-delivered {
  color: #b7f7da;
  background: rgba(62, 207, 142, 0.14);
  border-color: rgba(62, 207, 142, 0.32);
}

body.er-guard-dashboard-page .member-status-pill.status-not_delivered {
  color: #fde68a;
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(245, 158, 11, 0.34);
}

body.er-guard-dashboard-page .member-status-pill.status-inactive {
  color: #cbd5e1;
  background: rgba(148, 163, 184, 0.14);
  border-color: rgba(148, 163, 184, 0.28);
}

body.er-guard-dashboard-page .member-status-pill.status-pending_activation {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 7.8rem;
  white-space: normal;
  line-height: 1.05;
  overflow-wrap: normal;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(245, 158, 11, 0.32);
}

body.er-guard-dashboard-page .member-status-pill.status-expired,
body.er-guard-dashboard-page .member-status-pill.status-utilized,
body.er-guard-dashboard-page .member-status-pill.status-used {
  color: #fecdd3;
  background: rgba(244, 63, 94, 0.14);
  border-color: rgba(244, 63, 94, 0.32);
}

body.er-guard-dashboard-page .member-status-pill.status-utilized {
  color: #ddd6fe;
  background: rgba(139, 92, 246, 0.18);
  border-color: rgba(167, 139, 250, 0.42);
}

body.er-guard-dashboard-page .member-row-status {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.38rem;
  width: 100%;
  text-align: center;
}

body.er-guard-dashboard-page .er-status-date {
  display: block;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.35;
  margin-top: 0.05rem;
}

body.er-guard-dashboard-page .er-status-time {
  display: block;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.35;
}

body.er-guard-dashboard-page .er-status-payment {
  display: block;
  color: var(--of-on-surface-variant);
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.25;
}

body.er-guard-dashboard-page .er-activation-row {
  cursor: pointer;
}

body.er-guard-dashboard-page .er-activation-row:hover,
body.er-guard-dashboard-page .er-activation-row:focus-visible {
  background: rgba(62, 207, 142, 0.08);
  outline: none;
}

.er-activation-modal {
  color: var(--text);
}

/* Edit/payment errors must remain visible above the detail dialog. The
   dashboard toast stack is normally above standard modals, but ER Guard
   embeds can introduce their own stacking context. */
body.er-guard-dashboard-page .dashboard-flash-stack,
body.er-guard-billing-page .dashboard-flash-stack {
  z-index: 100000 !important;
}

.er-activation-dialog {
  width: min(1040px, calc(100vw - 1.5rem));
}

/* Action confirmations are hoisted out of the detail dialog. Keep them above
   the detail modal instead of inheriting the generic delete-modal layer. */
.er-activation-paid-modal,
.er-activation-utilize-modal,
.er-activation-request-modal,
.er-activation-delete-modal,
.er-activation-void-modal,
.er-activation-suspend-modal,
.er-activation-condition-modal,
.er-billing-refund-modal {
  z-index: 10001;
}

/* The refund form is a page-level dialog opened while the activation detail
   dialog is still visible. It must create the top stacking layer itself. */
.er-billing-refund-modal {
  z-index: 10002 !important;
}

.er-activation-modal .manual-ticket-close,
.er-activation-delete-modal .manual-ticket-close {
  color: #f8fafc;
}

.er-activation-modal .manual-ticket-close .icon,
.er-activation-delete-modal .manual-ticket-close .icon {
  width: 1.15rem;
  height: 1.15rem;
  color: currentColor;
}

.er-activation-modal .manual-ticket-close svg,
.er-activation-delete-modal .manual-ticket-close svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: currentColor;
  stroke: none;
}

html[data-dashboard-theme="light"] .er-activation-modal .manual-ticket-close,
html[data-dashboard-theme="light"] .er-activation-delete-modal .manual-ticket-close {
  color: #0f172a;
}

.er-activation-reference {
  min-width: 12rem;
}

.er-activation-detail-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.er-activation-edit-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

body.er-guard-dashboard-page .er-activation-paid-modal .manual-ticket-dialog {
  width: min(620px, calc(100vw - 2rem));
  max-height: min(82vh, 620px);
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(62, 207, 142, 0.2);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(24, 34, 51, 0.99), rgba(15, 23, 36, 0.99));
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.46);
}

body.er-guard-dashboard-page .er-activation-paid-modal .manual-ticket-header {
  align-items: center;
  margin: 0;
  padding: 1.1rem 1.25rem 1rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

body.er-guard-dashboard-page .er-activation-paid-modal .manual-ticket-header h2 {
  margin: 0.2rem 0 0;
  font-size: 1.25rem;
}

body.er-guard-dashboard-page .er-activation-paid-modal .manual-ticket-header p {
  margin: 0.45rem 0 0;
  font-size: 0.9rem;
}

body.er-guard-dashboard-page .er-activation-paid-modal .er-activation-paid-form {
  padding: 1.15rem 1.25rem 1.25rem;
}

body.er-guard-dashboard-page .er-activation-paid-modal .er-activation-paid-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

body.er-guard-dashboard-page .er-activation-paid-modal .member-form-actions {
  justify-content: flex-end;
  gap: 0.65rem;
  margin-top: 1rem;
}

body.er-guard-dashboard-page .er-activation-paid-modal .member-form-actions button {
  min-height: 2.7rem;
  padding: 0.58rem 0.9rem;
}

@media (max-width: 680px) {
  body.er-guard-dashboard-page .er-activation-paid-modal .er-activation-paid-grid {
    grid-template-columns: 1fr;
  }
}

body.er-guard-billing-page .er-dashboard-table-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

body.er-guard-billing-page .er-bulk-paid-toggle {
  min-width: 126px;
  white-space: nowrap;
}

body.er-guard-billing-page .er-billing-bulk-form {
  margin: 0;
}

body.er-guard-billing-page .er-billing-select {
  accent-color: var(--of-primary);
  flex: 0 0 auto;
  height: 1.15rem;
  margin: 0 0.65rem 0 0;
  width: 1.15rem;
}

body.er-guard-billing-page .er-billing-row .member-row-name {
  align-items: center;
  display: grid;
  gap: 0.7rem;
  grid-template-columns: auto minmax(0, 1fr);
}

body.er-guard-billing-page .er-billing-member-copy {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
  text-align: center;
}

body.er-guard-billing-page .er-billing-row .member-row-name.is-paid {
  display: flex;
  flex-direction: column;
}

body.er-guard-billing-page .er-billing-member-copy strong,
body.er-guard-billing-page .er-billing-member-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.er-guard-billing-page .er-billing-member-copy span {
  overflow: visible;
  overflow-wrap: anywhere;
  text-overflow: clip;
  white-space: normal;
  word-break: break-word;
}

body.er-guard-billing-page .er-billing-bulk-footer {
  align-items: center;
  border-top: 1px solid var(--of-border);
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  padding: 1rem 1.5rem;
}

body.er-guard-billing-page .er-billing-bulk-footer[hidden] {
  display: none;
}

body.er-guard-dashboard-page .er-activation-utilize-modal .manual-ticket-dialog {
  width: min(620px, calc(100vw - 2rem));
  max-height: min(82vh, 620px);
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(62, 207, 142, 0.2);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(24, 34, 51, 0.99), rgba(15, 23, 36, 0.99));
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.46);
}

body.er-guard-dashboard-page .er-activation-utilize-modal .manual-ticket-header {
  align-items: center;
  margin: 0;
  padding: 1.1rem 1.25rem 1rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

body.er-guard-dashboard-page .er-activation-utilize-modal .manual-ticket-header h2 { margin: 0.2rem 0 0; font-size: 1.25rem; }
body.er-guard-dashboard-page .er-activation-utilize-modal .manual-ticket-header p { margin: 0.45rem 0 0; font-size: 0.9rem; }
body.er-guard-dashboard-page .er-activation-utilize-modal .er-activation-utilize-form { padding: 1.15rem 1.25rem 1.25rem; }
body.er-guard-dashboard-page .er-activation-utilize-modal .er-activation-utilize-grid,
body.er-guard-dashboard-page .er-activation-actual-charge-modal .er-activation-utilize-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.9rem; }
body.er-guard-dashboard-page .er-activation-utilize-modal .member-form-actions { justify-content: flex-end; gap: 0.65rem; margin-top: 1rem; }

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-activation-utilize-modal .manual-ticket-dialog {
  border-color: rgba(15, 23, 42, 0.12);
  background: #ffffff;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.22);
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-activation-utilize-modal .manual-ticket-header {
  border-bottom-color: rgba(15, 23, 42, 0.1);
}

body.er-guard-dashboard-page .er-activation-resend-modal .manual-ticket-dialog {
  width: min(560px, calc(100vw - 2rem));
  max-height: min(86dvh, 680px);
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(62, 207, 142, 0.2);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(24, 34, 51, 0.99), rgba(15, 23, 36, 0.99));
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.46);
}

body.er-guard-dashboard-page .er-activation-resend-modal .manual-ticket-header {
  flex: 0 0 auto;
  align-items: center;
  margin: 0;
  padding: 1.1rem 1.25rem 1rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

body.er-guard-dashboard-page .er-activation-resend-modal .manual-ticket-header h2 { margin: 0.2rem 0 0; font-size: 1.25rem; }
body.er-guard-dashboard-page .er-activation-resend-modal .manual-ticket-header p { margin: 0.45rem 0 0; font-size: 0.9rem; }
body.er-guard-dashboard-page .er-activation-resend-modal .er-activation-resend-form {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scrollbar-color: rgba(69, 209, 154, 0.62) rgba(7, 15, 29, 0.72);
  padding: 1.15rem 1.25rem 1.25rem;
}
body.er-guard-dashboard-page .er-activation-resend-modal .er-activation-resend-form::-webkit-scrollbar { width: 10px; }
body.er-guard-dashboard-page .er-activation-resend-modal .er-activation-resend-form::-webkit-scrollbar-track { background: rgba(7, 15, 29, 0.72); }
body.er-guard-dashboard-page .er-activation-resend-modal .er-activation-resend-form::-webkit-scrollbar-thumb {
  background: rgba(69, 209, 154, 0.62);
  border: 3px solid rgba(7, 15, 29, 0.72);
  border-radius: 999px;
}
body.er-guard-dashboard-page .er-activation-resend-modal .er-activation-resend-form::-webkit-scrollbar-thumb:hover { background: #45d19a; }
body.er-guard-dashboard-page .er-activation-resend-modal .er-activation-paid-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.9rem; }
body.er-guard-dashboard-page .er-activation-resend-modal .member-form-actions { justify-content: flex-end; gap: 0.65rem; margin-top: 1rem; }

body.er-guard-dashboard-page .er-activation-resend-options {
  min-width: 0;
  margin: 1.35rem 0 0;
  padding: 0.9rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 0.75rem;
  background: rgba(7, 15, 29, 0.25);
}

body.er-guard-dashboard-page .er-activation-resend-options-title {
  margin-bottom: 0.65rem;
  color: var(--of-on-surface);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

body.er-guard-dashboard-page .er-activation-resend-package-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
}

body.er-guard-dashboard-page .er-activation-resend-package-choice {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  min-height: 3.8rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 0.65rem;
  background: rgba(7, 15, 29, 0.36);
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

body.er-guard-dashboard-page .er-activation-resend-package-choice:has(input:checked) {
  border-color: rgba(69, 209, 154, 0.72);
  background: rgba(69, 209, 154, 0.1);
  box-shadow: 0 0 0 2px rgba(69, 209, 154, 0.1);
}

body.er-guard-dashboard-page .er-activation-resend-package-choice input {
  flex: 0 0 auto;
  width: 1rem;
  height: 1rem;
  margin: 0.08rem 0 0;
  accent-color: #45d19a;
}

body.er-guard-dashboard-page .er-activation-resend-package-choice span {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

body.er-guard-dashboard-page .er-activation-resend-package-choice strong {
  color: var(--of-on-surface);
  font-size: 0.78rem;
  line-height: 1.2;
}

body.er-guard-dashboard-page .er-activation-resend-package-choice small,
body.er-guard-dashboard-page .er-activation-resend-package-note {
  color: var(--of-text-muted, #94a3b8);
  font-size: 0.7rem;
  line-height: 1.4;
}

body.er-guard-dashboard-page .er-activation-resend-package-note {
  grid-column: auto;
  align-self: center;
  margin: 0;
}

body.er-guard-dashboard-page .er-activation-resend-step[hidden] { display: none; }

body.er-guard-dashboard-page .er-activation-resend-review-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.05rem;
  border: 1px solid rgba(69, 209, 154, 0.24);
  border-radius: 0.75rem;
  background: linear-gradient(145deg, rgba(69, 209, 154, 0.1), rgba(21, 40, 54, 0.52));
}

body.er-guard-dashboard-page .er-activation-resend-review-card > div {
  display: grid;
  gap: 0.22rem;
}

body.er-guard-dashboard-page .er-activation-resend-review-label {
  color: #65e0b0;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

body.er-guard-dashboard-page .er-activation-resend-review-card strong {
  color: var(--of-on-surface);
  font-size: 0.98rem;
}

body.er-guard-dashboard-page .er-activation-resend-review-card p,
body.er-guard-dashboard-page .er-activation-resend-review-note {
  margin: 0;
  color: var(--of-text-muted, #94a3b8);
  font-size: 0.78rem;
  line-height: 1.45;
}

body.er-guard-dashboard-page .er-activation-resend-review-email {
  flex: 0 0 auto;
  max-width: 48%;
  color: var(--of-on-surface);
  font-size: 0.78rem;
  overflow-wrap: anywhere;
  text-align: right;
}

body.er-guard-dashboard-page .er-activation-resend-step[data-er-activation-resend-step="review"] .er-activation-digital-card-section {
  margin-top: 0.9rem;
}

body.er-guard-dashboard-page .er-activation-resend-review-note {
  margin-top: 0.8rem;
}

body.er-guard-dashboard-page .er-activation-digital-card-option {
  display: grid;
  gap: 0.8rem;
  margin-top: 1.15rem;
  padding: 1rem;
  border: 1px solid rgba(69, 209, 154, 0.22);
  border-radius: 0.85rem;
  background: linear-gradient(145deg, rgba(69, 209, 154, 0.1), rgba(21, 40, 54, 0.52));
}

body.er-guard-dashboard-page .er-activation-digital-card-toggle {
  position: relative;
  display: grid;
  grid-template-columns: 1.2rem minmax(0, 1fr);
  align-items: start;
  gap: 0.75rem;
  cursor: pointer;
}

body.er-guard-dashboard-page .er-activation-digital-card-toggle input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

body.er-guard-dashboard-page .er-activation-digital-card-checkbox {
  position: relative;
  display: grid;
  width: 1.2rem;
  height: 1.2rem;
  place-items: center;
  margin-top: 0.08rem;
  border: 1px solid rgba(164, 184, 205, 0.56);
  border-radius: 0.32rem;
  background: rgba(5, 15, 28, 0.56);
  transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

body.er-guard-dashboard-page .er-activation-digital-card-checkbox::after {
  content: "";
  width: 0.42rem;
  height: 0.24rem;
  border-left: 2px solid #06271a;
  border-bottom: 2px solid #06271a;
  transform: rotate(-45deg) scale(0);
  transition: transform 140ms ease;
}

body.er-guard-dashboard-page .er-activation-digital-card-toggle input:checked + .er-activation-digital-card-checkbox {
  border-color: #45d19a;
  background: #45d19a;
  box-shadow: 0 0 0 3px rgba(69, 209, 154, 0.14);
}

body.er-guard-dashboard-page .er-activation-digital-card-toggle input:checked + .er-activation-digital-card-checkbox::after { transform: rotate(-45deg) scale(1); }
body.er-guard-dashboard-page .er-activation-digital-card-toggle input:focus-visible + .er-activation-digital-card-checkbox { box-shadow: 0 0 0 3px rgba(69, 209, 154, 0.28); }

body.er-guard-dashboard-page .er-activation-digital-card-toggle-copy {
  display: grid;
  gap: 0.2rem;
}

body.er-guard-dashboard-page .er-activation-digital-card-toggle strong,
body.er-guard-dashboard-page .er-activation-digital-card-section strong {
  color: var(--of-on-surface);
  font-size: 0.88rem;
}

body.er-guard-dashboard-page .er-activation-digital-card-toggle small,
body.er-guard-dashboard-page .er-activation-digital-card-section p {
  margin: 0;
  color: var(--of-text-muted, #94a3b8);
  font-size: 0.78rem;
  line-height: 1.45;
}

body.er-guard-dashboard-page .er-activation-digital-card-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 0.7rem;
  background: rgba(7, 15, 29, 0.34);
}

body.er-guard-dashboard-page .er-activation-digital-card-section.is-hidden {
  display: none;
}

body.er-guard-dashboard-page .er-activation-digital-card-download {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.35rem;
  padding: 0.55rem 0.8rem;
  border: 1px solid rgba(69, 209, 154, 0.42);
  border-color: rgba(69, 209, 154, 0.42);
  border-radius: 0.55rem;
  color: #b9f5df;
  background: rgba(69, 209, 154, 0.09);
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

body.er-guard-dashboard-page .er-activation-digital-card-download:hover,
body.er-guard-dashboard-page .er-activation-digital-card-download:focus-visible {
  border-color: #45d19a;
  background: rgba(69, 209, 154, 0.16);
  color: #e2fff3;
}

body.er-guard-dashboard-page .er-activation-digital-card-copy {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  min-width: 0;
}

body.er-guard-dashboard-page .er-activation-digital-card-icon {
  display: grid;
  width: 2rem;
  height: 2rem;
  flex: 0 0 2rem;
  place-items: center;
  border: 1px solid rgba(69, 209, 154, 0.28);
  border-radius: 0.55rem;
  color: #65e0b0;
  background: rgba(69, 209, 154, 0.1);
}

body.er-guard-dashboard-page .er-activation-digital-card-icon svg { width: 1.05rem; height: 1.05rem; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }

@media (max-width: 560px) {
  body.er-guard-dashboard-page .er-activation-resend-modal .manual-ticket-dialog { max-height: calc(100dvh - 1rem); }
  body.er-guard-dashboard-page .er-activation-digital-card-section { align-items: stretch; flex-direction: column; }
  body.er-guard-dashboard-page .er-activation-digital-card-download { width: 100%; }
}

.er-activation-resend-hint {
  color: var(--of-text-muted, #94a3b8);
  font-size: 0.78rem;
  line-height: 1.4;
}

.er-email-log-table {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.35rem;
}

.er-email-log-row {
  display: grid;
  grid-template-columns: 1.15fr 1.5fr 1.15fr 0.95fr 0.95fr 0.8fr;
  gap: 0.75rem;
  align-items: start;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-md, 10px);
  background: var(--of-surface-container, rgba(148, 163, 184, 0.08));
  font-size: 0.82rem;
}

.er-email-log-head {
  background: transparent;
  padding-top: 0;
  padding-bottom: 0.35rem;
}

.er-email-log-head span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.er-email-log-row > span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.er-email-log-recipient {
  font-weight: 600;
}

.er-email-log-when,
.er-email-log-policy {
  /* Keep long timestamps and policy numbers inside their grid cells. */
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.er-email-log-failed {
  background: rgba(248, 113, 113, 0.09);
}

.er-email-log-status {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.er-email-log-status.status-sent {
  color: #052e1c;
  background: #4ade80;
}

.er-email-log-status.status-failed {
  color: #450a0a;
  background: #fca5a5;
}

.er-email-log-error {
  display: block;
  margin-top: 0.25rem;
  color: #fca5a5;
  font-size: 0.72rem;
  line-height: 1.35;
}

@media (max-width: 900px) {
  .er-email-log-row {
    grid-template-columns: 1fr;
    gap: 0.3rem;
  }

  .er-email-log-head {
    display: none;
  }
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-activation-resend-modal .manual-ticket-dialog {
  border-color: rgba(15, 23, 42, 0.12);
  background: #ffffff;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.22);
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-activation-resend-modal .manual-ticket-header {
  border-bottom-color: rgba(15, 23, 42, 0.1);
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-activation-digital-card-option {
  border-color: rgba(29, 96, 67, 0.18);
  background: linear-gradient(145deg, rgba(237, 252, 244, 0.96), rgba(248, 250, 252, 0.98));
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-activation-resend-package-choice {
  border-color: rgba(71, 85, 105, 0.18);
  background: rgba(248, 250, 252, 0.86);
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-activation-resend-options {
  border-color: rgba(71, 85, 105, 0.18);
  background: rgba(248, 250, 252, 0.62);
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-activation-resend-review-card {
  border-color: rgba(29, 96, 67, 0.18);
  background: linear-gradient(145deg, rgba(237, 252, 244, 0.96), rgba(248, 250, 252, 0.98));
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-activation-resend-package-choice:has(input:checked) {
  border-color: rgba(29, 96, 67, 0.52);
  background: rgba(237, 252, 244, 0.96);
  box-shadow: 0 0 0 2px rgba(29, 96, 67, 0.08);
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-activation-digital-card-section {
  border-color: rgba(5, 150, 105, 0.24);
  background: rgba(255, 255, 255, 0.72);
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-activation-digital-card-checkbox {
  border-color: rgba(71, 85, 105, 0.45);
  background: #ffffff;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-activation-digital-card-toggle input:checked + .er-activation-digital-card-checkbox {
  border-color: #1d6043;
  background: #1d6043;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-activation-digital-card-download {
  border-color: rgba(29, 96, 67, 0.3);
  color: #175c40;
  background: rgba(237, 252, 244, 0.88);
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-activation-digital-card-download:hover,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-activation-digital-card-download:focus-visible {
  border-color: #1d6043;
  background: #e2f7eb;
  color: #123526;
}

@media (max-width: 680px) {
  body.er-guard-dashboard-page .er-activation-resend-package-note {
    grid-column: auto;
  }

  body.er-guard-dashboard-page .er-activation-resend-modal .er-activation-paid-grid {
    grid-template-columns: 1fr;
  }

  body.er-guard-dashboard-page .er-activation-digital-card-section {
    align-items: stretch;
    flex-direction: column;
  }

  body.er-guard-dashboard-page .er-activation-digital-card-download {
    width: 100%;
    justify-content: center;
  }

  body.er-guard-dashboard-page .er-activation-resend-review-card {
    flex-direction: column;
  }

  body.er-guard-dashboard-page .er-activation-resend-review-email {
    max-width: none;
    text-align: left;
  }
}

body.er-guard-inventory-page .er-inventory-bulk-deliver-toggle {
  min-width: 142px;
  white-space: nowrap;
}

body.er-guard-inventory-page .er-inventory-bulk-footer {
  align-items: center;
  border-top: 1px solid var(--of-border);
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  padding: 1rem 1.5rem;
}

body.er-guard-inventory-page .er-inventory-bulk-footer[hidden] {
  display: none;
}

body.er-guard-inventory-page .er-inventory-select {
  accent-color: var(--of-primary);
  flex: 0 0 auto;
  height: 1.15rem;
  margin: 0;
  width: 1.15rem;
}

/* Billing filter treatment: compact, pill-based controls matching the reference UI. */
body.er-guard-billing-page .er-billing-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.75rem 2rem 1.35rem;
  background: var(--of-surface-container-low);
}

body.er-guard-billing-page .er-billing-filter-bar .er-dashboard-search {
  flex: 1 1 auto;
  min-width: 260px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

body.er-guard-billing-page .er-billing-filter-bar .member-search-toolbar {
  display: block;
}

body.er-guard-billing-page .er-billing-filter-bar .member-search {
  width: min(100%, 480px);
  min-height: 44px;
  border-radius: 9px;
  border-color: rgba(90, 108, 134, 0.36);
  background: rgba(11, 18, 29, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

body.er-guard-billing-page .er-billing-filter-bar .member-search-label {
  width: 42px;
  border-right: 0;
}

body.er-guard-billing-page .er-billing-filter-bar .member-search-label .icon {
  color: #6d7e98;
}

body.er-guard-billing-page .er-billing-filter-bar .member-search input {
  min-height: 42px;
  padding: 0 12px 0 0;
  color: #dce7f6;
  font-size: 0.88rem;
  font-weight: 500;
}

body.er-guard-billing-page .er-billing-filter-bar .member-search input::placeholder {
  color: #61718a;
}

body.er-guard-billing-page .er-billing-company-tabs {
  flex: 0 0 auto;
  align-items: center;
  padding: 0;
  margin: 0;
  border: 0;
  overflow: visible;
}

body.er-guard-billing-page .er-billing-company-tabs .member-detail-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  min-width: auto;
  min-height: 2.25rem;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border-color: rgba(90, 108, 134, 0.24);
  background: rgba(18, 26, 40, 0.78);
  color: #93a2b8;
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
}

body.er-guard-billing-page .er-billing-company-tabs .member-detail-tab strong {
  color: #73839b;
  font-size: 0.68rem;
  font-weight: 800;
}

body.er-guard-billing-page .er-billing-company-tabs .member-detail-tab:hover,
body.er-guard-billing-page .er-billing-company-tabs .member-detail-tab:focus-visible {
  border-color: rgba(55, 205, 205, 0.45);
  background: rgba(22, 39, 54, 0.92);
  color: #dbeafe;
}

body.er-guard-billing-page .er-billing-company-tabs .member-detail-tab.is-active {
  border-color: rgba(58, 215, 210, 0.78);
  background: rgba(20, 61, 69, 0.7);
  color: #5ee7df;
  box-shadow: 0 0 18px rgba(45, 212, 191, 0.18), inset 0 0 0 1px rgba(45, 212, 191, 0.12);
}

body.er-guard-billing-page .er-billing-company-tabs .member-detail-tab.is-active strong {
  color: #55c9c8;
}

/* Billing uses the same compact filter layout as the activation directory. */
body.er-guard-billing-page .er-dashboard-table-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  min-height: 60px;
}

body.er-guard-billing-page .er-billing-filter-bar {
  align-items: center;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.9rem;
  padding: 1rem 1.5rem 1.15rem;
}

body.er-guard-billing-page .er-billing-filter-toolbar {
  grid-column: 2;
  grid-row: 1;
  align-items: center;
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-start;
  gap: 0.75rem;
}

body.er-guard-billing-page .er-billing-status-tabs {
  grid-column: 1;
  grid-row: 1;
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  min-width: 0;
}

body.er-guard-billing-page .er-billing-status-tabs .ticket-filter-pill {
  flex: 0 0 auto;
  justify-content: center;
  text-align: center;
}

body.er-guard-billing-page .er-billing-company-tabs {
  grid-column: 1 / -1;
  grid-row: 2;
  min-width: 0;
}

body.er-guard-billing-page #er-billing-filter-panel {
  grid-column: 1 / -1;
  grid-row: 3;
  margin: 0;
  width: 100%;
}

body.er-guard-billing-page #er-billing-filter-panel form {
  display: grid;
  gap: 1rem;
}

body.er-guard-billing-page .er-billing-date-filter-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

body.er-guard-billing-page .er-billing-ml-branch-filter {
  display: grid;
  gap: 0.55rem;
  width: min(100%, 22rem);
  max-width: 22rem;
}

body.er-guard-billing-page .er-billing-ml-branch-dropdown {
  position: relative;
  color: var(--of-on-surface, #f3f7fb);
}

body.er-guard-billing-page .er-billing-ml-branch-dropdown summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 2.2rem;
  padding: 0.42rem 0.7rem;
  border: 1px solid var(--of-outline, rgba(143, 161, 180, 0.45));
  border-radius: 0.65rem;
  background: var(--of-surface-container-high, #18243a);
  color: var(--of-on-surface, #f3f7fb);
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 700;
  list-style: none;
}

body.er-guard-billing-page .er-billing-ml-branch-dropdown summary::-webkit-details-marker {
  display: none;
}

body.er-guard-billing-page .er-billing-ml-branch-dropdown summary span {
  width: 0.55rem;
  height: 0.55rem;
  margin-left: 0.75rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-0.15rem);
  transition: transform 160ms ease;
}

body.er-guard-billing-page .er-billing-ml-branch-dropdown[open] summary span {
  transform: rotate(225deg) translate(-0.15rem, -0.1rem);
}

body.er-guard-billing-page .er-billing-ml-branch-dropdown summary:focus-visible {
  outline: 2px solid var(--of-primary, #62e3aa);
  outline-offset: 2px;
}

body.er-guard-billing-page .er-billing-ml-branch-options {
  position: absolute;
  z-index: 8;
  top: calc(100% + 0.35rem);
  left: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  max-height: 14.2rem;
  overflow-y: auto;
  padding: 0.35rem;
  border: 1px solid var(--of-outline, rgba(143, 161, 180, 0.45));
  border-radius: 0.65rem;
  background: var(--of-surface-container-highest, #202d45);
  box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.28);
  scrollbar-width: thin;
}

body.er-guard-billing-page .er-billing-ml-branch-options label {
  display: grid;
  grid-template-columns: 1.1rem minmax(0, 1fr);
  align-items: start;
  justify-content: initial;
  column-gap: 0.6rem;
  box-sizing: border-box;
  width: 100%;
  min-height: 2.7rem;
  height: auto;
  padding: 0.45rem 0.65rem;
  border-radius: 0.45rem;
  color: var(--of-on-surface, #f3f7fb);
  cursor: pointer;
  text-align: left;
}

body.er-guard-billing-page .er-billing-ml-branch-options label:hover,
body.er-guard-billing-page .er-billing-ml-branch-options label:focus-within {
  background: var(--of-surface-container-high, #293750);
}

body.er-guard-billing-page .er-billing-ml-branch-options input {
  width: 1rem;
  height: 1rem;
  margin: 0.2rem 0 0;
  justify-self: start;
  accent-color: var(--of-primary, #62e3aa);
}

body.er-guard-billing-page .er-billing-ml-branch-options label span {
  display: block;
  min-width: 0;
  width: auto;
  overflow: visible;
  overflow-wrap: anywhere;
  white-space: normal;
  line-height: 1.35;
  text-align: left;
}

body.er-guard-billing-page .er-billing-ml-branch-empty {
  display: block;
  padding: 0.65rem;
  color: var(--of-on-surface-variant, #9aa9bd);
  font-size: 0.8rem;
}

html[data-dashboard-theme="light"] body.er-guard-billing-page .er-billing-ml-branch-dropdown summary,
html[data-dashboard-theme="light"] body.er-guard-billing-page .er-billing-ml-branch-options {
  background: var(--of-surface-container-high, #f4f7fb);
  color: var(--of-on-surface, #1d2b40);
}

html[data-dashboard-theme="light"] body.er-guard-billing-page .er-billing-ml-branch-options label:hover,
html[data-dashboard-theme="light"] body.er-guard-billing-page .er-billing-ml-branch-options label:focus-within {
  background: var(--of-surface-container, #e8eef5);
}

html[data-dashboard-theme="light"] body.er-guard-billing-page .er-billing-ml-branch-options {
  box-shadow: 0 1rem 2rem rgba(46, 61, 82, 0.18);
}

body.er-guard-billing-page .er-billing-analytics {
  display: grid;
  gap: 1rem;
  padding: 1.25rem 1.5rem 1.35rem;
  border-bottom: 1px solid var(--of-outline-variant);
  background: var(--of-surface-container-lowest);
}

body.er-guard-billing-page .er-billing-analytics-head h3,
body.er-guard-billing-page .er-billing-analytics-head p {
  margin: 0;
}

body.er-guard-billing-page .er-billing-analytics-head h3 {
  color: var(--of-on-surface);
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

body.er-guard-billing-page .er-billing-analytics-head p {
  margin-top: 0.25rem;
  color: var(--of-on-surface-variant);
  font-size: 0.78rem;
}

body.er-guard-billing-page .er-billing-analytics-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

body.er-guard-billing-page .er-billing-analytics-card {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
  padding: 0.85rem 1rem;
  border: 1px solid var(--of-outline-variant);
  border-radius: var(--of-radius-md, 10px);
  background: var(--of-surface-container);
}

body.er-guard-billing-page .er-billing-analytics-card span,
body.er-guard-billing-page .er-billing-analytics-card small {
  color: var(--of-on-surface-variant);
}

body.er-guard-billing-page .er-billing-analytics-card span { font-size: 0.74rem; font-weight: 700; }
body.er-guard-billing-page .er-billing-analytics-card strong { color: var(--of-on-surface); font-size: 1.45rem; line-height: 1.1; }
body.er-guard-billing-page .er-billing-analytics-card small { font-size: 0.7rem; }
body.er-guard-billing-page .er-billing-analytics-card.is-positive strong { color: #62e3aa; }
body.er-guard-billing-page .er-billing-analytics-card.is-warning strong { color: #f4c56b; }
body.er-guard-billing-page .er-billing-analytics-card.is-accent strong { color: #6ddbd8; }
body.er-guard-billing-page .er-billing-analytics-card.is-risk strong { color: #f28b8b; }
body.er-guard-billing-page .er-billing-analytics-legacy { display: none; }
body.er-guard-billing-page .er-billing-analytics-panel { margin: 0; }

body.er-guard-billing-page .er-billing-analytics-breakdown {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 1rem;
}

body.er-guard-billing-page .er-billing-analytics-breakdown-item {
  display: grid;
  gap: 0.45rem;
  min-width: 0;
  padding-top: 0.2rem;
}

body.er-guard-billing-page .er-billing-analytics-breakdown-item > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

body.er-guard-billing-page .er-billing-analytics-breakdown-item span,
body.er-guard-billing-page .er-billing-analytics-breakdown-item small { color: var(--of-on-surface-variant); font-size: 0.74rem; }
body.er-guard-billing-page .er-billing-analytics-breakdown-item strong { color: var(--of-on-surface); font-size: 0.74rem; text-align: right; }
body.er-guard-billing-page .er-billing-analytics-track { height: 0.45rem; overflow: hidden; border-radius: 999px; background: var(--of-surface-container-high); }
body.er-guard-billing-page .er-billing-analytics-track span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #3ecf8e, #6ddbd8); }

body.er-guard-billing-page .er-billing-upload {
  margin-top: 0;
}

body.er-guard-billing-page .er-billing-overview-grid {
  display: grid;
  /* The remittance upload panel is currently disabled, so let the signals
     panel use the full dashboard width instead of leaving an empty column. */
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  align-items: stretch;
}

body.er-guard-billing-page .er-billing-overview-grid > .er-billing-analytics,
body.er-guard-billing-page .er-billing-overview-grid > .er-billing-upload {
  min-width: 0;
  height: 100%;
}

body.er-guard-billing-page .er-billing-analytics {
  width: 100%;
  box-sizing: border-box;
}

body.er-guard-billing-page .er-billing-upload .member-panel-copy p {
  max-width: 52rem;
}

body.er-guard-billing-page .er-billing-upload-note {
  align-self: flex-start;
  padding: 0.35rem 0.65rem;
  border: 1px solid rgba(109, 219, 216, 0.35);
  border-radius: 999px;
  color: #6ddbd8;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body.er-guard-billing-page .er-billing-upload .of-upload-zone {
  min-height: 7rem;
}

body.er-guard-billing-page .er-billing-unmatched-option {
  display: flex;
  width: 100%;
  box-sizing: border-box;
  gap: 0.65rem;
  align-items: flex-start;
  justify-content: flex-start;
  margin: 1rem 0 0;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  cursor: pointer;
}

body.er-guard-billing-page .er-billing-unmatched-option.is-disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

body.er-guard-billing-page .er-billing-unmatched-option input {
  flex: 0 0 1.1rem;
  width: 1.1rem;
  height: 1.1rem;
  margin-top: 0.2rem;
  accent-color: var(--brand);
}

body.er-guard-billing-page .er-billing-unmatched-option span {
  flex: 1 1 auto;
  min-width: 0;
  display: grid;
  gap: 0.2rem;
}

body.er-guard-billing-page .er-billing-unmatched-option small {
  color: var(--of-on-surface-variant);
}

body.er-guard-billing-page .er-billing-analytics-metrics {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 680px) {
  body.er-guard-billing-page .er-billing-overview-grid {
    grid-template-columns: 1fr;
  }

  body.er-guard-billing-page .er-billing-analytics-metrics {
    grid-template-columns: 1fr;
  }

  body.er-guard-billing-page .er-billing-upload-note {
    display: none;
  }
  body.er-guard-dashboard-page .er-activation-utilize-modal .er-activation-utilize-grid,
  body.er-guard-dashboard-page .er-activation-actual-charge-modal .er-activation-utilize-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  body.er-guard-billing-page .er-billing-filter-bar {
    align-items: stretch;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.25rem;
  }

  body.er-guard-billing-page .er-billing-filter-bar .member-search,
  body.er-guard-billing-page .er-billing-company-tabs {
    width: 100%;
  }

  body.er-guard-billing-page .er-billing-company-tabs {
    overflow-x: auto;
    padding-bottom: 0.2rem;
  }
}

/* The request form uses .manual-field rather than .member-field, so the
   shared span-2 rule does not apply here. Give the document picker the full
   row so selected filenames remain readable. */
.er-activation-request-grid .manual-field.span-2 {
  grid-column: 1 / -1;
}

.er-activation-request-grid input[type="file"] {
  min-width: 0;
  width: 100%;
}

.er-activation-request-grid .er-activation-request-reason {
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-height: 7rem;
  resize: vertical;
  line-height: 1.45;
}

/* Keep the cancellation field and footer as distinct layout rows. The generic
   modal styles do not reserve enough space when the textarea fills its row. */
body.er-guard-dashboard-page .er-activation-request-modal .manual-ticket-dialog {
  width: min(760px, calc(100vw - 2rem));
  max-height: min(82vh, 620px);
}

body.er-guard-dashboard-page .er-activation-delete-modal .member-delete-dialog {
  width: min(640px, calc(100vw - 2rem));
  max-height: min(82vh, 560px);
}

/* Keep the card suspension confirmation compact even when the shared
   short-viewport modal rule would otherwise stretch it across the screen. */
body.er-guard-dashboard-page .er-activation-suspend-modal .member-delete-dialog {
  width: min(540px, calc(100vw - 2rem));
  max-width: calc(100vw - 2rem);
  max-height: min(82vh, 560px);
  padding: 1.25rem;
}

body.er-guard-dashboard-page .er-activation-condition-modal .member-detail-dialog {
  width: min(540px, calc(100vw - 2rem));
  max-width: calc(100vw - 2rem);
  max-height: min(82vh, 560px);
  padding: 1.25rem;
}

body.er-guard-dashboard-page .er-activation-suspend-modal .member-delete-header {
  margin-bottom: 1rem;
}

body.er-guard-dashboard-page .er-activation-suspend-modal .er-activation-suspend-subheader {
  max-width: 42rem;
  margin-top: 0.35rem;
  color: var(--of-on-surface-variant);
  font-size: 0.78rem;
  line-height: 1.4;
}

body.er-guard-dashboard-page .er-activation-suspend-modal .member-delete-reason-field textarea {
  min-height: 7rem;
}

body.er-guard-dashboard-page .er-activation-suspend-modal .er-activation-suspend-condition-field,
body.er-guard-dashboard-page .er-activation-condition-modal .er-activation-suspend-condition-field {
  min-width: 0;
  margin: 0 0 0.85rem;
  padding: 0;
  border: 0;
}

body.er-guard-dashboard-page .er-activation-suspend-modal .er-activation-suspend-condition-field legend,
body.er-guard-dashboard-page .er-activation-condition-modal .er-activation-suspend-condition-field legend {
  margin-bottom: 0.55rem;
  color: var(--of-on-surface);
  font-size: 0.82rem;
  font-weight: 800;
}

body.er-guard-dashboard-page .er-activation-suspend-modal .er-activation-suspend-condition-options,
body.er-guard-dashboard-page .er-activation-condition-modal .er-activation-suspend-condition-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

body.er-guard-dashboard-page .er-activation-suspend-modal .er-activation-suspend-condition-option,
body.er-guard-dashboard-page .er-activation-condition-modal .er-activation-suspend-condition-option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 2.65rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--of-outline-variant);
  border-radius: 0.7rem;
  background: var(--of-surface-container-low);
  color: var(--of-on-surface);
  cursor: pointer;
}

body.er-guard-dashboard-page .er-activation-suspend-modal .er-activation-suspend-condition-option::before,
body.er-guard-dashboard-page .er-activation-condition-modal .er-activation-suspend-condition-option::before {
  content: "";
  flex: 0 0 1rem;
  inline-size: 1rem;
  block-size: 1rem;
  border: 2px solid rgba(145, 164, 193, 0.8);
  border-radius: 50%;
  background: transparent;
}

body.er-guard-dashboard-page .er-activation-suspend-modal .er-activation-suspend-condition-option:has(input:checked),
body.er-guard-dashboard-page .er-activation-condition-modal .er-activation-suspend-condition-option:has(input:checked) {
  border-color: #45d19a;
  background: rgba(69, 209, 154, 0.12);
}

body.er-guard-dashboard-page .er-activation-suspend-modal .er-activation-suspend-condition-option input,
body.er-guard-dashboard-page .er-activation-condition-modal .er-activation-suspend-condition-option input {
  position: absolute;
  inline-size: 1px !important;
  block-size: 1px !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  opacity: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0 !important;
}

body.er-guard-dashboard-page .er-activation-suspend-modal .er-activation-suspend-condition-option:has(input:checked)::before,
body.er-guard-dashboard-page .er-activation-condition-modal .er-activation-suspend-condition-option:has(input:checked)::before {
  border-color: #45d19a;
  background: radial-gradient(circle, #45d19a 0 42%, transparent 45%);
}

body.er-guard-dashboard-page .er-activation-suspend-modal .er-activation-suspend-condition-option:has(input:focus-visible),
body.er-guard-dashboard-page .er-activation-condition-modal .er-activation-suspend-condition-option:has(input:focus-visible) {
  outline: 2px solid rgba(69, 209, 154, 0.55);
  outline-offset: 2px;
}

@media (max-width: 520px) {
  body.er-guard-dashboard-page .er-activation-suspend-modal .er-activation-suspend-condition-options,
  body.er-guard-dashboard-page .er-activation-condition-modal .er-activation-suspend-condition-options {
    grid-template-columns: 1fr;
  }
}

body.er-guard-dashboard-page .er-activation-suspend-modal .member-delete-actions,
body.er-guard-dashboard-page .er-activation-condition-modal .member-delete-actions {
  gap: 0.65rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--of-outline-variant);
}

/* Keep inventory reset confirmation visually contained by the inventory
   card modal and use a compact confirmation surface. */
body.er-guard-dashboard-page .er-inventory-card-modal .er-activation-reset-modal {
  z-index: 2;
  padding: 1rem;
}

body.er-guard-dashboard-page .er-inventory-card-modal .er-activation-reset-modal .member-delete-dialog {
  width: min(420px, calc(100vw - 2rem));
  max-width: 100%;
  max-height: min(70vh, 360px);
}

body.er-guard-dashboard-page .er-inventory-card-modal .er-activation-reset-modal .member-delete-header {
  padding: 1rem 1.1rem 0.8rem;
}

body.er-guard-dashboard-page .er-inventory-card-modal .er-activation-reset-modal .member-delete-header p {
  margin-bottom: 0;
}

body.er-guard-dashboard-page .er-inventory-card-modal .er-activation-reset-modal .member-delete-actions {
  gap: 0.55rem;
  margin-top: 0;
  padding: 0.8rem 1.1rem 1rem;
}

body.er-guard-dashboard-page .er-activation-void-modal .member-delete-dialog {
  width: min(640px, calc(100vw - 2rem));
  max-height: min(82vh, 560px);
}

body.er-guard-dashboard-page .er-activation-void-modal .member-delete-actions {
  margin-top: 1rem;
}

body.er-guard-dashboard-page .er-activation-request-modal .member-modal-form {
  gap: 0;
}

body.er-guard-dashboard-page .er-activation-request-modal .er-activation-request-grid {
  margin-bottom: 1.25rem;
}

body.er-guard-dashboard-page .er-activation-request-modal .member-delete-actions {
  align-items: center;
  gap: 0.75rem;
  margin: 0;
}

body.er-guard-dashboard-page .er-activation-request-modal .er-activation-form-error:not(.is-hidden) {
  margin-top: 0.75rem;
}

.er-activation-edit-field {
  display: grid;
  justify-items: stretch;
  align-content: start;
  gap: 0.18rem;
  min-width: 0;
  min-height: 4.3rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid rgba(39, 49, 63, 0.72);
  border-radius: var(--radius-md);
  background: rgba(9, 14, 20, 0.58);
}

.er-activation-edit-field > span:first-child {
  display: block;
  padding-bottom: 0.1rem;
  color: rgba(145, 170, 235, 0.52);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1.15;
  text-transform: uppercase;
}

.er-activation-edit-field input,
.er-activation-edit-field select,
.er-activation-edit-field textarea {
  width: 100%;
  min-height: 1.75rem;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0;
  color: var(--text);
  background: transparent;
  font-size: 0.94rem;
  font-weight: 600;
  line-height: 1.15;
  box-shadow: none;
}

.er-activation-edit-field select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 3rem;
  background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2393a3b5' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1.25rem center;
  background-size: 0.95rem 0.95rem;
}

.er-activation-edit-field input:focus,
.er-activation-edit-field select:focus,
.er-activation-edit-field textarea:focus {
  border-color: rgba(62, 207, 142, 0.48);
  padding-inline: 0.45rem;
  background: rgba(15, 23, 34, 0.78);
  outline: none;
  box-shadow: 0 0 0 3px rgba(62, 207, 142, 0.12);
}

.er-activation-edit-field.is-invalid,
.er-activation-edit-field:has([aria-invalid="true"]) {
  border-color: rgba(255, 91, 124, 0.7);
  box-shadow: 0 0 0 1px rgba(255, 91, 124, 0.12);
}

.er-activation-edit-field .member-field-error {
  min-height: 1rem;
  margin-top: 0.08rem;
  line-height: 1.2;
}

html[data-dashboard-theme="light"] .er-activation-edit-field {
  border-color: rgba(15, 23, 42, 0.1);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 250, 252, 0.98));
  color: #15202b;
  box-shadow: none;
}

html[data-dashboard-theme="light"] .er-activation-edit-field > span:first-child {
  color: #5f6d7b;
  -webkit-text-fill-color: #5f6d7b;
}

html[data-dashboard-theme="light"] .er-activation-edit-field input,
html[data-dashboard-theme="light"] .er-activation-edit-field select,
html[data-dashboard-theme="light"] .er-activation-edit-field textarea {
  border-color: transparent !important;
  background: transparent !important;
  color: #15202b !important;
  -webkit-text-fill-color: #15202b !important;
  box-shadow: none !important;
}

html[data-dashboard-theme="light"] .er-activation-edit-field input:focus,
html[data-dashboard-theme="light"] .er-activation-edit-field select:focus,
html[data-dashboard-theme="light"] .er-activation-edit-field textarea:focus {
  border-color: rgba(29, 96, 67, 0.38) !important;
  background: rgba(255, 255, 255, 0.82) !important;
  box-shadow: 0 0 0 3px rgba(29, 96, 67, 0.12) !important;
}

html[data-dashboard-theme="light"] .er-activation-edit-field.is-invalid,
html[data-dashboard-theme="light"] .er-activation-edit-field:has([aria-invalid="true"]) {
  border-color: #fda4af;
  box-shadow: 0 0 0 1px rgba(180, 35, 72, 0.12);
}

.er-activation-form-error {
  min-height: 1.1rem;
  color: var(--danger);
  font-weight: 800;
}

.er-activation-form-error.is-hidden {
  display: none;
}

.er-activation-detail-grid .member-detail-value {
  overflow-wrap: anywhere;
}

/* Keep long status labels contained within their detail-grid cell. The
   shared status-pill component is intentionally single-line for tables, but
   activation details can be much narrower on smaller dialogs. */
.er-activation-detail-grid .member-status-pill {
  box-sizing: border-box;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: center;
}

.er-activation-audit-list {
  max-height: min(52vh, 560px);
  overflow: auto;
  padding-right: 0.15rem;
}

.er-activation-files-layout {
  align-items: stretch;
}

.er-activation-file-list {
  max-height: min(48vh, 28rem);
}

.er-activation-file-preview-panel .member-loa-preview-frame-wrap {
  min-height: min(48vh, 28rem);
}

.er-activation-file-preview-panel .member-loa-preview-frame {
  height: min(48vh, 28rem);
}

.er-activation-file-preview-panel .member-loa-preview-image {
  display: block;
  width: 100%;
  height: min(48vh, 28rem);
  object-fit: contain;
  background: #050a0f;
}

.er-activation-file-preview-panel .member-loa-download-link,
html[data-dashboard-theme="light"] .er-activation-file-preview-panel .member-loa-download-link {
  min-height: 2.25rem !important;
  padding: 0.5rem 0.8rem !important;
  border: 1px solid currentColor !important;
  border-radius: 7px !important;
  background: transparent !important;
  text-decoration: none !important;
  box-shadow: none !important;
}

.er-activation-file-preview-panel .member-loa-download-link:hover,
.er-activation-file-preview-panel .member-loa-download-link:focus-visible {
  background: rgba(80, 220, 159, 0.12) !important;
}

html[data-dashboard-theme="light"] .er-activation-modal {
  color: #15202b;
}

html[data-dashboard-theme="light"] .er-activation-dialog {
  border-color: rgba(15, 23, 42, 0.1);
  background: #ffffff;
}

html[data-dashboard-theme="light"] .er-activation-reference {
  border-color: rgba(15, 23, 42, 0.1);
  background: #f8fafc;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-activation-row:hover,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-activation-row:focus-visible {
  background: rgba(29, 96, 67, 0.07);
}

body.er-guard-dashboard-page .er-empty-state {
  margin: 0;
  padding: var(--space-3xl);
  border-color: rgba(80, 96, 125, 0.48);
  border-radius: 0;
  background: rgba(8, 13, 24, 0.62);
  color: var(--muted);
}

body.er-guard-dashboard-page .er-empty-state h3 {
  margin-top: var(--space-lg);
  color: var(--muted);
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: 0;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-filter-toggle {
  border-color: rgba(15, 23, 42, 0.12);
  background: #ffffff;
  color: #15202b;
  box-shadow: none;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-filter-toggle .icon {
  color: #1d6043;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-filter-toggle:hover,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-filter-toggle:focus-visible {
  border-color: rgba(29, 96, 67, 0.24);
  background: rgba(237, 252, 244, 0.98);
  color: #1d6043;
  transform: none;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-empty-state {
  border-color: rgba(15, 23, 42, 0.12);
  background: #f8fafc;
  color: #64748b;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-empty-state h3 {
  color: #64748b;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-status-pill.status-activated {
  color: #065f46;
  background: #dcfce7;
  border-color: #86efac;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-status-pill.status-available {
  color: #065f46;
  background: #dcfce7;
  border-color: #86efac;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-status-pill.status-delivered {
  color: #065f46;
  background: #dcfce7;
  border-color: #86efac;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-status-pill.status-not_delivered {
  color: #854d0e;
  background: #fef3c7;
  border-color: #fcd34d;
}

html[data-dashboard-theme="light"] body.er-guard-inventory-page .er-inventory-card-cell strong,
html[data-dashboard-theme="light"] body.er-guard-inventory-page .er-inventory-link-cell strong {
  color: #0f172a;
}

html[data-dashboard-theme="light"] body.er-guard-inventory-page .er-inventory-link-meta {
  color: #64748b;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-status-pill.status-inactive {
  color: #475569;
  background: #f1f5f9;
  border-color: #cbd5e1;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-status-pill.status-pending_activation {
  color: #854d0e;
  background: #fef3c7;
  border-color: #fcd34d;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-status-pill.status-expired,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-status-pill.status-utilized,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-status-pill.status-used {
  color: #991b1b;
  background: #fee2e2;
  border-color: #fca5a5;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-status-pill.status-utilized {
  color: #6d28d9;
  background: #ede9fe;
  border-color: #c4b5fd;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-status-date {
  color: #64748b;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-status-time {
  color: #64748b;
}

.er-dashboard-footer {
  margin-top: 1rem;
}

@media (max-width: 760px) {
  .er-public-topbar {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .er-public-branding {
    gap: 0.7rem;
    width: calc(100% - 3.5rem);
  }

  .er-public-topbar-actions {
    align-items: center;
    margin-left: auto;
  }

    .er-brand-lockup {
      width: 5.5rem;
    }

  .er-brand-lockup img {
    max-height: none;
  }

  .er-support-open {
    right: 1rem;
    bottom: 1rem;
    min-height: 3rem;
    padding-right: 1rem;
    font-size: 0.82rem;
  }

  .er-support-form {
    grid-template-columns: 1fr;
  }

  .er-support-header .er-support-close {
    width: 2.7rem;
  }

  .er-support-form .er-field,
  .er-support-actions {
    grid-column: span 1;
  }

  .er-support-form .er-support-concern-field {
    grid-column: span 1;
  }

  .er-support-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .er-support-actions button {
    width: 100%;
  }

  body.er-guard-dashboard-page .er-dashboard-actions-grid,
  body.er-guard-dashboard-page .er-create-form-grid,
  body.er-guard-inventory-page .er-inventory-filter-grid,
  body.er-guard-inventory-page .er-inventory-create-grid {
    grid-template-columns: 1fr;
  }

  body.er-guard-dashboard-page .er-create-form .member-field[data-er-create-field="street_address"],
  body.er-guard-dashboard-page .er-create-form .member-field[data-er-create-field="remarks_status_client_account_name"] {
    grid-column: span 1;
  }

  body.er-guard-dashboard-page .er-create-form .member-form-actions,
  body.er-guard-dashboard-page .er-create-action-left,
  body.er-guard-dashboard-page .er-create-action-right {
    align-items: stretch;
    flex-direction: column;
  }

  body.er-guard-dashboard-page .er-create-form .member-form-actions button {
    width: 100%;
  }

  body.er-guard-dashboard-page .er-dashboard-create {
    min-height: 0;
  }

  .er-form {
    grid-template-columns: 1fr;
  }

  .er-stepper,
  .er-step-panel,
  .er-activation-detail-grid,
  .er-activation-edit-grid {
    grid-template-columns: 1fr;
  }

  .er-field,
  .er-span-3,
  .er-span-15,
  .er-span-4,
  .er-span-2 {
    grid-column: span 1;
  }

  .er-dashboard-panel-head,
  .er-form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .er-dashboard-search {
    justify-content: stretch;
  }

  .er-dashboard-search input,
  .er-dashboard-search button,
  .er-dashboard-search a,
  .er-form-actions button,
  .er-secondary,
  .er-step-actions {
    width: 100%;
  }

  .er-step-actions {
    flex-direction: column;
  }

  .er-field .er-field-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.25rem;
  }

  .er-field .er-field-head em {
    max-width: none;
    text-align: left;
  }
}

/* ER Guard dashboard pages on the Obsidian Flux shell */
body.er-guard-dashboard-page {
  --bg: var(--of-surface);
  --bg-soft: var(--of-surface-container-lowest);
  --panel: var(--of-surface-container);
  --panel-2: var(--of-surface-container-high);
  --border: var(--of-outline-variant);
  --border-light: var(--of-outline);
  --text: var(--of-on-surface);
  --muted: var(--of-on-surface-variant);
  --brand: var(--of-primary);
  --brand-strong: var(--of-primary-container);
  --brand-glow: rgba(181, 255, 240, 0.14);
  --danger: var(--of-error);
  background: var(--of-surface);
  color: var(--of-on-surface);
  font-family: var(--of-font-body);
}

body.er-guard-dashboard-page .of-container {
  max-width: 1440px;
}

body.er-guard-dashboard-page .er-dashboard-main {
  display: grid;
  gap: 24px;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  overflow: visible;
}

body.er-guard-dashboard-page .er-dashboard-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-bottom: 8px;
}

body.er-guard-billing-page .er-dashboard-actions-grid {
  display: none;
}

body.er-guard-dashboard-page .card,
body.er-guard-dashboard-page .panel-block,
body.er-guard-dashboard-page .member-create-panel,
body.er-guard-dashboard-page .member-upload-panel,
body.er-guard-dashboard-page .member-roster-panel {
  border: 1px solid var(--of-outline-variant);
  border-radius: var(--of-radius-lg);
  background: var(--of-surface-container);
  box-shadow: none;
}

body.er-guard-dashboard-page .er-dashboard-create,
body.er-guard-dashboard-page .er-dashboard-upload {
  min-height: 0;
  padding: 24px;
  background: var(--of-surface-container-high);
}

body.er-guard-dashboard-page .er-dashboard-create::before,
body.er-guard-dashboard-page .er-dashboard-create .member-create-panel-cta::before {
  content: none !important;
}

body.er-guard-dashboard-page .er-dashboard-create .member-panel-copy {
  display: block;
}

body.er-guard-dashboard-page .er-dashboard-create .member-create-panel-cta {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  height: 100%;
}

body.er-guard-dashboard-page .section-head,
body.er-guard-dashboard-page .member-roster-head .section-head {
  margin: 0;
  color: var(--of-on-surface);
  font-family: var(--of-font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 16px;
  text-transform: uppercase;
}

body.er-guard-dashboard-page .er-dashboard-create .section-head,
body.er-guard-dashboard-page .er-dashboard-upload .section-head {
  color: var(--of-primary);
}

body.er-guard-dashboard-page .er-dashboard-upload .section-head {
  color: var(--of-secondary);
}

body.er-guard-dashboard-page .muted,
body.er-guard-dashboard-page .upload-instructions,
body.er-guard-dashboard-page .member-panel-copy p {
  color: var(--of-on-surface-variant);
}

body.er-guard-dashboard-page .toggle-panel-button,
body.er-guard-dashboard-page button:not(.of-icon-btn):not(.of-btn-primary):not(.of-nav-item),
body.er-guard-dashboard-page .member-add-submit-button {
  border-radius: var(--of-radius-md);
  font-family: var(--of-font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body.er-guard-dashboard-page .er-create-member-button,
body.er-guard-dashboard-page .member-add-submit-button,
body.er-guard-dashboard-page .upload-form-actions button[type="submit"] {
  min-height: 40px;
  background: var(--of-primary-container);
  color: var(--of-on-primary-container);
  border-color: transparent;
}

body.er-guard-dashboard-page button.secondary,
body.er-guard-dashboard-page .secondary,
body.er-guard-dashboard-page .member-filter-toggle,
body.er-guard-dashboard-page .directory-export-trigger,
body.er-guard-dashboard-page .upload-form-actions button.secondary {
  min-height: 40px;
  border: 1px solid var(--of-outline-variant);
  background: transparent;
  color: var(--of-on-surface-variant);
  box-shadow: none;
}

body.er-guard-dashboard-page button.secondary:hover,
body.er-guard-dashboard-page button.secondary:focus-visible,
body.er-guard-dashboard-page .secondary:hover,
body.er-guard-dashboard-page .secondary:focus-visible,
body.er-guard-dashboard-page .member-filter-toggle:hover,
body.er-guard-dashboard-page .member-filter-toggle:focus-visible {
  background: var(--of-surface-bright);
  color: var(--of-on-surface);
  border-color: var(--of-primary);
}

body.er-guard-dashboard-page .member-upload-grid,
body.er-guard-dashboard-page .upload-form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

body.er-guard-dashboard-page .member-file-picker,
body.er-guard-dashboard-page .er-file-picker {
  min-height: 58px;
  border: 2px dashed var(--of-outline-variant);
  border-radius: var(--of-radius-lg);
  background: var(--of-surface-container-lowest);
}

body.er-guard-dashboard-page .er-dashboard-actions-grid {
  gap: 18px;
  margin-bottom: 24px;
}

body.er-guard-dashboard-page .er-dashboard-actions-grid > .card,
body.er-guard-dashboard-page .er-dashboard-actions-grid > .panel-block {
  min-height: 0;
  padding: 22px 24px;
}

body.er-guard-dashboard-page .member-create-panel-cta,
body.er-guard-dashboard-page .member-panel-head {
  gap: 16px;
}

body.er-guard-dashboard-page .member-panel-copy .muted,
body.er-guard-dashboard-page .upload-instructions {
  margin-top: 8px;
}

body.er-guard-dashboard-page .upload-form-actions button,
body.er-guard-dashboard-page .er-create-member-button {
  min-height: 44px;
}

body.er-guard-dashboard-page .member-file-picker:hover,
body.er-guard-dashboard-page .member-file-picker:focus-visible {
  border-color: var(--of-primary);
  background: var(--of-surface-container-low);
}

body.er-guard-dashboard-page .facility-file-picker-icon {
  color: var(--of-secondary);
}

body.er-guard-dashboard-page .upload-template-link,
body.er-guard-dashboard-page .of-bento-card-link {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--of-primary);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  text-decoration: underline;
}

body.er-guard-dashboard-page .er-dashboard-table-panel {
  overflow: hidden;
}

body.er-guard-dashboard-page .er-dashboard-table-head,
body.er-guard-dashboard-page .member-roster-head {
  padding: 16px 24px;
  border-bottom: 1px solid var(--of-outline-variant);
  background: var(--of-surface-container);
}

body.er-guard-dashboard-page .er-dashboard-search {
  margin: 0;
  padding: 16px 24px;
  border-bottom: 1px solid var(--of-outline-variant);
  background: var(--of-surface-container);
}

body.er-guard-dashboard-page .member-search,
body.er-guard-dashboard-page .member-filter-panel {
  border-color: var(--of-outline-variant);
  background: var(--of-surface-container-lowest);
}

body.er-guard-dashboard-page .member-search input,
body.er-guard-dashboard-page .member-filter-panel input,
body.er-guard-dashboard-page .member-filter-panel select,
body.er-guard-dashboard-page .member-page-size-form select,
body.er-guard-dashboard-page .member-field input,
body.er-guard-dashboard-page .member-field select,
body.er-guard-dashboard-page .member-field textarea {
  border-color: var(--of-outline-variant);
  background: var(--of-surface-container-lowest);
  color: var(--of-on-surface);
  color-scheme: dark;
}

body.er-guard-dashboard-page .member-search input:focus,
body.er-guard-dashboard-page .member-filter-panel input:focus,
body.er-guard-dashboard-page .member-filter-panel select:focus,
body.er-guard-dashboard-page .member-field input:focus,
body.er-guard-dashboard-page .member-field select:focus,
body.er-guard-dashboard-page .member-field textarea:focus {
  border-color: var(--of-primary);
  box-shadow: 0 0 0 2px rgba(181, 255, 240, 0.12);
}

body.er-guard-dashboard-page .member-roster-table-wrap {
  border: 0;
  border-radius: 0;
  background: transparent;
}

body.er-guard-dashboard-page .member-grid-head {
  background: var(--of-surface-container-high);
  border-bottom: 1px solid var(--of-outline-variant);
}

body.er-guard-dashboard-page .member-grid-head-cell {
  color: var(--of-on-surface-variant);
  font-family: var(--of-font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body.er-guard-dashboard-page .member-row {
  border-color: rgba(60, 73, 70, 0.72);
  background: var(--of-surface-container);
  box-shadow: none;
}

body.er-guard-dashboard-page .member-row:hover,
body.er-guard-dashboard-page .member-row:focus-visible,
body.er-guard-dashboard-page .er-activation-row:hover,
body.er-guard-dashboard-page .er-activation-row:focus-visible,
body.er-guard-inventory-page .er-inventory-row:hover,
body.er-guard-inventory-page .er-inventory-row:focus-visible {
  background: var(--of-surface-bright);
  outline: none;
}

body.er-guard-dashboard-page .member-row-name strong,
body.er-guard-dashboard-page .er-inventory-card-cell strong,
body.er-guard-dashboard-page .member-row-card,
body.er-guard-dashboard-page .member-row-policy,
body.er-guard-dashboard-page .member-row-company,
body.er-guard-dashboard-page .member-row-date,
body.er-guard-dashboard-page .member-row-type {
  color: var(--of-on-surface);
}

body.er-guard-dashboard-page .member-row-name span,
body.er-guard-dashboard-page .er-status-date,
body.er-guard-dashboard-page .er-status-time,
body.er-guard-dashboard-page .er-inventory-link-meta {
  color: var(--of-on-surface-variant);
}

body.er-guard-dashboard-page .er-dashboard-footer,
body.er-guard-dashboard-page .member-footer {
  margin: 0;
  padding: 16px 24px;
  border-top: 1px solid var(--of-outline-variant);
  background: var(--of-surface-container-low);
}

body.er-guard-dashboard-page .member-page-number.is-active,
body.er-guard-dashboard-page .member-page-nav:hover,
body.er-guard-dashboard-page .member-page-number:hover {
  border-color: var(--of-primary);
  background: var(--of-primary);
  color: var(--of-on-primary);
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-search input,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-filter-panel input,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-filter-panel select,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-page-size-form select,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-field input,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-field select,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-field textarea {
  color-scheme: light;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page {
  background: var(--of-surface);
  color: var(--of-on-surface);
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .card,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .panel-block,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-create-panel,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-upload-panel,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-roster-panel,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-dashboard-table-head,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-dashboard-search,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-row {
  border-color: var(--of-outline-variant);
  background: var(--of-surface-container);
  color: var(--of-on-surface);
  box-shadow: none;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-dashboard-create,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-dashboard-upload,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-grid-head,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-footer {
  border-color: var(--of-outline-variant);
  background: var(--of-surface-container-high);
  color: var(--of-on-surface);
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-file-picker,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-file-picker,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-search,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-filter-panel,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-search input,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-filter-panel input,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-filter-panel select,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-page-size-form select,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-field input,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-field select,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-field textarea {
  border-color: var(--of-outline-variant);
  background: var(--of-surface-container-lowest);
  color: var(--of-on-surface);
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .section-head,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-roster-head .section-head,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-row-name strong,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-inventory-card-cell strong,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-row-card,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-row-policy,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-row-company,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-row-date,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-row-type {
  color: var(--of-on-surface);
  -webkit-text-fill-color: var(--of-on-surface);
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .muted,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .upload-instructions,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-panel-copy p,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-grid-head-cell,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-row-name span,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-status-date,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-status-time,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-inventory-link-meta {
  color: var(--of-on-surface-variant);
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page button.secondary,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .secondary,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-filter-toggle,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .directory-export-trigger,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .upload-form-actions button.secondary {
  border-color: var(--of-outline-variant);
  background: transparent;
  color: var(--of-on-surface-variant);
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page button.secondary:hover,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page button.secondary:focus-visible,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .secondary:hover,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .secondary:focus-visible,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-filter-toggle:hover,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-filter-toggle:focus-visible,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-row:hover,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-row:focus-visible {
  border-color: var(--of-primary);
  background: var(--of-surface-bright);
  color: var(--of-on-surface);
}

@media (max-width: 900px) {
  body.er-guard-dashboard-page .er-dashboard-actions-grid,
  body.er-guard-dashboard-page .member-upload-grid,
  body.er-guard-dashboard-page .upload-form-grid {
    grid-template-columns: 1fr;
  }

  body.er-guard-dashboard-page .upload-form-actions {
    justify-content: stretch;
  }

  body.er-guard-dashboard-page .upload-form-actions button {
    width: 100%;
  }
}

/* ER Guard table and upload surfaces aligned with the newer directory UI */
body.er-guard-dashboard-page .er-dashboard-table-panel {
  padding: 0;
  border: 1px solid rgba(60, 73, 70, 0.92);
  border-radius: 16px;
  background: var(--of-surface-container-low);
  overflow: hidden;
}

body.er-guard-dashboard-page:not(.er-guard-billing-page):not(.er-guard-inventory-page) .er-dashboard-table-head {
  min-height: 52px;
  padding: 16px 36px;
  align-items: center;
  border-bottom: 1px solid rgba(60, 73, 70, 0.86);
  background: var(--of-surface-container-low);
}

body.er-guard-dashboard-page .er-dashboard-table-head .section-head {
  color: var(--of-on-surface);
  letter-spacing: 0.13em;
}

body.er-guard-dashboard-page .er-dashboard-search .er-directory-export-trigger,
body.er-guard-dashboard-page .er-dashboard-search .member-filter-toggle {
  flex: 0 0 auto;
  margin: 0;
}

body.er-guard-dashboard-page .er-dashboard-search .er-directory-export-trigger {
  order: 2;
}

body.er-guard-dashboard-page .er-dashboard-search .member-filter-toggle {
  order: 3;
}

body.er-guard-dashboard-page .er-dashboard-search {
  padding: 28px 36px;
  border-bottom: 1px solid rgba(60, 73, 70, 0.86);
  background: var(--of-surface-container-low);
}

body.er-guard-dashboard-page .member-search-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
}

body.er-guard-dashboard-page .member-search {
  min-height: 64px;
  border: 1px solid rgba(90, 108, 134, 0.52);
  border-radius: 12px;
  background: var(--of-surface-container-lowest);
  overflow: hidden;
}

body.er-guard-dashboard-page .member-search-label {
  width: 72px;
  border-right: 1px solid rgba(90, 108, 134, 0.32);
}

body.er-guard-dashboard-page .member-search input {
  min-height: 62px;
  padding: 0 18px;
  border: 0;
  background: transparent;
  color: var(--of-on-surface);
  font-size: 20px;
  font-weight: 500;
}

body.er-guard-dashboard-page .member-filter-toggle {
  min-height: 60px;
  padding: 0 26px;
  border-radius: 12px;
  background: transparent;
  color: var(--of-on-surface);
  letter-spacing: 0.14em;
}

body.er-guard-dashboard-page .member-filter-toggle .icon {
  color: var(--of-primary);
}

body.er-guard-dashboard-page .er-table-wrap {
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow-x: auto;
}

body.er-guard-dashboard-page .member-list {
  display: grid;
  gap: 0;
}

body.er-guard-dashboard-page .member-grid-head {
  position: sticky;
  top: 0;
  z-index: 1;
  min-width: 1040px;
  margin: 0;
  padding: 0 36px;
  border-bottom: 1px solid rgba(60, 73, 70, 0.92);
  background: var(--of-surface-container-high);
}

body.er-guard-dashboard-page .member-grid-head-cell {
  min-height: 66px;
  justify-content: center;
  color: var(--of-primary);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  line-height: 1.35;
  text-align: center;
}

body.er-guard-dashboard-page .member-row {
  min-width: 1040px;
  margin: 0;
  border: 0;
  border-bottom: 1px solid rgba(60, 73, 70, 0.78);
  border-radius: 0;
  background: var(--of-surface-container-lowest);
  box-shadow: none;
  transition: background 0.16s ease, box-shadow 0.16s ease;
}

body.er-guard-dashboard-page .member-row:last-child {
  border-bottom: 0;
}

body.er-guard-dashboard-page .member-row-grid {
  min-height: 124px;
  padding: 24px 36px;
}

body.er-guard-dashboard-page .er-inventory-row .member-row-grid,
body.er-guard-dashboard-page .er-billing-row .member-row-grid {
  min-height: 126px;
}

body.er-guard-dashboard-page .member-row-grid > *,
body.er-guard-dashboard-page .er-grid-head > *,
body.er-guard-dashboard-page .er-activation-grid > *,
body.er-guard-dashboard-page .er-inventory-grid > *,
body.er-guard-dashboard-page .er-billing-grid > * {
  min-width: 0;
  justify-content: center;
  text-align: center;
}

body.er-guard-dashboard-page .member-row:hover,
body.er-guard-dashboard-page .member-row:focus-visible,
body.er-guard-dashboard-page .er-activation-row:hover,
body.er-guard-dashboard-page .er-activation-row:focus-visible,
body.er-guard-inventory-page .er-inventory-row:hover,
body.er-guard-inventory-page .er-inventory-row:focus-visible {
  background: var(--of-surface-container);
  box-shadow: inset 4px 0 0 var(--of-primary);
  outline: none;
}

body.er-guard-dashboard-page .member-row-name strong,
body.er-guard-dashboard-page .er-inventory-card-cell strong {
  color: var(--of-on-surface);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.25;
}

body.er-guard-dashboard-page .member-row-card,
body.er-guard-dashboard-page .member-row-policy,
body.er-guard-dashboard-page .member-row-company,
body.er-guard-dashboard-page .member-row-account,
body.er-guard-dashboard-page .member-row-date,
body.er-guard-dashboard-page .member-row-type {
  color: var(--of-on-surface);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

body.er-guard-dashboard-page .er-activation-card-number,
body.er-guard-dashboard-page .er-activation-contact-number {
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
  line-height: 1.35;
}

body.er-guard-dashboard-page .er-inventory-card-cell strong,
body.er-guard-dashboard-page .member-row-card,
body.er-guard-dashboard-page .member-row-policy {
  font-family: var(--of-font-mono);
  letter-spacing: 0.04em;
}

body.er-guard-dashboard-page .member-row-company,
body.er-guard-dashboard-page .member-row-account {
  font-family: var(--of-font-body);
  letter-spacing: 0;
}

body.er-guard-dashboard-page .record-source-pill {
  min-height: 28px;
  padding: 4px 11px;
  border-radius: 10px;
  border-color: rgba(82, 137, 255, 0.46);
  background: rgba(82, 137, 255, 0.18);
  color: #bfdbfe;
  font-family: var(--of-font-mono);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

body.er-guard-dashboard-page .member-status-pill {
  min-height: 38px;
  padding: 7px 14px;
  border-radius: 10px;
  font-family: var(--of-font-mono);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.1;
}

body.er-guard-dashboard-page .er-dashboard-footer,
body.er-guard-dashboard-page .member-footer {
  padding: 18px 36px;
  border-top: 1px solid rgba(60, 73, 70, 0.86);
  background: var(--of-surface-container-low);
}

body.er-guard-dashboard-page .er-dashboard-upload {
  display: flex;
  flex-direction: column;
  gap: 26px;
  padding: 34px 36px 36px;
  border-radius: 16px;
  background: var(--of-surface-container-high);
}

body.er-guard-dashboard-page .er-dashboard-upload .member-panel-head {
  margin: 0;
}

body.er-guard-dashboard-page .er-dashboard-upload .section-head {
  color: #9ec5ff;
  font-size: 13px;
  letter-spacing: 0.16em;
}

body.er-guard-dashboard-page .er-dashboard-upload .section-head .icon {
  display: none;
}

body.er-guard-dashboard-page .er-dashboard-upload .muted {
  max-width: 58ch;
  margin-top: 18px;
  color: var(--of-on-surface);
  font-size: 18px;
  line-height: 1.5;
}

body.er-guard-dashboard-page .er-dashboard-upload .upload-template-link {
  color: var(--of-primary);
  font-size: inherit;
  font-weight: 800;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

body.er-guard-dashboard-page .member-upload-grid,
body.er-guard-dashboard-page .upload-form-grid {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: stretch;
}

body.er-guard-dashboard-page .member-file-picker,
body.er-guard-dashboard-page .er-file-picker {
  min-height: 118px;
  align-items: center;
  gap: 26px;
  padding: 26px 32px;
  border: 2px dashed rgba(87, 105, 101, 0.88);
  border-radius: 16px;
  background: var(--of-surface-container-lowest);
}

body.er-guard-dashboard-page .member-file-picker:hover,
body.er-guard-dashboard-page .member-file-picker:focus-visible {
  border-color: var(--of-primary);
  background: var(--of-surface-container-low);
  box-shadow: 0 0 0 3px rgba(181, 255, 240, 0.11);
}

body.er-guard-dashboard-page .facility-file-picker-icon {
  width: 24px;
  height: 24px;
  color: var(--of-primary);
}

body.er-guard-dashboard-page .facility-file-picker-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}

body.er-guard-dashboard-page .member-file-chip {
  min-width: 0;
  color: var(--of-on-surface);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.25;
}

body.er-guard-dashboard-page .member-file-chip-text {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.er-guard-dashboard-page .facility-file-picker-hint {
  color: #9ec5ff;
  font-size: 16px;
  line-height: 1.4;
}

body.er-guard-dashboard-page .upload-form-actions {
  display: flex;
  gap: 12px;
  align-items: stretch;
}

body.er-guard-dashboard-page .upload-form-actions button,
body.er-guard-dashboard-page .upload-form-actions button.secondary,
body.er-guard-dashboard-page .upload-form-actions button[type="submit"] {
  min-width: 106px;
  min-height: 80px;
  padding: 14px 22px;
  border-radius: 12px;
  font-family: var(--of-font-body);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
}

body.er-guard-dashboard-page .upload-form-actions button.secondary {
  background: var(--of-surface-container-highest);
  color: var(--of-on-surface);
}

body.er-guard-dashboard-page .upload-form-actions button[type="submit"] {
  background: var(--of-secondary-container);
  color: var(--of-on-secondary-container);
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-dashboard-table-panel,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-dashboard-table-head,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-dashboard-search,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-dashboard-footer,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-footer {
  border-color: rgba(15, 23, 42, 0.12);
  background: #ffffff;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-grid-head {
  border-bottom-color: rgba(15, 23, 42, 0.1);
  background: #f1f5f9;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-grid-head-cell {
  color: #0f766e;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-row {
  border-bottom-color: rgba(15, 23, 42, 0.1);
  background: #ffffff;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-row:hover,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-row:focus-visible {
  background: #f0fdfa;
  box-shadow: inset 4px 0 0 #0f766e;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .record-source-pill {
  border-color: rgba(37, 99, 235, 0.24);
  background: #dbeafe;
  color: #1e3a8a;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-dashboard-upload {
  border-color: rgba(15, 23, 42, 0.12);
  background: #ffffff;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-dashboard-upload .section-head {
  color: #2563eb;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-dashboard-upload .muted {
  color: #1f2937;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-file-picker,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-file-picker {
  border-color: rgba(15, 23, 42, 0.2);
  background: #f8fafc;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-file-picker:hover,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-file-picker:focus-visible {
  border-color: #0f766e;
  background: #ecfdf5;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .facility-file-picker-hint {
  color: #2563eb;
}

@media (max-width: 900px) {
  body.er-guard-dashboard-page .member-search-toolbar,
  body.er-guard-dashboard-page .member-upload-grid,
  body.er-guard-dashboard-page .upload-form-grid {
    grid-template-columns: 1fr;
  }

  body.er-guard-dashboard-page .upload-form-actions {
    flex-direction: column;
  }

  body.er-guard-dashboard-page .upload-form-actions button,
  body.er-guard-dashboard-page .upload-form-actions button.secondary,
  body.er-guard-dashboard-page .upload-form-actions button[type="submit"] {
    width: 100%;
    min-height: 52px;
  }
}

/* Final ER Guard directory pass: mirror the compact Members list surfaces. */
body.er-guard-dashboard-page .er-dashboard-main {
  gap: 24px;
}

body.er-guard-dashboard-page .er-dashboard-actions-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

body.er-guard-dashboard-page .er-dashboard-create,
body.er-guard-dashboard-page .er-dashboard-upload {
  min-height: 0;
  border: 1px solid var(--of-outline-variant);
  border-radius: var(--of-radius-lg, 8px);
  background: var(--of-surface-container-high);
  box-shadow: none;
}

body.er-guard-dashboard-page .er-dashboard-create {
  padding: 24px;
}

body.er-guard-dashboard-page .er-dashboard-upload {
  gap: 20px;
  padding: 24px;
}

body.er-guard-dashboard-page .er-dashboard-create.member-create-panel::before,
body.er-guard-dashboard-page .er-dashboard-upload .section-head {
  color: var(--of-primary);
  font-family: var(--of-font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 16px;
}

body.er-guard-dashboard-page .er-dashboard-upload .section-head {
  color: var(--of-secondary);
}

body.er-guard-dashboard-page .er-dashboard-create .member-create-panel-cta::before,
body.er-guard-dashboard-page .er-dashboard-upload .muted {
  margin-top: 8px;
  max-width: 68ch;
  color: var(--of-on-surface-variant);
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
}

body.er-guard-dashboard-page .er-dashboard-upload .upload-template-link {
  color: var(--of-primary);
  font-size: 12px;
  font-weight: 700;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

body.er-guard-dashboard-page .member-upload-grid,
body.er-guard-dashboard-page .upload-form-grid {
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

body.er-guard-dashboard-page .member-file-picker,
body.er-guard-dashboard-page .er-file-picker {
  min-height: 86px;
  gap: 16px;
  padding: 16px 20px;
  border: 2px dashed var(--of-outline-variant);
  border-radius: var(--of-radius-lg, 8px);
  background: var(--of-surface-container-lowest);
}

body.er-guard-dashboard-page .member-file-picker:hover,
body.er-guard-dashboard-page .member-file-picker:focus-visible {
  border-color: var(--of-secondary);
  background: var(--of-surface-container-lowest);
  box-shadow: none;
}

body.er-guard-dashboard-page .facility-file-picker-icon {
  width: 22px;
  height: 22px;
  color: var(--of-secondary);
}

body.er-guard-dashboard-page .member-file-chip {
  color: var(--of-on-surface);
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
}

body.er-guard-dashboard-page .facility-file-picker-hint {
  color: var(--of-on-surface-variant);
  font-size: 12px;
  line-height: 16px;
}

body.er-guard-dashboard-page .upload-form-actions {
  justify-content: flex-end;
  align-items: center;
}

body.er-guard-dashboard-page .member-file-picker .of-upload-actions,
body.er-guard-dashboard-page .er-file-picker .of-upload-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  gap: 10px;
  margin-left: auto;
}

body.er-guard-dashboard-page .member-file-picker .facility-file-picker-copy,
body.er-guard-dashboard-page .er-file-picker .facility-file-picker-copy {
  flex: 1 1 auto;
  min-width: 0;
}

body.er-guard-dashboard-page .member-file-picker .of-export-btn,
body.er-guard-dashboard-page .er-file-picker .of-export-btn {
  min-width: 110px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 8px;
  font-family: var(--of-font-mono, "JetBrains Mono", monospace);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

body.er-guard-dashboard-page .member-file-picker .of-export-btn.secondary,
body.er-guard-dashboard-page .er-file-picker .of-export-btn.secondary {
  border: 1px solid var(--of-outline-variant);
  background: var(--of-surface-container-high);
  color: var(--of-on-surface);
}

body.er-guard-dashboard-page .member-file-picker .of-export-btn[type="submit"],
body.er-guard-dashboard-page .er-file-picker .of-export-btn[type="submit"] {
  border-color: transparent;
  background: var(--of-primary);
  color: var(--of-on-primary);
}

@media (max-width: 760px) {
  body.er-guard-dashboard-page .member-file-picker,
  body.er-guard-dashboard-page .er-file-picker {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  body.er-guard-dashboard-page .member-file-picker .of-upload-actions,
  body.er-guard-dashboard-page .er-file-picker .of-upload-actions {
    width: 100%;
    flex-wrap: wrap;
    margin-left: 0;
  }
}

body.er-guard-dashboard-page .upload-form-actions button,
body.er-guard-dashboard-page .upload-form-actions button.secondary,
body.er-guard-dashboard-page .upload-form-actions button[type="submit"] {
  min-width: 0;
  min-height: 34px;
  padding: 7px 14px;
  border-radius: var(--of-radius, 4px);
  font-size: 12px;
  font-weight: 700;
}

body.er-guard-dashboard-page .er-dashboard-table-panel {
  border: 1px solid var(--of-outline-variant);
  border-radius: var(--of-radius-lg, 8px);
  background: var(--of-surface-container);
}

body.er-guard-dashboard-page .er-dashboard-table-head,
body.er-guard-dashboard-page .er-dashboard-search {
  padding: 16px 24px;
  border-bottom: 1px solid var(--of-outline-variant);
  background: var(--of-surface-container);
}

body.er-guard-dashboard-page .er-dashboard-table-head .section-head {
  color: var(--of-on-surface-variant);
  font-family: var(--of-font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

body.er-guard-dashboard-page .member-search-toolbar {
  gap: 12px;
}

body.er-guard-dashboard-page .member-search {
  min-height: 40px;
  border: 1px solid var(--of-outline-variant);
  border-radius: var(--of-radius-md, 6px);
  background: var(--of-surface-container-lowest);
}

body.er-guard-dashboard-page .member-search-label {
  width: 40px;
  border-right: 0;
}

body.er-guard-dashboard-page .member-search input {
  min-height: 40px;
  padding: 8px 14px 8px 0;
  font-size: 13px;
}

body.er-guard-dashboard-page .member-filter-toggle {
  min-height: 40px;
  padding: 8px 14px;
  border-radius: var(--of-radius-md, 6px);
  font-size: 12px;
  letter-spacing: 0;
  text-transform: none;
}

body.er-guard-dashboard-page .member-grid-head {
  min-width: 1040px;
  padding: 0;
  background: rgba(34, 42, 61, 0.5);
}

body.er-guard-dashboard-page .member-grid-head-cell {
  min-height: 44px;
  padding: 12px 16px;
  color: var(--of-on-surface-variant);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-align: left;
  justify-content: flex-start;
}

body.er-guard-dashboard-page .member-row {
  min-width: 1040px;
  background: transparent;
  border-bottom: 1px solid var(--of-outline-variant);
}

body.er-guard-dashboard-page .member-row-grid {
  min-height: 58px;
  padding: 12px 16px;
}

body.er-guard-dashboard-page .er-inventory-row .member-row-grid,
body.er-guard-dashboard-page .er-billing-row .member-row-grid {
  min-height: 58px;
}

body.er-guard-dashboard-page .member-row-grid > *,
body.er-guard-dashboard-page .er-grid-head > *,
body.er-guard-dashboard-page .er-activation-grid > *,
body.er-guard-dashboard-page .er-inventory-grid > *,
body.er-guard-dashboard-page .er-billing-grid > * {
  justify-content: flex-start;
  text-align: left;
}

body.er-guard-dashboard-page .member-row:hover,
body.er-guard-dashboard-page .member-row:focus-visible,
body.er-guard-dashboard-page .er-activation-row:hover,
body.er-guard-dashboard-page .er-activation-row:focus-visible,
body.er-guard-inventory-page .er-inventory-row:hover,
body.er-guard-inventory-page .er-inventory-row:focus-visible {
  background: var(--of-surface-bright);
  box-shadow: none;
}

body.er-guard-dashboard-page .member-row-name strong,
body.er-guard-dashboard-page .er-inventory-card-cell strong {
  color: var(--of-on-surface);
  font-size: 14px;
  font-weight: 700;
}

body.er-guard-dashboard-page .member-row-card,
body.er-guard-dashboard-page .member-row-policy,
body.er-guard-dashboard-page .member-row-company,
body.er-guard-dashboard-page .member-row-account,
body.er-guard-dashboard-page .member-row-date,
body.er-guard-dashboard-page .member-row-type {
  color: var(--of-on-surface);
  font-size: 13px;
  font-weight: 500;
  line-height: 18px;
}

body.er-guard-dashboard-page .record-source-pill {
  min-height: 20px;
  padding: 2px 6px;
  border-radius: var(--of-radius, 4px);
  border-color: var(--of-outline-variant);
  background: var(--of-surface-container-lowest);
  color: var(--of-on-surface-variant);
  font-size: 10px;
  font-weight: 600;
}

body.er-guard-dashboard-page .member-status-pill {
  min-height: 24px;
  padding: 4px 10px;
  border-radius: var(--of-radius, 4px);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

body.er-guard-dashboard-page .er-dashboard-footer,
body.er-guard-dashboard-page .member-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--of-outline-variant);
  background: var(--of-surface-container-low);
}

@media (max-width: 900px) {
  body.er-guard-dashboard-page .er-dashboard-actions-grid {
    grid-template-columns: 1fr;
  }

  body.er-guard-dashboard-page .upload-form-actions {
    align-items: stretch;
  }
}

/* Final ER Guard dashboard table polish: centered text and clean right edge. */
body.er-guard-dashboard-page .er-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
}

body.er-guard-dashboard-page .member-grid-head.er-inventory-grid,
body.er-guard-dashboard-page .member-grid-head.er-billing-grid,
body.er-guard-dashboard-page .member-grid-head.er-activation-grid,
body.er-guard-dashboard-page .member-row.er-inventory-row,
body.er-guard-dashboard-page .member-row.er-billing-row,
body.er-guard-dashboard-page .member-row.er-activation-row {
  width: max-content;
  min-width: 100%;
}

body.er-guard-dashboard-page .member-row.er-inventory-row .member-row-grid,
body.er-guard-dashboard-page .member-row.er-billing-row .member-row-grid,
body.er-guard-dashboard-page .member-row.er-activation-row .member-row-grid {
  width: max-content;
}

body.er-guard-inventory-page .er-inventory-grid {
  min-width: 100%;
  width: max-content;
  grid-template-columns:
    minmax(210px, 1.2fr)
    minmax(140px, 0.8fr)
    minmax(110px, 0.6fr)
    minmax(150px, 0.9fr)
    minmax(160px, 0.9fr)
    minmax(110px, 0.6fr)
    minmax(140px, 0.8fr);
}

body.er-guard-inventory-page .er-inventory-type-cell {
  display: grid;
  justify-items: center;
  gap: 0.42rem;
  text-align: center;
}

body.er-guard-inventory-page .er-inventory-type-value {
  color: var(--of-on-surface);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.2;
}

body.er-guard-inventory-page .er-inventory-generated-date {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.22rem 0.48rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.46);
  color: var(--muted);
  font-family: var(--of-font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.2;
  white-space: nowrap;
}

body.er-guard-inventory-page .er-inventory-generated-label {
  color: #9ff2c9;
  font-family: var(--of-font-body);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ER Guard activation table: Portal User is a dedicated column before Status. */
@media (min-width: 981px) {
  body.er-guard-dashboard-page:not(.er-guard-billing-page) .er-grid-head.er-activation-grid,
  body.er-guard-dashboard-page:not(.er-guard-billing-page) .er-activation-row,
  body.er-guard-dashboard-page:not(.er-guard-billing-page) .er-activation-row .member-row-grid.er-activation-grid {
    width: 1870px;
    min-width: 1870px;
    grid-template-columns: 220px 140px 220px 220px 190px 240px 300px 120px 220px;
  }
}

/* The billing header and body must use the same physical tracks. The older
   responsive rules set different fractional templates at different points
   in this stylesheet, which lets row values drift under the wrong header.
   Use one fixed six-column table on widths where horizontal scrolling is
   available; the mobile one-column rules above remain unchanged. */
@media (min-width: 721px) {
  body.er-guard-billing-page .member-grid-head.er-billing-grid,
  body.er-guard-billing-page .er-billing-row,
  body.er-guard-billing-page .er-billing-row .member-row-grid.er-billing-grid {
    box-sizing: border-box !important;
    width: 1430px !important;
    min-width: 1430px !important;
  }

  body.er-guard-billing-page .member-grid-head.er-billing-grid,
  body.er-guard-billing-page .er-billing-row .member-row-grid.er-billing-grid {
    display: grid !important;
    padding: 0 !important;
    grid-template-columns: 300px 240px 190px 260px 220px 220px !important;
    grid-template-areas: none !important;
    grid-auto-flow: row !important;
  }

  body.er-guard-billing-page .member-grid-head.er-billing-grid > *,
  body.er-guard-billing-page .er-billing-row .member-row-grid.er-billing-grid > * {
    box-sizing: border-box !important;
    min-width: 0 !important;
  }

  body.er-guard-billing-page .member-grid-head.er-billing-grid > :nth-child(1),
  body.er-guard-billing-page .er-billing-row .member-row-grid.er-billing-grid > :nth-child(1) { grid-column: 1 !important; }
  body.er-guard-billing-page .member-grid-head.er-billing-grid > :nth-child(2),
  body.er-guard-billing-page .er-billing-row .member-row-grid.er-billing-grid > :nth-child(2) { grid-column: 2 !important; }
  body.er-guard-billing-page .member-grid-head.er-billing-grid > :nth-child(3),
  body.er-guard-billing-page .er-billing-row .member-row-grid.er-billing-grid > :nth-child(3) { grid-column: 3 !important; }
  body.er-guard-billing-page .member-grid-head.er-billing-grid > :nth-child(4),
  body.er-guard-billing-page .er-billing-row .member-row-grid.er-billing-grid > :nth-child(4) { grid-column: 4 !important; }
  body.er-guard-billing-page .member-grid-head.er-billing-grid > :nth-child(5),
  body.er-guard-billing-page .er-billing-row .member-row-grid.er-billing-grid > :nth-child(5) { grid-column: 5 !important; }
  body.er-guard-billing-page .member-grid-head.er-billing-grid > :nth-child(6),
  body.er-guard-billing-page .er-billing-row .member-row-grid.er-billing-grid > :nth-child(6) { grid-column: 6 !important; }
}

/* An empty inventory has no columns to scan. Hide the forced-width table
   header and let the empty state use the full panel without an unnecessary
   horizontal scrollbar. */
body.er-guard-inventory-page .er-table-wrap:has(.er-empty-state) {
  overflow-x: hidden;
}

body.er-guard-inventory-page .er-table-wrap:has(.er-empty-state) .member-grid-head.er-inventory-grid {
  display: none;
}

body.er-guard-inventory-page .er-table-wrap:has(.er-empty-state) .er-inventory-list,
body.er-guard-inventory-page .er-table-wrap:has(.er-empty-state) .er-empty-state {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
}

body.er-guard-inventory-page .er-delivery-confirm-modal .manual-ticket-dialog {
  width: min(540px, calc(100vw - 2rem));
  max-height: min(70vh, 460px);
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(62, 207, 142, 0.2);
  border-radius: 1.15rem;
  background: linear-gradient(180deg, rgba(24, 34, 51, 0.99), rgba(15, 23, 36, 0.99));
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.46);
}

body.er-guard-inventory-page .er-delivery-confirm-modal .manual-ticket-header {
  align-items: center;
  margin: 0;
  padding: 1rem 1.15rem 0.9rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

body.er-guard-inventory-page .er-delivery-confirm-modal .manual-ticket-header h2 {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.25;
}

body.er-guard-inventory-page .er-delivery-confirm-modal .manual-ticket-close {
  min-width: 2.35rem;
  min-height: 2.35rem;
  padding: 0;
}

body.er-guard-inventory-page .er-delivery-confirm-modal .manual-ticket-body {
  padding: 1rem 1.15rem 1.1rem;
}

body.er-guard-inventory-page .er-delivery-confirm-modal .manual-ticket-body p {
  margin: 0;
  color: var(--of-on-surface);
  font-size: 1rem;
  line-height: 1.55;
}

body.er-guard-inventory-page .er-delivery-confirm-modal .manual-ticket-body p strong {
  color: #9ff2c9;
  white-space: nowrap;
}

html[data-dashboard-theme="light"] body.er-guard-inventory-page .er-delivery-confirm-modal .manual-ticket-body p strong {
  color: #0f7a55;
}

body.er-guard-inventory-page .er-delivery-confirm-modal .member-form-actions {
  justify-content: flex-end;
  gap: 0.6rem;
  margin-top: 1.1rem;
  padding: 0;
  border-top: 0;
  background: transparent;
}

body.er-guard-inventory-page .er-delivery-confirm-modal .member-form-actions button {
  min-height: 2.65rem;
  padding: 0.58rem 0.85rem;
}

body.er-guard-billing-page .er-billing-grid {
  min-width: 100%;
  width: max-content;
  box-sizing: border-box;
  align-items: center;
  grid-auto-flow: row;
  grid-template-columns:
    minmax(220px, 1.25fr)
    minmax(170px, 1fr)
    minmax(130px, 0.72fr)
    minmax(145px, 0.8fr)
    minmax(160px, 0.86fr)
    minmax(160px, 0.86fr)
    minmax(180px, 0.95fr)
    minmax(120px, 0.7fr)
    minmax(140px, 0.78fr)
    minmax(140px, 0.78fr)
    minmax(110px, 0.58fr);
}

body.er-guard-dashboard-page:not(.er-guard-inventory-page):not(.er-guard-billing-page) .er-activation-grid,
body.er-guard-dashboard-page:not(.er-guard-inventory-page):not(.er-guard-billing-page) .er-grid-head {
  min-width: 100%;
  width: max-content;
  grid-template-columns:
    minmax(200px, 1.2fr)
    minmax(110px, 0.7fr)
    minmax(150px, 0.9fr)
    minmax(180px, 0.95fr)
    minmax(170px, 0.9fr)
    minmax(170px, 1fr)
    minmax(180px, 1fr)
    minmax(150px, 0.85fr);
}

body.er-guard-dashboard-page .member-grid-head.er-inventory-grid,
body.er-guard-dashboard-page .member-grid-head.er-billing-grid,
body.er-guard-dashboard-page .member-grid-head.er-activation-grid,
body.er-guard-dashboard-page .member-row.er-inventory-row,
body.er-guard-dashboard-page .member-row.er-billing-row,
body.er-guard-dashboard-page .member-row.er-activation-row {
  min-width: 100%;
}

body.er-guard-dashboard-page .er-inventory-row .member-row-grid,
body.er-guard-dashboard-page .er-billing-row .member-row-grid,
body.er-guard-dashboard-page .er-activation-row .member-row-grid {
  width: 100%;
}

body.er-guard-inventory-page .er-inventory-grid > *,
body.er-guard-billing-page .er-billing-grid > *,
body.er-guard-dashboard-page:not(.er-guard-inventory-page):not(.er-guard-billing-page) .er-activation-grid > *,
body.er-guard-inventory-page .er-inventory-grid .member-grid-head-cell,
body.er-guard-billing-page .er-billing-grid .member-grid-head-cell,
body.er-guard-dashboard-page:not(.er-guard-inventory-page):not(.er-guard-billing-page) .er-activation-grid .member-grid-head-cell,
body.er-guard-inventory-page .er-inventory-grid .member-row-name,
body.er-guard-billing-page .er-billing-grid .member-row-name,
body.er-guard-dashboard-page:not(.er-guard-inventory-page):not(.er-guard-billing-page) .er-activation-grid .member-row-name,
body.er-guard-inventory-page .er-inventory-grid .member-row-status,
body.er-guard-billing-page .er-billing-grid .member-row-status,
body.er-guard-dashboard-page:not(.er-guard-inventory-page):not(.er-guard-billing-page) .er-activation-grid .member-row-status,
body.er-guard-billing-page .er-billing-actions {
  justify-content: center;
  text-align: center;
}

body.er-guard-inventory-page .er-inventory-card-cell,
body.er-guard-billing-page .member-row-name,
body.er-guard-dashboard-page:not(.er-guard-inventory-page):not(.er-guard-billing-page) .member-row-name {
  align-items: center;
}

body.er-guard-inventory-page .er-inventory-card-cell strong,
body.er-guard-billing-page .member-row-name strong,
body.er-guard-billing-page .member-row-name span,
body.er-guard-dashboard-page:not(.er-guard-inventory-page):not(.er-guard-billing-page) .member-row-name strong,
body.er-guard-dashboard-page:not(.er-guard-inventory-page):not(.er-guard-billing-page) .member-row-name span {
  text-align: center;
}

/* Keep the billing header and body rows on the exact same track width.
   The table scrolls as one unit on narrower screens, so values cannot drift
   into the adjacent header column. */
@media (min-width: 981px) {
  body.er-guard-billing-page .member-grid-head.er-billing-grid,
  body.er-guard-billing-page .member-row.er-billing-row,
  body.er-guard-billing-page .member-row.er-billing-row .member-row-grid.er-billing-grid {
    width: 1450px;
    min-width: 1450px;
    box-sizing: border-box;
  }
}

body.er-guard-billing-page .er-billing-actions {
  align-items: center;
  justify-content: center;
  padding: 0.65rem 0.75rem;
}

/* Keep the Utilized and Paid status pills on the same top value track as the
   member, card, and policy values; each date/time block stays underneath. */
body.er-guard-billing-page .er-billing-grid > .member-row-status,
body.er-guard-billing-page .er-billing-grid > .er-billing-actions {
  align-self: center;
}

body.er-guard-billing-page .er-billing-grid > .member-row-status {
  justify-content: center;
}

body.er-guard-billing-page .er-billing-grid > .member-row-status,
body.er-guard-billing-page .er-billing-grid > .er-billing-actions {
  align-self: center;
  justify-self: stretch;
}

body.er-guard-billing-page .er-billing-grid > .member-row-status {
  display: grid;
  grid-template-rows: 2rem 3rem;
  min-height: 5rem;
  align-content: center;
  gap: 0.35rem;
}

body.er-guard-billing-page .er-billing-status-date {
  display: grid;
  justify-items: center;
  gap: 0.1rem;
}

body.er-guard-billing-page .er-billing-grid > .member-row-card,
body.er-guard-billing-page .er-billing-grid > .member-row-policy,
body.er-guard-billing-page .er-billing-grid > .member-row-name {
  align-self: center;
}

body.er-guard-billing-page .er-billing-member-copy {
  align-content: center;
  transform: translateY(0.9rem);
}

body.er-guard-billing-page .er-billing-member-copy span {
  font-size: 0.5rem;
  line-height: 1.15;
}

body.er-guard-billing-page .er-billing-paid-status {
  display: grid;
  grid-template-rows: 2rem 3rem;
  min-height: 5rem;
  align-content: center;
  justify-items: center;
  gap: 0.42rem;
  transform: none;
}

/* A single-line action state such as Refunded or Void should use the same
   first-line baseline as the card and policy values, rather than being
   centered in the reserved date/detail track. */
body.er-guard-billing-page .er-billing-paid-status:not(:has(.er-billing-payment-date)) {
  transform: none;
}

/* The utilization column already reserves the date row below the pill. Keep
   its two-line group on the same vertical track as the neighboring values;
   the previous downward offset made Utilized look detached from the row. */
body.er-guard-billing-page .er-billing-grid > .member-row-status:has(.er-billing-payment-date) {
  transform: none;
}

body.er-guard-billing-page .er-billing-paid-status:has(.er-billing-payment-date) {
  transform: translateY(1.2rem);
}

body.er-guard-billing-page .er-billing-paid-date {
  display: inline-flex;
  align-items: center;
  min-height: 1.45rem;
  padding: 0.22rem 0.5rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.46);
  color: var(--muted);
  font-family: var(--of-font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

html[data-dashboard-theme="light"] body.er-guard-billing-page .er-billing-paid-date {
  border-color: rgba(15, 23, 42, 0.12);
  background: rgba(241, 245, 249, 0.88);
  color: #64748b;
}

body.er-guard-billing-page .er-billing-paid-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-width: 112px;
  min-height: 44px;
  padding: 0.65rem 1.1rem;
  border: 1px solid color-mix(in srgb, var(--of-primary) 72%, transparent);
  border-radius: 10px;
  background: var(--of-primary-container);
  color: var(--of-on-primary-container);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.05em;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

body.er-guard-billing-page .er-billing-paid-action:hover {
  border-color: var(--of-primary);
  background: var(--of-primary);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24), 0 0 0 3px color-mix(in srgb, var(--of-primary) 14%, transparent);
  transform: translateY(-1px);
}

body.er-guard-billing-page .er-billing-paid-action:active {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
  transform: translateY(0);
}

body.er-guard-billing-page .er-billing-paid-action:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--of-primary) 34%, transparent);
  outline-offset: 3px;
}

/* The dashboard sidebar leaves substantially less room than the viewport
   width suggests. At common laptop widths, keep the billing action in view
   and collapse only secondary reporting columns. */
@media (max-width: 1280px) and (min-width: 721px) {
  body.er-guard-billing-page .er-table-wrap {
    overflow-x: hidden;
  }

  body.er-guard-billing-page .member-grid-head.er-billing-grid,
  body.er-guard-billing-page .member-row.er-billing-row,
  body.er-guard-billing-page .member-row.er-billing-row .member-row-grid.er-billing-grid {
    width: 100%;
    min-width: 0;
  }

  body.er-guard-billing-page .er-billing-grid {
    width: 100%;
    min-width: 0;
    grid-template-columns:
      minmax(160px, 1.35fr)
      minmax(135px, 1fr)
      minmax(115px, 0.85fr)
      minmax(115px, 0.85fr)
      minmax(90px, 0.55fr);
  }

  body.er-guard-billing-page .er-billing-grid > :nth-child(3),
  body.er-guard-billing-page .er-billing-grid > :nth-child(5),
  body.er-guard-billing-page .er-billing-grid > :nth-child(7),
  body.er-guard-billing-page .er-billing-grid > :nth-child(8),
  body.er-guard-billing-page .er-billing-grid > :nth-child(9),
  body.er-guard-billing-page .er-billing-grid > :nth-child(10) {
    display: none;
  }

  body.er-guard-billing-page .member-grid-head.er-billing-grid > :last-child,
  body.er-guard-billing-page .er-billing-row .er-billing-actions {
    position: static;
    right: auto;
    z-index: auto;
    background: transparent;
  }

  body.er-guard-billing-page .member-grid-head.er-billing-grid > :last-child {
    background: transparent;
  }
}

@media (max-width: 980px) {
  body.er-guard-dashboard-page .er-table-wrap {
    overflow-x: hidden;
  }

  body.er-guard-dashboard-page .member-grid-head.er-inventory-grid,
  body.er-guard-dashboard-page .member-grid-head.er-billing-grid,
  body.er-guard-dashboard-page .member-grid-head.er-activation-grid,
  body.er-guard-dashboard-page .member-row.er-inventory-row,
  body.er-guard-dashboard-page .member-row.er-billing-row,
  body.er-guard-dashboard-page .member-row.er-activation-row,
  body.er-guard-dashboard-page .er-inventory-row .member-row-grid,
  body.er-guard-dashboard-page .er-billing-row .member-row-grid,
  body.er-guard-dashboard-page .er-activation-row .member-row-grid {
    width: 100%;
    min-width: 0;
  }

  body.er-guard-inventory-page .er-inventory-grid,
  body.er-guard-billing-page .er-billing-grid,
  body.er-guard-dashboard-page:not(.er-guard-inventory-page):not(.er-guard-billing-page) .er-activation-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
    min-width: 0;
    width: 100%;
  }

  body.er-guard-dashboard-page .member-grid-head-cell,
  body.er-guard-dashboard-page .member-row-name,
  body.er-guard-dashboard-page .member-row-card,
  body.er-guard-dashboard-page .member-row-policy,
  body.er-guard-dashboard-page .member-row-date,
  body.er-guard-dashboard-page .member-row-status,
  body.er-guard-dashboard-page .member-row-actions {
    min-width: 0;
  }
}

@media (max-width: 720px) {
  body.er-guard-dashboard-page .er-table-wrap {
    overflow-x: visible;
  }

  body.er-guard-inventory-page .er-inventory-grid,
  body.er-guard-billing-page .er-billing-grid,
  body.er-guard-dashboard-page:not(.er-guard-inventory-page):not(.er-guard-billing-page) .er-activation-grid {
    grid-template-columns: 1fr;
  }

  body.er-guard-dashboard-page .member-grid-head.er-inventory-grid,
  body.er-guard-dashboard-page .member-grid-head.er-billing-grid,
  body.er-guard-dashboard-page .member-grid-head.er-activation-grid {
    display: none;
  }

  body.er-guard-dashboard-page .member-row.er-inventory-row,
  body.er-guard-dashboard-page .member-row.er-billing-row,
  body.er-guard-dashboard-page .member-row.er-activation-row {
    margin-bottom: 0.75rem;
  }
}

body.er-guard-dashboard-page:not(.er-guard-inventory-page):not(.er-guard-billing-page) .er-table-wrap {
  overflow-x: hidden;
}

body.er-guard-dashboard-page:not(.er-guard-inventory-page):not(.er-guard-billing-page) .member-grid-head.er-grid-head,
body.er-guard-dashboard-page:not(.er-guard-inventory-page):not(.er-guard-billing-page) .member-row.er-activation-row,
body.er-guard-dashboard-page:not(.er-guard-inventory-page):not(.er-guard-billing-page) .member-row.er-activation-row .member-row-grid,
body.er-guard-dashboard-page:not(.er-guard-inventory-page):not(.er-guard-billing-page) .er-activation-grid {
  width: 100%;
  min-width: 0;
}

body.er-guard-dashboard-page:not(.er-guard-inventory-page):not(.er-guard-billing-page) .member-grid-head.er-grid-head,
body.er-guard-dashboard-page:not(.er-guard-inventory-page):not(.er-guard-billing-page) .er-activation-grid {
  grid-template-columns:
    minmax(0, 1.5fr)
    minmax(108px, 0.72fr)
    minmax(0, 0.95fr)
    minmax(180px, 0.95fr)
    minmax(170px, 0.9fr)
    minmax(0, 1.05fr)
    minmax(0, 1.2fr)
    minmax(132px, 0.86fr);
}

/* The header and every body row must resolve the same physical tracks.
   Fractional tracks combined with max-content/100% widths let the browser
   calculate different column positions for the header and row values. */
body.er-guard-dashboard-page .er-grid-head.er-activation-grid,
body.er-guard-dashboard-page .er-activation-row,
body.er-guard-dashboard-page .er-activation-row .member-row-grid.er-activation-grid {
  width: 1750px;
  min-width: 1750px;
  box-sizing: border-box;
  grid-template-columns: 220px 140px 220px 220px 190px 240px 300px 220px;
}

body.er-guard-inventory-page .er-grid-head.er-inventory-grid,
body.er-guard-inventory-page .er-inventory-row,
body.er-guard-inventory-page .er-inventory-row .member-row-grid.er-inventory-grid {
  width: 1650px;
  min-width: 1650px;
  box-sizing: border-box;
  grid-template-columns: 250px 190px 170px 190px 190px 130px 260px;
}

body.er-guard-inventory-page .er-grid-head.er-inventory-grid-used,
body.er-guard-inventory-page .er-inventory-row:has(.er-inventory-grid-used),
body.er-guard-inventory-page .er-inventory-row .member-row-grid.er-inventory-grid-used {
  width: 1860px;
  min-width: 1860px;
  grid-template-columns: 250px 250px 190px 170px 190px 190px 130px 260px;
}

body.er-guard-billing-page .er-grid-head.er-billing-grid,
body.er-guard-billing-page .er-billing-row,
body.er-guard-billing-page .er-billing-row .member-row-grid.er-billing-grid {
  width: 1675px;
  min-width: 1675px;
  box-sizing: border-box;
  grid-template-columns: 220px 170px 130px 145px 160px 160px 180px 120px 140px 140px 110px;
}

body.er-guard-dashboard-page .er-grid-head > *,
body.er-guard-dashboard-page .er-activation-grid > *,
body.er-guard-dashboard-page .er-inventory-grid > *,
body.er-guard-dashboard-page .er-billing-grid > * {
  box-sizing: border-box;
}

body.er-guard-dashboard-page .er-activation-grid > :nth-child(9) {
  min-width: 210px;
  overflow: visible;
}

body.er-guard-dashboard-page .er-activation-grid > :nth-child(8) .member-status-pill {
  flex: 0 0 auto;
  padding-inline: 0.55rem;
  letter-spacing: 0.08em;
}

/* Keep activation headers readable and keep the policy number attached to its
   card number instead of allowing narrow tracks to break words vertically. */
body.er-guard-dashboard-page:not(.er-guard-inventory-page):not(.er-guard-billing-page) .er-table-wrap {
  overflow-x: auto;
}

body.er-guard-dashboard-page:not(.er-guard-inventory-page):not(.er-guard-billing-page) .member-grid-head.er-grid-head,
body.er-guard-dashboard-page:not(.er-guard-inventory-page):not(.er-guard-billing-page) .member-row.er-activation-row,
body.er-guard-dashboard-page:not(.er-guard-inventory-page):not(.er-guard-billing-page) .member-row.er-activation-row .member-row-grid,
body.er-guard-dashboard-page:not(.er-guard-inventory-page):not(.er-guard-billing-page) .er-activation-grid {
  width: 1500px;
  min-width: 1500px;
}

body.er-guard-dashboard-page:not(.er-guard-inventory-page):not(.er-guard-billing-page) .er-activation-grid {
  grid-template-columns:
    minmax(190px, 1.25fr)
    minmax(120px, 0.8fr)
    minmax(170px, 1fr)
    minmax(190px, 1.1fr)
    minmax(180px, 1fr)
    minmax(190px, 1.05fr)
    minmax(220px, 1.2fr)
    minmax(240px, 1.1fr);
}

/* Keep the activation status pill in a complete, readable column at narrow
   dashboard widths. The surrounding table remains horizontally scrollable. */
body.er-guard-dashboard-page:not(.er-guard-inventory-page):not(.er-guard-billing-page) .er-activation-grid > :nth-child(9),
body.er-guard-dashboard-page:not(.er-guard-inventory-page):not(.er-guard-billing-page) .er-activation-grid .member-row-status {
  min-width: 240px;
  overflow: visible;
}

body.er-guard-dashboard-page:not(.er-guard-inventory-page):not(.er-guard-billing-page) .er-activation-grid .member-status-pill {
  flex-shrink: 0;
  white-space: nowrap;
}

body.er-guard-dashboard-page:not(.er-guard-inventory-page):not(.er-guard-billing-page) .er-activation-grid .member-status-pill.status-pending_activation {
  width: 8.5rem;
  white-space: normal;
  line-height: 1.05;
  text-align: center;
}

body.er-guard-dashboard-page:not(.er-guard-inventory-page):not(.er-guard-billing-page) .er-activation-grid .member-status-pill.status-pending_activation > span {
  display: block;
}

body.er-guard-dashboard-page:not(.er-guard-inventory-page):not(.er-guard-billing-page) .member-grid-head-cell,
body.er-guard-dashboard-page:not(.er-guard-inventory-page):not(.er-guard-billing-page) .member-grid-head-cell span {
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
}

body.er-guard-dashboard-page:not(.er-guard-inventory-page):not(.er-guard-billing-page) .er-activation-card-number {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}

body.er-guard-dashboard-page .er-activation-grid > :nth-child(9) .member-status-pill {
  flex: 0 0 auto;
  padding-inline: 0.55rem;
  letter-spacing: 0.08em;
}

body.er-guard-dashboard-page:not(.er-guard-inventory-page):not(.er-guard-billing-page) .er-activation-policy-number {
  color: var(--of-on-surface-variant);
  font-size: 0.72rem;
  line-height: 1.2;
  white-space: nowrap;
}

@media (max-width: 980px) {
  body.er-guard-dashboard-page:not(.er-guard-inventory-page):not(.er-guard-billing-page) .member-grid-head.er-grid-head,
  body.er-guard-dashboard-page:not(.er-guard-inventory-page):not(.er-guard-billing-page) .member-row.er-activation-row,
  body.er-guard-dashboard-page:not(.er-guard-inventory-page):not(.er-guard-billing-page) .member-row.er-activation-row .member-row-grid,
  body.er-guard-dashboard-page:not(.er-guard-inventory-page):not(.er-guard-billing-page) .er-activation-grid {
    width: 100%;
    min-width: 0;
  }

  body.er-guard-dashboard-page:not(.er-guard-inventory-page):not(.er-guard-billing-page) .er-activation-grid {
    grid-template-columns: 1fr 1fr;
  }

  body.er-guard-billing-page .er-billing-date-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.er-guard-billing-page .er-billing-filter-toolbar,
  body.er-guard-billing-page .er-billing-status-tabs,
  body.er-guard-billing-page .er-billing-company-tabs,
  body.er-guard-billing-page #er-billing-filter-panel {
    grid-column: 1;
    grid-row: auto;
  }

  body.er-guard-billing-page .er-billing-status-tabs,
  body.er-guard-billing-page .er-billing-company-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.2rem;
    scrollbar-width: thin;
  }

  body.er-guard-billing-page .er-billing-analytics-metrics,
  body.er-guard-billing-page .er-billing-analytics-breakdown {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  body.er-guard-dashboard-page:not(.er-guard-inventory-page):not(.er-guard-billing-page) .er-activation-grid {
    grid-template-columns: 1fr;
  }
}

body.er-guard-dashboard-page .er-file-picker .of-upload-actions,
body.er-guard-dashboard-page .member-file-picker .of-upload-actions {
  gap: 16px;
}

/* Billing stays a horizontally scrollable table at narrow viewport widths so
   the Actions column remains the real final column instead of wrapping below
   the payment fields. */
@media (max-width: 980px) {
  body.er-guard-billing-page .er-table-wrap {
    overflow-x: auto;
  }

  /* The billing table is wider than the viewport. Keep the last action track
     in the visible right edge so unpaid rows expose their Paid control. */
  body.er-guard-billing-page .member-grid-head.er-billing-grid > :last-child,
  body.er-guard-billing-page .er-billing-row .er-billing-actions {
    position: sticky;
    right: 0;
    left: auto;
    z-index: 4;
    background: var(--of-surface-container);
  }

  body.er-guard-billing-page .member-grid-head.er-billing-grid > :last-child {
    background: var(--of-surface-container-high);
  }

  body.er-guard-billing-page .member-grid-head.er-billing-grid,
  body.er-guard-billing-page .member-row.er-billing-row,
  body.er-guard-billing-page .member-row.er-billing-row .member-row-grid.er-billing-grid {
    width: 1450px;
    min-width: 1450px;
    box-sizing: border-box;
  }

  body.er-guard-billing-page .er-billing-grid {
    grid-template-columns:
      minmax(220px, 1.25fr)
      minmax(170px, 1fr)
      minmax(130px, 0.72fr)
      minmax(145px, 0.8fr)
      minmax(160px, 0.86fr)
      minmax(160px, 0.86fr)
      minmax(180px, 0.95fr)
      minmax(120px, 0.7fr)
      minmax(140px, 0.78fr)
      minmax(140px, 0.78fr)
      minmax(110px, 0.58fr);
  }

  /* Keep the final cell independently visible when the table is scrolled.
     The row itself is also clickable, so make the payment control a real
     flex item above the row hit area instead of allowing it to collapse. */
  body.er-guard-billing-page .er-billing-actions {
    display: flex !important;
    align-items: center;
    justify-content: center !important;
    min-width: 110px;
    overflow: visible;
    position: sticky;
    right: 0;
    left: auto;
    z-index: 4;
    background: var(--of-surface-container);
  }

  body.er-guard-billing-page .er-billing-row:hover .er-billing-actions,
  body.er-guard-billing-page .er-billing-row:focus-visible .er-billing-actions {
    background: var(--of-surface-bright);
  }

  body.er-guard-billing-page .er-billing-actions [data-er-billing-open] {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    visibility: visible !important;
    opacity: 1 !important;
  }
}

/* Billing status dropdown */
body.er-guard-billing-page .er-billing-filter-bar .er-dashboard-search {
  display: flex;
  align-items: center;
  flex: 0 1 480px;
  min-width: 260px;
}

body.er-guard-billing-page .er-billing-filter-select {
  margin-right: 0.75rem;
  color: #72829a;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

body.er-guard-billing-page .er-billing-filter-control {
  width: min(100%, 250px);
  min-height: 44px;
  padding: 0 2.5rem 0 1rem;
  border: 1px solid rgba(90, 108, 134, 0.42);
  border-radius: 9px;
  background: rgba(11, 18, 29, 0.72);
  color: #dce7f6;
  font-size: 0.88rem;
  font-weight: 700;
  outline: none;
}

body.er-guard-billing-page .er-billing-filter-control:focus {
  border-color: rgba(55, 205, 205, 0.72);
  box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.12);
}

body.er-guard-billing-page .er-billing-filter-control option {
  background: #111b2d;
  color: #dce7f6;
}

@media (max-width: 900px) {
  body.er-guard-billing-page .er-billing-filter-bar .er-dashboard-search {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    width: 100%;
    flex: 1 1 auto;
  }

  body.er-guard-billing-page .er-billing-filter-control {
    width: 100%;
  }
}

body.er-guard-dashboard-page .er-file-picker .of-export-btn,
body.er-guard-dashboard-page .member-file-picker .of-export-btn {
  justify-content: center;
  width: 118px;
  min-width: 118px;
  min-height: 66px;
  padding: 10px 16px;
  border: 1px solid rgba(95, 117, 150, 0.54);
  border-radius: 10px;
  background: rgba(13, 21, 34, 0.74);
  color: #f7fbff;
  font-family: var(--of-font-body);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: 0;
  text-align: center;
  text-transform: none;
  white-space: normal;
}

body.er-guard-dashboard-page .er-file-picker .of-export-btn:hover,
body.er-guard-dashboard-page .member-file-picker .of-export-btn:hover,
body.er-guard-dashboard-page .er-file-picker .of-export-btn:focus-visible,
body.er-guard-dashboard-page .member-file-picker .of-export-btn:focus-visible {
  border-color: rgba(158, 197, 255, 0.72);
  background: rgba(20, 31, 50, 0.92);
}

body.er-guard-dashboard-page .er-file-picker .of-export-btn[type="submit"],
body.er-guard-dashboard-page .member-file-picker .of-export-btn[type="submit"],
body.er-guard-dashboard-page .er-file-picker .of-export-btn.secondary,
body.er-guard-dashboard-page .member-file-picker .of-export-btn.secondary {
  background: rgba(13, 21, 34, 0.74);
  color: #f7fbff;
}

body.er-guard-dashboard-page .er-file-picker .of-export-btn[disabled],
body.er-guard-dashboard-page .member-file-picker .of-export-btn[disabled] {
  cursor: wait;
  opacity: 1;
}

/* Keep the upload busy state readable in light mode instead of inheriting the
   dark disabled/button colors. */
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-file-picker .of-export-btn.is-busy,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-file-picker .of-export-btn.is-busy {
  border-color: #cbd5e1 !important;
  background: #e2e8f0 !important;
  color: #15202b !important;
  -webkit-text-fill-color: #15202b !important;
  font-family: var(--of-font-mono, "JetBrains Mono", monospace) !important;
  font-size: 12px !important;
  letter-spacing: 0.12em !important;
  text-transform: uppercase !important;
}

/* Final busy-state sizing: this follows the light-mode button palette above,
   so the label remains fully contained on both ER Guard upload pages. */
html[data-dashboard-theme="light"] body.er-guard-dashboard-page form.upload-form[data-upload-kind] > .of-upload-zone > .of-upload-actions .of-export-btn.is-busy {
  box-sizing: border-box;
  flex: 0 1 112px !important;
  width: 112px !important;
  min-width: 0 !important;
  max-width: 112px !important;
  padding-inline: 6px !important;
  font-size: 0.68rem !important;
  letter-spacing: 0.06em !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Keep the activation filters and Filters control in one stable toolbar row. */
body.er-guard-dashboard-page .er-dashboard-search .member-search-toolbar {
  display: flex !important;
  grid-template-columns: none;
  align-items: center;
  justify-content: space-between;
}

body.er-guard-dashboard-page .er-dashboard-search .er-guard-status-filter-options {
  display: flex;
  flex: 1 1 auto;
  justify-content: flex-start;
  flex-wrap: nowrap;
  min-width: 0;
  overflow-x: auto;
}

body.er-guard-dashboard-page .er-dashboard-search .member-filter-toggle {
  flex: 0 0 auto;
  margin-left: auto;
}

/* Keep the status tabs and Filters control on the same proportional row. */
body.er-guard-dashboard-page .er-dashboard-search .member-search-toolbar {
  display: flex !important;
  flex-wrap: nowrap !important;
  width: 100%;
  gap: 12px;
  padding-inline: 0;
  box-sizing: border-box;
}

body.er-guard-dashboard-page .er-dashboard-search .er-guard-status-filter-options {
  flex: 1 1 0%;
  width: 0;
  padding-left: 0;
}

body.er-guard-dashboard-page .er-dashboard-search .member-filter-toggle {
  margin-left: 0;
  margin-right: 0;
}

/* Keep the activation tabs and their controls on one clean row without a
   horizontal scrollbar. The tabs shrink through tighter gaps/padding while
   Export and Filters remain fixed, separate controls. */
body.er-guard-dashboard-page:not(.er-guard-inventory-page):not(.er-guard-billing-page) .er-dashboard-search .member-search-toolbar {
  gap: 0.6rem;
}

body.er-guard-dashboard-page:not(.er-guard-inventory-page):not(.er-guard-billing-page) .er-guard-status-filter-options {
  flex: 1 1 auto;
  gap: 0.45rem;
  overflow: visible;
}

body.er-guard-dashboard-page:not(.er-guard-inventory-page):not(.er-guard-billing-page) .er-guard-status-filter-options .ticket-filter-pill {
  gap: 0.35rem;
  padding-inline: 0.72rem;
}

body.er-guard-dashboard-page:not(.er-guard-inventory-page):not(.er-guard-billing-page) .er-dashboard-search .er-directory-export-trigger,
body.er-guard-dashboard-page:not(.er-guard-inventory-page):not(.er-guard-billing-page) .er-dashboard-search .member-filter-toggle {
  flex: 0 0 auto;
  white-space: nowrap;
}

/* Keep the ER Guard directory controls with the section title. The tabs sit
   in the visual center while export and advanced filters stay grouped at the
   right, matching the page's existing directory rhythm. */
body.er-guard-dashboard-page:not(.er-guard-billing-page):not(.er-guard-inventory-page) .er-dashboard-table-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "title title"
    "filters filters";
  row-gap: 0;
  column-gap: 1.25rem;
  width: 100%;
  box-sizing: border-box;
}

body.er-guard-dashboard-page:not(.er-guard-billing-page):not(.er-guard-inventory-page) .er-dashboard-table-head .er-guard-table-title {
  grid-area: title;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(143, 161, 180, 0.24);
}

/* The title divider should span the complete activation table, including the
   header's horizontal padding, while keeping the controls in their original
   positions. */
body.er-guard-dashboard-page:not(.er-guard-billing-page):not(.er-guard-inventory-page) .er-dashboard-table-head .er-guard-table-title {
  box-sizing: border-box;
  margin-inline: -24px;
  padding-inline: 24px;
}

body.er-guard-dashboard-page:not(.er-guard-billing-page):not(.er-guard-inventory-page) .er-dashboard-table-head .er-guard-table-title .section-head {
  margin: 0;
}

body.er-guard-dashboard-page .er-policy-number-button {
  flex: 0 0 auto;
  min-height: 40px;
  white-space: nowrap;
}

body.er-guard-dashboard-page:not(.er-guard-billing-page):not(.er-guard-inventory-page) .er-guard-filter-row {
  grid-area: filters;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.25rem;
  padding-top: 1rem;
}

body.er-guard-dashboard-page:not(.er-guard-billing-page):not(.er-guard-inventory-page) .er-dashboard-search:has(.er-filter-panel[hidden]) {
  display: none;
}

body.er-guard-dashboard-page:not(.er-guard-billing-page):not(.er-guard-inventory-page) .er-table-wrap {
  margin-top: 0 !important;
}

body.er-guard-dashboard-page:not(.er-guard-billing-page):not(.er-guard-inventory-page) .er-guard-status-filter-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  justify-content: stretch;
  align-items: center;
  column-gap: clamp(1rem, 4vw, 4.5rem);
  row-gap: 0.65rem;
  min-width: 0;
  overflow: visible;
}

body.er-guard-dashboard-page:not(.er-guard-billing-page):not(.er-guard-inventory-page) .er-guard-header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  white-space: nowrap;
}

.er-policy-start-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 1.25rem; }
body.er-guard-dashboard-page .er-policy-start-dialog {
  width: min(780px, calc(100vw - 2rem));
  max-height: min(82vh, 680px);
}
@media (max-width: 650px) {
  .er-policy-start-grid { grid-template-columns: 1fr; }
}

body.er-guard-dashboard-page:not(.er-guard-billing-page):not(.er-guard-inventory-page) .er-guard-table-title {
  grid-area: title;
  min-width: 0;
}

body.er-guard-dashboard-page .er-guard-header-tabs {
  grid-area: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: thin;
}

body.er-guard-dashboard-page .er-guard-header-tabs .ticket-filter-pill {
  flex: 0 0 auto;
  justify-content: center;
  white-space: nowrap;
  padding-inline: 0.72rem;
}

body.er-guard-dashboard-page:not(.er-guard-billing-page):not(.er-guard-inventory-page) .er-guard-status-filter-options .ticket-filter-pill {
  width: 100%;
  box-sizing: border-box;
}

body.er-guard-dashboard-page .er-guard-header-actions {
  grid-area: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
}

body.er-guard-dashboard-page .er-guard-header-actions .er-directory-export-trigger,
body.er-guard-dashboard-page .er-guard-header-actions .member-filter-toggle {
  margin: 0;
  white-space: nowrap;
}

@media (max-width: 1180px) {
  body.er-guard-dashboard-page:not(.er-guard-billing-page):not(.er-guard-inventory-page) .er-dashboard-table-head {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "title"
      "filters";
  }

  body.er-guard-dashboard-page:not(.er-guard-billing-page):not(.er-guard-inventory-page) .er-guard-filter-row {
    grid-template-columns: 1fr;
  }

  body.er-guard-dashboard-page:not(.er-guard-billing-page):not(.er-guard-inventory-page) .er-guard-header-actions {
    justify-content: flex-start;
  }

  body.er-guard-dashboard-page:not(.er-guard-billing-page):not(.er-guard-inventory-page) .er-guard-header-tabs {
    justify-content: flex-start;
    grid-template-columns: repeat(4, max-content);
  }
}

@media (max-width: 640px) {
  body.er-guard-dashboard-page:not(.er-guard-billing-page):not(.er-guard-inventory-page) .er-dashboard-table-head {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  body.er-guard-dashboard-page:not(.er-guard-billing-page):not(.er-guard-inventory-page) .er-guard-header-tabs {
    justify-content: flex-start;
    padding-bottom: 0.2rem;
  }

  body.er-guard-dashboard-page:not(.er-guard-billing-page):not(.er-guard-inventory-page) .er-guard-header-actions {
    justify-content: stretch;
  }

  body.er-guard-dashboard-page:not(.er-guard-billing-page):not(.er-guard-inventory-page) .er-guard-header-actions > * {
    flex: 1 1 0;
  }
}

/* Billing workstreams: account selection belongs with the filters while the
   workstream tabs remain the primary navigation for this surface. */
.er-billing-workstream-tabs {
  display: flex;
  align-self: stretch;
  align-items: stretch;
  gap: 0;
  margin: 0 0 0 1.5rem;
  border-bottom: 1px solid rgba(143, 161, 180, 0.24);
}
.er-billing-workstream-tabs .member-detail-tab {
  min-width: 7.25rem;
  justify-content: center;
  padding: 0.25rem 1rem 0.8rem;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: #9aa9bd;
  text-decoration: none;
}
.er-billing-workstream-tabs .member-detail-tab:hover,
.er-billing-workstream-tabs .member-detail-tab:focus-visible { color: #d8e4f2; background: transparent; }
.er-billing-workstream-tabs .member-detail-tab.is-active { color: #42d8cd; border-bottom-color: #42d8cd; background: transparent; }
.er-billing-reimbursement-analytics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
  margin: 0 0 1.1rem;
}
.er-billing-reimbursement-analytics article {
  display: grid;
  gap: 0.35rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--of-outline-variant, rgba(143, 161, 180, 0.24));
  border-radius: 0.85rem;
  background: rgba(20, 31, 49, 0.52);
}
.er-billing-reimbursement-analytics span { color: var(--of-on-surface-variant, #9aa9bd); font-size: 0.78rem; }
.er-billing-reimbursement-analytics strong { color: var(--of-on-surface, #f3f7fb); font-size: 1.45rem; }
.er-reimbursement-table tr[data-open-ticket-modal] { cursor: pointer; }
.er-reimbursement-table tr[data-open-ticket-modal]:hover { background: rgba(63, 214, 205, 0.07); }
.er-reimbursement-table .er-reimbursement-row-action { white-space: nowrap; }
.er-reimbursement-refund-action { min-width: 7.5rem; padding: .55rem .8rem; }
.er-reimbursement-refund-email-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .8rem;
  margin: 1rem 1.25rem 0;
  padding: .85rem 1rem;
  border: 1px solid rgba(143, 161, 180, .24);
  border-radius: .65rem;
  background: rgba(11, 18, 29, .42);
}
.er-reimbursement-refund-email-summary div { min-width: 0; }
.er-reimbursement-refund-email-summary small { display: block; margin-bottom: .3rem; color: #91a3b9; font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.er-reimbursement-refund-email-summary strong { display: block; color: #dce7f6; font-size: .86rem; overflow-wrap: anywhere; }
.er-reimbursement-refund-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 1.25rem; }
.er-reimbursement-refund-modal .member-field-error { display: block; margin-top: .35rem; color: #ff5b78; }
.er-reimbursement-refund-modal .member-form-error { margin: 1rem 1.25rem 0; }
.er-reimbursement-refund-modal .member-form-actions { padding: 1rem 1.25rem 1.25rem; }
.er-guard-billing-page .er-reimbursement-refund-modal .member-detail-dialog,
.er-guard-dashboard-page .er-reimbursement-refund-modal .member-detail-dialog {
  width: min(640px, calc(100vw - 2rem));
  max-height: min(88vh, 680px);
  padding: 0;
  overflow: hidden;
}

/* The billing-page refund dialog is also opened from the activation detail
   modal. Keep it compact and above that modal instead of letting the generic
   member dialog width/stacking rules win. */
.er-billing-refund-modal .member-detail-dialog {
  width: min(640px, calc(100vw - 2rem));
  max-width: calc(100vw - 2rem);
  max-height: min(88vh, 680px);
  padding: 0;
  overflow: hidden;
}

/* Refund is a compact action dialog, not a full activation detail dialog.
   These declarations intentionally win over the shared member-directory
   modal rules loaded by the dashboard shell. */
.er-billing-refund-modal > .member-detail-dialog {
  width: min(640px, calc(100vw - 2rem)) !important;
  max-width: calc(100vw - 2rem) !important;
  padding: 0 !important;
}

.er-billing-refund-modal > .member-detail-dialog > .manual-ticket-header {
  margin: 0 !important;
  padding: 1.25rem 1.25rem 1rem !important;
  background: transparent !important;
}

.er-billing-refund-modal > .member-detail-dialog > form {
  padding: 0 1.25rem 1.25rem;
}

/* A refund is a second-level dialog. Temporarily remove the activation
   detail surface from the visible layer while the refund form is active so
   this remains correct even inside nested dashboard stacking contexts. */
body.er-billing-refund-open [data-er-activation-modal] {
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Keep ER Guard modal headers on the dialog surface. The generic member
   header background creates an unrelated grey rectangle in light mode. */
.er-guard-billing-page .er-activation-modal .manual-ticket-header,
.er-guard-dashboard-page .er-activation-modal .manual-ticket-header {
  background: transparent;
}

html[data-dashboard-theme="light"] .er-guard-billing-page .er-activation-modal .manual-ticket-header,
html[data-dashboard-theme="light"] .er-guard-dashboard-page .er-activation-modal .manual-ticket-header {
  background: transparent;
}
.er-billing-filter-panel select { min-height: 2.7rem; }
@media (max-width: 800px) {
  .er-billing-workstream-tabs { overflow-x: auto; margin-left: 0.75rem; }
  .er-billing-reimbursement-analytics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 650px) {
  .er-reimbursement-refund-email-summary { grid-template-columns: 1fr; }
  .er-reimbursement-refund-grid { grid-template-columns: 1fr; }
}
.reimbursement-ticket-modal .reimbursement-ticket-modal-body { min-height: 25rem; }
.reimbursement-modal-inner { padding: 0.25rem; }
.reimbursement-modal-summary { display:flex; align-items:flex-start; justify-content:space-between; gap:1rem; padding:0 0 1rem; border-bottom:1px solid var(--of-outline-variant, rgba(143,161,180,.24)); }
.reimbursement-modal-summary h3 { margin:.25rem 0 0; color:var(--of-on-surface,#f3f7fb); }
.reimbursement-modal-kicker { color:var(--of-on-surface-variant,#9aa9bd); font-size:.75rem; text-transform:uppercase; letter-spacing:.08em; }
.reimbursement-modal-tabs { margin:1rem 0; }
.reimbursement-modal-tabs .member-detail-tab { border:0; cursor:pointer; }
.reimbursement-modal-panel[hidden] { display:none; }
.reimbursement-details-grid { max-height:34rem; overflow:auto; }
.reimbursement-details-grid .member-detail-item.is-wide { grid-column:1 / -1; }
.reimbursement-modal-document, .reimbursement-modal-audit { display:flex; justify-content:space-between; gap:1rem; align-items:center; padding:.85rem 0; border-bottom:1px solid var(--of-outline-variant, rgba(143,161,180,.18)); }
.reimbursement-modal-document small, .reimbursement-modal-audit small { display:block; color:var(--of-on-surface-variant,#9aa9bd); font-size:.75rem; margin-top:.25rem; }
.reimbursement-modal-document-actions { display:flex; gap:.5rem; flex-wrap:wrap; }
.reimbursement-modal-document-actions a { text-decoration:none; }
.reimbursement-modal-audit { align-items:flex-start; }
.reimbursement-modal-audit p { margin:.3rem 0 0; color:var(--of-on-surface-variant,#9aa9bd); white-space:pre-wrap; }
.reimbursement-modal-empty, .reimbursement-modal-loading, .reimbursement-modal-error { color:var(--of-on-surface-variant,#9aa9bd); padding:1rem 0; }
@media (max-width: 650px) { .reimbursement-modal-document, .reimbursement-modal-audit { align-items:flex-start; flex-direction:column; } }

.er-create-mode-choice {
  padding: 2rem 1.5rem 1.25rem;
  text-align: center;
  background: var(--of-surface-container-low, #121a2c);
}
.er-create-mode-kicker { margin: 0 0 0.9rem; color: var(--of-on-surface, #e7eefc); font-size: 1.05rem; font-weight: 800; }
.er-create-mode-options { display: flex; justify-content: center; gap: 0.75rem; flex-wrap: wrap; }
.er-create-mode-button { min-width: 180px; }
.er-create-mode-help { max-width: 560px; margin: 0.9rem auto 0; color: var(--of-on-surface-variant, #aab8c8); font-size: 0.82rem; }
.er-create-queue { margin: 1rem 1.25rem 0; padding: 1rem; border: 1px solid var(--of-outline-variant, #3c4946); border-radius: 0.8rem; background: rgba(15, 25, 42, 0.72); }
.er-create-queue-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0.75rem; }
.er-create-queue-head h3 { margin: 0; color: var(--of-on-surface, #e7eefc); font-size: 0.95rem; }
.er-create-queue-head p { margin: 0.2rem 0 0; color: var(--of-on-surface-variant, #aab8c8); font-size: 0.78rem; }
.er-create-queue-head strong { color: var(--of-primary, #72e8c1); white-space: nowrap; }
.er-create-queue-table-wrap { overflow-x: auto; }
.er-create-queue-table { width: 100%; border-collapse: collapse; min-width: 620px; }
.er-create-queue-table th, .er-create-queue-table td { padding: 0.55rem 0.65rem; border-bottom: 1px solid rgba(90, 108, 134, 0.28); text-align: left; font-size: 0.78rem; white-space: nowrap; }
.er-create-queue-table th { color: var(--of-on-surface-variant, #aab8c8); font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; }
.er-create-queue-remove { padding: 0.35rem 0.55rem; font-size: 0.7rem; }
@media (max-width: 650px) {
  .er-create-mode-choice { padding-inline: 1rem; }
  .er-create-mode-button { width: 100%; }
  .er-create-queue { margin-inline: 0.75rem; }
  .er-create-queue-head { align-items: flex-start; flex-direction: column; }
}

/* Activation product navigation: product is the primary filter, while status
   remains a contextual filter inside the expandable filter section. */
body.er-guard-dashboard-page:not(.er-guard-inventory-page):not(.er-guard-billing-page) .er-guard-filter-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding-top: 1rem;
}
body.er-guard-dashboard-page .er-guard-product-filter-form {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
  min-width: min(100%, 26rem);
}
body.er-guard-dashboard-page .er-guard-product-filter-form label {
  color: var(--of-on-surface-variant, #aab8c8);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

body.er-guard-billing-page .er-billing-payment-date {
  box-sizing: border-box;
  flex-direction: column;
  justify-content: center;
  width: 7.25rem;
  min-width: 7.25rem;
  max-width: 7.25rem;
  height: 2.7rem;
  min-height: 2.7rem;
  max-height: 2.7rem;
  padding: 0.25rem 0.4rem;
  border-color: rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.24);
  color: #b9cce0;
  font-size: 0.7rem;
  font-weight: 600;
}

body.er-guard-billing-page .er-billing-grid .er-status-date,
body.er-guard-billing-page .er-billing-grid .er-status-time {
  color: #b9cce0;
  font-family: var(--of-font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: 0.02em;
}

body.er-guard-billing-page .er-billing-grid .er-status-time {
  margin-top: 0.1rem;
}

body.er-guard-billing-page .er-billing-row .member-row-grid {
  min-height: 96px;
  padding: 12px 16px;
}

body.er-guard-billing-page .er-billing-payment-date .er-status-date,
body.er-guard-billing-page .er-billing-payment-date .er-status-time {
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: 1.3;
  margin: 0;
}
body.er-guard-dashboard-page .er-guard-product-filter-select {
  position: relative;
  width: min(100%, 24rem);
}
body.er-guard-dashboard-page .er-guard-product-filter-form select {
  width: 100%;
  min-height: 2.7rem;
  padding: 0.55rem 2.4rem 0.55rem 0.85rem;
  border: 1px solid rgba(90, 108, 134, 0.52);
  border-radius: 0.65rem;
  background: rgba(11, 18, 29, 0.72);
  color: var(--of-on-surface, #e7eefc);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}
body.er-guard-dashboard-page .er-guard-product-filter-chevron {
  position: absolute;
  top: 50%;
  right: 2rem;
  width: 0.62rem;
  height: 0.62rem;
  border-right: 0.16rem solid var(--of-on-surface, #e7eefc);
  border-bottom: 0.16rem solid var(--of-on-surface, #e7eefc);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}
body.er-guard-dashboard-page .er-guard-product-filter-form select:hover,
body.er-guard-dashboard-page .er-guard-product-filter-form select:focus-visible {
  border-color: rgba(96, 224, 211, 0.7);
  outline: none;
}
body.er-guard-dashboard-page .er-status-filter-input select {
  min-height: 2.7rem;
  width: 100%;
}
@media (max-width: 720px) {
  body.er-guard-dashboard-page .er-guard-product-filter-form {
    justify-content: stretch;
    min-width: 0;
  }
  body.er-guard-dashboard-page .er-guard-product-filter-form select {
    flex: 1 1 auto;
    width: 100%;
  }
  body.er-guard-dashboard-page .er-guard-product-filter-select {
    flex: 1 1 auto;
    width: auto;
  }
}

/* Billing dates are supporting metadata, not status pills. Remove the
   circular container so the date/time stays clear of the row rules. */
body.er-guard-billing-page .er-billing-payment-date {
  width: auto !important;
  min-width: 0 !important;
  max-width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 0.62rem !important;
  line-height: 1.1 !important;
}

body.er-guard-billing-page .er-billing-payment-date .er-status-date,
body.er-guard-billing-page .er-billing-payment-date .er-status-time {
  font-size: 0.62rem !important;
  line-height: 1.1 !important;
  white-space: nowrap;
}

body.er-guard-inventory-page [data-er-inventory-generate-modal] .member-create-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.45rem;
  padding: 1.2rem 4.25rem 1.2rem 1.5rem;
}

body.er-guard-inventory-page [data-er-inventory-generate-modal] .er-inventory-create-dialog {
  width: min(820px, calc(100vw - 2rem));
  max-height: min(88vh, 900px);
}

body.er-guard-inventory-page [data-er-inventory-generate-modal] .member-create-header-note {
  max-width: none;
  text-align: left;
}

body.er-guard-inventory-page [data-er-inventory-generate-modal] .member-modal-form .er-inventory-create-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.er-guard-inventory-page [data-er-inventory-generate-modal] .member-modal-form .er-inventory-create-grid .member-field:last-child {
  grid-column: 1 / -1;
}

body.er-guard-inventory-page [data-er-inventory-generate-modal] .member-create-close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0;
}

body.er-guard-inventory-page [data-er-inventory-generate-status] {
  box-sizing: border-box;
  display: block;
  width: calc(100% - 3rem);
  min-width: 0;
  margin: 0.75rem 1.5rem 1.25rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid rgba(115, 237, 214, 0.24);
  border-radius: 0.7rem;
  background: rgba(30, 66, 72, 0.28);
  color: var(--of-on-surface-variant);
  font-size: 0.88rem;
  line-height: 1.45;
  white-space: normal;
  overflow-wrap: anywhere;
}

body.er-guard-inventory-page [data-er-inventory-generate-status]:empty {
  display: none;
}

html[data-dashboard-theme="light"] body.er-guard-inventory-page [data-er-inventory-generate-modal] .manual-ticket-dialog {
  color: #17243a;
  background: #fff;
  border-color: #cbd5e1;
}

html[data-dashboard-theme="light"] body.er-guard-inventory-page [data-er-inventory-generate-modal] .manual-ticket-header {
  background: #f4f7fb;
  border-color: #d6dfeb;
}

html[data-dashboard-theme="light"] body.er-guard-inventory-page [data-er-inventory-generate-modal] .member-create-header-note,
html[data-dashboard-theme="light"] body.er-guard-inventory-page [data-er-inventory-generate-modal] .muted {
  color: #52627a;
}

html[data-dashboard-theme="light"] body.er-guard-inventory-page [data-er-inventory-generate-status] {
  border-color: #b9dcd7;
  background: #eff9f7;
  color: #365b58;
}

@media (max-width: 640px) {
  body.er-guard-inventory-page .er-inventory-toolbar-actions { flex-wrap: wrap; }
  body.er-guard-inventory-page [data-er-inventory-generate-modal] .member-modal-form .er-inventory-create-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  body.er-guard-inventory-page [data-er-inventory-generate-modal] .member-modal-form .er-inventory-create-grid .member-field:last-child {
    grid-column: auto;
  }
}

/* Compact confirmation for the destructive ER Guard database action. */
body.er-guard-dashboard-page .er-guard-database-delete-modal > .member-detail-dialog {
  width: min(560px, calc(100vw - 32px)) !important;
  max-width: 560px !important;
}

body.er-guard-dashboard-page .er-guard-database-delete-modal .member-detail-header {
  padding: 1.25rem 1.4rem 1rem !important;
  background: transparent !important;
}

body.er-guard-dashboard-page .er-guard-database-delete-modal .member-detail-header-copy h2 {
  margin: 0.3rem 0 0.55rem !important;
  font-size: 1.45rem !important;
}

body.er-guard-dashboard-page .er-guard-database-delete-modal .member-detail-header-copy p {
  margin: 0.35rem 0 0 !important;
  font-size: 0.9rem !important;
  line-height: 1.45 !important;
}

body.er-guard-dashboard-page .er-guard-database-delete-modal .member-modal-form {
  padding: 1rem 1.4rem 1.25rem !important;
}

/* With the date unboxed, the Paid group no longer needs the old downward
   compensation that was sized for the circular date badge. */
body.er-guard-billing-page .er-billing-paid-status:has(.er-billing-payment-date) {
  transform: none !important;
  min-height: 0 !important;
  grid-template-rows: auto auto;
  gap: 0.25rem;
}

/* Final override for the change-policy select. The shared dashboard theme
   rules use a background shorthand later in the cascade, so keep this
   modal-scoped chevron explicit after those resets. */
body.er-guard-dashboard-page .er-policy-start-dialog select {
  background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2393a3b5' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") !important;
  background-position: right 1rem center !important;
  background-repeat: no-repeat !important;
  background-size: 0.95rem 0.95rem !important;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-policy-start-dialog select {
  background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2364758b' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") !important;
}

/* ER Guard light theme: keep activation, inventory, and billing surfaces on
   one readable palette instead of mixing the dark card/table defaults with
   the dashboard shell's light background. */
html[data-dashboard-theme="light"] body.er-guard-dashboard-page {
  --er-light-ink: #172033;
  --er-light-muted: #58677a;
  --er-light-subtle: #6b7a8c;
  --er-light-line: #d8e1e9;
  --er-light-line-strong: #c5d1dc;
  --er-light-surface: #ffffff;
  --er-light-surface-soft: #f7fafc;
  --er-light-surface-raised: #eef4f7;
  --er-light-accent: #176b4c;
  --er-light-accent-soft: #d9f5e9;
  --er-light-accent-strong: #0d5339;
  color: var(--er-light-ink);
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-dashboard-main {
  color: var(--er-light-ink);
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-dashboard-main .panel-block,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-dashboard-table-panel,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-billing-filter-bar,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-billing-analytics-panel {
  border-color: var(--er-light-line) !important;
  background: var(--er-light-surface) !important;
  color: var(--er-light-ink) !important;
  box-shadow: 0 12px 30px rgba(31, 50, 68, 0.07) !important;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .section-head,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-guard-table-title .section-head,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-inventory-view-note,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-billing-analytics-head h3,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-billing-analytics-head p {
  color: var(--er-light-ink) !important;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .muted,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .upload-instructions,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-inventory-view-note,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-panel-copy p,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-footer-summary,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-footer-meta,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-billing-analytics-card span,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-billing-analytics-card small {
  color: var(--er-light-muted) !important;
  -webkit-text-fill-color: var(--er-light-muted) !important;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-guard-product-tabs {
  scrollbar-color: #82bca4 #e8eef2;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-guard-product-tabs::-webkit-scrollbar-track {
  background: #e8eef2;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-guard-product-tabs::-webkit-scrollbar-thumb {
  background: #82bca4;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-guard-product-tab {
  border-color: var(--er-light-line-strong);
  background: var(--er-light-surface-soft);
  color: #46566a;
  box-shadow: 0 1px 1px rgba(31, 50, 68, 0.03);
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-guard-product-tab:hover,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-guard-product-tab:focus-visible {
  border-color: #79b99d;
  background: #edf9f3;
  color: var(--er-light-accent-strong);
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-guard-product-tab.is-active {
  border-color: #72c5a4;
  background: var(--er-light-accent-soft);
  color: var(--er-light-accent-strong);
  box-shadow: 0 4px 12px rgba(23, 107, 76, 0.1);
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-table-wrap {
  border-color: var(--er-light-line) !important;
  background: var(--er-light-surface) !important;
  box-shadow: 0 8px 24px rgba(31, 50, 68, 0.06) !important;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-grid-head,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-grid-head {
  border-color: var(--er-light-line) !important;
  background: #f3f7fa !important;
  color: #536276 !important;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-grid-head-cell,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-grid-head-cell span {
  color: #536276 !important;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-row,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-activation-row,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-inventory-row,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-billing-row {
  border-color: #e3eaf0 !important;
  background: #ffffff !important;
  color: var(--er-light-ink) !important;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-row:nth-child(even),
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-activation-row:nth-child(even),
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-inventory-row:nth-child(even),
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-billing-row:nth-child(even) {
  background: #fbfdfe !important;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-row:hover,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-row:focus-visible,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-activation-row:hover,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-inventory-row:hover,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-billing-row:hover {
  background: #f0faf5 !important;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-row-name,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-row-name strong,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-row-card,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-row-company,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-row-account,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-row-date,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-row-policy,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-row-status,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-inventory-type-value,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-inventory-card-copy {
  color: var(--er-light-ink) !important;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-activation-policy-number,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-status-date,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-status-time,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-inventory-generated-date,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-inventory-generated-label,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-billing-member-copy span {
  color: var(--er-light-muted) !important;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .of-upload-zone,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-file-picker {
  border-color: #c8d6e1 !important;
  background: #f8fbfc !important;
  color: var(--er-light-ink) !important;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .of-upload-zone:hover,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .of-upload-zone:focus-visible {
  border-color: #6eb394 !important;
  background: #f0faf5 !important;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .of-upload-zone-text,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-file-chip-text,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .facility-file-picker-copy {
  color: var(--er-light-ink) !important;
  -webkit-text-fill-color: var(--er-light-ink) !important;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .of-upload-zone-hint,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .facility-file-picker-hint {
  color: #52667b !important;
  -webkit-text-fill-color: #52667b !important;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-filter-panel,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-filter-panel {
  border-color: var(--er-light-line) !important;
  background: var(--er-light-surface-soft) !important;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .filter-input label,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-search-label,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-inventory-tab-group-label {
  color: #536276 !important;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-search input,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-filter-panel input,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-filter-panel select,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-billing-filter-control {
  border-color: var(--er-light-line-strong) !important;
  background: #ffffff !important;
  color: var(--er-light-ink) !important;
  color-scheme: light;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-search input::placeholder,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-filter-panel input::placeholder {
  color: #8190a1 !important;
  opacity: 1;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-search input:focus,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-filter-panel input:focus,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-filter-panel select:focus,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-billing-filter-control:focus {
  border-color: #5ca987 !important;
  box-shadow: 0 0 0 3px rgba(23, 107, 76, 0.12) !important;
  outline: none;
}

html[data-dashboard-theme="light"] body.er-guard-inventory-page .er-inventory-usage-tab,
html[data-dashboard-theme="light"] body.er-guard-inventory-page .er-inventory-type-tab {
  border-color: var(--er-light-line-strong);
  background: var(--er-light-surface-soft);
  color: #46566a;
}

html[data-dashboard-theme="light"] body.er-guard-inventory-page .er-inventory-usage-tab:hover,
html[data-dashboard-theme="light"] body.er-guard-inventory-page .er-inventory-usage-tab:focus-visible,
html[data-dashboard-theme="light"] body.er-guard-inventory-page .er-inventory-type-tab:hover,
html[data-dashboard-theme="light"] body.er-guard-inventory-page .er-inventory-type-tab:focus-visible {
  border-color: #79b99d;
  background: #edf9f3;
  color: var(--er-light-accent-strong);
}

html[data-dashboard-theme="light"] body.er-guard-inventory-page .er-inventory-usage-tab.is-active,
html[data-dashboard-theme="light"] body.er-guard-inventory-page .er-inventory-type-tab.is-active {
  border-color: #72c5a4;
  background: var(--er-light-accent-soft);
  color: var(--er-light-accent-strong);
  box-shadow: 0 4px 12px rgba(23, 107, 76, 0.1);
}

html[data-dashboard-theme="light"] body.er-guard-billing-page .er-billing-company-tabs,
html[data-dashboard-theme="light"] body.er-guard-billing-page .er-billing-status-tabs,
html[data-dashboard-theme="light"] body.er-guard-billing-page .er-billing-workstream-tabs {
  border-color: var(--er-light-line) !important;
}

html[data-dashboard-theme="light"] body.er-guard-billing-page .er-billing-company-tabs .member-detail-tab,
html[data-dashboard-theme="light"] body.er-guard-billing-page .er-billing-workstream-tabs .member-detail-tab,
html[data-dashboard-theme="light"] body.er-guard-billing-page .er-billing-status-tabs .ticket-filter-pill {
  border-color: var(--er-light-line-strong);
  background: var(--er-light-surface-soft);
  color: #46566a;
}

html[data-dashboard-theme="light"] body.er-guard-billing-page .er-billing-company-tabs .member-detail-tab:hover,
html[data-dashboard-theme="light"] body.er-guard-billing-page .er-billing-company-tabs .member-detail-tab:focus-visible,
html[data-dashboard-theme="light"] body.er-guard-billing-page .er-billing-workstream-tabs .member-detail-tab:hover,
html[data-dashboard-theme="light"] body.er-guard-billing-page .er-billing-workstream-tabs .member-detail-tab:focus-visible,
html[data-dashboard-theme="light"] body.er-guard-billing-page .er-billing-status-tabs .ticket-filter-pill:hover,
html[data-dashboard-theme="light"] body.er-guard-billing-page .er-billing-status-tabs .ticket-filter-pill:focus-visible {
  border-color: #79b99d;
  background: #edf9f3;
  color: var(--er-light-accent-strong);
}

html[data-dashboard-theme="light"] body.er-guard-billing-page .er-billing-company-tabs .member-detail-tab.is-active,
html[data-dashboard-theme="light"] body.er-guard-billing-page .er-billing-workstream-tabs .member-detail-tab.is-active,
html[data-dashboard-theme="light"] body.er-guard-billing-page .er-billing-status-tabs .ticket-filter-pill.is-active {
  border-color: #72c5a4;
  background: var(--er-light-accent-soft);
  color: var(--er-light-accent-strong);
}

html[data-dashboard-theme="light"] body.er-guard-billing-page .er-billing-analytics-card {
  border-color: var(--er-light-line);
  background: var(--er-light-surface-soft);
}

html[data-dashboard-theme="light"] body.er-guard-billing-page .er-billing-analytics-card strong {
  color: var(--er-light-ink);
}

html[data-dashboard-theme="light"] body.er-guard-billing-page .er-billing-analytics-card.is-positive strong { color: #16805a; }
html[data-dashboard-theme="light"] body.er-guard-billing-page .er-billing-analytics-card.is-warning strong { color: #b45309; }
html[data-dashboard-theme="light"] body.er-guard-billing-page .er-billing-analytics-card.is-accent strong { color: #0f766e; }
html[data-dashboard-theme="light"] body.er-guard-billing-page .er-billing-analytics-card.is-risk strong { color: #b91c1c; }

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-empty-state,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-empty-state {
  border-color: var(--er-light-line) !important;
  background: var(--er-light-surface-soft) !important;
  color: var(--er-light-muted) !important;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-create-mode-choice,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-create-queue {
  border-color: var(--er-light-line);
  background: var(--er-light-surface-soft);
  color: var(--er-light-ink);
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-create-mode-kicker,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-create-queue-head h3 {
  color: var(--er-light-ink);
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-create-mode-help,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-create-queue-head p,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-create-queue-table th {
  color: var(--er-light-muted);
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-create-queue-table td {
  border-color: #e2e8ee;
  color: var(--er-light-ink);
}

/* Keep the light-mode search/select arrow as one right-aligned icon. */
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-field--search-select input,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-field select {
  background-image: url("data:image/svg+xml,%3Csvg width='28' height='28' viewBox='0 0 28 28' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7.5 10.5 14 17l6.5-6.5' fill='none' stroke='%2364748b' stroke-width='3.2' stroke-linecap='square' stroke-linejoin='miter'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 1.15rem center !important;
  background-size: 1.15rem 1.15rem !important;
}

/* Billing product tabs intentionally use the same compact pill language as
   the status filters below them. */
body.er-guard-billing-page .er-billing-product-row {
  min-width: 0;
  margin: 0 0 0.85rem;
}

body.er-guard-billing-page .er-billing-product-row .er-guard-product-tabs {
  gap: 0.65rem;
  padding-bottom: 0.2rem;
}

body.er-guard-billing-page .er-billing-product-row .er-guard-product-tab {
  min-height: 30px;
  padding: 5px 13px;
  border-color: rgba(148, 163, 184, 0.28);
  border-radius: 999px;
  background: #f8fafc;
  color: #334155;
  font-size: 0.72rem;
  font-weight: 700;
}

body.er-guard-billing-page .er-billing-product-row .er-guard-product-tab:hover,
body.er-guard-billing-page .er-billing-product-row .er-guard-product-tab:focus-visible {
  border-color: rgba(16, 185, 129, 0.38);
  background: #f0fdf4;
  color: #047857;
}

body.er-guard-billing-page .er-billing-product-row .er-guard-product-tab.is-active {
  border-color: rgba(16, 185, 129, 0.5);
  background: linear-gradient(135deg, #ccfbf1, #a7f3d0);
  color: #064e3b;
  box-shadow: 0 5px 14px rgba(45, 212, 191, 0.12);
}

/* Billing product navigation follows the compact activation-page dropdown. */
body.er-guard-billing-page .er-billing-product-row {
  align-items: center;
  display: flex;
  justify-content: flex-end;
}

body.er-guard-billing-page .er-billing-product-row .er-guard-product-filter-form {
  width: min(100%, 26rem);
}

body.er-guard-billing-page .er-billing-product-row .er-guard-product-filter-select {
  width: min(100%, 24rem);
}

@media (max-width: 720px) {
  body.er-guard-billing-page .er-billing-product-row {
    justify-content: stretch;
  }

  body.er-guard-billing-page .er-billing-product-row .er-guard-product-filter-form,
  body.er-guard-billing-page .er-billing-product-row .er-guard-product-filter-select {
    width: 100%;
  }
}

/* ER Guard light mode color pass.
   Use color to separate workflow stages and active states while keeping all
   body copy on the same deep-ink contrast level. This intentionally only
   applies to ER Guard surfaces; dark mode and the rest of the dashboard keep
   their existing tokens. */
html[data-dashboard-theme="light"] body.er-guard-dashboard-page,
html[data-dashboard-theme="light"] body.er-guard-public-page {
  --er-light-ink: #17324d;
  --er-light-muted: #52677c;
  --er-light-line: #d5e3e5;
  --er-light-line-strong: #b9d1d4;
  --er-light-surface: #ffffff;
  --er-light-surface-soft: #f7fbfa;
  --er-light-surface-raised: #eef8f6;
  --er-light-accent: #087f6a;
  --er-light-accent-strong: #056653;
  --er-light-accent-soft: #d9f4eb;
  --er-light-coral: #e87555;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page {
  background:
    radial-gradient(circle at 92% 0%, rgba(242, 164, 112, 0.12), transparent 25rem),
    linear-gradient(135deg, #eef8f6 0%, #f7fafc 48%, #fffaf6 100%);
  color: var(--er-light-ink);
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .of-sidebar {
  background: #ffffff !important;
  border-right-color: #dbe4e9 !important;
  box-shadow: 8px 0 24px rgba(15, 23, 42, 0.035) !important;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .of-sidebar-brand-text {
  color: var(--er-light-accent);
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .of-nav-item,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .of-nav-subitem {
  color: #52677c;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .of-nav-item:hover,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .of-nav-item:focus-visible,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .of-nav-subitem:hover {
  background: #f1f8f4 !important;
  color: #17212f !important;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .sd-sidebar-group.is-open > .of-nav-toggle {
  background: #e7f6ee !important;
  border: 1px solid #bde8cf !important;
  box-shadow: none !important;
  color: #166534 !important;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .of-nav-subitem.is-active {
  background: #e9f7ef !important;
  border: 1px solid #c9ead8 !important;
  box-shadow: inset 3px 0 0 #0e8f68 !important;
  color: #176b4d !important;
  font-weight: 700 !important;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .of-topbar {
  background: rgba(255, 255, 255, 0.86);
  border-bottom-color: #d6e5e6;
  box-shadow: 0 8px 22px rgba(30, 74, 82, 0.05);
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .of-topbar-title {
  color: var(--er-light-ink);
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .of-search {
  background: #ffffff;
  border-color: #c4d9dc;
  box-shadow: 0 5px 15px rgba(24, 74, 82, 0.06);
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .of-search:focus-within {
  border-color: #68b8a4;
  box-shadow: 0 0 0 3px rgba(8, 127, 106, 0.13), 0 5px 15px rgba(24, 74, 82, 0.06);
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .of-icon-btn {
  border-color: #d4e2e4;
  background: #ffffff;
  color: #36566d;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .of-icon-btn:hover,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .of-icon-btn:focus-visible {
  border-color: #8bc8b7;
  background: #e9f8f3;
  color: var(--er-light-accent-strong);
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-dashboard-create,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-dashboard-upload {
  position: relative;
  overflow: hidden;
  border-color: var(--er-light-line) !important;
  box-shadow: 0 16px 34px rgba(30, 74, 82, 0.08) !important;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-dashboard-create {
  background: linear-gradient(135deg, #fffefa 0%, #fff5ef 100%) !important;
  border-top: 4px solid var(--er-light-coral) !important;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-dashboard-upload {
  background: linear-gradient(135deg, #f5fcfa 0%, #edf7fc 100%) !important;
  border-top: 4px solid #2b9a83 !important;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-dashboard-create .section-head {
  color: #b45136 !important;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-dashboard-upload .section-head {
  color: var(--er-light-accent-strong) !important;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-dashboard-create .member-panel-copy p,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-dashboard-upload .member-panel-copy p {
  color: #425b70 !important;
  -webkit-text-fill-color: #425b70 !important;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-create-member-button,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .upload-form-actions button[type="submit"] {
  background: linear-gradient(135deg, #087f6a 0%, #159b78 100%) !important;
  border-color: transparent !important;
  color: #ffffff !important;
  box-shadow: 0 9px 18px rgba(8, 127, 106, 0.18);
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-create-member-button:hover,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-create-member-button:focus-visible,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .upload-form-actions button[type="submit"]:hover,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .upload-form-actions button[type="submit"]:focus-visible {
  background: linear-gradient(135deg, #056653 0%, #087f6a 100%) !important;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-public-link {
  border-color: #f0b39d !important;
  background: #fff7f2 !important;
  color: #a44830 !important;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-public-link:hover,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-public-link:focus-visible {
  border-color: var(--er-light-coral) !important;
  background: #ffece3 !important;
  color: #853c2b !important;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .of-upload-zone,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-file-picker {
  border-color: #9bcfc1 !important;
  background: rgba(255, 255, 255, 0.72) !important;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .of-upload-zone:hover,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .of-upload-zone:focus-visible,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-file-picker:hover,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-file-picker:focus-visible {
  border-color: var(--er-light-accent) !important;
  background: #e8f8f3 !important;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .facility-file-picker-icon {
  color: var(--er-light-accent) !important;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .upload-template-link {
  color: #b45136 !important;
  text-decoration-color: #e6a28b;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-dashboard-table-panel {
  border-color: var(--er-light-line) !important;
  background: #ffffff !important;
  box-shadow: 0 16px 34px rgba(30, 74, 82, 0.07) !important;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-dashboard-table-head {
  background: linear-gradient(90deg, #fffdf7 0%, #f5fbfa 100%) !important;
  border-bottom-color: var(--er-light-line) !important;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-dashboard-table-head .section-head {
  color: var(--er-light-accent-strong) !important;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-dashboard-table-head .secondary,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-filter-toggle,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-policy-number-button {
  border-color: #bfd7d8 !important;
  background: #ffffff !important;
  color: #36566d !important;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-dashboard-table-head .secondary:hover,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-dashboard-table-head .secondary:focus-visible,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-filter-toggle:hover,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-filter-toggle:focus-visible,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-policy-number-button:hover,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-policy-number-button:focus-visible {
  border-color: #75bca9 !important;
  background: #e9f8f3 !important;
  color: var(--er-light-accent-strong) !important;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-guard-product-filter-form {
  background: #f2f8fc;
  border-color: #c4dce2;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-guard-product-filter-form label {
  color: #52677c;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-guard-product-filter-form select {
  background: #ffffff;
  border-color: #b9d1d4;
  color: var(--er-light-ink);
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-grid-head,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-grid-head {
  background: #edf7f6 !important;
  border-bottom-color: #cde0df !important;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-row,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-activation-row,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-inventory-row,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-billing-row {
  background: #ffffff !important;
  border-bottom-color: #e3eeef !important;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-row:nth-child(even),
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-activation-row:nth-child(even),
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-inventory-row:nth-child(even),
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-billing-row:nth-child(even) {
  background: #fbfefd !important;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-row:hover,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-row:focus-visible,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-activation-row:hover,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-inventory-row:hover,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-billing-row:hover {
  background: #eaf8f4 !important;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-status-pill.status-pending_activation,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-status-pill.status-pending,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-status-pill.status-not_delivered {
  background: #fff3d8 !important;
  border-color: #f4d48e !important;
  color: #8a5b08 !important;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-status-pill.status-activated,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-status-pill.status-finished,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-status-pill.status-paid,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-status-pill.status-delivered {
  background: #dff6ec !important;
  border-color: #9bd8c0 !important;
  color: #086149 !important;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-dashboard-footer,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-footer {
  background: #f7fbfa !important;
  border-top-color: var(--er-light-line) !important;
}

/* The public activation form uses the same palette without inheriting the
   dashboard shell. */
html[data-dashboard-theme="light"] body.er-guard-public-page {
  color: var(--er-light-ink);
  background:
    radial-gradient(circle at 88% 4%, rgba(242, 164, 112, 0.18), transparent 20rem),
    radial-gradient(circle at 8% 86%, rgba(69, 177, 147, 0.12), transparent 23rem),
    linear-gradient(145deg, #eef8f6 0%, #f8fbfc 54%, #fff8f3 100%);
}

html[data-dashboard-theme="light"] body.er-guard-public-page .er-kicker {
  color: #b45136;
}

html[data-dashboard-theme="light"] body.er-guard-public-page .er-card {
  border-color: #d2e1e2;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(241, 250, 247, 0.98));
  box-shadow: 0 22px 48px rgba(30, 74, 82, 0.11);
}

html[data-dashboard-theme="light"] body.er-guard-public-page .er-card-head {
  border-bottom: 1px solid #deeaeb;
}

html[data-dashboard-theme="light"] body.er-guard-public-page .er-step-pill.is-active {
  border-color: var(--er-light-accent-strong);
  background: linear-gradient(135deg, #087f6a, #159b78);
  box-shadow: 0 0 0 4px rgba(8, 127, 106, 0.13), 0 8px 18px rgba(8, 127, 106, 0.15);
}

html[data-dashboard-theme="light"] body.er-guard-public-page .er-step-pill:not(.is-active) {
  border-color: #c5d9db !important;
  background: #ffffff !important;
  color: #52677c !important;
  box-shadow: none;
}

html[data-dashboard-theme="light"] body.er-guard-public-page .er-step-pill:not(.is-active) strong {
  color: var(--er-light-ink) !important;
}

html[data-dashboard-theme="light"] body.er-guard-public-page .er-form-actions button:not(.er-secondary) {
  background: linear-gradient(135deg, #087f6a, #159b78);
}

html[data-dashboard-theme="light"] body.er-guard-public-page .er-form-actions button:not(.er-secondary):hover,
html[data-dashboard-theme="light"] body.er-guard-public-page .er-form-actions button:not(.er-secondary):focus-visible {
  background: linear-gradient(135deg, #056653, #087f6a);
}

html[data-dashboard-theme="dark"] body.er-guard-billing-page .er-billing-product-row .er-guard-product-tab {
  border-color: rgba(167, 243, 208, 0.18);
  background: rgba(15, 23, 42, 0.56);
  color: #cbd5e1;
}

html[data-dashboard-theme="dark"] body.er-guard-billing-page .er-billing-product-row .er-guard-product-tab:hover,
html[data-dashboard-theme="dark"] body.er-guard-billing-page .er-billing-product-row .er-guard-product-tab:focus-visible {
  border-color: rgba(167, 243, 208, 0.38);
  background: rgba(94, 234, 212, 0.075);
  color: #a7f3d0;
}

html[data-dashboard-theme="dark"] body.er-guard-billing-page .er-billing-product-row .er-guard-product-tab.is-active {
  border-color: rgba(167, 243, 208, 0.62);
  background: linear-gradient(135deg, #a7f3d0, #8cebd2);
  color: #06231c;
}

/* Final billing filter layout after removing the account dropdown. */
body.er-guard-billing-page #er-billing-filter-panel .er-billing-date-filter-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  align-items: end;
}

body.er-guard-billing-page #er-billing-filter-panel .member-filter-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0;
  width: 100%;
}

@media (max-width: 900px) {
  body.er-guard-billing-page #er-billing-filter-panel .er-billing-date-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  body.er-guard-billing-page #er-billing-filter-panel .er-billing-date-filter-grid {
    grid-template-columns: 1fr;
  }

  body.er-guard-billing-page #er-billing-filter-panel .member-filter-actions {
    align-items: stretch;
    flex-direction: column;
  }

  body.er-guard-billing-page #er-billing-filter-panel .member-filter-submit-button {
    width: 100%;
  }
}

/* Billing controls share one row: filters stay on the left and the product
   selector remains on the right. The expandable panel is the only content
   rendered below the row when filters are open. */
body.er-guard-billing-page .er-billing-product-row {
  justify-content: space-between;
  gap: 1rem;
  margin: 0;
  padding: 0.8rem 1.25rem 0.65rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  background: transparent;
}

body.er-guard-billing-page .er-billing-product-row .er-billing-filter-toolbar {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-start;
  gap: 0.65rem;
  margin: 0;
}

body.er-guard-billing-page .er-billing-product-row .er-guard-product-filter-form {
  order: 2;
  width: min(100%, 26rem);
}

body.er-guard-billing-page .er-billing-product-row .er-billing-filter-toolbar {
  order: 1;
}

body.er-guard-billing-page #er-billing-filter-panel:not([hidden]) {
  padding: 1rem 1.5rem 1.2rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  background: transparent;
}

@media (max-width: 720px) {
  body.er-guard-billing-page .er-billing-product-row {
    align-items: stretch;
    flex-direction: column;
    gap: 0.75rem;
  }

  body.er-guard-billing-page .er-billing-product-row .er-guard-product-filter-form,
  body.er-guard-billing-page .er-billing-product-row .er-guard-product-filter-select {
    width: 100%;
  }

  body.er-guard-billing-page .er-billing-product-row .er-billing-filter-toolbar {
    order: 2;
  }

  body.er-guard-billing-page .er-billing-product-row .er-guard-product-filter-form {
    order: 1;
  }

  body.er-guard-billing-page #er-billing-filter-panel:not([hidden]) {
    padding-left: 0.8rem;
    padding-right: 0.8rem;
  }
}

/* Give the billing table values a little more breathing room on the right. */
@media (min-width: 981px) {
  body.er-guard-billing-page .er-billing-grid > :not(:first-child) {
    padding-left: 16px;
  }
}

/* Keep the collapsed billing controls close to the product tabs. */
@media (min-width: 901px) {
  body.er-guard-billing-page .er-billing-product-row {
    margin-bottom: 0.35rem;
  }

  body.er-guard-billing-page .er-billing-filter-bar:has(#er-billing-filter-panel[hidden]) {
    padding: 0.25rem 1.5rem 0.75rem;
  }
}

/* The compact billing view hides six fields, so it must use five matching
   tracks instead of retaining the full eleven-column table width. */
@media (max-width: 980px) {
  body.er-guard-billing-page .member-grid-head.er-billing-grid,
  body.er-guard-billing-page .member-row.er-billing-row,
  body.er-guard-billing-page .member-row.er-billing-row .member-row-grid.er-billing-grid {
    width: 100%;
    min-width: 0;
  }

  body.er-guard-billing-page .er-billing-grid {
    width: 100%;
    min-width: 0;
    grid-template-columns:
      minmax(160px, 1.35fr)
      minmax(135px, 1fr)
      minmax(115px, 0.85fr)
      minmax(115px, 0.85fr)
      minmax(90px, 0.55fr);
  }

  body.er-guard-billing-page .er-billing-grid > :not(:first-child) {
    padding-left: 0;
  }
}

/* Final compact billing layout: the six secondary columns are hidden at
   laptop widths, so the remaining five columns must consume the full row. */
@media (max-width: 1280px) {
  body.er-guard-billing-page .member-grid-head.er-billing-grid,
  body.er-guard-billing-page .member-row.er-billing-row,
  body.er-guard-billing-page .member-row.er-billing-row .member-row-grid.er-billing-grid {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
  }

  body.er-guard-billing-page .er-billing-grid {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    grid-template-columns:
      minmax(0, 1.45fr)
      minmax(0, 1.1fr)
      minmax(0, 0.95fr)
      minmax(0, 0.95fr)
      minmax(130px, 0.75fr);
  }

  body.er-guard-billing-page .er-billing-grid > :not(:first-child) {
    padding-left: 0;
  }
}

/* Do not let the collapsed filter bar retain the height of the old rows. */
body.er-guard-billing-page .er-billing-product-row {
  margin-bottom: 0.25rem;
}

body.er-guard-billing-page .er-billing-filter-bar {
  padding: 0.35rem 1.5rem 0.75rem;
}

/* The billing view intentionally renders only the five compact columns shown
   in the table. Keep the header and every row on the exact same tracks. */
body.er-guard-billing-page .member-grid-head.er-billing-grid,
body.er-guard-billing-page .member-row.er-billing-row,
body.er-guard-billing-page .member-row.er-billing-row .member-row-grid.er-billing-grid {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
}

body.er-guard-billing-page .er-billing-grid {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  grid-template-columns: minmax(0, 1.55fr) minmax(150px, 1.15fr) minmax(140px, 1fr) minmax(150px, 1.1fr) minmax(128px, 0.8fr) !important;
  grid-template-areas: none !important;
}

body.er-guard-billing-page .member-grid-head.er-billing-grid {
  padding: 12px 16px;
}

body.er-guard-billing-page .er-billing-grid > * {
  min-width: 0;
  box-sizing: border-box;
  display: block !important;
  grid-column: auto !important;
  grid-row: auto !important;
}

body.er-guard-billing-page .er-billing-grid > :not(:first-child) {
  padding-left: 1rem;
}

body.er-guard-billing-page .er-billing-actions {
  justify-self: end;
  width: 100%;
  padding-right: 0.9rem;
}

@media (max-width: 980px) {
  body.er-guard-billing-page .er-billing-grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(125px, 1fr) minmax(120px, 0.95fr) minmax(130px, 1fr) minmax(112px, 0.8fr) !important;
  }
}

@media (max-width: 720px) {
  body.er-guard-billing-page .member-grid-head.er-billing-grid {
    display: none;
  }

  body.er-guard-billing-page .er-billing-grid {
    grid-template-columns: 1fr !important;
    gap: 0.55rem;
  }

  body.er-guard-billing-page .er-billing-grid > :not(:first-child) {
    padding-left: 0;
  }

  body.er-guard-billing-page .er-billing-actions {
    justify-self: stretch;
    padding-right: 0;
  }
}

/* Keep the create-member header controls inside their own stacking context so
   the company opt-out cannot drift over the modal close/maximize icons. */
body.er-guard-dashboard-page .er-create-member-modal .member-modal-header,
body.er-guard-dashboard-page [data-er-create-modal] .member-modal-header {
  position: relative;
  z-index: 2;
  padding-right: 5.75rem;
}

body.er-guard-dashboard-page .er-create-member-modal .member-modal-header-actions,
body.er-guard-dashboard-page [data-er-create-modal] .member-modal-header-actions {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  z-index: 3;
}

/* Final light-mode contract for all ER Guard surfaces. These declarations
   also cover controls inherited from the shared dashboard shell. */
html[data-dashboard-theme="light"] body.er-guard-dashboard-page,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .dashboard-main,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-directory-main {
  background: #f5f8fb !important;
  color: #213247 !important;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .card,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .panel-block,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-roster-panel,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-billing-filter-bar {
  border-color: #d8e2ea !important;
  background: #ffffff !important;
  color: #213247 !important;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page button,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .secondary,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .toggle-panel-button,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-detail-action-button {
  border-color: #c7d4df !important;
  background: #ffffff !important;
  color: #26384d !important;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page button:hover,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page button:focus-visible,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .secondary:hover,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .secondary:focus-visible {
  border-color: #4b9f79 !important;
  background: #effaf4 !important;
  color: #176b4c !important;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .of-btn-primary {
  background: #176b4d !important;
  border-color: #176b4d !important;
  color: #ffffff !important;
  box-shadow: 0 10px 24px rgba(29, 96, 67, 0.16) !important;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .of-btn-primary:hover,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .of-btn-primary:focus-visible {
  background: #125a40 !important;
  border-color: #125a40 !important;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page input,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page select,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page textarea {
  border-color: #c7d4df !important;
  background: #ffffff !important;
  color: #213247 !important;
  color-scheme: light;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page input::placeholder,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page textarea::placeholder {
  color: #7a8b9d !important;
  opacity: 1;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page input:focus,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page select:focus,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page textarea:focus {
  border-color: #4b9f79 !important;
  box-shadow: 0 0 0 3px rgba(75, 159, 121, 0.15) !important;
  outline: none;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .icon,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page svg {
  color: #526579;
  fill: currentColor;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .muted,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-field-hint,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page em,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page small {
  color: #64778b;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-billing-filter-bar .er-billing-filter-toolbar {
  background: transparent !important;
}

/* Billing visual refinement: establish a deliberate hierarchy between the
   heading, product rail, controls, filters, and compact data table. */
body.er-guard-billing-page .er-dashboard-table-panel {
  overflow: visible;
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

body.er-guard-billing-page .er-dashboard-table-head {
  min-height: 78px;
  align-items: center;
  padding: 1.1rem 1.5rem 1rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

body.er-guard-billing-page .er-billing-workstream-tabs {
  margin-left: auto;
  padding: 0 0.35rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.72);
}

body.er-guard-billing-page .er-billing-product-row {
  margin: 0;
  padding: 0.8rem 1.25rem 0.65rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(248, 250, 252, 0.72);
}

body.er-guard-billing-page .er-billing-product-row .er-guard-product-tabs {
  width: 100%;
  gap: 0.6rem;
  padding: 0.1rem 0.1rem 0.35rem;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(16, 185, 129, 0.65) transparent;
}

body.er-guard-billing-page .er-billing-product-row .er-guard-product-tab {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0.5rem 0.9rem;
  font-size: 0.78rem;
  letter-spacing: 0.01em;
}

body.er-guard-billing-page .er-billing-filter-bar {
  padding: 0.75rem 1.25rem 0.9rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(255, 255, 255, 0.96);
}

body.er-guard-billing-page .er-billing-filter-toolbar {
  width: 100%;
  min-height: 42px;
  justify-content: flex-end;
  align-items: center;
  gap: 0.65rem;
}

body.er-guard-billing-page .er-billing-filter-toolbar button {
  min-height: 40px;
  border-radius: 10px;
  padding: 0.55rem 0.95rem;
}

body.er-guard-billing-page .er-billing-filter-toolbar .toggle-panel-button {
  min-width: 112px;
}

body.er-guard-billing-page .er-billing-filter-toolbar .bulk-paid-button {
  min-width: 124px;
}

body.er-guard-billing-page #er-billing-filter-panel {
  display: grid;
  gap: 1rem;
  margin-top: 0.85rem;
  padding: 1rem 1.1rem 1.1rem;
  border-radius: 14px;
  background: #f7fafc;
  border: 1px solid #d8e1e9;
}

body.er-guard-billing-page #er-billing-filter-panel[hidden] {
  display: none !important;
}

body.er-guard-billing-page #er-billing-filter-panel .er-billing-status-tabs,
body.er-guard-billing-page #er-billing-filter-panel .er-billing-company-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0;
}

body.er-guard-billing-page #er-billing-filter-panel .er-billing-status-tabs + .er-billing-company-tabs {
  padding-top: 0.2rem;
}

body.er-guard-billing-page #er-billing-filter-panel .er-billing-status-tabs button,
body.er-guard-billing-page #er-billing-filter-panel .er-billing-company-tabs button {
  min-height: 36px;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  font-size: 0.77rem;
}

body.er-guard-billing-page #er-billing-filter-panel .er-billing-date-filter-grid {
  gap: 0.9rem;
}

body.er-guard-billing-page #er-billing-filter-panel .member-filter-field label {
  margin-bottom: 0.4rem;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

body.er-guard-billing-page #er-billing-filter-panel .member-filter-field input {
  min-height: 44px;
  border-radius: 10px;
  padding: 0.65rem 0.8rem;
}

body.er-guard-billing-page #er-billing-filter-panel .member-filter-actions {
  margin-top: 0.05rem;
  padding-top: 0.2rem;
}

body.er-guard-billing-page .member-grid-head.er-billing-grid {
  min-height: 48px;
  padding: 0.8rem 1.1rem;
  background: #f3f7fa;
  border-bottom: 1px solid #d8e1e9;
}

body.er-guard-billing-page .member-row.er-billing-row {
  min-height: 62px;
  padding: 0.8rem 1.1rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

body.er-guard-billing-page .er-billing-grid > * {
  display: flex !important;
  align-items: center;
  line-height: 1.35;
}

body.er-guard-billing-page .er-billing-grid > :not(:first-child) {
  padding-left: 1.1rem;
}

body.er-guard-billing-page .er-billing-actions {
  justify-content: flex-end;
  padding-right: 0;
}

html[data-dashboard-theme="dark"] body.er-guard-billing-page .er-billing-workstream-tabs,
html[data-dashboard-theme="dark"] body.er-guard-billing-page .er-billing-product-row,
html[data-dashboard-theme="dark"] body.er-guard-billing-page .er-billing-filter-bar,
html[data-dashboard-theme="dark"] body.er-guard-billing-page .member-grid-head.er-billing-grid {
  background: #101b30;
  border-color: rgba(148, 163, 184, 0.2);
}

html[data-dashboard-theme="dark"] body.er-guard-billing-page .er-dashboard-table-panel {
  background: #0f1a2f;
  border-color: rgba(148, 163, 184, 0.24);
  box-shadow: 0 18px 38px rgba(2, 8, 23, 0.28);
}

html[data-dashboard-theme="dark"] body.er-guard-billing-page #er-billing-filter-panel {
  background: #081226;
  border-color: rgba(148, 163, 184, 0.25);
}

html[data-dashboard-theme="dark"] body.er-guard-billing-page .member-grid-head.er-billing-grid {
  color: #cbd5e1;
}

html[data-dashboard-theme="dark"] body.er-guard-billing-page .member-row.er-billing-row {
  border-color: rgba(148, 163, 184, 0.15);
}

@media (max-width: 720px) {
  body.er-guard-billing-page .er-billing-status-strip {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.65rem;
    padding: 0.85rem 0.8rem 0.95rem;
  }

  body.er-guard-billing-page .er-billing-status-strip .er-billing-status-tabs {
    width: 100%;
  }

  body.er-guard-billing-page .er-dashboard-table-head {
    align-items: stretch;
    flex-direction: column;
    gap: 0.8rem;
    padding: 1rem;
  }

  body.er-guard-billing-page .er-billing-workstream-tabs {
    margin-left: 0;
    align-self: flex-start;
  }

  body.er-guard-billing-page .er-billing-product-row,
  body.er-guard-billing-page .er-billing-filter-bar {
    padding-left: 0.8rem;
    padding-right: 0.8rem;
  }

  body.er-guard-billing-page .er-billing-filter-toolbar {
    justify-content: stretch;
  }

  body.er-guard-billing-page .er-billing-filter-toolbar button {
    flex: 1 1 0;
  }

  body.er-guard-billing-page #er-billing-filter-panel {
    padding: 0.85rem;
  }
}

/* Final Billing Dashboard polish: keep workstreams flat and make the open
   filter state read as one organized toolbar instead of a nested card. */
body.er-guard-billing-page .er-billing-workstream-tabs {
  align-self: center;
  gap: 1.5rem;
  margin-left: auto;
  padding: 0;
  border: 0 !important;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none;
}

body.er-guard-billing-page .er-billing-workstream-tabs .member-detail-tab {
  min-width: auto;
  padding: 0.55rem 0.1rem 0.7rem;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent !important;
  color: #91a2b9;
  text-decoration: none;
  transition: color 160ms ease, border-color 160ms ease;
}

body.er-guard-billing-page .er-billing-workstream-tabs .member-detail-tab:hover,
body.er-guard-billing-page .er-billing-workstream-tabs .member-detail-tab:focus-visible {
  color: #dbeafe;
}

body.er-guard-billing-page .er-billing-workstream-tabs .member-detail-tab.is-active {
  border-bottom-color: #5eead4;
  color: #5eead4;
}

body.er-guard-billing-page .er-billing-filter-bar {
  display: block;
  padding: 1rem 1.5rem 1.2rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  background: transparent !important;
}

body.er-guard-billing-page .er-billing-filter-toolbar {
  display: flex;
  justify-content: flex-end;
  gap: 0.65rem;
  margin-bottom: 0.9rem;
}

body.er-guard-billing-page .er-billing-status-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  padding: 0.9rem 1.25rem 1rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  background: transparent;
}

body.er-guard-billing-page .er-billing-status-strip .er-billing-filter-section-label {
  flex: 0 0 auto;
  color: #91a2b9;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

body.er-guard-billing-page .er-billing-status-strip .er-billing-status-tabs {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  gap: 0.55rem;
  min-width: 0;
  margin: 0;
  padding: 0;
}

body.er-guard-billing-page .er-billing-status-strip .ticket-filter-pill {
  min-height: 2.15rem;
  padding: 0.35rem 0.6rem;
  gap: 0.3rem;
  font-size: 0.78rem;
  white-space: nowrap;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.48);
  color: #cbd5e1;
  text-decoration: none !important;
  box-shadow: none;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

body.er-guard-billing-page .er-billing-status-strip .ticket-filter-pill strong {
  color: #91a2b9;
  font-size: 0.68rem;
}

body.er-guard-billing-page .er-billing-status-strip .ticket-filter-pill span {
  font-size: 0.7rem;
}

body.er-guard-billing-page .er-billing-status-tabs {
  flex-wrap: nowrap;
  gap: 0.35rem;
  overflow-x: auto;
  scrollbar-width: thin;
  justify-content: center;
}

body.er-guard-billing-page .er-billing-status-strip .ticket-filter-pill:hover,
body.er-guard-billing-page .er-billing-status-strip .ticket-filter-pill:focus-visible {
  border-color: rgba(94, 234, 212, 0.55);
  background: rgba(45, 212, 191, 0.08);
  color: #ccfbf1;
  outline: none;
}

body.er-guard-billing-page .er-billing-status-strip .ticket-filter-pill.is-active {
  border-color: transparent;
  background: linear-gradient(135deg, #a7f3d0, #8cebd2);
  color: #06231c;
  box-shadow: 0 6px 16px rgba(45, 212, 191, 0.14);
}

body.er-guard-billing-page .er-billing-status-strip .ticket-filter-pill.is-active strong {
  color: #0b4f42;
}

body.er-guard-billing-page #er-billing-filter-panel {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none;
}

body.er-guard-billing-page #er-billing-filter-panel[hidden] {
  display: none !important;
}

body.er-guard-billing-page .er-billing-filter-section {
  display: grid;
  gap: 0.65rem;
  padding: 0.1rem 0 1rem;
}

body.er-guard-billing-page .er-billing-filter-section + .er-billing-filter-section {
  padding-top: 1rem;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

body.er-guard-billing-page .er-billing-filter-section-label {
  color: #91a2b9;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

body.er-guard-billing-page #er-billing-filter-panel .er-billing-status-tabs,
body.er-guard-billing-page #er-billing-filter-panel .er-billing-company-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  border: 0;
}

body.er-guard-billing-page #er-billing-filter-panel .ticket-filter-pill {
  min-height: 2.55rem;
  padding: 0.5rem 0.85rem;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.48);
  color: #cbd5e1;
  text-decoration: none !important;
  box-shadow: none;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

body.er-guard-billing-page #er-billing-filter-panel .ticket-filter-pill strong {
  color: #91a2b9;
  font-size: 0.74rem;
}

body.er-guard-billing-page #er-billing-filter-panel .ticket-filter-pill:hover,
body.er-guard-billing-page #er-billing-filter-panel .ticket-filter-pill:focus-visible {
  border-color: rgba(94, 234, 212, 0.55);
  background: rgba(45, 212, 191, 0.08);
  color: #ccfbf1;
  outline: none;
}

body.er-guard-billing-page #er-billing-filter-panel .ticket-filter-pill.is-active {
  border-color: transparent;
  background: linear-gradient(135deg, #a7f3d0, #8cebd2);
  color: #06231c;
  box-shadow: 0 6px 16px rgba(45, 212, 191, 0.14);
}

body.er-guard-billing-page #er-billing-filter-panel .ticket-filter-pill.is-active strong {
  color: #0b4f42;
}

body.er-guard-billing-page #er-billing-filter-panel .er-billing-date-filter-section {
  display: grid;
  gap: 0.8rem;
  margin: 0;
  padding: 0.35rem 0 0;
  border-top: 0;
}

body.er-guard-billing-page #er-billing-filter-panel .er-billing-card-condition-filter {
  display: grid;
  gap: 0.4rem;
  max-width: 28rem;
}

body.er-guard-billing-page #er-billing-filter-panel .er-billing-card-condition-filter label {
  color: #91a2b9;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body.er-guard-billing-page #er-billing-filter-panel .er-billing-card-condition-filter select {
  min-height: 3rem;
  width: 100%;
  padding: 0.65rem 0.8rem;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 0.75rem;
  background: rgba(15, 23, 42, 0.58);
  color: #e2e8f0;
}

body.er-guard-billing-page #er-billing-filter-panel .er-billing-card-condition-filter select:focus {
  border-color: #5eead4;
  box-shadow: 0 0 0 3px rgba(94, 234, 212, 0.12);
  outline: none;
}

body.er-guard-billing-page #er-billing-filter-panel .er-billing-card-condition-filter small {
  color: #91a2b9;
  font-size: 0.78rem;
  line-height: 1.4;
}

body.er-guard-billing-page #er-billing-filter-panel .er-billing-date-filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
  align-items: end;
}

body.er-guard-billing-page #er-billing-filter-panel .filter-input label {
  display: block;
  margin-bottom: 0.4rem;
  color: #91a2b9;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body.er-guard-billing-page #er-billing-filter-panel .filter-input input {
  min-height: 3rem;
  width: 100%;
  padding: 0.65rem 0.8rem;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 0.75rem;
  background: rgba(15, 23, 42, 0.58);
  color: #e2e8f0;
}

body.er-guard-billing-page #er-billing-filter-panel .filter-input input:focus {
  border-color: #5eead4;
  box-shadow: 0 0 0 3px rgba(94, 234, 212, 0.12);
  outline: none;
}

body.er-guard-billing-page #er-billing-filter-panel .member-filter-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0;
  padding-top: 0.2rem;
}

body.er-guard-billing-page #er-billing-filter-panel .member-filter-reset-link {
  color: #5eead4;
  font-weight: 700;
  text-decoration: none;
}

body.er-guard-billing-page #er-billing-filter-panel .member-filter-submit-button {
  min-height: 3rem;
  padding: 0.7rem 1.35rem;
  border-radius: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

html[data-dashboard-theme="light"] body.er-guard-billing-page .er-billing-workstream-tabs .member-detail-tab {
  color: #607085;
}

html[data-dashboard-theme="light"] body.er-guard-billing-page .er-billing-workstream-tabs .member-detail-tab:hover,
html[data-dashboard-theme="light"] body.er-guard-billing-page .er-billing-workstream-tabs .member-detail-tab:focus-visible {
  color: #176b4c;
}

html[data-dashboard-theme="light"] body.er-guard-billing-page .er-billing-workstream-tabs .member-detail-tab.is-active {
  color: #176b4c;
}

html[data-dashboard-theme="light"] body.er-guard-billing-page #er-billing-filter-panel .ticket-filter-pill {
  border-color: #cbd7e1;
  background: #f7fafc;
  color: #46566a;
}

html[data-dashboard-theme="light"] body.er-guard-billing-page #er-billing-filter-panel .ticket-filter-pill strong,
html[data-dashboard-theme="light"] body.er-guard-billing-page #er-billing-filter-panel .er-billing-filter-section-label,
html[data-dashboard-theme="light"] body.er-guard-billing-page #er-billing-filter-panel .filter-input label {
  color: #607085;
}

html[data-dashboard-theme="light"] body.er-guard-billing-page #er-billing-filter-panel .ticket-filter-pill.is-active {
  border-color: transparent;
  background: #a7f3d0;
  color: #064e3b;
}

html[data-dashboard-theme="light"] body.er-guard-billing-page #er-billing-filter-panel .filter-input input {
  border-color: #cbd7e1;
  background: #ffffff;
  color: #172033;
}

html[data-dashboard-theme="light"] body.er-guard-billing-page #er-billing-filter-panel .er-billing-card-condition-filter label,
html[data-dashboard-theme="light"] body.er-guard-billing-page #er-billing-filter-panel .er-billing-card-condition-filter small {
  color: #607085;
}

html[data-dashboard-theme="light"] body.er-guard-billing-page #er-billing-filter-panel .er-billing-card-condition-filter select {
  border-color: #cbd7e1;
  background: #ffffff;
  color: #172033;
}

@media (max-width: 900px) {
  body.er-guard-billing-page #er-billing-filter-panel .er-billing-date-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  body.er-guard-billing-page .er-billing-workstream-tabs {
    align-self: stretch;
    justify-content: space-between;
    gap: 0.8rem;
  }

  body.er-guard-billing-page .er-billing-workstream-tabs .member-detail-tab {
    flex: 1 1 0;
    text-align: center;
  }

  body.er-guard-billing-page #er-billing-filter-panel .er-billing-date-filter-grid {
    grid-template-columns: 1fr;
  }

  body.er-guard-billing-page #er-billing-filter-panel .member-filter-actions {
    align-items: stretch;
    flex-direction: column;
  }

  body.er-guard-billing-page #er-billing-filter-panel .member-filter-submit-button {
    width: 100%;
  }
}

/* Final compact billing-row override. The billing template renders five
   cells, so older eleven-column rules must not hide cells or squeeze values
   into character-by-character vertical text at narrow widths. */
body.er-guard-billing-page .er-grid-head.er-billing-grid,
body.er-guard-billing-page .er-billing-row,
body.er-guard-billing-page .er-billing-row .member-row-grid.er-billing-grid {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

body.er-guard-billing-page .er-billing-grid {
  width: 100%;
  min-width: 0;
  grid-template-columns:
    minmax(0, 1.45fr)
    minmax(150px, 1.1fr)
    minmax(125px, 0.9fr)
    minmax(150px, 1fr)
    minmax(110px, 0.75fr) !important;
  grid-template-areas: none !important;
}

body.er-guard-billing-page .er-billing-grid > * {
  display: flex !important;
  grid-column: auto !important;
  grid-row: auto !important;
  min-width: 0;
  overflow: visible;
  overflow-wrap: normal;
  word-break: normal;
}

body.er-guard-billing-page .er-billing-grid .member-row-card,
body.er-guard-billing-page .er-billing-grid .member-row-policy,
body.er-guard-billing-page .er-billing-grid .er-status-date {
  white-space: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  overflow-wrap: normal;
  word-break: normal;
}

/* Final billing alignment: the billing template renders exactly five cells.
   Keep the header and each data row on those same five tracks. */
body.er-guard-billing-page .member-grid-head.er-billing-grid,
body.er-guard-billing-page .er-billing-row .member-row-grid.er-billing-grid {
  display: grid !important;
  grid-template-columns: minmax(0, 1.35fr) minmax(150px, 1fr) minmax(125px, 0.85fr) minmax(220px, 1.2fr) minmax(220px, 1.1fr) !important;
  grid-template-areas: none !important;
}

body.er-guard-billing-page .member-grid-head.er-billing-grid > *,
body.er-guard-billing-page .er-billing-row .member-row-grid.er-billing-grid > * {
  grid-column: auto !important;
  grid-row: auto !important;
}

@media (max-width: 720px) {
  body.er-guard-billing-page .er-billing-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    gap: 0.45rem;
  }

  body.er-guard-billing-page .er-billing-grid > :first-child {
    grid-column: 1 / -1 !important;
  }

  body.er-guard-billing-page .er-billing-grid .er-status-date {
    max-width: 100%;
  }

  body.er-guard-billing-page .er-billing-grid > .member-row-status,
  body.er-guard-billing-page .er-billing-grid > .er-billing-actions {
    min-width: 0;
    overflow: hidden;
  }

  body.er-guard-billing-page .er-billing-grid .er-status-date,
  body.er-guard-billing-page .er-billing-grid .er-status-time {
    max-width: 100%;
    font-size: 0.78rem;
    white-space: nowrap;
  }

  body.er-guard-billing-page .er-billing-payment-date {
    box-sizing: border-box;
    width: 7.25rem;
    min-width: 7.25rem;
    max-width: 7.25rem;
    min-height: 2.45rem;
    padding: 0.25rem 0.3rem;
    font-size: 0.7rem;
  }
}

/* Keep the activation table readable on narrow screens. The nine-column
   table cannot fit into a phone viewport without squeezing card numbers and
   dates into character-by-character vertical text, so preserve its tracks
   and let the table wrapper provide horizontal scrolling instead. */
body.er-guard-dashboard-page:not(.er-guard-inventory-page):not(.er-guard-billing-page) .er-table-wrap {
  overflow-x: auto !important;
  overflow-y: hidden;
}

body.er-guard-dashboard-page:not(.er-guard-inventory-page):not(.er-guard-billing-page) .member-grid-head.er-grid-head,
body.er-guard-dashboard-page:not(.er-guard-inventory-page):not(.er-guard-billing-page) .member-row.er-activation-row,
body.er-guard-dashboard-page:not(.er-guard-inventory-page):not(.er-guard-billing-page) .member-row.er-activation-row .member-row-grid.er-activation-grid,
body.er-guard-dashboard-page:not(.er-guard-inventory-page):not(.er-guard-billing-page) .er-activation-grid {
  box-sizing: border-box;
  width: 1708px !important;
  min-width: 1708px !important;
  grid-template-columns:
    190px 120px 170px 190px 180px 190px 220px 120px 240px !important;
}

/* The activation table has a Portal User column before Status. Keep the
   header and rows on the same nine physical tracks at desktop widths. */
@media (min-width: 981px) {
  body.er-guard-dashboard-page:not(.er-guard-billing-page) .er-grid-head.er-activation-grid,
  body.er-guard-dashboard-page:not(.er-guard-billing-page) .er-activation-row,
  body.er-guard-dashboard-page:not(.er-guard-billing-page) .er-activation-row .member-row-grid.er-activation-grid {
    width: 1870px !important;
    min-width: 1870px !important;
    grid-template-columns: 220px 140px 220px 220px 190px 240px 300px 120px 220px !important;
  }
}

body.er-guard-dashboard-page:not(.er-guard-inventory-page):not(.er-guard-billing-page) .er-grid-head {
  padding-inline: 16px;
}

body.er-guard-dashboard-page:not(.er-guard-inventory-page):not(.er-guard-billing-page) .er-activation-card-number,
body.er-guard-dashboard-page:not(.er-guard-inventory-page):not(.er-guard-billing-page) .er-activation-card-number span,
body.er-guard-dashboard-page:not(.er-guard-inventory-page):not(.er-guard-billing-page) .er-activation-policy-number,
body.er-guard-dashboard-page:not(.er-guard-inventory-page):not(.er-guard-billing-page) .member-row-date {
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
}

body.er-guard-dashboard-page:not(.er-guard-inventory-page):not(.er-guard-billing-page) .er-activation-card-number {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* On phones, reflow inventory records into compact cards instead of forcing
   users to pan across a clipped horizontal table. */
@media (max-width: 720px) {
  body.er-guard-inventory-page .er-table-wrap {
    overflow: visible !important;
  }

  body.er-guard-inventory-page .member-grid-head.er-inventory-grid {
    display: none;
  }

  body.er-guard-inventory-page .member-list {
    gap: 0.75rem;
  }

  body.er-guard-inventory-page .member-row.er-inventory-row {
    width: 100% !important;
    min-width: 0 !important;
    border: 1px solid var(--of-outline-variant);
    border-radius: 0.85rem;
  }

  body.er-guard-inventory-page .member-row.er-inventory-row .member-row-grid.er-inventory-grid {
    box-sizing: border-box;
    display: grid;
    width: 100% !important;
    min-width: 0 !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.85rem 1rem;
    padding: 1rem !important;
  }

  body.er-guard-inventory-page .er-inventory-grid > * {
    display: grid;
    width: 100%;
    min-width: 0;
    align-content: start;
    justify-content: start;
    gap: 0.25rem;
    text-align: left;
  }

  body.er-guard-inventory-page .er-inventory-grid > *::before {
    color: var(--muted);
    content: "";
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    line-height: 1.2;
    text-transform: uppercase;
  }

  body.er-guard-inventory-page .er-inventory-grid > :nth-child(1) {
    grid-column: 1 / -1;
  }

  body.er-guard-inventory-page .er-inventory-grid > :nth-child(1)::before { content: "Card number"; }
  body.er-guard-inventory-page .er-inventory-grid > :nth-child(2)::before { content: "Type"; }
  body.er-guard-inventory-page .er-inventory-grid > :nth-child(3)::before { content: "Lot number"; }
  body.er-guard-inventory-page .er-inventory-grid > :nth-child(4)::before { content: "Security code"; }
  body.er-guard-inventory-page .er-inventory-grid > :nth-child(5)::before { content: "Card status"; }
  body.er-guard-inventory-page .er-inventory-grid > :nth-child(6)::before { content: "Design"; }
  body.er-guard-inventory-page .er-inventory-grid > :nth-child(7)::before { content: "Batch number"; }
  body.er-guard-inventory-page .er-inventory-grid-used > :nth-child(2)::before { content: "Account/company name"; }
  body.er-guard-inventory-page .er-inventory-grid-used > :nth-child(3)::before { content: "Type"; }
  body.er-guard-inventory-page .er-inventory-grid-used > :nth-child(4)::before { content: "Lot number"; }
  body.er-guard-inventory-page .er-inventory-grid-used > :nth-child(5)::before { content: "Security code"; }
  body.er-guard-inventory-page .er-inventory-grid-used > :nth-child(6)::before { content: "Card status"; }
  body.er-guard-inventory-page .er-inventory-grid-used > :nth-child(7)::before { content: "Design"; }
  body.er-guard-inventory-page .er-inventory-grid-used > :nth-child(8)::before { content: "Batch number"; }

  body.er-guard-inventory-page .er-inventory-card-cell,
  body.er-guard-inventory-page .er-inventory-type-cell {
    justify-items: start;
    text-align: left;
  }

  body.er-guard-inventory-page .er-inventory-card-copy,
  body.er-guard-inventory-page .er-inventory-type-cell {
    justify-items: start;
  }

  body.er-guard-inventory-page .er-inventory-generated-date {
    white-space: normal;
  }
}

/* Use deliberate two-group wrapping for 16-digit card numbers instead of
   letting a narrow cell break digits or overlap the neighboring column. */
body.er-guard-dashboard-page .er-card-number-value {
  display: inline;
  min-width: 0;
  white-space: nowrap;
}

body.er-guard-dashboard-page .er-card-number-line {
  display: inline;
  white-space: nowrap;
}

@media (max-width: 720px) {
  body.er-guard-dashboard-page .er-activation-card-number .er-card-number-value,
  body.er-guard-billing-page .er-billing-card-number .er-card-number-value {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
  }

  body.er-guard-dashboard-page .er-activation-card-number .er-card-number-line,
  body.er-guard-billing-page .er-billing-card-number .er-card-number-line {
    display: block;
  }
}

/* The paid/action cell is sticky on compact billing layouts; make it
   transparent so it uses the same row background as the rest of the table. */
body.er-guard-billing-page .er-billing-actions,
body.er-guard-billing-page .er-billing-row:hover .er-billing-actions,
body.er-guard-billing-page .er-billing-row:focus-visible .er-billing-actions {
  background: transparent !important;
  box-shadow: none !important;
}

/* Final action-column alignment: keep the header and every Paid/Refunded
   value centered on the same column axis. */
body.er-guard-billing-page .member-grid-head.er-billing-grid > :last-child,
body.er-guard-billing-page .er-billing-row .er-billing-actions {
  justify-content: center !important;
  justify-self: stretch !important;
  width: 100%;
  padding-right: 0 !important;
  text-align: center;
}

/* Keep the billing controls in the same row: Filters on the left and the
   product dropdown on the right. The product form must be allowed to shrink
   on narrow screens instead of retaining the old 26rem minimum width. */
body.er-guard-billing-page .er-billing-product-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  min-width: 0;
  overflow: hidden;
}

body.er-guard-billing-page .er-billing-product-row .er-billing-filter-toolbar {
  order: 1;
  display: flex;
  flex: 0 0 auto;
  width: auto;
  min-width: 0;
  margin: 0;
  justify-content: flex-start;
}

body.er-guard-billing-page .er-billing-product-row .er-guard-product-filter-form {
  order: 2;
  display: flex;
  flex: 1 1 26rem;
  width: min(26rem, 100%);
  min-width: 0;
  justify-content: flex-end;
}

body.er-guard-billing-page .er-billing-product-row .er-guard-product-filter-select {
  min-width: 0;
}

@media (max-width: 720px) {
  body.er-guard-billing-page .er-billing-product-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 0.7rem;
    overflow: visible;
  }

  body.er-guard-billing-page .er-billing-product-row .er-billing-filter-toolbar {
    grid-column: 1;
    grid-row: 1;
    flex-wrap: wrap;
  }

  body.er-guard-billing-page .er-billing-product-row .er-guard-product-filter-form {
    grid-column: 2;
    grid-row: 1;
    width: 100%;
    min-width: 0;
  }

  body.er-guard-billing-page .er-billing-product-row .er-guard-product-filter-form label {
    display: none;
  }

  body.er-guard-billing-page .er-billing-product-row .er-guard-product-filter-select,
  body.er-guard-billing-page .er-billing-product-row .er-guard-product-filter-form select {
    width: 100%;
    min-width: 0;
  }

  body.er-guard-billing-page .er-billing-product-row .member-filter-toggle {
    min-width: 0;
    padding-inline: 0.75rem;
  }
}

/* Final light-mode accents after the shared shell reset. */
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-create-member-button,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-add-submit-button,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .of-upload-actions button:not(.secondary),
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .upload-form-actions button[type="submit"] {
  background: linear-gradient(135deg, #087f6a 0%, #159b78 100%) !important;
  border-color: transparent !important;
  color: #ffffff !important;
  box-shadow: 0 9px 18px rgba(8, 127, 106, 0.18) !important;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-create-member-button:hover,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .er-create-member-button:focus-visible,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-add-submit-button:hover,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-add-submit-button:focus-visible,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .of-upload-actions button:not(.secondary):hover,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .of-upload-actions button:not(.secondary):focus-visible,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .upload-form-actions button[type="submit"]:hover,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .upload-form-actions button[type="submit"]:focus-visible {
  background: linear-gradient(135deg, #056653 0%, #087f6a 100%) !important;
  border-color: transparent !important;
  color: #ffffff !important;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .sd-sidebar-group.is-open > .of-nav-toggle {
  background: #e7f6ee !important;
  border: 1px solid #bde8cf !important;
  box-shadow: none !important;
  color: #166534 !important;
}

/* Keep ER Guard autocomplete and pagination controls on the light-mode
   contract; the shared member-directory rules intentionally remain dark. */
html[data-dashboard-theme="light"] body.er-guard-dashboard-page.member-directory-page .member-search-dropdown {
  border-color: #b9d1d4 !important;
  background: #ffffff !important;
  color: #17324d !important;
  box-shadow: 0 16px 32px rgba(30, 74, 82, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page.member-directory-page .member-search-dropdown-option {
  background: transparent !important;
  color: #17324d !important;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page.member-directory-page .member-search-dropdown-option:hover,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page.member-directory-page .member-search-dropdown-option:focus-visible {
  border-color: transparent !important;
  background: #d9f4eb !important;
  color: #056653 !important;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page.member-directory-page .member-search-dropdown-empty {
  color: #52677c !important;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-footer .member-page-size-form {
  color: #52677c !important;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-footer .member-page-size-form select,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-footer .member-page-size-form select option {
  border-color: #b9d1d4 !important;
  background: #ffffff !important;
  color: #17324d !important;
  -webkit-text-fill-color: #17324d !important;
  color-scheme: light;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-footer .member-page-size-form select:hover,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page .member-footer .member-page-size-form select:focus-visible {
  border-color: #5ca987 !important;
  background: #ffffff !important;
  color: #056653 !important;
  -webkit-text-fill-color: #056653 !important;
  outline: none;
  box-shadow: 0 0 0 3px rgba(8, 127, 106, 0.12) !important;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page:not(.er-guard-inventory-page):not(.er-guard-billing-page) .er-guard-product-filter-form,
html[data-dashboard-theme="light"] body.er-guard-dashboard-page:not(.er-guard-inventory-page):not(.er-guard-billing-page) .er-guard-product-filter-form label {
  background: transparent !important;
}

html[data-dashboard-theme="light"] body.er-guard-dashboard-page:not(.er-guard-inventory-page):not(.er-guard-billing-page) .er-guard-product-filter-form {
  border-color: transparent !important;
}

/* The billing product selector sits in the control row; it should not carry
   the old standalone filter-panel background. */
body.er-guard-billing-page .er-guard-product-filter-form {
  background: transparent !important;
  border-color: transparent !important;
}

html[data-dashboard-theme="light"] body.er-guard-billing-page .er-guard-product-filter-form {
  background: transparent !important;
  border-color: transparent !important;
}

/* Keep the public support launcher clear of the activation form. */
body.er-guard-public-page .er-support-open {
  right: clamp(0.5rem, 1.5vw, 1.25rem);
  bottom: clamp(0.5rem, 1.5vw, 1.25rem);
  min-height: 2.95rem;
  padding: 0.55rem 0.9rem 0.55rem 0.65rem;
  gap: 0.5rem;
  font-size: 0.82rem;
}

body.er-guard-public-page .er-support-open-icon {
  width: 1.5rem;
  height: 1.5rem;
  font-size: 0.88rem;
}

/* Portal User uses a compact Yes/No badge; do not inherit the wider
   multi-line Pending Activation status sizing. */
body.er-guard-dashboard-page .member-row-portal-user .member-status-pill {
  width: auto !important;
  min-width: 0 !important;
  white-space: nowrap !important;
  line-height: 1.2 !important;
}

/* Billing rows share the legacy er-activation-row class. Lock the billing
   wrapper and its five-cell grid to the same width as the header. */
body.er-guard-billing-page .member-grid-head.er-billing-grid,
body.er-guard-billing-page .member-row.er-billing-row,
body.er-guard-billing-page .member-row.er-billing-row .member-row-grid.er-billing-grid {
  width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box;
}

@media (min-width: 721px) {
  body.er-guard-billing-page .er-table-wrap {
    overflow-x: auto !important;
    overflow-y: hidden;
  }

  body.er-guard-billing-page .member-grid-head.er-billing-grid,
  body.er-guard-billing-page .member-row.er-billing-row .member-row-grid.er-billing-grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(150px, 1fr) minmax(125px, 0.85fr) minmax(220px, 1.2fr) minmax(220px, 1.1fr) !important;
    grid-template-areas: none !important;
  }
}

/* Keep the member name and email stacked inside the full first billing
   column. Paid rows use a column flex layout; without stretch, the centered
   copy block can shrink to its min-content width and wrap the email one
   character at a time. */
@media (min-width: 721px) {
  body.er-guard-billing-page .er-billing-row .member-row-name.is-paid {
    align-items: stretch !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  body.er-guard-billing-page .er-billing-row .er-billing-member-copy {
    display: grid !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    justify-items: center;
  }

  body.er-guard-billing-page .er-billing-row .er-billing-member-copy strong,
  body.er-guard-billing-page .er-billing-row .er-billing-member-copy span {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    white-space: normal !important;
    overflow-wrap: break-word !important;
    word-break: normal !important;
  }
}

@media (max-width: 760px) {
  body.er-guard-public-page .er-support-open {
    right: 0.5rem;
    bottom: 0.5rem;
    min-height: 2.65rem;
    padding: 0.45rem 0.7rem 0.45rem 0.52rem;
    font-size: 0.74rem;
  }

  body.er-guard-public-page .er-support-open-icon {
    width: 1.4rem;
    height: 1.4rem;
    font-size: 0.8rem;
  }
}
/* Details shown when activation rows reference cards outside ER Guard Inventory. */
.er-guard-unmatched-modal .td-status-confirm-dialog {
  width: min(680px, calc(100vw - 32px));
  max-height: min(720px, calc(100vh - 32px));
}

.er-guard-unmatched-table-wrap {
  max-height: 360px;
  overflow: auto;
  border: 1px solid var(--border-color, rgba(148, 163, 184, .28));
  border-radius: 10px;
}

.er-guard-unmatched-table {
  width: 100%;
  border-collapse: collapse;
}

.er-guard-unmatched-table th,
.er-guard-unmatched-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border-color, rgba(148, 163, 184, .2));
}

.er-guard-unmatched-table th {
  position: sticky;
  top: 0;
  background: var(--panel-bg, #182231);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.er-guard-unmatched-table tr:last-child td {
  border-bottom: 0;
}

/* Final billing table alignment: the current template has six cells per
   header/row. Keep this after the legacy responsive overrides so the added
   account column cannot reintroduce the old five/eleven-column layout. */
@media (min-width: 721px) {
  body.er-guard-billing-page .member-grid-head.er-billing-grid,
  body.er-guard-billing-page .er-billing-row .member-row-grid.er-billing-grid {
    display: grid !important;
    width: 100% !important;
    min-width: 0 !important;
    grid-template-columns: minmax(220px, 1.35fr) minmax(190px, 1fr) minmax(150px, .9fr) minmax(220px, 1.1fr) minmax(180px, 1fr) minmax(150px, .9fr) !important;
    grid-template-areas: none !important;
  }

  body.er-guard-billing-page .member-grid-head.er-billing-grid > *,
  body.er-guard-billing-page .er-billing-row .member-row-grid.er-billing-grid > * {
    grid-column: auto !important;
    grid-row: auto !important;
    min-width: 0 !important;
  }
}

/* Billing now includes the source account/platform alongside the policy. */
body.er-guard-billing-page .member-grid-head.er-billing-grid,
body.er-guard-billing-page .er-billing-row .member-row-grid.er-billing-grid {
  grid-template-columns: minmax(0, 1.35fr) minmax(150px, 1fr) minmax(125px, .85fr) minmax(180px, 1.1fr) minmax(220px, 1.2fr) minmax(220px, 1.1fr) !important;
}

body.er-guard-billing-page .er-billing-account-platform {
  overflow-wrap: anywhere;
  white-space: normal;
}

/* Do not compress billing columns into unreadable text. The wrapper already
   provides horizontal scrolling when this readable table width exceeds the
   viewport. */
@media (min-width: 721px) {
  body.er-guard-billing-page .member-grid-head.er-billing-grid,
  body.er-guard-billing-page .er-billing-row,
  body.er-guard-billing-page .er-billing-row .member-row-grid.er-billing-grid {
    width: max(100%, 1320px) !important;
    min-width: 1320px !important;
  }

  body.er-guard-billing-page .member-grid-head.er-billing-grid > :nth-child(1),
  body.er-guard-billing-page .er-billing-row .member-row-grid.er-billing-grid > :nth-child(1) { grid-column: 1 !important; }
  body.er-guard-billing-page .member-grid-head.er-billing-grid > *,
  body.er-guard-billing-page .er-billing-row .member-row-grid.er-billing-grid > * { display: flex !important; }
  body.er-guard-billing-page .member-grid-head.er-billing-grid > :nth-child(2),
  body.er-guard-billing-page .er-billing-row .member-row-grid.er-billing-grid > :nth-child(2) { grid-column: 2 !important; }
  body.er-guard-billing-page .member-grid-head.er-billing-grid > :nth-child(3),
  body.er-guard-billing-page .er-billing-row .member-row-grid.er-billing-grid > :nth-child(3) { grid-column: 3 !important; }
  body.er-guard-billing-page .member-grid-head.er-billing-grid > :nth-child(4),
  body.er-guard-billing-page .er-billing-row .member-row-grid.er-billing-grid > :nth-child(4) { grid-column: 4 !important; }
  body.er-guard-billing-page .member-grid-head.er-billing-grid > :nth-child(5),
  body.er-guard-billing-page .er-billing-row .member-row-grid.er-billing-grid > :nth-child(5) { grid-column: 5 !important; }
  body.er-guard-billing-page .member-grid-head.er-billing-grid > :nth-child(6),
  body.er-guard-billing-page .er-billing-row .member-row-grid.er-billing-grid > :nth-child(6) {
    display: flex !important;
    grid-column: 6 !important;
  }
}

/* Final billing alignment override: header and body rows share one fixed
   six-column geometry so values cannot drift into another heading. */
@media (min-width: 721px) {
  body.er-guard-billing-page .member-grid-head.er-billing-grid,
  body.er-guard-billing-page .er-billing-row,
  body.er-guard-billing-page .er-billing-row .member-row-grid.er-billing-grid {
    box-sizing: border-box !important;
    width: 1430px !important;
    min-width: 1430px !important;
  }

  body.er-guard-billing-page .member-grid-head.er-billing-grid,
  body.er-guard-billing-page .er-billing-row .member-row-grid.er-billing-grid {
    display: grid !important;
    grid-template-columns: 300px 240px 190px 260px 220px 220px !important;
    grid-template-areas: none !important;
    grid-auto-flow: row !important;
  }

  body.er-guard-billing-page .member-grid-head.er-billing-grid > *,
  body.er-guard-billing-page .er-billing-row .member-row-grid.er-billing-grid > * {
    box-sizing: border-box !important;
    min-width: 0 !important;
  }

  body.er-guard-billing-page .member-grid-head.er-billing-grid > :nth-child(1),
  body.er-guard-billing-page .er-billing-row .member-row-grid.er-billing-grid > :nth-child(1) { grid-column: 1 !important; }
  body.er-guard-billing-page .member-grid-head.er-billing-grid > :nth-child(2),
  body.er-guard-billing-page .er-billing-row .member-row-grid.er-billing-grid > :nth-child(2) { grid-column: 2 !important; }
  body.er-guard-billing-page .member-grid-head.er-billing-grid > :nth-child(3),
  body.er-guard-billing-page .er-billing-row .member-row-grid.er-billing-grid > :nth-child(3) { grid-column: 3 !important; }
  body.er-guard-billing-page .member-grid-head.er-billing-grid > :nth-child(4),
  body.er-guard-billing-page .er-billing-row .member-row-grid.er-billing-grid > :nth-child(4) { grid-column: 4 !important; }
  body.er-guard-billing-page .member-grid-head.er-billing-grid > :nth-child(5),
  body.er-guard-billing-page .er-billing-row .member-row-grid.er-billing-grid > :nth-child(5) { grid-column: 5 !important; }
  body.er-guard-billing-page .member-grid-head.er-billing-grid > :nth-child(6),
  body.er-guard-billing-page .er-billing-row .member-row-grid.er-billing-grid > :nth-child(6) { grid-column: 6 !important; }

  body.er-guard-billing-page .er-billing-row .member-row-name.is-paid {
    align-items: stretch !important;
  }

  body.er-guard-billing-page .er-billing-row .er-billing-member-copy,
  body.er-guard-billing-page .er-billing-row .er-billing-member-copy strong,
  body.er-guard-billing-page .er-billing-row .er-billing-member-copy span {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }
}

/* Billing table contract: the header and every row have the same six tracks.
   Reset the legacy row padding as well; otherwise the nested row grid starts
   inside the header grid and every value is visibly shifted right. */
@media (min-width: 721px) {
  body.er-guard-billing-page .member-grid-head.er-billing-grid,
  body.er-guard-billing-page .er-billing-row,
  body.er-guard-billing-page .er-billing-row .member-row-grid.er-billing-grid {
    box-sizing: border-box !important;
    width: 1430px !important;
    min-width: 1430px !important;
  }

  body.er-guard-billing-page .member-grid-head.er-billing-grid,
  body.er-guard-billing-page .er-billing-row .member-row-grid.er-billing-grid {
    display: grid !important;
    padding: 0 !important;
    grid-template-columns: 300px 240px 190px 260px 220px 220px !important;
    grid-template-areas: none !important;
    grid-auto-flow: row !important;
  }

  body.er-guard-billing-page .er-billing-row {
    padding: 0 !important;
  }

  body.er-guard-billing-page .member-grid-head.er-billing-grid > *,
  body.er-guard-billing-page .er-billing-row .member-row-grid.er-billing-grid > * {
    box-sizing: border-box !important;
    min-width: 0 !important;
    grid-column: auto !important;
    grid-row: auto !important;
  }
}

/* Billing dates are supporting metadata, not status pills. Keep them small
   and unboxed so they cannot overlap the table rules. */
body.er-guard-billing-page .er-billing-payment-date {
  width: auto !important;
  min-width: 0 !important;
  max-width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 0.62rem !important;
  line-height: 1.1 !important;
}

body.er-guard-billing-page .er-billing-payment-date .er-status-date,
body.er-guard-billing-page .er-billing-payment-date .er-status-time {
  font-size: 0.62rem !important;
  line-height: 1.1 !important;
  white-space: nowrap;
}
