:root {
  --primary-color: 217 91% 60%; /* #4f46e5 */
  --secondary-color: 220 13% 91%; /* #e5e7eb */
  --success-color: 142 71% 45%; /* #10b981 */
  --danger-color: 0 84% 60%; /* #ef4444 */
  --warning-color: 45 93% 47%; /* #f59e0b */
  --info-color: 199 89% 48%; /* #0ea5e9 */
  --dark-color: 220 13% 18%; /* #1f2937 */
  --light-color: 220 13% 98%; /* #f9fafb */
  --background: 220 13% 98%; /* #f9fafb */
  --surface: 0 0% 100%; /* #ffffff */
  --text-primary: 220 13% 18%; /* #1f2937 */
  --text-secondary: 220 9% 46%; /* #6b7280 */
  --border-color: 220 13% 91%; /* #e5e7eb */
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  --radius: 8px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: hsl(var(--background));
  color: hsl(var(--text-primary));
  line-height: 1.6;
}

/* Mobile App Container */
.mobile-app {
  max-width: 414px;
  margin: 0 auto;
  min-height: 100vh;
  background-color: hsl(var(--surface));
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  position: relative;
}

/* App Header */
.app-header {
  background: linear-gradient(135deg, hsl(var(--primary-color)), hsl(217 91% 50%));
  color: white;
  padding: 1rem;
  text-align: center;
  box-shadow: var(--shadow);
}

.app-header h1 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0;
}

/* App Content */
.app-content {
  flex: 1;
  padding-bottom: 80px;
  overflow-y: auto;
}

/* Screen Layout */
.screen {
  padding: 1rem;
  min-height: calc(100vh - 140px);
}

.screen-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid hsl(var(--border-color));
}

.screen-header h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: hsl(var(--text-primary));
}

/* Navigation */
.bottom-navigation {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 414px;
  background-color: hsl(var(--surface));
  border-top: 1px solid hsl(var(--border-color));
  display: flex;
  justify-content: space-between;
  padding: 0.25rem 0.1rem;
  z-index: 1000;
  overflow-x: auto;
}

.nav-item {
  background: none;
  border: none;
  padding: 0.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  color: hsl(var(--text-secondary));
  transition: color 0.2s;
  flex: 1;
  min-width: 50px;
  max-width: 70px;
}

.nav-item:hover,
.nav-item.active {
  color: hsl(var(--primary-color));
}

.nav-item i {
  font-size: 1.1rem;
}

.nav-item span {
  font-size: 0.65rem;
  font-weight: 500;
  text-align: center;
  line-height: 1.1;
}

/* Forms */
.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: hsl(var(--text-primary));
}

.expense-form .form-control,
.expense-form .form-select,
.income-form .form-control {
  border-radius: var(--radius);
  border: 1px solid hsl(var(--border-color));
  padding: 0.75rem;
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.expense-form .form-control:focus,
.expense-form .form-select:focus,
.income-form .form-control:focus {
  border-color: hsl(var(--primary-color));
  box-shadow: 0 0 0 3px hsla(var(--primary-color), 0.1);
  outline: none;
}

.form-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.form-actions .btn {
  flex: 1;
  padding: 0.75rem;
  border-radius: var(--radius);
  font-weight: 500;
}

/* Quick Fill Section */
.quick-fill-section {
  background-color: hsl(var(--light-color));
  padding: 1rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
}

.quick-fill-section h6 {
  margin-bottom: 0.75rem;
  color: hsl(var(--text-secondary));
  font-size: 0.875rem;
}

.quick-fill-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.quick-fill-buttons .btn {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
}

/* Expense List — compact bank-statement style */
.expense-list {
  border: 1px solid hsl(var(--border-color));
  border-radius: var(--radius);
  overflow: hidden;
  background: hsl(var(--surface));
}

.expense-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid hsl(var(--border-color));
  background: hsl(var(--surface));
  position: relative;
}
.expense-item:last-child {
  border-bottom: none;
}

.expense-avatar {
  width: 32px;
  min-width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0;
}

.expense-info {
  flex: 1;
  min-width: 0;
}

.expense-description {
  font-weight: 600;
  font-size: 0.875rem;
  color: hsl(var(--text-primary));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.expense-meta {
  font-size: 0.7rem;
  color: hsl(var(--text-secondary));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
  line-height: 1.4;
}

.expense-tag-pill {
  display: inline-block;
  background: hsl(var(--border-color));
  border-radius: 3px;
  padding: 0 4px;
  font-size: 0.62rem;
  margin-left: 4px;
  vertical-align: middle;
}

.expense-right {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  flex-shrink: 0;
}

.expense-amount {
  font-size: 0.9rem;
  font-weight: 700;
  color: hsl(var(--danger-color));
  white-space: nowrap;
}

.expense-menu-wrap {
  position: relative;
}

.expense-menu-btn {
  background: none;
  border: none;
  padding: 0.3rem 0.45rem;
  cursor: pointer;
  color: hsl(var(--text-secondary));
  border-radius: 6px;
  line-height: 1;
  font-size: 0.95rem;
}
.expense-menu-btn:hover {
  background: hsl(var(--border-color));
  color: hsl(var(--text-primary));
}

.expense-menu-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 2px);
  z-index: 200;
  background: hsl(var(--surface));
  border: 1px solid hsl(var(--border-color));
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.13);
  min-width: 130px;
  overflow: hidden;
}
.expense-menu-dropdown button {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 0.55rem 0.875rem;
  background: none;
  border: none;
  font-size: 0.85rem;
  cursor: pointer;
  text-align: left;
  color: hsl(var(--text-primary));
  gap: 0.5rem;
}
.expense-menu-dropdown button:hover {
  background: hsl(var(--border-color));
}
.expense-menu-dropdown button.danger {
  color: hsl(var(--danger-color));
}

/* Expense Total */
.expense-total {
  background-color: hsl(var(--primary-color));
  color: white;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.875rem;
}

.expense-total-multi {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.expense-total-item {
  background-color: hsl(var(--primary-color));
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: calc(var(--radius) / 2);
  font-weight: 600;
  font-size: 0.75rem;
  text-align: center;
}

/* Filters */
.filters-section {
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.search-box {
  width: 100%;
}

.filter-row {
  display: flex;
  gap: 0.5rem;
}

.filter-row .form-select {
  flex: 1;
  font-size: 0.875rem;
  padding: 0.5rem;
}

/* Category Management */
.add-category-section {
  background-color: hsl(var(--light-color));
  padding: 1rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
}

.add-category-section h5 {
  margin-bottom: 0.75rem;
  color: hsl(var(--text-primary));
}

.add-form .input-group {
  display: flex;
}

.add-form .form-control {
  flex: 1;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.add-form .btn {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.categories-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.category-item {
  background-color: hsl(var(--surface));
  border: 1px solid hsl(var(--border-color));
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
}

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

.category-info h6 {
  margin: 0;
  font-weight: 600;
  color: hsl(var(--text-primary));
}

.subcategory-count {
  font-size: 0.75rem;
  color: hsl(var(--text-secondary));
}

.category-actions {
  display: flex;
  gap: 0.5rem;
}

.category-actions .btn {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
}

.subcategories-list {
  margin-top: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.subcategory-item {
  background-color: hsl(var(--secondary-color));
  padding: 0.25rem 0.5rem;
  border-radius: calc(var(--radius) / 2);
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.subcategory-item .btn {
  padding: 0;
  width: 1rem;
  height: 1rem;
  font-size: 0.625rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.add-subcategory-form {
  margin-top: 0.75rem;
}

/* Income Components */
.income-form-section {
  background-color: hsl(var(--light-color));
  padding: 1rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
}

.income-form-section h5 {
  margin-bottom: 1rem;
  color: hsl(var(--text-primary));
}

.income-total {
  background-color: hsl(var(--success-color));
  color: white;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.875rem;
}

.income-history {
  margin-top: 2rem;
}

.income-history h5 {
  margin-bottom: 1rem;
  color: hsl(var(--text-primary));
}

/* Income List — mirrors the Expense List's compact bank-statement style */
.income-list {
  border: 1px solid hsl(var(--border-color));
  border-radius: var(--radius);
  overflow: hidden;
  background: hsl(var(--surface));
}

.income-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid hsl(var(--border-color));
  background: hsl(var(--surface));
  position: relative;
}
.income-item:last-child {
  border-bottom: none;
}

.income-avatar {
  width: 32px;
  min-width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0;
}

.income-info {
  flex: 1;
  min-width: 0;
}

.income-source {
  font-weight: 600;
  font-size: 0.875rem;
  color: hsl(var(--text-primary));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.income-meta {
  font-size: 0.7rem;
  color: hsl(var(--text-secondary));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
  line-height: 1.4;
}

.income-right {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  flex-shrink: 0;
}

.income-amount {
  font-size: 0.9rem;
  font-weight: 700;
  color: hsl(var(--success-color));
  white-space: nowrap;
}

.income-menu-wrap {
  position: relative;
}

.income-menu-btn {
  background: none;
  border: none;
  padding: 0.3rem 0.45rem;
  cursor: pointer;
  color: hsl(var(--text-secondary));
  border-radius: 6px;
  line-height: 1;
  font-size: 0.95rem;
}
.income-menu-btn:hover {
  background: hsl(var(--border-color));
  color: hsl(var(--text-primary));
}

.income-menu-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 2px);
  z-index: 200;
  background: hsl(var(--surface));
  border: 1px solid hsl(var(--border-color));
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.13);
  min-width: 130px;
  overflow: hidden;
}
.income-menu-dropdown button {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 0.55rem 0.875rem;
  background: none;
  border: none;
  font-size: 0.85rem;
  cursor: pointer;
  text-align: left;
  color: hsl(var(--text-primary));
  gap: 0.5rem;
}
.income-menu-dropdown button:hover {
  background: hsl(var(--border-color));
}
.income-menu-dropdown button.danger {
  color: hsl(var(--danger-color));
}

.income-total-multi {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.income-total-item {
  background-color: hsl(var(--success-color));
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: calc(var(--radius) / 2);
  font-weight: 600;
  font-size: 0.75rem;
  text-align: center;
}

/* Summary Components */
.summary-filters {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.summary-filters .form-select {
  width: auto;
  min-width: 120px;
  font-size: 0.875rem;
}

.summary-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
}

.summary-card {
  background-color: hsl(var(--surface));
  border: 1px solid hsl(var(--border-color));
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.summary-card.income .card-icon {
  background-color: hsl(var(--success-color));
}

.summary-card.expense .card-icon {
  background-color: hsl(var(--danger-color));
}

.summary-card.positive .card-icon {
  background-color: hsl(var(--success-color));
}

.summary-card.negative .card-icon {
  background-color: hsl(var(--danger-color));
}

.summary-card.info .card-icon {
  background-color: hsl(var(--info-color));
}

.card-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.25rem;
}

.card-content {
  flex: 1;
}

.card-content h6 {
  margin: 0 0 0.25rem 0;
  font-size: 0.75rem;
  text-transform: uppercase;
  color: hsl(var(--text-secondary));
  font-weight: 600;
}

.card-content .amount {
  font-size: 1.125rem;
  font-weight: 700;
  color: hsl(var(--text-primary));
}

.card-content .trend {
  font-size: 0.75rem;
  margin-top: 0.25rem;
}

.trend.positive {
  color: hsl(var(--success-color));
}

.trend.negative {
  color: hsl(var(--danger-color));
}

.category-breakdown {
  margin-bottom: 2rem;
}

.category-breakdown h5 {
  margin-bottom: 1rem;
  color: hsl(var(--text-primary));
}

.category-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.category-breakdown-item {
  background-color: hsl(var(--surface));
  border: 1px solid hsl(var(--border-color));
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
}

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

.category-name {
  font-weight: 600;
  color: hsl(var(--text-primary));
}

.category-details {
  font-size: 0.75rem;
  color: hsl(var(--text-secondary));
}

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

.category-amount .amount {
  font-weight: 600;
  color: hsl(var(--text-primary));
}

.category-amount .percentage {
  font-size: 0.875rem;
  color: hsl(var(--text-secondary));
}

.category-bar {
  background-color: hsl(var(--secondary-color));
  height: 0.5rem;
  border-radius: calc(var(--radius) / 2);
  overflow: hidden;
}

.bar-fill {
  background-color: hsl(var(--primary-color));
  height: 100%;
  transition: width 0.3s ease;
}

.top-spending-days {
  margin-bottom: 2rem;
}

.top-spending-days h5 {
  margin-bottom: 1rem;
  color: hsl(var(--text-primary));
}

.spending-days-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.spending-day-item {
  background-color: hsl(var(--surface));
  border: 1px solid hsl(var(--border-color));
  border-radius: var(--radius);
  padding: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.day-rank {
  background-color: hsl(var(--primary-color));
  color: white;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
}

.day-info {
  flex: 1;
}

.day-date {
  font-weight: 500;
  color: hsl(var(--text-primary));
}

.day-amount {
  font-weight: 600;
  color: hsl(var(--danger-color));
}

.quick-stats {
  margin-bottom: 2rem;
}

.quick-stats h5 {
  margin-bottom: 1rem;
  color: hsl(var(--text-primary));
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.stat-item {
  background-color: hsl(var(--surface));
  border: 1px solid hsl(var(--border-color));
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
}

.stat-label {
  font-size: 0.75rem;
  color: hsl(var(--text-secondary));
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  font-weight: 600;
}

.stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: hsl(var(--text-primary));
}

/* Success Message */
.success-message {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1rem;
  color: hsl(var(--success-color));
}

.success-message i {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.success-message h3 {
  color: hsl(var(--text-primary));
}

/* Empty State */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1rem;
  color: hsl(var(--text-secondary));
}

.empty-state i {
  margin-bottom: 1rem;
  opacity: 0.5;
}

.empty-state h4 {
  margin-bottom: 0.5rem;
  color: hsl(var(--text-primary));
}

/* Button Customizations */
.btn-primary {
  background-color: hsl(var(--primary-color));
  border-color: hsl(var(--primary-color));
}

.btn-primary:hover {
  background-color: hsl(217 91% 50%);
  border-color: hsl(217 91% 50%);
}

.btn-success {
  background-color: hsl(var(--success-color));
  border-color: hsl(var(--success-color));
}

.btn-danger {
  background-color: hsl(var(--danger-color));
  border-color: hsl(var(--danger-color));
}

/* Responsive Design */
@media (max-width: 480px) {
  .mobile-app {
    max-width: 100%;
  }
  
  .bottom-navigation {
    max-width: 100%;
    padding: 0.2rem 0.05rem;
  }
  
  .nav-item {
    padding: 0.2rem;
    min-width: 45px;
    max-width: 60px;
  }
  
  .nav-item i {
    font-size: 1rem;
  }
  
  .nav-item span {
    font-size: 0.6rem;
  }
  
  .summary-cards {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  
  .filter-row {
    flex-direction: column;
  }
  
  .form-actions {
    flex-direction: column;
  }
}

/* Modal Overrides */
.modal-content {
  border-radius: var(--radius);
  border: none;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.modal-header {
  border-bottom: 1px solid hsl(var(--border-color));
}

.modal-footer {
  border-top: 1px solid hsl(var(--border-color));
}

/* Loading States */
.spinner-border-sm {
  width: 1rem;
  height: 1rem;
}

/* Focus States */
.btn:focus,
.form-control:focus,
.form-select:focus {
  box-shadow: 0 0 0 3px hsla(var(--primary-color), 0.2);
}

/* Edit Category Form */
.edit-category-form {
  flex: 1;
  margin-right: 1rem;
}

.edit-category-form .form-control {
  font-weight: 600;
}

/* Filter Info Styling */
.card-content .filter-info {
  font-size: 0.7rem;
  color: hsl(var(--primary-color));
  font-weight: 500;
  margin-top: 0.25rem;
  padding: 2px 6px;
  background: hsla(var(--primary-color), 0.1);
  border-radius: 4px;
  display: inline-block;
}

/* Summary Filters */
.summary-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: end;
  margin-top: 1rem;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.filter-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: hsl(var(--text-primary));
  margin: 0;
}

.filter-group .form-select {
  min-width: 180px;
}

/* Budget Management Styles */
.budget-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

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

.screen-header h2 {
  margin: 0;
}

.budget-section {
  background: hsl(var(--card-background));
  border: 1px solid hsl(var(--border-color));
  border-radius: var(--radius);
  padding: 1rem;
  margin-top: 1rem;
}

.category-budget {
  margin-bottom: 1rem;
}

.category-budget .form-label {
  font-weight: 500;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  color: hsl(var(--text-primary));
}

.subcategory-budget-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: hsl(var(--text-primary));
  margin-bottom: 0.75rem;
  margin-top: 1rem;
}

.subcategory-budget-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
}

.subcategory-budget-item .form-label {
  font-size: 0.8rem;
  font-weight: 400;
  margin-bottom: 0.25rem;
  color: hsl(var(--text-secondary));
}

/* Budget Overview in Summary */
.budget-overview {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.budget-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid hsl(var(--border-color));
}

.budget-item:last-child {
  border-bottom: none;
}

.budget-info {
  flex: 1;
}

.budget-name {
  font-weight: 500;
  color: hsl(var(--text-primary));
  margin-bottom: 0.25rem;
}

.budget-bar {
  width: 100%;
  height: 8px;
  background: hsl(var(--border-color));
  border-radius: 4px;
  overflow: hidden;
  margin: 0.5rem 0;
}

.budget-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s ease;
}

.budget-bar-fill.under-budget {
  background: hsl(var(--success-color));
}

.budget-bar-fill.over-budget {
  background: hsl(var(--danger-color));
}

.budget-bar-fill.near-budget {
  background: hsl(var(--warning-color));
}

.budget-amounts {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
}

.budget-spent {
  color: hsl(var(--text-secondary));
}

.budget-remaining {
  font-weight: 500;
}

.budget-remaining.positive {
  color: hsl(var(--success-color));
}

.budget-remaining.negative {
  color: hsl(var(--danger-color));
}

.password-strength {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.4rem;
}

.password-strength-bar {
  flex: 1;
  height: 6px;
  background: hsl(var(--border-color));
  border-radius: 3px;
  overflow: hidden;
}

.password-strength-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.2s ease, background-color 0.2s ease;
}

.password-strength-fill.weak {
  background: hsl(var(--danger-color));
}

.password-strength-fill.fair {
  background: hsl(var(--warning-color));
}

.password-strength-fill.strong {
  background: hsl(var(--success-color));
}

.password-strength-label {
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}

.password-strength-label.weak {
  color: hsl(var(--danger-color));
}

.password-strength-label.fair {
  color: hsl(var(--warning-color));
}

.password-strength-label.strong {
  color: hsl(var(--success-color));
}

/* Inline Budget Inputs */
.category-budget-inline {
  background: hsl(var(--card-background));
  border: 1px solid hsl(var(--border-color));
  border-radius: var(--radius);
  padding: 1rem;
  margin-top: 1rem;
}

.budget-mode-toggle {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid hsl(var(--border-color) / 0.3);
}

.budget-mode-toggle .form-check-label {
  font-size: 0.875rem;
  color: hsl(var(--text-secondary));
  margin-left: 0.25rem;
}

.budget-input-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.budget-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: hsl(var(--text-primary));
  margin: 0;
  min-width: 130px;
}

.budget-input {
  max-width: 150px;
}

/* Subcategory Budget Styling */
.subcategory-budgets {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid hsl(var(--border-color) / 0.3);
}

.subcategory-budget-header h6 {
  margin: 0 0 0.75rem;
  font-size: 0.875rem;
  color: hsl(var(--text-secondary));
  font-weight: 600;
}

.subcategory-budget-row {
  margin-bottom: 0.75rem;
}

.subcategory-label {
  min-width: 100px;
  font-size: 0.85rem;
  color: hsl(var(--text-secondary));
  padding-left: 1rem;
}

/* Category Total Budget */
.category-total-budget {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid hsl(var(--border-color));
}

.total-budget-display {
  padding: 0.75rem;
  background: linear-gradient(135deg, hsl(var(--success-color) / 0.1) 0%, hsl(var(--primary-color) / 0.1) 100%);
  border-radius: var(--radius);
  text-align: center;
  color: hsl(var(--primary-color));
  border: 1px solid hsl(var(--primary-color) / 0.2);
}

/* Total Budget Summary */
.total-budget-summary {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 2px solid hsl(var(--border-color));
}

.budget-summary-card {
  background: linear-gradient(135deg, hsl(var(--primary-color)) 0%, hsl(217 91% 50%) 100%);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  color: white;
}

.summary-content {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.summary-icon {
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.summary-info h5 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  opacity: 0.9;
}

.total-amount {
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.summary-note {
  font-size: 0.875rem;
  opacity: 0.8;
}

/* Currency Settings */
.currency-settings {
  padding: 1rem;
}

.settings-header {
  margin-bottom: 2rem;
  text-align: center;
}

.settings-header h5 {
  margin-bottom: 0.5rem;
  color: hsl(var(--primary-color));
}

.currency-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
}

.currency-option {
  background: hsl(var(--card-background));
  border: 2px solid hsl(var(--border-color));
  border-radius: 12px;
  padding: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 1rem;
  position: relative;
}

.currency-option:hover {
  border-color: hsl(var(--primary-color));
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.currency-option.selected {
  border-color: hsl(var(--primary-color));
  background: linear-gradient(135deg, hsl(var(--primary-color) / 0.1) 0%, hsl(var(--primary-color) / 0.05) 100%);
}

.currency-symbol {
  width: 50px;
  height: 50px;
  background: hsl(var(--primary-color));
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: bold;
  flex-shrink: 0;
}

.currency-details {
  flex: 1;
}

.currency-code {
  font-weight: bold;
  font-size: 1.1rem;
  color: hsl(var(--text-primary));
}

.currency-name {
  font-size: 0.9rem;
  color: hsl(var(--text-secondary));
}

.currency-check {
  color: hsl(var(--success-color));
  font-size: 1.25rem;
}

.current-setting {
  text-align: center;
  padding: 1rem;
  background: hsl(var(--card-background));
  border-radius: 8px;
  border: 1px solid hsl(var(--border-color));
}

.budget-currency-mismatch {
  flex: 1;
}

.mismatch-info {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.mismatch-info .badge {
  font-size: 0.8rem;
  font-weight: 500;
}

.mismatch-info .btn {
  font-size: 0.75rem;
  white-space: nowrap;
}
