/* HousePermits — Live Data Dashboard Styles */
#hpld, #hpld * { box-sizing: border-box; }
#hpld { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; color: #1a1a1a; width: 100%; }

/* Header */
.hp-hdr { background: #085041; padding: 28px 24px 22px; }
.hp-hdr h2 { font-size: 22px; font-weight: 500; color: #E1F5EE; margin: 0 0 6px; }
.hp-hdr p { font-size: 13px; color: #5DCAA5; margin: 0 0 12px; }
.hp-chips { display: flex; gap: 7px; flex-wrap: wrap; }
.hp-chip { background: rgba(255,255,255,0.12); border: 0.5px solid rgba(255,255,255,0.2); border-radius: 20px; padding: 3px 11px; font-size: 11px; color: #9FE1CB; }

/* Stat cards */
.hp-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 16px 24px 0; }
.hp-stat { background: #f6f5f1; border-radius: 10px; padding: 14px; }
.hp-stat .sl { font-size: 10px; color: #888; text-transform: uppercase; letter-spacing: .04em; margin: 0 0 4px; }
.hp-stat .sv { font-size: 22px; font-weight: 500; color: #085041; }
.hp-stat .ss { font-size: 10px; color: #aaa; margin: 3px 0 0; }
.hp-src { font-size: 11px; color: #aaa; text-align: right; padding: 4px 24px 0; }
.hp-src a { color: #0F6E56; }

/* Body */
.hp-body { padding: 14px 24px 48px; }

/* Tabs */
.hp-tabs { display: flex; border-bottom: 1.5px solid rgba(0,0,0,0.1); margin: 0 0 18px; }
.hp-tab { padding: 10px 16px; font-size: 13px; border: none; border-top: none; border-left: none; border-right: none; background: none; cursor: pointer; border-bottom: 2.5px solid transparent; color: #888; margin-bottom: -1.5px; outline: none; font-family: inherit; }
.hp-tab.hp-on { border-bottom-color: #085041; color: #085041; font-weight: 500; }
.hp-tab:hover { color: #085041; }

/* Panes */
.hp-pane { display: none; }
.hp-pane.hp-on { display: block; }

/* Two-column layout */
.hp-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* State bars */
.hp-bar-row { display: flex; align-items: center; gap: 8px; margin: 0 0 5px; }
.hp-bar-lbl { width: 120px; font-size: 11px; color: #555; flex-shrink: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hp-bar-track { flex: 1; height: 14px; background: rgba(0,0,0,.05); border-radius: 3px; overflow: hidden; }
.hp-bar-fill { height: 100%; background: #1D9E75; border-radius: 3px; }
.hp-bar-val { width: 52px; text-align: right; font-size: 11px; font-weight: 500; color: #085041; }

/* Mix bar */
.hp-mix-box { background: #f6f5f1; border-radius: 8px; padding: 14px; margin: 14px 0 0; }
.hp-mix-bar { display: flex; height: 12px; border-radius: 4px; overflow: hidden; margin: 6px 0 8px; }
.hp-mix-legend { display: flex; gap: 16px; font-size: 11px; color: #555; }
.hp-mix-dot { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 4px; vertical-align: middle; }

/* Breakdown */
.hp-brk-row { font-size: 12px; margin: 0 0 7px; }
.hp-brk-hd { display: flex; justify-content: space-between; margin: 0 0 2px; }
.hp-brk-bar { height: 6px; border-radius: 3px; overflow: hidden; background: rgba(0,0,0,.06); display: flex; }

/* City tabs */
.hp-city-tabs { display: flex; flex-wrap: wrap; margin: 0 0 10px; gap: 4px; }
.hp-city-tabs button { padding: 5px 11px; border-radius: 20px; font-size: 11px; border: 0.5px solid rgba(0,0,0,0.12); cursor: pointer; background: #f6f5f1; color: #333; outline: none; font-family: inherit; transition: all .15s; }
.hp-city-tabs button:hover { background: #E1F5EE; border-color: #9FE1CB; }
.hp-city-tabs button.hp-active { background: #085041; color: #E1F5EE; border-color: #085041; }

/* Filters */
.hp-filters { display: flex; gap: 8px; margin: 0 0 10px; flex-wrap: wrap; }
.hp-filters input, .hp-filters select { padding: 7px 11px; border: 0.5px solid rgba(0,0,0,0.15); border-radius: 6px; font-size: 12px; outline: none; background: #fff; color: #333; font-family: inherit; }
.hp-filters input { flex: 1; min-width: 160px; }
.hp-filters select:focus, .hp-filters input:focus { border-color: #1D9E75; }

/* Table */
.hp-tbl { width: 100%; border-collapse: collapse; font-size: 12px; }
.hp-tbl th { padding: 9px 10px; text-align: left; background: #085041; color: #E1F5EE; font-weight: 500; white-space: nowrap; }
.hp-tbl td { padding: 8px 10px; border-bottom: 0.5px solid rgba(0,0,0,.06); vertical-align: top; }
.hp-tbl tr:nth-child(even) td { background: #f6f5f1; }
.hp-badge { background: #E1F5EE; color: #085041; padding: 2px 7px; border-radius: 20px; font-size: 10px; font-weight: 500; white-space: nowrap; }

/* Trend */
.hp-trend-box { background: #f6f5f1; border-radius: 10px; padding: 18px; }
.hp-trend-bars { display: flex; align-items: flex-end; gap: 4px; height: 160px; }
.hp-trend-lbls { display: flex; gap: 4px; margin: 5px 0 0; }
.hp-trend-legend { display: flex; gap: 16px; margin: 10px 0 0; font-size: 11px; color: #555; }
.hp-trend-dot { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 4px; vertical-align: middle; }

/* Select */
.hp-sel { padding: 7px 12px; border: 0.5px solid rgba(0,0,0,0.15); border-radius: 6px; font-size: 13px; min-width: 200px; outline: none; background: #fff; font-family: inherit; }
.hp-sel:focus { border-color: #1D9E75; }

/* Messages */
.hp-msg { padding: 16px; background: #f6f5f1; border-radius: 8px; font-size: 13px; color: #888; }
.hp-err { background: #FCEBEB; color: #D85A30; }
.hp-meta { font-size: 11px; color: #aaa; margin: 6px 0 0; }
.hp-meta a { color: #0F6E56; }

/* Section heading */
.hp-sec-h { font-size: 13px; font-weight: 500; margin: 0 0 10px; }

/* Responsive */
@media (max-width: 640px) {
    .hp-stats { grid-template-columns: 1fr 1fr; }
    .hp-2col { grid-template-columns: 1fr; }
    .hp-hdr, .hp-body { padding-left: 16px; padding-right: 16px; }
    .hp-stats { padding-left: 16px; padding-right: 16px; }
}
