/* Regional Management Styles */

/* Buttons */
.rm-btn-outline {
  background-color: #343a40;
  color: #ffffff;
  border: 1px solid #495057;
}

.rm-btn-outline:hover {
  background-color: #495057;
  color: #ffffff;
}

.rm-btn-primary {
  background-color: #6c8c6c;
  color: #ffffff;
  border: none;
}

.rm-btn-primary:hover {
  background-color: #7c9c7c;
  color: #ffffff;
}

.rm-view-btn {
  background-color: #6c757d;
  color: #ffffff;
  border: none;
}

.rm-view-btn:hover {
  background-color: #5a6268;
  color: #ffffff;
}

.rm-view-btn.active {
  background-color: #343a40;
  color: #ffffff;
}

/* Overdue todo items */
.todo-overdue {
  background-color: #fff5f5 !important;
}

/* Dropdowns */
.rm-dropdown-month {
  min-width: 150px;
  width: 150px;
}

.rm-dropdown-day {
  min-width: 70px;
  width: 70px;
}

.rm-dropdown-year {
  min-width: 90px;
  width: 90px;
}

/* Scrollable sections */
.rm-todo-scroll {
  max-height: 400px;
  overflow-y: auto;
}

.rm-events-scroll {
  max-height: 400px;
  overflow-y: auto;
}

.regional-locations-container .locations-scroll {
  max-height: 500px;
  overflow-y: auto;
}

/* Container adjustments for better spacing */
.regional-calendar-container {
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

.regional-activities-container {
  padding-left: 0.75rem;
  padding-right: 1rem;
}

/* Annual Calendar */
.annual-calendar {
  padding: 10px 5px;
}

.months-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}

.month-card {
  border: 1px solid #dee2e6;
  border-radius: 4px;
  padding: 8px;
  background-color: #fff;
}

.month-header {
  font-weight: bold;
  text-align: center;
  margin-bottom: 8px;
  font-size: 14px;
}

.month-header a {
  color: #343a40;
  text-decoration: none;
}

.month-header a:hover {
  text-decoration: underline;
}

.month-days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.day-label {
  font-size: 10px;
  font-weight: bold;
  text-align: center;
  padding: 2px;
}

.day-cell {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  border-radius: 2px;
  text-decoration: none;
  color: #212529;
  border: 1px solid #e9ecef;
}

.day-cell.empty {
  border: none;
}

.day-cell.today {
  background-color: #ffc107;
  font-weight: bold;
}

.day-cell.today .day-number {
  color: #E08000;
}

.day-cell.has-booking {
  background-color: #d4edda;
  font-weight: bold;
}

.day-cell.has-event {
  background-color: #007bff;
  color: white;
}

.day-cell:hover:not(.empty) {
  background-color: #e9ecef;
  transform: scale(1.1);
}

/* Monthly Calendar */
.monthly-calendar {
  padding: 10px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.day-header {
  background-color: #f8f9fa;
  padding: 8px;
  text-align: center;
  font-weight: bold;
  border: 1px solid #dee2e6;
  font-size: 14px;
}

.monthly-calendar .day-cell {
  border: 1px solid #dee2e6;
  padding: 8px;
  min-height: 80px;
  background-color: #fff;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: #212529;
  aspect-ratio: auto;
}

.monthly-calendar .day-cell.empty {
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
}

.monthly-calendar .day-cell.today {
  background-color: #fff3cd;
  border: 2px solid #ffc107;
}

.monthly-calendar .day-cell.today .day-number {
  color: #E08000;
}

.monthly-calendar .day-cell:hover:not(.empty) {
  background-color: #f8f9fa;
  cursor: pointer;
}

.day-number {
  font-weight: bold;
  margin-bottom: 4px;
  font-size: 16px;
}

.day-number:hover {
  color: var(--pms-color-blue);
}

.monthly-calendar .badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 10px;
  margin: 2px 0;
}

.monthly-calendar .badge-sm {
  font-size: 9px;
  padding: 1px 4px;
}

/* Weekly Calendar */
.weekly-calendar {
  padding: 10px;
}

.week-grid-two-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 10px;
}

.week-day-card {
  border: 1px solid #dee2e6;
  border-radius: 4px;
  background-color: #fff;
  padding: 10px;
  display: flex;
  flex-direction: column;
}

.week-day-sun {
  grid-row: 1 / 3;
}

.week-day-header {
  border-bottom: 1px solid #dee2e6;
  padding-bottom: 8px;
  margin-bottom: 8px;
  text-align: center;
}

.week-day-header a {
  color: #212529;
  text-decoration: none;
  display: block;
}

.week-day-header a:hover {
  background-color: #f8f9fa;
}

.week-day-body {
  flex-grow: 1;
}

.location-badge {
  display: flex;
  align-items: center;
  gap: 6px;
}

.location-badge .badge {
  flex-grow: 1;
  text-align: left;
}

/* Daily Calendar */
.daily-calendar {
  padding: 10px;
}

.daily-calendar .list-group-item {
  margin-bottom: 10px;
  border-radius: 4px;
}

.daily-calendar h6 a {
  color: #007bff;
  text-decoration: none;
}

.daily-calendar h6 a:hover {
  text-decoration: underline;
}

/* Activities Panel */
.rm-activities-panel {
  max-height: 400px;
  overflow-y: auto;
}

.rm-activity-item {
  border-bottom: 1px solid #e9ecef;
  padding: 10px;
}

.rm-activity-item:last-child {
  border-bottom: none;
}

.rm-activity-title {
  font-weight: bold;
  margin-bottom: 4px;
}

.rm-activity-meta {
  font-size: 12px;
  color: #6c757d;
}

.rm-todo-item {
  display: flex;
  align-items: center;
  padding: 8px;
  border-bottom: 1px solid #e9ecef;
}

.rm-todo-item.completed {
  text-decoration: line-through;
  color: #6c757d;
}

/* Locations List */
.rm-locations-list {
  max-height: 400px;
  overflow-y: auto;
}

/* Group By Bar and Tokens */
.group-by-bar {
  gap: 0.5rem;
  align-items: center;
}
.group-dropzone {
  min-width: 220px;
  min-height: 34px;
  border: 1px dashed #dee2e6;
  padding: 6px 8px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #fff;
}
.group-dropzone .group-placeholder {
  color: #6c757d;
  font-size: 0.9rem;
}
.group-palette {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.group-token {
  cursor: grab;
}
.group-token:active {
  cursor: grabbing;
}
.group-token .btn-close {
  opacity: 0.9;
}

/* Nested group styling */
.location-group-items.nested-group {
  padding-left: 1rem;
  border-left: 2px dashed #e9ecef;
  margin-bottom: 0.5rem;
}
.location-group-header {
  padding: 6px 8px;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  margin-top: 6px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.location-group-header .group-chevron {
  transition: transform 0.15s ease-in-out;
}
.location-group-items.collapsed {
  display: none;
}
.location-group-items {
  padding: 8px 6px;
}


.rm-location-item {
  padding: 10px;
  cursor: pointer;
  border-bottom: 1px solid #e9ecef;
}

.rm-location-item:hover {
  background-color: #f8f9fa;
}

.rm-location-item.selected {
  background-color: #e7f3ff;
  border-left: 3px solid #007bff;
}

.location-selected {
  background-color: #c5dce8 !important;
  border-left: 4px solid #0d6efd;
}

.rm-location-name {
  font-weight: bold;
}

.rm-location-address {
  font-size: 12px;
  color: #6c757d;
}

/* Activity Log */
.rm-activity-log {
  max-height: 400px;
  overflow-y: auto;
}

.rm-activity-log-item {
  padding: 10px;
  border-bottom: 1px solid #e9ecef;
}

.rm-activity-type {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: bold;
  margin-right: 8px;
}

.rm-activity-type-email {
  background-color: #17a2b8;
  color: white;
}

.rm-activity-type-phone {
  background-color: #28a745;
  color: white;
}

.rm-activity-type-sales {
  background-color: #ffc107;
  color: #212529;
}

.rm-activity-type-meeting {
  background-color: #6f42c1;
  color: white;
}

.rm-activity-type-post {
  background-color: #fd7e14;
  color: white;
}

/* New View Styles */

/* Annual View - 12-month mini calendar */
.annual-calendar-full-width {
  width: 100%;
  overflow-x: hidden;
  gap: 12px;
}

.annual-month-mini {
  flex: 1;
  min-width: 70px;
  padding: 4px;
  border-radius: 3px;
}

.annual-mini-calendar {
  width: 100%;
  font-size: 0.55rem;
  border-collapse: collapse;
}

.annual-mini-day-header {
  text-align: center;
  font-weight: bold;
  padding: 1px;
  font-size: 0.5rem;
}

.annual-mini-day {
  text-align: center;
  padding: 1px;
  border: 1px solid #e9ecef;
}

.annual-mini-day.other-month {
  color: #adb5bd;
}

.annual-mini-day.has-booking {
  background-color: #d4edda;
}

.annual-mini-day.today {
  background-color: #fff3cd;
  font-weight: bold;
  color: #E08000;
}

.annual-mini-day-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.annual-mini-day-link:hover {
  background-color: #e9ecef;
}

/* Monthly View */
.monthly-calendar-table {
  table-layout: fixed;
  width: 100%;
}


.monthly-calendar-table th {
  font-size: 0.85rem;
  padding: 8px 4px;
  background-color: #f8f9fa;
}

.monthly-calendar-day {
  height: 100px;
  vertical-align: top;
  padding: 4px;
  position: relative;
}

.monthly-calendar-day.other-month {
  background-color: #f8f9fa;
  color: #adb5bd;
}

.monthly-calendar-day.today {
  background-color: #fff3cd;
}

.monthly-calendar-day.today .monthly-day-number {
  color: #E08000;
  font-weight: bold;
}

.monthly-calendar-day.has-booking {
  background-color: #d4edda;
}

.monthly-day-number {
  font-weight: bold;
  font-size: 0.9rem;
  text-decoration: none;
  color: inherit;
  display: inline-block;
  margin-bottom: 4px;
}

.monthly-day-number:hover {
  color: var(--pms-color-blue);
}

.monthly-day-badges {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.monthly-day-badges .badge {
  font-size: 0.65rem;
  padding: 2px 4px;
}

/* Weekly View */
.weekly-calendar-table {
  width: 100%;
}

.weekly-day-name {
  width: 25%;
  padding: 15px;
  font-size: 1.1rem;
  vertical-align: middle;
  color: #343a40;
  font-weight: 600;
}

.weekly-day-name a {
  color: #343a40 !important;
}

.weekly-day-badges {
  padding: 15px;
  vertical-align: middle;
}

.weekly-calendar-table tr.today {
  background-color: #fff3cd;
}

.weekly-calendar-table tr.today .day-number {
  color: #E08000;
  font-weight: bold;
}

.weekly-calendar-table tr.has-booking {
  border-left: 4px solid #28a745;
}

/* Daily View */
.daily-calendar {
  background-color: #fff;
  overflow: visible;
}

.daily-hour-block {
  display: flex;
  border-bottom: 1px solid #dee2e6;
  height: 60px;
}

.daily-hour-label {
  width: 80px;
  padding: 8px;
  font-size: 0.85rem;
  font-weight: bold;
  color: #6c757d;
  background-color: #f8f9fa;
  border-right: 2px solid #dee2e6;
  display: flex;
  align-items: flex-start;
}

.daily-hour-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.daily-time-slot {
  flex: 1;
  height: 15px;
  border-bottom: 1px solid #f1f3f5;
  padding: 2px 8px;
  position: relative;
  overflow: hidden;
}

.daily-event-block {
  position: absolute;
  top: var(--block-top, auto);
  height: var(--block-height, auto);
  left: var(--block-left, 0);
  width: var(--block-width, auto);
  background-color: #e7f3ff;
  border: 1px solid #90c4f7;
  border-left: 4px solid #007bff;
  border-radius: 4px;
  padding: 4px 6px;
  overflow: hidden;
  pointer-events: auto;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  z-index: 20;
  min-height: 20px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.daily-event-block:hover {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  z-index: 21;
}

.daily-event-block .daily-event-time {
  font-weight: bold;
  font-size: 0.72rem;
  color: #0056b3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
}

.daily-event-block .daily-event-title {
  font-weight: 400;
  font-size: 0.72rem;
  color: #4a6fa5;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex-shrink: 0;
}

.daily-event-block .daily-event-location {
  font-weight: 600;
  font-size: 0.82rem;
  color: #003a80;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex-shrink: 0;
}

.daily-event {
  background-color: #e7f3ff;
  border-left: 3px solid #007bff;
  padding: 6px;
  margin: 2px 0;
  border-radius: 3px;
  font-size: 0.85rem;
}

.daily-event.event-completed {
  background-color: #d4edda;
  border-left-color: #28a745;
  opacity: 0.7;
}

.daily-event-time {
  font-weight: bold;
  font-size: 0.75rem;
  color: #495057;
}

.daily-event-title {
  font-weight: 600;
  margin: 2px 0;
}

.daily-event-location {
  font-size: 0.75rem;
  color: #6c757d;
  margin-top: 2px;
}

.daily-booking-segment {
  background-color: #e8f5e9;
  border-left: 3px solid #81c784;
  padding: 4px 6px;
  margin: 0;
  font-size: 0.85rem;
  min-height: 15px;
}

.daily-booking-header {
  padding: 2px 0;
}

.daily-booking-continue {
  height: 100%;
  min-height: 15px;
}

.daily-booking-time {
  font-weight: bold;
  font-size: 0.75rem;
  color: #2e7d32;
}

.daily-booking-location {
  font-weight: 600;
  margin: 2px 0;
  color: #2e7d32;
}

/* Daily Calendar Grid with Overlay for Location Blocks */
.daily-calendar-grid {
  position: relative;
  overflow: visible;
  min-height: var(--calendar-min-height, auto);
}

.daily-booking-overlay {
  position: absolute;
  top: 0;
  left: 80px; /* Match the hour label width */
  right: 0;
  bottom: 0;
  pointer-events: none;
}

.daily-booking-block {
  position: absolute;
  top: var(--block-top, auto);
  height: var(--block-height, auto);
  left: var(--block-left, 0);
  width: var(--block-width, auto);
  background-color: #e8f5e9;
  border: 1px solid #81c784;
  border-left: 4px solid #4caf50;
  border-radius: 4px;
  padding: 8px;
  overflow: hidden;
  pointer-events: auto;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.2s ease;
  z-index: 20;
  min-height: 50px;
}

/* Contract Pending bookings — yellow/amber tint */
.daily-booking-block.contract-pending {
  background-color: #f9f6e8;
  border-color: #c8b86a;
  border-left-color: #8c8c5a;
}

.daily-booking-block.contract-pending .daily-booking-time {
  color: #6b6b3a !important;
}

.daily-booking-block.contract-pending .daily-booking-location {
  color: #4a4a28 !important;
}

.daily-booking-block .daily-booking-time {
  font-weight: bold;
  font-size: 0.75rem;
  color: #2e7d32;
}

.daily-booking-block .daily-booking-location {
  font-weight: 600;
  color: #1b5e20;
  margin: 2px 0;
}

.daily-booking-block:hover {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  z-index: 21;
}

.daily-booking-content {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.daily-booking-block .daily-booking-time {
  font-weight: bold;
  font-size: 0.8rem;
  color: #2e7d32;
  white-space: nowrap;
}

.daily-booking-block .daily-booking-location {
  font-weight: 600;
  font-size: 0.9rem;
  color: #1b5e20;
  margin: 4px 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Current Time Indicator */
.daily-time-slot {
  position: relative;
}

.current-time-indicator {
  position: absolute;
  top: var(--indicator-top, 0);
  left: 0;
  right: 0;
  height: 2px;
  background-color: #dc3545;
  z-index: 25;
  pointer-events: none;
}

.current-time-indicator::before {
  content: '';
  position: absolute;
  left: 0;
  top: -3px;
  width: 8px;
  height: 8px;
  background-color: #dc3545;
  border-radius: 50%;
}

.current-time-label {
  position: absolute;
  left: 12px;
  top: -12px;
  background-color: #dc3545;
  color: white;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: bold;
  white-space: nowrap;
  z-index: 26;
}

/* Legacy badge classes removed - use pms-badge with color classes from application.css */

/* View-specific height classes */
.annual-view-row {
  height: calc(100vh - 350px);
}

/* Annual view todo grouped by category */
.annual-todo-group {
  border: 1px solid var(--bs-border-color, #dee2e6);
  border-radius: 0.375rem;
  overflow: hidden;
}

.annual-todo-group-header {
  background-color: var(--bs-light, #f8f9fa);
  border-bottom: 1px solid var(--bs-border-color, #dee2e6);
  font-size: 0.8rem;
}

.annual-todo-group .list-group-item {
  font-size: 0.8rem;
}

.annual-todo-group .list-group-item:last-child {
  border-bottom: none;
}

.monthly-view-row,
.weekly-view-row {
  height: calc(100vh - 250px);
}

.daily-view-row {
  height: calc(100vh - 280px);
}

.view-section-top {
  height: 50%;
}

.view-section-bottom {
  height: 48%;
}

/* Todo lists should match calendar height */
.monthly-view-row .col-md-4 .card,
.weekly-view-row .col-md-4 .card,
.daily-view-row .col-md-4 .card {
  display: flex;
  flex-direction: column;
}

.monthly-view-row .col-md-4 .card-body,
.weekly-view-row .col-md-4 .card-body,
.daily-view-row .col-md-4 .card-body {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

/* Monthly View Layout: Calendar + Todos same height, Events below full-width */
.monthly-calendar-card {
  display: flex;
  flex-direction: column;
}

.monthly-calendar-card .card-body {
  flex: 1;
  padding-bottom: 0;
}

.monthly-calendar-card .card-body > .table-responsive,
.monthly-calendar-card .card-body > table {
  width: 100%;
}

.monthly-side-col {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-self: stretch;
}

.monthly-bookings-card {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.monthly-bookings-card .card-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.monthly-todo-card {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.monthly-todo-card .card-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.monthly-todo-scroll {
  flex: 1;
  overflow-y: auto;
  margin-bottom: 0;
  border: 1px solid #dee2e6;
  border-radius: 0.5rem;
  padding: 0;
}

/* Location Management Column Layout */
.location-col-check {
  width: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.location-col-1 {
  width: 23%;
  padding-right: 15px;
}

.location-col-2 {
  width: 13%;
  padding-right: 15px;
}

.location-col-3 {
  width: 21%;
  padding-right: 15px;
}

.location-col-4 {
  width: 19%;
  padding-right: 15px;
}

.location-col-5 {
  width: 20%;
  flex-shrink: 0;
}

/* Bulk Status Action Bar */
.location-bulk-action-bar {
  display: none;
  align-items: center;
  background-color: #e8f0fe;
  border: 1px solid #c5d5f8;
  border-radius: 6px;
  padding: 10px 14px;
  margin-bottom: 12px;
  position: sticky;
  top: 10px;
  z-index: 100;
  flex-wrap: wrap;
  gap: 8px;
}

.location-bulk-action-bar.active {
  display: flex;
}

.bulk-status-input {
  width: 200px;
}

.location-name-link {
  color: inherit;
  text-decoration: none;
}

.location-name-link:hover {
  text-decoration: underline;
}

.location-header-col {
  cursor: pointer;
}

.clickable-header {
  cursor: pointer;
}

.monthly-events-section {
  max-height: 400px;
  display: flex;
  flex-direction: column;
}

.monthly-events-section .card-body {
  overflow-y: auto;
  flex: 1;
}

/* Weekly View Layout: Calendar + Todos same height, Events below full-width */
.weekly-view-container > .row:first-child {
  max-height: 600px;
}

.weekly-calendar-card {
  display: flex;
  flex-direction: column;
}

.weekly-calendar-card .card-body {
  overflow-y: visible;
  flex: 1;
}

.weekly-side-col {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-self: stretch;
}

.weekly-bookings-card {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.weekly-bookings-card .card-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.weekly-todo-card {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.weekly-todo-card .card-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.weekly-todo-scroll {
  flex: 1;
  overflow-y: auto;
  margin-bottom: 0;
  border: 1px solid #dee2e6;
  border-radius: 0.5rem;
  padding: 0;
}

.weekly-events-section {
  max-height: 400px;
  display: flex;
  flex-direction: column;
}

/* Todo item sub-text in daily view */
.todo-item-meta {
  font-size: 0.75rem;
}

.todo-compose-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.todo-compose-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  padding: 0.1rem 0.45rem;
  border-radius: 0.25rem;
  background-color: #e8f0fe;
  border: 1px solid #4a90d9;
  color: #1a5fa8;
  text-decoration: none;
}

.todo-compose-link:hover {
  background-color: #d0e3fb;
  color: #104080;
  text-decoration: none;
}

.todo-compose-account {
  color: #5a7fa8;
  font-size: 0.7rem;
}

.weekly-events-section .card-body {
  overflow-y: auto;
  flex: 1;
}

/* Daily View Layout */
.daily-layout {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 12px;
}

.daily-schedule-col {
  flex: 0 0 75%;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.daily-sidebar-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Legacy classes — kept for backwards compat, not used in layout */
.daily-main-row { overflow: hidden; }
.daily-col-schedule { min-height: 0; display: flex; flex-direction: column; align-self: stretch; }
.daily-col-sidebar { min-height: 0; display: flex; flex-direction: column; align-self: stretch; }
.daily-sidebar { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 8px; }

/* Schedule card grows with content */
.daily-schedule-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 2;
  background-clip: padding-box;
  height: var(--schedule-height);
  min-height: var(--schedule-min-height);
}

.daily-schedule-card .card-body {
  flex: 1;
}

/* Sidebar: fills column height, splits evenly between two cards */
.daily-sidebar {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.daily-bookings-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 2;
  background-clip: padding-box;
  overflow-y: auto;
}

.daily-bookings-card .card-body {
  flex: 1;
}

.rm-btn-invisible {
  visibility: hidden;
  pointer-events: none;
}

.daily-todo-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 2;
  background-clip: padding-box;
  overflow-y: auto;
  height: var(--todo-height);
}

.daily-todo-card .card-body {
  flex: 1;
}

.daily-todo-card .daily-todo-scroll {
  overflow-y: auto;
}

.daily-todo-scroll {
  flex: 1;
  overflow-y: auto;
  margin-bottom: 0;
  border: 1px solid #dee2e6;
  border-radius: 0.5rem;
  padding: 0;
}

.daily-todo-scroll.daily-todo-scroll-active {
  max-height: var(--todo-scroll-max-height);
  overflow-y: auto;
}

/* Location Grouping Styles */
.location-group-header {
  background-color: #e9ecef;
  padding: 12px 15px;
  margin-top: 10px;
  cursor: pointer;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background-color 0.2s ease;
}

.location-group-header:hover {
  background-color: #dee2e6;
}

.location-group-header:first-child {
  margin-top: 0;
}

.group-chevron {
  transition: transform 0.2s ease;
  font-size: 14px;
}

/* Satellite search typeahead */
.satellite-search-wrap {
  width: 320px;
}

.satellite-search-results {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  z-index: 1000;
}

.satellite-remove-btn {
  font-size: 0.8em;
}

.satellite-search-city {
  font-size: 0.8em;
}

.booking-actions-wrap {
  width: 140px;
}

.todo-location-subtext {
  font-size: 0.8em;
}

.satellite-icon {
  font-size: 0.85em;
}

.hub-badge {
  font-size: 0.7em;
  vertical-align: middle;
}

/* Satellite location rows: subtle left indent + lighter background */
.location-satellite-row {
  border-left: 3px solid #5b7fa6 !important;
  background-color: #f8fbff;
  padding-left: calc(0.75rem + 4px) !important;
}

.location-satellite-row:hover {
  background-color: #eef4fb;
}

