body { background-color: #f1f5f9; color: #1e293b; font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
body.landing { background-color: #fff; }

/* Responsive Sidebar & Content Layout - NEVER overlap */
@media (min-width: 768px) {
  .sidebar {
    position: fixed !important;
    top: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 250px !important;
    max-width: 250px !important;
    z-index: 1040 !important;
    overflow-y: auto !important;
    background-color: #1e2433 !important;
  }
  .content {
    margin-left: 250px !important;
    width: calc(100% - 250px) !important;
    max-width: calc(100% - 250px) !important;
    min-height: 100vh !important;
    padding: 0 1.25rem 2.5rem 1.25rem !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }
}

@media (max-width: 767.98px) {
  .sidebar {
    width: 100% !important;
    max-width: 100% !important;
    position: static !important;
  }
  .content {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 0.75rem 2rem 0.75rem !important;
  }
}

.sidebar .sidebar-inner { padding-bottom: 2.5rem; }
.page-wrap { padding: 0.5rem 0 1.5rem 0; width: 100%; }

/* Volt dark sidebar overrides */
.sidebar.bg-dark { background-color: #1e2433 !important; color: #e2e8f0; }
.sidebar .nav-link { color: #cbd5e1; font-size: 0.875rem; padding: 0.55rem 0.75rem; border-radius: 0.375rem; }
.sidebar .nav-link:hover { color: #ffffff; background: #2d3748; }
.sidebar .nav-item.active > .nav-link { background: #3b82f6; color: #ffffff !important; font-weight: 600; }
.sidebar .sidebar-icon { color: #94a3b8; display: inline-block; width: 1.4rem; text-align: center; }
.sidebar .nav-item.active > .nav-link .sidebar-icon { color: #ffffff; }
.sidebar .h6, .sidebar h2 { color: #ffffff; }
.sidebar .btn-secondary { color: #1e2433; font-weight: 600; }
.sidebar-badge {
  font-size: 0.68rem !important;
  font-weight: 700 !important;
  padding: 0.2rem 0.5rem !important;
  border-radius: 50rem !important;
  background-color: #ef4444 !important;
  color: #ffffff !important;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
  line-height: 1 !important;
}

/* Cards & Content Containers */
.card {
  border: 1px solid #e2e8f0 !important;
  border-radius: 0.625rem !important;
  background-color: #ffffff !important;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px 0 rgba(0, 0, 0, 0.03) !important;
}
.components-section { width: 100% !important; max-width: 100% !important; }

/* Table and DataTables Overhaul */
.table-responsive {
  width: 100% !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  background: #ffffff;
}

table.dataTable, table.display {
  width: 100% !important;
  margin: 0 !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  font-size: 0.865rem;
}

table.dataTable thead th, table.display thead th {
  background-color: #f8fafc !important;
  color: #334155 !important;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  padding: 0.75rem 0.9rem !important;
  border-bottom: 2px solid #e2e8f0 !important;
  white-space: nowrap;
}

table.dataTable tbody td, table.display tbody td {
  padding: 0.75rem 0.9rem !important;
  vertical-align: middle;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
  word-break: break-word;
}

table.dataTable tbody tr:hover {
  background-color: #f8fafc !important;
}

/* DataTables Controls & Buttons */
.dataTables_wrapper, .dt-container {
  width: 100% !important;
  padding: 0.25rem 0;
}

.dt-container .dt-buttons {
  margin-bottom: 0.75rem;
  display: flex;
  gap: 0.35rem;
}

.dt-buttons .dt-button, div.dt-buttons>.dt-button {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 0.375rem !important;
  color: #475569 !important;
  font-size: 0.8rem !important;
  font-weight: 600 !important;
  padding: 0.35rem 0.75rem !important;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04) !important;
}

.dt-buttons .dt-button:hover, div.dt-buttons>.dt-button:hover {
  background: #f1f5f9 !important;
  border-color: #94a3b8 !important;
  color: #0f172a !important;
}

.dt-container .dt-search input {
  border: 1px solid #cbd5e1 !important;
  border-radius: 0.375rem !important;
  padding: 0.35rem 0.75rem !important;
  font-size: 0.85rem !important;
  outline: none;
}

.dt-container .dt-search input:focus {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15) !important;
}

.dt-paging {
  margin-top: 0.75rem;
}

.dt-paging .dt-paging-button {
  border-radius: 0.375rem !important;
  padding: 0.3rem 0.65rem !important;
  margin: 0 2px !important;
  font-size: 0.825rem !important;
  border: 1px solid #e2e8f0 !important;
  background: #ffffff !important;
}

.dt-paging .dt-paging-button.current {
  background: #262b40 !important;
  color: #ffffff !important;
  border-color: #262b40 !important;
  font-weight: 600;
}

/* Modern Thin Scrollbars Everywhere */
* {
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 #f1f5f9;
}
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #f8fafc; border-radius: 9999px; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 9999px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* Kanban & Workflow Boards */
.kanban {
  display: flex !important;
  gap: 1.25rem !important;
  overflow-x: auto !important;
  width: 100% !important;
  align-items: flex-start !important;
  padding: 0.5rem 0.25rem 1.5rem 0.25rem !important;
  scrollbar-width: thin !important;
  scrollbar-color: #cbd5e1 #f1f5f9 !important;
}
.kanban::-webkit-scrollbar { height: 8px !important; }
.kanban::-webkit-scrollbar-track { background: #f1f5f9 !important; border-radius: 9999px !important; }
.kanban::-webkit-scrollbar-thumb { background: #cbd5e1 !important; border-radius: 9999px !important; }
.kanban::-webkit-scrollbar-thumb:hover { background: #94a3b8 !important; }

.kanban .col-board {
  min-width: 230px !important;
  max-width: 280px !important;
  flex: 1 0 230px !important;
}
.kanban .col-board > .card {
  background-color: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 0.75rem !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04) !important;
}

.shot-card {
  position: relative;
  overflow: hidden;
  border-radius: 0.5rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.shot-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.12) !important;
}
.shot-card.selected {
  border: 2px solid #2563eb !important;
  background-color: #eff6ff !important;
}
.shot-checkbox {
  background-color: #ffffff;
  border: 2px solid #3b82f6 !important;
  cursor: pointer;
}
.shot-checkbox:checked {
  background-color: #2563eb !important;
  border-color: #2563eb !important;
}
.shot-card img { cursor: zoom-in; width: 100%; height: 180px; object-fit: cover; }
.landing-nav { box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.landing-main { padding-top: 115px; }
.chat-box { height: 260px; overflow-y: auto; border: 1px solid #e5e7eb; border-radius: .5rem; padding: .5rem; background: #fff; }
.badge { font-weight: 600; padding: 0.35em 0.65em; }
