.shared-content { display:grid; gap:22px; }
/* Grid children must shrink so wide ledgers scroll inside their panel instead of widening the tabs. */
.shared-content>*,.shared-content .shared-panel,.shared-content .shared-tabs { min-width:0; }
.shared-table-scroll { max-width:100%; }
.shared-tabs { display:flex; gap:10px; padding:8px; border:1px solid var(--line,#dce8e1); background:white; border-radius:16px; }
.shared-tabs button { flex:1; min-width:0; padding:14px 20px; border:1px solid transparent; border-radius:11px; color:#315b4d; background:transparent; font:inherit; font-weight:700; cursor:pointer; }
.shared-tabs button.active { background:#dff1eb; border-color:#8ac9b9; color:#176b5b; }
.shared-status { margin:0; min-height:24px; color:#60786e; }
.shared-status.error { color:#a34231; }
.shared-panel { padding:26px; margin-bottom:22px; }
.shared-panel h2,.shared-panel h3 { color:#176b5b; }
.shared-panel p { color:#60786e; line-height:1.6; }
.shared-filters,.shared-entry-fields { display:flex; flex-wrap:wrap; align-items:end; gap:16px; margin-bottom:22px; }
.shared-filters label,.shared-entry-fields label,.shared-config-template label { display:grid; gap:8px; color:#315b4d; font-weight:600; }
.shared-filters input,.shared-filters select,.shared-entry-fields input,.shared-config-template input,.shared-table input { box-sizing:border-box; min-height:42px; width:100%; border:1px solid #bfd9ce; border-radius:9px; padding:10px 12px; font:inherit; background:#f8fbf9; color:#203f35; }
.shared-filters label { flex:1 1 170px; }
.shared-entry-fields label { flex:1 1 180px; }
.shared-entry-fields .shared-note { flex:2 1 300px; }
.shared-content button:not(.shared-tabs button),.shared-content .export-cta { display:inline-flex; justify-content:center; align-items:center; gap:8px; min-height:42px; padding:10px 18px; border:1px solid #9dcabd; border-radius:10px; background:#edf7f3; color:#176b5b; font:inherit; font-weight:700; cursor:pointer; }
.shared-content button:disabled { opacity:.5; cursor:default; }
.shared-content button[type=submit] { background:#176b5b; color:white; border-color:#176b5b; }
.shared-template-choices { display:flex; flex-wrap:wrap; gap:12px; margin:22px 0; }
.shared-template-choices button.active { background:#176b5b; color:white; }
.shared-table-scroll { overflow:auto; margin:20px 0; border:1px solid #dce8e1; border-radius:12px; }
.shared-table { border-collapse:collapse; width:100%; min-width:1150px; background:white; }
.shared-table th,.shared-table td { padding:12px; border:1px solid #dce8e1; text-align:center; }
.shared-table th { background:#edf7f3; color:#315b4d; white-space:nowrap; }
.shared-table .shared-merchant-cell { text-align:left; min-width:150px; }
.shared-table input { min-width:108px; max-width:140px; }
.shared-table .shared-total { font-weight:700; color:#176b5b; background:#f4faf7; }
.shared-actions,.shared-record-heading,.shared-config-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.shared-actions { justify-content:flex-start; margin-top:22px; }
.shared-record-heading h3 { margin:0; }
.shared-record-heading p { margin:8px 0 0; }
.shared-metrics { display:flex; flex-wrap:wrap; gap:18px; margin-bottom:22px; }
.shared-metrics article { flex:1; min-width:180px; padding:20px 24px; border:1px solid #dce8e1; background:white; border-radius:15px; }
.shared-metrics span,.shared-metrics strong { display:block; }
.shared-metrics span { color:#60786e; margin-bottom:8px; }
.shared-metrics strong { font-size:26px; color:#176b5b; }
.shared-config-template { margin:22px 0; padding:20px; border:1px solid #dce8e1; border-radius:14px; }
.shared-config-template>summary { cursor:pointer; color:#176b5b; font-weight:700; margin-bottom:20px; }
.shared-config-group { margin:20px 0; padding:18px; background:#f5faf7; border-radius:12px; }
.shared-config-heading label { flex:1; }
.shared-config-merchants { display:grid; gap:10px; margin:16px 0; }
.shared-config-merchant { display:grid; grid-template-columns:110px minmax(120px,1fr) auto; align-items:end; gap:12px; }
.shared-empty { padding:45px 24px; text-align:center; color:#60786e; }
.shared-content [hidden] { display:none !important; }
@media(max-width:800px) { .shared-panel {padding:18px;} .shared-config-merchant{grid-template-columns:80px minmax(100px,1fr) auto;} .shared-content button:not(.shared-tabs button){padding:10px 12px;} }

.shared-content fieldset { border:0; padding:0; margin:0; min-width:0; }
