/* ============================================================
   YADE CP – Custom Styles
   ============================================================ */

/* Sidebar */
#sidebar {
  width: 240px;
  min-width: 240px;
  min-height: 100vh;
  transition: width 0.25s ease, min-width 0.25s ease;
  overflow: hidden;
}

#sidebar.collapsed {
  width: 0;
  min-width: 0;
}

#sidebar .nav-link {
  padding: 0.55rem 1rem;
  font-size: 0.92rem;
  border-radius: 0.375rem;
  margin: 0 0.5rem;
  transition: background-color 0.15s;
}

#sidebar .nav-link:hover {
  background-color: rgba(255, 255, 255, 0.08);
}

#sidebar .nav-link.active {
  background-color: #0d6efd !important;
}

.sidebar-brand {
  min-height: 56px;
  white-space: nowrap;
}

/* Page content */
#page-content {
  transition: flex 0.25s ease;
  min-width: 0;
}

/* Clickable table rows */
.event-row {
  cursor: pointer;
}

.event-row:hover td {
  background-color: #f0f4ff;
}

/* Monospace badge */
.font-monospace {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}

/* Truncate cells */
.text-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Pre blocks */
pre {
  font-size: 0.82rem;
  tab-size: 2;
}

/* Card hover */
.card {
  transition: box-shadow 0.15s;
}

/* Badge subtle (BS5.3+) */
.bg-success-subtle { background-color: #d1e7dd !important; }
.bg-warning-subtle { background-color: #fff3cd !important; }
.bg-info-subtle    { background-color: #cff4fc !important; }
.bg-secondary-subtle { background-color: #e2e3e5 !important; }
.text-success { color: #198754 !important; }
.text-warning { color: #856404 !important; }
.text-info    { color: #0a58ca !important; }
.text-secondary { color: #6c757d !important; }

/* Navbar brand */
.navbar-brand.h6 {
  letter-spacing: 0.02em;
}

/* Table alignment */
.table > :not(caption) > * > * {
  vertical-align: middle;
}

/* Responsive: hide sidebar on small screens */
@media (max-width: 768px) {
  #sidebar {
    width: 0;
    min-width: 0;
  }
  #sidebar.show-mobile {
    width: 240px;
    min-width: 240px;
    position: fixed;
    height: 100vh;
    z-index: 1040;
  }
}
