:root {
  --background: 0 0% 100%;
  --foreground: 222.2 84% 4.9%;
  --card: 0 0% 100%;
  --card-foreground: 222.2 84% 4.9%;
  --primary: 262 83% 58%;
  --primary-foreground: 210 40% 98%;
  --secondary: 210 40% 96%;
  --secondary-foreground: 222.2 84% 4.9%;
  --muted: 210 40% 96%;
  --muted-foreground: 215.4 16.3% 46.9%;
  --border: 214.3 31.8% 91.4%;
  --input: 214.3 31.8% 91.4%;
  --ring: 262 83% 58%;
  --radius: 0.75rem;
}

.dark {
  --background: 222.2 84% 4.9%;
  --foreground: 210 40% 98%;
  --card: 222.2 84% 4.9%;
  --card-foreground: 210 40% 98%;
  --primary: 262 83% 68%;
  --primary-foreground: 222.2 47.4% 11.2%;
  --secondary: 217.2 32.6% 17.5%;
  --secondary-foreground: 210 40% 98%;
  --muted: 217.2 32.6% 17.5%;
  --muted-foreground: 215 20.2% 65.1%;
  --border: 217.2 32.6% 17.5%;
  --input: 217.2 32.6% 17.5%;
  --ring: 262 83% 68%;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  min-height: 100vh;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Prevenir zoom en inputs en iOS */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
  select,
  textarea,
  input {
    font-size: 16px !important;
  }
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(59, 130, 246, 0.1) 100%);
}

.auth-card {
  background: hsl(var(--card));
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 400px;
  border: 1px solid hsl(var(--border));
}

.logo {
  text-align: center;
  margin-bottom: 30px;
}

.logo h1 {
  font-size: 32px;
  font-weight: 700;
  background: linear-gradient(135deg, hsl(var(--primary)), #8b5cf6, #3b82f6);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 500;
  color: hsl(var(--foreground));
}

.form-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid hsl(var(--border));
  border-radius: calc(var(--radius) * 0.5);
  font-size: 14px;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  transition: border-color 0.2s;
}

.form-input:focus {
  outline: none;
  border-color: hsl(var(--primary));
  box-shadow: 0 0 0 3px hsl(var(--primary) / 0.1);
}

.form-select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid hsl(var(--border));
  border-radius: calc(var(--radius) * 0.5);
  font-size: 14px;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  cursor: pointer;
}

.btn {
  display: inline-block;
  padding: 10px 20px;
  border: none;
  border-radius: calc(var(--radius) * 0.5);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, hsl(var(--primary)), #8b5cf6);
  color: white;
  width: 100%;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(139, 92, 246, 0.3);
}

.btn-secondary {
  background: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
}

.header {
  background: hsl(var(--card));
  border-bottom: 1px solid hsl(var(--border));
  padding: 20px 0;
  margin-bottom: 30px;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Modern Period Selector */
.modern-period-selector {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  margin-top: 20px;
  padding: 12px 16px;
  background: linear-gradient(135deg, hsl(var(--primary)), #8b5cf6);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.2);
}

.modern-period-nav {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.modern-period-nav:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}

.modern-period-nav:active {
  transform: scale(0.95);
}

.modern-period-display {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 200px;
  cursor: pointer;
  padding: 8px 16px;
  border-radius: 12px;
  transition: all 0.3s ease;
}

.modern-period-display:hover {
  background: rgba(255, 255, 255, 0.1);
}

.period-month {
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
  letter-spacing: -0.5px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.period-year {
  font-size: 1rem;
  font-weight: 500;
  color: white;
  opacity: 0.9;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Period Dropdown */
.period-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) scale(0.95);
  background: hsl(var(--background));
  border: 1px solid hsl(var(--border));
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 320px;
}

.period-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) scale(1);
}

.period-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.period-months {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.month-btn, .year-btn {
  background: hsl(var(--secondary));
  color: hsl(var(--foreground));
  border: 1px solid transparent;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  text-align: center;
}

.month-btn:hover, .year-btn:hover {
  background: rgba(139, 92, 246, 0.1);
  border-color: rgba(139, 92, 246, 0.3);
  transform: translateY(-2px);
}

.month-btn.active, .year-btn.active {
  background: linear-gradient(135deg, hsl(var(--primary)), #8b5cf6);
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 10px rgba(139, 92, 246, 0.3);
}

.period-years {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.header h1 {
  font-size: 24px;
  background: linear-gradient(135deg, hsl(var(--primary)), #8b5cf6, #3b82f6);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 20px;
}

.user-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.btn-icon {
  margin-right: 5px;
  font-size: 16px;
  vertical-align: middle;
}

.btn-text {
  vertical-align: middle;
}

.user-email {
  color: hsl(var(--muted-foreground));
  font-size: 14px;
}

.btn-logout {
  background: transparent;
  color: hsl(var(--primary));
  border: 1px solid hsl(var(--primary));
  padding: 8px 16px;
}

.btn-logout:hover {
  background: hsl(var(--primary));
  color: white;
}

.operation-form {
  background: hsl(var(--card));
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  border: 1px solid hsl(var(--border));
  margin-bottom: 30px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.operations-list {
  background: hsl(var(--card));
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  border: 1px solid hsl(var(--border));
}

.operations-table {
  width: 100%;
  border-collapse: collapse;
}

.operations-table th {
  text-align: left;
  padding: 12px;
  border-bottom: 2px solid hsl(var(--border));
  font-weight: 600;
  color: hsl(var(--muted-foreground));
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.operations-table td {
  padding: 12px;
  border-bottom: 1px solid hsl(var(--border));
}

.operations-table tr:hover {
  background: hsl(var(--muted));
}

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

.amount.positive {
  color: #10b981;
}

.payment-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  background: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
}

.category-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  color: white;
}

.category-badge.necesidades {
  background: linear-gradient(45deg, #10b981, #059669);
}

.category-badge.gustos {
  background: linear-gradient(45deg, #f59e0b, #d97706);
}

.category-badge.ahorro {
  background: linear-gradient(45deg, #3b82f6, #2563eb);
}

.installments-field {
  display: none;
}

.installments-field.show {
  display: block;
}

.btn-delete {
  background: transparent;
  border: none;
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s;
  color: #ef4444;
}

.btn-delete:hover {
  background: rgba(239, 68, 68, 0.1);
  transform: scale(1.1);
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-content {
  background: hsl(var(--card));
  border-radius: var(--radius);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 450px;
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid hsl(var(--border));
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid hsl(var(--border));
}

.modal-header h2 {
  margin: 0;
  color: hsl(var(--foreground));
  font-size: 18px;
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: hsl(var(--muted-foreground));
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s;
}

.modal-close:hover {
  background: hsl(var(--muted));
  color: hsl(var(--foreground));
}

.modal-body {
  padding: 20px;
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.form-actions .btn {
  flex: 1;
}

.alert {
  padding: 12px 16px;
  border-radius: calc(var(--radius) * 0.5);
  margin-bottom: 20px;
}

.alert-success {
  background: #10b981;
  color: white;
}

.alert-error {
  background: #ef4444;
  color: white;
}

.auth-link {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  color: hsl(var(--muted-foreground));
}

.auth-link a {
  color: hsl(var(--primary));
  text-decoration: none;
  font-weight: 500;
}

.auth-link a:hover {
  text-decoration: underline;
}

.theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.theme-toggle:hover {
  transform: scale(1.1);
}

.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid hsl(var(--border));
  border-top-color: hsl(var(--primary));
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 15px;
  }

  .header {
    padding: 15px 0;
  }

  .header-content {
    flex-direction: column;
    gap: 15px;
    text-align: center;
    padding: 0 15px;
  }

  .header h1 {
    font-size: 20px;
  }
  
  /* Modern Period Selector Responsive */
  .modern-period-selector {
    width: 100%;
    justify-content: center;
    margin: 15px 0;
    padding: 10px 12px;
    gap: 12px;
  }
  
  .modern-period-nav {
    width: 35px;
    height: 35px;
  }
  
  .modern-period-nav svg {
    width: 18px;
    height: 18px;
  }
  
  .period-month {
    font-size: 1.2rem;
  }
  
  .period-year {
    font-size: 0.9rem;
  }
  
  .modern-period-display {
    min-width: 150px;
    padding: 6px 12px;
  }
  
  .period-dropdown {
    min-width: 280px;
    padding: 15px;
    left: 0;
    right: 0;
    margin: 0 auto;
    transform: translateX(0) scale(0.95);
  }
  
  .period-dropdown.show {
    transform: translateX(0) scale(1);
  }
  
  .period-months {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }
  
  .month-btn, .year-btn {
    padding: 8px 10px;
    font-size: 13px;
  }

  .user-info {
    flex-direction: column;
    width: 100%;
    gap: 10px;
    order: 3;
  }

  .user-actions {
    flex-direction: column;
    width: 100%;
    max-width: 250px;
  }

  .user-email {
    font-size: 12px;
    margin-bottom: 5px;
  }

  .btn {
    font-size: 13px;
    padding: 8px 16px;
  }

  .btn-logout, .btn-secondary {
    width: 100%;
  }

  .btn-icon {
    font-size: 14px;
  }

  .operation-form {
    padding: 20px;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .operations-list {
    padding: 20px;
    overflow-x: auto;
  }

  .operations-table {
    font-size: 12px;
    min-width: 500px;
  }

  .operations-table th,
  .operations-table td {
    padding: 8px;
  }

  .modal-content {
    margin: 10px;
    max-width: calc(100% - 20px);
  }

  .modal-header {
    padding: 15px;
  }

  .modal-body {
    padding: 15px;
  }

  .auth-card {
    margin: 20px;
    padding: 30px 20px;
  }

  .logo h1 {
    font-size: 28px;
  }

  .analysis-section {
    padding: 20px;
  }

  .analysis-grid {
    grid-template-columns: 1fr;
  }

  .income-form {
    flex-direction: column;
    align-items: stretch;
  }

  .income-form input {
    margin-bottom: 10px;
    max-width: none;
  }
}

@media (max-width: 480px) {
  .header h1 {
    font-size: 18px;
  }

  .operations-table {
    font-size: 11px;
  }

  .btn {
    font-size: 12px;
    padding: 8px 12px;
  }

  .btn-text {
    display: none;
  }

  .btn-icon {
    margin-right: 0;
    font-size: 18px;
  }

  .operation-form h2,
  .operations-list h2 {
    font-size: 16px;
  }

  .form-label {
    font-size: 13px;
  }

  .form-input,
  .form-select {
    font-size: 14px;
    padding: 8px 10px;
  }

  .payment-badge {
    font-size: 10px;
    padding: 2px 4px;
  }

  .modal-content {
    margin: 5px;
  }
}

/* Para pantallas medianas, mostrar texto */
@media (min-width: 481px) and (max-width: 768px) {
  .btn-text {
    display: inline;
  }
}

/* Scroll horizontal para tabla en móviles */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: calc(var(--radius) * 0.5);
  border: 1px solid hsl(var(--border));
}

.operations-table {
  min-width: 600px;
  width: 100%;
  border-collapse: collapse;
}

/* Indicador de scroll en móviles */
@media (max-width: 768px) {
  .table-wrapper {
    box-shadow: inset -10px 0 10px -10px rgba(0,0,0,0.1);
  }
  
  .table-wrapper::-webkit-scrollbar {
    height: 8px;
  }
  
  .table-wrapper::-webkit-scrollbar-track {
    background: hsl(var(--muted));
    border-radius: 4px;
  }
  
  .table-wrapper::-webkit-scrollbar-thumb {
    background: hsl(var(--primary));
    border-radius: 4px;
  }
}

/* Mejoras para el botón secundario */
.btn-secondary {
  background: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
  border: 1px solid hsl(var(--border));
}

.btn-secondary:hover {
  background: hsl(var(--muted));
  transform: translateY(-1px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Estilos para análisis 50/30/20 */
.analysis-section {
  background: hsl(var(--card));
  border-radius: var(--radius);
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  border: 1px solid hsl(var(--border));
}

.analysis-section h2 {
  margin-bottom: 20px;
  color: hsl(var(--foreground));
  font-size: 20px;
}

.income-form {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 15px;
}

.income-form input {
  flex: 1;
  max-width: 300px;
}

.analysis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.category-card {
  background: hsl(var(--background));
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid hsl(var(--border));
}

.category-card.necesidades {
  border-left: 4px solid #10b981;
}

.category-card.gustos {
  border-left: 4px solid #f59e0b;
}

.category-card.ahorro {
  border-left: 4px solid #3b82f6;
}

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

.category-header h3 {
  margin: 0;
  font-size: 16px;
  color: hsl(var(--foreground));
}

.category-percentage {
  background: hsl(var(--primary));
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}

.progress-bar {
  background: hsl(var(--muted));
  border-radius: 4px;
  height: 8px;
  margin-bottom: 15px;
  overflow: hidden;
}

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

.progress-fill.necesidades {
  background: linear-gradient(45deg, #10b981, #059669);
}

.progress-fill.gustos {
  background: linear-gradient(45deg, #f59e0b, #d97706);
}

.progress-fill.ahorro {
  background: linear-gradient(45deg, #3b82f6, #2563eb);
}

.category-details {
  font-size: 14px;
}

.category-amounts {
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
}

.spent {
  font-weight: 600;
  color: hsl(var(--foreground));
}

.budget {
  color: hsl(var(--muted-foreground));
}

.category-remaining {
  font-size: 12px;
  color: hsl(var(--muted-foreground));
}

.category-remaining.negative {
  color: #ef4444;
  font-weight: 600;
}

.category-remaining.positive {
  color: #10b981;
}

/* New centered analysis section */
.analysis-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  text-align: center;
  position: relative;
}

.analysis-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 25% 25%, hsl(var(--primary) / 0.02) 0%, transparent 60%),
    radial-gradient(circle at 75% 75%, hsl(var(--accent) / 0.02) 0%, transparent 60%),
    radial-gradient(circle at 50% 50%, hsl(var(--muted) / 0.01) 0%, transparent 100%);
  pointer-events: none;
  z-index: -1;
}

.analysis-header-main {
  margin-bottom: 3rem;
}

.analysis-header-main h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #3b82f6, #10b981, #f59e0b);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.analysis-subtitle {
  font-size: 1.1rem;
  color: hsl(var(--muted-foreground));
  margin-bottom: 2rem;
}

.summary-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.summary-card {
  background: linear-gradient(135deg, hsl(var(--card)), hsl(var(--card) / 0.95));
  border: 1px solid hsl(var(--border));
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.summary-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, hsl(var(--primary) / 0.03) 1px, transparent 1px);
  background-size: 20px 20px;
  opacity: 0.5;
  pointer-events: none;
}

.summary-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.summary-card-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.summary-card h3 {
  font-size: 0.9rem;
  font-weight: 600;
  color: hsl(var(--muted-foreground));
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.summary-card .amount {
  font-size: 1.8rem;
  font-weight: 700;
  color: hsl(var(--foreground));
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.category-card {
  background: linear-gradient(135deg, hsl(var(--card)), hsl(var(--card) / 0.98));
  border: 1px solid hsl(var(--border));
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.category-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--category-color);
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.category-card:hover .circular-chart {
  transform: rotate(-90deg) scale(1.05);
}

.category-card:hover .percentage {
  transform: translate(-50%, -50%) scale(1.1);
}

.category-card.necesidades {
  --category-color: #10b981;
}

.category-card.gustos {
  --category-color: #f59e0b;
}

.category-card.ahorro {
  --category-color: #3b82f6;
}

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

.category-icon {
  font-size: 1.5rem;
}

.category-header h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0;
}

.chart-container {
  position: relative;
  width: 150px;
  height: 150px;
  margin: 0 auto 1.5rem;
}

.circular-chart {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
  transition: transform 0.3s ease;
}

.circle-bg {
  fill: none;
  stroke: hsl(var(--muted));
  stroke-width: 8;
}

.circle {
  fill: none;
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dashoffset 1.5s cubic-bezier(0.4, 0, 0.2, 1);
  stroke-dasharray: 446; /* 2 * π * 71 */
  stroke-dashoffset: 446;
}

.circle.necesidades {
  stroke: #10b981;
}

.circle.gustos {
  stroke: #f59e0b;
}

.circle.ahorro {
  stroke: #3b82f6;
}

.percentage {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.8rem;
  font-weight: 700;
  color: hsl(var(--foreground));
  transition: transform 0.3s ease;
}

.percentage-small {
  font-size: 0.9rem;
  color: hsl(var(--muted-foreground));
}

.category-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  text-align: left;
}

.stat-item {
  padding: 0.75rem;
  background: hsl(var(--muted) / 0.3);
  border-radius: 8px;
}

.stat-label {
  font-size: 0.8rem;
  color: hsl(var(--muted-foreground));
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  font-size: 1.1rem;
  font-weight: 600;
  color: hsl(var(--foreground));
}

.stat-value.negative {
  color: #ef4444;
}

.stat-value.positive {
  color: #10b981;
}

/* Entrance animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInFromLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.analysis-section {
  animation: fadeInUp 0.8s ease-out;
}

.summary-card {
  animation: slideInFromLeft 0.6s ease-out;
  animation-fill-mode: both;
}

.summary-card:nth-child(1) { animation-delay: 0.1s; }
.summary-card:nth-child(2) { animation-delay: 0.2s; }
.summary-card:nth-child(3) { animation-delay: 0.3s; }

.category-card {
  animation: scaleIn 0.7s ease-out;
  animation-fill-mode: both;
}

.category-card:nth-child(1) { animation-delay: 0.4s; }
.category-card:nth-child(2) { animation-delay: 0.5s; }
.category-card:nth-child(3) { animation-delay: 0.6s; }

/* Pulse animation for percentage when updating */
.percentage.updating {
  animation: pulse 0.5s ease-in-out;
}

@keyframes pulse {
  0% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.15); }
  100% { transform: translate(-50%, -50%) scale(1); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .analysis-section {
    padding: 1rem;
  }
  
  .analysis-header-main h2 {
    font-size: 2rem;
  }
  
  .categories-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .category-card {
    padding: 1.5rem;
  }
  
  .chart-container {
    width: 120px;
    height: 120px;
  }
  
  .percentage {
    font-size: 1.5rem;
  }
  
  .summary-cards {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  .category-stats {
    grid-template-columns: 1fr;
  }
}

/* Estilos para círculos de progreso SVG */
.circular-progress {
  transform: rotate(-90deg);
  transition: all 0.3s ease;
}

.progress-circle {
  fill: none;
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dashoffset 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.necesidades-circle {
  stroke: #10b981;
}

.gustos-circle {
  stroke: #f59e0b;
}

.ahorro-circle {
  stroke: #3b82f6;
}

.bg-circle {
  fill: none;
  stroke: hsl(var(--muted));
  stroke-width: 8;
}

.chart-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.chart-percentage {
  font-size: 1.2rem;
  font-weight: 700;
  color: hsl(var(--foreground));
  line-height: 1.2;
}

.chart-label {
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
  margin-top: 2px;
}

/* Estilos para remainig amount con colores */
.remaining.positive {
  color: #10b981;
}

.remaining.negative {
  color: #ef4444;
}

/* Estilos para secciones colapsibles */
.collapsible {
  margin-bottom: 20px;
}

.collapsible-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  padding: 15px 0;
  border-bottom: 1px solid hsl(var(--border));
  transition: all 0.3s ease;
}

.collapsible-header:hover {
  background: hsl(var(--muted) / 0.3);
  border-radius: 8px;
  padding: 15px 20px;
}

.collapsible-header h2 {
  margin: 0;
  font-size: 1.3rem;
  color: hsl(var(--foreground));
}

.collapsible-toggle {
  font-size: 1.2rem;
  font-weight: bold;
  color: hsl(var(--muted-foreground));
  transition: transform 0.3s ease;
}

.collapsible-toggle.open {
  transform: rotate(180deg);
}

.collapsible-content {
  padding: 20px 0;
  transition: all 0.3s ease;
}

.collapsible-content form {
  margin-top: 10px;
}

/* Estilos para info-box */
.income-info {
  margin-top: 20px;
}

.info-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px;
  background: hsl(var(--muted) / 0.3);
  border: 1px solid hsl(var(--border));
  border-radius: 8px;
  color: hsl(var(--muted-foreground));
  font-size: 0.9rem;
}

.info-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}

/* Estilos modernos para categorías */
.modern-categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  margin-top: 30px;
}

.modern-category-card {
  background: hsl(var(--card));
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  border: 1px solid hsl(var(--border));
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.modern-category-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
}

.modern-category-card.necesidades::before {
  background: linear-gradient(90deg, #10b981, #059669);
}

.modern-category-card.gustos::before {
  background: linear-gradient(90deg, #f59e0b, #d97706);
}

.modern-category-card.ahorro::before {
  background: linear-gradient(90deg, #3b82f6, #2563eb);
}

.modern-category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.category-icon {
  font-size: 2rem;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: hsl(var(--muted) / 0.3);
}

.category-title h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: hsl(var(--foreground));
  margin: 0 0 4px 0;
}

.category-rule {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
}

.amount-display {
  margin-bottom: 20px;
}

.amount-main {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 8px;
}

.currency {
  font-size: 1.5rem;
  font-weight: 600;
  color: hsl(var(--muted-foreground));
}

.amount-main .value {
  font-size: 2.5rem;
  font-weight: 700;
  color: hsl(var(--foreground));
  line-height: 1;
}

.amount-details {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
}

.progress-bar-modern {
  height: 8px;
  background: hsl(var(--muted));
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 16px;
}

.progress-fill {
  height: 100%;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 4px;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.usage-percentage {
  font-size: 1.125rem;
  font-weight: 700;
  color: hsl(var(--foreground));
}

.remaining-amount {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
}

.remaining-amount.positive {
  color: #10b981;
}

.remaining-amount.negative {
  color: #ef4444;
}

/* Contenedor de gráficos */
.charts-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.chart-card {
  background: hsl(var(--card));
  border-radius: 16px;
  padding: 30px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  border: 1px solid hsl(var(--border));
  text-align: center;
  transition: all 0.3s ease;
}

.chart-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.chart-card h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: hsl(var(--foreground));
  margin: 0 0 8px 0;
}

.chart-card p {
  color: hsl(var(--muted-foreground));
  margin: 0 0 24px 0;
  font-size: 0.95rem;
}

.pie-legend {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 20px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  padding: 8px 12px;
  background: hsl(var(--muted) / 0.3);
  border-radius: 8px;
}

.legend-color {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.1);
}

/* Responsive para móviles */
@media (max-width: 768px) {
  .modern-categories-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .modern-category-card {
    padding: 20px;
  }
  
  .category-icon {
    font-size: 1.75rem;
    width: 48px;
    height: 48px;
  }
  
  .amount-main .value {
    font-size: 2rem;
  }
  
  .charts-container {
    grid-template-columns: 1fr;
    gap: 24px;
    margin-top: 30px;
  }
  
  .chart-card {
    padding: 24px;
  }
}

@media (max-width: 480px) {
  .card-footer {
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
  }
  
  .pie-legend {
    flex-direction: column;
    gap: 12px;
  }
  
  .legend-item {
    justify-content: flex-start;
    width: 100%;
  }
}

/* ====================================
   DASHBOARD EJECUTIVO
   ==================================== */

.executive-dashboard {
  background: linear-gradient(135deg, hsl(var(--background)) 0%, hsl(214, 15%, 98%) 100%);
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
  margin-bottom: 32px;
  overflow: hidden;
}

.dashboard-header {
  background: linear-gradient(135deg, hsl(var(--primary)) 0%, hsl(262, 83%, 68%) 100%);
  color: white;
  padding: 32px;
  text-align: center;
}

.dashboard-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 8px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.dashboard-subtitle {
  font-size: 1.2rem;
  opacity: 0.9;
  font-weight: 400;
}

/* Panel de Configuración */
.setup-panel {
  padding: 60px 32px;
  text-align: center;
  background: white;
}

.setup-content {
  max-width: 500px;
  margin: 0 auto;
}

.setup-icon {
  font-size: 4rem;
  margin-bottom: 24px;
  display: block;
}

.setup-content h2 {
  font-size: 2rem;
  font-weight: 600;
  color: hsl(var(--foreground));
  margin-bottom: 16px;
}

.setup-content p {
  font-size: 1.1rem;
  color: hsl(var(--muted-foreground));
  line-height: 1.6;
}

/* Panel Principal */
.main-panel {
  background: white;
  padding: 32px;
  line-height: 1.6;
}

/* KPIs Principales */
.kpi-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.kpi-card {
  background: white;
  border: 1px solid hsl(var(--border));
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  transition: all 0.3s ease;
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.kpi-card.income {
  border-left: 4px solid #10b981;
}

.kpi-card.expenses {
  border-left: 4px solid #f59e0b;
}

.kpi-card.balance {
  border-left: 4px solid hsl(var(--primary));
}

.kpi-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.kpi-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: hsl(var(--muted-foreground));
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.2;
}

.kpi-icon {
  font-size: 1.5rem;
  opacity: 0.8;
}

.kpi-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: hsl(var(--foreground));
  margin-bottom: 12px;
  line-height: 1.1;
}

.kpi-trend {
  font-size: 0.9rem;
  font-weight: 500;
  color: hsl(var(--muted-foreground));
  line-height: 1.3;
  position: relative;
  z-index: 1;
}

.kpi-trend.positive {
  color: #10b981 !important;
}

.kpi-trend.negative {
  color: #ef4444 !important;
}

/* Asegurar que los porcentajes solo aparezcan en categorías */
.percentage:not(.category-panel .percentage) {
  display: none !important;
}

/* Secciones */
.section-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: hsl(var(--foreground));
  margin-bottom: 24px;
  padding-bottom: 8px;
  border-bottom: 2px solid hsl(var(--border));
}

/* Categorías */
.categories-section {
  margin-bottom: 40px;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 24px;
}

.category-panel {
  background: white;
  border: 1px solid hsl(var(--border));
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  transition: all 0.3s ease;
  min-height: 320px;
  display: flex;
  flex-direction: column;
}

.category-panel:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.category-panel.necessities {
  border-left: 4px solid #16a34a;
}

.category-panel.wants {
  border-left: 4px solid #2563eb;
}

.category-panel.savings {
  border-left: 4px solid #dc2626;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid hsl(var(--border));
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.category-emoji {
  font-size: 1.8rem;
}

.panel-title h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: hsl(var(--foreground));
  margin: 0 0 4px 0;
  line-height: 1.2;
}

.target {
  font-size: 0.85rem;
  color: hsl(var(--muted-foreground));
  font-weight: 500;
  display: block;
  margin-top: 2px;
}

.panel-status {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
}

.status-dot.warning {
  background: #f59e0b;
}

.status-dot.danger {
  background: #ef4444;
}

.status-text {
  font-size: 0.8rem;
  font-weight: 500;
  color: hsl(var(--muted-foreground));
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.panel-metrics {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.metric-primary {
  background: hsl(var(--muted) / 0.3);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
}

.metric-primary .amount {
  font-size: 2.4rem;
  font-weight: 700;
  color: hsl(var(--foreground));
  line-height: 1;
  margin-bottom: 8px;
  display: block;
}

.metric-primary .budget {
  font-size: 1rem;
  color: hsl(var(--muted-foreground));
  line-height: 1.3;
  display: block;
}

.metric-secondary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: hsl(var(--background));
  border-radius: 12px;
  gap: 16px;
}

.category-panel .percentage {
  font-size: 1.2rem;
  font-weight: 700;
  color: white;
  background: hsl(var(--primary));
  padding: 8px 16px;
  border-radius: 25px;
  min-width: 70px;
  text-align: center;
  flex-shrink: 0;
}

.category-panel .remaining {
  font-size: 0.95rem;
  color: hsl(var(--muted-foreground));
  text-align: right;
  line-height: 1.4;
  flex: 1;
}

/* Progress Container */
.progress-container {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid hsl(var(--border));
}

.progress-track {
  height: 10px;
  background: hsl(var(--secondary));
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 12px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-bar {
  height: 100%;
  border-radius: 8px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.progress-bar.necessities {
  background: linear-gradient(90deg, #16a34a 0%, #22c55e 100%);
}

.progress-bar.wants {
  background: linear-gradient(90deg, #2563eb 0%, #3b82f6 100%);
}

.progress-bar.savings {
  background: linear-gradient(90deg, #dc2626 0%, #ef4444 100%);
}

.progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
  font-weight: 500;
  margin-top: 4px;
}

/* Análisis Visual */
.analytics-section {
  margin-bottom: 32px;
}

.charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 32px;
}

.chart-panel {
  background: white;
  border: 1px solid hsl(var(--border));
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.chart-header h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: hsl(var(--foreground));
  margin-bottom: 8px;
}

.chart-header p {
  font-size: 0.9rem;
  color: hsl(var(--muted-foreground));
  margin-bottom: 20px;
}

.chart-container {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  padding: 16px 0;
  margin-top: 8px;
}

.chart-legend .legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: hsl(var(--foreground));
  padding: 8px 12px;
  background: hsl(var(--muted) / 0.3);
  border-radius: 8px;
  white-space: nowrap;
}

.legend-color {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  flex-shrink: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
  .dashboard-header {
    padding: 24px;
  }
  
  .dashboard-header h1 {
    font-size: 2rem;
  }
  
  .dashboard-subtitle {
    font-size: 1rem;
  }
  
  .main-panel {
    padding: 20px;
  }
  
  .kpi-section {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .categories-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .charts-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .kpi-value {
    font-size: 2rem;
  }
  
  .metric-primary .amount {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .setup-panel {
    padding: 40px 20px;
  }
  
  .setup-icon {
    font-size: 3rem;
  }
  
  .setup-content h2 {
    font-size: 1.5rem;
  }
  
  .panel-header {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
  }
  
  .metric-secondary {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
    text-align: left;
    padding: 12px 16px;
  }
  
  .category-panel .remaining {
    text-align: left;
  }
  
  .metric-primary {
    padding: 16px;
  }
  
  .metric-primary .amount {
    font-size: 2rem;
  }
  
  .category-panel .percentage {
    font-size: 1rem;
    padding: 6px 12px;
    min-width: 60px;
  }
  
  .category-panel {
    min-height: 280px;
    padding: 20px;
  }
  
  .chart-legend {
    flex-direction: column;
    gap: 8px;
    align-items: center;
  }
  
  .chart-legend .legend-item {
    width: 100%;
    justify-content: center;
    max-width: 200px;
  }
  
  .percentage {
    padding: 6px 16px;
    font-size: 1rem;
  }
}
