/* ===========================================================================
 * Shared Account Dashboard styles.
 *
 * Used by My Equipment, My Contracts, My Open Shipments, My Open Collections,
 * My Invoices, My Returned Equipment, etc. All elements use the .acct-*
 * namespace so individual pages don't need their own CSS.
 *
 * Page wrapper: <div class="acct-dashboard is-loading"> ... </div>
 * =======================================================================*/

/* Last-updated badge appended to DataTables info row */
.acct-dashboard .acct-cached-at {
  color: #888;
  font-size: 0.92em;
  white-space: nowrap;
}

/* Toast notification */
.tsc-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #333;
  color: #fff;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 0.9em;
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  max-width: 90vw;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.tsc-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

/* ---- Customer header ---- */
.acct-customer-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 14px;
  margin-bottom: 20px;
  border-bottom: 2px solid #28a745;
}

.acct-customer-header .acct-customer-name {
  margin: 0;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.acct-customer-header .acct-customer-no {
  display: inline-flex;
  align-items: center;
  font-size: 0.78em;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #1f6f3a;
  background: #e6f4ea;
  border: 1px solid #a8d5b5;
  border-radius: 999px;
  padding: 4px 14px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Refresh widget in customer header */
.acct-customer-header .acct-header-refresh {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  font-size: 0.82em;
  flex-shrink: 0;
}
.acct-customer-header .cr-refresh-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  font-size: 1.1em;
  line-height: 1;
  min-width: 38px;
  min-height: 38px;
  background: #f8f8f8;
  border: 1px solid #ccc;
  border-radius: 4px;
  color: #555;
  cursor: pointer;
}
.acct-customer-header .cr-refresh-btn:hover {
  background: #eee;
  color: #333;
}

.acct-customer-header .cr-refresh-btn:active {
  background: #e2e2e2;
}
.acct-customer-header .cr-refresh-btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.acct-customer-header .cr-refresh-icon { display: inline-block; }
.acct-customer-header .cr-refresh-icon.is-spinning {
  animation: acct-spin 0.8s linear infinite;
}
@keyframes acct-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.acct-customer-header .cr-refresh-meta {
  color: #777;
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  white-space: nowrap;
}
.acct-customer-header .cr-refresh-time { font-variant-numeric: tabular-nums; }

.acct-dashboard { margin: 0 0 18px; }

/* ---- KPI Cards ---- */
.acct-dashboard .acct-cards {
  display: grid;
  grid-template-columns: repeat(var(--acct-card-count, 4), minmax(0, 1fr));
  gap: 12px;
  margin: 4px 0 16px;
}
.acct-dashboard .acct-cards .card {
  border: 1px solid #28a745;
  border-radius: 4px;
  background-color: #fff;
  padding: 20px;
  margin: 0;
  width: auto;
  min-width: 0;
  display: block;
  transition: transform 0.2s, box-shadow 0.2s;
}
.acct-dashboard .acct-cards .card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.acct-dashboard .acct-cards .card-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  height: 100%;
}
.acct-dashboard .acct-cards .card-title {
  font-size: 20px;
  font-weight: bold;
  margin: 0 0 1px;
}
.acct-dashboard .acct-cards .card-text,
.acct-dashboard .acct-cards .number {
  font-size: 24px;
  font-weight: bold;
  margin: 1px 0 0;
}
.acct-dashboard .acct-card-sub {
  font-size: 0.8em;
  color: #777;
  margin: 4px 0 0;
}

/* ---- KPI loading shimmer ---- */
@keyframes acct-shimmer { 0% { left: -100%; } 100% { left: 100%; } }
.acct-dashboard.is-loading [data-kpi] {
  color: transparent !important;
  position: relative;
  background-color: #ececec;
  border-radius: 4px;
  overflow: hidden;
  min-height: 24px;
  display: inline-block;
  min-width: 70%;
  vertical-align: middle;
}
.acct-dashboard.is-loading .acct-cards .card-text[data-kpi],
.acct-dashboard.is-loading .acct-cards .number[data-kpi],
.acct-dashboard.is-loading .acct-cards .card-text > [data-kpi],
.acct-dashboard.is-loading .acct-cards .number > [data-kpi] {
  display: block;
  min-width: 70%;
  min-height: 28px;
  margin: 1px auto 0;
}
/* Card-body is a centered flex column, so its <p> children shrink-wrap to
   their text width. While loading we stretch the wrapper paragraph so the
   inner span's percentage width can actually compute against card width. */
.acct-dashboard.is-loading .acct-cards .card-text,
.acct-dashboard.is-loading .acct-cards .number {
  align-self: stretch;
  width: 100%;
}
.acct-dashboard.is-loading [data-kpi]::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.8), transparent);
  animation: acct-shimmer 2s infinite;
}
/* While loading, render the sub-text line as a single uniform skeleton bar
   so cards with multiple inline values don't shimmer in pieces. */
.acct-dashboard.is-loading .acct-cards .acct-card-sub {
  color: transparent !important;
  text-decoration: none !important;
  font-size: 0;
  line-height: 0;
  position: relative;
  background-color: #ececec;
  border-radius: 4px;
  overflow: hidden;
  width: 70%;
  height: 12px;
  margin: 8px auto 0;
}

.acct-dashboard.is-loading .acct-cards .acct-card-sub * {
  display: none !important;
}

.acct-dashboard.is-loading .acct-cards .acct-card-sub::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
  animation: acct-shimmer 2s infinite;
}

/* ---- Invoice snapshot / payment / aging cards ---- */
.inv-account-dashboard .acct-cards .card {
  padding: 18px 20px;
  text-align: left;
}

.inv-account-dashboard .acct-cards .card-body {
  align-items: stretch;
  text-align: left;
}

.inv-account-title {
  font-size: 14px;
  font-weight: 700;
  color: #222;
  margin: 0 0 12px;
  text-transform: none;
}

.inv-account-list {
  margin: 0;
  padding: 0;
  width: 100%;
}

.inv-account-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 6px 0;
  border-bottom: 1px solid #eee;
  gap: 12px;
}

.inv-account-row:last-child {
  border-bottom: 0;
}

.inv-account-row dt {
  font-size: 0.78em;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #666;
  margin: 0;
  font-weight: 500;
}

.inv-account-row dd {
  margin: 0;
  font-weight: 700;
  color: #111;
  font-size: 0.95em;
  text-align: right;
}

.inv-status-pill {
  display: inline-block;
  font-size: 0.75em;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #1f6f3a;
  background: #e6f4ea;
  border-radius: 999px;
  padding: 2px 10px;
}

.inv-status-pill.is-onhold {
  color: #8a1c1c;
  background: #fde2e1;
}
.inv-payment-card .card-body {
  justify-content: flex-start;
}

/* Last payment row inside the Account card: amount on top, date below.
   Modifier class avoids relying on :has() for stacking the dd contents. */
.inv-account-row--payment dd {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.2;
}
.inv-account-row dd:has(.inv-payment-amount) {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.2;
}
.inv-account-row dd .inv-payment-amount {
  display: block;
  font-size: 1em;
  font-weight: 700;
  color: #111;
  margin: 0;
}
.inv-account-row dd .inv-payment-date {
  display: block;
  font-size: 0.75em;
  color: #888;
  font-weight: 500;
  margin: 2px 0 0;
  letter-spacing: 0.02em;
}

.inv-payment-date {
  margin: 0;
  color: #888;
  font-size: 0.85em;
}

.inv-payment-amount {
  margin: 4px 0 0;
  font-size: 1.4em;
  font-weight: 700;
  color: #111;
}

.inv-aging-card .card-body {
  justify-content: flex-start;
}

/* Breakdown card spans the remaining 2 columns on desktop. */
@media (min-width: 768px) {
  .inv-account-dashboard .acct-cards .inv-aging-card {
    grid-column: span 2;
  }
}

.inv-aging-bar {
  display: flex;
  width: 100%;
  height: 18px;
  border-radius: 4px;
  background: #ececec;
  overflow: hidden;
  margin: 6px 0 14px;
}

.inv-aging-seg {
  display: block;
  height: 100%;
  transition: width 0.4s ease;
}

.inv-aging-seg--current {
  background: #cfd5dc;
}

.inv-aging-seg--31-60 {
  background: #28a745;
}

.inv-aging-seg--61-90 {
  background: #f0ad4e;
}

.inv-aging-seg--91-120 {
  background: #ec7211;
}

.inv-aging-seg--121-150 {
  background: #c9302c;
}

.inv-aging-seg--150 {
  background: #7d1d1d;
}

.inv-aging-legend {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 4px 16px;
  font-size: 0.78em;
  color: #444;
  width: 100%;
}

.inv-aging-legend li {
  display: flex;
  align-items: center;
  gap: 6px;
}

.inv-aging-swatch {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
}

.inv-aging-amt {
  margin-left: auto;
  font-weight: 600;
  color: #111;
}

.inv-aging-amt.is-credit {
  color: #1f6f3a;
}

/* Snapshot/Payment/Aging skeletons during is-loading. We override the
   default centered-block KPI shimmer so the inline values inside the
   snapshot list stay right-aligned and the aging bar stays horizontal. */
.inv-account-dashboard.is-loading .acct-cards .card-text[data-kpi],
.inv-account-dashboard.is-loading .acct-cards .number[data-kpi] {
  display: inline-block;
  width: auto;
  margin: 0;
}

.inv-account-dashboard.is-loading .inv-account-row dd[data-kpi],
.inv-account-dashboard.is-loading .inv-payment-date[data-kpi],
.inv-account-dashboard.is-loading .inv-payment-amount[data-kpi] {
  min-width: 80px;
}

.inv-account-dashboard.is-loading .inv-status-pill[data-kpi] {
  background: #ececec !important;
  color: transparent !important;
  min-width: 60px;
}

.inv-account-dashboard.is-loading .inv-aging-bar {
  opacity: 0.4;
}

.inv-account-dashboard.is-loading .inv-aging-amt {
  color: transparent !important;
  background: #ececec;
  border-radius: 3px;
  min-width: 56px;
  display: inline-block;
}

/* ---- Filters ---- */
.acct-dashboard .acct-filters-toggle { display: none; margin-bottom: 8px; }
.acct-dashboard .acct-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: end;
  gap: 10px 12px;
  padding: 6px 0 10px;
  margin-bottom: 8px;
}
.acct-dashboard .acct-filter {
  display: flex; flex-direction: column; align-items: stretch; gap: 4px; min-width: 0;
}
.acct-dashboard .acct-filter label {
  font-size: 0.85em; color: #555; margin: 0; white-space: nowrap;
}
.acct-dashboard .acct-filter input[type="text"],
.acct-dashboard .acct-filter input[type="date"],
.acct-dashboard .acct-input-wrap.acct-multi input {
  padding: 3px 8px; height: 30px; line-height: 1.2; font-size: 0.9em;
  border: 1px solid #ccc; border-radius: 3px; background: #fff;
  min-width: 0; box-sizing: border-box; width: 100%;
  box-shadow: none !important; -webkit-appearance: none; appearance: none;
}
.acct-dashboard .acct-filter input[type="text"]:focus,
.acct-dashboard .acct-filter input[type="date"]:focus {
  outline: none; box-shadow: none !important; border-color: #999;
}
.acct-dashboard .acct-date-range { display: flex; align-items: center; gap: 4px; }
.acct-dashboard .acct-date-range .acct-input-wrap { flex: 1 1 0; min-width: 0; }
.acct-dashboard .acct-date-range input { flex: 1 1 0; }
.acct-dashboard .acct-date-sep { color: #999; }

.acct-dashboard .acct-input-wrap { position: relative; display: block; min-width: 0; }
.acct-dashboard .acct-input-wrap input { padding-right: 28px; }
.acct-dashboard .acct-input-wrap input[list]::-webkit-calendar-picker-indicator { display: none !important; }
.acct-dashboard .acct-input-wrap input[list] { -webkit-appearance: none; }
.acct-dashboard .acct-clear {
  position: absolute; top: 50%; right: 6px; transform: translateY(-50%);
  width: 18px; height: 18px; line-height: 16px; text-align: center;
  border: 0; background: transparent; color: #888; font-size: 16px;
  cursor: pointer; padding: 0; display: none; border-radius: 50%; z-index: 2;
}
.acct-dashboard .acct-clear:hover { background: #eee; color: #333; }
.acct-dashboard .acct-input-wrap.has-value .acct-clear { display: block; }

.acct-dashboard .acct-input-wrap.acct-multi {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px;
  padding: 3px 6px; border: 1px solid #ccc; background: #fff;
  border-radius: 3px; min-height: 30px;
}
.acct-dashboard .acct-input-wrap.acct-multi input {
  flex: 1 1 80px; min-width: 80px; border: 0 !important; height: 22px;
  padding: 0 4px; background: transparent; outline: none;
  box-shadow: none !important; width: auto;
}
.acct-dashboard .acct-tag {
  display: inline-flex; align-items: center; gap: 4px;
  background: #e6f4ea; border: 1px solid #28a745; color: #1e7e34;
  border-radius: 12px; padding: 1px 6px 1px 8px;
  font-size: 0.8em; line-height: 1.4; max-width: 100%;
}
.acct-dashboard .acct-tag-text {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 140px;
}
.acct-dashboard .acct-tag-remove {
  border: 0; background: transparent; color: #1e7e34; font-size: 14px;
  line-height: 1; cursor: pointer; padding: 0 2px;
}
.acct-dashboard .acct-tag-remove:hover { color: #14532d; }

/* Reset button (sits inline with date range) */
.acct-filters .acct-reset {
  flex: 0 0 auto; height: 30px; padding: 0 12px;
  font-size: 0.85em; line-height: 28px;
}
.acct-dashboard .acct-reset,
.acct-dashboard .acct-reset:hover,
.acct-dashboard .acct-reset:focus,
.acct-dashboard .acct-reset:active,
.acct-dashboard .acct-reset:focus:active {
  background-color: #f8f8f8 !important;
  color: #555 !important;
  border: 1px solid #ccc !important;
  box-shadow: none !important;
  outline: none !important;
  border-radius: 4px;
}
.acct-dashboard .acct-reset:hover {
  background-color: #eee !important;
  color: #333 !important;
}

.acct-dashboard .acct-reset:active {
  background-color: #e2e2e2 !important;
}

/* "Clear filters" sits inside the DataTables toolbar (.dt-buttons) and
   inherits the same look as Export / Columns. We just colour the icon and
     give the button a hint of green to set it apart. */
.woocommerce-MyAccount-content .dataTables_wrapper .dt-button.acct-clear-all {
  color: #1f6f3a;
}
.woocommerce-MyAccount-content .dataTables_wrapper .dt-button.acct-clear-all .fa {
  color: #28a745;
    margin-right: 4px;
}
.woocommerce-MyAccount-content .dataTables_wrapper .dt-button.acct-clear-all:hover {
  background: #eaf7ee;
    border-color: #8fd3a3;
}
.woocommerce-MyAccount-content .dataTables_wrapper .dt-button.acct-clear-all[hidden] {
  display: none !important;
}

/* DataTables toolbar */
.woocommerce-MyAccount-content .dataTables_wrapper .dataTables_length,
.woocommerce-MyAccount-content .dataTables_wrapper .dt-buttons,
.woocommerce-MyAccount-content .dataTables_wrapper .dataTables_filter { margin-bottom: 8px; }
.woocommerce-MyAccount-content .dataTables_wrapper .dataTables_length select,
.woocommerce-MyAccount-content .dataTables_wrapper .dataTables_filter input {
  height: 30px; padding: 0 8px; font-size: 0.9em;
  border: 1px solid #ccc; border-radius: 3px; background: #fff;
  box-sizing: border-box; box-shadow: none !important;
  -webkit-appearance: none; appearance: none;
}
.woocommerce-MyAccount-content .dataTables_wrapper .dataTables_length select {
  padding-right: 24px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23666'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 10px 6px;
}
.woocommerce-MyAccount-content .dataTables_wrapper .dataTables_filter input:focus,
.woocommerce-MyAccount-content .dataTables_wrapper .dataTables_length select:focus {
  outline: none; box-shadow: none !important; border-color: #999;
}
.woocommerce-MyAccount-content .dataTables_wrapper .dataTables_filter input { padding: 0 10px; }
.woocommerce-MyAccount-content .dataTables_wrapper .dt-buttons { gap: 6px; display: inline-flex; flex-wrap: wrap; }
.woocommerce-MyAccount-content .dataTables_wrapper .dt-button { margin: 0; }

.acct-drawer-close { display: none; }

/* ---- Mobile ---- */
@media (max-width: 900px) {
  .acct-dashboard .acct-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .acct-dashboard .acct-filters-toggle {
    display: flex !important;
    align-items: center; justify-content: center; gap: 6px;
    width: 100%; margin: 0 0 8px; padding: 8px 14px;
    background: #f1f3f5 !important; color: #333 !important;
    border: 1px solid #ccc !important; border-radius: 4px !important;
    font-weight: 600; font-size: 0.9em; box-shadow: none !important;
  }
  .acct-dashboard .acct-filters-toggle:hover,
  .acct-dashboard .acct-filters-toggle:focus,
  .acct-dashboard .acct-filters-toggle:active {
    background: #e7eaee !important; color: #333 !important;
  }
  .acct-dashboard .acct-filters-toggle .fa-filter { font-size: 0.9em; color: #666; }
  .acct-dashboard .acct-filter-count { background: #28a745; color: #fff; }

  .acct-dashboard .acct-filters {
    grid-template-columns: 1fr; display: none;
    position: fixed; inset: auto 0 0 0;
    background: #fff; border-top: 1px solid #ccc;
    box-shadow: 0 -4px 16px rgba(0,0,0,0.15);
    padding: 16px; max-height: 80vh; overflow-y: auto;
    z-index: 1100; margin: 0;
  }
  .acct-dashboard .acct-filters.is-open { display: grid; }
  .acct-drawer-close {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 0 10px; margin: 0 0 6px; border-bottom: 1px solid #eee;
    font-weight: 600; font-size: 1em; color: #333;
  }
  .acct-drawer-close-btn {
    border: 0; background: transparent; font-size: 1.4em; line-height: 1;
    color: #666; cursor: pointer; padding: 4px 6px; border-radius: 4px;
  }
  .acct-drawer-close-btn:hover { background: #f1f3f5; color: #333; }
  .acct-filters-backdrop {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,0.4); z-index: 1099;
  }
  .acct-filters-backdrop.is-open { display: block; }
  .acct-dashboard .acct-filters .acct-filter input[type="text"],
  .acct-dashboard .acct-filters .acct-filter input[type="date"],
  .acct-dashboard .acct-filters .acct-filter select {
    height: 40px; font-size: 16px; padding: 6px 10px;
  }
  .acct-dashboard .acct-filters .acct-filter label {
    font-size: 0.9em; margin-bottom: 2px;
  }
  .acct-dashboard .acct-filters .button,
  .acct-dashboard .acct-filters .acct-reset {
    height: 40px; font-size: 0.95em; width: 100%;
  }
  .acct-dashboard .acct-date-range { flex-wrap: wrap; }
  .acct-dashboard .acct-date-range .acct-reset { margin: 8px 0 0; flex: 1 1 100%; }
}
@media (max-width: 600px) {
  .acct-customer-header {
    flex-wrap: wrap;
    gap: 6px;
  }
  .acct-customer-header .acct-header-refresh {
    order: 2;
    margin-left: auto;
    flex: 0 0 auto;
  }
  .acct-customer-header .acct-customer-name {
    order: 0;
    flex: 1 1 auto;
  }
  .acct-customer-header .acct-customer-no {
    order: 1;
  }
  .acct-customer-header .cr-refresh-btn { padding: 4px 8px; font-size: 0.95em; min-width: 0; }
  .acct-dashboard .acct-cards {
    grid-template-columns: repeat(var(--acct-card-count-mobile, 2), minmax(0, 1fr));
    gap: 8px;
  }
  .acct-dashboard .acct-cards .card { padding: 8px 10px; }
  .acct-dashboard .acct-cards .card-body { align-items: flex-start; text-align: left; }
  .acct-dashboard .acct-cards .card-title {
    font-size: 0.7em; text-transform: uppercase; letter-spacing: 0.04em;
    color: #666; font-weight: 600;
  }
  .acct-dashboard .acct-cards .card-text,
  .acct-dashboard .acct-cards .number { font-size: 1.05em; margin-top: 2px; }
  .acct-dashboard .acct-card-sub { display: none; }

  .woocommerce-MyAccount-content .dataTables_wrapper .dataTables_length,
  .woocommerce-MyAccount-content .dataTables_wrapper .dt-buttons,
  .woocommerce-MyAccount-content .dataTables_wrapper .dataTables_filter {
    float: none !important; width: auto; text-align: center; margin: 0 auto 4px;
  }
  .woocommerce-MyAccount-content .dataTables_wrapper .dt-buttons {
    display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; width: 100%;
  }
  .woocommerce-MyAccount-content .dataTables_wrapper .dt-button { padding: 4px 8px; font-size: 0.85em; }
  .woocommerce-MyAccount-content .dataTables_wrapper .dataTables_filter label,
  .woocommerce-MyAccount-content .dataTables_wrapper .dataTables_length label {
    display: inline-flex; align-items: center; gap: 6px; margin: 0;
  }
  .woocommerce-MyAccount-content .dataTables_wrapper .dataTables_filter input {
    width: 180px; max-width: 60vw;
  }
}

/* ---- Desktop: per-column header filter icons + popovers ---- */
@media (min-width: 901px) {
  .acct-dashboard .acct-filters {
    display: block; grid-template-columns: none;
    padding: 0; margin: 0; border: 0; height: 0; overflow: visible; gap: 0;
  }
  .acct-dashboard .acct-filter { display: none; }
  .acct-dashboard .acct-filter.acct-popover-open {
    display: block; position: fixed; z-index: 1200;
    background: #fff; border: 1px solid #ccc; border-radius: 4px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.14);
    padding: 10px 12px; min-width: 240px; max-width: 340px;
  }
  .acct-dashboard .acct-filter.acct-popover-open label {
    margin-bottom: 4px; font-weight: 600;
  }
  .acct-dashboard .acct-filter .acct-reset,
  .acct-dashboard .acct-filters > .acct-reset { display: none; }
  .acct-dashboard .acct-filters-toggle { display: none; }
  .acct-filters-backdrop { display: none !important; }
}

/* Column header filter icons */
.acct-table thead .acct-col-filter-btn,
.dataTables_wrapper thead .acct-col-filter-btn {
  background: transparent; border: 0; color: #999; cursor: pointer;
  padding: 0 4px; font-size: 0.85em; margin-left: 4px;
  vertical-align: middle; line-height: 1;
}
.acct-table thead .acct-col-filter-btn:hover,
.dataTables_wrapper thead .acct-col-filter-btn:hover { color: #333; }
.acct-table thead .acct-col-filter-btn.has-active,
.acct-table thead .acct-col-filter-btn.is-open,
.dataTables_wrapper thead .acct-col-filter-btn.has-active,
.dataTables_wrapper thead .acct-col-filter-btn.is-open { color: #28a745; }
@media (max-width: 900px) {
  .acct-table thead .acct-col-filter-btn,
  .dataTables_wrapper thead .acct-col-filter-btn { display: none; }
}

.acct-dashboard .acct-filter-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px; margin-left: 4px;
  font-size: 0.75em; font-weight: 600; line-height: 1;
  color: #fff; background: #28a745; border-radius: 10px;
}
.acct-dashboard .acct-filter-count[hidden] { display: none; }

/* ---- Active-filter banner ---- */
.acct-active-filters {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  padding: 8px 12px; margin: 0 0 10px;
  background: #f0fdf4; border: 1px solid #86efac; border-radius: 6px;
  font-size: 0.85em; line-height: 1.4;
}
.acct-active-filters[hidden] { display: none !important; }
.acct-af-label {
  font-weight: 600; color: #16a34a; white-space: nowrap; margin-right: 2px;
}
.acct-af-label .fa { margin-right: 4px; font-size: 0.9em; }
.acct-af-chip {
  display: inline-flex; align-items: center; gap: 4px;
  background: #fff; border: 1px solid #6ee7b7; border-radius: 14px;
  padding: 2px 6px 2px 10px; max-width: 260px;
}
.acct-af-chip-label { color: #555; font-weight: 600; }
.acct-af-chip-value {
  color: #166534; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  max-width: 160px;
}
.acct-af-chip-remove {
  border: 0; background: transparent; color: #6b7280; font-size: 15px;
  line-height: 1; cursor: pointer; padding: 0 2px; flex-shrink: 0;
}
.acct-af-chip-remove:hover { color: #dc2626; }
.acct-af-clear-all {
  border: 0; background: transparent; color: #16a34a; font-weight: 600;
  cursor: pointer; padding: 2px 6px; font-size: 0.85em; white-space: nowrap;
  text-decoration: underline; text-underline-offset: 2px;
}
.acct-af-clear-all:hover { color: #15803d; }

/* ---- Prevent mobile zoom on input focus (iOS) ---- */
@media (max-width: 900px) {
  input[type="text"],
  input[type="search"],
  input[type="email"],
  input[type="password"],
  input[type="number"],
  input[type="tel"],
  input[type="url"],
  input[type="date"],
  select,
  textarea {
    font-size: 16px !important;
  }
}
