/* Federal Taxes (Story 3553, 2026-09-28) -- the list page, plus the Tax Year,
   Documents and Payments tabs of the record page (which otherwise wears the
   shared entity-detail styles). */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { background: #F2F2F4; color: #222; font-family: "Segoe UI", system-ui, sans-serif; }

/* ---- the list page ---- */
.tx-board.page-shell { display: flex; flex-direction: column; height: 100vh; height: 100dvh; overflow: hidden; }
.tx-board #lwIconBand, .tx-board .ct-header { flex: 0 0 auto; }

.ct-header { background: #3C3C3C; color: #fff; padding: 10px 16px; display: flex; align-items: center; gap: 12px; }
.ct-header h1 { margin: 0; font-size: 14pt; font-weight: 600; flex: 1; }
.ct-header button { color: #fff; background: #4F46E5; border: none; border-radius: 4px; padding: 7px 14px; font: inherit; font-size: 13px; cursor: pointer; }
.ct-header button:hover { background: #6257F0; }

.tx-body { flex: 1; overflow: auto; padding: 14px 16px 28px; }
.tx-status-line { font-size: 12px; color: #777; margin-bottom: 10px; min-height: 14px; }
.tx-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }

.tx-card { display: block; text-decoration: none; color: inherit; background: #fff; border: 1px solid #E2E2E6; border-left: 4px solid #0A66C2; border-radius: 10px; padding: 12px 14px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.tx-card:hover { background: #FAFAFC; }
.tx-card.is-done { border-left-color: #15803D; }
.tx-card-head { display: flex; align-items: baseline; gap: 10px; }
.tx-year { font-size: 20px; font-weight: 700; color: #1B1B1F; }
.tx-meta { font-size: 12px; color: #666; margin-top: 6px; display: flex; flex-wrap: wrap; gap: 12px; }
.tx-card .tx-due { margin-top: 8px; }
.tx-more { margin: 14px auto 0; display: block; border: 1px solid #D3D3D9; background: #fff; border-radius: 6px; padding: 8px 18px; font: inherit; font-size: 13px; cursor: pointer; }

/* Status chips: a finished year is green, an open one blue, an extended one amber. */
.tx-chip { display: inline-block; font-size: 11px; font-weight: 600; border-radius: 999px; padding: 2px 9px; background: #E5F0FF; color: #1F4E8C; }
.tx-chip.is-extended { background: #FFF4D6; color: #7A5200; }
.tx-chip.is-done { background: #DCFCE7; color: #15803D; }

/* The open deadline: grey when far off, amber inside 30 days, red when past. */
.tx-due { display: inline-block; font-size: 11px; font-weight: 600; border-radius: 999px; padding: 2px 9px; background: #EEF0F5; color: #414553; }
.tx-due.is-soon { background: #FFF4D6; color: #7A5200; }
.tx-due.is-overdue { background: #FDE2E2; color: #9B1C1C; }

/* Year over year: scrolls sideways inside its own box on a phone, never the page. */
.tx-yoy { margin-top: 22px; }
.tx-yoy h2 { font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: #0A66C2; margin: 0 0 8px; }
.tx-yoy-scroll { overflow-x: auto; background: #fff; border: 1px solid #E2E2E6; border-radius: 10px; }
.tx-yoy table { border-collapse: collapse; width: 100%; font-size: 13px; }
.tx-yoy th, .tx-yoy td { padding: 7px 10px; border-bottom: 1px solid #EEE; white-space: nowrap; text-align: right; }
.tx-yoy th:first-child, .tx-yoy td:first-child, .tx-yoy th:nth-child(2), .tx-yoy td:nth-child(2) { text-align: left; }
.tx-yoy th { font-size: 11px; text-transform: uppercase; letter-spacing: .4px; color: #667; background: #F7F9FC; }
.tx-yoy tr:last-child td { border-bottom: none; }
.tx-yoy a { color: #0A66C2; text-decoration: none; font-weight: 600; }

/* Folding sections on the list page (Story 5757): each header folds and is remembered; Fold All
   sits on the status line. A folded section keeps its header. */
.tx-status-row { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.tx-status-row .tx-status-line { margin-bottom: 0; flex: 1; }
.tx-foldall { border: 1px solid #D3D3D9; background: #fff; color: #414553; border-radius: 6px; padding: 3px 9px; font: inherit; font-size: 12px; cursor: pointer; }
.tx-foldall:hover { background: #EEF0F5; }
.tx-sec-head { font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: #0A66C2; margin: 0 0 8px; cursor: pointer; user-select: none; }
.tx-caret { display: inline-block; width: 12px; color: #667; }
.tx-sec.is-folded .tx-sec-body { display: none; }
.tx-sec.is-folded .tx-sec-head { margin-bottom: 0; }
.tx-sec[data-sec="years"].is-folded + .tx-yoy { margin-top: 14px; }

/* ---- record page: the Tax Year tab ---- */
.tx-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-bottom: 14px; }
.tx-kpi { background: #F7F9FC; border: 1px solid #E3E9F2; border-radius: 8px; padding: 10px 12px; }
.tx-kpi .k { font-size: 11px; color: #667; text-transform: uppercase; letter-spacing: .4px; }
.tx-kpi .v { font-size: 17px; font-weight: 600; color: #1B1B1F; margin-top: 2px; }
.tx-section { margin-bottom: 16px; }
.tx-section h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: #0A66C2; margin: 0 0 4px; }
.tx-notes { white-space: pre-wrap; font-size: 13px; color: #222; }
.ed-info-form h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: #0A66C2; margin: 16px 0 8px; }
.ed-info-form h3:first-child { margin-top: 0; }
.ed-info-form .err { color: #C00000; font-size: 13px; min-height: 16px; margin: 6px 0; }
.ed-info-form .err:empty { display: none; }
.ed-info-form .actions { display: flex; gap: 8px; }

/* ---- record page: Documents and Payments tabs ---- */
.tx-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding-bottom: 12px; border-bottom: 1px solid #EEE; margin-bottom: 12px; }
.tx-toolbar-status { font-size: 12px; color: #666; margin-left: auto; }
.tx-row { border: 1px solid #E7E7EC; border-left: 4px solid #D97706; border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; background: #fff; }
.tx-row.is-received { border-left-color: #15803D; background: #FAFFFB; }
.tx-row.is-payment { border-left-color: #0A66C2; }
.tx-row.is-refund { border-left-color: #15803D; }
.tx-row-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.tx-row-title { font-size: 14px; font-weight: 600; color: #1B1B1F; flex: 1; min-width: 140px; }
.tx-row.is-received .tx-row-title { color: #4B5563; font-weight: 500; }
.tx-tick { color: #15803D; font-weight: 700; }
.tx-missing { font-size: 11px; font-weight: 600; color: #7A5200; background: #FFF4D6; border-radius: 999px; padding: 1px 8px; }
.tx-row-amount { font-size: 13px; font-weight: 600; color: #1B1B1F; }
.tx-row-meta { font-size: 12px; color: #666; margin-top: 4px; display: flex; flex-wrap: wrap; gap: 12px; }
.tx-row-notes { font-size: 13px; color: #333; margin-top: 6px; white-space: pre-wrap; }
.tx-row-btns { display: flex; gap: 6px; justify-content: flex-end; margin-top: 6px; flex-wrap: wrap; }
.tx-row-btns .ed-btn { padding: 4px 10px; font-size: 11px; }
.tx-form { border: 1px solid #D8E3F2; background: #FAFCFF; border-radius: 8px; padding: 12px; margin-bottom: 12px; }

@media (max-width: 560px) {
    .ed-info-form .field-row { flex-direction: column; gap: 0; }
}

@media print {
    .ct-header button, .tx-toolbar, .tx-row-btns, .tx-more, .tx-foldall { display: none !important; }
}
