/* public/assets/css/style.css */

/* =========================
   Base / Theme
   ========================= */
:root{
  --cmrs-bg: #f8fafc;
  --cmrs-card-radius: 16px;
  --cmrs-shadow: 0 6px 18px rgba(16,24,40,.06);
  --cmrs-muted: #6c757d;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  background: var(--cmrs-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Navbar */
.navbar-brand { font-weight: 700; letter-spacing:.2px; }

/* Cards */
.card {
  border-radius: var(--cmrs-card-radius);
  border: 1px solid rgba(16,24,40,.06);
  box-shadow: var(--cmrs-shadow);
}

/* Lists */
.list-group-item {
  border: 0;
  border-bottom: 1px solid #eee;
}
.list-group-item:last-child { border-bottom: 0; }

/* =========================
   Tables (global + bookings)
   ========================= */
.table th,
.table td {
  vertical-align: middle;
}

.text-wrap {
  white-space: normal;
  word-break: break-word;
}

/* Bookings table visual refinements */
.bookings-table td { font-size: .95rem; }
.bookings-table td small { font-size: .85rem; color: var(--cmrs-muted); }
.bookings-table .btn-icon { padding:.15rem .45rem; line-height:1; font-size:.8rem; }
.bookings-table .ref-actions .btn { padding:.2rem .55rem; }
.bookings-table .ref-actions { display:flex; flex-wrap:wrap; gap:.25rem; margin-top:.25rem; }

/* Sticky header inside scrollable container */
.table-responsive { overflow-x: auto; }
.bookings-table thead th {
  position: sticky;
  top: 0;
  background: #f8f9fa; /* Bootstrap light */
  z-index: 2;
  box-shadow: 0 1px 0 rgba(0,0,0,.05);
}

/* Make long cells breathe a bit */
.bookings-table td,
.bookings-table th { padding-top:.65rem; padding-bottom:.65rem; }

/* Badge sizing for profit pill in table */
.bookings-table .badge { font-weight:600; letter-spacing:.2px; }

/* When a booking has assignments (row highlighted by app) */
.table-success { --bs-table-bg: #eaf6ed; }

/* Narrow action buttons */
.btn-icon { padding:.15rem .45rem; line-height:1; font-size:.8rem; }

/* =========================
   Sidebar
   ========================= */
aside { min-height: calc(100vh - 56px); } /* 56px ~ default navbar height */
aside .list-group a {
  border: 0 !important;
  padding: .65rem .95rem;
  border-radius: 10px;
}
aside .list-group a:hover {
  background: #f2f4f7;
}

/* =========================
   Forms / Controls
   ========================= */
.form-label { font-weight: 600; }
.input-group .btn { border-radius: .5rem; }

/* Subtle section title */
.section-title {
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--cmrs-muted);
  margin-bottom: .5rem;
}

/* =========================
   FullCalendar (month, no scroll)
   ========================= */
#calendar { min-height: 600px; }
.fc .fc-scroller { overflow: visible !important; }
.fc .fc-toolbar-title { font-size: 1.1rem; }
.fc .fc-daygrid-day-number { font-size: .9rem; }
.fc .fc-daygrid-day-frame { padding: .25rem; }

/* =========================
   Utilities
   ========================= */
.shadow-soft { box-shadow: var(--cmrs-shadow); }
.rounded-2xl { border-radius: 1rem; }
.text-muted-2 { color: var(--cmrs-muted); }
.w-28 { width: 7rem; }
.min-w-160 { min-width:160px; }
.min-w-220 { min-width:220px; }
.min-w-260 { min-width:260px; }

/* Subtle link styles in tables */
.table a.btn-outline-secondary { color: #495057; }

/* Responsive tweaks */
@media (max-width: 992px) {
  .bookings-table td { font-size: .9rem; }
  .bookings-table th { white-space: nowrap; }
  .navbar .btn { padding: .35rem .6rem; }
  .card-body { padding: 1rem; }
}

@media (max-width: 576px) {
  .bookings-table .ref-actions { gap:.2rem; }
  .bookings-table .ref-actions .btn { padding:.15rem .45rem; font-size:.8rem; }
}

/* =========================
   Toast (used by copy-to-clipboard JS)
   ========================= */
.cmrs-toast {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  background: #212529;
  color: #fff;
  padding: .5rem .75rem;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
  z-index: 1055;
  font-size: .9rem;
}

/* =========================
   Buttons polish
   ========================= */
.btn-dark {
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(17, 24, 39, .12);
}
.btn-outline-secondary,
.btn-outline-primary,
.btn-outline-success,
.btn-outline-danger {
  border-radius: 10px;
}

/* =========================
   Compact badges in navbar
   ========================= */
.navbar .badge { font-size:.7rem; padding:.35em .45em; }

/* =========================
   Small helpers for copy icons
   ========================= */
.ref-actions .btn + .btn { margin-left: .15rem; }

.page-break { page-break-before: always; }
.tc        { font-size: 11px; line-height: 1.5; }
.tc h2     { margin: 0 0 8px; font-size: 16px; }
