/* ============================================================
   WEB-CRM — Глобальные стили
   Версия: 2.0 (адаптирована под clients.html + поиск + экспорт)
   ============================================================ */

* {
  font-family: 'Roboto', sans-serif;
  box-sizing: border-box;
}

body {
  background: #f5f5fa;
  color: #1a1a2e;
}

.rounded-xl, .rounded-2xl, .rounded-lg {
  border-radius: 5px !important;
}

.nav-icon {
  width: 28px;
  height: 28px;
}

/* ============================================================
   НАВИГАЦИЯ МЕСЯЦА
   ============================================================ */
.month-tab {
  transition: all 0.2s;
  cursor: pointer;
  padding: 8px 16px;
  color: #b0b8c8;
  font-size: 14px;
  font-weight: 400;
  background: none;
  border: none;
}
.month-tab:hover { color: #6b7280; }
.month-tab.active { font-weight: 700; color: #1a1a2e; }

.month-arrow {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #b0b8c8;
  cursor: pointer;
  transition: color 0.2s;
  background: none;
  border: none;
  padding: 0;
}
.month-arrow:hover { color: #6b7280; }

/* ============================================================
   КАЛЕНДАРЬ
   ============================================================ */
.cal-cell { 
  min-height: 590px;
  transition: background 0.15s;
  position: relative;
  border-radius: 5px;
  margin-bottom: 50px;
}
.cal-cell:hover { background: #fafafe; }
.cal-cell.today { background: #f0edff; }
.cal-cell.weekend { background: #faf8ff; }
.cal-cell.weekend.today { background: #ede8ff; }

.time-slot {
  height: 48px;
  border-bottom: 1px solid #9ea3b438;
  position: relative;
}
.time-slot:last-child { border-bottom: none; }
.time-label {
  position: absolute;
  left: 2px;
  top: 0;
  font-size: 9px;
  color: #9ea3b4;
  line-height: 48px;
  pointer-events: none;
  z-index: 2;
}

.current-time-line {
  position: absolute;
  left: -12px;
  right: 0;
  height: 2px;
  background: #00d4ff;
  z-index: 10;
  pointer-events: none;
}
.current-time-line::before {
  content: '';
  position: absolute;
  left: 0;
  top: -4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #00d4ff;
}

/* ============================================================
   БЛОКИ ЗАДАЧ (событий)
   ============================================================ */
.task-block {
  position: relative;
  padding: 8px 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  min-height: 0;
  color: white;
  overflow: hidden;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  border-radius: 8px;
}

.task-block.day-view { 
  border-radius: 10px;
  padding: 10px 14px;
  background: #edeffa !important;
  color: #1a1a2e;
  position: relative;
}

.task-block.day-view .task-info-wrapper {
  justify-content: center;
}

.task-block.day-view .day-task-project {
  color: #c7c9d6;
}

.task-block.day-view .day-task-time {
  color: #6b7280;
}

.task-block.day-view .day-task-info {
  padding-right: 100px;
}

.task-block.day-view .day-task-badges {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
  padding: 8px 12px;
  margin: 0;
  gap: 4px;
}

.task-block.day-view .task-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 12px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin: 0;
}

.task-block.day-view .task-sum-badge {
  background: rgb(214 251 239);
  color: #079d6e;
}

.task-block.day-view .task-status-badge {
  background: rgba(91, 79, 207, 0.1);
  color: #1a1a2e;
}

.task-block.day-view .task-status-badge.status-paid {
  color: #059669;
  background: rgb(255 255 255);
}

.task-block.day-view .task-status-badge.status-unpaid {
  color: #dc2626;
  background: rgb(255 255 255);
}

.task-block.month-view {
  border-radius: 6px;
  margin-bottom: 0;
  padding: 4px 8px 4px 12px;
}

.task-info-wrapper {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  gap: 4px;
}

.task-content-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  gap: 4px;
}

.task-client {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

.task-time {
  font-size: 10px;
  font-weight: 600;
  opacity: 0.95;
  line-height: 1.1;
  white-space: nowrap;
  flex-shrink: 0;
}

.day-task-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.day-task-project {
  font-size: 25px;
  font-weight: bolder;
  font-family: 'Gilroy Black', sans-serif;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.day-task-time {
  font-size: 11px;
  font-weight: 500;
  opacity: 0.85;
  line-height: 1.2;
}

.day-task-badges {
  display: flex;
  gap: 6px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.task-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.task-sum-badge {
  background: rgba(255,255,255,0.25);
  color: white;
}

.task-status-badge {
  background: rgba(255,255,255,0.85);
}

.task-status-badge.status-paid {
  color: #059669;
}

.task-status-badge.status-unpaid {
  color: #dc2626;
  opacity: 0.9;
}

/* ============================================================
   АНИМАЦИИ
   ============================================================ */
.fade-in { animation: fadeIn 0.3s ease-in; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.modal-overlay {
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
}

/* ============================================================
   ФОРМЫ И ИНПУТЫ
   ============================================================ */
.form-input {
  border-radius: 5px;
  background: #ffffff;
  border: 1.5px solid #edeffa;
  box-shadow: 0 4px 14px rgb(91 79 207 / 8%);
  padding: 14px 16px;
  font-size: 14px;
  box-sizing: border-box;
  width: 100%;
  outline: none;
  text-align: left;
  -webkit-appearance: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.2s;
  font-family: 'Roboto', sans-serif;
  cursor: text;
  color: #1a1a2e;
}
.form-input:focus {
  border-color: #5b4fcf;
  box-shadow: 0 4px 14px rgb(91 79 207 / 18%);
}
.form-input::placeholder { color: #8798ad; }

select.form-input {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238798ad' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
  border: none !important;
  outline: none !important;
}
select.form-input:focus {
  border: none !important;
  outline: none !important;
  box-shadow: 0 4px 14px rgb(91 79 207 / 30%);
}
select.form-input option {
  color: #1a1a2e;
  padding: 8px;
}
select.form-input option:disabled {
  color: #c7c9d6;
  font-style: italic;
}

.form-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ============================================================
   КНОПКИ ПЕРЕКЛЮЧЕНИЯ ВИДА
   ============================================================ */
.view-btn {
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  background: #ffffff;
  color: #6b7280;
  box-shadow: 0 4px 14px rgb(91 79 207 / 17%);
  padding: 10px 12px;
  border-radius: 5px;
  font-weight: 500;
  border: none;
}
.view-btn:hover { background: #f9fafb; }
.view-btn.active {
  background: #5b4fcf;
  color: white;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(91, 79, 207, 0.35);
}

/* ============================================================
   ТЕНИ
   ============================================================ */
.shadow-sidebar { box-shadow: 4px 0 24px rgba(91, 79, 207, 0.06); }
.shadow-calendar { box-shadow: none; }
.shadow-nav-btn { box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08); }
.shadow-day-active { box-shadow: 0 4px 12px rgba(91, 79, 207, 0.35); }
.shadow-add-btn { box-shadow: 0 4px 14px rgba(91, 79, 207, 0.3); }
.shadow-chat-bubble { box-shadow: 0 4px 18px rgba(91, 79, 207, 0.22); }
.shadow-chat-input { box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06); }
.shadow-icon-btn { box-shadow: 0 2px 8px rgba(91, 79, 207, 0.15); }
.shadow-cta-btn { box-shadow: 0 4px 14px rgba(91, 79, 207, 0.18); }
.shadow-month-nav { box-shadow: 0 2px 12px rgba(91, 79, 207, 0.08); }
.shadow-modal { box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25); }
.shadow-sm-soft { box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06); }
.shadow-md-soft { box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); }

.text-gray-700 {
  --tw-text-opacity: 1;
  background-color: #edeffa;
  padding: 10px;
  border-radius: 5px;
  color: rgb(55 65 81 / var(--tw-text-opacity, 1));
}

/* ============================================================
   САЙДБАР
   ============================================================ */
.sidebar-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding: 0 20px;
  margin-top: 80px;
}

.menu-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 6px 6px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  background: transparent;
  text-decoration: none;
  position: relative;
}

.menu-icon-wrap {
  width: 45px;
  height: 45px;
  border-radius: 6px;
  background: #edeffa;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  transition: all 0.2s;
}
.menu-icon-wrap svg {
  width: 23px;
  height: 36px;
  stroke: #8a8aa8;
  stroke-width: 1.8;
  fill: none;
  transition: stroke 0.2s;
}

.menu-label {
  font-size: 12px;
  font-weight: 500;
  color: #8a8aa8;
  text-align: center;
  transition: color 0.2s;
}

.menu-item.active .menu-icon-wrap {
  background: #5b4fcf;
  box-shadow: 0 4px 12px rgba(91, 79, 207, 0.3);
}
.menu-item.active .menu-icon-wrap svg { stroke: white; }
.menu-item.active .menu-label { color: #1a1a2e; font-weight: 600; }

.menu-item:hover .menu-icon-wrap {
  background: #5b4fcf;
  box-shadow: 0 4px 12px rgba(91, 79, 207, 0.3);
}
.menu-item:hover .menu-icon-wrap svg { stroke: white; }
.menu-item:hover .menu-label { color: #1a1a2e; font-weight: 600; }

.paid-amount-badge {
  position: absolute;
  top: 2px;
  right: -5px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  font-size: 11px;
  padding: 2px 6px 1px 6px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
  white-space: nowrap;
  z-index: 10;
}

/* ============================================================
   ОСНОВНЫЕ БЛОКИ
   ============================================================ */
.calendar-main-block {
  background-color: rgb(255, 255, 255);
  box-shadow: 0px 0px 66.5px 3.5px rgba(81, 69, 158, 0.09);
}

.sidebar-divider {
  box-shadow: inset -11px -11px 20px 8px #51459e0d;
}

.main-block {
  background-color: rgb(255, 255, 255);
  box-shadow: 0px 0px 66.5px 3.5px rgba(81, 69, 158, 0.09);
}

/* ============================================================
   ЗАГОЛОВОК ДАТЫ В ЯЧЕЙКЕ
   ============================================================ */
.date-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  padding: 0 4px;
  background-color: #edeffa;
  padding: 10px;
  border-radius: 5px;
}

.date-header.today {
  background-color: #5b4fcf;
}

.date-text {
  font-size: 12px;
  font-weight: 700;
  color: #374151;
}

.date-text.other-month {
  color: #9ca3af;
}

.date-text.today {
  color: white;
}

.day-of-week {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 600;
  background: #fcfcff;
  color: #5b4fcf;
  flex-shrink: 0;
}

.day-of-week.today {
  background: white;
  color: #5b4fcf;
}

.day-of-week.weekend {
  background: #fee2e2;
  color: #dc2626;
}

.day-of-week.other-month {
  background: #f3f4f6;
  color: #9ca3af;
}

/* ============================================================
   СКРОЛЛ-ОБЛАСТЬ КАЛЕНДАРЯ
   ============================================================ */
.calendar-header-sticky {
  position: sticky;
  top: 0;
  z-index: 20;
  background-color: rgb(255, 255, 255);
  flex-shrink: 0;
}

.calendar-scroll-area {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

.calendar-scroll-area::-webkit-scrollbar {
  width: 8px;
}
.calendar-scroll-area::-webkit-scrollbar-track {
  background: transparent;
}
.calendar-scroll-area::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 4px;
}
.calendar-scroll-area::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

/* ============================================================
   ПОДСКАЗКА "НЕТ КЛИЕНТОВ"
   ============================================================ */
.no-projects-hint {
  background: #fff8e1;
  border: 1px dashed #f5a623;
  color: #b45309;
  padding: 12px;
  border-radius: 8px;
  font-size: 13px;
  text-align: center;
  margin-top: 4px;
}
.no-projects-hint a {
  color: #5b4fcf;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

/* ============================================================
   ПОПОВЕРЫ (Дата, Время)
   ============================================================ */
.popover-trigger {
  background: #ffffff;
  border: 1.5px solid #edeffa;
  box-sizing: border-box;
  color: #1a1a2e;
  box-shadow: 0 4px 14px rgb(91 79 207 / 17%);
  padding: 14px 16px;
  border-radius: 5px;
  font-size: 14px;
  width: 100%;
  outline: none;
  transition: all 0.2s;
  font-family: 'Roboto', sans-serif;
  text-align: left;
  -webkit-appearance: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.popover-trigger:focus {
  border-color: #5b4fcf;
  box-shadow: 0 4px 14px rgb(91 79 207 / 30%);
}
.popover-trigger.placeholder {
  color: #8798ad;
}

.popover-icon {
  position: absolute;
  right: 12px;
  top: 66%;
  transform: translateY(-50%);
  pointer-events: none;
  color: #8798ad;
}

.popover-panel {
  position: fixed;
  z-index: 1000;
  background: #ffffff;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 20px 60px rgba(91, 79, 207, 0.25), 0 8px 24px rgba(91, 79, 207, 0.15);
  animation: popoverFadeIn 0.2s ease-out;
}

#datepickerPopover {
  min-width: 280px;
}

@keyframes popoverFadeIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.custom-datepicker-wrapper {
  position: relative;
}

.datepicker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.datepicker-month-label {
  font-size: 15px;
  font-weight: 700;
  color: #1a1a2e;
  cursor: pointer;
  user-select: none;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.15s;
}
.datepicker-month-label:hover {
  background: #f0edff;
}

.datepicker-nav-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: #6b7280;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.datepicker-nav-btn:hover {
  background: #f0edff;
  color: #5b4fcf;
}

.datepicker-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 8px;
}

.datepicker-weekday {
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: #9ea3b4;
  padding: 4px 0;
}

.datepicker-weekday.weekend {
  color: #dc2626;
}

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

.datepicker-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 500;
  color: #1a1a2e;
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
  position: relative;
}

.datepicker-day:hover:not(.disabled):not(.empty) {
  background: #f0edff;
}

.datepicker-day.selected {
  background: #5b4fcf !important;
  color: white !important;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(91, 79, 207, 0.4);
}

.datepicker-day.today:not(.selected) {
  background: #edeffa;
  color: #5b4fcf;
  font-weight: 700;
}

.datepicker-day.other-month {
  color: #c7c9d6;
}

.datepicker-day.weekend:not(.selected):not(.today) {
  color: #dc2626;
}

.datepicker-day.weekend.other-month {
  color: #f5c6c6;
}

.datepicker-day.disabled {
  color: #e5e7eb;
  cursor: not-allowed;
}

.datepicker-day.empty {
  cursor: default;
}

.datepicker-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #f0edff;
}

.datepicker-today-btn {
  font-size: 12px;
  color: #5b4fcf;
  font-weight: 600;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.15s;
}
.datepicker-today-btn:hover {
  background: #f0edff;
}

.datepicker-clear-btn {
  font-size: 12px;
  color: #dc2626;
  font-weight: 500;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.15s;
}
.datepicker-clear-btn:hover {
  background: #fef2f2;
}

/* ============================================================
   ТАЙМПИКЕР
   ============================================================ */
.custom-timepicker-wrapper {
  position: relative;
}

.timepicker-panel {
  min-width: 220px;
}

.timepicker-columns {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.timepicker-column {
  flex: 1;
}

.timepicker-column-title {
  font-size: 11px;
  font-weight: 600;
  color: #9ea3b4;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: center;
  margin-bottom: 8px;
}

.timepicker-scroll {
  max-height: 180px;
  overflow-y: auto;
  border-radius: 6px;
  background: #f9f9fc;
  padding: 4px;
}

.timepicker-scroll::-webkit-scrollbar {
  width: 4px;
}
.timepicker-scroll::-webkit-scrollbar-track {
  background: transparent;
}
.timepicker-scroll::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 2px;
}

.timepicker-option {
  padding: 6px 8px;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  color: #1a1a2e;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.15s;
  user-select: none;
}
.timepicker-option:hover {
  background: #f0edff;
  color: #5b4fcf;
}
.timepicker-option.selected {
  background: #5b4fcf;
  color: white;
  font-weight: 700;
}

.timepicker-option.disabled {
  color: #d1d5db !important;
  cursor: not-allowed !important;
  background: transparent !important;
}
.timepicker-option.disabled:hover {
  background: transparent !important;
  color: #d1d5db !important;
}

.timepicker-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #f0edff;
}

.timepicker-clear-btn {
  font-size: 12px;
  color: #dc2626;
  font-weight: 500;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.15s;
}
.timepicker-clear-btn:hover {
  background: #fef2f2;
}

.timepicker-apply-btn {
  font-size: 12px;
  color: #5b4fcf;
  font-weight: 600;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.15s;
}
.timepicker-apply-btn:hover {
  background: #f0edff;
}

/* ============================================================
   ПОЛЯ ДЛИТЕЛЬНОСТИ
   ============================================================ */
.duration-input {
  color: #1a1a2e;
  border-radius: 5px;
  background: #ffffff;
  border: 1.5px solid #edeffa;
  box-shadow: 0 4px 14px rgb(91 79 207 / 8%);
  padding: 14px 12px;
  font-size: 14px;
  box-sizing: border-box;
  text-align: left;
  -webkit-appearance: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  width: 100%;
  outline: none;
  transition: all 0.2s;
  font-family: 'Roboto', sans-serif;
  -moz-appearance: textfield;
}
.duration-input:focus {
  border-color: #5b4fcf;
  box-shadow: 0 4px 14px rgb(91 79 207 / 18%);
}
.duration-input::-webkit-outer-spin-button,
.duration-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.duration-input::placeholder {
  color: #8798ad;
}

.duration-input-wrapper {
  position: relative;
  flex: 1;
}

.duration-input-label {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #8798ad;
  font-size: 13px;
  font-weight: 500;
  pointer-events: none;
  user-select: none;
  line-height: 1;
}

.duration-input-wrapper .duration-input {
  padding-right: 10px !important;
}

/* ============================================================
   ВЫБОР КЛИЕНТА (dropdown)
   ============================================================ */
.custom-project-select {
  position: relative;
}

.project-select-trigger {
  border-radius: 5px;
  background: #ffffff;
  border: 1.5px solid #edeffa;
  box-shadow: 0 4px 14px rgb(91 79 207 / 8%);
  padding: 14px 16px;
  font-size: 14px;
  box-sizing: border-box;
  width: 100%;
  outline: none;
  transition: all 0.2s;
  font-family: 'Roboto', sans-serif;
  text-align: left;
  -webkit-appearance: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.project-select-trigger:focus {
  border-color: #5b4fcf;
  box-shadow: 0 4px 14px rgb(91 79 207 / 18%);
}
.project-select-trigger.placeholder {
  color: #8798ad;
}
.project-select-trigger:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.project-select-arrow {
  position: absolute;
  right: 12px;
  top: 66%;
  transform: translateY(-50%);
  pointer-events: none;
  color: #8798ad;
  transition: transform 0.2s;
}
.project-select-arrow.open {
  transform: translateY(-50%) rotate(180deg);
}

.project-dropdown {
  position: fixed;
  z-index: 1000;
  background: #ffffff;
  border-radius: 8px;
  padding: 8px;
  box-shadow: 0 20px 60px rgba(91, 79, 207, 0.25), 0 8px 24px rgba(91, 79, 207, 0.15);
  animation: dropdownFadeIn 0.2s ease-out;
  max-height: 240px;
  overflow-y: auto;
}

@keyframes dropdownFadeIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.project-dropdown::-webkit-scrollbar {
  width: 6px;
}
.project-dropdown::-webkit-scrollbar-track {
  background: transparent;
}
.project-dropdown::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 3px;
}
.project-dropdown::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

.project-option {
  padding: 10px 12px;
  border-radius: 5px;
  font-size: 14px;
  color: #1a1a2e;
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
}
.project-option:hover {
  background: #f0edff;
  color: #5b4fcf;
}
.project-option.selected {
  background: #5b4fcf;
  color: white;
  font-weight: 600;
}
.project-option.disabled {
  color: #c7c9d6;
  cursor: not-allowed;
  font-style: italic;
}
.project-option.disabled:hover {
  background: transparent;
  color: #c7c9d6;
}

/* ============================================================
   КАРТОЧКИ КЛИЕНТОВ (projects-container)
   ============================================================ */
.projects-container {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 25px;
  overflow-x: auto;
  min-height: 400px;
}

.project-card {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 2px 1px 20px 2px rgba(91, 79, 207, 0.08);
  border: 1px solid transparent;
  flex-shrink: 0;
  width: 100px;
  max-height: 320px;
  transition: width 0.4s ease, max-height 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
  overflow: hidden;
  cursor: pointer;
  position: relative;
}

.project-card:hover:not(.expanded) {
  box-shadow: 0 0 18px rgba(91, 79, 207, 0.15);
}

.project-card.expanded {
  width: 380px;
  max-height: 600px;
  box-shadow: 0 0 32px rgba(91, 79, 207, 0.15);
  border-color: rgba(91, 79, 207, 0.1);
  cursor: default;
}

.collapsed-view {
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  height: 320px;
  transition: opacity 0.3s ease;
}

.project-card.expanded .collapsed-view {
  opacity: 0;
  pointer-events: none;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
}

.expanded-view {
  padding: 28px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease 0.1s;
}

.project-card.expanded .expanded-view {
  opacity: 1;
  pointer-events: auto;
}

.project-avatar-small {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 24px;
  color: white;
  font-family: 'Georgia', serif;
  flex-shrink: 0;
}

.project-role-vertical {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 22px;
  font-weight: bolder;
  font-family: 'Gilroy Black', sans-serif;
  color: #c7c9d6;
  letter-spacing: 2px;
  text-transform: uppercase;
  flex: 1;
  display: flex;
  align-items: center;
  margin-bottom: 12px;
  justify-content: left;
  width: 100%;
}

.info-icon-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #e8e6f5;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
  cursor: pointer;
  transition: all 0.2s;
}
.info-icon-btn:hover {
  background: #ddd9f0;
  transform: scale(1.05);
}
.info-icon-btn .info-letter {
  font-family: 'Georgia', serif;
  font-weight: 700;
  font-size: 16px;
  color: #5b4fcf;
  line-height: 1;
  user-select: none;
}

.task-badge-small {
  position: absolute;
  bottom: -4px;
  right: -4px;
  background: #10b981;
  color: white;
  font-size: 10px;
  font-weight: 700;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid white;
}

.expanded-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
}

.expanded-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 24px;
  color: white;
  font-family: 'Georgia', serif;
  flex-shrink: 0;
}

.expanded-name {
  font-size: 18px;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 4px;
}
.expanded-role {
  font-size: 14px;
  color: #8a8aa8;
}

.action-buttons {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.action-btn {
  width: 36px;
  height: 36px;
  border-radius: 20px;
  margin-top: -20px;
  margin-right: -20px;
  opacity: 0.7;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  background: transparent;
}

.action-btn.delete {
  background: #fee2e2;
}
.action-btn.delete:hover {
  background: #dc2626;
  opacity: 1;
}
.action-btn.delete:hover svg {
  stroke: white;
}
.action-btn.delete svg {
  width: 18px;
  height: 18px;
  stroke: #dc2626;
  stroke-width: 2;
  fill: none;
}

.info-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
}
.info-row + .info-row {
  border-top: 1px solid #f5f5fa;
}

.info-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: #edeffa;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  transition: all 0.2s;
}
.info-icon-wrap:hover {
  background: #e0e3f5;
}
.info-icon-wrap svg {
  width: 24px;
  height: 24px;
  stroke: #9ea3b4;
  stroke-width: 1.8;
  fill: none;
}

.info-text {
  flex: 1;
  min-width: 0;
}
.info-value {
  font-size: 15px;
  font-weight: 600;
  color: #1a1a2e;
  margin-bottom: 2px;
  word-break: break-word;
  white-space: pre-wrap;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.2s;
  border: 1px solid transparent;
}
.info-value:hover {
  background: #f5f5fa;
  border-color: #e0e3f5;
}
.info-value.editing {
  display: none;
}
.info-label {
  font-size: 13px;
  color: #8a8aa8;
  padding: 0px 8px;
}

.inline-edit-input {
  width: 100%;
  padding: 6px 10px;
  border: 1px solid #5b4fcf;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  font-family: 'Roboto', sans-serif;
  outline: none;
  background: #ffffff;
  color: #1a1a2e;
  box-shadow: 0 0 0 3px rgba(91, 79, 207, 0.1);
}

.inline-edit-textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #5b4fcf;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  font-family: 'Roboto', sans-serif;
  outline: none;
  background: #ffffff;
  color: #1a1a2e;
  box-shadow: 0 0 0 3px rgba(91, 79, 207, 0.1);
  resize: vertical;
  min-height: 60px;
  margin-bottom: 2px;
}

.access-hidden {
  font-size: 13px;
  color: #c7c9d6;
  font-style: italic;
  margin-bottom: 2px;
  padding: 0px 8px;
}

.color-option {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid transparent;
  transition: all 0.2s;
}
.color-option:hover { transform: scale(1.1); }
.color-option.selected {
  border-color: #1a1a2e;
  transform: scale(1.1);
}

.icon-preview {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 20px;
  color: white;
  font-family: 'Georgia', serif;
  font-style: italic;
  box-shadow: 0 4px 14px rgb(91 79 207 / 17%);
  flex-shrink: 0;
  transition: all 0.2s;
}

/* ============================================================
   ПОИСК (НОВОЕ)
   ============================================================ */
.search-input-wrapper {
  position: relative;
  flex: 1;
}

.search-input-wrapper input {
  padding-left: 40px !important;
}

.search-input-wrapper svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: #9ea3b4;
  transition: color 0.2s;
}

.search-input-wrapper input:focus + svg,
.search-input-wrapper input:not(:placeholder-shown) + svg {
  color: #5b4fcf;
}

/* ============================================================
   КНОПКИ ЭКСПОРТА (НОВОЕ)
   ============================================================ */
.export-btn {
  font-size: 12px;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
}

.export-btn.csv {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
}
.export-btn.csv:hover {
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
  transform: translateY(-1px);
}

.export-btn.json {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25);
}
.export-btn.json:hover {
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
  transform: translateY(-1px);
}

/* ============================================================
   КНОПКА ВЫХОДА (НОВОЕ)
   ============================================================ */
.logout-btn {
  background: #f3f4f6;
  color: #6b7280;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  font-size: 12px;
}
.logout-btn:hover {
  background: #fee2e2;
  color: #dc2626;
}

/* ============================================================
   КУРСОРЫ (агрессивное правило)
   ============================================================ */
button,
button *,
button[type="button"],
button[type="submit"],
button[type="reset"],
input[type="button"],
input[type="submit"],
a[href],
[onclick],
[role="button"],
.view-btn,
.month-tab,
.month-arrow,
.datepicker-day:not(.empty):not(.disabled),
.datepicker-nav-btn,
.datepicker-today-btn,
.datepicker-clear-btn,
.timepicker-option:not(.disabled),
.timepicker-clear-btn,
.timepicker-apply-btn,
.project-option:not(.disabled),
.project-select-trigger:not(:disabled),
.popover-trigger,
.info-value,
.info-icon-wrap,
.info-icon-btn,
.action-btn,
.color-option,
.menu-item,
.task-block,
.task-wrapper,
.project-card:not(.expanded),
.collapsed-view,
.export-btn,
.logout-btn {
  cursor: pointer !important;
}

button:hover,
button *:hover,
button[type="button"]:hover,
button[type="submit"]:hover,
button[type="reset"]:hover,
input[type="button"]:hover,
input[type="submit"]:hover,
a[href]:hover,
[onclick]:hover,
[role="button"]:hover {
  cursor: pointer !important;
}

/* ============================================================
   АДАПТИВНОСТЬ
   ============================================================ */
@media (max-width: 1024px) {
  .sidebar-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .cal-cell {
    min-height: 400px;
  }
}

@media (max-width: 768px) {
  .projects-container {
    flex-direction: column;
    align-items: stretch;
  }
  
  .project-card {
    width: 100% !important;
    max-height: none !important;
  }
  
  .project-card.expanded {
    width: 100% !important;
  }
}