/**
 * HBL TeamSport Support Portal - Styles
 */

:root {
  --sidebar-width: 240px;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  min-height: 100vh;
}

/* Cards */
.stat-card {
  border: none;
  border-radius: 0.75rem;
  transition: transform 0.2s;
}
.stat-card:hover {
  transform: translateY(-2px);
}

/* Fault list */
.fault-row {
  cursor: pointer;
  transition: background-color 0.15s;
}
.fault-row:hover {
  background-color: rgba(13, 110, 253, 0.04);
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 1.5rem;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 0.5rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--bs-border-color);
}
.timeline-item {
  position: relative;
  padding-bottom: 1.25rem;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -1.25rem;
  top: 0.25rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--bs-primary);
  border: 2px solid var(--bs-body-bg);
}
.timeline-item.status-change::before { background: var(--bs-warning); }
.timeline-item.resolution::before { background: var(--bs-success); }
.timeline-item.comment::before { background: var(--bs-info); }

/* Mobile optimisations */
@media (max-width: 576px) {
  .stat-card .display-6 { font-size: 1.5rem; }
  .table-responsive-card thead { display: none; }
  .table-responsive-card tbody tr {
    display: block;
    margin-bottom: 1rem;
    border: 1px solid var(--bs-border-color);
    border-radius: 0.5rem;
  }
  .table-responsive-card tbody td {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem;
    border-bottom: 1px solid var(--bs-border-color-translucent);
  }
  .table-responsive-card tbody td::before {
    content: attr(data-label);
    font-weight: 600;
    margin-right: 1rem;
  }
}

/* Dark mode overrides */
[data-bs-theme="dark"] .navbar-dark { background-color: #1a1d20 !important; }
[data-bs-theme="dark"] .bg-body-tertiary { background-color: #212529 !important; }
[data-bs-theme="dark"] .card { background-color: #1a1d20; border: 1px solid rgba(255,255,255,0.15); }
[data-bs-theme="dark"] .table { --bs-table-bg: transparent; --bs-table-border-color: rgba(255,255,255,0.15); }
[data-bs-theme="dark"] .table-light {
    --bs-table-color: #fff;
    --bs-table-bg: #1a1d20;
    --bs-table-border-color: rgba(255,255,255,0.15);
}

/* Avatar / initials */
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.85rem;
  background: var(--bs-primary);
  color: #fff;
}

/* Quick filters */
.filter-chip {
  cursor: pointer;
  user-select: none;
}
.filter-chip.active {
  background-color: var(--bs-primary) !important;
  color: #fff !important;
}

/* Image preview */
.img-preview {
  max-width: 120px;
  max-height: 120px;
  object-fit: cover;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: transform 0.2s;
}
.img-preview:hover {
  transform: scale(1.05);
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #adb5bd; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #6c757d; }
