/* Main layout adjustments for fixed navbar + sidebar */
body {
  padding-top: 56px;
}

.sidebar {
  position: fixed;
  top: 56px;
  bottom: 0;
  left: 0;
  z-index: 100;
  padding: 0;
  overflow-x: hidden;
  overflow-y: auto;
  border-right: 1px solid #dee2e6;
}

.sidebar .nav-link {
  font-weight: 500;
  color: #333;
  padding: 0.75rem 1rem;
}

.sidebar .nav-link:hover {
  color: #78c2ad;
  background-color: #e8f5f0;
}

.sidebar .nav-link .bi {
  margin-right: 0.5rem;
}

.sidebar-heading {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Card stats */
.card h2 {
  font-weight: 700;
}

/* Dashboard clickable cards */
.dashboard-card {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
}

.dashboard-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.2);
}

/* Table improvements */
.table th {
  white-space: nowrap;
}

/* Responsive sidebar toggle */
@media (max-width: 767.98px) {
  .sidebar {
    position: static;
    border-right: none;
    border-bottom: 1px solid #dee2e6;
  }
}

/* Form pages */
.form-card {
  max-width: 700px;
}

/* Litepicker — Material Design style */
.litepicker {
  font-family: inherit;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  overflow: hidden;
  border: none;
}

.litepicker .container__months {
  border-radius: 0;
  background-color: #fff;
}

.litepicker .container__months .month-item-header {
  padding: 10px 5px;
  font-weight: 600;
  color: #333;
}

.litepicker .container__months .month-item-header div > .month-item-name {
  font-weight: 600;
  color: #78c2ad;
}

.litepicker .container__months .month-item-header div > .month-item-year {
  font-weight: 500;
  color: #78c2ad;
}

.litepicker .container__months .month-item-weekdays-row > div {
  font-size: 11px;
  font-weight: 600;
  color: #70757a;
  padding: 8px 0;
}

.litepicker .container__days > div,
.litepicker .container__days .day-item {
  padding: 6px 0;
  width: 36px;
  height: 36px;
  line-height: 24px;
  border-radius: 50%;
  transition: background-color 0.15s ease;
}

.litepicker .container__days .day-item:hover {
  background-color: #e8f5f0;
  color: #78c2ad;
  box-shadow: none;
}

.litepicker .container__days .day-item.is-today {
  color: #78c2ad;
  font-weight: 700;
  border: 2px solid #78c2ad;
}

.litepicker .container__days .day-item.is-start-date,
.litepicker .container__days .day-item.is-end-date {
  background-color: #78c2ad;
  color: #fff;
  border-radius: 50%;
  font-weight: 600;
}

.litepicker .container__days .day-item.is-in-range {
  background-color: #e8f5f0;
  color: #78c2ad;
  border-radius: 0;
}

.litepicker .container__days .day-item.is-start-date.is-in-range {
  border-radius: 50% 0 0 50%;
}

.litepicker .container__days .day-item.is-end-date.is-in-range {
  border-radius: 0 50% 50% 0;
}

.litepicker .container__days .day-item.is-start-date.is-end-date {
  border-radius: 50%;
}

.litepicker .container__tooltip {
  background-color: #78c2ad;
  color: #fff;
  border-radius: 16px;
  font-size: 12px;
  padding: 4px 10px;
}

.litepicker .container__footer {
  background-color: #fff;
  border-top: 1px solid #e0e0e0;
  padding: 8px 16px;
}

.litepicker .container__footer .preview-date-range {
  color: #5f6368;
  font-size: 13px;
}

.litepicker .container__footer .button-cancel,
.litepicker .container__footer .button-apply {
  border: none;
  border-radius: 8px;
  padding: 6px 20px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.litepicker .container__footer .button-cancel {
  background: none;
  color: #78c2ad;
}

.litepicker .container__footer .button-cancel:hover {
  background-color: #e8f5f0;
}

.litepicker .container__footer .button-apply {
  background-color: #78c2ad;
  color: #fff;
}

.litepicker .container__footer .button-apply:hover {
  background-color: #5eb89a;
}

.litepicker .container__footer .button-reset {
  border: none;
  background: none;
  color: #78c2ad;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 8px;
}

.litepicker .container__footer .button-reset:hover {
  background-color: #e8f5f0;
}

.litepicker .month-item-header button {
  border: none;
  background: none;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 50%;
  color: #5f6368;
  transition: background-color 0.15s ease;
}

.litepicker .month-item-header button:hover {
  background-color: #e8f5f0;
  color: #78c2ad;
}

/* Navbar collapsible search */
.nav-search-expanded {
  position: absolute;
  right: 0;
  top: 100%;
  width: 320px;
  z-index: 1050;
  padding: 8px;
  background: #fff;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.nav-search-expanded .form-control {
  border-radius: 6px;
}

.nav-search-results {
  max-height: 400px;
  overflow-y: auto;
  margin-top: 4px;
}

.nav-search-results .search-item {
  display: block;
  padding: 8px 12px;
  border-bottom: 1px solid #eee;
  color: #333;
  text-decoration: none;
  font-size: 0.875rem;
}

.nav-search-results .search-item:hover {
  background: #e8f5f0;
  color: #78c2ad;
}

.nav-search-results .search-category {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #888;
  padding: 8px 12px 2px;
  font-weight: 600;
}

.nav-search-results .search-empty {
  padding: 12px;
  text-align: center;
  color: #888;
  font-size: 0.875rem;
}

@media (max-width: 767.98px) {
  .nav-search-expanded {
    width: 280px;
    right: -40px;
  }
}

/* User avatars */
.user-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: 600;
  text-transform: uppercase;
  color: #fff;
  flex-shrink: 0;
  line-height: 1;
}

.user-avatar-xs { width: 24px; height: 24px; font-size: 0.6rem; }
.user-avatar-sm { width: 28px; height: 28px; font-size: 0.7rem; }
.user-avatar-md { width: 40px; height: 40px; font-size: 0.85rem; }

/* Modal text color fix (Minty theme uses lighter body color) */
#contactFinderModal,
#smsWizardModal,
#smsModal,
#groupFinderModal {
  color: #212529;
}

/* Contact finder modal */
#contactFinderModal .form-control:focus,
#contactFinderModal .form-select:focus {
  border-color: #78c2ad;
  box-shadow: 0 0 0 0.2rem rgba(120, 194, 173, 0.2);
}

/* Searchable dropdown */
.cf-searchable-dropdown .dropdown-menu {
  border: 1px solid #dee2e6;
}

.cf-searchable-dropdown .cf-dd-search:focus {
  border-color: #78c2ad;
  box-shadow: 0 0 0 0.15rem rgba(120, 194, 173, 0.2);
}

.cf-searchable-dropdown .cf-dd-item {
  padding: 0.4rem 0.75rem;
  font-size: 0.875rem;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cf-searchable-dropdown .cf-dd-item:hover {
  background-color: #e8f5f0;
  color: #333;
}

.cf-searchable-dropdown .cf-dd-item.active {
  background-color: #78c2ad;
  color: #fff;
}

.cf-searchable-dropdown .cf-dd-list::-webkit-scrollbar {
  width: 6px;
}

.cf-searchable-dropdown .cf-dd-list::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 3px;
}

.cf-searchable-dropdown .cf-dd-list::-webkit-scrollbar-thumb:hover {
  background: #aaa;
}

/* SMS Wizard */
.sw-step-indicator {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  padding-bottom: 0.5rem;
}

.sw-step-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  margin: 0 auto 4px;
  transition: all 0.3s ease;
}

.sw-step-circle.active {
  background: #78c2ad;
  color: #fff;
}

.sw-step-circle.done {
  background: #5eb89a;
  color: #fff;
}

.sw-step-circle.pending {
  background: #e9ecef;
  color: #adb5bd;
}

.sw-step-connector {
  flex: 1;
  height: 3px;
  background: #e9ecef;
  margin-top: 17px;
  min-width: 40px;
  max-width: 100px;
  transition: background 0.3s ease;
}

.sw-step-connector.done {
  background: #78c2ad;
}

.sw-step-label {
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
}

.sw-step-label.active { color: #78c2ad; }
.sw-step-label.done { color: #5eb89a; }
.sw-step-label.pending { color: #adb5bd; }

/* Wizard favorite tiles */
.sw-fav-tile {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid #dee2e6;
  border-radius: 2rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: #333;
  cursor: pointer;
  transition: all 0.15s ease;
  background: #fff;
}

.sw-fav-tile:hover {
  border-color: #78c2ad;
  background: #e8f5f0;
  color: #5eb89a;
}

/* Wizard multi-select dropdown */
.sw-multi-dropdown .dropdown-menu {
  border: 1px solid #dee2e6;
}

.sw-multi-dropdown .form-check {
  padding: 0.35rem 0.75rem 0.35rem 2rem;
  font-size: 0.875rem;
  cursor: pointer;
  border-radius: 0.25rem;
}

.sw-multi-dropdown .form-check:hover {
  background: #e8f5f0;
}

.sw-multi-dropdown .form-check-input:checked {
  background-color: #78c2ad;
  border-color: #78c2ad;
}

/* Wizard recipient row */
.sw-recipient-row {
  display: flex;
  align-items: center;
  padding: 0.4rem 0.5rem;
  border-bottom: 1px solid #f0f0f0;
  font-size: 0.875rem;
}

.sw-recipient-row:hover {
  background: #f8f9fa;
}

/* Wizard summary recipients */
.sw-summary-recipients {
  max-height: 200px;
  overflow-y: auto;
}

.sw-summary-recipients::-webkit-scrollbar {
  width: 6px;
}

.sw-summary-recipients::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 3px;
}

/* Wizard focus states */
#smsWizardModal .form-control:focus,
#smsWizardModal .form-select:focus {
  border-color: #78c2ad;
  box-shadow: 0 0 0 0.2rem rgba(120, 194, 173, 0.2);
}

/* Print styles */
@media print {
  .sidebar, .navbar, .btn, .alert {
    display: none !important;
  }
  main {
    margin: 0 !important;
    padding: 0 !important;
  }
}
