/* Shared visual system applied after the existing section styles. */
:root {
  --ui-ink: #1c2b24;
  --ui-muted: #66766d;
  --ui-line: #e1e8e3;
  --ui-line-strong: #d2ddd6;
  --ui-bg: #f5f7f5;
  --ui-surface: #fff;
  --ui-surface-soft: #f8faf8;
  --ui-primary: var(--user-accent, #176b50);
  --ui-primary-soft: #eaf4ee;
  --ui-danger: #b84949;
  --ui-warning: #a66d1e;
  --ui-success: #23764e;
  --ui-radius-sm: 7px;
  --ui-radius-md: 11px;
  --ui-radius-lg: 14px;
  --ui-shadow-sm: 0 2px 8px rgba(26, 48, 34, .045);
  --ui-shadow-md: 0 8px 22px rgba(26, 48, 34, .07);
  --ui-space-1: 4px;
  --ui-space-2: 8px;
  --ui-space-3: 12px;
  --ui-space-4: 16px;
  --ui-space-6: 24px;
  --ui-space-8: 32px;
  --ink: var(--ui-ink);
  --muted: var(--ui-muted);
  --line: var(--ui-line);
  --bg: var(--ui-bg);
  --green: var(--ui-primary);
  --pale: var(--ui-primary-soft);
  --gold: var(--ui-warning);
  --red: var(--ui-danger);
  --shadow: var(--ui-shadow-md);
}

html { color-scheme: light; }
body {
  background: var(--ui-bg);
  background-image: none;
  color: var(--ui-ink);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.shell, .main, .content { min-width: 0; }
.main { background: transparent; }
.content { max-width: 1560px; padding-block: 24px 48px; }
#listView.content { max-width: none; padding-inline: clamp(10px, 1.2vw, 18px); }

/* Let workspace pages use the space left by the fixed-width sidebar. */
@media (min-width: 721px) {
  .main {
    flex: 1 1 0;
    width: 100%;
    max-width: none;
    min-width: 0;
    box-sizing: border-box;
  }
}
.main > .content {
  width: 100%;
  max-width: none;
  margin-inline: 0;
  box-sizing: border-box;
}
#listView.content {
  width: 100%;
  max-width: none;
  margin-inline: 0;
  padding-inline: clamp(16px, 1.4vw, 24px);
  box-sizing: border-box;
}
#listView > .heading,
#listView > #stats,
#listView > .filters,
#listView > #reminderBar,
#listView > .table-wrap {
  width: 100%;
  max-width: none;
  min-width: 0;
  box-sizing: border-box;
}

/* Page headings */
.content > .heading,
.content > .fin-heading,
.content > .partner-heading {
  gap: var(--ui-space-4);
  margin-bottom: var(--ui-space-6);
  padding: 18px 20px;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius-lg);
  background: var(--ui-surface);
  box-shadow: var(--ui-shadow-sm);
}
.content > .heading::after,
.content > .fin-heading::after,
.content > .partner-heading::after { display: none; }
.content > .heading h1,
.content > .fin-heading h1,
.content > .partner-heading h1 {
  color: var(--ui-ink);
  font-size: clamp(22px, 1.8vw, 27px);
  line-height: 1.35;
  letter-spacing: 0;
}
.content > .heading .sub,
.content > .fin-heading p,
.content > .partner-heading p {
  color: var(--ui-muted);
  font-size: 13px;
  line-height: 1.65;
}
.crumb { color: var(--ui-muted); }

/* Shared cards, panels, summaries and filters */
.stat, .fin-card, .cash-stat, .partner-stat,
.table-wrap, .fin-table-card, .cash-ledger, .partner-ledger-card,
.panel, .settings-panel, .barari-person, .barari-delivery-card,
.overview-panel, .overview-stats article, .reminder-bar, .settings-intro, .souq-carry-card {
  border-color: var(--ui-line);
  border-radius: var(--ui-radius-md);
  box-shadow: var(--ui-shadow-sm);
}
.stat, .fin-card, .cash-stat, .partner-stat {
  background: var(--ui-surface);
  padding: 16px 18px;
}
.stat:hover, .fin-card:hover, .cash-stat:hover, .partner-stat:hover {
  transform: translateY(-1px);
  box-shadow: var(--ui-shadow-md);
}
/* Installment summaries share the existing theme and spacing tokens. */
#stats.stats { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
#stats .stats-group { min-width: 0; }
#stats .stats-group-title { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin: 0 0 8px; }
#stats .stats-group-title b { color: var(--ui-ink); font-size: 13px; }
#stats .stats-group-title span { color: var(--ui-muted); font-size: 11px; }
#stats .stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
#stats .stat {
  --metric-color: var(--ui-ink);
  min-width: 0; min-height: 0; padding: 12px 14px;
  border: 1px solid var(--ui-line); border-inline-start: 3px solid var(--metric-color);
  border-radius: var(--ui-radius-md); background: var(--ui-surface); box-shadow: var(--ui-shadow-sm);
}
#stats .stat:hover { transform: none; box-shadow: var(--ui-shadow-sm); }
#stats .stat-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--ui-muted); font-size: 12px; font-weight: 600; }
#stats .stat-top > span:first-child { min-width: 0; }
#stats .stat-icon { flex: 0 0 26px; width: 26px; height: 26px; border-radius: var(--ui-radius-sm); display: grid; place-items: center; font-size: 14px; color: var(--metric-color); background: color-mix(in srgb, var(--metric-color) 10%, var(--ui-surface)); }
#stats .stat strong { display: block; margin-top: 6px; color: var(--metric-color); font-size: clamp(24px, 2vw, 30px); line-height: 1.3; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; unicode-bidi: plaintext; }
#stats .stat small { display: block; margin-top: 2px; color: var(--ui-muted); font-size: 11px; }
#stats .metric-capital, #stats .metric-agreed { --metric-color: color-mix(in srgb, var(--ui-ink) 65%, #4682bb); }
#stats .metric-collected, #stats .metric-active, #stats .metric-done { --metric-color: var(--ui-success); }
#stats .metric-remaining { --metric-color: var(--ui-danger); }
#stats .metric-late { --metric-color: var(--ui-warning); }
#stats .stats-group:last-child .stats-grid { grid-auto-rows: 1fr; }
#stats .stats-group:last-child .stat { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 8px; padding-block: 10px; }
#stats .stats-group:last-child .stat-top { grid-column: 1 / -1; }
#stats .stats-group:last-child strong { margin-top: 2px; font-size: 26px; }
#stats .stats-group:last-child small { margin-top: 2px; }
#listView > .heading { padding: 14px 16px; margin-bottom: 16px; }
@media (max-width: 1000px) { #stats .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) {
  #stats .stats-grid { gap: 8px; }
  #stats .stat { padding: 10px 12px; }
  #stats .stat strong { font-size: 24px; }
}
@media (max-width: 360px) { #stats .stats-grid { grid-template-columns: minmax(0, 1fr); } }
.filters, .partner-filters, .fin-filters {
  gap: var(--ui-space-2);
  padding: var(--ui-space-3);
  border-color: var(--ui-line);
  border-radius: var(--ui-radius-md);
  background: var(--ui-surface);
  box-shadow: none;
  backdrop-filter: none;
}
.panel, .settings-panel { margin-bottom: var(--ui-space-4); }
.panel-title, .table-head {
  min-height: 50px;
  padding: 13px 16px;
  border-color: var(--ui-line);
  background: var(--ui-surface-soft);
}
.panel-title, .table-head strong, .settings-panel h2 { color: var(--ui-ink); }

/* Buttons and controls */
.btn, .iconbtn, .back, .filter-chip, .close, .visual-sound-toggle {
  border-radius: var(--ui-radius-sm);
  transition: color .14s ease, background-color .14s ease, border-color .14s ease,
    box-shadow .14s ease, transform .14s ease;
}
.btn {
  min-height: 38px;
  padding: 8px 13px;
  border-color: var(--ui-line-strong);
  background: var(--ui-surface);
  color: var(--ui-ink);
  box-shadow: none;
  font-size: 13px;
  font-weight: 600;
}
.btn:hover {
  border-color: #b8c9be;
  background: var(--ui-surface-soft);
  box-shadow: var(--ui-shadow-sm);
}
.btn.primary, .barari-tabs .btn.primary {
  border-color: var(--ui-primary);
  background: var(--ui-primary);
  color: #fff;
  box-shadow: 0 3px 9px color-mix(in srgb, var(--ui-primary), transparent 84%);
}
.btn.primary:hover, .barari-tabs .btn.primary:hover {
  border-color: color-mix(in srgb, var(--ui-primary), #000 12%);
  background: color-mix(in srgb, var(--ui-primary), #000 8%);
}
.btn:active, .iconbtn:active, .filter-chip:active, .close:active, .back:active,
.visual-sound-toggle:active { transform: translateY(1px); }
.btn.danger, .iconbtn.partner-remove, .iconbtn.danger, .fin-delete { color: var(--ui-danger); }
.control, input.control, select.control, textarea.control,
.formfield input, .formfield select, .formfield textarea {
  min-height: 39px;
  min-width: 0;
  border: 1px solid var(--ui-line-strong);
  border-radius: var(--ui-radius-sm);
  background-color: var(--ui-surface);
  color: var(--ui-ink);
  box-shadow: none;
  transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}
.control:focus, input.control:focus, select.control:focus, textarea.control:focus,
.formfield input:focus, .formfield select:focus, .formfield textarea:focus {
  border-color: color-mix(in srgb, var(--ui-primary), white 22%);
  outline: 0;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ui-primary), transparent 86%);
}
.formfield label, .field-label { color: #43534a; font-size: 12px; font-weight: 600; }
.income-schedule-field > .income-schedule-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  max-width: 100%;
  cursor: pointer;
}
.income-schedule-field > .income-schedule-toggle input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  flex: 0 0 18px;
  margin: 0;
  padding: 0;
  accent-color: var(--ui-primary, #176b50);
}
.hint, .settings-note, .partner-hint, .fin-hint { color: var(--ui-muted); }
:focus-visible { outline: 2px solid color-mix(in srgb, var(--ui-primary), white 15%); outline-offset: 2px; }

/* Tables use one compact, readable rhythm while keeping their own scroll wrappers. */
.table-wrap, .partner-table-scroll, .fin-table-scroll, .partner-modal-table {
  max-width: 100%;
}
.table-wrap, .fin-table-card, .cash-ledger, .partner-ledger-card { overflow: hidden; }
table { font-variant-numeric: tabular-nums; }
th, .partner-table th, .fin-table th {
  padding: 11px 12px;
  border-color: var(--ui-line);
  background: #f5f8f6;
  color: #526359;
  font-size: 12px;
  font-weight: 650;
}
td, .partner-table td, .fin-table td {
  padding: 11px 12px;
  border-bottom-color: #edf1ee;
  color: #34443a;
  font-size: 13px;
}
tbody tr { transition: background-color .14s ease; }
tbody tr:nth-child(even) { background-color: #fbfcfb; }
tbody tr:hover { background-color: #f2f7f3; }
.row-actions { gap: 6px; }
.iconbtn { min-height: 31px; padding: 5px 8px; border-color: var(--ui-line-strong); color: #4d5d53; }
.iconbtn:hover { border-color: #b8c9be; background: #f6faf7; }

/* Semantic status colors stay stable throughout the system. */
.badge { border-radius: 999px; font-size: 11px; font-weight: 650; }
.badge.active, .badge.done { color: #216b46; background: #eaf5ee; }
.badge.late, .badge.legal { color: #a7443e; background: #fff0ed; }
.badge.stopped { color: #59665e; background: #eef1ef; }
.cash-stat.in, .cash-income > header, .cash-income-card > header { background: #f1f8f3; }
.cash-stat.out, .cash-withdraw > header { background: #fff5f3; }
.cash-stat.net { background: #f3f6f9; }

/* Dialogs, notifications, and feedback */
.modal-back { z-index: 20; padding: 18px; background: rgba(20, 33, 26, .48); backdrop-filter: blur(3px); }
.modal {
  width: min(680px, 100%);
  max-height: min(92dvh, 900px);
  overflow: auto;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius-lg);
  background: var(--ui-surface);
  box-shadow: 0 20px 55px rgba(20, 36, 25, .18);
}
.modal-title, .modal-foot { background: var(--ui-surface-soft); border-color: var(--ui-line); }
.modal-title { min-height: 58px; padding: 15px 18px; }
.modal-title h2 { color: var(--ui-ink); font-size: 17px; }
.form { padding: 18px; }
.formgrid { gap: var(--ui-space-3); }
.modal-foot { padding: 12px 18px; }
.close { width: 34px; height: 34px; display: grid; place-items: center; color: var(--ui-muted); }
.toast {
  max-width: min(420px, calc(100vw - 32px));
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius-md);
  background: var(--ui-surface);
  color: var(--ui-ink);
  box-shadow: var(--ui-shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 200ms ease, transform 200ms ease, visibility 0s linear 200ms;
}
.toast.is-visible { opacity: 1; visibility: visible; transform: translateY(0); transition-delay: 0s; }
.toast.toast--success { color: #216b46; background: #f1f8f3; border-color: #c9e3d1; }
.toast.toast--error { color: #963f3b; background: #fff4f2; border-color: #efcfcb; }
.toast.toast--warning { color: #805817; background: #fff9ed; border-color: #eadbb8; }
.toast.toast--info { color: var(--ui-ink); background: var(--ui-surface); border-color: var(--ui-line-strong); }
@media (max-width: 560px) {
  .toast { inset-inline: 12px; bottom: max(12px, env(safe-area-inset-bottom)); max-width: none; width: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .toast, .toast.is-visible { transition: none; transform: none; }
}
.notification-panel, .appearance-popover, .global-search-dialog {
  border-color: var(--ui-line);
  border-radius: var(--ui-radius-md);
  box-shadow: var(--ui-shadow-md);
}
.empty, .partner-empty, .fin-empty { color: var(--ui-muted); }

/* Keep vertical page scrolling on the document root and allow nested content
   to pass wheel/trackpad gestures through when it has no vertical scroll. */
html, body { max-width: 100%; }
html { overflow-x: clip; overflow-y: auto; }
body { overflow-x: clip; overflow-y: visible; }
@media (max-width: 850px) {
  .content { padding: 18px 16px 36px; }
  .content > .heading, .content > .fin-heading, .content > .partner-heading {
    align-items: stretch;
    padding: 16px;
  }
  .content > .heading .actions, .content > .fin-heading .actions, .content > .partner-heading .actions,
  .fin-head-actions { gap: 7px; }
  .content > .heading .actions .btn, .content > .fin-heading .actions .btn,
  .content > .partner-heading .actions .btn, .fin-head-actions .btn { min-width: 0; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .modal-back { align-items: flex-start; overflow-y: auto; }
  .modal { max-height: calc(100dvh - 24px); }
}
@media (max-width: 560px) {
  .content { padding: 14px 12px 28px; }
  .content > .heading, .content > .fin-heading, .content > .partner-heading { padding: 14px; }
  .content > .heading h1, .content > .fin-heading h1, .content > .partner-heading h1 { font-size: 21px; }
  .content > .heading .actions, .content > .fin-heading .actions, .content > .partner-heading .actions,
  .fin-head-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .content > .heading .actions .btn, .content > .fin-heading .actions .btn,
  .content > .partner-heading .actions .btn, .fin-head-actions .btn { width: 100%; padding-inline: 8px; font-size: 12px; }
  .cash-summary, .fin-summary, .partner-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .partner-filters, .fin-filters { align-items: stretch; }
  .partner-filters > *, .fin-filters > * { min-width: 0; }
  .form { padding: 14px; }
  .modal-title, .modal-foot { padding-inline: 14px; }
  .modal-back { padding: 8px; }
  .modal { max-height: calc(100dvh - 16px); border-radius: 12px; }
}
@media (max-width: 560px) {
  .income-schedule-field { min-width: 0; }
  #incomeSchedulePreview,
  #incomeScheduleComparison {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--ui-primary, #176b50) var(--ui-line, #e1e8e3);
    padding-bottom: 5px;
  }
  #incomeSchedulePreview table,
  #incomeScheduleComparison table {
    width: max-content;
    min-width: 760px;
  }
  #incomeScheduleComparison table { min-width: 980px; }
  #incomeSchedulePreview th,
  #incomeSchedulePreview td,
  #incomeScheduleComparison th,
  #incomeScheduleComparison td { white-space: nowrap; }
  #incomeSchedulePreview > p:first-child::after,
  #incomeScheduleComparison > p:first-child::after {
    content: "↔ مرّر الجدول أفقيًا لعرض جميع الأعمدة";
    display: block;
    padding-top: 4px;
    color: var(--ui-muted, #66766d);
    font-size: 11px;
  }
  #incomeSchedulePreview::-webkit-scrollbar,
  #incomeScheduleComparison::-webkit-scrollbar { height: 6px; }
  #incomeSchedulePreview::-webkit-scrollbar-thumb,
  #incomeScheduleComparison::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: var(--ui-primary, #176b50);
  }
  #incomeSchedulePreview::-webkit-scrollbar-track,
  #incomeScheduleComparison::-webkit-scrollbar-track {
    border-radius: 999px;
    background: var(--ui-line, #e1e8e3);
  }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

:root[data-app-theme="dark"] {
  color-scheme: dark;
  --ui-ink: #e4ece6;
  --ui-muted: #a0b0a6;
  --ui-line: #304138;
  --ui-line-strong: #405449;
  --ui-bg: #111a16;
  --ui-surface: #1a2620;
  --ui-surface-soft: #202e27;
  --ui-primary-soft: #243b2e;
  --ui-danger: #f09a96;
  --ui-warning: #e7b968;
  --ui-success: #8fd2a9;
}
:root[data-app-theme="dark"] body { background: var(--ui-bg); color: var(--ui-ink); }
:root[data-app-theme="dark"] .content > .heading,
:root[data-app-theme="dark"] .content > .fin-heading,
:root[data-app-theme="dark"] .content > .partner-heading,
:root[data-app-theme="dark"] .stat, :root[data-app-theme="dark"] .fin-card,
:root[data-app-theme="dark"] .cash-stat, :root[data-app-theme="dark"] .partner-stat,
:root[data-app-theme="dark"] .table-wrap, :root[data-app-theme="dark"] .fin-table-card,
:root[data-app-theme="dark"] .cash-ledger, :root[data-app-theme="dark"] .partner-ledger-card,
:root[data-app-theme="dark"] .panel, :root[data-app-theme="dark"] .settings-panel,
:root[data-app-theme="dark"] .barari-person, :root[data-app-theme="dark"] .barari-delivery-card,
:root[data-app-theme="dark"] .overview-panel, :root[data-app-theme="dark"] .reminder-bar,
:root[data-app-theme="dark"] .overview-stats article, :root[data-app-theme="dark"] .settings-intro,
:root[data-app-theme="dark"] .souq-carry-card {
  background: var(--ui-surface); border-color: var(--ui-line); color: var(--ui-ink);
}
:root[data-app-theme="dark"] .table-head, :root[data-app-theme="dark"] .panel-title,
:root[data-app-theme="dark"] .modal-title, :root[data-app-theme="dark"] .modal-foot,
:root[data-app-theme="dark"] th, :root[data-app-theme="dark"] .partner-table th,
:root[data-app-theme="dark"] .fin-table th { background: var(--ui-surface-soft); color: #c5d2c9; border-color: var(--ui-line); }
:root[data-app-theme="dark"] td, :root[data-app-theme="dark"] .partner-table td,
:root[data-app-theme="dark"] .fin-table td, :root[data-app-theme="dark"] .formfield label { color: #d2ded5; }
:root[data-app-theme="dark"] tbody tr:nth-child(even) { background: #1c2a23; }
:root[data-app-theme="dark"] tbody tr:hover { background: #26362d; }
:root[data-app-theme="dark"] .control, :root[data-app-theme="dark"] input.control,
:root[data-app-theme="dark"] select.control, :root[data-app-theme="dark"] textarea.control,
:root[data-app-theme="dark"] .formfield input, :root[data-app-theme="dark"] .formfield select,
:root[data-app-theme="dark"] .formfield textarea { background-color: var(--ui-surface); color: var(--ui-ink); border-color: var(--ui-line-strong); }
:root[data-app-theme="dark"] .cash-stat.in, :root[data-app-theme="dark"] .cash-income > header { background: #1d3427; }
:root[data-app-theme="dark"] .cash-stat.out, :root[data-app-theme="dark"] .cash-withdraw > header { background: #382725; }
:root[data-app-theme="dark"] .cash-stat.net { background: #1d2b35; }
:root[data-app-theme="dark"] .badge.active, :root[data-app-theme="dark"] .badge.done { color: #9ed6b4; background: #233b2d; }
:root[data-app-theme="dark"] .badge.late, :root[data-app-theme="dark"] .badge.legal { color: #f2a5a0; background: #402b29; }

/* Keep account columns readable; use an inner horizontal scroller when needed. */
.installment-sticky-header {
  position: fixed;
  z-index: 2; /* Below the topbar (3) and all dialogs. */
  overflow: hidden;
  pointer-events: none;
  background: var(--ui-surface, #fff);
  box-shadow: 0 2px 4px #00000012;
}
.installment-sticky-header[hidden] { display: none; }
.installment-sticky-header table,
.installment-sticky-header thead,
.installment-sticky-header tr { display: block; border: 0; border-spacing: 0; }
.installment-sticky-header table { border-collapse: separate; }
@media print { .installment-sticky-header { display: none; } }
.installment-accounts-table-scroll {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-y: auto;
  -webkit-overflow-scrolling: touch;
}
/* The inner scroller has no fixed height, so vertical wheel input bubbles to page. */
#listView > .table-wrap { overflow: clip; }
.installment-accounts-table {
  width: max-content;
  min-width: 1700px;
  table-layout: auto;
  border-collapse: collapse;
  direction: rtl;
  font-size: 12px;
}
.installment-accounts-table th,
.installment-accounts-table td {
  box-sizing: border-box;
  padding: 10px 8px;
  border-bottom: 1px solid var(--ui-line);
  border-inline-start: 1px solid color-mix(in srgb, var(--ui-line), transparent 12%);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
  line-height: 1.45;
}
.installment-accounts-table th {
  font-size: 11px;
  line-height: 1.35;
  white-space: normal;
}
.installment-accounts-table th:nth-child(1), .installment-accounts-table td:nth-child(1) { min-width: 52px; }
.installment-accounts-table th:nth-child(2), .installment-accounts-table td:nth-child(2) { min-width: 138px; }
.installment-accounts-table th:nth-child(3), .installment-accounts-table td:nth-child(3) { min-width: 112px; }
.installment-accounts-table th:nth-child(4), .installment-accounts-table td:nth-child(4) { min-width: 112px; }
.installment-accounts-table th:nth-child(5), .installment-accounts-table td:nth-child(5) { min-width: 88px; }
.installment-accounts-table th:nth-child(6), .installment-accounts-table td:nth-child(6) { min-width: 88px; }
.installment-accounts-table th:nth-child(7), .installment-accounts-table td:nth-child(7) { min-width: 56px; }
.installment-accounts-table th:nth-child(8), .installment-accounts-table td:nth-child(8) { min-width: 88px; }
.installment-accounts-table th:nth-child(9), .installment-accounts-table td:nth-child(9) { min-width: 88px; }
.installment-accounts-table th:nth-child(10), .installment-accounts-table td:nth-child(10) { min-width: 88px; }
.installment-accounts-table th:nth-child(11), .installment-accounts-table td:nth-child(11) { min-width: 105px; }
.installment-accounts-table th:nth-child(12), .installment-accounts-table td:nth-child(12) { min-width: 102px; }
.installment-accounts-table th:nth-child(13), .installment-accounts-table td:nth-child(13) { min-width: 95px; }
.installment-accounts-table th:nth-child(14), .installment-accounts-table td:nth-child(14) { min-width: 95px; }
.installment-accounts-table th:nth-child(15), .installment-accounts-table td:nth-child(15) { min-width: 200px; white-space: normal; }
.installment-accounts-table th:nth-child(16), .installment-accounts-table td:nth-child(16) { min-width: 190px; }
.installment-accounts-table th:first-child,
.installment-accounts-table td:first-child { border-inline-start: 0; text-align: center; padding-inline: 3px; }
.installment-accounts-table td:nth-child(2) .person {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.installment-accounts-table td:nth-child(15) .overdue-note {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.45;
}
.installment-accounts-table td:last-child .row-actions {
  display: flex;
  flex-flow: row nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  min-width: max-content;
  white-space: nowrap;
}
.installment-accounts-table td:last-child .iconbtn {
  flex: 0 0 auto;
  min-height: 27px;
  padding: 3px 5px;
  font-size: 11px;
  white-space: nowrap;
}
.installment-accounts-table td:last-child .iconbtn:last-child {
  color: var(--ui-danger);
}
.installment-accounts-table td:last-child .iconbtn:last-child:hover {
  border-color: color-mix(in srgb, var(--ui-danger), white 65%);
  background: color-mix(in srgb, var(--ui-danger), white 94%);
}
