/* Home dashboard tiles */
.dashboard-tiles {
  --tile-icon-bg: rgba(13, 110, 253, 0.1);
  --tile-icon-color: #0d6efd;
  --tile-hover-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.08);
  --tile-hover-lift: -2px;
}

.dashboard-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.75rem 1.25rem;
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 12px;
  color: #212529;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.dashboard-tile:hover {
  transform: translateY(var(--tile-hover-lift));
  box-shadow: var(--tile-hover-shadow);
  border-color: #ced4da;
  color: #212529;
}

.dashboard-tile-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin-bottom: 1rem;
  border-radius: 12px;
  background: var(--tile-icon-bg);
  color: var(--tile-icon-color);
}

.dashboard-tile:hover .dashboard-tile-icon {
  background: rgba(13, 110, 253, 0.15);
  color: #0a58ca;
}

.dashboard-tile-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.dashboard-tile-desc {
  font-size: 0.875rem;
  color: #6c757d;
}

.dashboard-tile:hover .dashboard-tile-desc {
  color: #495057;
}

/* Optional: subtle color accents per tile (nth-child) */
.dashboard-tiles .col-sm-6:nth-child(1) .dashboard-tile-icon { --tile-icon-bg: rgba(13, 110, 253, 0.12); --tile-icon-color: #0d6efd; }
.dashboard-tiles .col-sm-6:nth-child(2) .dashboard-tile-icon { --tile-icon-bg: rgba(25, 135, 84, 0.12); --tile-icon-color: #198754; }
.dashboard-tiles .col-sm-6:nth-child(3) .dashboard-tile-icon { --tile-icon-bg: rgba(111, 66, 193, 0.12); --tile-icon-color: #6f42c1; }
.dashboard-tiles .col-sm-6:nth-child(4) .dashboard-tile-icon { --tile-icon-bg: rgba(253, 126, 20, 0.12); --tile-icon-color: #fd7e14; }
.dashboard-tiles .col-sm-6:nth-child(5) .dashboard-tile-icon { --tile-icon-bg: rgba(13, 202, 240, 0.12); --tile-icon-color: #0dcaf0; }
.dashboard-tiles .col-sm-6:nth-child(6) .dashboard-tile-icon { --tile-icon-bg: rgba(214, 51, 132, 0.12); --tile-icon-color: #d63384; }

.dashboard-tiles .col-sm-6:nth-child(1) .dashboard-tile:hover .dashboard-tile-icon { background: rgba(13, 110, 253, 0.18); color: #0d6efd; }
.dashboard-tiles .col-sm-6:nth-child(2) .dashboard-tile:hover .dashboard-tile-icon { background: rgba(25, 135, 84, 0.18); color: #198754; }
.dashboard-tiles .col-sm-6:nth-child(3) .dashboard-tile:hover .dashboard-tile-icon { background: rgba(111, 66, 193, 0.18); color: #6f42c1; }
.dashboard-tiles .col-sm-6:nth-child(4) .dashboard-tile:hover .dashboard-tile-icon { background: rgba(253, 126, 20, 0.18); color: #fd7e14; }
.dashboard-tiles .col-sm-6:nth-child(5) .dashboard-tile:hover .dashboard-tile-icon { background: rgba(13, 202, 240, 0.18); color: #0dcaf0; }
.dashboard-tiles .col-sm-6:nth-child(6) .dashboard-tile:hover .dashboard-tile-icon { background: rgba(214, 51, 132, 0.18); color: #d63384; }

/* Section titles with icon */
.section-title {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.section-title-icon {
  display: inline-flex;
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  color: #0d6efd;
}
.section-title.text-danger .section-title-icon { color: inherit; }
.section-title.h4 .section-title-icon { width: 1.25rem; height: 1.25rem; }

/* AI Tasks collapsible tree */
.task-tree details.task-tree-node summary.task-tree-summary {
  cursor: pointer;
  list-style: none;
}
.task-tree details.task-tree-node summary.task-tree-summary::-webkit-details-marker {
  display: none;
}
.task-tree details.task-tree-node summary.task-tree-summary::before {
  display: inline-block;
  content: "▶";
  font-size: 0.65rem;
  margin-right: 0.35rem;
  transition: transform 0.15s ease;
}
.task-tree details.task-tree-node[open] summary.task-tree-summary::before {
  transform: rotate(90deg);
}
.task-tree .task-tree-summary .task-tree-task { min-width: 0; }
.task-tree .task-tree-children { margin-top: 0.25rem; }
.task-tree .task-progress-bar { height: 0.5rem; }
.task-tree .task-tree-progress { min-width: 0; }

html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

/* Org chart tree on organization details */
.org-chart-tree {
  border-left: 2px solid #dee2e6;
  padding-left: 1rem;
}
.org-chart-tree .org-chart-tree {
  margin-left: 0.5rem;
  border-left-color: #e9ecef;
}
.org-chart-node {
  padding-left: 0.5rem;
}
.org-chart-node:hover {
  background-color: rgba(0, 0, 0, 0.02);
}
.org-chart-title {
  min-width: 8rem;
  display: inline-block;
}

/* Contact notes timeline */
.contact-notes-timeline {
  position: relative;
  padding-left: 1.5rem;
  border-left: 2px solid #dee2e6;
  margin-left: 0.5rem;
}
.contact-note-item {
  position: relative;
  padding-bottom: 1.25rem;
}
.contact-note-item:last-child {
  padding-bottom: 0;
}
.contact-note-dot {
  position: absolute;
  left: -1.5rem;
  top: 0.25rem;
  width: 12px;
  height: 12px;
  margin-left: -6px;
  border-radius: 50%;
  background: #0d6efd;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px #dee2e6;
}
.contact-note-content {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
}
.contact-note-time {
  display: block;
  font-size: 0.8rem;
  color: #6c757d;
  margin-bottom: 0.25rem;
}
.contact-note-text {
  white-space: pre-wrap;
  word-break: break-word;
}