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;
  background-color: var(--bs-body-bg);
  color: var(--bs-body-color);
}

.footer {
  position: absolute;
  bottom: 0;
  width: 100%;
  white-space: nowrap;
  line-height: 60px;
  background-color: var(--bs-tertiary-bg);
  color: var(--bs-body-color);
  border-top: 1px solid var(--bs-border-color);
}

/* Custom styles for DeltaGantt */
.navbar-brand {
  font-weight: bold;
  font-size: 1.5rem;
}

.card {
  border: none;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  margin-bottom: 1rem;
  background-color: var(--bs-card-bg);
}

.card-header {
  background-color: var(--bs-card-cap-bg);
  border-bottom: 1px solid var(--bs-border-color);
  font-weight: 600;
}

.btn {
  border-radius: 0.375rem;
  font-weight: 500;
}

.btn-group .btn {
  border-radius: 0.375rem;
}

.btn-group .btn:not(:first-child) {
  margin-left: 0.25rem;
}

.progress {
  height: 0.75rem;
  border-radius: 0.375rem;
}

.badge {
  font-size: 0.75em;
  padding: 0.35em 0.65em;
  border-radius: 0.375rem;
}

.table {
  margin-bottom: 0;
}

.table th {
  border-top: none;
  font-weight: 600;
  color: var(--bs-body-color);
  background-color: var(--bs-tertiary-bg);
  font-size: 0.875rem;
}

.table td {
  vertical-align: middle;
  border-top: 1px solid var(--bs-border-color);
}

.table-hover tbody tr:hover {
  background-color: var(--bs-table-hover-bg);
}

.alert {
  border: none;
  border-radius: 0.5rem;
}

.form-control, .form-select {
  border-radius: 0.375rem;
  border: 1px solid var(--bs-border-color);
  background-color: var(--bs-body-bg);
  color: var(--bs-body-color);
}

.form-control:focus, .form-select:focus {
  border-color: #86b7fe;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.modal-content {
  border: none;
  border-radius: 0.5rem;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  background-color: var(--bs-modal-bg);
}

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

/* Gantt Chart Styles */
.gantt-container {
  position: relative;
  overflow-x: auto;
  background-color: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: 0.375rem;
  padding: 1rem;
}

.gantt-timeline {
  min-width: 800px;
}

.gantt-task {
  height: 30px;
  border-radius: 4px;
  position: relative;
  display: flex;
  align-items: center;
  padding: 0 8px;
  color: white;
  font-weight: 500;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.gantt-task:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.gantt-task-progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  transition: width 0.3s ease;
}

/* Color Indicators */
.project-color-indicator,
.phase-color-indicator {
  border-radius: 2px;
  flex-shrink: 0;
}

.project-color-indicator {
  width: 4px;
  height: 40px;
}

.phase-color-indicator {
  width: 4px;
  height: 30px;
}

/* Status Badges */
.badge-secondary {
  background-color: #6c757d !important;
}

.badge-primary {
  background-color: #007bff !important;
}

.badge-success {
  background-color: #28a745 !important;
}

.badge-danger {
  background-color: #dc3545 !important;
}

.badge-warning {
  background-color: #ffc107 !important;
  color: #212529 !important;
}

.badge-info {
  background-color: #17a2b8 !important;
}

/* Custom animations */
.fade-in {
  animation: fadeIn 0.5s ease-in;
}

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

.slide-in {
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from { transform: translateX(-100%); }
  to { transform: translateX(0); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .btn-group .btn {
    margin-bottom: 0.25rem;
  }
  
  .table-responsive {
    font-size: 0.875rem;
  }
  
  .card-body {
    padding: 1rem;
  }
}

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

/* Tooltip styles */
.tooltip {
  font-size: 0.875rem;
}

/* Progress bars */
.progress-bar {
  transition: width 0.6s ease;
}

/* Demo mode indicator */
#demo-indicator {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.5; }
  100% { opacity: 1; }
}

/* Print styles */
@media print {
  .btn, .btn-group, .navbar, .footer {
    display: none !important;
  }
  
  .card {
    border: 1px solid #dee2e6 !important;
    box-shadow: none !important;
  }
  
  .table {
    font-size: 0.75rem;
  }
}