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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f8f9fa;
}

/* Navigation */
.navbar {
  background: #fff;
  border-bottom: 1px solid #e9ecef;
  padding: 0;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  padding-left: 0;
  width: 100%;
}

.nav-brand {
  font-size: 1.5rem;
  font-weight: bold;
  color: #007bff;
  text-decoration: none;
  margin-left: 0;
  padding: 0.25rem 0.5rem;
}

.nav-brand-logo {
  height: 40px;
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-link {
  color: #666;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.nav-link:hover {
  background-color: #f8f9fa;
  color: #333;
}

.nav-link.admin {
  background-color: #dc3545;
  color: white;
}

.nav-link.admin:hover {
  background-color: #c82333;
}

/* Main Content */
.main-content {
  padding: 1rem;
}

/* Alerts */
.alert {
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 4px;
  border: 1px solid transparent;
}

.alert-success {
  background-color: #d4edda;
  border-color: #c3e6cb;
  color: #155724;
}

.alert-error {
  background-color: #f8d7da;
  border-color: #f5c6cb;
  color: #721c24;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 4px;
  text-decoration: none;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background-color 0.2s;
}

.btn-primary {
  background-color: #007bff;
  color: white;
}

.btn-primary:hover {
  background-color: #0056b3;
}

.btn-large {
  padding: 1rem 2rem;
  font-size: 1.1rem;
}

/* Dashboard */
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e9ecef;
}

.dashboard-header h1 {
  color: #333;
  font-size: 2rem;
}

.active-timer {
  background-color: #fff3cd;
  border: 1px solid #ffeaa7;
  border-radius: 4px;
  padding: 1rem;
  color: #856404;
}

.timer-duration {
  font-weight: bold;
  font-family: monospace;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  text-align: center;
}

.stat-card h3 {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.stat-number {
  font-size: 2rem;
  font-weight: bold;
  color: #007bff;
}

/* Task Columns */
.task-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.task-column {
  background: white;
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.task-column h3 {
  color: #333;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e9ecef;
}

.task-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.task-card {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 4px;
  padding: 1rem;
  transition: box-shadow 0.2s;
}

.task-card:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.task-card.completed {
  opacity: 0.8;
}

.task-id {
  font-size: 0.8rem;
  color: #666;
  text-decoration: none;
  background: #e9ecef;
  padding: 0.25rem 0.5rem;
  border-radius: 3px;
  display: inline-block;
  margin-bottom: 0.5rem;
}

.task-card h4 {
  margin: 0.5rem 0;
}

.task-card h4 a {
  color: #333;
  text-decoration: none;
}

.task-card h4 a:hover {
  color: #007bff;
}

.task-card p {
  margin: 0.25rem 0;
  font-size: 0.9rem;
  color: #666;
}

.timer-indicator {
  background-color: #fff3cd;
  color: #856404;
  padding: 0.25rem 0.5rem;
  border-radius: 3px;
  font-size: 0.8rem;
  margin-top: 0.5rem;
}

/* Tenant Cards */
.tenants-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.tenant-card {
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.tenant-card h3 {
  margin-bottom: 0.5rem;
}

.tenant-card h3 a {
  color: #333;
  text-decoration: none;
}

.tenant-card h3 a:hover {
  color: #007bff;
}

/* Reports Styles */
.reports-page {
  padding: 0;
}

.page-header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e9ecef;
}

.page-header h1 {
  color: #333;
  margin-bottom: 0.5rem;
}

.page-header p {
  color: #666;
  margin: 0;
}

.reports-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.report-card {
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}

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

.report-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.report-header h3 {
  margin: 0;
  color: #333;
}

.report-icon {
  font-size: 2rem;
}

.report-card p {
  color: #666;
  margin-bottom: 1rem;
}

/* Filters */
.filters-section {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.filters-form {
  margin: 0;
}

.form-row {
  display: flex;
  gap: 1rem;
  align-items: end;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-weight: 600;
  color: #333;
}

.form-control {
  padding: 0.5rem;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 0.9rem;
}

.form-control:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
}

/* Summary Cards */
.time-summary, .budget-overview {
  margin-bottom: 2rem;
}

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

.summary-card {
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.summary-value {
  font-size: 2rem;
  font-weight: bold;
  color: #007bff;
  margin-bottom: 0.5rem;
}

.summary-label {
  color: #666;
  font-size: 0.9rem;
}

/* Tables */
.table-wrapper {
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

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

.table th {
  background: #f8f9fa;
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  color: #333;
  border-bottom: 1px solid #e9ecef;
}

.table td {
  padding: 1rem;
  border-bottom: 1px solid #f8f9fa;
  vertical-align: top;
}

.table tbody tr:hover {
  background-color: #f8f9fa;
}

.task-link {
  color: #007bff;
  text-decoration: none;
  font-weight: 500;
}

.task-link:hover {
  text-decoration: underline;
}

.task-id {
  font-size: 0.8rem;
  color: #666;
  background: #e9ecef;
  padding: 0.25rem 0.5rem;
  border-radius: 3px;
  display: inline-block;
  margin-top: 0.25rem;
}

/* Budget Cards */
.tenant-budgets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 1.5rem;
}

.budget-card {
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.budget-card.over-budget {
  border-color: #dc3545;
  background: #fff5f5;
}

.budget-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e9ecef;
}

.budget-header h3 {
  margin: 0;
  color: #333;
}

.budget-status .status {
  padding: 0.25rem 0.5rem;
  border-radius: 3px;
  font-size: 0.8rem;
  font-weight: 600;
}

.status.good {
  background: #d4edda;
  color: #155724;
}

.status.warning {
  background: #fff3cd;
  color: #856404;
}

.status.over-budget {
  background: #f8d7da;
  color: #721c24;
}

.budget-details {
  margin-bottom: 1rem;
}

.budget-row {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid #f8f9fa;
}

.budget-label {
  color: #666;
  font-weight: 500;
}

.budget-value {
  font-weight: 600;
  color: #333;
}

.progress-bar {
  background: #e9ecef;
  border-radius: 4px;
  height: 8px;
  margin: 1rem 0;
  overflow: hidden;
}

.progress-fill {
  background: #007bff;
  height: 100%;
  transition: width 0.3s ease;
}

.budget-card.over-budget .progress-fill {
  background: #dc3545;
}

.budget-breakdown {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e9ecef;
}

.budget-breakdown h4 {
  margin-bottom: 0.5rem;
  color: #333;
}

.user-time {
  display: flex;
  justify-content: space-between;
  padding: 0.25rem 0;
  font-size: 0.9rem;
}

.user-name {
  color: #666;
}

.user-hours {
  font-weight: 600;
  color: #333;
}

/* Admin Section */
.admin-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid #e9ecef;
}

.admin-section h2 {
  color: #333;
  margin-bottom: 1rem;
}

.tenant-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

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

.stat {
  text-align: center;
}

.stat-label {
  font-size: 0.8rem;
  color: #666;
  margin-bottom: 0.25rem;
}

.stat-value {
  font-size: 1.2rem;
  font-weight: bold;
  color: #007bff;
}

/* Empty States */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: #666;
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.empty-state h3 {
  color: #333;
  margin-bottom: 1rem;
}

.pagination-info {
  padding: 1rem;
  text-align: center;
  color: #666;
  font-size: 0.9rem;
  background: #f8f9fa;
  border-top: 1px solid #e9ecef;
}

/* Button Variants */
.btn-secondary {
  background-color: #6c757d;
  color: white;
}

.btn-secondary:hover {
  background-color: #545b62;
}

.btn-outline-primary {
  background-color: transparent;
  color: #007bff;
  border: 1px solid #007bff;
}

.btn-outline-primary:hover {
  background-color: #007bff;
  color: white;
}

.btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Responsive */
@media (max-width: 768px) {
  .nav-content {
    flex-direction: column;
    gap: 1rem;
  }
  
  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .dashboard-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  
  .task-columns {
    grid-template-columns: 1fr;
  }
  
  .main-content {
    margin-top: 140px;
    padding: 1rem;
  }
  
  .form-row {
    flex-direction: column;
    gap: 1rem;
  }
  
  .reports-grid {
    grid-template-columns: 1fr;
  }
  
  .summary-cards {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .tenant-budgets {
    grid-template-columns: 1fr;
  }
  
  .stats-row {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .table-wrapper {
    overflow-x: auto;
  }
  
  .table {
    min-width: 600px;
  }
}

/* Ultra Compact Task View Styles */
.task-details-compact {
  margin: 0.5rem 0;
}

.detail-row-compact {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1px 0;
  margin: 0;
}

.detail-item-full {
  flex: 1;
  margin: 0;
  padding: 0;
}

.detail-label {
  font-weight: 600;
  color: #666;
  font-size: 0.9rem;
  margin: 0;
  padding: 0;
  line-height: 1.2;
}

.detail-value {
  color: #333;
  font-size: 0.8rem;
}

.overdue {
  color: #dc3545 !important;
  font-weight: 600;
}

.status-select-compact, .assignment-select-compact {
  padding: 0.1rem 0.3rem;
  font-size: 0.8rem;
  border: 1px solid #dee2e6;
  border-radius: 3px;
  background: white;
}

.editable-due-date {
  cursor: pointer;
  color: #007bff;
  text-decoration: underline;
  font-size: 0.8rem;
}

.editable-due-date:hover {
  color: #0056b3;
}

.empty-due-date {
  color: #999;
  font-style: italic;
}

.blockers-list, .blocking-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.2rem;
}

.blocker-item, .blocking-item {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
}

.task-link-small {
  color: #007bff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.75rem;
}

.task-link-small:hover {
  text-decoration: underline;
}

.remove-link {
  color: #dc3545;
  text-decoration: none;
  font-weight: bold;
  font-size: 0.7rem;
  margin-left: 0.2rem;
}

.remove-link:hover {
  color: #a71d2a;
}

.timer-row {
  background: #f8f9fa;
  padding: 0.3rem;
  border-radius: 4px;
  margin: 0.3rem 0;
}

.timer-controls-compact {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.active-timer-inline {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8rem;
}

.timer-indicator {
  font-size: 0.9rem;
}

.timer-duration {
  font-family: 'Courier New', monospace;
  font-size: 0.8rem;
  font-weight: bold;
  color: #28a745;
}

.time-entry-inline {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  border: none;
}

.time-form-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  border: none;
}

.time-input-small {
  width: 120px;
  padding: 0.25rem 0.5rem;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 0.875rem;
}

.desc-input-small {
  width: 200px;
  padding: 0.25rem 0.5rem;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 0.875rem;
}

.date-input-small {
  width: 130px;
  padding: 0.25rem 0.5rem;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 0.875rem;
  margin-right: 0.5rem;
}

.time-history-link {
  margin-left: 0.5rem;
}

.link-small {
  color: #007bff;
  text-decoration: none;
  font-size: 0.75rem;
}

.link-small:hover {
  text-decoration: underline;
}

.description-section-compact {
  margin: 0.5rem 0;
}

.section-title-small {
  font-size: 0.9rem;
  font-weight: 600;
  color: #333;
  margin: 0.3rem 0 0.2rem 0;
}

.description-content {
  font-size: 0.8rem;
  line-height: 1.4;
  padding: 0.3rem;
  border: 1px solid #e9ecef;
  border-radius: 3px;
  cursor: pointer;
  min-height: 2rem;
}

.description-content:hover {
  border-color: #007bff;
}

.empty-description {
  color: #999;
  font-style: italic;
}

.time-history-section {
  margin: 0.5rem 0;
  background: #f8f9fa;
  padding: 0.3rem;
  border-radius: 4px;
}

.time-entries-list-compact {
  max-height: 150px;
  overflow-y: auto;
}

.time-entry-compact {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem;
  border-radius: 4px;
  background: #f8f9fa;
  margin-bottom: 0.5rem;
}

.entry-user {
  min-width: 120px;
}

.entry-duration {
  min-width: 80px;
}

.entry-date {
  min-width: 60px;
}

.entry-desc {
  flex: 1;
}

.delete-entry-btn {
  color: #dc3545;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.2rem;
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.2s;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  margin-left: auto;
}

.delete-entry-btn:hover {
  opacity: 1;
  text-decoration: none;
}

.subtasks-section-compact {
  margin: 0.5rem 0;
}

.subtasks-list-compact {
  background: #f8f9fa;
  padding: 0.3rem;
  border-radius: 4px;
}

.subtask-compact {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0;
  font-size: 0.75rem;
}

.status-badge {
  font-size: 0.6rem;
  padding: 0.1rem 0.3rem;
  border-radius: 2px;
  text-transform: uppercase;
  font-weight: 600;
}

.status-badge.status-todo {
  background: #e9ecef;
  color: #495057;
}

.status-badge.status-in_progress {
  background: #fff3cd;
  color: #856404;
}

.status-badge.status-done {
  background: #d4edda;
  color: #155724;
}

.btn-xs {
  padding: 0.15rem 0.4rem;
  font-size: 0.7rem;
  border-radius: 3px;
}

.inline-form {
  display: inline;
}

/* Timeline Styles - Beautiful Activity Log */
.timeline {
  position: relative;
  padding-left: 2rem;
  margin-top: 1.5rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 1rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, #007bff, #e9ecef);
}

.timeline-item {
  position: relative;
  margin-bottom: 2rem;
  padding-left: 1.5rem;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-marker {
  position: absolute;
  left: -1.75rem;
  top: 0.5rem;
  width: 12px;
  height: 12px;
  background: #007bff;
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  z-index: 1;
}

.timeline-marker.add-marker {
  background: #28a745;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: bold;
  width: 16px;
  height: 16px;
  left: -1.9rem;
  top: 0.3rem;
}

.timeline-content {
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  position: relative;
}

.timeline-content::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 1rem;
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-right: 8px solid #e9ecef;
}

.timeline-content::after {
  content: '';
  position: absolute;
  left: -7px;
  top: 1rem;
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-right: 8px solid #fff;
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #f0f0f0;
}

.timeline-author {
  font-weight: 600;
  color: #333;
  font-size: 0.9rem;
}

.timeline-date {
  color: #666;
  font-size: 0.8rem;
}

/* Comment action buttons */
.comment-actions {
  display: flex;
  gap: 0.25rem;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.timeline-content:hover .comment-actions {
  opacity: 1;
}

.comment-edit-btn,
.comment-delete-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 3px;
  text-decoration: none;
  font-size: 0.8rem;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  background: rgba(108, 117, 125, 0.1);
  color: #6c757d;
}

.comment-edit-btn:hover {
  color: #007bff;
  background: rgba(0, 123, 255, 0.15);
  border-color: rgba(0, 123, 255, 0.3);
  text-decoration: none;
}

.comment-delete-btn {
  font-size: 0.9rem;
  font-weight: bold;
}

.comment-delete-btn:hover {
  color: #dc3545;
  background: rgba(220, 53, 69, 0.15);
  border-color: rgba(220, 53, 69, 0.3);
  text-decoration: none;
}

/* Inline comment editing */
.comment-edit-form {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid #e9ecef;
}

.inline-edit-form .form-control {
  margin-bottom: 0.75rem;
}

.inline-edit-form .comment-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}

.timeline-body {
  color: #555;
  line-height: 1.5;
  font-size: 0.9rem;
}

.timeline-body p {
  margin: 0;
}

.timeline-body p:not(:last-child) {
  margin-bottom: 0.5rem;
}

.no-comments {
  text-align: center;
  color: #999;
  font-style: italic;
  padding: 1rem;
}

.new-comment-item .timeline-content {
  background: #f8f9fa;
  border: 2px dashed #dee2e6;
}

.comment-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.comment-form .form-control {
  border: 1px solid #ced4da;
  border-radius: 4px;
  padding: 0.75rem;
  font-size: 0.9rem;
  resize: vertical;
}

.comment-form .form-control:focus {
  border-color: #007bff;
  box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.25);
}

.comment-actions {
  display: flex;
  justify-content: flex-end;
}

.btn-xs {
  padding: 0.25rem 0.75rem;
  font-size: 0.8rem;
}

.status-select, .assignment-select {
  padding: 0.25rem 0.5rem;
  font-size: 0.9rem;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  background: white;
}

.title-input {
  padding: 0.5rem;
  font-size: 1.5rem;
  font-weight: 600;
  border: 2px solid #007bff;
  border-radius: 4px;
  width: 100%;
}

.description-textarea {
  width: 100%;
  padding: 1rem;
  border: 2px solid #007bff;
  border-radius: 4px;
  font-size: 0.9rem;
  line-height: 1.5;
  resize: vertical;
}

.date-input-inline {
  padding: 0.5rem;
  font-size: 0.9rem;
  border: 2px solid #007bff;
  border-radius: 4px;
  background: white;
  min-width: 150px;
  cursor: pointer;
}

.date-input-inline::-webkit-calendar-picker-indicator {
  cursor: pointer;
  padding: 2px;
  margin-left: 4px;
}

.date-input-inline:focus {
  outline: none;
  border-color: #0056b3;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Quill Editor Styling */
.quill-editor {
  border: 1px solid #ccc;
  border-radius: 4px;
}

.quill-editor .ql-toolbar {
  border-bottom: 1px solid #ccc;
  background: #f8f9fa;
  padding: 8px 10px !important;
  min-height: 42px !important;
  height: auto !important;
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
}

.quill-editor .ql-toolbar .ql-formats {
  margin-right: 10px !important;
  margin-bottom: 2px !important;
  display: flex !important;
  align-items: center !important;
}

.quill-editor .ql-toolbar button,
.quill-editor .ql-toolbar .ql-picker {
  width: 30px !important;
  height: 28px !important;
  padding: 1px !important;
  margin: 1px !important;
}

.ql-snow.ql-toolbar button, .ql-snow .ql-toolbar button {
  width: 28px !important;
  height: 22px !important;
  padding: 1px !important;
  margin: 1px !important;
}

.quill-editor .ql-toolbar .ql-picker-label {
  padding: 3px 6px !important;
  font-size: 13px !important;
  min-width: 60px !important;
}

.quill-editor .ql-toolbar .ql-picker-options {
  z-index: 1000 !important;
}

.quill-editor .ql-editor {
  padding: 0;
  min-height: 100px;
  font-size: 14px;
  line-height: 1.5;
}

.quill-editor .ql-editor.ql-blank::before {
  content: attr(data-placeholder) !important;
  font-style: italic !important;
  color: #aaa !important;
  position: absolute !important;
  left: 15px !important;
  top: 15px !important;
  pointer-events: none !important;
  z-index: 1 !important;
}

/* Ensure placeholder disappears when editor has content */
.quill-editor .ql-editor:not(.ql-blank)::before {
  display: none !important;
  content: none !important;
}

/* Make sure the editor container is positioned relative for absolute placeholder */
.quill-editor .ql-editor {
  position: relative;
}

/* Custom code block button styling */
.quill-editor .ql-toolbar .custom-code-block-icon {
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 11px !important;
  font-weight: bold;
  color: #6f42c1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  line-height: 1;
}

.quill-editor .ql-toolbar .ql-code-block:hover .custom-code-block-icon {
  color: #5a32a3;
}

.quill-editor .ql-toolbar .ql-code-block.ql-active .custom-code-block-icon {
  color: white;
}

/* Custom inline code button styling */
.quill-editor .ql-toolbar .custom-code-icon {
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 11px !important;
  font-weight: bold;
  color: #20c997;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  line-height: 1;
}

.quill-editor .ql-toolbar .ql-code:hover .custom-code-icon {
  color: #1ba085;
}

.quill-editor .ql-toolbar .ql-code.ql-active .custom-code-icon {
  color: white;
}

/* Hide default SVG icons for code buttons */
.quill-editor .ql-toolbar .ql-code svg,
.quill-editor .ql-toolbar .ql-code-block svg {
  display: none;
}

/* Enhanced code block styling - consistent dark theme for all locations */
.ql-editor pre.ql-syntax,
.timeline-body pre,
.description-content pre,
.document-content pre,
.hljs-code-block {
  background-color: #f6f8fa !important;
  border: 1px solid #e1e4e8 !important;
  border-radius: 6px !important;
  padding: 16px !important;
  font-family: 'SFMono-Regular', 'Monaco', 'Inconsolata', 'Roboto Mono', 'Consolas', 'Courier New', monospace !important;
  font-size: 13px !important;
  line-height: 1.45 !important;
  color: #24292e !important;
  overflow-x: auto !important;
  margin: 8px 0 !important;
  position: relative;
  white-space: pre-wrap !important;
  word-wrap: break-word !important;
}

/* Force text color for all text content in code blocks */
.ql-editor pre.ql-syntax,
.ql-editor pre.ql-syntax *,
.document-content-quill + .quill-editor .ql-editor pre.ql-syntax,
.document-content-quill + .quill-editor .ql-editor pre.ql-syntax *,
.document-content-editor .ql-editor pre.ql-syntax,
.document-content-editor .ql-editor pre.ql-syntax * {
  color: #24292e !important;
}

/* Fix Quill editor code blocks to display as one unified block */
.ql-editor pre.ql-syntax {
  display: block !important;
  white-space: pre-wrap !important;
}

/* Remove borders from individual lines within code blocks in Quill editor */
.ql-editor pre.ql-syntax *,
.ql-editor pre.ql-syntax div,
.ql-editor pre.ql-syntax span,
.ql-editor pre.ql-syntax .ql-code-block {
  border: none !important;
  margin: 0 !important;
  padding: 0 !important;
  color: #24292e !important;
  font-family: inherit !important;
  font-size: inherit !important;
  line-height: inherit !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  outline: none !important;
}

/* Force all child elements to display as seamless blocks */
.ql-editor pre.ql-syntax > * {
  display: block !important;
  border: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

/* Remove any visual separation between lines */
.ql-editor pre.ql-syntax div + div {
  border-top: none !important;
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Nuclear option - force all elements within code blocks to have no visual styling */
.ql-editor pre.ql-syntax *,
.ql-editor pre.ql-syntax div,
.ql-editor pre.ql-syntax span,
.ql-editor pre.ql-syntax .ql-code-block,
.ql-editor pre.ql-syntax [class*="ql-"] {
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
  position: static !important;
  float: none !important;
  clear: none !important;
}

/* Ensure code blocks appear as continuous text */
.ql-editor pre.ql-syntax {
  white-space: pre-wrap !important;
  overflow-wrap: break-word !important;
}

.ql-editor pre.ql-syntax div {
  display: inline !important;
  white-space: pre-wrap !important;
}

.ql-editor pre.ql-syntax div:after {
  content: '\A' !important;
  white-space: pre !important;
}

/* Ensure line breaks in Quill editor work properly */
.ql-editor pre.ql-syntax br {
  display: block !important;
  content: '' !important;
  margin: 0 !important;
}

/* Handle divs within code blocks in Quill editor */
.ql-editor pre.ql-syntax div {
  display: inline !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
}

/* Ensure proper line structure in Quill code blocks */
.ql-editor pre.ql-syntax div[data-line] {
  display: block !important;
}


/* Override any existing CSS that might create line-by-line blocks */
.ql-editor .ql-code-block-container,
.ql-editor .ql-code-block {
  border: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Ensure the parent pre element is the only one with styling */
.ql-editor pre.ql-syntax {
  counter-reset: none !important;
}

/* Remove any counter or numbering that might create separate blocks */
.ql-editor pre.ql-syntax::before,
.ql-editor pre.ql-syntax::after {
  content: none !important;
}

/* Enhanced syntax highlighting tokens - consistent light theme for all locations */
.ql-editor .ql-syntax .hljs-comment,
.ql-editor .ql-syntax .hljs-quote,
.timeline-body .hljs-comment,
.timeline-body .hljs-quote,
.description-content .hljs-comment,
.description-content .hljs-quote,
.document-content .hljs-comment,
.document-content .hljs-quote {
  color: #6a737d;
  font-style: italic;
}

.ql-editor .ql-syntax .hljs-keyword,
.ql-editor .ql-syntax .hljs-selector-tag,
.ql-editor .ql-syntax .hljs-subst,
.timeline-body .hljs-keyword,
.timeline-body .hljs-selector-tag,
.timeline-body .hljs-subst,
.description-content .hljs-keyword,
.description-content .hljs-selector-tag,
.description-content .hljs-subst,
.document-content .hljs-keyword,
.document-content .hljs-selector-tag,
.document-content .hljs-subst {
  color: #d73a49;
  font-weight: bold;
}

.ql-editor .ql-syntax .hljs-number,
.ql-editor .ql-syntax .hljs-literal,
.ql-editor .ql-syntax .hljs-variable,
.ql-editor .ql-syntax .hljs-template-variable,
.ql-editor .ql-syntax .hljs-tag .hljs-attr,
.timeline-body .hljs-number,
.timeline-body .hljs-literal,
.timeline-body .hljs-variable,
.timeline-body .hljs-template-variable,
.timeline-body .hljs-tag .hljs-attr,
.description-content .hljs-number,
.description-content .hljs-literal,
.description-content .hljs-variable,
.description-content .hljs-template-variable,
.description-content .hljs-tag .hljs-attr,
.document-content .hljs-number,
.document-content .hljs-literal,
.document-content .hljs-variable,
.document-content .hljs-template-variable,
.document-content .hljs-tag .hljs-attr {
  color: #005cc5;
}

.ql-editor .ql-syntax .hljs-string,
.ql-editor .ql-syntax .hljs-doctag,
.timeline-body .hljs-string,
.timeline-body .hljs-doctag,
.description-content .hljs-string,
.description-content .hljs-doctag,
.document-content .hljs-string,
.document-content .hljs-doctag {
  color: #032f62;
}

.ql-editor .ql-syntax .hljs-title,
.ql-editor .ql-syntax .hljs-section,
.ql-editor .ql-syntax .hljs-selector-id,
.timeline-body .hljs-title,
.timeline-body .hljs-section,
.timeline-body .hljs-selector-id,
.description-content .hljs-title,
.description-content .hljs-section,
.description-content .hljs-selector-id,
.document-content .hljs-title,
.document-content .hljs-section,
.document-content .hljs-selector-id {
  color: #6f42c1;
  font-weight: bold;
}

.ql-editor .ql-syntax .hljs-type,
.ql-editor .ql-syntax .hljs-class .hljs-title,
.timeline-body .hljs-type,
.timeline-body .hljs-class .hljs-title,
.description-content .hljs-type,
.description-content .hljs-class .hljs-title,
.document-content .hljs-type,
.document-content .hljs-class .hljs-title {
  color: #005cc5;
  font-weight: bold;
}

.ql-editor .ql-syntax .hljs-tag,
.ql-editor .ql-syntax .hljs-name,
.ql-editor .ql-syntax .hljs-attribute,
.timeline-body .hljs-tag,
.timeline-body .hljs-name,
.timeline-body .hljs-attribute,
.description-content .hljs-tag,
.description-content .hljs-name,
.description-content .hljs-attribute,
.document-content .hljs-tag,
.document-content .hljs-name,
.document-content .hljs-attribute {
  color: #22863a;
  font-weight: normal;
}

.ql-editor .ql-syntax .hljs-regexp,
.ql-editor .ql-syntax .hljs-link,
.timeline-body .hljs-regexp,
.timeline-body .hljs-link,
.description-content .hljs-regexp,
.description-content .hljs-link,
.document-content .hljs-regexp,
.document-content .hljs-link {
  color: #032f62;
}

.ql-editor .ql-syntax .hljs-symbol,
.ql-editor .ql-syntax .hljs-bullet,
.timeline-body .hljs-symbol,
.timeline-body .hljs-bullet,
.description-content .hljs-symbol,
.description-content .hljs-bullet,
.document-content .hljs-symbol,
.document-content .hljs-bullet {
  color: #e36209;
}

.ql-editor .ql-syntax .hljs-built_in,
.ql-editor .ql-syntax .hljs-builtin-name,
.timeline-body .hljs-built_in,
.timeline-body .hljs-builtin-name,
.description-content .hljs-built_in,
.description-content .hljs-builtin-name,
.document-content .hljs-built_in,
.document-content .hljs-builtin-name {
  color: #005cc5;
}

.ql-editor .ql-syntax .hljs-meta,
.timeline-body .hljs-meta,
.description-content .hljs-meta,
.document-content .hljs-meta {
  color: #999;
}

.ql-editor .ql-syntax .hljs-deletion,
.timeline-body .hljs-deletion,
.description-content .hljs-deletion,
.document-content .hljs-deletion {
  background: #ffeef0;
}

.ql-editor .ql-syntax .hljs-addition,
.timeline-body .hljs-addition,
.description-content .hljs-addition,
.document-content .hljs-addition {
  background: #f0fff4;
}

.ql-editor .ql-syntax .hljs-emphasis,
.timeline-body .hljs-emphasis,
.description-content .hljs-emphasis,
.document-content .hljs-emphasis {
  font-style: italic;
}

.ql-editor .ql-syntax .hljs-strong,
.timeline-body .hljs-strong,
.description-content .hljs-strong,
.document-content .hljs-strong {
  font-weight: bold;
}

/* Mobile Responsive for Compact Task View */
@media (max-width: 768px) {
  .task-content-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .detail-row {
    grid-template-columns: 1fr;
    gap: 0.25rem;
    padding: 0.5rem 0;
  }
  
  .time-actions-row {
    flex-direction: column;
    gap: 1rem;
  }
  
  .time-entry-form {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .time-inputs {
    flex-direction: column;
  }
  
  .time-input, .desc-input {
    width: 100%;
  }

  .quill-editor .ql-toolbar {
    padding: 0.5rem;
  }
  
  .quill-editor .ql-editor {
    padding: 0.75rem;
  }
  
  .description-edit-buttons {
    justify-content: center;
  }
}

/* Priority styling */
.priority-badge {
  font-size: 0.8rem;
  margin-left: 0.5rem;
}

.task-priority {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.8rem;
  font-weight: 600;
  margin: 0.25rem 0;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  background: rgba(0,0,0,0.05);
}

.task-card.priority-critical {
  border-left: 4px solid #dc3545;
}

.task-card.priority-high {
  border-left: 4px solid #fd7e14;
}

.task-card.priority-medium {
  border-left: 4px solid #ffc107;
}

.task-card.priority-low {
  border-left: 4px solid #28a745;
}

.priority-select-compact {
  padding: 0.25rem 0.5rem;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  font-size: 0.85rem;
  background: white;
  cursor: pointer;
}

.priority-select-compact:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
}

/* Task View Compact Styles */
.blocker-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  padding: 1px 0;
  line-height: 1.2;
}

.blocker-header .detail-label {
  white-space: nowrap;
  margin: 0;
  padding: 0;
  line-height: 1.2;
}

.add-blocker {
  flex: 1;
  margin: 0;
  padding: 0;
}

.add-blocker-form {
  margin: 0;
  padding: 0;
}

.search-container {
  margin: 0;
  padding: 0;
}

.task-search-input {
  width: 100%;
  height: 22px;
  padding: 1px 3px;
  margin: 0;
  font-size: 0.75rem;
  border: 1px solid transparent;
  border-radius: 3px;
  transition: all 0.2s ease;
  background: transparent;
  color: #6c757d;
}

.task-search-input:hover {
  border-color: #ced4da;
  background: rgba(255, 255, 255, 0.8);
}

.task-search-input:focus {
  outline: none;
  border-color: #ced4da;
  background: white;
  color: #333;
}

.task-search-input::placeholder {
  color: #6c757d;
  font-style: italic;
}

.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #ced4da;
  border-radius: 3px;
  margin-top: 0.1rem;
  max-height: 150px;
  overflow-y: auto;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.search-result-item {
  padding: 0.2rem 0.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.search-result-item:hover {
  background: #f8f9fa;
}

.search-result-id {
  font-weight: 600;
  color: #007bff;
  font-size: 0.75rem;
}

.search-result-title {
  color: #495057;
  font-size: 0.75rem;
}

.blockers-list, .blocking-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
  margin-top: 0.1rem;
}

.blocker-item, .blocking-item {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.75rem;
  padding: 0.1rem 0.3rem;
  background: #f8f9fa;
  border-radius: 3px;
  margin-bottom: 0;
}

.task-link-small {
  color: #007bff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.75rem;
}

.task-link-small:hover {
  text-decoration: underline;
}

.remove-link {
  color: #dc3545;
  text-decoration: none;
  font-weight: bold;
  font-size: 0.7rem;
  margin-left: 0.2rem;
}

.remove-link:hover {
  color: #a71d2a;
}

/* Timer and Time Entry Styles */
.timer-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.timer-controls-compact {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.active-timer-inline {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.timer-duration {
  font-weight: 600;
  color: #28a745;
  font-size: 0.9rem;
}

.time-entry-inline {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  border: none;
}

.time-form-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  border: none;
}

.time-input-small {
  width: 120px;
  padding: 0.25rem 0.5rem;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 0.875rem;
}

.desc-input-small {
  width: 200px;
  padding: 0.25rem 0.5rem;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 0.875rem;
}

.date-input-small {
  width: 130px;
  padding: 0.25rem 0.5rem;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 0.875rem;
  margin-right: 0.5rem;
}

.time-entry-inline .emergency-controls {
  display: flex !important;
  align-items: center !important;
  gap: 0.25rem !important;
  padding: 0 !important;
  border: none !important;
  border-top: none !important;
  margin: 0 !important;
  min-height: unset !important;
  background: none !important;
}

.time-entry-inline .emergency-checkbox-inline {
  margin: 0 !important;
  padding: 0 !important;
}

.time-entry-inline .emergency-label-inline {
  margin: 0 !important;
  padding: 0 !important;
  font-size: 0.8rem !important;
  color: #dc3545 !important;
  cursor: pointer !important;
}

.time-history-link {
  margin-left: auto;
}

.link-small {
  font-size: 0.8rem;
  color: #007bff;
  text-decoration: none;
}

.link-small:hover {
  text-decoration: underline;
}

/* Delete Task Button Styles */
.delete-task-btn {
  position: absolute;
  top: 5px;
  right: 5px;
  padding: 0 6px;
  font-size: 16px;
  line-height: 1;
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
}

.task-card:hover .delete-task-btn {
  opacity: 1;
}

.delete-task-form {
  display: inline;
}

.task-modal-actions .btn {
  margin-left: 8px;
}

/* Tag Styles */
.task-tags {
  margin: 8px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.task-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  background-color: #f3f4f6;
  color: #4b5563;
  border: 1px solid #e5e7eb;
}

.task-tag .remove-tag {
  margin-left: 4px;
  opacity: 0.6;
  text-decoration: none;
  color: inherit;
}

.task-tag .remove-tag:hover {
  opacity: 1;
}

.add-tag {
  margin-top: 8px;
}

.add-tag-form {
  display: inline-block;
}

/* Tag Input */
.tags-row {
  display: flex;
  align-items: center;
  gap: 4px;
}

.tags-row .detail-label {
  flex-shrink: 0;
}

.tags-container {
  flex: 1;
}

.tag-input-container {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 22px;
  padding: 1px 3px;
  border: none;
  border-radius: 6px;
  background-color: transparent;
  max-width: 300px;
}

.tag-input-container:focus-within {
  border: 1px solid #e5e7eb;
  background-color: #f9fafb;
}

.tags-list {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  align-items: center;
  padding: 1px 3px;
  pointer-events: auto;
  z-index: 2;
}

.tag-label {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 5px;
  background-color: #e5e7eb;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  font-size: 11px;
  color: #4b5563;
  line-height: 1;
  white-space: nowrap;
  pointer-events: auto;
}

.tag-label .remove-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  width: 12px;
  height: 12px;
  border: none;
  background: none;
  border-radius: 50%;
  font-size: 11px;
  color: #9ca3af;
  cursor: pointer;
  transition: all 0.2s;
  pointer-events: auto;
  z-index: 3;
}

.tag-label .remove-tag:hover {
  background-color: #d1d5db;
  color: #4b5563;
}

.add-tag-form {
  width: 100%;
}

.tag-input {
  flex: 1;
  min-width: 80px;
  font-size: 13px;
  padding: 1px 0;
  border: none;
  background: transparent;
  outline: none;
  margin-left: 0;
  text-align: left;
  direction: ltr;
  position: relative;
  z-index: 1;
  padding-left: 0;
  color: transparent;
  caret-color: #4b5563;
}

.tag-input::placeholder {
  color: #9ca3af;
  text-align: left;
}

.tag-input::selection {
  background: transparent;
}

.editable-estimate {
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 3px;
  transition: background-color 0.2s;
}

.editable-estimate:hover {
  background-color: #f8f9fa;
}

.empty-estimate {
  color: #6c757d;
  font-style: italic;
}

.estimate-input-inline {
  width: 50px;
  padding: 0.2rem;
  font-size: 0.75rem;
  border: 1px solid #dee2e6;
  border-radius: 3px;
}

.estimate-input-inline:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

/* Quill list styling fixes */
.ql-editor ul {
  padding-left: 0;
  margin-left: 0;
  list-style-type: none;
}

.ql-editor ol {
  padding-left: 0 !important;
  margin-left: 0;
  list-style-type: none;
}

.ql-editor li {
  position: relative;
}

.ql-editor li:not(.ql-direction-rtl)::before {
  margin-left: -1.5em;
  margin-right: 0.3em;
  text-align: right;
  white-space: nowrap;
  width: 1.2em;
  position: absolute;
}

.ql-editor ul > li:not(.ql-direction-rtl)::before {
  content: '•';
}

.ql-editor ol > li:not(.ql-direction-rtl)::before {
  content: counter(list-0, decimal) '•';
}

.ql-editor ol {
  counter-reset: list-0;
}

.ql-editor ol > li {
  counter-increment: list-0;
}

/* Fix for bullet lists showing as numbered lists - ensure proper bullet styling */
ol li[data-list='bullet']:not(.ql-editor ol li[data-list='bullet']) {
  list-style-type: disc;
}

/* COMPLETE OVERRIDE: Disable all existing Quill list pseudo-elements */
.ql-editor li:not(.ql-direction-rtl)::before {
  display: none !important;
  content: '' !important;
  visibility: hidden !important;
}

/* Re-enable only for ordered lists that are NOT bullets */
.ql-editor ol li:not([data-list='bullet']):not(.ql-direction-rtl)::before {
  display: block !important;
  content: counter(list-0, decimal) '•' !important;
  visibility: visible !important;
  margin-right: 0.3em !important;
  text-align: right !important;
  white-space: nowrap !important;
  position: absolute !important;
}

ol, ul {
  padding-left: 10px !important;
}
/* Custom bullet styling - use list-style-type so bullets move with indented text */
.ql-editor ol li[data-list='bullet'],
.ql-editor li[data-list='bullet'],
.description-content li[data-list='bullet'],
.timeline-body li[data-list='bullet'],
.document-content li[data-list='bullet'],
.task-description-section li[data-list='bullet'] {
  list-style-position: inside !important;
  counter-increment: none !important;
  position: relative !important;
}

/* Disable pseudo-elements specifically for bullet lists to prevent double bullets */
.ql-editor ol li[data-list='bullet']:not(.ql-direction-rtl)::before,
.ql-editor li[data-list='bullet']:not(.ql-direction-rtl)::before {
  display: none !important;
  content: '' !important;
  visibility: hidden !important;
}

/* Specific padding for Quill editor container */
.ql-editor.ql-blank {
  padding: 5px !important;
}

/* Complete override for indentation in all contexts */
.ql-editor li.ql-indent-1,
.ql-editor ol li.ql-indent-1,
.ql-editor ul li.ql-indent-1,
.description-content li.ql-indent-1,
.timeline-body li.ql-indent-1,
.document-content li.ql-indent-1 {
  padding-left: 1.5em !important;
  margin-left: 0 !important;
}

.ql-editor li.ql-indent-1:not(.ql-direction-rtl)::before,
.description-content li.ql-indent-1:not(.ql-direction-rtl)::before,
.timeline-body li.ql-indent-1:not(.ql-direction-rtl)::before,
.document-content li.ql-indent-1:not(.ql-direction-rtl)::before {
  margin-left: -1.5em !important;
}

.ql-editor li.ql-indent-2,
.ql-editor ol li.ql-indent-2,
.ql-editor ul li.ql-indent-2,
.description-content li.ql-indent-2,
.timeline-body li.ql-indent-2,
.document-content li.ql-indent-2 {
  padding-left: 3em !important;
  margin-left: 0 !important;
}

.ql-editor li.ql-indent-2:not(.ql-direction-rtl)::before,
.description-content li.ql-indent-2:not(.ql-direction-rtl)::before,
.timeline-body li.ql-indent-2:not(.ql-direction-rtl)::before,
.document-content li.ql-indent-2:not(.ql-direction-rtl)::before {
  margin-left: -3em !important;
}

.ql-editor li.ql-indent-3,
.ql-editor ol li.ql-indent-3,
.ql-editor ul li.ql-indent-3,
.description-content li.ql-indent-3,
.timeline-body li.ql-indent-3,
.document-content li.ql-indent-3 {
  padding-left: 4.5em !important;
  margin-left: 0 !important;
}

.ql-editor li.ql-indent-3:not(.ql-direction-rtl)::before,
.description-content li.ql-indent-3:not(.ql-direction-rtl)::before,
.timeline-body li.ql-indent-3:not(.ql-direction-rtl)::before,
.document-content li.ql-indent-3:not(.ql-direction-rtl)::before {
  margin-left: -4.5em !important;
}

.ql-editor li.ql-indent-4,
.ql-editor ol li.ql-indent-4,
.ql-editor ul li.ql-indent-4,
.description-content li.ql-indent-4,
.timeline-body li.ql-indent-4,
.document-content li.ql-indent-4 {
  padding-left: 6em !important;
  margin-left: 0 !important;
}

.ql-editor li.ql-indent-4:not(.ql-direction-rtl)::before,
.description-content li.ql-indent-4:not(.ql-direction-rtl)::before,
.timeline-body li.ql-indent-4:not(.ql-direction-rtl)::before,
.document-content li.ql-indent-4:not(.ql-direction-rtl)::before {
  margin-left: -6em !important;
}

.ql-editor li.ql-indent-5,
.ql-editor ol li.ql-indent-5,
.ql-editor ul li.ql-indent-5,
.description-content li.ql-indent-5,
.timeline-body li.ql-indent-5,
.document-content li.ql-indent-5 {
  padding-left: 7.5em !important;
  margin-left: 0 !important;
}

.ql-editor li.ql-indent-5:not(.ql-direction-rtl)::before,
.description-content li.ql-indent-5:not(.ql-direction-rtl)::before,
.timeline-body li.ql-indent-5:not(.ql-direction-rtl)::before,
.document-content li.ql-indent-5:not(.ql-direction-rtl)::before {
  margin-left: -7.5em !important;
}

.ql-editor li.ql-indent-6,
.ql-editor ol li.ql-indent-6,
.ql-editor ul li.ql-indent-6,
.description-content li.ql-indent-6,
.timeline-body li.ql-indent-6,
.document-content li.ql-indent-6 {
  padding-left: 9em !important;
  margin-left: 0 !important;
}

.ql-editor li.ql-indent-6:not(.ql-direction-rtl)::before,
.description-content li.ql-indent-6:not(.ql-direction-rtl)::before,
.timeline-body li.ql-indent-6:not(.ql-direction-rtl)::before,
.document-content li.ql-indent-6:not(.ql-direction-rtl)::before {
  margin-left: -9em !important;
}

.ql-editor li.ql-indent-7,
.ql-editor ol li.ql-indent-7,
.ql-editor ul li.ql-indent-7,
.description-content li.ql-indent-7,
.timeline-body li.ql-indent-7,
.document-content li.ql-indent-7 {
  padding-left: 10.5em !important;
  margin-left: 0 !important;
}

.ql-editor li.ql-indent-7:not(.ql-direction-rtl)::before,
.description-content li.ql-indent-7:not(.ql-direction-rtl)::before,
.timeline-body li.ql-indent-7:not(.ql-direction-rtl)::before,
.document-content li.ql-indent-7:not(.ql-direction-rtl)::before {
  margin-left: -10.5em !important;
}

.ql-editor li.ql-indent-8,
.ql-editor ol li.ql-indent-8,
.ql-editor ul li.ql-indent-8,
.description-content li.ql-indent-8,
.timeline-body li.ql-indent-8,
.document-content li.ql-indent-8 {
  padding-left: 12em !important;
  margin-left: 0 !important;
}

.ql-editor li.ql-indent-8:not(.ql-direction-rtl)::before,
.description-content li.ql-indent-8:not(.ql-direction-rtl)::before,
.timeline-body li.ql-indent-8:not(.ql-direction-rtl)::before,
.document-content li.ql-indent-8:not(.ql-direction-rtl)::before {
  margin-left: -12em !important;
}

/* Additional specific selectors for task descriptions and other view contexts */
.task-description-section .ql-indent-1,
.task-description-section li.ql-indent-1 {
  padding-left: 1.5em !important;
}

.task-description-section .ql-indent-2,
.task-description-section li.ql-indent-2 {
  padding-left: 3em !important;
}

.task-description-section .ql-indent-3,
.task-description-section li.ql-indent-3 {
  padding-left: 4.5em !important;
}

.task-description-section .ql-indent-4,
.task-description-section li.ql-indent-4 {
  padding-left: 6em !important;
}

.task-description-section .ql-indent-5,
.task-description-section li.ql-indent-5 {
  padding-left: 7.5em !important;
}

.task-description-section .ql-indent-6,
.task-description-section li.ql-indent-6 {
  padding-left: 9em !important;
}

.task-description-section .ql-indent-7,
.task-description-section li.ql-indent-7 {
  padding-left: 10.5em !important;
}

.task-description-section .ql-indent-8,
.task-description-section li.ql-indent-8 {
  padding-left: 12em !important;
}

/* Global catch-all for any missed contexts */
.ql-indent-1 {
  padding-left: 1.5em !important;
}

.ql-indent-2 {
  padding-left: 3em !important;
}

.ql-indent-3 {
  padding-left: 4.5em !important;
}

.ql-indent-4 {
  padding-left: 6em !important;
}

.ql-indent-5 {
  padding-left: 7.5em !important;
}

.ql-indent-6 {
  padding-left: 9em !important;
}

.ql-indent-7 {
  padding-left: 10.5em !important;
}

.ql-indent-8 {
  padding-left: 12em !important;
}



/* Active Storage attachment styling */
.active-storage-blob {
  display: inline-block;
  margin: 0.5rem 0;
  padding: 0.5rem;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  background: #f8f9fa;
  font-size: 0.9rem;
  color: #495057;
  text-decoration: none;
}

.active-storage-blob:hover {
  background: #e9ecef;
  text-decoration: none;
  border-color: #ced4da;
}

.active-storage-blob .icon {
  margin-right: 0.5rem;
}

.active-storage-blob .size {
  color: #6c757d;
  font-size: 0.8rem;
  margin-left: 0.5rem;
}

/* Code block styling for view mode (content display) */
.document-content pre,
.description-content pre,
.timeline-body pre,
.document-content .ql-code-block,
.description-content .ql-code-block,
.timeline-body .ql-code-block,
.document-content .ql-code-block-container,
.description-content .ql-code-block-container,
.timeline-body .ql-code-block-container,
.hljs-code-block {
  background-color: #cdd1d5 !important;
  border: 1px solid #e1e4e8 !important;
  border-radius: 6px !important;
  padding: 16px !important;
  font-family: 'SFMono-Regular', 'Monaco', 'Inconsolata', 'Roboto Mono', 'Consolas', 'Courier New', monospace !important;
  font-size: 13px !important;
  line-height: 1.45 !important;
  color: #24292e !important;
  white-space: pre-wrap !important;
  word-wrap: break-word !important;
  overflow-x: auto !important;
  margin: 8px 0 !important;
}

/* When nested in other contexts (container > code-block), remove styling from inner element */
.document-content .ql-code-block-container .ql-code-block,
.description-content .ql-code-block-container .ql-code-block,
.timeline-body .ql-code-block-container .ql-code-block {
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* Override highlight.js default background for our GitHub-style theme */
.hljs-code-block.hljs {
  background: #f8f9fa !important;
}

/* Inline code styling */
.timeline-body code,
.description-content code,
.document-content code,
.hljs-inline {
  background-color: rgba(175, 184, 193, 0.2);
  padding: 0.2em 0.4em;
  border-radius: 3px;
  font-family: 'SFMono-Regular', 'Monaco', 'Inconsolata', 'Roboto Mono', 'Consolas', 'Courier New', monospace;
  font-size: 85%;
  color: #e36209;
}

/* Ensure code blocks in comments have proper spacing */
.timeline-body pre,
.timeline-body .hljs-code-block {
  margin: 12px 0;
}

/* Image styling for comments - inline thumbnails */
.timeline-body img,
.document-content img {
  max-width: 80px;
  max-height: 60px;
  width: auto;
  height: auto;
  border-radius: 4px;
  border: 1px solid #e1e4e8;
  margin: 0 5px 2px 0;
  cursor: pointer;
  transition: all 0.2s ease;
  object-fit: cover;
  display: inline-block;
  vertical-align: baseline;
  flex-shrink: 0;
}

/* Image styling for task descriptions - smaller inline thumbnails */
.description-content img,
.task-description-section .description-content img,
.task-description-editor img,
.task-description-section .task-description-editor img {
  max-width: 50px !important;
  max-height: 35px !important;
  width: auto !important;
  height: auto !important;
  border-radius: 3px;
  border: 1px solid #e1e4e8;
  margin: 0 3px 1px 0;
  cursor: pointer;
  transition: all 0.2s ease;
  object-fit: cover;
  display: inline-block !important;
  vertical-align: baseline;
  flex-shrink: 0;
}

.timeline-body img:hover,
.document-content img:hover {
  border-color: #0366d6;
  box-shadow: 0 2px 8px rgba(3, 102, 214, 0.2);
  transform: scale(1.05);
}

.description-content img:hover,
.task-description-section .description-content img:hover,
.task-description-editor img:hover,
.task-description-section .task-description-editor img:hover {
  border-color: #0366d6;
  box-shadow: 0 2px 8px rgba(3, 102, 214, 0.2);
  transform: scale(1.1);
}

/* Ensure images don't overflow their containers */
.description-content,
.task-description-editor,
.timeline-body,
.document-content {
  overflow-wrap: break-word;
  word-wrap: break-word;
}

/* Task description editor styling - match comments */
.task-description-editor {
  font-size: 14px !important;
  min-height: 40px;
  padding: 0 !important;
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1.5;
}

.task-description-editor:hover {
  border-color: #e1e4e8;
  background-color: #f8f9fa;
}

/* Empty description styling */
.task-description-editor:empty::before,
.task-description-editor[data-empty="true"]::before {
  content: "Click to add description";
  color: #6c757d;
  font-style: italic;
}

/* Task description content styling - match timeline-body (comments) */
.description-content,
.task-description-readonly {
  font-size: 14px;
  line-height: 1.6;
  color: #333;
  margin-bottom: 1rem;
}

.description-content p,
.task-description-editor p,
.task-description-readonly p,
.timeline-body p,
.document-content p {
  margin-bottom: 1.2rem;
}

/* Quill formatting styles for task descriptions - match document view */
.description-content h1,
.description-content h2,
.description-content h3,
.description-content h4,
.description-content h5,
.description-content h6,
.task-description-readonly h1,
.task-description-readonly h2,
.task-description-readonly h3,
.task-description-readonly h4,
.task-description-readonly h5,
.task-description-readonly h6 {
  margin: 1.5rem 0 1rem;
  line-height: 1.2;
  color: #212529;
}

.description-content h1,
.task-description-readonly h1 { font-size: 2em; }
.description-content h2,
.task-description-readonly h2 { font-size: 1.75em; }
.description-content h3,
.task-description-readonly h3 { font-size: 1.5em; }
.description-content h4,
.task-description-readonly h4 { font-size: 1.25em; }
.description-content h5,
.task-description-readonly h5 { font-size: 1.1em; }
.description-content h6,
.task-description-readonly h6 { font-size: 1em; }

.description-content ul,
.description-content ol,
.task-description-readonly ul,
.task-description-readonly ol {
  padding-left: 1.5rem;
  margin: 1rem 0;
}

.description-content li,
.task-description-readonly li {
  margin: 0.5rem 0;
}

/* Proper list styling for task descriptions - match document view */
.description-content ul,
.task-description-readonly ul {
  list-style-type: disc;
}

.description-content ol,
.task-description-readonly ol {
  list-style-type: decimal;
}

.description-content ul ul,
.task-description-readonly ul ul {
  list-style-type: circle;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

.description-content ul ul ul,
.task-description-readonly ul ul ul {
  list-style-type: square;
}

.description-content ol ol,
.task-description-readonly ol ol {
  list-style-type: lower-alpha;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

.description-content ol ol ol,
.task-description-readonly ol ol ol {
  list-style-type: lower-roman;
}

/* Quill list styling for task descriptions */
.description-content .ql-editor ul,
.task-description-readonly .ql-editor ul {
  list-style-type: disc;
}

.description-content .ql-editor ol,
.task-description-readonly .ql-editor ol {
  list-style-type: decimal;
}

.description-content .ql-editor ul ul,
.task-description-readonly .ql-editor ul ul {
  list-style-type: circle;
}

.description-content .ql-editor ul ul ul,
.task-description-readonly .ql-editor ul ul ul {
  list-style-type: square;
}

.description-content .ql-editor ol ol,
.task-description-readonly .ql-editor ol ol {
  list-style-type: lower-alpha;
}

.description-content .ql-editor ol ol ol,
.task-description-readonly .ql-editor ol ol ol {
  list-style-type: lower-roman;
}

/* Quill list item styling for task descriptions */
.description-content .ql-editor li,
.task-description-readonly .ql-editor li {
  margin: 0.5rem 0;
}

.description-content .ql-editor li:not(.ql-direction-rtl)::before {
  content: attr(data-list);
  margin-right: 0.5em;
  text-align: right;
}

.description-content .ql-editor ul > li:not(.ql-direction-rtl)::before {
  content: '•';
}

.description-content .ql-editor ol > li:not(.ql-direction-rtl)::before {
  content: counter(list-1, decimal) '•';
}

.description-content .ql-editor ol,
.task-description-readonly .ql-editor ol {
  counter-reset: list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;
}

.description-content .ql-editor ol > li,
.task-description-readonly .ql-editor ol > li {
  counter-increment: list-1;
  counter-reset: list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;
}

.description-content .ql-editor ol > li::before,
.task-description-readonly .ql-editor ol > li::before {
  content: counter(list-1, decimal) '•';
}

.description-content .ql-editor ol ol > li,
.task-description-readonly .ql-editor ol ol > li {
  counter-increment: list-2;
  counter-reset: list-3 list-4 list-5 list-6 list-7 list-8 list-9;
}

.description-content .ql-editor ol ol > li::before,
.task-description-readonly .ql-editor ol ol > li::before {
  content: counter(list-2, lower-alpha) '•';
}

.description-content .ql-editor ol ol ol > li,
.task-description-readonly .ql-editor ol ol ol > li {
  counter-increment: list-3;
  counter-reset: list-4 list-5 list-6 list-7 list-8 list-9;
}

.description-content .ql-editor ol ol ol > li::before,
.task-description-readonly .ql-editor ol ol ol > li::before {
  content: counter(list-3, lower-roman) '•';
}

.description-content blockquote,
.task-description-readonly blockquote {
  border-left: 4px solid #e9ecef;
  margin: 1rem 0;
  padding: 0.5rem 0 0.5rem 1rem;
  color: #6c757d;
}

.description-content pre,
.task-description-readonly pre {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 4px;
  margin: 1rem 0;
  overflow-x: auto;
}

.description-content pre code,
.task-description-readonly pre code {
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace;
  font-size: 0.9em;
  line-height: 1.4;
  white-space: pre;
}

.description-content code,
.task-description-readonly code {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 3px;
  padding: 0.2em 0.4em;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace;
  font-size: 0.9em;
}

.description-content table,
.task-description-readonly table {
  border-collapse: collapse;
  width: 100%;
  margin: 1rem 0;
}

.description-content th,
.description-content td,
.task-description-readonly th,
.task-description-readonly td {
  border: 1px solid #dee2e6;
  padding: 0.75rem;
  text-align: left;
}

.description-content th,
.task-description-readonly th {
  background: #f8f9fa;
  font-weight: 600;
}

/* Quill.js formatting styles for task descriptions */
.description-content .ql-align-center,
.task-description-readonly .ql-align-center {
  text-align: center;
}

.description-content .ql-align-right,
.task-description-readonly .ql-align-right {
  text-align: right;
}

.description-content .ql-align-justify,
.task-description-readonly .ql-align-justify {
  text-align: justify;
}

.description-content .ql-size-small,
.task-description-readonly .ql-size-small {
  font-size: 0.75em;
}

.description-content .ql-size-large,
.task-description-readonly .ql-size-large {
  font-size: 1.5em;
}

.description-content .ql-size-huge,
.task-description-readonly .ql-size-huge {
  font-size: 2.5em;
}

.description-content .ql-color-red,
.task-description-readonly .ql-color-red {
  color: #e60000;
}

.description-content .ql-color-orange,
.task-description-readonly .ql-color-orange {
  color: #f90;
}

.description-content .ql-color-yellow,
.task-description-readonly .ql-color-yellow {
  color: #ffff00;
}

.description-content .ql-color-green,
.task-description-readonly .ql-color-green {
  color: #008a00;
}

.description-content .ql-color-blue,
.task-description-readonly .ql-color-blue {
  color: #0066cc;
}

.description-content .ql-color-purple,
.task-description-readonly .ql-color-purple {
  color: #9933ff;
}

.description-content .ql-bg-red,
.task-description-readonly .ql-bg-red {
  background-color: #e60000;
}

.description-content .ql-bg-orange,
.task-description-readonly .ql-bg-orange {
  background-color: #f90;
}

.description-content .ql-bg-yellow,
.task-description-readonly .ql-bg-yellow {
  background-color: #ffff00;
}

.description-content .ql-bg-green,
.task-description-readonly .ql-bg-green {
  background-color: #008a00;
}

.description-content .ql-bg-blue,
.task-description-readonly .ql-bg-blue {
  background-color: #0066cc;
}

.description-content .ql-bg-purple,
.task-description-readonly .ql-bg-purple {
  background-color: #9933ff;
}

.description-content .ql-font-serif,
.task-description-readonly .ql-font-serif {
  font-family: Georgia, Times New Roman, serif;
}

.description-content .ql-font-monospace,
.task-description-readonly .ql-font-monospace {
  font-family: Monaco, Courier New, monospace;
}

.description-content .ql-indent-1,
.task-description-readonly .ql-indent-1 {
  padding-left: 1.5em;
}

.description-content .ql-indent-2,
.task-description-readonly .ql-indent-2 {
  padding-left: 3em;
}

.description-content .ql-indent-3,
.task-description-readonly .ql-indent-3 {
  padding-left: 4.5em;
}

.description-content .ql-indent-4,
.task-description-readonly .ql-indent-4 {
  padding-left: 6em;
}

.description-content .ql-indent-5,
.task-description-readonly .ql-indent-5 {
  padding-left: 7.5em;
}

.description-content .ql-indent-6,
.task-description-readonly .ql-indent-6 {
  padding-left: 9em;
}

.description-content .ql-indent-7,
.task-description-readonly .ql-indent-7 {
  padding-left: 10.5em;
}

.description-content .ql-indent-8,
.task-description-readonly .ql-indent-8 {
  padding-left: 12em;
}

.description-content .ql-direction-rtl,
.task-description-readonly .ql-direction-rtl {
  direction: rtl;
}

.description-content .ql-syntax,
.task-description-readonly .ql-syntax {
  background: #2d3748;
  color: #e2e8f0;
  border: none;
  border-radius: 8px;
  padding: 1.5rem;
  margin: 1rem 0;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace;
  font-size: 0.9em;
  line-height: 1.6;
  white-space: pre;
  overflow-x: auto;
}

/* Enhanced code block styling with syntax highlighting for task descriptions */
.description-content .hljs-code-block,
.task-description-readonly .hljs-code-block {
  background: #2d3748;
  color: #e2e8f0;
  border: none;
  border-radius: 8px;
  padding: 1.5rem;
  margin: 1rem 0;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace;
  font-size: 0.9em;
  line-height: 1.6;
  white-space: pre;
  overflow-x: auto;
}

/* Full-size image modal */
.image-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  z-index: 2000;
  justify-content: center;
  align-items: center;
  padding: 2.5vh 2.5vw;
  box-sizing: border-box;
}

.image-modal.show {
  display: flex;
}

.image-modal-content {
  position: relative;
  width: fit-content;
  height: fit-content;
  max-width: 95vw;
  max-height: 95vh;
  background: white;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  box-sizing: border-box;
}

.image-modal img,
.image-modal video,
.modal-media {
  max-width: calc(95vw - 40px);
  max-height: calc(95vh - 40px);
  width: auto;
  height: auto;
  display: block;
  border-radius: 4px;
  cursor: default;
  object-fit: contain;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: opacity 0.3s ease;
}

.image-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #dc3545;
  color: white;
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: all 0.2s ease;
  z-index: 2001;
}

.image-modal-close:hover {
  background: #c82333;
  transform: scale(1.1);
}

/* Loading indicator for images */
.image-loading {
  opacity: 0.6;
  filter: blur(1px);
}

/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
  .image-modal-content {
    max-width: 98vw;
    max-height: 98vh;
    padding: 15px;
  }
  
  .image-modal img,
  .image-modal video,
  .modal-media {
    max-width: calc(98vw - 30px);
    max-height: calc(98vh - 30px);
  }
  
  .image-modal-close {
    top: 5px;
    right: 5px;
    width: 35px;
    height: 35px;
    font-size: 18px;
  }
}

@media (max-width: 480px) {
  .image-modal-content {
    max-width: 100vw;
    max-height: 100vh;
    padding: 10px;
    border-radius: 0;
  }
  
  .image-modal img,
  .image-modal video,
  .modal-media {
    max-width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
  }
}

/* Video attachment styling */
.active-storage-video {
  display: inline-block;
  margin: 0.5rem 0;
  padding: 0.5rem;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  background: #f8f9fa;
  font-size: 0.9rem;
  color: #495057;
  text-decoration: none;
  position: relative;
}

.active-storage-video:hover {
  background: #e9ecef;
  text-decoration: none;
  border-color: #ced4da;
}

.active-storage-video .icon {
  margin-right: 0.5rem;
  color: #007bff;
}

.active-storage-video .size {
  color: #6c757d;
  font-size: 0.8rem;
  margin-left: 0.5rem;
}

.active-storage-video .duration {
  color: #6c757d;
  font-size: 0.8rem;
  margin-left: 0.5rem;
}

/* Video display styling */
.timeline-body video,
.document-content video,
.description-content video,
.task-description-readonly video {
  max-width: 200px;
  max-height: 150px;
  width: auto;
  height: auto;
  border-radius: 4px;
  border: 1px solid #e1e4e8;
  margin: 0 5px 2px 0;
  cursor: pointer;
  transition: all 0.2s ease;
  object-fit: cover;
  display: inline-block;
  vertical-align: baseline;
  flex-shrink: 0;
}

.timeline-body video:hover,
.document-content video:hover,
.description-content video:hover,
.task-description-readonly video:hover {
  border-color: #0366d6;
  box-shadow: 0 2px 8px rgba(3, 102, 214, 0.2);
  transform: scale(1.05);
}

/* Video styling for task descriptions - smaller inline thumbnails */
.description-content video,
.task-description-section .description-content video,
.task-description-editor video,
.task-description-section .task-description-editor video {
  max-width: 120px !important;
  max-height: 80px !important;
  width: auto !important;
  height: auto !important;
  border-radius: 3px;
  border: 1px solid #e1e4e8;
  margin: 0 3px 1px 0;
  cursor: pointer;
  transition: all 0.2s ease;
  object-fit: cover;
  display: inline-block !important;
  vertical-align: baseline;
  flex-shrink: 0;
}

.description-content video:hover,
.task-description-section .description-content video:hover,
.task-description-editor video:hover,
.task-description-section .task-description-editor video:hover {
  border-color: #0366d6;
  box-shadow: 0 2px 8px rgba(3, 102, 214, 0.2);
  transform: scale(1.1);
}

/* Video in Quill editor - full size in edit mode */
.ql-editor video {
  max-width: 100% !important;
  max-height: 400px !important;
  width: auto !important;
  height: auto !important;
  cursor: default !important;
  transform: none !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
  object-fit: contain !important;
  pointer-events: auto !important;
  border-radius: 4px;
  border: 1px solid #e1e4e8;
}

.ql-editor video:hover {
  transform: none !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
  opacity: 1 !important;
}

/* Video modal styling */
.video-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  z-index: 2000;
  justify-content: center;
  align-items: center;
  padding: 40px;
  box-sizing: border-box;
}

.video-modal.show {
  display: flex;
}

.video-modal-content {
  position: relative;
  max-width: calc(100vw - 80px);
  max-height: calc(100vh - 80px);
  background: black;
  border-radius: 8px;
  padding: 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.video-modal video {
  max-width: calc(100vw - 80px);
  max-height: calc(100vh - 80px);
  width: auto;
  height: auto;
  display: block;
  border-radius: 4px;
  cursor: default;
  object-fit: contain;
}

.video-modal-close {
  position: absolute;
  top: -15px;
  right: -15px;
  background: #dc3545;
  color: white;
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: all 0.2s ease;
  z-index: 2001;
}

.video-modal-close:hover {
  background: #c82333;
  transform: scale(1.1);
}

/* Video thumbnail with play button overlay */
.video-thumbnail {
  position: relative;
  display: inline-block;
  cursor: pointer;
}

.video-thumbnail::before {
  content: '▶';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.7);
  color: white;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  z-index: 10;
  pointer-events: none;
  transition: all 0.2s ease;
}

.video-thumbnail:hover::before {
  background: rgba(0, 0, 0, 0.9);
  transform: translate(-50%, -50%) scale(1.1);
}

/* Video controls styling */
.video-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  padding: 0.5rem;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 4px;
}

.video-controls button {
  background: none;
  border: none;
  color: #495057;
  cursor: pointer;
  font-size: 1.2rem;
  transition: color 0.2s ease;
}

.video-controls button:hover {
  color: #007bff;
}

/* Video upload progress */
.video-upload-progress {
  margin-top: 0.5rem;
  padding: 0.5rem;
  background: #f8f9fa;
  border-radius: 4px;
  border: 1px solid #dee2e6;
}

.video-upload-progress .progress-bar {
  height: 8px;
  background: #e9ecef;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.video-upload-progress .progress-fill {
  height: 100%;
  background: #007bff;
  transition: width 0.3s ease;
}

.video-upload-progress .progress-text {
  font-size: 0.8rem;
  color: #6c757d;
  text-align: center;
}

/* Video file type indicator */
.video-file-type {
  display: inline-block;
  padding: 0.2rem 0.4rem;
  background: #007bff;
  color: white;
  border-radius: 3px;
  font-size: 0.7rem;
  font-weight: bold;
  text-transform: uppercase;
  margin-left: 0.5rem;
}

/* Responsive video styling */
@media (max-width: 768px) {
  .timeline-body video,
  .document-content video {
    max-width: 120px;
    max-height: 80px;
  }
  
  .description-content video,
  .task-description-section .description-content video {
    max-width: 80px !important;
    max-height: 60px !important;
  }
  
  .video-modal-content {
    max-width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
  }
  
  .video-modal video {
    max-width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
  }
  
  .video-thumbnail::before {
    width: 24px;
    height: 24px;
    font-size: 10px;
  }
}

/* Make sure syntax highlighting colors work well with our dark theme */
.hljs-code-block .hljs-comment,
.hljs-code-block .hljs-quote {
  color: #5c6370;
  font-style: italic;
}

.hljs-code-block .hljs-keyword,
.hljs-code-block .hljs-selector-tag,
.hljs-code-block .hljs-subst {
  color: #c678dd;
  font-weight: bold;
}

.hljs-code-block .hljs-number,
.hljs-code-block .hljs-literal,
.hljs-code-block .hljs-variable,
.hljs-code-block .hljs-template-variable {
  color: #d19a66;
}

.hljs-code-block .hljs-string,
.hljs-code-block .hljs-doctag {
  color: #98c379;
}

.hljs-code-block .hljs-title,
.hljs-code-block .hljs-section,
.hljs-code-block .hljs-selector-id {
  color: #61afef;
  font-weight: bold;
}

.hljs-code-block .hljs-type,
.hljs-code-block .hljs-class .hljs-title {
  color: #e5c07b;
  font-weight: bold;
}

.hljs-code-block .hljs-attribute,
.hljs-code-block .hljs-name,
.hljs-code-block .hljs-tag {
  color: #e06c75;
}

.hljs-code-block .hljs-regexp,
.hljs-code-block .hljs-link {
  color: #56b6c2;
}

.hljs-code-block .hljs-symbol,
.hljs-code-block .hljs-bullet {
  color: #d19a66;
}

.hljs-code-block .hljs-built_in,
.hljs-code-block .hljs-builtin-name {
  color: #e5c07b;
}

.hljs-code-block .hljs-meta {
  color: #5c6370;
}

.hljs-code-block .hljs-deletion {
  background: #ffeef0;
}

.hljs-code-block .hljs-addition {
  background: #f0fff4;
}

.hljs-code-block .hljs-emphasis {
  font-style: italic;
}

.hljs-code-block .hljs-strong {
  font-weight: bold;
}

/* Task description images - clickable styling */
.task-description-image,
.description-content img,
.task-description-readonly img,
.comment-content img,
.timeline-body img {
  cursor: pointer;
  position: relative;
  z-index: 1000;
  transition: opacity 0.2s ease;
}

.task-description-image:hover,
.description-content img:hover,
.task-description-readonly img:hover,
.comment-content img:hover,
.timeline-body img:hover {
  opacity: 0.8;
}

/* Quill editor image styling - full size in edit mode */
.ql-editor img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 10px 0;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  cursor: default !important;
  pointer-events: auto;
}

/* Override thumbnail styles for images inside Quill editors (edit mode) */
.task-description-editor .ql-editor img,
.quill-editor .ql-editor img {
  max-width: 100% !important;
  max-height: none !important;
  width: auto !important;
  height: auto !important;
  cursor: default !important;
  transform: none !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
  object-fit: none !important;
  pointer-events: auto !important;
}

.task-description-editor .ql-editor img:hover,
.quill-editor .ql-editor img:hover {
  transform: none !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
  opacity: 1 !important;
}

/* Ensure images in read-only description are clickable thumbnails */
.description-content img,
.task-description-readonly img {
  cursor: pointer !important;
}

/* Task description images - clickable styling (only for read-only mode) */
.task-description-image,
.description-content img,
.task-description-readonly img,
.comment-content img,
.timeline-body img,
.document-content img {
  cursor: pointer;
  position: relative;
  z-index: 1000;
  transition: opacity 0.2s ease;
}

/* Don't apply hover effects to images in edit mode */
.ql-editor img {
  cursor: default !important;
}

.ql-editor img:hover {
  opacity: 1 !important;
  transform: none !important;
}

/* Apply hover effects only to read-only images */
.task-description-image:not(.ql-editor img):hover,
.description-content img:not(.ql-editor img):hover,
.task-description-readonly img:hover,
.comment-content img:not(.ql-editor img):hover,
.timeline-body img:not(.ql-editor img):hover,
.document-content img:not(.ql-editor img):hover {
  opacity: 0.8;
}

/* Calendar Styles */
.calendar-container {
  margin: 20px 0;
}

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

.calendar-wrapper {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  overflow: hidden;
}

.simple-calendar {
  table-layout: fixed;
  width: 100%;
}

.simple-calendar .calendar-heading {
  background: #f8f9fa;
  padding: 15px;
  text-align: center;
  font-weight: bold;
  border-bottom: 1px solid #dee2e6;
}

.simple-calendar .calendar-heading a {
  color: #495057;
  text-decoration: none;
  font-size: 18px;
  margin: 0 10px;
}

.simple-calendar .calendar-heading a:hover {
  color: #007bff;
}

.simple-calendar .day-names {
  background: #e9ecef;
}

.simple-calendar thead {
  height: auto;
}

.simple-calendar .day-names th {
  padding: 2px 4px;
  text-align: center;
  font-weight: 600;
  color: #495057;
  border-bottom: 1px solid #dee2e6;
  font-size: 14px;
  line-height: 1.1;
  vertical-align: middle;
}

.simple-calendar .calendar-body td {
  height: 120px;
  vertical-align: top;
  padding: 0 !important;
  margin: 0;
  border: 1px solid #dee2e6;
  position: relative;
}

/* Override Bootstrap table padding */
.simple-calendar .table > :not(caption) > * > * {
  padding: 0 !important;
}

.calendar-day {
  height: 100%;
  padding: 0;
  margin: 0;
  cursor: pointer;
  transition: background-color 0.2s;
  display: flex;
  flex-direction: column;
}

.calendar-day:hover {
  background-color: #f8f9fa;
}

/* Top row layout */
.calendar-top-row {
  display: flex;
  width: 100%;
  height: 20px;
  margin: 0;
  padding: 0;
}

/* All-day events banner */
.all-day-banner {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 0;
  margin: 0;
  overflow: hidden;
  background-color: rgba(248, 249, 250, 0.3);
}

.all-day-banner .event-item.all-day {
  flex: 1;
  margin: 0;
  padding: 2px 4px;
  font-size: 10px;
  border-radius: 0;
  color: white !important;
  font-weight: 500;
  text-align: center;
  border: none;
  box-shadow: none;
  min-height: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Override text color when background is applied via inline style */
.all-day-banner .event-item.all-day[style*="background-color"] {
  color: white !important;
}

.all-day-banner .event-item.all-day .event-title {
  margin: 0;
  line-height: 1.1;
  font-size: 10px;
}

.all-day-banner .event-item.all-day .event-meta {
  margin-top: 1px;
  justify-content: center;
}

.all-day-banner .event-item.all-day .badge {
  font-size: 7px;
  padding: 0px 2px;
  margin: 0 1px;
}

/* Day number square */
.day-number-square {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 11px;
  color: #495057;
  
  flex-shrink: 0;
}

.day-number {
  font-weight: bold;
  color: #495057;
  margin: 0 5px 5px 5px;
  text-align: left;
  flex-shrink: 0;
}

.simple-calendar .today .day-number-square {
  color: #007bff;
  background: #e3f2fd;
  border: 2px solid #007bff;
}

.simple-calendar .other-month .day-number-square {
  color: #adb5bd;
  background-color: rgba(173, 181, 189, 0.1);
}

.day-events {
  flex: 1;
  padding: 0 5px 5px 5px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.event-item {
  color: white;
  padding: 2px 4px;
  margin: 1px 0;
  border-radius: 3px;
  font-size: 10px;
  line-height: 1.2;
  cursor: pointer;
  transition: opacity 0.2s;
}

.event-item:first-child {
  margin-top: 0;
}

/* Default background for events without inline styles */
.event-item:not([style*="background-color"]) {
  background-color: #3498db !important;
}

/* Let inline styles work naturally - no overrides needed */

/* Allow inline styles to work for all-day events */

.event-item:hover {
  opacity: 0.8;
}

.event-time {
  font-weight: bold;
}

.event-title {
  margin-top: 1px;
}

.event-meta {
  display: flex;
  gap: 2px;
  margin-top: 2px;
}

.badge {
  display: inline-block;
  padding: 1px 4px;
  font-size: 8px;
  font-weight: bold;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  vertical-align: baseline;
  border-radius: 2px;
}

.badge-purple {
  background-color: #9b59b6;
  color: white;
}

.badge-red {
  background-color: #e74c3c;
  color: white;
}

.badge-blue {
  background-color: #3498db;
  color: white;
}

.badge-success {
  background-color: #27ae60;
  color: white;
}

.calendar-legend {
  margin-top: 20px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
}

.legend-items {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.color-box {
  width: 16px;
  height: 16px;
  border-radius: 3px;
  border: 1px solid #dee2e6;
}

/* Event Detail Styles */
.event-details {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.event-header {
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #dee2e6;
}

.event-meta {
  margin-top: 10px;
}

.event-meta .badge {
  padding: 4px 8px;
  font-size: 12px;
  margin-right: 5px;
}

.event-info {
  margin-bottom: 20px;
}

.info-item {
  margin-bottom: 10px;
}

.info-item strong {
  display: inline-block;
  width: 120px;
  color: #495057;
}

.event-description {
  margin-bottom: 20px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
}

.recurrence-info {
  margin-bottom: 20px;
  padding: 15px;
  background: #e8f5e8;
  border-radius: 8px;
}

.event-actions {
  display: flex;
  gap: 10px;
}

/* Form Styles */
.form-check-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.form-check-inline {
  margin-right: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
  .simple-calendar .calendar-body td {
    height: 100px;
  }
  
  .calendar-day {
    padding: 0;
  display: flex;
    flex-direction: column;
  }
  
  .calendar-top-row {
    height: 18px;
  }
  
  .all-day-banner .event-item.all-day {
    font-size: 8px;
    padding: 1px 2px;
    min-height: 18px;
  }
  
  .all-day-banner .event-item.all-day .event-title {
    font-size: 8px;
  }
  
  .all-day-banner .event-item.all-day .badge {
    font-size: 6px;
    padding: 0px 1px;
  }
  
  .day-number-square {
    width: 18px;
    height: 18px;
    font-size: 9px;
  }
  
  .event-item {
    font-size: 8px;
    padding: 1px 2px;
  }
  
  .day-events {
    max-height: 70px;
    padding: 3px;
  }
  
  .legend-items {
    flex-direction: column;
    gap: 10px;
  }
  
  .event-actions {
    flex-direction: column;
  }
}

/* Modal badges */
.badge {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 0.25rem;
  display: inline-block;
}

.badge-purple {
  background-color: #9b59b6;
  color: white;
}

.badge-red {
  background-color: #e74c3c;
  color: white;
}

.badge-blue {
  background-color: #3498db;
  color: white;
}

.badge-success {
  background-color: #27ae60;
  color: white;
}

/* Event modal improvements */
.event-details .info-item {
  margin-bottom: 0.75rem;
}

.event-details .info-item strong {
  color: #2c3e50;
}

.event-meta .badge {
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
}

/* Calendar modal improvements */
.modal-lg {
  max-width: 800px;
}

.modal-body {
  max-height: 70vh;
  overflow-y: auto;
}

/* Form improvements in modal */
.modal .form-check-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.modal .form-check-inline {
  margin-right: 0;
}

/* Calendar improvements */
.simple-calendar .day {
  height: 120px; /* Make calendar cells taller */
  vertical-align: top;
  border: 1px solid #ddd;
  position: relative;
}

.calendar-day {
  height: 100%;
  padding: 0 !important;
  display: flex;
  flex-direction: column;
}

.day-number {
  font-weight: bold;
  margin-bottom: 4px;
  flex-shrink: 0;
}

.day-events {
  flex-grow: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* All-day events styling (legacy - now handled by .all-day-events section) */
.event-item.all-day {
  border-radius: 3px;
  font-weight: 500;
}

.event-item {
  padding: 2px 4px;
  border-radius: 2px;
  font-size: 0.75rem;
  line-height: 1.2;
  cursor: pointer;
  transition: opacity 0.2s;
  margin-bottom: 1px;
  border-left: 3px solid;
  
}

.event-item:hover {
  opacity: 0.8;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.event-time {
  font-size: 0.65rem;
  opacity: 0.8;
  margin-bottom: 1px;
}

.event-title {
  font-weight: 500;
  margin-bottom: 1px;
}

.event-meta {
  display: flex;
  gap: 2px;
  flex-wrap: wrap;
}

.event-meta .badge {
  font-size: 0.6rem;
  padding: 1px 3px;
}

/* Calendar navigation improvements */
.simple-calendar .calendar-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  font-size: 1.5rem;
  font-weight: bold;
}

.simple-calendar .calendar-heading .prev,
.simple-calendar .calendar-heading .next {
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  text-decoration: none;
  transition: background-color 0.2s;
}

.simple-calendar .calendar-heading .prev:hover,
.simple-calendar .calendar-heading .next:hover {
  background: #0056b3;
  color: white;
  text-decoration: none;
}

/* Calendar table improvements */
.simple-calendar table {
  width: 100%;
  border-collapse: collapse;
}

.simple-calendar th {
  background: #f8f9fa;
  text-align: center;
  font-weight: 600;
  border: 1px solid #ddd;
}

.simple-calendar .day-names th {
  padding: 2px 4px !important;
  font-size: 14px !important;
  line-height: 1.1 !important;
  vertical-align: middle !important;
  height: auto !important;
}

.simple-calendar .today {
  background: rgba(0, 123, 255, 0.1);
}

.simple-calendar .prev-month,
.simple-calendar .next-month {
  opacity: 0.5;
}

/* Responsive calendar */
@media (max-width: 768px) {
  .simple-calendar .day {
    height: 80px;
  }
  
  .event-item {
    font-size: 0.65rem;
  }
  
  .event-time {
    font-size: 0.6rem;
  }
}

/* Calendar timezone selector */
.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.calendar-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.timezone-selector {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.timezone-selector .form-label {
  white-space: nowrap;
  font-size: 0.9rem;
  color: #666;
}

.timezone-selector .form-select {
  min-width: 150px;
}

@media (max-width: 768px) {
  .calendar-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .calendar-actions {
    width: 100%;
    justify-content: space-between;
  }
  
  .timezone-selector {
    order: -1;
  }
}

/* Calendar Event Actions */
.event-actions {
  position: absolute;
  top: 2px;
  right: 2px;
  display: none;
  gap: 2px;
  z-index: 10;
}

.event-item:hover .event-actions {
  display: flex;
}

.event-actions .btn {
  padding: 2px 4px;
  font-size: 10px;
  border-radius: 3px;
  opacity: 0.8;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.event-actions .btn:hover {
  opacity: 1;
  background-color: rgba(255, 255, 255, 0.2);
}

.event-item {
  position: relative;
  cursor: pointer;
  transition: all 0.2s ease;
}

.event-item:hover {
  transform: scale(1.02);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.event-item .event-title {
  font-weight: 500;
  margin-bottom: 2px;
}

.event-item .event-time {
  font-size: 0.8em;
  opacity: 0.9;
}

.event-item .event-meta {
  margin-top: 2px;
}

.event-item .badge {
  font-size: 0.7em;
  padding: 1px 4px;
  margin-right: 2px;
}

.badge-purple {
  background-color: #9b59b6;
  color: white;
}

.badge-red {
  background-color: #e74c3c;
  color: white;
}

.badge-blue {
  background-color: #3498db;
  color: white;
}

/* Calendar Grid Sizing Fixes */
.simple-calendar {
  table-layout: fixed;
}

.simple-calendar th,
.simple-calendar td {
  width: 14.2857%; /* 100% / 7 days */
  height: 120px; /* Fixed height for all cells */
  vertical-align: top;
  position: relative;
}

.calendar-day {
  height: 100%;
  overflow: hidden;
  position: relative;
}

.day-number {
  position: absolute;
  top: 5px;
  left: 5px;
  font-weight: bold;
  font-size: 0.9em;
  z-index: 10;
  background: white;
  padding: 2px 4px;
  border-radius: 3px;
}

.day-events {
  position: absolute;
  top: 35px; /* Start below the day number */
  left: 2px;
  right: 2px;
  bottom: 2px;
  overflow-y: auto;
  overflow-x: hidden;
}

.event-item {
  position: relative;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 1px;
  padding: 1px 3px;
  border-radius: 2px;
  font-size: 0.7em;
  line-height: 1.1;
  word-wrap: break-word;
  overflow: hidden;
  max-height: 16px; /* Thin like iCalendar */
  border-left: 3px solid;
  
  color: #333;
  font-weight: 500;
}

.event-item:hover {
  transform: scale(1.02);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  z-index: 5;
}

.event-item.all-day {
  font-weight: bold;
  color: #333;
}

.event-item .event-title {
  font-weight: 500;
  margin-bottom: 0;
  font-size: 0.85em; /* Bigger text for better readability */
}

.event-item .event-time {
  font-size: 0.6em;
  opacity: 0.8;
  display: none; /* Hide time in thin view */
}

.event-item .event-meta {
  display: none; /* Hide badges in thin view */
}

/* Ensure calendar cells maintain consistent sizing */
.simple-calendar td {
  min-height: 120px;
  max-height: 120px;
}

/* Responsive calendar */
@media (max-width: 768px) {
  .simple-calendar th,
  .simple-calendar td {
    height: 80px;
  }
  
  .simple-calendar thead {
  height: auto;
  }
  
  .simple-calendar .day-names th {
    padding: 1px 2px;
    font-size: 12px;
    line-height: 1.1;
  }
  
  .simple-calendar td {
    min-height: 80px;
    max-height: 80px;
  }
  
  .day-events {
    top: 25px;
  }
  
  .event-item {
    font-size: 0.6em;
    max-height: 14px;
  }
}

/* Event View Modal Styling */
.event-details {
  padding: 1rem 0;
}

.detail-row {
  display: flex;
  margin-bottom: 1rem;
  align-items: flex-start;
}

.detail-label {
  font-weight: 600;
  min-width: auto;
  color: #495057;
}

.detail-value {
  flex: 1;
  color: #333;
}

/* View Modal Specific Styling */
#event-modal .modal-dialog {
  max-width: 500px;
  margin: 1.75rem auto;
}

#event-modal .modal-content {
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

#event-modal .modal-header {
  border-bottom: 1px solid #dee2e6;
  padding: 1rem 1.5rem;
  border-radius: 8px 8px 0 0;
}

#event-modal .modal-body {
  padding: 1.5rem;
}

#event-modal .modal-footer {
  border-top: 1px solid #dee2e6;
  padding: 1rem 1.5rem;
  border-radius: 0 0 8px 8px;
}

.modal-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  width: 100%;
}

.modal-actions .btn {
  min-width: 80px;
}

/* Color stripe styling */
#event-modal .modal-header {
  position: relative;
}

#event-modal .modal-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--event-color);
}

/* Let inline styles work naturally */

/* Ensure inline styles work for all events - no CSS overrides needed */

.event-item {
  color: white !important;
}

.event-item .event-time,
.event-item .event-title {
  color: white !important;
}

/* Allow inline styles to work for all-day events */

.event-item:hover {
  opacity: 0.8;
}

.event-time {
  font-weight: bold;
}

.event-title {
  margin-top: 1px;
}

.event-meta {
  display: flex;
  gap: 2px;
  margin-top: 2px;
}

.badge {
  display: inline-block;
  padding: 1px 4px;
  font-size: 8px;
  font-weight: bold;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  vertical-align: baseline;
  border-radius: 2px;
}

.badge-purple {
  background-color: #9b59b6;
  color: white;
}

.badge-red {
  background-color: #e74c3c;
  color: white;
}

.badge-blue {
  background-color: #3498db;
  color: white;
}

.badge-success {
  background-color: #27ae60;
  color: white;
}

.calendar-legend {
  margin-top: 20px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
}

.legend-items {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.color-box {
  width: 16px;
  height: 16px;
  border-radius: 3px;
  border: 1px solid #dee2e6;
}

/* Event Detail Styles */
.event-details {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.event-header {
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #dee2e6;
}

.event-meta {
  margin-top: 10px;
}

.event-meta .badge {
  padding: 4px 8px;
  font-size: 12px;
  margin-right: 5px;
}

.event-info {
  margin-bottom: 20px;
}

.info-item {
  margin-bottom: 10px;
}

.info-item strong {
  display: inline-block;
  width: 120px;
  color: #495057;
}

.event-description {
  margin-bottom: 20px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
}

.recurrence-info {
  margin-bottom: 20px;
  padding: 15px;
  background: #e8f5e8;
  border-radius: 8px;
}

.event-actions {
  display: flex;
  gap: 10px;
}

/* Form Styles */
.form-check-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.form-check-inline {
  margin-right: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
  .simple-calendar .calendar-body td {
    height: 100px;
  }
  
  .calendar-day {
    padding: 0;
  display: flex;
    flex-direction: column;
  }
  
  .calendar-top-row {
    height: 18px;
  }
  
  .all-day-banner .event-item.all-day {
    font-size: 8px;
    padding: 1px 2px;
    min-height: 18px;
  }
  
  .all-day-banner .event-item.all-day .event-title {
    font-size: 8px;
  }
  
  .all-day-banner .event-item.all-day .badge {
    font-size: 6px;
    padding: 0px 1px;
  }
  
  .day-number-square {
    width: 18px;
    height: 18px;
    font-size: 9px;
  }
  
  .event-item {
    font-size: 8px;
    padding: 1px 2px;
  }
  
  .day-events {
    max-height: 70px;
    padding: 3px;
  }
  
  .legend-items {
    flex-direction: column;
    gap: 10px;
  }
  
  .event-actions {
    flex-direction: column;
  }
}

/* Modal badges */
.badge {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 0.25rem;
  display: inline-block;
}

.badge-purple {
  background-color: #9b59b6;
  color: white;
}

.badge-red {
  background-color: #e74c3c;
  color: white;
}

.badge-blue {
  background-color: #3498db;
  color: white;
}

.badge-success {
  background-color: #27ae60;
  color: white;
}

/* Event modal improvements */
.event-details .info-item {
  margin-bottom: 0.75rem;
}

.event-details .info-item strong {
  color: #2c3e50;
}

.event-meta .badge {
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
}

/* Calendar modal improvements */
.modal-lg {
  max-width: 800px;
}

.modal-body {
  max-height: 70vh;
  overflow-y: auto;
}

/* Form improvements in modal */
.modal .form-check-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.modal .form-check-inline {
  margin-right: 0;
}

/* Calendar improvements */
.simple-calendar .day {
  height: 120px; /* Make calendar cells taller */
  vertical-align: top;
  border: 1px solid #ddd;
  position: relative;
}

.calendar-day {
  height: 100%;
  padding: 0 !important;
  display: flex;
  flex-direction: column;
}

.day-number {
  font-weight: bold;
  margin-bottom: 4px;
  flex-shrink: 0;
}

.day-events {
  flex-grow: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

/* All-day events styling (legacy - now handled by .all-day-events section) */
.event-item.all-day {
  border-radius: 3px;
  font-weight: 500;
}

.event-item {
  padding: 2px 4px;
  border-radius: 2px;
  font-size: 0.75rem;
  line-height: 1.2;
  cursor: pointer;
  transition: opacity 0.2s;
  margin-bottom: 1px;
  border-left: 3px solid;
  
}

.event-item:hover {
  opacity: 0.8;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.event-time {
  font-size: 0.65rem;
  opacity: 0.8;
  margin-bottom: 1px;
}

.event-title {
  font-weight: 500;
  margin-bottom: 1px;
}

.event-meta {
  display: flex;
  gap: 2px;
  flex-wrap: wrap;
}

.event-meta .badge {
  font-size: 0.6rem;
  padding: 1px 3px;
}

/* Calendar navigation improvements */
.simple-calendar .calendar-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  font-size: 1.5rem;
  font-weight: bold;
}

.simple-calendar .calendar-heading .prev,
.simple-calendar .calendar-heading .next {
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  text-decoration: none;
  transition: background-color 0.2s;
}

.simple-calendar .calendar-heading .prev:hover,
.simple-calendar .calendar-heading .next:hover {
  background: #0056b3;
  color: white;
  text-decoration: none;
}

/* Calendar table improvements */
.simple-calendar table {
  width: 100%;
  border-collapse: collapse;
}

.simple-calendar th {
  background: #f8f9fa;
  text-align: center;
  font-weight: 600;
  border: 1px solid #ddd;
}

.simple-calendar .day-names th {
  padding: 2px 4px !important;
  font-size: 14px !important;
  line-height: 1.1 !important;
  vertical-align: middle !important;
  height: auto !important;
}

.simple-calendar .today {
  background: rgba(0, 123, 255, 0.1);
}

.simple-calendar .prev-month,
.simple-calendar .next-month {
  opacity: 0.5;
}

/* Responsive calendar */
@media (max-width: 768px) {
  .simple-calendar .day {
    height: 80px;
  }
  
  .event-item {
    font-size: 0.65rem;
  }
  
  .event-time {
    font-size: 0.6rem;
  }
}

/* Calendar timezone selector */
.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.calendar-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.timezone-selector {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.timezone-selector .form-label {
  white-space: nowrap;
  font-size: 0.9rem;
  color: #666;
}

.timezone-selector .form-select {
  min-width: 150px;
}

@media (max-width: 768px) {
  .calendar-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .calendar-actions {
    width: 100%;
    justify-content: space-between;
  }
  
  .timezone-selector {
    order: -1;
  }
}

/* Calendar Event Actions */
.event-actions {
  position: absolute;
  top: 2px;
  right: 2px;
  display: none;
  gap: 2px;
  z-index: 10;
}

.event-item:hover .event-actions {
  display: flex;
}

.event-actions .btn {
  padding: 2px 4px;
  font-size: 10px;
  border-radius: 3px;
  opacity: 0.8;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.event-actions .btn:hover {
  opacity: 1;
  background-color: rgba(255, 255, 255, 0.2);
}

.event-item {
  position: relative;
  cursor: pointer;
  transition: all 0.2s ease;
}

.event-item:hover {
  transform: scale(1.02);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.event-item .event-title {
  font-weight: 500;
  margin-bottom: 2px;
}

.event-item .event-time {
  font-size: 0.8em;
  opacity: 0.9;
}

.event-item .event-meta {
  margin-top: 2px;
}

.event-item .badge {
  font-size: 0.7em;
  padding: 1px 4px;
  margin-right: 2px;
}

.badge-purple {
  background-color: #9b59b6;
  color: white;
}

.badge-red {
  background-color: #e74c3c;
  color: white;
}

.badge-blue {
  background-color: #3498db;
  color: white;
}

/* Calendar Grid Sizing Fixes */
.simple-calendar {
  table-layout: fixed;
}

.simple-calendar th,
.simple-calendar td {
  width: 14.2857%; /* 100% / 7 days */
  height: 120px; /* Fixed height for all cells */
  vertical-align: top;
  position: relative;
}

.calendar-day {
  height: 100%;
  overflow: hidden;
  position: relative;
}

.day-number {
  position: absolute;
  top: 5px;
  left: 5px;
  font-weight: bold;
  font-size: 0.9em;
  z-index: 10;
  background: white;
  padding: 2px 4px;
  border-radius: 3px;
}

.day-events {
  position: absolute;
  top: 20px; /* Start below the day number */
  left: 2px;
  right: 2px;
  bottom: 2px;
  overflow-y: auto;
  overflow-x: hidden;
}

.event-item {
  position: relative;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 1px;
  padding: 1px 3px;
  border-radius: 2px;
  font-size: 0.7em;
  line-height: 1.1;
  word-wrap: break-word;
  overflow: hidden;
  max-height: 16px; /* Thin like iCalendar */
  border-left: 3px solid;
  
  color: #333;
  font-weight: 500;
}

.event-item:hover {
  transform: scale(1.02);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  z-index: 5;
}

.event-item.all-day {
  font-weight: bold;
  color: #333;
}

.event-item .event-title {
  font-weight: 500;
  margin-bottom: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Event content layout for timed events */
.event-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  line-height: 1; /* Ensure consistent line height for container */
}

.event-item .event-time {
  font-size: 0.85em; /* Bigger text for better readability */
  opacity: 1;
  display: block;
  font-weight: 500;
  flex-shrink: 0; /* Don't let time shrink */
  margin-left: 4px;
  line-height: 1; /* Match title line height */
  margin-bottom: 0; /* Remove any default margins */
}

.event-content .event-title {
  flex: 1; /* Take up remaining space */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.85em; /* Bigger text for better readability */
  line-height: 1; /* Match time line height */
  margin-bottom: 0; /* Remove any default margins */
}

.event-item .event-meta {
  display: none; /* Hide badges in thin view */
}

/* Ensure calendar cells maintain consistent sizing */
.simple-calendar td {
  min-height: 120px;
  max-height: 120px;
}

/* Responsive calendar */
@media (max-width: 768px) {
  .simple-calendar th,
  .simple-calendar td {
    height: 80px;
  }
  
  .simple-calendar thead {
  height: auto;
  }
  
  .simple-calendar .day-names th {
    padding: 1px 2px;
    font-size: 12px;
    line-height: 1.1;
  }
  
  .simple-calendar td {
    min-height: 80px;
    max-height: 80px;
  }
  
  .day-events {
    top: 25px;
  }
  
  .event-item {
    font-size: 0.6em;
    max-height: 14px;
  }
}

/* Event View Modal Styling */
.event-details {
  padding: 1rem 0;
}

.detail-row {
  display: flex;
  margin-bottom: 1rem;
  align-items: flex-start;
}

.detail-label {
  font-weight: 600;
  min-width: auto;
  color: #495057;
}

.detail-value {
  flex: 1;
  color: #333;
}

/* View Modal Specific Styling */
#event-modal .modal-dialog {
  max-width: 500px;
  margin: 1.75rem auto;
}

#event-modal .modal-content {
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

#event-modal .modal-header {
  border-bottom: 1px solid #dee2e6;
  padding: 1rem 1.5rem;
  border-radius: 8px 8px 0 0;
}

#event-modal .modal-body {
  padding: 1.5rem;
}

#event-modal .modal-footer {
  border-top: 1px solid #dee2e6;
  padding: 1rem 1.5rem;
  border-radius: 0 0 8px 8px;
}

.modal-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  width: 100%;
}

.modal-actions .btn {
  min-width: 80px;
}

/* Color stripe styling */
#event-modal .modal-header {
  position: relative;
}

#event-modal .modal-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--event-color);
}

