/* PR149 — Smart Calendar CSS */

/* ── Top bar ────────────────────────────────────────────── */
.vc-topbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  z-index: 100;
}
.vc-zoom-pills {
  display: flex;
  gap: 4px;
}
.vc-zoom-pill {
  padding: 5px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  background: #f8fafc;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.vc-zoom-pill.active {
  background: #0f766e;
  color: #fff;
  border-color: #0f766e;
}
.vc-nav-btn {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 14px;
  cursor: pointer;
  color: #334155;
  line-height: 1;
}
.vc-nav-btn:active { background: #e2e8f0; }
.vc-today-btn {
  background: #fff;
  border: 1px solid #0f766e;
  color: #0f766e;
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.vc-date-label {
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  flex: 1;
  text-align: center;
}
.vc-jump-btn {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 5px 8px;
  font-size: 12px;
  cursor: pointer;
  color: #475569;
}

/* ── Alerts banner ─────────────────────────────────────── */
.vc-alerts-banner {
  background: #fffbeb;
  border-bottom: 1px solid #fde68a;
  padding: 0;
}
.vc-alert-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  font-size: 13px;
  color: #78350f;
  border-bottom: 1px solid #fde68a;
}
.vc-alert-item:last-child { border-bottom: none; }
.vc-alert-dismiss {
  margin-left: auto;
  background: none;
  border: none;
  font-size: 15px;
  color: #92400e;
  cursor: pointer;
  line-height: 1;
  padding: 2px 4px;
}

/* ── Calendar grid ─────────────────────────────────────── */
.vc-grid-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.vc-grid {
  display: grid;
  min-width: 320px;
  border-top: 1px solid #e2e8f0;
}
/* Header row */
.vc-header-row {
  display: contents;
}
.vc-header-cell {
  background: #f8fafc;
  border-right: 1px solid #e2e8f0;
  border-bottom: 1px solid #cbd5e1;
  padding: 8px 6px 6px;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: #475569;
  position: sticky;
  top: 0;
  z-index: 10;
}
.vc-header-cell.today-col {
  background: #f0fdf4;
  color: #0f766e;
}
.vc-header-date {
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1;
}
.vc-header-cell.today-col .vc-header-date {
  color: #0f766e;
}
/* Crew label */
.vc-crew-label {
  background: #f1f5f9;
  border-right: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  padding: 8px 8px;
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 80px;
}
/* Capacity badge */
.vc-cap-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 5px;
  border-radius: 4px;
  display: inline-block;
  margin-top: 2px;
}
.vc-cap-green { background: #dcfce7; color: #166534; }
.vc-cap-yellow { background: #fef9c3; color: #854d0e; }
.vc-cap-red    { background: #fee2e2; color: #991b1b; }

/* Job cell */
.vc-day-cell {
  border-right: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  padding: 4px;
  min-height: 80px;
  vertical-align: top;
  position: relative;
  background: #fff;
}
.vc-day-cell.weekend-col { background: #f8fafc; }
.vc-day-cell.today-col   { background: #f0fdf4; }
.vc-day-cell.drop-target-active { background: #dbeafe; outline: 2px dashed #3b82f6; }

/* Job block */
.vc-job-block {
  border-radius: 6px;
  padding: 5px 7px 5px 5px;
  margin-bottom: 3px;
  font-size: 11px;
  line-height: 1.35;
  cursor: grab;
  position: relative;
  border-left: 3px solid transparent;
  user-select: none;
  overflow: hidden;
}
.vc-job-block:active { cursor: grabbing; }
.vc-job-block.dragging { opacity: 0.5; }
.vc-job-block .jb-title { font-weight: 700; color: #0f172a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vc-job-block .jb-time  { color: #64748b; font-size: 10px; }
.vc-job-block .jb-night { font-size: 10px; }
/* Status dot */
.vc-job-block .jb-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.jb-dot-scheduled  { background: #94a3b8; }
.jb-dot-inprogress { background: #f59e0b; }
.jb-dot-complete   { background: #22c55e; }
.jb-dot-cancelled  { background: #ef4444; }
/* Priority borders */
.jb-priority-normal    { border-left-color: #22c55e; }
.jb-priority-urgent    { border-left-color: #f59e0b; }
.jb-priority-emergency { border-left-color: #ef4444; }
/* Night shift shading */
.vc-job-block.night-shift { filter: brightness(0.78); }

/* Quarter view */
.vc-quarter-week-cell {
  border-right: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  padding: 6px;
  cursor: pointer;
  background: #fff;
  transition: background 0.12s;
}
.vc-quarter-week-cell:hover { background: #f0fdf4; }
.vc-quarter-cap-bar {
  height: 6px;
  border-radius: 3px;
  background: #e2e8f0;
  margin-top: 4px;
  overflow: hidden;
}
.vc-quarter-cap-fill {
  height: 100%;
  border-radius: 3px;
}
.vc-quarter-job-badge {
  display: inline-block;
  background: #0f766e;
  color: #fff;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  margin-top: 3px;
}

/* Month view: thin colored bars */
.vc-month-bar {
  border-radius: 3px;
  height: 14px;
  margin-bottom: 2px;
  padding: 0 4px;
  font-size: 9px;
  line-height: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(0,0,0,0.75);
  font-weight: 600;
}

/* Date picker modal */
.vc-datepicker-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 10030;
  display: flex;
  align-items: center;
  justify-content: center;
}
.vc-datepicker-box {
  background: #fff;
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  max-width: 320px;
  width: 90vw;
}
.vc-datepicker-box input[type=date] {
  width: 100%;
  font-size: 15px;
  padding: 8px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  margin: 10px 0;
}
.vc-datepicker-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}
.vc-datepicker-ok {
  background: #0f766e;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.vc-datepicker-cancel {
  background: #f1f5f9;
  color: #475569;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 13px;
  cursor: pointer;
}
