/* Scoped to Fee Settings: shared modules and permissions are unchanged. */
.module-dashboard:has(> #fee-settings-root) { grid-template-columns: minmax(0, 1fr); min-width: 0; }
#fee-settings-root { grid-column: 1 / -1; width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box; display: block; padding: 24px; text-align: left; container-type: inline-size; }
#fee-settings-root h2 { margin: 0; font-size: 1.4rem; }
#fee-settings-root .fee-item-list { list-style: none; padding: 0; margin: 20px 0; }
#fee-settings-root .fee-item-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid #d9dee8; }
#fee-settings-root .fee-item-list li > span, #fee-settings-root .fee-item-list li > label { flex: 1 1 220px; min-width: 0; overflow-wrap: anywhere; }
#fee-settings-root .fee-item-list label { display: flex; flex-direction: column; gap: 8px; }
#fee-settings-root .fee-item-actions { display: flex; gap: 8px; flex-wrap: wrap; }
#fee-settings-root p { line-height: 1.5; margin: 12px 0; }
#fee-settings-root .filter-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); width: 100%; gap: 16px; align-items: end; }
#fee-settings-root .filter-row > label { display: flex; flex-direction: column; gap: 8px; min-width: 0; text-align: left; }
#fee-settings-root input:not([type="checkbox"]), #fee-settings-root select { min-width: 0; max-width: 100%; box-sizing: border-box; min-height: 42px; font-size: 14px; }
#fee-settings-root .filter-row input, #fee-settings-root .filter-row select { width: 100%; }
#fee-settings-root input[type="checkbox"] { width: 18px; height: 18px; min-height: 18px; padding: 0; display: inline-block; vertical-align: middle; flex-shrink: 0; }
#fee-settings-root button { min-height: 42px; white-space: normal; }
#fee-settings-root nav { width: 100%; }
#fee-settings-root .table-wrap { width: 100%; max-width: 100%; overflow-x: auto; }
#fee-settings-root table { width: 100%; min-width: 880px; }
#fee-settings-root th, #fee-settings-root td { text-align: left; vertical-align: top; padding: 14px 12px; overflow-wrap: anywhere; }
#fee-settings-root td select { width: 100%; min-width: 155px; }
#fee-settings-root td:nth-child(2) { min-width: 175px; }
#fee-settings-root td:last-child { min-width: 230px; }
#fee-settings-root summary { cursor: pointer; line-height: 1.5; min-height: 36px; }
#fee-settings-root details label { flex-wrap: wrap; }
#fee-settings-root details label input { flex: 0 1 150px; }
#fee-settings-root fieldset { min-width: 0; }
#fee-settings-root [role="alert"], #fee-message { color: #9b341b; }
/* Use actual panel space, including the sidebar, rather than screen width alone. */
@container (max-width: 1000px) {
  #fee-settings-root table:has([data-fee-row]) { min-width: 0; width: 100%; }
  #fee-settings-root table:has([data-fee-row]) thead { display: none; }
  #fee-settings-root table:has([data-fee-row]) tbody { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  #fee-settings-root [data-fee-row] { display: block; min-width: 0; border: 1px solid #cbd5e1; border-radius: 8px; padding: 16px; }
  #fee-settings-root [data-fee-row] td { display: block; border: 0; padding: 6px 0; width: 100%; min-width: 0; white-space: normal; }
  #fee-settings-root [data-fee-row] td:nth-child(1)::before { content: 'Enabled '; }
  #fee-settings-root [data-fee-row] td:nth-child(2) { font-weight: 700; font-size: 1rem; }
  #fee-settings-root [data-fee-row] td:nth-child(3)::before { content: 'Billing frequency'; display: block; margin-bottom: 5px; }
  #fee-settings-root [data-fee-row] td:nth-child(4)::before { content: 'Rate basis'; display: block; margin-bottom: 5px; }
}
@container (max-width: 600px) {
  #fee-settings-root table:has([data-fee-row]) tbody { grid-template-columns: 1fr; }
  #fee-settings-root .filter-row { grid-template-columns: 1fr; }
  #fee-settings-root nav { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  #fee-settings-root { padding: 14px; }
  #fee-settings-root input:not([type="checkbox"]), #fee-settings-root select { font-size: 16px; }
}
