/* Eterano v1.21.2c — Roles UX polish */

/* Accountant Settings must use the same allowlist in the sidebar flyout as the page tabs. */
body.role-accountant1212 .sidebar-nav-group1142[data-nav-group="settings"] .sidebar-subentry1142.role-hidden1212,
body.role-accountant1212 .sidebar-nav-group1142[data-nav-group="settings"] .sidebar-subentry1142[hidden]{display:none!important}

/* With only Accounting & VAT + Invoicing visible, keep the tabs together instead of stretching across the rail. */
body.role-accountant1212 #settingsTabsShell .settings-tabs-nav.restricted-settings1212c{
  justify-content:flex-start!important;
  gap:8px!important;
  overflow-x:auto!important;
}
body.role-accountant1212 #settingsTabsShell .settings-tabs-nav.restricted-settings1212c button{
  flex:0 0 auto!important;
  width:auto!important;
  min-width:max-content!important;
  padding-inline:15px!important;
}

/* One branded reversal dialog replaces confirm() + prompt(). */
.accounting-reversal-modal1212c{width:min(580px,calc(100vw - 28px));padding:0}
.accounting-reversal-shell1212c{display:grid;gap:16px;padding:22px}
.accounting-reversal-shell1212c .modal-header{margin-bottom:0}
.reversal-explain1212c{display:grid;gap:5px;padding:13px 14px;border:1px solid color-mix(in srgb,var(--accent) 35%,var(--line));border-radius:12px;background:color-mix(in srgb,var(--surface-soft) 94%,var(--accent) 6%)}
.reversal-explain1212c strong{font-size:.86rem}.reversal-explain1212c p{margin:0;color:var(--muted);line-height:1.45}
.reversal-summary1212c{display:flex;justify-content:space-between;gap:14px;align-items:flex-start;padding:11px 12px;border:1px solid var(--line);border-radius:12px;background:var(--surface-soft)}
.reversal-summary1212c{min-width:0}.reversal-summary1212c strong{min-width:0;overflow-wrap:anywhere}.reversal-summary1212c span{color:var(--muted);font-size:.78rem;white-space:nowrap}
.accounting-reversal-shell1212c label{margin:0}.accounting-reversal-shell1212c label small{display:block;margin-top:6px;color:var(--muted)}
.accounting-reversal-shell1212c textarea{resize:vertical;min-height:90px}

@media(max-width:600px){
  .reversal-summary1212c{flex-direction:column}.reversal-summary1212c span{white-space:normal}
  .accounting-reversal-shell1212c .modal-actions{grid-template-columns:1fr}.accounting-reversal-shell1212c .modal-actions button{width:100%}
}
