/* MARY online directory: inherits the existing account/auth visual system. */
.account-directory { margin-block-start: 32px; padding-block-start: 24px; border-block-start: 1px solid var(--login-border); }
.account-directory h2 { margin: 0 0 8px; font-size: 24px; line-height: 1.5; }
.directory-help { color: var(--login-muted); font-size: 15px; line-height: 1.8; overflow-wrap: anywhere; margin: 8px 0 16px; }
.account-directory .login-form { max-width: 380px; }
.directory-sections { display: flex; flex-wrap: wrap; gap: 8px; padding-block: 16px; }
.directory-section { min-height: 48px; padding: 10px 18px; border: 1px solid var(--login-border); border-radius: 8px; background: transparent; color: var(--login-primary); font: inherit; font-weight: 700; cursor: pointer; touch-action: manipulation; }
.directory-section[aria-current="page"] { background: var(--login-primary); color: #fff; border-color: var(--login-primary); }
.directory-section:hover:not(:disabled):not([aria-current]) { background: var(--login-ground); }
.directory-heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 20px; }
.directory-heading h3 { margin: 12px 0; font-size: 22px; }
.directory-heading p { margin: 0; }
.directory-tools { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin: 12px 0 20px; }
.directory-tools > div { flex: 1 1 220px; min-width: 0; }
.directory-tools label, .directory-field label { display: block; margin-block-end: 8px; font-size: 15px; font-weight: 700; }
.directory-tools input, .directory-field input, .directory-field select { width: 100%; min-width: 0; min-height: 48px; padding: 10px 12px; border: 1px solid var(--login-border); border-radius: 8px; color: var(--login-text); background: #fff; font: inherit; font-size: 16px; }
.directory-row { display: flex; align-items: start; justify-content: space-between; gap: 16px; padding-block: 20px; border-block-end: 1px solid var(--login-border); }
.directory-row > div { flex: 1 1 auto; min-width: 0; }
.directory-row h4 { font-size: 19px; line-height: 1.7; overflow-wrap: anywhere; margin: 0 0 8px; }
.directory-row p { color: var(--login-muted); margin: 4px 0; font-size: 15px; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.directory-row button { flex: 0 0 auto; }
.directory-pagination, .directory-editor-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-block-start: 20px; }
.directory-editor { border-block-start: 1px solid var(--login-border); margin-block-start: 24px; padding-block: 24px; }
.directory-editor h3 { margin: 0 0 20px; font-size: 22px; }
.directory-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; }
.directory-field { min-width: 0; }
.directory-field small { display: block; color: var(--login-muted); font-size: 14px; margin-block-start: 4px; }
.directory-recovery { margin-block-start: 24px; border-block-start: 1px solid var(--login-border); padding-block: 12px; }
.directory-recovery summary { min-height: 48px; padding-block: 12px; cursor: pointer; font-weight: 700; }
.directory-receipt { padding-block: 16px; border-block-end: 1px solid var(--login-border); overflow-wrap: anywhere; }
.directory-receipt p { margin: 4px 0; font-size: 15px; }
.directory-receipt button { margin-inline-end: 12px; margin-block-start: 12px; }
.directory-lock { margin-block-start: 20px; }
.financial-reference > span { display: block; font-weight: 700; font-size: 15px; }
.financial-reference-value { color: var(--login-text); margin: 8px 0; overflow-wrap: anywhere; }
.financial-wide { grid-column: 1 / -1; }
.financial-lines { margin-block: 24px 16px; }
.financial-line { min-width: 0; margin: 0; padding: 20px 0; border: 0; border-block-end: 1px solid var(--login-border); }
.financial-line legend { padding: 0; font-weight: 700; font-size: 19px; }
.financial-line .directory-fields { margin-block: 16px; }
.financial-line p { overflow-wrap: anywhere; }
.financial-total { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.financial-picker { margin-block: 24px; padding-block: 20px; border-block: 1px solid var(--login-border); }
.financial-picker h4 { margin: 0 0 12px; font-size: 19px; }
.financial-picker-rows { display: grid; grid-template-columns: minmax(0,1fr); gap: 8px; }
.financial-picker-rows button { min-width: 0; text-align: start; overflow-wrap: anywhere; }
.financial-reference button { min-height: 48px; }
.report-filters { margin-block: 24px; align-items: start; }
.report-filters .directory-editor-actions { margin: 0; }
.report-result { margin-block-start: 32px; }
.report-result h3 { margin: 0 0 16px; font-size: 22px; }
.report-metadata { color: var(--login-muted); font-size: 14px; line-height: 1.8; overflow-wrap: anywhere; }
.report-metadata p { margin: 4px 0; }
.report-metrics { margin-block: 24px; }
.report-metrics h4 { margin: 0 0 12px; font-size: 18px; }
.report-totals { margin: 0; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 24px; }
.report-totals > div { min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; border-block-end: 1px solid var(--login-border); padding-block: 12px; }
.report-totals dt { color: var(--login-muted); font-size: 15px; }
.report-totals dd { margin: 0; font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.report-table { width: 100%; border-collapse: collapse; table-layout: fixed; margin-block: 24px; font-size: 14px; font-variant-numeric: tabular-nums; }
.report-table caption { text-align: start; font-size: 18px; font-weight: 700; margin-block-end: 12px; }
.report-table th, .report-table td { padding: 12px 8px; text-align: start; vertical-align: top; border-block-end: 1px solid var(--login-border); overflow-wrap: anywhere; }
.report-table thead th { color: var(--login-primary); }
.report-table tbody th { font-weight: 600; }
@media (max-width: 600px) {
 .report-totals { grid-template-columns: minmax(0,1fr); }
 .report-table, .report-table tbody { display: block; }
 .report-table caption { display: block; width: 100%; }
 .report-table thead { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); }
 .report-table tbody tr { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; padding-block: 16px; border-block-end: 1px solid var(--login-border); }
 .report-table tbody th, .report-table tbody td { display: block; border: 0; padding: 0; min-width: 0; }
 .report-table tbody th { grid-column: 1 / -1; }
 .report-table tbody th::before, .report-table tbody td::before { content: attr(data-label); display: block; color: var(--login-muted); font-size: 13px; font-weight: 400; margin-block-end: 4px; }
}
@media print {
 body.mary-report-print .topbar, body.mary-report-print footer, body.mary-report-print #userAccountPanel > :not(#accountReports), body.mary-report-print #accountReports > :not(h2):not(#reportsWorkspace), body.mary-report-print #reportsWorkspace > :not(#reportsResult), body.mary-report-print .report-output, body.mary-report-print #reportsPagination { display: none !important; }
 body.mary-report-print, body.mary-report-print .login-main, body.mary-report-print .login-panel, body.mary-report-print #accountReports { margin: 0; padding: 0; max-width: none; border: 0; box-shadow: none; background: white; color: black; }
 body.mary-report-print .report-table { break-inside: auto; }
 body.mary-report-print .report-table tr { break-inside: avoid; }
}
.account-directory button { transition: background-color 160ms ease, border-color 160ms ease; }
.account-directory button:disabled { opacity: .65; cursor: wait; }
.invoice-row-heading, .invoice-detail h3 { overflow-wrap: anywhere; unicode-bidi: plaintext; }
@media (max-width: 600px) {
 .directory-fields { grid-template-columns: minmax(0,1fr); }
 .directory-row { flex-direction: column; gap: 12px; }
 .directory-row button { align-self: start; }
 .directory-tools button { flex: 1 1 140px; }
}
@media (prefers-reduced-motion: reduce) { .account-directory button { transition: none; } }
