/* ── Calendar ── */
.cal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }

.cal-header h3 {
  font-family: 'Roboto Slab', serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0;
}

.cal-nav { display: flex; gap: 6px; }

.cal-nav button {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-2);
  width: 30px; height: 30px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  transition: all 0.15s;
}

.cal-nav button:hover { border-color: var(--accent); color: var(--accent); }

.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }

.cal-day-name {
  text-align: center;
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 8px 0;
}

.cal-day {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 6px 6px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  color: var(--text-3);
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
  min-height: 88px;
}

.cal-day.current-month {
  color: var(--text-2);
  border: 1px solid var(--border);
  background: var(--surface);
}

.cal-day.today {
  background: var(--accent-bg);
  border: 1px solid var(--accent-border);
}
.cal-day.today .cal-day-num {
  color: var(--accent);
  font-weight: 700;
}

.cal-day.selected { background: var(--navy); }
.cal-day.selected .cal-day-num { color: #fff; }
.cal-day:hover          { background: var(--surface-2); }
.cal-day.selected:hover { background: var(--navy); }

/* task chips replace the old ::after dot */
.cal-task-chips { width: 100%; margin-top: 4px; display: flex; flex-direction: column; gap: 2px; }

.cal-task-chip {
  width: 100%;
  font-size: 0.58rem;
  font-weight: 600;
  line-height: 1.3;
  padding: 2px 4px;
  border-radius: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cal-task-chip.p-high   { background: #fde8e8; color: #c0392b; }
.cal-task-chip.p-medium { background: var(--accent-bg); color: var(--accent); }
.cal-task-chip.p-low    { background: var(--surface-2); color: var(--text-3); }

.cal-task-more {
  font-size: 0.57rem;
  font-weight: 700;
  color: var(--text-3);
  padding: 1px 4px;
}

/* selected day: invert chip colors so they're readable on navy */
.cal-day.selected .cal-task-chip       { background: rgba(255,255,255,0.2); color: #fff; }
.cal-day.selected .cal-task-more       { color: rgba(255,255,255,0.6); }

.cal-day-num {
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1;
  align-self: flex-end;
  width: 100%;
  text-align: right;
  padding-right: 2px;
}

/* Work mode dots (top-right corner of each calendar day) */
.cal-day.mode-wfh::before,
.cal-day.mode-office::before {
  content: '';
  width: 4px; height: 4px;
  border-radius: 50%;
  position: absolute;
  top: 5px; right: 5px;
}

.cal-day.mode-wfh::before    { background: var(--accent); }
.cal-day.mode-office::before { background: var(--green); }

/* ── Schedule ── */
.schedule-section-title {
  font-family: 'Roboto Slab', serif;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1.5px solid var(--border);
}

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

.schedule-day-col {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 10px;
  box-shadow: var(--shadow);
  min-height: 148px;
}

.schedule-day-col.today-col {
  border-top: 3px solid var(--accent);
  border-color: var(--accent-border);
}

.schedule-day-col.off-col { background: var(--surface-2); }

.schedule-day-name {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-3);
  margin-bottom: 4px;
}

.schedule-day-date {
  font-family: 'Roboto Slab', serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 10px;
  line-height: 1;
}

.schedule-day-col.today-col .schedule-day-date { color: var(--accent); }

.schedule-hours { font-size: 0.68rem; color: var(--text-3); margin: 4px 0 8px; }

/* ── Schedule weekly card task list ── */
.sch-task-list  { margin-top: 6px; display: flex; flex-direction: column; gap: 4px; }

.sch-no-tasks {
  font-size: 0.68rem;
  color: var(--text-3);
  padding: 4px 0;
}

.sch-task {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 0.68rem;
  color: var(--text-2);
  cursor: pointer;
  line-height: 1.35;
  padding: 2px 0;
}

.sch-task:hover { color: var(--navy); }
.sch-task.sch-task-done .sch-task-title { text-decoration: line-through; opacity: 0.5; }

.sch-task-dot {
  flex-shrink: 0;
  width: 7px; height: 7px;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
  margin-top: 3px;
  transition: background 0.15s;
}
.sch-task-dot.done { background: var(--accent); border-color: var(--accent); }

/* ── Schedule Table ── */
.schedule-table { width: 100%; border-collapse: collapse; font-size: 0.83rem; }

.schedule-table th {
  text-align: left;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-3);
  padding: 10px 14px;
  border-bottom: 2px solid var(--border);
}

.schedule-table td { padding: 9px 14px; border-bottom: 1px solid var(--border); color: var(--text-2); }

.schedule-table tr.today-row td  { background: var(--accent-bg); }
.schedule-table tr.off-row td    { background: var(--surface-2); }
.schedule-table tr.pre-row td    { color: var(--text-3); }
.schedule-table tr:last-child td { border-bottom: none; }

/* ── Modal ── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(13,43,90,0.35);
  z-index: 999;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(3px);
}

.modal-overlay.show { display: flex; }

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 480px;
  max-width: 90vw;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-md);
  position: relative;
}

.modal::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 5px; height: 100%;
  background: var(--navy);
  border-radius: 8px 0 0 8px;
}

.modal-head {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-head h3 {
  font-family: 'Roboto Slab', serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-3);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}

.modal-close:hover { color: var(--red); }

.modal-body   { padding: 20px 24px; }
.modal-footer { padding: 14px 24px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }

/* ── Form Groups ── */
.form-group { margin-bottom: 14px; }

.form-group label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-2);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.86rem;
  outline: none;
  transition: border 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--accent); }

.form-group textarea { min-height: 80px; resize: vertical; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .sidebar        { display: none; }
  .stats-row      { grid-template-columns: repeat(2, 1fr); }
  .schedule-week  { grid-template-columns: repeat(2, 1fr); }
  .topbar         { padding: 0 16px; }
  .main           { padding: 16px; }
}
