/* ═══════════════════════════════════════════
   SCHEDULE CALENDAR (Gantt-style)
═══════════════════════════════════════════ */
.sched-page-layout {
  display: grid; grid-template-columns: 1fr 280px;
  gap: 20px; align-items: start;
}
.sched-cal {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); overflow: hidden;
}
.sched-header {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.sched-title {
  font-family: var(--font-display); font-size: 17px;
  font-weight: 600; color: var(--text-1);
}
.sched-nav { display: flex; align-items: center; gap: 4px; margin-left: 8px; }
.sched-nav-btn {
  width: 30px; height: 30px; border-radius: var(--r-sm);
  border: 1px solid var(--border); background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-2); cursor: pointer; transition: all 0.12s;
  text-decoration: none; font-size: 13px;
}
.sched-nav-btn:hover { background: var(--surface-hi); color: var(--text-1); }
.sched-range {
  font-family: var(--font-mono); font-size: 12px;
  color: var(--text-2); letter-spacing: 0.02em;
}
.sched-header-actions { margin-left: auto; display: flex; gap: 8px; }

.sched-days {
  display: grid; grid-template-columns: repeat(7, 1fr);
  border-bottom: 1px solid var(--border);
}
.sched-day-cell {
  padding: 12px 14px; text-align: center;
  border-right: 1px solid var(--border-lo);
}
.sched-day-cell:last-child { border-right: none; }
.sched-day-cell.today {
  background: var(--brass-soft);
}
.sched-dow {
  font-family: var(--font-mono); font-size: 9.5px;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--text-3); margin-bottom: 2px;
}
.sched-day-cell.today .sched-dow { color: var(--brass); }
.sched-day-num {
  font-family: var(--font-display); font-size: 22px;
  font-weight: 600; color: var(--text-1); line-height: 1;
}
.sched-day-cell.today .sched-day-num { color: var(--brass); }

.sched-body {
  position: relative; min-height: 120px;
  padding: 12px 0;
}
.sched-grid {
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 4px 0; padding: 0 10px;
}
.sched-grid-lines {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  display: grid; grid-template-columns: repeat(7, 1fr);
  pointer-events: none;
}
.sched-grid-line {
  border-right: 1px solid var(--border-lo);
}
.sched-grid-line:last-child { border-right: none; }
.sched-grid-line.today-col {
  background: var(--brass-soft);
  opacity: 0.35;
}

.sched-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: var(--r-sm);
  border-left: 3px solid; cursor: pointer;
  transition: box-shadow 0.12s, transform 0.12s;
  text-decoration: none; color: inherit;
  min-height: 38px; margin: 2px 6px;
  animation: risein 0.3s ease both;
}
.sched-bar:hover {
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
  transform: translateY(-1px);
}
.sched-bar-body { flex: 1; min-width: 0; }
.sched-bar-name {
  font-size: 12.5px; font-weight: 600; color: var(--text-1);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sched-bar-detail {
  font-size: 10.5px; color: var(--text-2); margin-top: 1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sched-bar-meta { flex-shrink: 0; display: flex; align-items: center; gap: 6px; }

.sched-blocked {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: var(--r-sm);
  margin: 2px 6px; min-height: 32px;
  background: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 4px,
    rgba(154,171,184,0.12) 4px,
    rgba(154,171,184,0.12) 8px
  );
  border: 1px dashed var(--border);
  font-size: 11px; color: var(--text-3);
}
.sched-blocked-label { font-weight: 500; }

.sched-legend {
  display: flex; align-items: center; gap: 16px;
  padding: 12px 20px; border-top: 1px solid var(--border-lo);
  background: var(--surface-lo);
}
.sched-legend-item {
  display: flex; align-items: center; gap: 5px;
  font-size: 11.5px; color: var(--text-2);
}
.sched-legend-count {
  margin-left: auto;
  font-family: var(--font-mono); font-size: 11px; color: var(--text-3);
}

.sched-empty {
  display: flex; align-items: center; justify-content: center;
  padding: 48px 24px; color: var(--text-3); font-size: 13px;
  grid-column: 1 / -1;
}

/* ═══════════════════════════════════════════
   SALES CALENDAR (Time-slot grid)
═══════════════════════════════════════════ */
.sales-time-grid {
  display: grid;
  grid-template-columns: 60px repeat(7, 1fr);
}
.sales-time-corner {
  background: var(--surface-lo);
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border-lo);
}
.sales-time-label {
  font-family: var(--font-mono); font-size: 9px;
  color: var(--text-3); text-align: right;
  padding: 6px 6px 0 4px;
  border-right: 1px solid var(--border-lo);
  border-bottom: 1px solid var(--border-lo);
  white-space: nowrap; line-height: 1;
}
.sales-time-cell {
  min-height: 52px; padding: 2px 3px;
  border-right: 1px solid var(--border-lo);
  border-bottom: 1px solid var(--border-lo);
  position: relative;
}
.sales-time-cell:last-child { border-right: none; }
.sales-time-cell.today-col { background: var(--brass-soft); opacity: 1; }

.sales-appt {
  display: flex; align-items: center; gap: 5px;
  padding: 3px 6px; border-radius: 3px;
  border-left: 3px solid;
  text-decoration: none; color: inherit;
  transition: box-shadow 0.12s;
  cursor: pointer; margin-bottom: 1px;
  line-height: 1.2;
}
.sales-appt:hover {
  box-shadow: 0 1px 6px rgba(0,0,0,0.12);
}
.sales-appt-body { flex: 1; min-width: 0; overflow: hidden; }
.sales-appt-name {
  font-size: 11px; font-weight: 600; color: var(--text-1);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sales-appt-detail {
  font-size: 9px; color: var(--text-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Schedule sidebar (dashboard) */
.sched-list { display: flex; flex-direction: column; gap: 10px; }
.sched-item { display: flex; gap: 11px; align-items: flex-start; }
.sched-dt   { display: flex; flex-direction: column; align-items: center; width: 34px; flex-shrink: 0; }
.sched-day  { font-family: var(--font-mono); font-size: 17px; font-weight: 500; color: var(--text-1); line-height: 1; }
.sched-dow  { font-family: var(--font-mono); font-size: 9px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-3); }
.sched-card { flex: 1; background: var(--surface-hi); border-radius: var(--r-sm); padding: 9px 11px; border-left: 3px solid; }
.sched-job  { font-size: 12.5px; font-weight: 600; color: var(--text-1); }
.sched-addr { font-size: 11px; color: var(--text-2); margin-top: 2px; }
.sched-crew { display: flex; align-items: center; gap: 4px; font-size: 11px; color: var(--text-3); margin-top: 5px; }
