/* ==========================================================================
   ANDROID-STYLE LUXURY BUDGET SUMMARY CARD & DONUT CHART
   ========================================================================== */

.budget-summary-card-lux {
  background: var(--bg-surface, #FFFFFF);
  border-radius: 18px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  border: 1px solid var(--border-light, #F1E7DD);
  box-shadow: 0 4px 20px -2px rgba(90, 60, 40, 0.05);
}

.budget-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

.budget-header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.budget-header-icon-box {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(184, 134, 11, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.budget-header-title-box {
  display: flex;
  flex-direction: column;
}

.budget-header-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main, #2D3748);
}

.budget-header-sub {
  font-size: 0.76rem;
  color: var(--text-muted, #718096);
}

.budget-health-badge {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  transition: all 0.3s ease;
}

.budget-health-badge.safe {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.budget-health-badge.exceeded {
  background: rgba(225, 29, 72, 0.1);
  color: #E11D48;
  border: 1px solid rgba(225, 29, 72, 0.25);
}

.budget-health-badge .badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: currentColor;
}

/* Middle Layout: Donut on Left, Stat Tiles on Right */
.budget-middle-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 1.75rem;
  align-items: center;
  margin-bottom: 1.5rem;
}

.budget-donut-container {
  display: flex;
  justify-content: center;
  align-items: center;
}

.budget-donut-svg-wrap {
  position: relative;
  width: 130px;
  height: 130px;
}

.budget-donut-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.donut-track {
  fill: none;
  stroke: rgba(184, 134, 11, 0.1);
}

.donut-fill {
  fill: none;
  stroke: var(--primary-gold, #C59A52);
  stroke-linecap: round;
  transition: stroke-dashoffset 1s cubic-bezier(0.4, 0, 0.2, 1), stroke 0.5s ease;
}

.donut-center-info {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: none;
}

.donut-percent {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main, #1F2937);
  line-height: 1.1;
}

.donut-label {
  font-size: 0.65rem;
  color: var(--text-muted, #6B7280);
  font-weight: 500;
  margin-top: 0.15rem;
}

/* 3 Mini Stat Tiles */
.budget-stat-tiles {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.budget-mini-tile {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: rgba(197, 154, 82, 0.05);
  border: 1px solid rgba(197, 154, 82, 0.15);
  border-radius: 12px;
  padding: 0.65rem 1rem;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.budget-mini-tile:hover {
  transform: translateX(3px);
  border-color: rgba(197, 154, 82, 0.35);
}

.budget-mini-tile.warning {
  background: rgba(225, 29, 72, 0.05);
  border-color: rgba(225, 29, 72, 0.25);
}

.tile-icon-wrap {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.tile-icon-wrap.gold { background: rgba(184, 134, 11, 0.12); color: #B8860B; }
.tile-icon-wrap.rose { background: rgba(217, 119, 6, 0.12); color: #D97706; }
.tile-icon-wrap.green { background: rgba(16, 185, 129, 0.12); color: #059669; }
.tile-icon-wrap.danger { background: rgba(225, 29, 72, 0.12); color: #E11D48; }

.tile-texts {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.tile-label {
  font-size: 0.72rem;
  color: var(--text-muted, #64748B);
  font-weight: 500;
}

.tile-val {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main, #1E293B);
  letter-spacing: -0.01em;
}

.tile-val.green { color: #059669; }
.tile-val.danger { color: #E11D48; }

/* Bottom Segmented Bar (Spent, Deposit, Paid) */
.budget-segmented-bar {
  display: flex;
  align-items: center;
  background: rgba(197, 154, 82, 0.05);
  border: 1px solid rgba(197, 154, 82, 0.15);
  border-radius: 12px;
  padding: 0.5rem 0.25rem;
}

.seg-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.5rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.seg-col:hover {
  background: rgba(197, 154, 82, 0.12);
}

.seg-col.active {
  background: rgba(197, 154, 82, 0.2);
}

.seg-label {
  font-size: 0.74rem;
  color: var(--text-muted, #64748B);
  font-weight: 500;
  margin-bottom: 0.2rem;
}

.seg-val {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text-main, #1E293B);
}

.seg-val.primary {
  color: var(--primary-gold, #B8860B);
}

.seg-divider {
  width: 1px;
  height: 28px;
  background: rgba(197, 154, 82, 0.2);
}

@media (max-width: 640px) {
  .budget-middle-row {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 1.25rem;
  }
  .budget-stat-tiles {
    width: 100%;
  }
}

/* Category Breakdown Grid */
.category-spending-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.category-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  transition: all var(--transition-fast);
}

.category-card:hover {
  border-color: var(--primary-gold);
  box-shadow: var(--shadow-sm);
}

.category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.category-title {
  font-weight: 600;
  font-size: 0.95rem;
}

.category-amounts {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
}

/* Expenses Data Table */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  background: var(--bg-surface);
}

.app-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
}

.app-table th {
  background: var(--bg-surface-alt);
  padding: 0.75rem 1.1rem;
  font-weight: 600;
  color: #64748B;
  text-transform: none;
  font-size: 12.5px;
  letter-spacing: normal;
  border-bottom: 1px solid var(--border-subtle);
}

.app-table td {
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-main);
  vertical-align: middle;
}

.app-table tr:hover td {
  background: #FFFDF9;
}

@media (max-width: 768px) {
  .budget-summary-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}
