/* ===========================================================
   FINANCE PROFILE — "financerefresh.css"
   Modeled on billrefresh.css (shell + card sections)
   =========================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Global-ish for this page */
body {
  background: #f5f6f8;
  color: #111827;
  font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, "Roboto", sans-serif;
}

/* Shell and main card */
.finance-shell {
  max-width: 980px;
  margin: 32px auto;
  padding: 0 16px;
}

.finance-card {
  background: #ffffff;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
  padding: 24px 28px 26px;
}

/* Header */
.finance-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}

.finance-header-main {
  flex: 1 1 auto;
  min-width: 0;
}

.finance-header-top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
}

.finance-header-name {
  font-size: 24px;
  font-weight: 700;
  color: #111827;
}

.finance-header-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 13px;
  color: #4b5563;
}

.finance-party-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
}

/* Match party colors to rest of site */
.party-d {
  background: #1d4ed8;
  color: #ffffff;
}

.party-r {
  background: #b91c1c;
  color: #ffffff;
}

.party-i,
.party-u {
  background: #4b5563;
  color: #ffffff;
}

.finance-state,
.finance-district {
  padding: 2px 6px;
  border-radius: 9999px;
  background: #f3f4f6;
}

.finance-subtitle {
  font-size: 13px;
  color: #6b7280;
  margin-top: 4px;
}

.finance-photo-wrap {
  flex: 0 0 auto;
}

.finance-photo {
  width: 112px;
  height: 112px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid #d1d5db;
}

.finance-divider {
  border: 0;
  border-top: 1px solid #e5e7eb;
  margin: 14px 0 18px;
}

/* Sections */
.finance-section {
  margin-top: 18px;
}

.finance-section-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-weight: 600;
  color: #6b7280;
  margin-bottom: 6px;
}

/* Summary grid */
.finance-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  margin-bottom: 6px;
}

.finance-metric {
  background: #f9fafb;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  padding: 10px 12px;
}

.finance-metric-label {
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 2px;
}

.finance-metric-value {
  font-size: 16px;
  font-weight: 600;
  color: #111827;
}

.finance-note {
  font-size: 12px;
  color: #6b7280;
  margin-top: 6px;
}

/* Empty state */
.finance-empty {
  font-size: 14px;
  color: #6b7280;
  background: #f9fafb;
  border-radius: 6px;
  border: 1px dashed #d1d5db;
  padding: 10px 12px;
}

/* Table wrapper */
.finance-table-wrap {
  margin-top: 6px;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  overflow: hidden;
  background: #ffffff;
}

/* Tables */
.finance-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.finance-table thead {
  background: #f3f4f6;
}

.finance-table th,
.finance-table td {
  padding: 9px 12px;
  border-bottom: 1px solid #e5e7eb;
}

.finance-table th {
  text-align: left;
  font-weight: 600;
  color: #374151;
}

.finance-table tbody tr:nth-child(even) {
  background: #f9fafb;
}

.finance-table tbody tr:hover {
  background: #eef2ff;
}

.align-right {
  text-align: right;
}

/* Footnote */
.finance-footnote {
  margin-top: 22px;
  font-size: 12px;
  color: #6b7280;
  border-top: 1px solid #e5e7eb;
  padding-top: 10px;
}

/* ===============================================
   FINANCE TABLE – COLUMN ALIGNMENT FIXES
   =============================================== */

/* Numeric columns: right aligned, equal width, fixed digit spacing */
.finance-table td.num,
.finance-table th.num {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  min-width: 120px;
}

/* First text column: prevent layout stretching */
.finance-table td.text-col,
.finance-table th.text-col {
  max-width: 360px;
  overflow-wrap: break-word;
}

/* Slightly larger right padding for numeric columns */
.finance-table td.num {
  padding-right: 16px;
}


/* Responsive tweaks */
@media (max-width: 768px) {
  .finance-card {
    padding: 18px 16px 20px;
  }

  .finance-header {
    flex-direction: column-reverse;
    align-items: flex-start;
  }

  .finance-photo {
    width: 96px;
    height: 96px;
  }

  .finance-header-name {
    font-size: 20px;
  }
}
/* ===============================================
   FINANCE — CYCLE DROPDOWN
   =============================================== */

.finance-cycle-select {
  appearance: none;
  background: #f9fafb;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 8px 32px 8px 12px;
  font-size: 14px;
  font-weight: 500;
  color: #111827;
  cursor: pointer;
  transition: 0.15s border-color, 0.15s box-shadow;
  font-family: inherit;
  outline: none;
  position: relative;
}

/* Hover + focus */
.finance-cycle-select:hover {
  border-color: #9ca3af;
}

.finance-cycle-select:focus {
  border-color: #111827;
  box-shadow: 0 0 0 2px rgba(99,102,241,0.30);
}

/* Down-arrow icon (pure CSS) */
.finance-cycle-select {
  background-image:
    linear-gradient(45deg, transparent 50%, #6b7280 50%),
    linear-gradient(135deg, #6b7280 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 3px),
    calc(100% - 12px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

/* Wrapper so it aligns nicely */
.finance-cycle-wrap {
  margin-bottom: 16px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.finance-cycle-label {
  font-size: 12px;
  color: #6b7280;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

