html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

/* CashFlow App Custom Styles */
.navbar-brand {
  font-weight: bold;
  color: #28a745 !important;
}

.card {
  border: none;
  border-radius: 15px;
}

.card-header {
  border-radius: 15px 15px 0 0 !important;
}

.btn {
  border-radius: 8px;
  font-weight: 500;
}

.form-control {
  border-radius: 8px;
  border: 1px solid #ced4da;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
  border-color: #28a745;
  box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

.btn-primary {
  background-color: #007bff;
  border-color: #007bff;
}

.btn-primary:hover {
  background-color: #0056b3;
  border-color: #0056b3;
}

.btn-success {
  background-color: #28a745;
  border-color: #28a745;
}

.btn-success:hover {
  background-color: #218838;
  border-color: #1e7e34;
}

.alert {
  border-radius: 8px;
  border: none;
}

.shadow {
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

/* Animation for alerts */
.alert {
  animation: slideIn 0.3s ease-in-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive improvements */
@media (max-width: 768px) {
  .card {
    margin: 10px;
  }

  .navbar-brand {
    font-size: 1.1rem;
  }
}

/* Dashboard Styles */
.card-stats {
  border: none;
  border-radius: 15px;
  overflow: hidden;
}

.card-stats .card-body {
  padding: 1.5rem;
}

.bg-gradient-success {
  background: linear-gradient(135deg, #28a745 0%, #34ce57 100%);
}

.bg-gradient-danger {
  background: linear-gradient(135deg, #dc3545 0%, #e74c3c 100%);
}

.bg-gradient-info {
  background: linear-gradient(135deg, #17a2b8 0%, #3498db 100%);
}

.bg-gradient-warning {
  background: linear-gradient(135deg, #ffc107 0%, #f39c12 100%);
}

.bg-gradient-primary {
  background: linear-gradient(135deg, #007bff 0%, #3498db 100%);
}

.icon-shape {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 1.25rem;
}

.text-white-50 {
  color: rgba(255, 255, 255, 0.5) !important;
}

/* Timeline Styles */
.timeline {
  position: relative;
  padding: 0;
  list-style: none;
}

.timeline:before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 25px;
  width: 2px;
  background: #e9ecef;
}

.timeline-item {
  position: relative;
  margin-bottom: 1.5rem;
}

.timeline-badge {
  position: absolute;
  left: 18px;
  top: 16px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  z-index: 1;
}

.timeline-panel {
  position: relative;
  margin-left: 50px;
  background: #f8f9fa;
  border-radius: 8px;
  padding: 1rem;
  border: 1px solid #e9ecef;
}

.timeline-panel:before {
  content: "";
  position: absolute;
  top: 16px;
  left: -8px;
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-right: 8px solid #e9ecef;
}

.timeline-panel:after {
  content: "";
  position: absolute;
  top: 17px;
  left: -7px;
  width: 0;
  height: 0;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-right: 7px solid #f8f9fa;
}

.timeline-title {
  margin-top: 0;
  color: #212529;
}

.timeline-body {
  margin-top: 0.5rem;
}

/* Chart Container */
.chart-container {
  position: relative;
  height: 300px;
  margin-bottom: 1rem;
}

/* Responsive adjustments for dashboard */
@media (max-width: 768px) {
  .card-stats .card-body {
    padding: 1rem;
  }

  .icon-shape {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  .timeline-panel {
    margin-left: 40px;
  }

  .timeline-badge {
    left: 13px;
    width: 14px;
    height: 14px;
    font-size: 0.7rem;
  }

  .timeline:before {
    left: 20px;
  }

  .chart-container {
    height: 250px;
  }
}

@media (max-width: 576px) {
  .d-flex.gap-2 {
    flex-direction: column;
  }

  .d-flex.gap-2 .btn {
    margin-bottom: 0.5rem;
  }

  .card-stats .h2 {
    font-size: 1.5rem;
  }

  .timeline-panel {
    margin-left: 35px;
    padding: 0.75rem;
  }
}

/* Categoria Styles */
.categoria-card {
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
  border: none;
}

.categoria-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

.categoria-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  font-size: 1.5rem;
}

.icon-suggestions button {
  transition: all 0.2s ease-in-out;
}

.icon-suggestions button:hover {
  transform: scale(1.05);
}

.form-control-color {
  width: 50px;
  height: 38px;
  border-radius: 0.375rem 0 0 0.375rem !important;
}

/* Tab customization */
.nav-tabs .nav-link {
  border: none;
  border-bottom: 2px solid transparent;
  background: none;
  color: #6c757d;
}

.nav-tabs .nav-link.active {
  border-bottom-color: #007bff;
  background: none;
  color: #007bff;
  font-weight: 500;
}

.nav-tabs .nav-link:hover {
  border-bottom-color: #007bff;
  color: #007bff;
}

/* Responsive adjustments for categoria cards */
@media (max-width: 768px) {
  .categoria-icon {
    width: 50px;
    height: 50px;
    font-size: 1.25rem;
  }

  .categoria-card .card-title {
    font-size: 0.9rem;
  }

  .btn-group .btn {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
  }
}