/* =============================================================================
   HOA App Custom Styles - Post-Tabler Migration
   Preserved app-specific styles only (~150 lines down from ~850)
   ============================================================================= */

/* -----------------------------------------------------------------------------
   1. HOA-Specific Category Colors
   ----------------------------------------------------------------------------- */
:root {
  --hoa-utilities-color: #3182ce;
  --hoa-additional-color: #805ad5;
  --hoa-fees-color: #dd6b20;
  --hoa-insurance-color: #d63384;
  /* Pink - distinct from HOA orange and credit teal */
}

/* -----------------------------------------------------------------------------
   2. Custom Badge Colors (Bill Categories)
   ----------------------------------------------------------------------------- */
.badge-board {
  background-color: #9f7aea !important;
  color: white;
}

.badge-utilities {
  background-color: var(--hoa-utilities-color) !important;
  color: white;
}

.badge-additional {
  background-color: var(--hoa-additional-color) !important;
  color: white;
}

.badge-hoa {
  background-color: var(--hoa-fees-color) !important;
  color: white;
}

.badge-insurance {
  background-color: var(--hoa-insurance-color) !important;
  color: white;
}

.badge-credit {
  background-color: #0ca678 !important;
  color: white;
}

/* -----------------------------------------------------------------------------
   2a. Credit/Rebate Styling
   ----------------------------------------------------------------------------- */
.amount-credit {
  color: #0ca678;
  font-weight: 600;
}

tr.credit-row {
  background-color: rgba(12, 166, 120, 0.05);
}

[data-bs-theme="dark"] tr.credit-row {
  background-color: rgba(12, 166, 120, 0.1);
}

[data-bs-theme="dark"] .amount-credit {
  color: #28be8a;
}

/* -----------------------------------------------------------------------------
   3. Table Customizations (Unit Columns)
   ----------------------------------------------------------------------------- */
.table th.unit-col,
.table td.unit-col {
  text-align: center;
  width: 50px;
  padding: 0.25rem 0.5rem;
}

/* Payment status row colors */
.status-paid {
  background: rgba(46, 204, 113, 0.1);
}

.status-pending {
  background: rgba(241, 196, 15, 0.1);
}

/* Payment checkbox styling */
.checkbox-paid {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: var(--tblr-green);
}

/* -----------------------------------------------------------------------------
   4. Operating Costs Section
   ----------------------------------------------------------------------------- */
.cost-section {
  margin-bottom: 2rem;
}

.cost-section h3 {
  color: var(--tblr-primary);
  border-bottom: 2px solid var(--tblr-primary);
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

.cost-total {
  font-weight: 700;
  background: var(--tblr-bg-surface-secondary);
}

.cost-subtotal {
  font-weight: 600;
  font-style: italic;
}

/* -----------------------------------------------------------------------------
   5. Year Selector
   ----------------------------------------------------------------------------- */
.year-selector {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.year-btn {
  padding: 0.5rem 1rem;
  border: 1px solid var(--tblr-border-color);
  background: var(--tblr-bg-surface);
  border-radius: var(--tblr-border-radius);
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
  color: var(--tblr-body-color);
}

.year-btn:hover {
  background: var(--tblr-bg-surface-secondary);
}

.year-btn.active {
  background: var(--tblr-primary);
  color: white;
  border-color: var(--tblr-primary);
}

/* -----------------------------------------------------------------------------
   6. Calendar Styles
   ----------------------------------------------------------------------------- */
.calendar-grid {
  table-layout: fixed;
}

.calendar-day {
  height: 100px;
  vertical-align: top;
  padding: 4px;
}

.calendar-day.empty {
  background-color: var(--tblr-bg-surface-secondary);
}

.calendar-day.today {
  background-color: var(--tblr-azure-lt);
}

.calendar-day .day-number {
  font-weight: bold;
  font-size: 0.9rem;
}

.event-badge {
  font-size: 0.7rem;
  padding: 2px 4px;
  margin-top: 2px;
  border-radius: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: white;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.legend-color {
  display: inline-block;
  width: 20px;
  height: 20px;
  border-radius: 3px;
}

/* Calendar form elements */
.calendar-form-label {
  display: block;
  margin-bottom: 0.25rem;
  font-weight: 500;
}

.calendar-form-input {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--tblr-border-color);
  border-radius: var(--tblr-border-radius);
  font-size: 1rem;
  background: var(--tblr-bg-forms);
  color: var(--tblr-body-color);
}

.calendar-form-input:focus {
  outline: none;
  border-color: var(--tblr-primary);
  box-shadow: 0 0 0 3px rgba(var(--tblr-primary-rgb), 0.1);
}

.calendar-form-group {
  margin-bottom: 1rem;
}

/* -----------------------------------------------------------------------------
   7. Allocation Badge
   ----------------------------------------------------------------------------- */
.allocation-badge {
  padding: 0.25rem 0.5rem;
  border-radius: var(--tblr-border-radius);
  font-size: 0.9em;
  font-weight: 500;
}

.allocation-badge.success {
  background: var(--tblr-green-lt);
  color: var(--tblr-green);
}

.allocation-badge.warning {
  background: var(--tblr-yellow-lt);
  color: var(--tblr-yellow);
}

.allocation-badge.pending {
  background: var(--tblr-azure-lt);
  color: var(--tblr-azure);
}

