:root {
  font-family: "Segoe UI", Arial, sans-serif;
  color: #142033;
  background: #f2f3f4;
  font-size: 15px;
  --brand: #4b275b;
  --line: #dde2e7;
  --muted: #657080;
  --surface: #fff;
  --pale: #f0eaf3;
}

* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  touch-action: manipulation;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}
a {
  color: var(--brand);
}
button,
input,
select,
textarea {
  border: 1px solid #bac5ce;
  border-radius: 5px;
}
button {
  background: #fff;
  color: #3f1c4f;
  padding: 10px 15px;
  min-height: 42px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
button:hover:not(:disabled) {
  background: #efe9f2;
  border-color: var(--brand);
}
button.primary {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}
button.primary:hover:not(:disabled) {
  background: #3a1949;
}
button.icon {
  padding: 8px;
  min-width: 40px;
}
button.text {
  border: 0;
  background: transparent;
  padding: 6px;
  color: var(--brand);
}
input,
select,
textarea {
  background: #fff;
  color: inherit;
  padding: 10px 12px;
  min-height: 42px;
  max-width: 100%;
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--brand);
}
:focus-visible {
  outline: 3px solid #e0a72a;
  outline-offset: 3px;
}
svg.icon {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.skip {
  position: fixed;
  top: -100px;
  left: 15px;
  z-index: 1000;
  background: #fff;
  padding: 12px;
}
.skip:focus {
  top: 8px;
}
.layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  background: #fcfcfc;
  border-right: 1px solid var(--line);
  padding: 24px 12px 16px;
  position: fixed;
  width: 250px;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
  overflow: auto;
  z-index: 20;
}
.brand {
  font-size: 20px;
  font-weight: 750;
  letter-spacing: -0.6px;
  padding: 0 8px 20px;
}
.club {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  padding: 13px 10px;
  margin-bottom: 16px;
  border-radius: 5px;
  font-size: 14px;
  min-height: 50px;
}
.club span {
  overflow: hidden;
  text-overflow: ellipsis;
}
.club svg {
  color: var(--brand);
}
.sidebar nav {
  flex: 1;
}
.nav-title {
  color: var(--muted);
  font-size: 12px;
  margin: 24px 12px 7px;
  font-weight: 650;
}
.nav-link {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 11px 14px;
  text-decoration: none;
  color: #1b2738;
  border-radius: 5px;
  margin: 2px 0;
  min-height: 44px;
}
.nav-link:hover {
  background: #ece9ed;
}
.nav-link.active {
  background: var(--brand);
  color: #fff;
  font-weight: 600;
}
.sidebar-bottom {
  border-top: 1px solid var(--line);
  margin-top: 24px;
  padding-top: 12px;
}
.workspace {
  grid-column: 2;
  min-width: 0;
}
.topbar {
  height: 72px;
  background: #fbfbfc;
  border-bottom: 1px solid var(--line);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.global-search {
  flex: 1;
  position: relative;
}
.global-search input {
  width: 100%;
  padding-left: 42px;
}
.global-search svg {
  position: absolute;
  top: 11px;
  left: 13px;
  color: var(--muted);
}
.profile {
  border: 0;
  padding: 0;
  background: none;
  min-width: 40px;
}
.avatar {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  background: var(--brand);
  color: #fff;
  border-radius: 50%;
  font-weight: 650;
}
.mobile-menu {
  display: none;
}
main {
  padding: 24px;
  max-width: 1740px;
  margin: auto;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 22px;
}
h1 {
  font-size: 34px;
  line-height: 1.2;
  letter-spacing: -1px;
  margin: 0 0 8px;
  font-weight: 750;
}
h2 {
  font-size: 19px;
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.3px;
}
h3 {
  font-size: 16px;
  margin: 0 0 12px;
}
.muted {
  color: var(--muted);
}
.subtitle {
  color: var(--muted);
  margin: 0;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 550;
  white-space: nowrap;
  background: #edf0f3;
  color: #495567;
}
.badge.good {
  background: #eee5f2;
  color: #471f59;
}
.badge.warn {
  background: #fff0d5;
  color: #865200;
}
.badge.private {
  border: 1px solid #cdbad5;
  background: #f4edf7;
  color: #4e2460;
}
.metric-strip {
  background: white;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 22px 12px;
  margin-bottom: 18px;
}
.metric {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 0 18px;
  border-right: 1px solid var(--line);
}
.metric:last-child {
  border-right: 0;
}
.metric-icon {
  background: #f3eff5;
  color: var(--brand);
  padding: 12px;
  border-radius: 9px;
}
.metric-icon svg {
  width: 25px;
  height: 25px;
}
.metric-name {
  font-size: 13px;
  margin: 2px 0 8px;
}
.metric-value {
  font-weight: 750;
  font-size: 27px;
  letter-spacing: -0.7px;
  white-space: nowrap;
}
.metric small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
}
.action-strip {
  background: white;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 17px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.action-strip h2 {
  margin-right: auto;
}
.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(260px, 1fr);
  gap: 18px;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}
.panel-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  flex-wrap: wrap;
}
.panel-heading h2 {
  margin-right: auto;
}
.panel-body {
  padding: 0 20px 20px;
}
.table-wrap {
  overflow: auto;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}
.data-table th {
  background: #edf0f3;
  color: #344152;
  font-weight: 600;
  white-space: nowrap;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
.data-table th button {
  padding: 0;
  min-height: auto;
  background: none;
  border: 0;
  color: inherit;
  display: inline;
  font-weight: 600;
}
.data-table td {
  padding: 14px;
  border-bottom: 1px solid #e7ebee;
  vertical-align: middle;
  max-width: 350px;
  overflow-wrap: anywhere;
}
.data-table tbody tr:last-child td {
  border-bottom: 0;
}
.data-table tbody tr:hover {
  background: #f8f5f9;
}
.data-table td.amount {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.positive {
  color: #4c215f;
}
.negative {
  color: #a82121;
}
.small-text {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}
.task-row {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 17px 2px;
  text-align: left;
  color: inherit;
  font-weight: 400;
  justify-content: flex-start;
}
.task-row:last-child {
  border-bottom: 0;
}
.task-row > svg:first-child {
  color: var(--brand);
}
.task-row > svg:last-child {
  margin-left: auto;
  width: 16px;
}
.count-pill {
  background: #fff0d5;
  color: #865200;
  min-width: 30px;
  text-align: center;
  padding: 4px 8px;
  border-radius: 20px;
  font-weight: 700;
}
.event {
  padding: 15px 0;
  display: flex;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}
.event-date {
  font-weight: 700;
  background: #f4f1f6;
  min-width: 48px;
  border-radius: 6px;
  text-align: center;
  padding: 6px;
  font-size: 16px;
}
.event-date small {
  display: block;
  font-weight: 400;
  font-size: 11px;
}
.event strong {
  font-size: 14px;
}
.event p {
  margin: 5px 0 0;
  font-size: 12px;
  color: var(--muted);
}
.empty {
  padding: 30px 16px;
  text-align: center;
  color: var(--muted);
  line-height: 1.65;
  font-size: 14px;
}
.notice {
  background: #f4f0f6;
  color: #52385e;
  border-left: 3px solid #7a4d8e;
  padding: 12px 16px;
  font-size: 13px;
  line-height: 1.55;
  margin: 0 0 18px;
}
.notice.warning {
  border-color: #bc8524;
  background: #fff7e8;
  color: #765010;
}
.toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.toolbar input[type="search"] {
  min-width: 200px;
  flex: 1;
}
.toolbar label {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  gap: 6px;
  align-items: center;
}
.toolbar .spacer {
  flex: 1;
}
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
  overflow: auto;
}
.tab {
  border: 0;
  border-radius: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  white-space: nowrap;
  color: #5d6878;
}
.tab.active {
  border-color: var(--brand);
  color: var(--brand);
  font-weight: 700;
}
.pagination {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}
.pagination > div {
  display: flex;
  gap: 8px;
}
.footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 11px;
  margin: 18px 2px;
}
.chart {
  height: 200px;
  display: flex;
  align-items: stretch;
  padding: 12px 20px 22px;
  gap: 14px;
}
.chart-scale {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-size: 10px;
  color: var(--muted);
  padding-bottom: 24px;
}
.chart-bars {
  flex: 1;
  display: flex;
  justify-content: space-around;
  gap: 15px;
  border-bottom: 1px solid var(--line);
  background: repeating-linear-gradient(
    to top,
    transparent,
    transparent 39px,
    #f0edf2 40px
  );
}
.bar-group {
  flex: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 5px;
  position: relative;
  padding: 0 5px;
  max-width: 100px;
}
.bar {
  width: 35%;
  background: var(--brand);
  min-height: 1px;
}
.bar.out {
  background: #bfaec6;
}
.bar-label {
  position: absolute;
  bottom: -22px;
  font-size: 11px;
  color: var(--muted);
}
.legend {
  font-size: 11px;
  color: var(--muted);
  display: flex;
  gap: 16px;
}
.dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brand);
  margin-right: 5px;
}
.dot.out {
  background: #bfaec6;
}
.account-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}
.account-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 18px;
  text-align: left;
  color: inherit;
  display: block;
  font-weight: 400;
}
.account-card.selected {
  border: 2px solid var(--brand);
  padding: 17px;
  background: #faf7fb;
}
.account-card .metric-value {
  margin: 12px 0 8px;
}
.details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.detail-item {
  padding: 0 0 12px;
  border-bottom: 1px solid var(--line);
  min-width: 0;
}
.detail-item dt {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}
.detail-item dd {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.error-banner {
  padding: 16px;
  border: 1px solid #ebc5c3;
  background: #fff5f4;
  color: #8b2823;
  border-radius: 5px;
  margin: 12px 0;
  line-height: 1.6;
}
.loading {
  padding: 50px;
  color: var(--muted);
  text-align: center;
}
.initial {
  padding: 50px;
  text-align: center;
}
.spinner {
  width: 22px;
  height: 22px;
  display: inline-block;
  border: 2px solid #dcd0e2;
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-right: 10px;
  vertical-align: middle;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 30px;
  background: #f1eef3;
}
.login-card {
  width: min(460px, 100%);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 32px;
}
.login-card h1 {
  font-size: 29px;
}
.login-card p {
  color: var(--muted);
  line-height: 1.6;
}
.login-card .primary {
  width: 100%;
  margin: 18px 0;
}
.login-card details {
  border-top: 1px solid var(--line);
  padding-top: 18px;
}
.login-card summary {
  cursor: pointer;
  color: var(--brand);
}
.login-card label {
  display: block;
  margin: 14px 0;
  font-size: 13px;
}
.login-card input {
  display: block;
  width: 100%;
  margin-top: 7px;
}
.login-foot {
  font-size: 12px;
}
dialog {
  width: min(780px, calc(100vw - 30px));
  max-height: 90vh;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0;
  box-shadow: 0 20px 70px #10243230;
  color: inherit;
}
dialog::backdrop {
  background: #10243266;
}
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: white;
  z-index: 2;
}
.dialog-body {
  padding: 24px;
}
.dialog-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 17px 24px;
  border-top: 1px solid var(--line);
  background: #fbfafb;
  position: sticky;
  bottom: 0;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 17px;
}
.form-grid label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 13px;
}
.form-grid .full {
  grid-column: 1/-1;
}
.form-grid textarea {
  min-height: 95px;
  resize: vertical;
}
.dialog-note {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}
.preview-list {
  margin: 0;
}
.preview-list dt {
  font-size: 12px;
  color: var(--muted);
  margin-top: 16px;
}
.preview-list dd {
  margin: 6px 0;
  white-space: pre-wrap;
}
#toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  max-width: 480px;
  background: #3f1c4e;
  color: #fff;
  border-radius: 6px;
  padding: 14px 22px;
  box-shadow: 0 5px 25px #14203325;
  z-index: 100;
  display: none;
}
#toast.visible {
  display: block;
}
.compact .data-table td {
  padding: 8px 14px;
}
.status-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.status-grid section {
  padding: 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.status-grid p {
  line-height: 1.7;
  font-size: 14px;
}
.search-hint {
  font-size: 12px;
  color: var(--muted);
  margin-top: 12px;
}
@media (min-width: 1600px) {
  main {
    padding: 32px;
  }
  .metric-value {
    font-size: 31px;
  }
  .metric-name {
    font-size: 14px;
  }
  .data-table {
    font-size: 14px;
  }
  .nav-link {
    padding: 13px 14px;
  }
}
@media (max-width: 1200px) {
  .layout {
    grid-template-columns: 220px minmax(0, 1fr);
  }
  .sidebar {
    width: 220px;
  }
  .brand {
    font-size: 18px;
  }
  .metric {
    padding: 0 10px;
    gap: 8px;
  }
  .metric-icon {
    display: none;
  }
  .metric-value {
    font-size: 24px;
  }
  .dashboard-grid {
    grid-template-columns: minmax(0, 1fr) 280px;
  }
  .panel-heading {
    padding: 16px;
  }
  .action-strip h2 {
    width: 100%;
  }
}
@media (max-width: 950px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .stack.side {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .metric-strip {
    grid-template-columns: 1fr 1fr;
    gap: 22px 0;
  }
  .metric:nth-child(2) {
    border-right: 0;
  }
  .topbar {
    padding: 12px 18px;
  }
  main {
    padding: 22px 18px;
  }
  .metric-icon {
    display: block;
  }
  .metric-value {
    font-size: 26px;
  }
}
@media (max-width: 700px) {
  .layout {
    display: block;
  }
  .sidebar {
    transform: translateX(-100%);
    width: 250px;
    box-shadow: 15px 0 50px #14203315;
    transition: transform 0.15s;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .workspace {
    display: block;
  }
  .mobile-menu {
    display: flex;
  }
  .topbar {
    gap: 9px;
    height: 64px;
  }
  .global-search input {
    font-size: 13px;
  }
  .profile {
    display: none;
  }
  main {
    padding: 20px 12px;
  }
  h1 {
    font-size: 28px;
  }
  .page-heading {
    gap: 8px;
  }
  .badge.private {
    font-size: 10px;
    padding: 5px;
  }
  .metric-strip {
    padding: 18px 5px;
  }
  .metric-icon {
    display: none;
  }
  .metric {
    padding: 0 12px;
  }
  .metric-value {
    font-size: 24px;
  }
  .metric-name {
    font-size: 12px;
  }
  .metric small {
    font-size: 10px;
  }
  .stack.side {
    display: flex;
  }
  .action-strip {
    padding: 15px;
  }
  .action-strip button {
    flex: 1;
    font-size: 12px;
  }
  .toolbar {
    align-items: stretch;
  }
  .toolbar label {
    flex: 1;
  }
  .toolbar input[type="date"] {
    width: 145px;
  }
  .details,
  .status-grid {
    grid-template-columns: 1fr;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-grid .full {
    grid-column: auto;
  }
  .dialog-body {
    padding: 18px;
  }
  .dialog-head {
    padding: 16px 18px;
  }
  .dialog-foot {
    padding: 12px 18px;
  }
  .footer {
    flex-wrap: wrap;
  }
  .login-card {
    padding: 24px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

.stack,
.panel,
.global-search {
  min-width: 0;
}
.tabs .tab {
  display: inline-flex;
  text-decoration: none;
  padding: 11px 15px;
}
.task-row {
  white-space: normal;
}
.legend {
  flex-wrap: wrap;
}
@media (max-width: 950px) {
  .dashboard-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.form-grid label.checkbox-label {
  flex-direction: row;
  align-items: center;
  align-self: end;
  padding: 10px 0;
}
.checkbox-label input {
  min-height: auto;
  width: 18px;
  height: 18px;
}
.dialog-body textarea[name="Text"] {
  min-height: 240px;
}
.filter-panel {
  margin-bottom: 18px;
  border: 1px solid var(--line);
  padding: 14px;
  background: white;
  border-radius: 7px;
}
.filter-panel summary {
  cursor: pointer;
  font-weight: 600;
}
.filter-row {
  display: flex;
  gap: 10px;
  align-items: end;
  flex-wrap: wrap;
  margin: 15px 0;
}
.filter-row label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12px;
  flex: 1;
  min-width: 130px;
}
.filter-row label[hidden] {
  display: none;
}
.filter-row input,
.filter-row select,
.sort-controls select {
  max-width: 100%;
  min-width: 0;
  width: 100%;
}
.list-summary {
  margin-top: 22px;
}
.summary-totals {
  display: flex;
  gap: 12px 28px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  font-size: 14px;
}
.summary-table {
  max-height: 360px;
  overflow: auto;
}
.document-dialog {
  width: min(1100px, 95vw);
  max-width: 95vw;
}
.workflow-dialog {
  width: min(1100px, 95vw);
  max-width: 95vw;
}
.workflow-dialog .dialog-body {
  max-height: 73vh;
  overflow: auto;
}
.workflow-dialog .dialog-foot {
  flex-wrap: wrap;
}
.workflow-chain {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 14px;
  margin-bottom: 16px;
  background: #f3eef5;
  color: var(--brand);
  font-weight: 600;
}
.workflow-dialog h3 {
  margin-top: 25px;
}
.workflow-dialog .details {
  margin-bottom: 24px;
}
.recon-amount-label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 280px;
  font-weight: 600;
}
#recon-picker .table-wrap {
  max-height: 45vh;
  overflow: auto;
}
#recon-picker .badge {
  margin-right: 8px;
}
@media (max-width: 600px) {
  .workflow-dialog .dialog-body {
    padding: 12px;
  }
  .workflow-dialog .details {
    grid-template-columns: 1fr;
  }
  .workflow-dialog .dialog-foot button {
    white-space: normal;
  }
}
.document-dialog .dialog-body {
  max-height: 78vh;
  overflow: auto;
}
.document-dialog .dialog-head h2 {
  overflow-wrap: anywhere;
}
.pdf-surface {
  background: #ece8ee;
  padding: 12px;
  overflow: auto;
  min-height: 200px;
}
#pdf-canvas {
  display: block;
  margin: auto;
  box-shadow: 0 2px 8px #0002;
}
.document-image {
  display: block;
  max-width: 100%;
  margin: auto;
}
.document-text,
#pdf-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 55vh;
  overflow: auto;
}
.pdf-controls {
  position: sticky;
  top: 0;
  background: white;
  padding: 8px 0;
  z-index: 1;
}
.document-dialog details {
  margin: 16px 0;
}
#report-chart .chart-bars {
  overflow-x: auto;
}
#report-chart .bar-group {
  min-width: 48px;
}
@media (max-width: 600px) {
  .filter-row {
    border-bottom: 1px solid var(--line);
    padding-bottom: 15px;
  }
  .filter-row label {
    min-width: 100%;
  }
  .sort-controls label,
  .toolbar label {
    max-width: 100%;
    flex-wrap: wrap;
  }
  .document-dialog .dialog-body {
    padding: 10px;
  }
  .document-dialog .dialog-foot {
    flex-wrap: wrap;
  }
}

/* Daily work: clear hierarchy, generous touch targets and tools on demand. */
:root {
  --muted: #536171;
  --line: #e1d8e5;
  background: #f6f3f7;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 17px;
  letter-spacing: -0.35px;
  padding: 0 9px 22px;
}
.brand small {
  display: block;
  font-size: 11px;
  letter-spacing: 0;
  font-weight: 500;
  color: var(--muted);
  margin-top: 5px;
}
.brand-symbol {
  width: 37px;
  height: 42px;
  display: grid;
  place-items: center;
  background: var(--brand);
  color: white;
  border-radius: 10px 10px 16px 5px;
  flex-shrink: 0;
}
.brand-symbol svg {
  width: 23px;
  height: 23px;
}
.connection-indicator {
  display: flex;
  gap: 7px;
  align-items: center;
  white-space: nowrap;
  font-size: 11px;
  color: #50305e;
}
.connection-indicator i {
  width: 7px;
  height: 7px;
  border-radius: 100%;
  background: #68387e;
}
.command-trigger {
  font-size: 12px;
  white-space: nowrap;
  gap: 7px;
}
kbd {
  font: inherit;
  font-size: 11px;
  padding: 2px 5px;
  border: 1px solid #d6cadb;
  border-radius: 4px;
  background: #f8f6f9;
  white-space: nowrap;
}
.sidebar-scrim {
  position: fixed;
  inset: 0;
  background: #14203366;
  border: 0;
  border-radius: 0;
  z-index: 19;
}
.sidebar-scrim[hidden] {
  display: none;
}
.navigation-open {
  overflow: hidden;
}
.list-workspace {
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  min-width: 0;
}
.list-toolbar {
  margin: 0;
  padding: 17px 18px 12px;
  gap: 8px;
}
.list-toolbar button,
.list-toolbar summary {
  font-size: 12px;
}
.list-search {
  position: relative;
  flex: 1 1 240px;
  min-width: 160px;
}
.list-search svg {
  position: absolute;
  left: 12px;
  top: 12px;
  width: 17px;
  height: 17px;
  color: var(--muted);
  pointer-events: none;
}
.list-search input[type="search"] {
  width: 100%;
  min-width: 0;
  padding-left: 37px;
  background: #f9f7fa;
}
.toolbar-space {
  flex: 1 0 0;
}
.list-viewbar {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 0 18px 13px;
}
.list-order-note,
.view-count {
  font-size: 11px;
  color: var(--muted);
}
.quick-views {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.quick-views button {
  border-color: transparent;
  min-height: 35px;
  padding: 7px 10px;
  font-size: 12px;
  color: #465563;
  gap: 8px;
}
.quick-views button[aria-pressed="true"] {
  background: #f0e9f3;
  color: #3b1a49;
  border-color: #d1bfd9;
  font-weight: 700;
}
.quick-views button span {
  font-variant-numeric: tabular-nums;
  background: #f0edf2;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 10px;
  color: #465563;
}
.quick-views button[aria-pressed="true"] span {
  background: white;
  color: #3b1a49;
}
.export-menu {
  position: relative;
}
.export-menu > summary {
  cursor: pointer;
  border: 1px solid #bac5ce;
  border-radius: 5px;
  padding: 11px 13px;
  color: #3f1c4f;
  min-height: 42px;
  white-space: nowrap;
  list-style: none;
  font-weight: 600;
}
.export-menu > summary::after {
  content: "⌄";
  margin-left: 8px;
}
.export-menu > div {
  position: absolute;
  z-index: 11;
  top: calc(100% + 6px);
  right: 0;
  width: 265px;
  padding: 16px;
  background: white;
  border: 1px solid var(--line);
  box-shadow: 0 8px 25px #14203320;
  border-radius: 8px;
}
.export-menu label {
  display: grid;
  gap: 7px;
  color: #263b4a;
  font-size: 12px;
}
.export-menu select {
  width: 100%;
}
.export-menu button {
  width: 100%;
  margin-top: 10px;
}
.export-menu p {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 0;
}
.list-workspace .filter-panel {
  margin: 0 18px 16px;
  background: #faf7fb;
}
.list-workspace .filter-panel:not([open]) {
  display: none;
}
.filter-panel > summary {
  font-size: 13px;
}
.filter-panel .sort-controls {
  margin-top: 14px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--line);
}
#active-filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 0 18px;
}
#active-filters:not(:empty) {
  padding-bottom: 12px;
}
.filter-chip {
  font-size: 11px;
  font-weight: 500;
  padding: 5px 8px;
  min-height: 30px;
  background: #f6f2f8;
  color: #492858;
  border-color: #ddd1e2;
  gap: 7px;
}
.filter-chip svg {
  width: 12px;
  height: 12px;
}
.records-panel {
  border: 0;
  border-radius: 0 0 10px 10px;
  box-shadow: none;
}
#records .table-wrap {
  border-top: 1px solid var(--line);
}
#records th {
  background: #f6f3f8;
  padding-top: 11px;
  padding-bottom: 11px;
}
#records td {
  padding-top: 15px;
  padding-bottom: 15px;
  font-size: 13px;
  vertical-align: middle;
}
#records tbody tr {
  cursor: pointer;
  transition: background 0.1s;
}
#records tbody tr:hover {
  background: #f7f3f9;
}
#records tbody tr:focus-within {
  background: #f4edf7;
}
.member-identity {
  display: flex;
  align-items: center;
  gap: 11px;
}
.member-identity > span:last-child {
  display: grid;
  gap: 3px;
}
.member-identity strong {
  font-size: 13px;
  color: #2e1738;
}
.member-identity small {
  font-size: 10px;
  color: var(--muted);
}
.initials {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #f0eaf3;
  color: #573069;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 650;
  flex-shrink: 0;
}
.state-badge {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  border: 1px solid #e3d8e8;
  border-radius: 5px;
  padding: 4px 7px;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 600;
  color: #5b4067;
  background: #f8f6f9;
}
.state-badge i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}
.state-badge.good {
  background: #f3edf6;
  border-color: #d7c6df;
  color: #4f2860;
}
.state-badge.pending {
  background: #fff8e9;
  border-color: #ead7a9;
  color: #795415;
}
.state-badge.muted {
  background: #f0f2f4;
  border-color: #d6dce1;
  color: #5c6470;
}
.money-value {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  font-weight: 600;
}
.money-value.negative {
  color: #9a3d37;
}
.money-value.positive {
  color: #512863;
}
.file-link {
  border: 0;
  background: transparent;
  padding: 2px 0;
  min-height: 32px;
  max-width: 360px;
  text-align: left;
  justify-content: start;
  color: #431d54;
  font-weight: 600;
}
.file-link svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.file-link span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.list-summary > summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  padding: 18px 20px;
  cursor: pointer;
  list-style: none;
}
.list-summary > summary strong {
  font-size: 13px;
}
.list-summary > summary small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 5px;
}
.summary-toggle {
  font-size: 11px;
  color: var(--brand);
  white-space: nowrap;
}
.summary-toggle::after {
  content: " ⌄";
}
.list-summary[open] > summary {
  border-bottom: 1px solid var(--line);
}
.list-summary[open] .summary-toggle::after {
  content: " ⌃";
}
.list-summary .panel-body {
  padding-top: 20px;
}
.period-presets {
  display: inline-flex;
  gap: 3px;
  padding: 4px;
  background: #eee8f0;
  border-radius: 7px;
  flex-wrap: wrap;
}
.period-presets button {
  font-size: 11px;
  min-height: 31px;
  padding: 6px 10px;
  border: 1px solid transparent;
  background: transparent;
  color: #594263;
}
.period-presets button[aria-pressed="true"] {
  background: white;
  border-color: #d8cbde;
  color: #3d1b4c;
}
.empty-symbol {
  display: block;
  font-size: 30px;
  color: #8d7199;
  margin: 0 auto 10px;
}
.empty strong {
  display: block;
  color: #40274b;
}
.empty p {
  margin: 9px auto;
  max-width: 50ch;
}
.editor-section {
  grid-column: 1/-1;
  min-width: 0;
  border: 0;
  border-top: 1px solid var(--line);
  padding: 15px 0 0;
  margin: 0 0 10px;
}
.editor-section legend {
  font-weight: 650;
  font-size: 13px;
  padding: 0 12px 0 0;
  color: #3e2649;
}
.editor-section > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.column-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  max-height: 55vh;
  overflow: auto;
}
.column-options label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 5px;
  font-size: 13px;
}
.column-options label:hover {
  background: #f3edf5;
}
.column-options input {
  width: 17px;
  height: 17px;
  min-height: 0;
}
#columns-error {
  color: #9a3d37;
  font-size: 13px;
}
.command-dialog {
  width: min(620px, 94vw);
}
.command-label {
  display: grid;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}
#command-search {
  font-size: 16px;
  min-height: 48px;
}
#command-results {
  margin-top: 12px;
  max-height: 45vh;
  overflow: auto;
  display: grid;
  gap: 3px;
}
#command-results button {
  border-color: transparent;
  justify-content: start;
  gap: 12px;
  text-align: left;
  padding: 12px;
  color: #3f254a;
}
#command-results button[aria-selected="true"] {
  background: #f1eaf4;
  border-color: #d5c4dc;
}
#command-results button > span:nth-child(2) {
  display: grid;
  gap: 3px;
  flex: 1;
}
#command-results button small {
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
}
#command-results button > span:last-child {
  font-size: 12px;
  color: var(--muted);
}
.help-copy {
  font-size: 15px;
  line-height: 1.7;
  max-width: 65ch;
}
.shortcut-list {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 13px;
  align-items: center;
  font-size: 13px;
}
.shortcut-list dd {
  margin: 0;
}
#toast[data-tone="error"] {
  background: #853e39;
}
#toast[data-tone="success"] {
  background: #4a225c;
}
@media (max-width: 1200px) {
  .connection-indicator {
    display: none;
  }
  .command-trigger kbd {
    display: none;
  }
  .list-order-note {
    display: none;
  }
}
@media (max-width: 950px) {
  .command-trigger span {
    display: none;
  }
  .sidebar-scrim {
    display: block;
  }
  .sidebar-scrim[hidden] {
    display: none;
  }
}
@media (max-width: 600px) {
  .topbar {
    gap: 7px !important;
    padding: 10px 12px !important;
  }
  .command-trigger {
    padding: 8px;
    min-width: 38px;
  }
  .topbar .profile {
    display: none;
  }
  .list-toolbar {
    padding: 12px;
  }
  .list-search {
    flex-basis: 100%;
  }
  .toolbar-space {
    display: none;
  }
  .list-viewbar {
    padding: 0 12px 10px;
  }
  .quick-views {
    gap: 2px;
  }
  .quick-views button {
    font-size: 11px;
    padding: 6px 8px;
  }
  .list-workspace .filter-panel {
    margin: 0 10px 12px;
  }
  #active-filters {
    padding-left: 10px;
    padding-right: 10px;
  }
  .list-summary > summary {
    padding: 15px;
  }
  .summary-toggle {
    white-space: normal;
    text-align: right;
  }
  .column-options,
  .editor-section > div {
    grid-template-columns: 1fr;
  }
  .file-link {
    max-width: 220px;
  }
  #records .data-table {
    min-width: 680px;
  }
  #records .data-table td {
    overflow-wrap: normal;
  }
  .period-presets {
    max-width: 100%;
  }
  .global-search {
    min-width: 0;
  }
  .global-search input {
    font-size: 12px;
  }
  .command-dialog .dialog-body {
    padding: 15px;
  }
}

/* Vereinsfarben aus dem freigegebenen Vereinsauftritt. */
:root {
  --brand: #4b275b;
  --accent: #c21051;
  --pale: #f4f0f6;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline-color: var(--accent);
}
.brand-symbol {
  background: var(--brand);
}
.nav-link.active {
  box-shadow: inset 3px 0 var(--accent);
}
.quick-views button[aria-pressed="true"] {
  border-color: #c5b0ce;
  background: #f4f0f6;
  color: var(--brand);
}
.filter-mode-note {
  font-size: 12px;
  color: var(--muted);
}
.export-menu small {
  font-size: 11px;
  line-height: 1.5;
  color: var(--muted);
  display: block;
}
