/* Button Styles */
.btn {
  display: inline-block;
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-md);
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
  font-size: var(--fs-base);
}

.btn-primary {
  background-color: var(--color-primary);
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background-color: var(--color-primary-dark);
  color: white;
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.btn-secondary {
  background-color: var(--color-background);
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}

.btn-secondary:hover {
  background-color: var(--color-primary);
  color: white;
  transform: translateY(-2px);
}

.btn-small {
  padding: var(--space-xs) var(--space-md);
  font-size: var(--fs-sm);
}

/* Cards */
.card {
  background-color: var(--color-background);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

/* Badge */
.badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: var(--fs-xs);
  font-weight: 500;
}

.badge-primary {
  background-color: var(--color-primary);
  color: white;
}

.badge-accent {
  background-color: var(--color-accent);
  color: var(--color-text);
}

/* Alert Boxes */
.alert {
  padding: var(--space-md);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
}

.alert-success {
  background-color: rgba(76, 175, 80, 0.1);
  border-left: 4px solid var(--color-success);
  color: var(--color-success);
}

.alert-warning {
  background-color: rgba(249, 168, 37, 0.1);
  border-left: 4px solid var(--color-warning);
  color: var(--color-warning);
}

.alert-error {
  background-color: rgba(244, 67, 54, 0.1);
  border-left: 4px solid var(--color-error);
  color: var(--color-error);
}

/* Form Elements */
.form-control {
  display: block;
  width: 100%;
  padding: var(--space-sm);
  border: 1px solid var(--color-accent-dark);
  border-radius: var(--radius-sm);
  font-size: var(--fs-base);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(59, 90, 122, 0.2);
}

.form-label {
  display: block;
  margin-bottom: var(--space-xs);
  font-weight: 500;
}

.form-group {
  margin-bottom: var(--space-md);
}

/* Tables */
.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: var(--space-sm);
  text-align: left;
  border-bottom: 1px solid var(--color-accent);
}

.table th {
  background-color: var(--color-accent-light);
  font-weight: 600;
}

.table tr:hover {
  background-color: var(--color-accent-light);
}

/* Breadcrumbs */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
}

.breadcrumbs li {
  display: flex;
  align-items: center;
}

.breadcrumbs li:not(:last-child)::after {
  content: '/';
  margin: 0 var(--space-xs);
  color: var(--color-text-muted);
}

.breadcrumbs a {
  color: var(--color-text-light);
}

.breadcrumbs li:last-child a {
  color: var(--color-text);
  pointer-events: none;
}

/* Tabs */
.tabs {
  display: flex;
  border-bottom: 1px solid var(--color-accent);
  margin-bottom: var(--space-lg);
  overflow-x: auto;
}

.tab {
  padding: var(--space-sm) var(--space-lg);
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
}

.tab:hover {
  color: var(--color-primary);
}

.tab.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

/* Misc Components */
.divider {
  height: 1px;
  background-color: var(--color-accent);
  margin: var(--space-lg) 0;
}

.tag {
  display: inline-block;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  background-color: var(--color-accent-light);
  font-size: var(--fs-sm);
  margin-right: var(--space-xs);
  margin-bottom: var(--space-xs);
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tooltip {
  position: relative;
  display: inline-block;
}

.tooltip .tooltip-text {
  visibility: hidden;
  width: 120px;
  background-color: var(--color-text);
  color: white;
  text-align: center;
  border-radius: var(--radius-sm);
  padding: var(--space-xs);
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.tooltip:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}

/* Utilities */
.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.text-left {
  text-align: left;
}

.text-muted {
  color: var(--color-text-muted);
}

.text-primary {
  color: var(--color-primary);
}

.bg-primary {
  background-color: var(--color-primary);
  color: white;
}

.bg-accent {
  background-color: var(--color-accent-light);
}

.mb-0 {
  margin-bottom: 0;
}

.mb-1 {
  margin-bottom: var(--space-xs);
}

.mb-2 {
  margin-bottom: var(--space-sm);
}

.mb-3 {
  margin-bottom: var(--space-md);
}

.mb-4 {
  margin-bottom: var(--space-lg);
}

.mt-0 {
  margin-top: 0;
}

.mt-1 {
  margin-top: var(--space-xs);
}

.mt-2 {
  margin-top: var(--space-sm);
}

.mt-3 {
  margin-top: var(--space-md);
}

.mt-4 {
  margin-top: var(--space-lg);
}

.d-flex {
  display: flex;
}

.align-items-center {
  align-items: center;
}

.justify-content-between {
  justify-content: space-between;
}

.flex-wrap {
  flex-wrap: wrap;
}

.gap-1 {
  gap: var(--space-xs);
}

.gap-2 {
  gap: var(--space-sm);
}

.gap-3 {
  gap: var(--space-md);
}


/* Ensure consistent spacing between image and heading in feature cards */
.feature-card h3 {
  margin-top: 1rem;
  font-size: 1.125rem;
  line-height: 1.4;
}

.feature-icon {
  padding-bottom: 0.75rem;
}

.feature-img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0.5rem 0.5rem 0 0;
}
