/* ============================================
   SCHEDULER (TERMINPLANER) STYLES
   ============================================ */

.scheduler-container { max-width: 100%; }

/* Header */
.scheduler-header {
  background: white;
  border-radius: 16px;
  padding: 20px 24px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.scheduler-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

/* Stats Bar */
.scheduler-stats-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.scheduler-stat-card {
  background: #f9fafb;
  border-radius: 12px;
  padding: 12px 20px;
  text-align: center;
  min-width: 90px;
  flex-shrink: 0;
}

.scheduler-stat-number { font-size: 1.5rem; font-weight: 700; }
.scheduler-stat-label { font-size: 0.7rem; color: #9ca3af; text-transform: uppercase; letter-spacing: 0.05em; margin-top: 2px; }

/* Navigation */
.scheduler-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.scheduler-nav-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.scheduler-nav-btn {
  background: #f3f4f6;
  border: none;
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 0.875rem;
  color: #374151;
  transition: all 0.15s;
}

.scheduler-nav-btn:hover { background: #e5e7eb; }

.scheduler-today-btn {
  background: var(--fc-primary, #1e3c3c);
  color: white;
  font-weight: 600;
}

.scheduler-today-btn:hover { opacity: 0.9; background: var(--fc-primary, #1e3c3c); }

.scheduler-date-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1f2937;
  margin-left: 8px;
}

.scheduler-view-toggle {
  display: flex;
  background: #f3f4f6;
  border-radius: 10px;
  padding: 3px;
}

.scheduler-view-btn {
  border: none;
  background: transparent;
  padding: 6px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #6b7280;
  transition: all 0.15s;
}

.scheduler-view-btn.active {
  background: white;
  color: var(--fc-primary, #1e3c3c);
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
  font-weight: 600;
}

/* Buttons */
.scheduler-btn-primary {
  background: var(--fc-primary, #1e3c3c);
  color: white;
  border: none;
  border-radius: 10px;
  padding: 10px 20px;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s;
}
.scheduler-btn-primary:hover { opacity: 0.9; transform: translateY(-1px); }

.scheduler-btn-outline {
  background: white;
  color: var(--fc-primary, #1e3c3c);
  border: 1.5px solid #d1d5db;
  border-radius: 10px;
  padding: 10px 20px;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s;
}
.scheduler-btn-outline:hover { background: #f9fafb; border-color: #9ca3af; }

.scheduler-btn-danger {
  background: #fef2f2;
  color: #dc2626;
  border: 1.5px solid #fecaca;
  border-radius: 10px;
  padding: 10px 20px;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.scheduler-btn-danger:hover { background: #fee2e2; }

/* ==========================================
   MONTH VIEW
   ========================================== */
.month-grid {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.month-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: var(--fc-primary, #1e3c3c);
}

.month-header-cell {
  padding: 10px;
  text-align: center;
  font-weight: 600;
  font-size: 0.8rem;
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.month-header-cell.weekend { opacity: 0.7; }

.month-body { padding: 2px; }

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

.month-cell {
  min-height: 100px;
  padding: 6px;
  background: #fff;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s;
  position: relative;
}

.month-cell:hover { background: #f9fafb; }
.month-cell.today { background: #f0fdf4; box-shadow: inset 0 0 0 2px #10b981; }
.month-cell.other-month { background: #f9fafb; opacity: 0.5; }
.month-cell.weekend { background: #fafafa; }

.month-cell-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.month-cell-day {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #374151;
}

.today-badge {
  background: #10b981;
  color: white !important;
  border-radius: 50%;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
}

.month-cell-count {
  background: var(--fc-primary, #1e3c3c);
  color: white;
  border-radius: 10px;
  padding: 1px 7px;
  font-size: 0.65rem;
  font-weight: 700;
}

.month-cell-events { display: flex; flex-direction: column; gap: 2px; }

.month-event-pill {
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.65rem;
  cursor: pointer;
  display: flex;
  gap: 4px;
  align-items: center;
  transition: opacity 0.15s;
  overflow: hidden;
  white-space: nowrap;
}

.month-event-pill:hover { opacity: 0.8; }

.month-event-time { font-weight: 700; font-size: 0.6rem; }
.month-event-title { overflow: hidden; text-overflow: ellipsis; }

.month-event-more {
  font-size: 0.65rem;
  color: #6b7280;
  padding: 1px 6px;
  cursor: pointer;
  font-weight: 500;
}

.month-event-more:hover { color: var(--fc-primary, #1e3c3c); }

/* ==========================================
   WEEK VIEW
   ========================================== */
.week-grid {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.week-header {
  display: grid;
  grid-template-columns: 60px repeat(7, 1fr);
  background: var(--fc-primary, #1e3c3c);
}

.week-time-gutter {
  padding: 8px;
  font-size: 0.7rem;
  color: #9ca3af;
  text-align: right;
  width: 60px;
  flex-shrink: 0;
}

.week-header .week-time-gutter { color: transparent; }

.week-header-cell {
  padding: 10px 6px;
  text-align: center;
  color: white;
}

.week-header-cell.today { background: rgba(255,255,255,0.15); }

.week-day-name {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.8;
}

.week-day-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  margin-top: 2px;
}

.week-header-cell.today .week-day-number { background: white; color: var(--fc-primary, #1e3c3c); }

.week-body { max-height: 600px; overflow-y: auto; }

.week-row {
  display: grid;
  grid-template-columns: 60px repeat(7, 1fr);
  border-top: 1px solid #f3f4f6;
}

.week-cell {
  min-height: 60px;
  border-left: 1px solid #f3f4f6;
  position: relative;
  padding: 2px;
  cursor: pointer;
  transition: background 0.1s;
}

.week-cell:hover { background: #f9fafb; }
.week-cell.today { background: #f0fdf4; }
.week-cell.weekend { background: #fafafa; }

.week-event {
  position: absolute;
  left: 2px;
  right: 2px;
  padding: 3px 6px;
  border-radius: 6px;
  color: white;
  font-size: 0.65rem;
  cursor: pointer;
  overflow: hidden;
  z-index: 1;
  transition: transform 0.1s;
}

.week-event:hover { transform: scale(1.02); z-index: 5; }

.week-event-time { font-weight: 700; }
.week-event-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.week-event-sub { opacity: 0.8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ==========================================
   DAY VIEW
   ========================================== */
.day-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 16px;
  min-height: 500px;
}

.day-sidebar {
  background: white;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.day-summary h3 { color: var(--fc-primary, #1e3c3c); }

.day-upcoming-list { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }

.day-upcoming-item {
  display: flex;
  gap: 10px;
  padding: 10px;
  background: #f9fafb;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s;
}

.day-upcoming-item:hover { background: #f3f4f6; transform: translateX(4px); }

.day-upcoming-dot {
  width: 4px;
  border-radius: 4px;
  flex-shrink: 0;
}

.day-upcoming-time { font-size: 0.7rem; color: #9ca3af; font-weight: 600; }
.day-upcoming-title { font-size: 0.8125rem; font-weight: 600; color: #374151; }
.day-upcoming-sub { font-size: 0.7rem; color: #9ca3af; display: flex; align-items: center; gap: 4px; }

.day-timeline {
  background: white;
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  overflow: hidden;
}

.day-hour-row {
  display: grid;
  grid-template-columns: 60px 1fr;
  min-height: 70px;
  border-bottom: 1px solid #f3f4f6;
  position: relative;
}

.day-hour-row.current-hour { background: #f0fdf430; }

.day-hour-label {
  padding: 8px;
  font-size: 0.7rem;
  color: #9ca3af;
  text-align: right;
  font-weight: 500;
}

.day-hour-content {
  padding: 4px 8px;
  cursor: pointer;
  position: relative;
  min-height: 70px;
}

.day-hour-content:hover { background: #f9fafb; }

.day-now-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: #ef4444;
  z-index: 10;
}

.day-now-line::before {
  content: '';
  position: absolute;
  left: -4px;
  top: -4px;
  width: 10px;
  height: 10px;
  background: #ef4444;
  border-radius: 50%;
}

.day-event-block {
  padding: 10px 14px;
  border-radius: 10px;
  margin-bottom: 4px;
  cursor: pointer;
  transition: all 0.15s;
}

.day-event-block:hover { transform: translateX(4px); }

.day-event-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.day-event-type { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; }

.day-event-badge {
  font-size: 0.6rem;
  padding: 2px 8px;
  border-radius: 10px;
  color: white;
  font-weight: 600;
}

.day-event-title { font-size: 0.9375rem; font-weight: 700; color: #1f2937; margin-bottom: 4px; }

.day-event-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.75rem;
  color: #6b7280;
}

.day-event-meta span { display: inline-flex; align-items: center; gap: 4px; }

/* ==========================================
   MODAL
   ========================================== */
.scheduler-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
  animation: fadeIn 0.2s;
}

.scheduler-modal {
  background: white;
  border-radius: 20px;
  max-width: 640px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px rgba(0,0,0,0.15);
  animation: slideUp 0.25s;
}

.scheduler-modal-header {
  padding: 18px 24px;
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 20px 20px 0 0;
}

.scheduler-modal-header h2 {
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.scheduler-modal-close {
  background: rgba(255,255,255,0.2);
  border: none;
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.scheduler-modal-close:hover { background: rgba(255,255,255,0.35); }

.scheduler-modal-body { padding: 20px 24px; }

.scheduler-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.scheduler-form-group { display: flex; flex-direction: column; gap: 4px; }
.scheduler-form-group.full-width { grid-column: 1 / -1; }

.scheduler-form-group label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.scheduler-input {
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.875rem;
  transition: all 0.15s;
  outline: none;
  width: 100%;
  box-sizing: border-box;
}

.scheduler-input:focus { border-color: var(--fc-primary, #1e3c3c); box-shadow: 0 0 0 3px rgba(30,60,60,0.1); }

.scheduler-modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-top: 1px solid #f3f4f6;
}

/* Loading */
.scheduler-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: #9ca3af;
  font-size: 0.875rem;
}

/* AI Suggestion */
.ai-suggestion-card {
  background: #f9fafb;
  border: 1.5px solid #e5e7eb;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.15s;
}

.ai-suggestion-card:hover {
  border-color: var(--fc-accent, #ff6101);
  background: white;
  box-shadow: 0 2px 8px rgba(255,97,1,0.1);
}

/* Animations */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* Responsive */
@media (max-width: 768px) {
  .scheduler-title-row { flex-direction: column; gap: 12px; }
  .scheduler-nav { flex-direction: column; gap: 8px; }
  .scheduler-stats-bar { flex-wrap: nowrap; }
  .scheduler-form-grid { grid-template-columns: 1fr; }
  .day-grid { grid-template-columns: 1fr; }
  .month-cell { min-height: 60px; }
  .month-event-pill { font-size: 0.55rem; }
}
