/* ── Panel label (used in meeting prep) ──── */
.panel-label {
  font-family: var(--font-sans);
  font-size: var(--text-md);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

/* ── Calendar week view ───────────────────── */
.cal-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--border-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: var(--space-xl);
}

.cal-day {
  background: var(--surface-0);
  min-height: 200px;
  display: flex;
  flex-direction: column;
}

.cal-day.today {
  background: var(--surface-1);
}

.cal-day-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) var(--space-sm);
  border-bottom: 1px solid var(--border-subtle);
}

.cal-day-name {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.cal-day-num {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.cal-day-num.active {
  background: var(--accent);
  color: var(--black);
  font-weight: 600;
}

.cal-day-events {
  flex: 1;
  padding: var(--space-xs);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  overflow-y: auto;
}

.cal-event {
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  padding: var(--space-xs) var(--space-sm);
  border-left: 2px solid var(--text-ghost);
  cursor: default;
  transition: border-color var(--duration-fast);
}

.cal-event.has-prep {
  border-left-color: var(--accent);
  cursor: pointer;
}

.cal-event.has-prep:hover {
  background: var(--surface-3);
}

.cal-event-time {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
}

.cal-event-title {
  font-size: var(--text-xs);
  color: var(--text-primary);
  font-weight: 500;
  margin-top: 1px;
}

.cal-event-loc {
  font-size: 10px;
  color: var(--text-ghost);
  margin-top: 1px;
}

.cal-event-footer {
  display: flex;
  gap: var(--space-xs);
  align-items: center;
  margin-top: 3px;
}

.cal-account-tag {
  font-family: var(--font-mono);
  font-size: 9px;
  padding: 1px 4px;
  border-radius: 2px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cal-account-tag.work { background: var(--cyan-dim); color: var(--cyan); }
.cal-account-tag.personal { background: var(--surface-3); color: var(--text-ghost); }

.cal-attendee-count {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-ghost);
}

.cal-empty {
  font-size: var(--text-xs);
  color: var(--text-ghost);
  text-align: center;
  padding: var(--space-lg) 0;
}

/* ── Meeting prep panel ───────────────────── */
.prep-panel {
  background: var(--surface-1);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-bottom: var(--space-xl);
  animation: fade-in var(--duration-normal) var(--ease-out);
}

.prep-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
}

.prep-event-title {
  font-family: var(--font-sans);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text-primary);
}

.prep-event-time {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-top: var(--space-xs);
  margin-bottom: var(--space-md);
}

.prep-description {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
  padding: var(--space-sm);
  background: var(--surface-0);
  border-radius: var(--radius-sm);
  white-space: pre-wrap;
}

.prep-section {
  margin-top: var(--space-lg);
}

.prep-section-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
  padding-bottom: var(--space-xs);
  border-bottom: 1px solid var(--border-subtle);
}

.prep-attendee {
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--border-subtle);
}

.prep-attendee:last-child { border-bottom: none; }

.prep-attendee-name {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-primary);
}

.prep-attendee-detail {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  margin-top: 2px;
}

.prep-attendee-notes {
  font-size: var(--text-xs);
  color: var(--text-ghost);
  margin-top: 2px;
  font-style: italic;
}

.prep-prospect-tag {
  display: flex;
  gap: var(--space-xs);
  margin-top: 4px;
}

.prep-prospect-stage {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 3px;
  background: var(--accent-glow);
  color: var(--accent);
}

.prep-prospect-temp {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 3px;
  background: var(--surface-3);
  color: var(--text-secondary);
}

.prep-email {
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--border-subtle);
}

.prep-email:last-child { border-bottom: none; }

.prep-email-subject {
  font-size: var(--text-sm);
  color: var(--text-primary);
  font-weight: 500;
}

.prep-email-meta {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-ghost);
  margin-top: 2px;
}

.prep-email-snippet {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: 2px;
}

.prep-loading {
  text-align: center;
  padding: var(--space-lg);
}

/* ── Wide modal for calendar ──────────────── */
.modal-wide {
  width: min(1200px, 95vw);
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow-elevated);
  max-height: 85vh;
  overflow-y: auto;
}

/* ── Calendar — Responsive ───────────────── */
@media (max-width: 1000px) {
  .cal-week {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .cal-week {
    grid-template-columns: 1fr;
  }
  .cal-day {
    min-height: 100px;
  }
}
