/* Warehouse Diary — Bootstrap overrides & theme */

:root {
  --wd-primary: #0d6efd;
  --wd-header-bg: #e7f1ff;
  --wd-row-deleted: #f8d7da;
  --wd-row-completed: #d1e7dd;
}

/* Body: subtle background */
body {
  font-size: 0.9375rem;
}

/* Header card */
.card.border-0.shadow-sm header .card-body,
header.card .card-body {
  background: linear-gradient(135deg, var(--wd-header-bg) 0%, #fff 100%);
}

/* Diary table: sticky header, compact cells */
.diary-table {
  font-size: 0.875rem;
}
.diary-table thead {
  position: sticky;
  top: 0;
  z-index: 1;
  white-space: nowrap;
}
.diary-table th {
  font-weight: 600;
  padding: 0.5rem 0.6rem;
  border-bottom-width: 2px;
}
.diary-table td {
  padding: 0.4rem 0.6rem;
  vertical-align: middle;
}
.diary-table tbody tr {
  cursor: pointer;
}
.diary-table tbody tr:hover {
  background-color: rgba(13, 110, 253, 0.06) !important;
}
.diary-table tbody tr.selected {
  background-color: #b6d4fe !important;  /* stronger blue for contrast */
  border-left: 4px solid #0d6efd;
  box-shadow: inset 0 0 0 1px rgba(13, 110, 253, 0.3);
}
.diary-table tbody tr.selected td {
  font-weight: 500;
}
/* Status row colours (when we have status from API) */
.diary-table tbody tr.status-deleted {
  background-color: var(--wd-row-deleted) !important;
}
.diary-table tbody tr.status-completed {
  background-color: var(--wd-row-completed) !important;
}

/* In/Out badges */
.diary-table .badge-in { background-color: #198754; color: #fff; }
.diary-table .badge-out { background-color: #dc3545; color: #fff; }

/* Grid card: top border aligns with tabs */
.nav-tabs + .card {
  border-radius: 0 0 0.25rem 0.25rem;
}

/* Modal titles */
.modal-header .modal-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Buttons in navbar */
.navbar .btn-sm {
  font-size: 0.8125rem;
}
/* Select (date) button — distinct colour */
.btn-select {
  background-color: #0dcaf0;
  border-color: #0dcaf0;
  color: #000;
}
.btn-select:hover {
  background-color: #31d2f2;
  border-color: #25cff2;
  color: #000;
}
.btn-select:focus-visible {
  box-shadow: 0 0 0 0.25rem rgba(13, 202, 240, 0.5);
}

/* Footer */
footer .btn-link {
  color: var(--bs-secondary-color);
}
footer .btn-link:hover {
  color: var(--wd-primary);
}

/* Responsive: stack toolbar on small screens */
@media (max-width: 768px) {
  .navbar .d-flex {
    width: 100%;
  }
  .diary-table {
    font-size: 0.75rem;
  }
  .diary-table th,
  .diary-table td {
    padding: 0.35rem 0.4rem;
  }
}
