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;
}

/* Cascade effect highlighting */
.entity-cascade-highlight {
  animation: cascadePulse 1.5s ease-in-out;
  border: 3px solid #0d6efd !important;
  box-shadow: 0 0 20px rgba(13, 110, 253, 0.5) !important;
  transform: scale(1.02);
  transition: all 0.3s ease;
}

.entity-cascade-highlight-up {
  border-left: 5px solid #198754 !important;
  box-shadow: 0 0 15px rgba(25, 135, 84, 0.4) !important;
}

.entity-cascade-highlight-down {
  border-left: 5px solid #ffc107 !important;
  box-shadow: 0 0 15px rgba(255, 193, 7, 0.4) !important;
}

@keyframes cascadePulse {
  0% {
    box-shadow: 0 0 0 0 rgba(13, 110, 253, 0.7);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(13, 110, 253, 0);
    transform: scale(1.02);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(13, 110, 253, 0);
    transform: scale(1.02);
  }
}

/* Cascade indicator badge */
.cascade-indicator {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #0d6efd;
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: bold;
  z-index: 10;
  animation: fadeInOut 2s ease-in-out;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  white-space: nowrap;
}

.cascade-indicator-up {
  background: #198754;
}

.cascade-indicator-down {
  background: #ffc107;
  color: #000;
}

@keyframes fadeInOut {
  0%, 100% {
    opacity: 0;
  }
  10%, 90% {
    opacity: 1;
  }
}

/* Timeline Styles */
.timeline-wrapper {
  padding-left: 1rem;
}

.timeline-item {
  position: relative;
  padding-left: 2rem;
  border-left: 2px solid #e2e8f0;
  padding-bottom: 2rem;
}

.timeline-item:last-child {
  border-left-color: transparent;
  padding-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -9px;
  top: 0;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #4f46e5;
  z-index: 2;
}

.timeline-dot.start { border-color: #10b981; background: #10b981; }
.timeline-dot.update { border-color: #4f46e5; }

.timeline-date {
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 600;
  margin-bottom: 0.25rem;
  display: flex;
  justify-content: space-between;
}

.timeline-card {
  background: white;
  padding: 1rem;
  border-radius: 0.5rem;
  border: 1px solid #f1f5f9;
  box-shadow: 0 1px 2px rgba(0,0,0,0.02);
  transition: all 0.2s;
}

.timeline-card:hover {
  border-color: #e0e7ff;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.change-pill {
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
  display: inline-block;
  margin-top: 0.5rem;
  margin-right: 0.25rem;
}

.change-pill.neg {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fecaca;
}

/* Authentication Styles */
.password-strength {
  margin-top: 0.5rem;
}

.strength-bar {
  transition: all 0.3s ease;
}

/* User Avatar */
.user-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: bold;
  margin: 0 auto;
}

/* Role Badges */
.role-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-right: 0.25rem;
  margin-bottom: 0.25rem;
}

.role-badge-admin {
  background: #fee2e2;
  color: #991b1b;
}

.role-badge-workarea {
  background: #dbeafe;
  color: #1e40af;
}

.role-badge-project {
  background: #d1fae5;
  color: #065f46;
}

.role-badge-goal {
  background: #fef3c7;
  color: #92400e;
}

/* User Table */
.user-table-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.875rem;
}

/* Loading States */
.btn-loading {
  position: relative;
  pointer-events: none;
}

.btn-loading::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-left: -8px;
  margin-top: -8px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spinner 0.6s linear infinite;
}

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