/* ── NH DATA REPOSITORY — ADMIN STYLESHEET v2 ── */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: Arial, sans-serif; font-size: 11px; color: #1a1a1a; background: #c8d0d8; min-height: 100vh; overflow-y: scroll; }
a { text-decoration: none; color: inherit; }

/* LOGIN */
.login-page { background: #c8d0d8; display: flex; justify-content: center; padding-top: 60px; }
.login-wrap { width: 100%; display: flex; justify-content: center; }
.login-card { background: #fff; border: 1px solid #b0bcc8; border-radius: 6px; padding: 36px 30px; width: 300px; box-shadow: 0 2px 12px rgba(0,0,0,0.15); }
.login-seal { width: 50px; height: 50px; background: #1a3a5c; border-radius: 50%; margin: 0 auto 12px; border: 3px solid #c9a84c; }
.login-title { text-align: center; font-size: 22px; font-weight: bold; color: #1a3a5c; margin-bottom: 4px; }
.login-sub { text-align: center; font-size: 11px; color: #888; margin-bottom: 22px; }
.login-error { background: #fff0f0; border: 1px solid #e8a0a0; border-radius: 3px; padding: 7px 10px; font-size: 11px; color: #c00; margin-bottom: 12px; }
.fg { margin-bottom: 12px; }
.fg label { display: block; font-size: 10px; font-weight: bold; text-transform: uppercase; letter-spacing: 0.06em; color: #555; margin-bottom: 4px; }
.fg input { width: 100%; padding: 6px 8px; border: 1px solid #b0b8c0; font-family: Arial, sans-serif; font-size: 12px; border-radius: 2px; }
.fg input:focus { outline: none; border-color: #1a3a5c; }
.login-btn { width: 100%; padding: 8px; background: #1a3a5c; color: #fff; border: none; font-family: Arial, sans-serif; font-size: 12px; font-weight: bold; cursor: pointer; border-radius: 2px; margin-top: 6px; }
.login-btn:hover { background: #243461; }
.login-help { text-align: center; font-size: 10px; color: #aaa; margin-top: 10px; }

/* TOP BAR */
.tb { background: #1a3a5c; padding: 8px 16px; display: flex; justify-content: space-between; align-items: center; border-bottom: 3px solid #c9a84c; }
.tb-title { color: #fff; font-size: 22px; font-weight: bold; letter-spacing: 0.02em; }
.tb-right { display: flex; align-items: center; gap: 10px; }
.tb-user { color: #c9a84c; font-size: 11px; }
.tb-help { background: transparent; border: 1px solid rgba(255,255,255,0.35); color: #fff; padding: 3px 12px; font-size: 11px; font-family: Arial, sans-serif; cursor: pointer; border-radius: 2px; }
.tb-help:hover { background: rgba(255,255,255,0.1); }
.tb-signout { background: #c9a84c; color: #1a3a5c; border: 1px solid #a08030; padding: 3px 12px; font-size: 11px; font-weight: bold; font-family: Arial, sans-serif; cursor: pointer; border-radius: 2px; }
.tb-signout:hover { background: #dbb84c; }

/* TOWN CENTRAL */
.tic-header { background: #e4eaf0; border-bottom: 1px solid #b0bcc8; padding: 14px 18px; display: flex; justify-content: space-between; align-items: center; }
.tic-title { font-size: 16px; font-weight: bold; color: #1a3a5c; margin-bottom: 3px; }
.tic-sub { font-size: 11px; color: #6b7280; }
.tic-meta { font-size: 11px; color: #888; }
.town-grid { display: flex; flex-wrap: wrap; gap: 10px; padding: 16px 18px; background: #c8d0d8; min-height: calc(100vh - 130px); align-content: flex-start; }
.town-card { background: #fff; border: 1px solid #b0bcc8; border-radius: 5px; padding: 12px 16px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; min-width: 180px; transition: all 0.12s; }
.town-card:hover { border-color: #1a3a5c; background: #f0f4f8; box-shadow: 0 2px 6px rgba(26,58,92,0.10); transform: translateY(-1px); }
.town-card-name { font-size: 13px; font-weight: bold; color: #1a3a5c; }
.town-card-arrow { color: #c9a84c; font-size: 16px; font-weight: bold; margin-left: 14px; }

/* ENTRY HEADER */
.eh { background: #e4eaf0; border-bottom: 1px solid #b0bcc8; padding: 5px 14px; display: flex; justify-content: space-between; align-items: center; }
.eh-left { display: flex; align-items: center; gap: 10px; }
.back-link { font-size: 11px; color: #1a3a5c; text-decoration: underline; cursor: pointer; }
.eh-town { font-size: 13px; font-weight: bold; color: #1a3a5c; }
.eh-badge { background: #c9a84c; color: #1a3a5c; font-size: 11px; font-weight: bold; padding: 3px 10px; border-radius: 2px; letter-spacing: 0.04em; }
.yr-wrap { display: flex; align-items: center; gap: 6px; }
.yr-label { font-size: 11px; color: #555; font-weight: bold; text-transform: uppercase; letter-spacing: 0.04em; }
.yr-btns { display: flex; border: 1px solid #8a9aaa; border-radius: 3px; overflow: hidden; }
.yr-btn { padding: 3px 11px; background: linear-gradient(to bottom, #f5f7fa, #e4eaf0); font-family: Arial, sans-serif; font-size: 11px; font-weight: bold; color: #444; cursor: pointer; border: none; border-right: 1px solid #8a9aaa; }
.yr-btn:last-child { border-right: none; }
.yr-btn.act { background: #1a3a5c; color: #fff; }

/* TABS */
.tabs { display: flex; background: #b8c4ce; border-bottom: 2px solid #1a3a5c; padding: 5px 10px 0; gap: 2px; align-items: flex-end; overflow-x: auto; }
.tab { padding: 5px 10px; background: linear-gradient(to bottom, #d4dce4, #bcc8d0); border: 1px solid #8a9aaa; border-bottom: none; font-family: Arial, sans-serif; font-size: 12px; color: #444; cursor: pointer; white-space: nowrap; position: relative; top: 2px; border-radius: 4px 4px 0 0; user-select: none; flex-shrink: 0; }
.tab:hover { background: linear-gradient(to bottom, #e0e8f0, #ccd4dc); }
.tab.act { background: #fff; color: #1a3a5c; font-weight: bold; border-color: #1a3a5c; border-bottom-color: #fff; z-index: 1; }
.tab-spacer { flex: 1; min-width: 8px; }
.tab.reports { background: linear-gradient(to bottom, #2a5a7c, #1a3a5c); border-color: #1a3a5c; color: #c9a84c; font-weight: bold; }
.tab.reports:hover { background: linear-gradient(to bottom, #3a6a8c, #243461); }
.tab.reports.act { background: #fff; color: #1a3a5c; border-color: #1a3a5c; border-bottom-color: #fff; }
.tab.upload-tab { background: linear-gradient(to bottom, #2e6644, #1a4a2c); border-color: #1a4a2c; color: #a8e4b8; font-weight: bold; font-size: 11px; }
.tab.upload-tab:hover { background: linear-gradient(to bottom, #3a7a52, #2a5a3c); }
.tab.upload-tab.act { background: #fff; color: #1a4a2c; border-color: #1a4a2c; border-bottom-color: #fff; }

/* TAB PANELS */
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* FORM AREA */
.fa { background: #e8edf2; border: 1px solid #8a9aaa; border-top: none; padding: 12px; display: flex; flex-direction: column; gap: 8px; align-items: center; min-height: calc(100vh - 220px); }

/* SECTION BOXES — strict 560px */
.sbox { background: #fff; border: 1px solid #b0bcc8; border-radius: 6px; overflow: hidden; width: 560px; }
.sbox-head { background: #1a3a5c; color: #fff; font-size: 12px; font-weight: bold; padding: 5px 12px; letter-spacing: 0.05em; text-transform: uppercase; text-align: center; }
.sbox-sub { font-size: 10px; font-weight: normal; opacity: 0.75; margin-left: 8px; }

/* NUMERIC INPUTS — 110px right-aligned */
.inp-w { width: 110px; padding: 2px 4px; border: 1px solid #b0b8c0; font-family: Arial, sans-serif; font-size: 11px; text-align: right; background: #fff; color: #1a1a1a; }
.inp-w.filled  { background: #eef4fa; border-color: #90b8d8; }
.inp-w.auto    { background: #edf0f4; border-color: #a8b4c4; font-weight: bold; color: #1a3a5c; }
.inp-w.changed { background: #fffff0; border-color: #d4b800; }
.inp-w:focus   { outline: none; border-color: #1a3a5c; background: #f0f6ff; }
select.inp-w   { text-align: left; cursor: pointer; }

/* TEXT INPUTS — capped to fit inside 560px box (560 - 265 label - 20 padding = 275 max) */
.inp-txt { width: 260px; padding: 2px 4px; border: 1px solid #b0b8c0; font-family: Arial, sans-serif; font-size: 11px; text-align: left; background: #fff; color: #1a1a1a; }
.inp-txt.filled  { background: #eef4fa; border-color: #90b8d8; }
.inp-txt.changed { background: #fffff0; border-color: #d4b800; }
.inp-txt:focus   { outline: none; border-color: #1a3a5c; background: #f0f6ff; }

/* SINGLE-COL TABLE — label 265px, value fills rest */
.gtable { border-collapse: collapse; width: 100%; table-layout: fixed; }
.gtable col.c1 { width: 265px; }
.gtable col.c2 { width: 295px; }
.gtable tr { border-bottom: 1px solid #e8ecf0; }
.gtable tr:last-child { border-bottom: none; }
.gtable tr:hover { background: #f4f7fa; }
.gtable td.lbl { padding: 4px 8px 4px 10px; font-size: 11px; color: #333; text-align: right; border-right: 1px solid #d0d5da; background: #f0f3f7; vertical-align: middle; overflow: hidden; }
.gtable td.val { padding: 3px 8px; vertical-align: middle; overflow: hidden; }

/* INFO ICON — uses fixed positioning so tooltip never clips */
.lbl-wrap { display: flex; align-items: center; justify-content: flex-end; gap: 5px; }
.info-icon { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 14px; height: 14px; border-radius: 50%; background: #c8d0d8; color: #666; font-size: 9px; font-style: italic; font-weight: bold; font-family: serif; cursor: help; flex-shrink: 0; }
.info-icon .tip { display: none; position: fixed; bottom: auto; top: auto; left: auto; right: auto; background: #1a3a5c; color: #fff; font-size: 10px; font-style: normal; font-weight: normal; font-family: Arial, sans-serif; padding: 6px 10px; border-radius: 4px; white-space: normal; width: 280px; z-index: 9999; box-shadow: 0 2px 8px rgba(0,0,0,0.3); pointer-events: none; line-height: 1.5; }
.info-icon:hover .tip { display: block; }

/* DUAL-COL TABLE */
.dtable { border-collapse: collapse; width: 100%; table-layout: fixed; }
.dtable col.c1 { width: 225px; }
.dtable col.c2 { width: 167px; }
.dtable col.c3 { width: 168px; }
.dtable tr { border-bottom: 1px solid #e8ecf0; }
.dtable tr:last-child { border-bottom: none; }
.dtable tr:hover { background: #f4f7fa; }
.dtable tr.dgh td { background: #dde4ec; font-size: 10px; font-weight: bold; text-transform: uppercase; letter-spacing: 0.04em; padding: 3px 7px; color: #1a3a5c; border-bottom: 1px solid #c0c8d0; text-align: center; }
.dtable tr.dgh td:first-child { background: #e8edf2; border-right: 1px solid #d0d5da; color: #888; text-align: right; padding-right: 8px; }
.dtable td.dlbl { padding: 4px 8px; font-size: 11px; color: #333; text-align: right; border-right: 1px solid #d0d5da; background: #f0f3f7; vertical-align: middle; overflow: hidden; }
.dtable td.di { padding: 3px 8px; vertical-align: middle; text-align: center; overflow: hidden; }
.dtable tr.divrow td { background: #edf0f4; font-size: 10px; font-weight: bold; color: #1a3a5c; text-transform: uppercase; letter-spacing: 0.04em; padding: 3px 10px; border-top: 1px solid #c8d0d8; border-bottom: 1px solid #c8d0d8; }

/* 3-COL TABLE — Tax Efforts, same cols across both boxes */
.gtable3 { border-collapse: collapse; width: 100%; table-layout: fixed; }
.gtable3 col.c1 { width: 220px; }
.gtable3 col.c2 { width: 170px; }
.gtable3 col.c3 { width: 170px; }
.gtable3 tr { border-bottom: 1px solid #e8ecf0; }
.gtable3 tr:last-child { border-bottom: none; }
.gtable3 tr:hover { background: #f4f7fa; }
.gtable3 tr.tgh td { background: #dde4ec; font-size: 10px; font-weight: bold; text-transform: uppercase; letter-spacing: 0.04em; padding: 3px 7px; color: #1a3a5c; border-bottom: 1px solid #c0c8d0; text-align: center; }
.gtable3 tr.tgh td.lh { background: #e8edf2; border-right: 1px solid #d0d5da; color: #888; text-align: right; padding-right: 8px; }
.gtable3 td.lbl { padding: 4px 8px; font-size: 11px; color: #333; text-align: right; border-right: 1px solid #d0d5da; background: #f0f3f7; vertical-align: middle; overflow: hidden; }
.gtable3 td.lbl.total-row { font-weight: bold; color: #1a3a5c; background: #edf0f4; }
.gtable3 td.val { padding: 3px 8px; vertical-align: middle; text-align: center; overflow: hidden; }
.gtable3 td.val.empty { background: #fff; }

/* BUDGET — lighter section headers, clean layout */
.sbox-row { display: grid; grid-template-columns: 1fr 130px 26px; align-items: center; background: #2c5278; cursor: pointer; user-select: none; border-bottom: 1px solid #1e3f5e; }
.sbox-row:hover { background: #1a3a5c; }
.sbox-title { color: #fff; font-size: 11px; font-weight: bold; padding: 5px 10px; letter-spacing: 0.03em; text-transform: uppercase; }
.sbox-total-cell { padding: 3px 4px; text-align: center; }
.sbox-arrow { color: #c9a84c; font-size: 11px; text-align: center; }
.budget-body { display: none; }
.budget-body.open { display: block; }
.col-head-row { display: grid; grid-template-columns: 44px 1fr 130px; background: #dde4ec; border-bottom: 1px solid #c0c8d0; }
.ch { font-size: 10px; font-weight: bold; text-transform: uppercase; letter-spacing: 0.05em; color: #1a3a5c; padding: 3px 6px; text-align: center; }
.ch.left { text-align: left; }
.budget-row { display: grid; grid-template-columns: 44px 1fr 130px; border-bottom: 1px solid #e8ecf0; align-items: center; min-height: 26px; }
.budget-row:last-child { border-bottom: none; }
.budget-row:hover { background: #f4f7fa; }
.bacct { padding: 3px 4px; font-size: 10px; color: #999; text-align: center; }
.bpurp { padding: 3px 6px; font-size: 11px; color: #333; }
.bamt  { padding: 2px 5px; text-align: center; }
.subtotal-row { background: #edf0f4 !important; border-top: 1px solid #c8d0d8; }
.subtotal-row .bpurp { color: #1a3a5c; font-weight: bold; font-size: 11px; }
.expand-hint { text-align: center; font-size: 10px; color: #888; font-style: italic; padding: 5px; background: #f8f9fa; border-top: 1px solid #e8ecf0; }

/* EXEMPTIONS EXPAND */
.expand-bar { background: #e4eaf0; border-top: 1px solid #c0c8d0; padding: 5px 12px; font-size: 10px; font-weight: bold; color: #1a3a5c; text-align: center; cursor: pointer; letter-spacing: 0.04em; text-transform: uppercase; user-select: none; }
.expand-bar:hover { background: #d8e0e8; }

/* LEGEND */
.legend { padding: 4px 10px; background: #f0f3f7; border-top: 1px solid #dde2e8; font-size: 10px; color: #888; display: flex; gap: 16px; justify-content: center; }
.leg-item { display: flex; align-items: center; gap: 4px; }
.leg-dot { width: 9px; height: 9px; flex-shrink: 0; }

/* ACTION BAR */
.abar { background: #e4eaf0; border-top: 2px solid #1a3a5c; padding: 5px 14px; display: flex; justify-content: space-between; align-items: center; position: sticky; bottom: 0; z-index: 50; }
.abar-status { font-size: 11px; color: #666; font-style: italic; }
.abar-btns { display: flex; gap: 6px; }
.abtn { padding: 4px 16px; font-family: Arial, sans-serif; font-size: 11px; font-weight: bold; cursor: pointer; border: 1px solid; border-radius: 2px; }
.abtn-p { background: #1a3a5c; color: #fff; border-color: #122840; }
.abtn-p:hover { background: #243461; }
.abtn-s { background: linear-gradient(to bottom, #f5f7fa, #e4eaf0); color: #1a3a5c; border-color: #8a9aaa; }

/* SAVE BANNER */
.save-banner { display: none; background: #f0fdf4; border-bottom: 2px solid #86efac; color: #15803d; font-size: 11px; font-weight: bold; padding: 6px 16px; text-align: center; }
.save-banner.error { background: #fff0f0; border-color: #fca5a5; color: #dc2626; }

/* MODALS */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 200; display: flex; align-items: center; justify-content: center; }
.modal-box { background: #fff; border-radius: 6px; width: 500px; max-width: 95vw; box-shadow: 0 4px 24px rgba(0,0,0,0.2); overflow: hidden; }
.modal-head { background: #1a3a5c; color: #fff; font-size: 13px; font-weight: bold; padding: 10px 16px; }
.modal-body { padding: 16px; font-size: 11px; line-height: 1.7; color: #333; max-height: 60vh; overflow-y: auto; }
.modal-body p { margin-bottom: 4px; }
.modal-foot { padding: 10px 16px; background: #f4f6f9; border-top: 1px solid #e2e8f0; display: flex; justify-content: flex-end; gap: 8px; }
.btn-primary   { padding: 5px 18px; background: #1a3a5c; color: #fff; border: none; border-radius: 2px; font-family: Arial, sans-serif; font-size: 11px; font-weight: bold; cursor: pointer; }
.btn-primary:hover { background: #243461; }
.btn-secondary { padding: 5px 18px; background: #fff; color: #1a3a5c; border: 1px solid #8a9aaa; border-radius: 2px; font-family: Arial, sans-serif; font-size: 11px; cursor: pointer; }

/* ── BUDGET SECTION v2 ── */
.slbl { width:265px; padding:4px 8px 4px 20px; font-size:11px; color:#555; text-align:right; border-right:1px solid #d0d5da; background:#f0f3f7; vertical-align:middle; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.bacct-no { font-size:10px; color:#9ca3af; margin-right:5px; }
.bxbtn { display:inline-block; width:68px; margin-left:10px; cursor:pointer; color:#1a3a5c; font-size:10px; font-weight:bold; border:1px solid #c0c8d4; background:#f0f3f7; padding:1px 0; border-radius:2px; user-select:none; text-align:center; vertical-align:middle; }
.bxbtn:hover { background:#e4eaf0; border-color:#1a3a5c; }
.bsubtot-lbl { background:#edf0f4 !important; font-weight:bold; color:#1a3a5c !important; }
.bsubtot-val { background:#edf0f4 !important; }
