/* SylCampus dashboard — layout and components */

:root {
  --dash-purple: #667eea;
  --dash-violet: #764ba2;
}

/* ══ LAYOUT OVERRIDES ══════════════════════════════════════════════════════ */

main.site-main--dashboard {
  max-width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* Hide topbar on mobile for dashboard — mobile bar takes over */
@media (max-width: 767px) {
  body.dash-page .syl-topbar { display: none; }
}

/* ══ DASHBOARD LAYOUT ═══════════════════════════════════════════════════════ */

.dash-layout {
  display: flex;
  align-items: flex-start;
  min-height: calc(100vh - 62px);
}

/* ── Desktop sidebar ── */
.dash-sidebar {
  width: 220px;
  flex-shrink: 0;
  position: sticky;
  top: 62px;
  height: calc(100vh - 62px);
  overflow-y: auto;
  background: #fff;
  border-right: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  padding: 1.25rem 0 1rem;
}

@media (max-width: 767px) {
  .dash-sidebar { display: none; }
  .dash-layout { min-height: 100vh; }
}

.dash-sidebar-user {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0 1rem 1.25rem;
  border-bottom: 1px solid #f1f5f9;
  margin-bottom: 0.75rem;
}

.dash-sidebar-avatar {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dash-sidebar-name {
  font-size: 0.875rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 130px;
}

.dash-sidebar-term {
  font-size: 0.72rem;
  color: #94a3b8;
  margin: 0;
  margin-top: 0.1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 130px;
}

.dash-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0 0.65rem;
}

.dash-nav-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.85rem;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: #64748b;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: background 0.15s, color 0.15s;
  font-family: 'Inter', system-ui, sans-serif;
  position: relative;
}

a.dash-nav-item {
  text-decoration: none;
  box-sizing: border-box;
}

.dash-nav-item i {
  width: 18px;
  text-align: center;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.dash-nav-item:hover {
  background: #f8fafc;
  color: #1e293b;
}

.dash-nav-item.active {
  background: linear-gradient(135deg, rgba(102,126,234,0.12), rgba(118,75,162,0.12));
  color: #667eea;
  font-weight: 700;
}

.dash-nav-badge {
  margin-left: auto;
  background: #dc2626;
  color: #fff;
  font-size: 0.6rem;
  font-weight: 800;
  border-radius: 999px;
  padding: 0.1rem 0.4rem;
  min-width: 18px;
  text-align: center;
}

.dash-sidebar-courses {
  margin-top: 1.25rem;
  padding: 0 0.65rem;
  flex: 1;
}

.dash-sidebar-section-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
  padding: 0 0.85rem;
  margin: 0 0 0.4rem;
}

.dash-sidebar-course-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  text-decoration: none;
  color: #475569;
  font-size: 0.82rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}

.dash-sidebar-course-link:hover {
  background: #f8fafc;
  color: #667eea;
}

.dash-sidebar-course-link--active {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.14), rgba(118, 75, 162, 0.14));
  color: #667eea;
  font-weight: 600;
}

.dash-sidebar-course-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea, #764ba2);
  flex-shrink: 0;
}

.dash-sidebar-footer {
  padding: 1rem 0.65rem 0;
  margin-top: auto;
  border-top: 1px solid #f1f5f9;
}

.dash-sidebar-upload-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.85rem;
  border-radius: 10px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  transition: opacity 0.15s;
}

.dash-sidebar-upload-btn:hover {
  opacity: 0.9;
  color: #fff;
}

.dash-sidebar-settings-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.85rem;
  margin-top: 0.4rem;
  border-radius: 8px;
  color: #94a3b8;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
}
.dash-sidebar-settings-link:hover {
  color: #475569;
  background: #f1f5f9;
}

/* ── Sidebar Add Task button ── */
.dash-sidebar-add {
  padding: 0.75rem 0.65rem 0;
}

.dash-sidebar-add-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
  padding: 0.6rem 0.85rem;
  border-radius: 10px;
  background: #6366f1;
  color: #fff;
  font-size: 0.84rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
}

.dash-sidebar-add-btn:hover {
  background: #4f46e5;
}

/* Hide Add task buttons on desktop (sidebar handles it) — keep Notes' New note button */
@media (min-width: 768px) {
  #tab-home .dash-tab-header .dash-btn-primary,
  #tab-tasks .dash-tab-header .dash-btn-primary,
  #tab-calendar .dash-tab-header .dash-btn-primary {
    display: none;
  }
}

/* Hide tab-header action buttons on mobile — mobile top bar icons handle them */
@media (max-width: 767px) {
  #tab-tasks .dash-tab-header .dash-btn-primary,
  #tab-calendar .dash-tab-header .dash-btn-primary,
  #tab-calendar .dash-tab-header .dash-btn-secondary,
  #tab-notes .dash-tab-header .dash-btn-primary {
    display: none;
  }
}

/* ── Content area ── */
.dash-content {
  flex: 1;
  min-width: 0;
  background: #f8fafc;
}

@media (max-width: 767px) {
  .dash-content {
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  }
}

/* ── Mobile top bar ── */
.dash-mobile-bar {
  display: none;
}

@media (max-width: 767px) {
  .dash-mobile-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem 1rem;
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 100;
    gap: 0.75rem;
  }
}

.dash-mobile-brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  flex: 1;
}

.dash-mobile-avatar {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dash-mobile-title {
  font-size: 1rem;
  font-weight: 700;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: calc(100vw - 180px);
}

.dash-mobile-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dash-mobile-processing {
  color: #667eea;
  font-size: 0.95rem;
}

.dash-mobile-add-btn {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff;
  border: none;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.15s;
}

.dash-mobile-add-btn:hover { opacity: 0.88; }

.dash-mobile-add-note-btn {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
}

/* ── Tab panels ── */
.dash-tab {
  display: none;
  padding: 1.25rem;
}

.dash-tab.active {
  display: block;
}

@media (min-width: 768px) {
  .dash-tab {
    padding: 1.75rem 2rem;
  }
}

.dash-tab-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.dash-tab-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: -0.02em;
}

.dash-tab-title i { color: #667eea; }

/* ── Bottom nav (mobile only) ── */
.dash-bottom-nav {
  display: none;
}

@media (max-width: 767px) {
  .dash-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid #e2e8f0;
    z-index: 200;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    box-shadow: 0 -2px 16px rgba(0,0,0,0.06);
  }
}

.dash-bottom-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 0.25rem;
  border: none;
  background: none;
  font-size: 0.62rem;
  font-weight: 600;
  color: #94a3b8;
  cursor: pointer;
  gap: 0.22rem;
  font-family: 'Inter', system-ui, sans-serif;
  transition: color 0.15s;
  letter-spacing: 0.01em;
}

.dash-bottom-item i {
  font-size: 1.15rem;
  line-height: 1;
}

.dash-bottom-item.active {
  color: #667eea;
}

a.dash-bottom-item {
  text-decoration: none;
  box-sizing: border-box;
}

.dash-bottom-icon-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.dash-bottom-badge {
  position: absolute;
  top: -4px;
  right: -8px;
  background: #dc2626;
  color: #fff;
  font-size: 0.55rem;
  font-weight: 800;
  border-radius: 999px;
  padding: 0.05rem 0.3rem;
  min-width: 16px;
  text-align: center;
  line-height: 1.4;
}

/* ══ HOME TAB ═══════════════════════════════════════════════════════════════ */

.dash-home-greeting {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.dash-home-name {
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 0.2rem;
  letter-spacing: -0.025em;
}

@media (max-width: 400px) {
  .dash-home-name { font-size: 1.15rem; }
}

.dash-home-term {
  font-size: 0.82rem;
  color: #64748b;
  margin: 0;
}

.dash-home-upload-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.85rem;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: opacity 0.15s;
}

.dash-home-upload-pill:hover { opacity: 0.88; color: #fff; }

/* Stats row */
.dash-home-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.65rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 480px) {
  .dash-home-stats { grid-template-columns: repeat(2, 1fr); }
}

.dash-stat-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 0.85rem 0.75rem;
  text-align: center;
  cursor: default;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  transition: transform 0.15s, box-shadow 0.15s;
  font-family: 'Inter', system-ui, sans-serif;
}

button.dash-stat-card {
  cursor: pointer;
}

button.dash-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(102,126,234,0.15);
}

.dash-stat-num {
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1;
  color: #1e293b;
  letter-spacing: -0.03em;
}

.dash-stat-lbl {
  font-size: 0.68rem;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dash-stat-overdue { background: #fff5f5; border: 1px solid #fecaca !important; }
.dash-stat-overdue .dash-stat-num { color: #94a3b8; }
.dash-stat-overdue.dash-stat-overdue--hot .dash-stat-num { color: #dc2626; }
.dash-stat-overdue.dash-stat-overdue--hot { border-color: #fca5a5 !important; }

.dash-stat-today { background: #f0fdf4; border: 1px solid #bbf7d0 !important; }
.dash-stat-today .dash-stat-num { color: #16a34a; }

.dash-stat-week { background: #eff6ff; border: 1px solid #bfdbfe !important; }
.dash-stat-week .dash-stat-num { color: #2563eb; }

.dash-stat-done { background: #f8fafc; border: 1px solid #e2e8f0 !important; }
.dash-stat-done .dash-stat-num { color: #64748b; }

/* Processing strip */
.dash-processing-strip {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1rem;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  font-size: 0.875rem;
  color: #1e40af;
  margin-bottom: 1.25rem;
}

/* Section headings */
.dash-home-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin: 1.5rem 0 0.65rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
}

.dash-home-section-head i { color: #667eea; }

.dash-home-section-head--overdue {
  color: #dc2626;
}
.dash-home-section-head--overdue i { color: #dc2626; }

.dash-home-today-date {
  font-size: 0.75rem;
  color: #94a3b8;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
}

/* Home task cards */
.dash-home-task {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  margin-bottom: 0.5rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.dash-home-task:hover {
  border-color: #c7d2fe;
  box-shadow: 0 2px 8px rgba(102,126,234,0.1);
}

.dash-home-task.completed {
  opacity: 0.55;
}

.dash-home-task.completed .dash-home-task-title {
  text-decoration: line-through;
}

.dash-home-task-body {
  flex: 1;
  min-width: 0;
}

.dash-home-task-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 0.35rem;
  line-height: 1.35;
}

.dash-home-task-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
}

/* Countdown labels */
.dash-home-countdown {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  background: #f1f5f9;
  color: #64748b;
}

.dash-home-countdown--late {
  background: #fee2e2;
  color: #dc2626;
}

.dash-home-countdown--today {
  background: #d1fae5;
  color: #065f46;
}

.dash-home-countdown--soon {
  background: #fef3c7;
  color: #92400e;
}

/* Loading placeholder */
.dash-home-loading {
  text-align: center;
  padding: 1.5rem;
  color: #94a3b8;
  font-size: 1.1rem;
}

/* Empty state */
.dash-home-empty {
  text-align: center;
  padding: 1.5rem 1rem;
  color: #94a3b8;
  font-size: 0.875rem;
}

.dash-home-empty i { font-size: 1.5rem; margin-bottom: 0.5rem; display: block; }
.dash-home-empty-icon--green { color: #10b981; }

/* Day groupings */
.dash-home-day-group {
  margin-bottom: 0.25rem;
}

.dash-home-day-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 1rem 0 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.dash-home-day-label--urgent { color: #ea580c; }

.dash-home-day-pill {
  font-size: 0.6rem;
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: 6px;
  text-transform: none;
  letter-spacing: 0;
}

.dash-home-day-pill--tomorrow { background: #fef3c7; color: #92400e; }
.dash-home-day-pill--soon { background: #ffedd5; color: #c2410c; }

/* Calendar sync promo */
.dash-home-cal-promo {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 1.1rem;
  background: linear-gradient(135deg, rgba(102,126,234,0.07), rgba(118,75,162,0.07));
  border: 1px solid rgba(102,126,234,0.2);
  border-radius: 14px;
  margin: 1.75rem 0 1.5rem;
}

.dash-home-cal-promo-icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dash-home-cal-promo-text { flex: 1; min-width: 0; }

.dash-home-cal-promo-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 0.15rem;
}

.dash-home-cal-promo-sub {
  font-size: 0.76rem;
  color: #64748b;
  margin: 0;
}

.dash-home-cal-promo-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.9rem;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: opacity 0.15s;
}

.dash-home-cal-promo-btn:hover { opacity: 0.88; color: #fff; }

/* Course chips */
.dash-home-courses {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.65rem;
  margin-bottom: 0.5rem;
}

.dash-home-course-chip {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.75rem 0.9rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.dash-home-course-chip:hover {
  border-color: #667eea;
  box-shadow: 0 2px 10px rgba(102,126,234,0.12);
}

.dash-home-course-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dash-home-course-info {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.dash-home-course-code {
  font-size: 0.82rem;
  font-weight: 800;
  color: #667eea;
}

.dash-home-course-name {
  font-size: 0.75rem;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ══ ONBOARDING ══════════════════════════════════════════════════════════════ */

.dash-onboarding {
  max-width: 480px;
  margin: 0 auto;
  padding: 0.5rem 0 2rem;
}

.dash-onboarding-hero {
  text-align: center;
  margin-bottom: 2rem;
}

.dash-onboarding-emoji {
  font-size: 3rem;
  line-height: 1;
  margin-bottom: 0.75rem;
}

.dash-onboarding-title {
  font-size: 1.5rem;
  font-weight: 900;
  color: #0f172a;
  margin: 0 0 0.5rem;
  letter-spacing: -0.03em;
}

.dash-onboarding-sub {
  font-size: 0.9rem;
  color: #64748b;
  margin: 0;
  line-height: 1.6;
}

.dash-onboarding-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 1.75rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  overflow: hidden;
}

.dash-onboarding-step {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #f1f5f9;
}

.dash-onboarding-step:last-child { border-bottom: none; }

.dash-onboarding-dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid #e2e8f0;
  color: #94a3b8;
  font-size: 0.78rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.dash-onboarding-dot--done {
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-color: transparent;
  color: #fff;
}

.dash-onboarding-dot--active {
  background: #667eea;
  border-color: transparent;
  color: #fff;
  box-shadow: 0 0 0 4px rgba(102,126,234,0.2);
}

.dash-onboarding-step-body { flex: 1; }

.dash-onboarding-step-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 0.15rem;
}

.dash-onboarding-step--done .dash-onboarding-step-title { color: #94a3b8; }

.dash-onboarding-step-desc {
  font-size: 0.78rem;
  color: #94a3b8;
  margin: 0;
}

.dash-onboarding-step--active .dash-onboarding-step-title { color: #1e293b; }
.dash-onboarding-step--active .dash-onboarding-step-desc { color: #64748b; }

.dash-onboarding-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.9rem 1.5rem;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff;
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 800;
  text-decoration: none;
  margin-bottom: 1.75rem;
  box-shadow: 0 6px 20px rgba(102,126,234,0.35);
  transition: opacity 0.15s, transform 0.15s;
}

.dash-onboarding-cta:hover { opacity: 0.9; color: #fff; transform: translateY(-1px); }

.dash-onboarding-values {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.dash-onboarding-value {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 1rem 0.75rem;
  text-align: center;
}

.dash-onboarding-value-icon {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.dash-onboarding-value-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 0.2rem;
}

.dash-onboarding-value-sub {
  font-size: 0.7rem;
  color: #94a3b8;
  margin: 0;
}

/* ══ CALENDAR TAB COMPONENTS ════════════════════════════════════════════════ */

.cal-header {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}

.cal-header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.cal-color-by {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.cal-color-by-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
}

.cal-color-by-toggle {
  display: inline-flex;
  padding: 2px;
  border-radius: 9px;
  background: #e2e8f0;
  gap: 2px;
}

.cal-color-by-btn {
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  font-family: inherit;
}

.cal-color-by-btn:hover {
  color: #334155;
}

.cal-color-by-btn.active {
  background: #fff;
  color: #4f46e5;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.cal-legend-empty {
  display: inline-block;
  padding: 0.25rem 0;
}

.cal-subtitle {
  font-size: 0.875rem;
  color: #64748b;
  margin: 0;
}

.cal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.cal-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  background: color-mix(in srgb, var(--chip) 12%, transparent);
  color: var(--chip);
  border: 1px solid color-mix(in srgb, var(--chip) 25%, transparent);
}

.cal-chip::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--chip);
}

.cal-subscribe-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding: 0.85rem 1rem;
  background: linear-gradient(135deg, rgba(102,126,234,0.06), rgba(118,75,162,0.06));
  border: 1px solid rgba(102,126,234,0.18);
  border-radius: 12px;
  margin-bottom: 1rem;
}

.cal-subscribe-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #475569;
  flex-shrink: 0;
}

.cal-subscribe-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-left: auto;
}

.cal-sub-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.85rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.15s;
}

.cal-sub-btn--google {
  background: #fff;
  color: #1e293b;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 4px rgba(0,0,0,0.07);
}

.cal-sub-btn--google:hover { opacity: 0.85; color: #1e293b; }

.cal-sub-btn--apple {
  background: #1e293b;
  color: #fff;
}

.cal-sub-btn--apple:hover { opacity: 0.85; color: #fff; }

.cal-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.85rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  background: transparent;
  color: #667eea;
  border: 1px solid rgba(102,126,234,0.35);
  cursor: pointer;
  font-family: 'Inter', system-ui, sans-serif;
  transition: background 0.15s, border-color 0.15s;
}

.cal-copy-btn:hover { background: rgba(102,126,234,0.07); border-color: #667eea; }

.cal-empty-notice {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: #f8fafc;
  border: 2px dashed #e2e8f0;
  border-radius: 12px;
  font-size: 0.875rem;
  color: #64748b;
  margin-bottom: 1rem;
}

.cal-empty-notice i { font-size: 1.25rem; color: #c7d2fe; flex-shrink: 0; }

/* ══ TASKS TAB SPECIFIC ══════════════════════════════════════════════════════ */

.dash-todo-controls {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

/* ══ NOTES TAB SPECIFIC ══════════════════════════════════════════════════════ */

.dash-notes-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

/* ══════════════════════════════════════════════════════════════════════════════
   Legacy component styles below — kept intact
   ══════════════════════════════════════════════════════════════════════════════ */

.dashboard-root {
  --dash-purple: #667eea;
  --dash-violet: #764ba2;
  --dash-text: #1e293b;
  --dash-muted: #64748b;
  --dash-border: #e2e8f0;
  --dash-bg: #f8fafc;
  font-family: "Inter", system-ui, sans-serif;
  color: var(--dash-text);
}

.dashboard-root * {
  box-sizing: border-box;
}

/* Greeting card */
.dash-user-card {
  background: linear-gradient(135deg, var(--dash-purple) 0%, var(--dash-violet) 100%);
  border-radius: 16px;
  padding: 1.75rem 1.5rem;
  color: #fff;
  margin-bottom: 1.5rem;
  box-shadow: 0 10px 40px rgba(102, 126, 234, 0.35);
}

.dash-user-card h2 {
  margin: 0 0 1rem;
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.2;
}

.dash-user-card .dash-greet-sub {
  opacity: 0.92;
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
}

.dash-quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.dash-quick-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  color: #fff;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: background 0.2s, transform 0.15s;
}

.dash-quick-links a:hover {
  background: rgba(255, 255, 255, 0.28);
  color: #fff;
  transform: translateY(-1px);
}

/* Status strip */
.dash-status-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.dash-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.9rem;
  background: #fff;
  border: 1px solid var(--dash-border);
  border-radius: 10px;
  font-size: 0.875rem;
  color: var(--dash-muted);
}

.dash-pill strong {
  color: var(--dash-text);
}

/* Section panels */
.dash-panel {
  background: #fff;
  border: 1px solid var(--dash-border);
  border-radius: 14px;
  padding: 1.25rem 1.35rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.dash-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.dash-panel-header h3 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dash-panel-header h3 i {
  color: var(--dash-purple);
}

/* Courses grid */
.dash-courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.dash-course-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--dash-border);
  border-radius: 12px;
  background: var(--dash-bg);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.dash-course-card:hover {
  border-color: var(--dash-purple);
  box-shadow: 0 4px 14px rgba(102, 126, 234, 0.15);
  color: inherit;
}

.dash-course-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--dash-purple), var(--dash-violet));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.dash-course-code {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--dash-purple);
}

.dash-course-name {
  font-size: 0.875rem;
  color: var(--dash-muted);
  line-height: 1.35;
}

.dash-course-card--link {
  align-items: center;
}

.dash-course-card--link > div:nth-child(2) {
  flex: 1;
  min-width: 0;
}

.dash-course-chevron {
  margin-left: auto;
  flex-shrink: 0;
  color: var(--dash-muted);
  font-size: 0.7rem;
  opacity: 0.65;
}

.dash-course-card--link:hover .dash-course-chevron {
  color: var(--dash-purple);
  opacity: 1;
}

/* Course detail page */
.course-detail-root {
  padding-bottom: 2rem;
}

.course-detail-breadcrumb {
  margin-bottom: 1rem;
  font-size: 0.875rem;
}

.course-detail-breadcrumb a {
  color: var(--dash-purple);
  font-weight: 600;
  text-decoration: none;
}

.course-detail-breadcrumb a:hover {
  text-decoration: underline;
}

.course-detail-bc-sep {
  margin: 0 0.35rem;
  color: var(--dash-muted);
}

.course-detail-hero {
  background: linear-gradient(135deg, var(--dash-purple) 0%, var(--dash-violet) 100%);
  border-radius: 16px;
  padding: 1.5rem 1.35rem 1.65rem;
  color: #fff;
  margin-bottom: 1.35rem;
  box-shadow: 0 10px 40px rgba(102, 126, 234, 0.28);
}

.course-detail-term-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.88;
  font-weight: 600;
}

.course-detail-title {
  margin: 0 0 1rem;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.25;
}

.course-detail-code {
  display: inline-block;
  margin-right: 0.35rem;
  font-weight: 800;
  opacity: 0.95;
}

.course-detail-meta-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.course-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 500;
}

.course-info-panel .course-subheading {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--dash-muted);
  margin: 0 0 0.65rem;
}

.course-dl {
  display: grid;
  grid-template-columns: minmax(5rem, 7.5rem) 1fr;
  gap: 0.35rem 1rem;
  margin: 0;
  font-size: 0.9rem;
}

.course-dl dt {
  margin: 0;
  font-weight: 600;
  color: var(--dash-muted);
}

.course-dl dd {
  margin: 0;
  color: var(--dash-text);
}

.course-dl--compact {
  grid-template-columns: minmax(4rem, 6rem) 1fr;
  font-size: 0.875rem;
}

.course-prose {
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--dash-text);
}

.course-grade-list {
  margin: 0;
}

.course-grade-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--dash-border);
  font-size: 0.9rem;
}

.course-grade-row:last-child {
  border-bottom: none;
}

.course-grade-name {
  font-weight: 600;
}

.course-grade-weight {
  font-weight: 700;
  color: var(--dash-purple);
  flex-shrink: 0;
}

.course-resource-list li {
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--dash-border);
  font-size: 0.9rem;
}

.course-resource-list li:last-child {
  border-bottom: none;
}

.course-resource-link {
  color: var(--dash-purple);
  font-weight: 600;
  text-decoration: none;
}

.course-resource-link:hover {
  text-decoration: underline;
}

.course-additional-block {
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--dash-border);
}

.course-additional-block:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.course-nested-kv li {
  padding: 0.15rem 0;
}

.course-bullet-list {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.9rem;
}

.course-event-list {
  margin: 0;
}

.course-event-row {
  display: flex;
  gap: 1rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--dash-border);
  align-items: flex-start;
}

.course-event-row:last-child {
  border-bottom: none;
}

.course-event-when {
  flex-shrink: 0;
  width: 6.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.course-event-date {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--dash-text);
}

.course-event-time {
  font-size: 0.75rem;
}

.course-event-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.course-event-title {
  font-weight: 600;
  font-size: 0.9rem;
}

.course-event-type {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--dash-purple);
  align-self: flex-start;
}

.course-event-loc {
  font-size: 0.8rem;
}

.course-event-list--compact .course-event-when {
  width: 4.5rem;
}

@media (max-width: 576px) {
  .course-detail-title {
    font-size: 1.25rem;
  }

  .course-event-row {
    flex-direction: column;
    gap: 0.35rem;
  }

  .course-event-when {
    width: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
  }
}

/* Per-course accent colors (sidebar, home chips, course detail, mobile bar) */
.dash-sidebar-course-link--accented .dash-sidebar-course-dot {
  background: linear-gradient(135deg, var(--c-from), var(--c-to));
}

.dash-sidebar-course-link--accented:hover {
  background: var(--c-soft2);
  color: var(--c-from);
}

.dash-sidebar-course-link--accented.dash-sidebar-course-link--active {
  background: linear-gradient(135deg, var(--c-soft), var(--c-soft2));
  color: var(--c-from);
  font-weight: 600;
}

.dash-home-course-chip--accented:hover {
  border-color: var(--c-from);
  box-shadow: 0 2px 12px var(--c-soft);
}

.dash-home-course-chip--accented .dash-home-course-icon {
  background: linear-gradient(135deg, var(--c-from), var(--c-to));
}

.dash-home-course-chip--accented .dash-home-course-code {
  color: var(--c-from);
}

.course-detail-root--themed .course-detail-hero {
  background: linear-gradient(135deg, var(--cd-primary) 0%, var(--cd-secondary) 100%);
  box-shadow: 0 10px 40px var(--cd-shadow);
}

.course-detail-root--themed .course-detail-breadcrumb a {
  color: var(--cd-primary);
}

.course-detail-root--themed .course-grade-weight,
.course-detail-root--themed .course-event-type {
  color: var(--cd-primary);
}

.course-detail-root--themed .course-resource-link {
  color: var(--cd-primary);
}

.course-detail-root--themed .dash-panel-header > h3 > i {
  color: var(--cd-primary);
}

.course-detail-root--themed .dash-notes-header h3 i {
  color: var(--cd-primary);
}

.course-detail-root--themed .dash-btn-primary {
  background: linear-gradient(135deg, var(--cd-primary), var(--cd-secondary));
}

.dash-mobile-bar--course-themed .dash-mobile-avatar,
.dash-mobile-bar--course-themed .dash-mobile-add-btn {
  background: linear-gradient(135deg, var(--cd-primary), var(--cd-secondary));
}

.course-detail-root--themed .dash-mobile-bar--course-themed .dash-mobile-processing {
  color: var(--cd-primary);
}

.course-detail-hero-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.course-detail-hero-title-row .course-detail-title {
  flex: 1;
  min-width: 0;
}

.course-edit-open-btn {
  flex-shrink: 0;
  font-size: 0.8rem;
  padding: 0.45rem 0.85rem;
}

.dash-panel-header--spread {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.dash-panel-header--spread h3 {
  margin: 0;
}

.course-event-body--with-actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  flex: 1;
  min-width: 0;
}

.course-event-text {
  flex: 1;
  min-width: 0;
}

.course-event-actions {
  display: flex;
  gap: 0.2rem;
  flex-shrink: 0;
}

.course-event-action-btn {
  border: none;
  background: #f1f5f9;
  color: #64748b;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  transition: background 0.15s, color 0.15s;
}

.course-event-action-btn:hover {
  background: #e2e8f0;
  color: #334155;
}

/* To-do section */
.dash-todo-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.dash-todo-header h3 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dash-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--dash-purple), var(--dash-violet));
  color: #fff;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s;
}

.dash-btn-primary:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.dash-todo-controls {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.dash-view-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.dash-view-tabs::-webkit-scrollbar {
  display: none;
}

@media (max-width: 640px) {
  .dash-view-tabs {
    flex-wrap: nowrap;
    padding-bottom: 2px;
  }

  .dash-view-tab {
    flex-shrink: 0;
  }
}

.dash-view-tab {
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--dash-border);
  border-radius: 8px;
  background: #fff;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--dash-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.2s;
}

.dash-view-tab:hover {
  border-color: var(--dash-purple);
  color: var(--dash-purple);
}

.dash-view-tab.active {
  background: linear-gradient(135deg, var(--dash-purple), var(--dash-violet));
  border-color: transparent;
  color: #fff;
}

.dash-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
}

.dash-filter-group {
  display: flex;
  flex-direction: column;
}

.dash-filter-group label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--dash-muted);
  margin-bottom: 0.25rem;
}

.dash-filter-group select {
  min-width: 10rem;
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--dash-border);
  border-radius: 8px;
  font-size: 0.875rem;
}

/* Task cards */
#tasks-container {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.dash-task-card {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--dash-border);
  border-radius: 12px;
  background: #fafafa;
  transition: background 0.2s;
}

.dash-task-card.completed {
  opacity: 0.65;
}

.dash-task-card.completed .dash-task-title {
  text-decoration: line-through;
}

.dash-task-check {
  width: 22px;
  height: 22px;
  margin-top: 2px;
  cursor: pointer;
  flex-shrink: 0;
}

.dash-task-body {
  flex: 1;
  min-width: 0;
}

.dash-task-title {
  font-weight: 600;
  font-size: 0.95rem;
  margin: 0 0 0.25rem;
}

.dash-task-meta {
  font-size: 0.8125rem;
  color: var(--dash-muted);
  margin: 0;
}

.dash-task-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.5rem;
}

.dash-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.dash-badge-type {
  background: #e0e7ff;
  color: #4338ca;
}

.dash-badge-course {
  background: #f1f5f9;
  color: #475569;
}

.dash-badge-source {
  background: #ecfdf5;
  color: #047857;
}

.dash-badge-local {
  background: #fef3c7;
  color: #b45309;
}

.dash-task-actions {
  display: flex;
  gap: 0.35rem;
  flex-shrink: 0;
}

.dash-icon-btn {
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--dash-border);
  color: var(--dash-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.dash-icon-btn:hover {
  border-color: var(--dash-purple);
  color: var(--dash-purple);
}
.dash-delete-personal:hover {
  border-color: #ef4444;
  color: #ef4444;
  background: #fef2f2;
}

.dash-empty-tasks {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--dash-muted);
  border: 2px dashed var(--dash-border);
  border-radius: 12px;
  background: var(--dash-bg);
}

.dash-empty-tasks i {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  opacity: 0.5;
}

/* Calendar */
.dash-calendar-panel .dash-cal-tip {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  font-size: 0.875rem;
  color: #1e40af;
  margin-bottom: 1rem;
}

.dash-calendar-iframe-wrap {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--dash-border);
  background: #fff;
  min-height: 520px;
}

.dash-calendar-iframe-wrap iframe {
  width: 100%;
  height: 560px;
  border: 0;
  display: block;
}

.dash-subscribe-card {
  background: var(--dash-bg);
  border: 1px solid var(--dash-border);
  border-radius: 12px;
  padding: 1rem 1.15rem;
}

.dash-cal-alert {
  border-radius: 10px;
  font-size: 0.875rem;
}

/* FullCalendar shell + theme */
.dash-fc-shell {
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--dash-border);
  background: #fff;
  box-shadow: 0 2px 16px rgba(15, 23, 42, 0.07);
}

.syl-fc-root {
  min-height: 560px;
  padding: 1.25rem 1.25rem 1.25rem;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  --fc-border-color: #f1f5f9;
  --fc-page-bg-color: transparent;
  --fc-neutral-bg-color: #f8fafc;
  --fc-button-bg-color: transparent;
  --fc-button-border-color: var(--dash-border);
  --fc-button-text-color: #475569;
  --fc-button-hover-bg-color: #f1f5f9;
  --fc-button-hover-border-color: var(--dash-border);
  --fc-button-active-bg-color: var(--dash-purple);
  --fc-button-active-border-color: var(--dash-purple);
  --fc-today-bg-color: rgba(102, 126, 234, 0.06);
  --fc-event-border-color: transparent;
  --fc-list-event-hover-bg-color: #f8fafc;
}

.syl-fc-root .fc {
  font-size: 0.875rem;
}

/* Toolbar */
.syl-fc-root .fc-toolbar {
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem !important;
  align-items: center;
}

.syl-fc-root .fc-toolbar-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.025em;
}

.syl-fc-root .fc-button {
  border-radius: 10px !important;
  font-weight: 600;
  font-size: 0.8rem;
  padding: 0.4em 0.85em;
  text-transform: none;
  transition: all 0.15s;
  color: var(--fc-button-text-color) !important;
  box-shadow: none !important;
}

.syl-fc-root .fc-button:hover {
  background: var(--fc-button-hover-bg-color) !important;
  border-color: var(--fc-button-hover-border-color) !important;
  color: #1e293b !important;
}

.syl-fc-root .fc-button-primary:not(:disabled).fc-button-active,
.syl-fc-root .fc-button-primary:not(:disabled):active {
  background: var(--dash-purple) !important;
  border-color: var(--dash-purple) !important;
  color: #fff !important;
}

.syl-fc-root .fc-today-button {
  background: linear-gradient(135deg, var(--dash-purple), var(--dash-violet)) !important;
  border-color: transparent !important;
  color: #fff !important;
  padding: 0.4em 1em;
}

.syl-fc-root .fc-today-button:disabled {
  opacity: 0.4;
}

/* Grid */
.syl-fc-root .fc-scrollgrid {
  border: none !important;
  border-radius: 14px;
  overflow: hidden;
}

.syl-fc-root .fc-scrollgrid td,
.syl-fc-root .fc-scrollgrid th {
  border-color: var(--fc-border-color) !important;
}

.syl-fc-root .fc-col-header-cell {
  padding: 0.6rem 0.25rem;
  font-weight: 600;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
  background: #fff;
  border-bottom: 2px solid #f1f5f9 !important;
}

.syl-fc-root .fc-daygrid-day {
  transition: background-color 0.1s;
}

.syl-fc-root .fc-daygrid-day:hover {
  background-color: #fafafa;
}

.syl-fc-root .fc-daygrid-day-number {
  font-weight: 600;
  font-size: 0.82rem;
  color: #475569;
  padding: 0.4rem 0.55rem;
  border-radius: 8px;
  transition: background 0.15s;
}

.syl-fc-root .fc-day-other .fc-daygrid-day-number {
  color: #cbd5e1;
  font-weight: 400;
}

.syl-fc-root .fc-day-today {
  background: rgba(102, 126, 234, 0.04) !important;
}

.syl-fc-root .fc-day-today .fc-daygrid-day-number {
  background: linear-gradient(135deg, var(--dash-purple), var(--dash-violet));
  color: #fff !important;
  font-weight: 700;
}

/* Events — pill style with subtle shadow */
.syl-fc-root .fc-daygrid-event {
  border-radius: 6px !important;
  border: none !important;
  padding: 2px 6px;
  margin: 1px 2px 0;
  font-size: 0.72rem;
  font-weight: 600;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
  cursor: pointer;
  opacity: 0.93;
  transition: opacity 0.15s, transform 0.1s;
}

.syl-fc-root .fc-daygrid-event:hover {
  opacity: 1;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0,0,0,0.15);
}

.syl-fc-root .fc-daygrid-event .fc-event-title {
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Time grid */
.syl-fc-root .fc-timegrid-slot-label {
  font-size: 0.7rem;
  color: #94a3b8;
  font-weight: 500;
}

.syl-fc-root .fc-timegrid-col.fc-day-today {
  background: rgba(102, 126, 234, 0.03) !important;
}

.syl-fc-root .fc-timegrid-now-indicator-line {
  border-color: var(--dash-purple);
  border-width: 2px;
}

.syl-fc-root .fc-timegrid-now-indicator-arrow {
  border-top-color: var(--dash-purple);
  border-bottom-color: var(--dash-purple);
}

/* List view */
.syl-fc-root .fc-list {
  border: none !important;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
}

.syl-fc-root .fc-list-day-cushion {
  background: #f8fafc !important;
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid #f1f5f9;
}

.syl-fc-root .fc-list-day-text,
.syl-fc-root .fc-list-day-side-text {
  color: #475569;
}

.syl-fc-root .fc-list-event {
  cursor: pointer;
  transition: background 0.12s;
}

.syl-fc-root .fc-list-event:hover td {
  background: #f8fafc !important;
}

.syl-fc-root .fc-list-event-dot {
  border-width: 6px;
  border-radius: 50%;
}

.syl-fc-root .fc-list-event-time {
  font-size: 0.78rem;
  font-weight: 600;
  color: #94a3b8;
  white-space: nowrap;
}

.syl-fc-root .fc-list-event-title a {
  font-weight: 600;
  font-size: 0.875rem;
  color: #1e293b;
  text-decoration: none;
}

.syl-fc-root .fc-list-empty {
  background: #fff;
}

.syl-fc-root .fc-list-empty-cushion {
  color: #94a3b8;
  font-size: 0.875rem;
}

/* Subscribe card */
.dash-subscribe-card {
  background: linear-gradient(135deg, #fafbff 0%, #f5f3ff 100%);
  border: 1px solid #e8e4ff;
  border-radius: 16px;
  padding: 1.25rem 1.35rem;
}

.dash-subscribe-card h4 {
  color: #3730a3;
}

.dash-cal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--dash-border);
}

.dash-cal-legend-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: var(--dash-muted);
  font-weight: 500;
}

.dash-cal-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .syl-fc-root {
    min-height: 420px;
    padding: 0.75rem 0.5rem;
  }

  .syl-fc-root .fc-toolbar-title {
    font-size: 1rem;
  }

  .syl-fc-root .fc-button {
    font-size: 0.75rem;
    padding: 0.35em 0.6em;
  }

  .syl-fc-root .fc-list-event-time {
    display: none;
  }
}

/* ── Notes section ──────────────────────────────────────────────────────── */

.dash-notes-panel {
  margin-top: 1.5rem;
}

.dash-notes-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.dash-notes-header h3 {
  margin: 0 0 0.15rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--dash-text);
}

.dash-notes-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.dash-notes-search-wrap {
  position: relative;
  flex: 1;
  min-width: 180px;
}

.dash-notes-search-icon {
  position: absolute;
  left: 0.7rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--dash-muted);
  font-size: 0.8rem;
  pointer-events: none;
}

.dash-notes-search-input {
  width: 100%;
  padding: 0.4rem 0.75rem 0.4rem 2rem;
  border: 1.5px solid var(--dash-border);
  border-radius: 8px;
  font-size: 0.875rem;
  outline: none;
  background: #fff;
  transition: border-color 0.15s;
}

.dash-notes-search-input:focus {
  border-color: var(--dash-purple);
}

.dash-notes-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.dash-notes-filters .form-select {
  min-width: 110px;
  max-width: 160px;
  border-radius: 8px;
  border-color: var(--dash-border);
  font-size: 0.8rem;
}

.dash-notes-color-filter {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

.dash-notes-color-filter-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #94a3b8;
  white-space: nowrap;
}

.dash-notes-color-swatches {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.dash-notes-color-swatch {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s;
  flex-shrink: 0;
}

.dash-notes-color-swatch:hover { transform: scale(1.2); }
.dash-notes-color-swatch.active {
  border-color: #1e293b;
  transform: scale(1.15);
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px #1e293b;
}

/* Notes grid */
.dash-notes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.dash-notes-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--dash-muted);
}

/* Note card */
.dash-note-card {
  background: #fff;
  border: 1.5px solid var(--dash-border);
  border-radius: 12px;
  padding: 1rem;
  cursor: pointer;
  transition: box-shadow 0.18s, transform 0.18s, border-color 0.18s;
  position: relative;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.dash-note-card:hover {
  box-shadow: 0 6px 24px rgba(102, 126, 234, 0.14);
  border-color: #c7d2fe;
  transform: translateY(-2px);
}

.dash-note-card--pinned {
  border-color: #a5b4fc;
  background: #faf5ff;
}

.dash-note-card-top {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.1rem;
}

.dash-note-pin-icon {
  color: #6366f1;
  font-size: 0.7rem;
}

.dash-note-template-badge {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--dash-muted);
  background: #f1f5f9;
  padding: 0.1rem 0.45rem;
  border-radius: 20px;
}

.dash-note-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--dash-text);
  line-height: 1.3;
  flex: 1;
}

.dash-note-card-course {
  font-size: 0.72rem;
  font-weight: 600;
  color: #6366f1;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dash-note-card-snippet {
  font-size: 0.8rem;
  color: var(--dash-muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dash-note-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-top: 0.2rem;
}

.dash-note-tag-pill {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.1rem 0.5rem;
  border-radius: 20px;
}

.dash-note-card-date {
  font-size: 0.7rem;
  color: #94a3b8;
  margin-top: auto;
}

/* Note modal */
.dash-note-modal-content {
  border-radius: 16px;
  border: none;
  box-shadow: 0 24px 80px rgba(0,0,0,0.18);
  display: flex;
  flex-direction: column;
  max-height: 90vh;
}

.dash-note-modal-header {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1.25rem 1.5rem 0.75rem;
  border-bottom: 1.5px solid var(--dash-border);
  background: #fafbff;
  border-radius: 16px 16px 0 0;
}

.dash-note-modal-title-row {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.dash-note-title-input {
  font-size: 1.35rem;
  font-weight: 700;
  border: none;
  outline: none;
  background: transparent;
  width: 100%;
  color: var(--dash-text);
  padding: 0;
}

.dash-note-title-input::placeholder {
  color: #cbd5e1;
}

.dash-note-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.dash-note-meta-select {
  max-width: 160px;
  border-radius: 8px;
  font-size: 0.8rem;
  border-color: var(--dash-border);
}

.dash-note-tags-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
}

.dash-note-tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.dash-note-tag-pill--modal {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

.dash-note-tag-remove {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1;
  opacity: 0.6;
  color: inherit;
}

.dash-note-tag-remove:hover {
  opacity: 1;
}

.dash-note-tag-add-btn {
  background: #f1f5f9;
  border: 1.5px dashed #c7d2fe;
  border-radius: 6px;
  padding: 0.15rem 0.5rem;
  font-size: 0.75rem;
  color: #6366f1;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.dash-note-tag-add-btn:hover {
  background: #e0e7ff;
  border-color: #6366f1;
}

.dash-note-pin-btn {
  background: none;
  border: 1.5px solid var(--dash-border);
  border-radius: 8px;
  padding: 0.3rem 0.5rem;
  font-size: 0.8rem;
  color: #94a3b8;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.dash-note-pin-btn:hover,
.dash-note-pin-btn.active {
  color: #6366f1;
  border-color: #6366f1;
  background: #eef2ff;
}

.dash-note-modal-body {
  overflow-y: auto;
  flex: 1;
}

#noteEditorContainer {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 340px;
}

/* Override Quill snow theme to fit our design */
#noteQuillToolbar {
  border: none !important;
  border-bottom: 1.5px solid var(--dash-border) !important;
  background: #fafbff;
  padding: 0.5rem 1rem;
  position: sticky;
  top: 0;
  z-index: 1;
}

#noteQuillEditor {
  flex: 1;
  border: none !important;
  font-size: 0.95rem;
  line-height: 1.65;
  min-height: 280px;
  padding: 1rem 1.5rem;
}

#noteQuillEditor .ql-editor {
  min-height: 260px;
  padding: 0;
}

.ql-container.ql-snow {
  border: none !important;
}

.ql-toolbar.ql-snow {
  border: none !important;
}

.dash-note-modal-footer {
  display: flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  border-top: 1.5px solid var(--dash-border);
  background: #fafbff;
  border-radius: 0 0 16px 16px;
}

.dash-note-saved-indicator {
  font-size: 0.78rem;
  color: #94a3b8;
  opacity: 0;
  transition: opacity 0.3s;
}

.dash-note-saved-indicator--visible {
  opacity: 1;
}

/* Tag picker dropdown */
.dash-tag-picker {
  position: absolute;
  z-index: 9999;
  background: #fff;
  border: 1.5px solid var(--dash-border);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.13);
  padding: 0.75rem;
  min-width: 220px;
  max-height: 320px;
  overflow-y: auto;
}

.dash-tag-picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
}

.dash-tag-picker-new {
  background: none;
  border: none;
  color: #6366f1;
  font-size: 0.78rem;
  cursor: pointer;
  padding: 0;
}

.dash-tag-picker-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.dash-tag-picker-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.83rem;
  cursor: pointer;
  padding: 0.25rem 0.4rem;
  border-radius: 6px;
  transition: background 0.12s;
}

.dash-tag-picker-row:hover {
  background: #f1f5f9;
}

.dash-tag-picker-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Color swatch picker */
.dash-note-color-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.dash-note-color-swatch {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  cursor: pointer;
  display: inline-block;
  flex-shrink: 0;
  transition: transform 0.15s;
  background: #e2e8f0;
  border: 2px dashed #94a3b8;
}

.dash-note-color-swatch:hover {
  transform: scale(1.15);
}

.dash-note-color-picker {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  background: #fff;
  border: 1.5px solid var(--dash-border);
  border-radius: 10px;
  padding: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
  z-index: 9999;
  width: 170px;
}

.dash-color-opt {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.12s, border-color 0.12s;
  flex-shrink: 0;
}

.dash-color-opt:hover {
  transform: scale(1.2);
  border-color: rgba(0,0,0,0.2);
}

.dash-color-opt--none {
  background: #f1f5f9;
  color: #94a3b8;
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 640px) {
  .dash-notes-grid {
    grid-template-columns: 1fr;
  }

  .dash-note-modal-header {
    padding: 1rem;
  }

  .dash-note-meta-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .dash-note-meta-select {
    max-width: 100%;
  }
}

/* ══ MOBILE CALENDAR — Google/Apple Calendar inspired ═══════════════════════
   Remove the box container, let the list view breathe full-width.
   ══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 767px) {

  /* Strip the shell box — no border, no shadow, bleed to tab edges */
  #tab-calendar .dash-fc-shell {
    border-radius: 0;
    border: none;
    box-shadow: none;
    margin-left: -1.25rem;
    margin-right: -1.25rem;
    background: transparent;
  }

  /* FullCalendar list view: tighten padding, remove inner border-radius */
  #tab-calendar .syl-fc-root {
    min-height: 50vh;
    padding: 0.5rem 0 1rem;
    background: #fff;
  }

  /* Legend chips hidden on mobile — too small to read at a glance */
  .cal-legend { display: none; }

  /* Cal header: subtitle + color toggle stack */
  .cal-header {
    gap: 0.35rem;
    margin-bottom: 0.65rem;
  }

  .cal-header-main {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  /* Subscribe bar: tighter padding, wrap actions below label */
  .cal-subscribe-bar {
    padding: 0.6rem 0.85rem;
    gap: 0.5rem;
    flex-wrap: wrap;
  }

  .cal-subscribe-label {
    font-size: 0.74rem;
    width: 100%;
  }

  .cal-subscribe-actions {
    margin-left: 0;
    gap: 0.4rem;
  }

  .cal-sub-btn,
  .cal-copy-btn {
    padding: 0.35rem 0.65rem;
    font-size: 0.74rem;
  }

  /* FullCalendar list event rows — more breathing room */
  #tab-calendar .syl-fc-root .fc-list-day-cushion {
    padding: 0.5rem 1rem;
  }

  #tab-calendar .syl-fc-root .fc-list-event td {
    padding: 0.65rem 1rem;
  }

  /* Toolbar on mobile calendar */
  #tab-calendar .syl-fc-root .fc-toolbar {
    margin-bottom: 0.85rem !important;
    padding: 0 0.75rem;
  }
}

/* ══ MOBILE NOTES — Apple Notes-style flat list ══════════════════════════════
   On mobile: swap the card grid for clean, tappable list rows.
   ══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 767px) {

  /* Container becomes a white rounded list instead of a grid */
  .dash-notes-grid {
    display: block !important;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
  }

  /* Each note card = a flat list row */
  .dash-note-card {
    border-radius: 0 !important;
    border: none !important;
    border-bottom: 1px solid #f1f5f9 !important;
    box-shadow: none !important;
    min-height: unset;
    padding: 0.85rem 2.5rem 0.85rem 1rem; /* right padding for chevron */
    gap: 0.2rem;
    position: relative;
    transform: none !important;
    transition: background 0.12s;
  }

  .dash-note-card:last-of-type {
    border-bottom: none !important;
  }

  .dash-note-card:hover {
    background: #fafbff;
    transform: none !important;
    box-shadow: none !important;
  }

  /* Chevron at right edge (Apple Notes style) */
  .dash-note-card::after {
    content: '\203A'; /* › */
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #c7d2fe;
    font-size: 1.5rem;
    line-height: 1;
    font-weight: 300;
  }

  /* Pinned note: left accent bar instead of full card tint */
  .dash-note-card--pinned {
    border-left: 3px solid #a5b4fc !important;
    background: #fafbff;
    padding-left: calc(1rem - 3px);
  }

  /* Hide template badge row on mobile — noise */
  .dash-note-card-top {
    display: none;
  }

  /* Pin icon still shows inline with title */
  .dash-note-pin-icon {
    display: inline;
    margin-right: 0.3rem;
    font-size: 0.65rem;
    color: #6366f1;
  }

  .dash-note-card-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.15rem;
    line-height: 1.3;
  }

  /* Course + date on one compact line */
  .dash-note-card-course {
    display: inline;
    font-size: 0.72rem;
    font-weight: 600;
    color: #6366f1;
    text-transform: uppercase;
    letter-spacing: 0.03em;
  }

  .dash-note-card-course::after {
    content: ' · ';
    color: #cbd5e1;
    font-weight: 400;
  }

  .dash-note-card-date {
    display: inline;
    font-size: 0.72rem;
    color: #94a3b8;
    margin-top: 0;
  }

  /* Snippet: 1 line only, lighter */
  .dash-note-card-snippet {
    font-size: 0.78rem;
    color: #94a3b8;
    -webkit-line-clamp: 1;
    margin-top: 0.1rem;
  }

  /* Hide tags on mobile list view */
  .dash-note-card-tags {
    display: none;
  }

  /* Empty state inside list container */
  .dash-notes-empty {
    padding: 2.5rem 1rem;
  }

  /* Search + filters: stack vertically, full-width */
  .dash-notes-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .dash-notes-search-wrap {
    min-width: unset;
  }

  .dash-notes-filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 0.4rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .dash-notes-filters::-webkit-scrollbar { display: none; }

  .dash-notes-filters .form-select {
    min-width: 120px;
    flex-shrink: 0;
    font-size: 0.78rem;
  }
}

/* ══ MOBILE BOTTOM NAV — padding so content clears the fixed bar ════════════ */

@media (max-width: 767px) {
  /* All tabs need bottom breathing room so content isn't hidden by bottom nav */
  .dash-tab {
    padding-bottom: calc(76px + env(safe-area-inset-bottom)) !important;
  }
}

/* ══ MOBILE CALENDAR — Apple Calendar dot-mode month view ═══════════════════
   Month view shows small colored dots per event instead of text blocks.
   Tapping a date number navigates to listDay (via navLinkDayClick).
   Tapping an event dot navigates to listDay for that day (JS handles this).
   ══════════════════════════════════════════════════════════════════════════ */

/* The colored dot element rendered by eventContent callback */
.syl-fc-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: block;
  flex-shrink: 0;
  pointer-events: none;
}

@media (max-width: 767px) {
  /* Strip event block backgrounds — only the dot should be visible */
  #tab-calendar .syl-fc-root .fc-daygrid-event {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    margin: 0 1px 2px !important;
    padding: 1px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: auto !important;
    overflow: visible !important;
    cursor: pointer;
  }

  /* Event harness: no extra top margin between events */
  #tab-calendar .syl-fc-root .fc-daygrid-event-harness {
    margin-top: 1px !important;
    display: inline-flex;
    flex-shrink: 0;
  }

  /* Day events area: horizontal flex row of dots */
  #tab-calendar .syl-fc-root .fc-daygrid-day-events {
    display: flex !important;
    flex-wrap: wrap;
    gap: 2px;
    justify-content: center;
    align-items: center;
    padding: 2px 3px 4px;
    min-height: 16px;
  }

  /* Taller cells so dots and date number have breathing room */
  #tab-calendar .syl-fc-root .fc-daygrid-day-frame {
    min-height: 58px;
  }

  /* "+N more" link stays small and unobtrusive */
  #tab-calendar .syl-fc-root .fc-daygrid-more-link {
    font-size: 0.6rem !important;
    font-weight: 600;
    color: #667eea;
    margin: 0;
    padding: 0 2px;
  }

  /* Day number styling — remains prominent for tap target */
  #tab-calendar .syl-fc-root .fc-daygrid-day-number {
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.35rem 0.45rem;
  }

  /* Compact toolbar in dot-mode month view */
  #tab-calendar .syl-fc-root .fc-toolbar-title {
    font-size: 1rem;
  }

  #tab-calendar .syl-fc-root .fc-button {
    font-size: 0.72rem;
    padding: 0.3em 0.55em;
  }
}

/* ══ MOBILE NOTE EDITOR — Apple Notes full-screen style ═════════════════════
   On mobile: modal expands to fill 100% of screen. Note color fills the whole
   screen. Quill toolbar hidden behind Aa button. Meta row hidden behind ⋯.
   Desktop keeps the existing card modal unchanged.
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Mobile action bar (hidden on desktop) ── */
.dash-note-mobile-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.7rem 1rem;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.dash-note-back-btn {
  background: none;
  border: none;
  color: #667eea;
  font-size: 1.15rem;
  cursor: pointer;
  padding: 0.2rem 0.5rem 0.2rem 0;
  display: flex;
  align-items: center;
  line-height: 1;
  transition: color 0.15s;
}

.dash-note-back-btn:hover { color: #4f46e5; }

.dash-note-mobile-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.dash-note-mobile-icon-btn {
  background: none;
  border: 1.5px solid rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  padding: 0.28rem 0.55rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  font-family: 'Inter', system-ui, sans-serif;
  line-height: 1.3;
}

.dash-note-mobile-icon-btn:hover {
  background: rgba(102, 126, 234, 0.08);
  border-color: #667eea;
  color: #667eea;
}

.dash-note-mobile-icon-btn.active {
  background: #eef2ff;
  border-color: #667eea;
  color: #667eea;
}

.dash-note-save-mobile-btn {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.32rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  font-family: 'Inter', system-ui, sans-serif;
  transition: opacity 0.15s;
  line-height: 1.3;
}

.dash-note-save-mobile-btn:hover { opacity: 0.88; }

/* ── Desktop-only close button ── */
.dash-note-desktop-close {
  /* Visible on desktop — hidden on mobile via media query below */
}

/* ── Mobile full-screen modal ── */
@media (max-width: 767px) {
  /* Full-screen modal dialog */
  #noteModal .modal-dialog {
    width: 100vw !important;
    max-width: none !important;
    height: 100% !important;
    margin: 0 !important;
  }

  /* Modal content fills entire screen */
  #noteModal .dash-note-modal-content {
    height: 100% !important;
    max-height: none !important;
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
    overflow: hidden;
  }

  /* Show mobile action bar */
  .dash-note-mobile-bar {
    display: flex;
  }

  /* Hide desktop close button */
  .dash-note-desktop-close {
    display: none !important;
  }

  /* Header: column layout, transparent so note color shows through */
  #noteModal .dash-note-modal-header {
    flex-direction: column;
    gap: 0;
    padding: 0;
    border-radius: 0;
    align-items: stretch;
    background: transparent;
    border-bottom: none;
  }

  /* Title row gets its own bottom border */
  #noteModal .dash-note-modal-title-row {
    padding: 0.65rem 1rem 0.75rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  }

  #noteModal .dash-note-title-input {
    font-size: 1.2rem;
  }

  /* Meta row: hidden by default, revealed by ⋯ button */
  #noteModal #noteMetaRow {
    display: none;
  }

  /* Quill toolbar: hidden by default, revealed by Aa button */
  #noteModal #noteQuillToolbar {
    display: none;
    background: transparent;
    border-bottom-color: rgba(0, 0, 0, 0.08) !important;
  }

  /* Footer: hidden on mobile — Save is in the top bar */
  #noteModal .dash-note-modal-footer {
    display: none !important;
  }

  /* Editor body fills remaining space */
  #noteModal .dash-note-modal-body {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    max-height: none !important;
  }

  /* Editor container fills viewport height minus header */
  #noteModal #noteEditorContainer {
    min-height: calc(100vh - 130px);
    height: 100%;
  }

  #noteModal #noteQuillEditor {
    min-height: calc(100vh - 170px);
    padding: 1rem;
  }

  #noteModal #noteQuillEditor .ql-editor {
    min-height: calc(100vh - 200px);
  }

  /* Color picker repositioned for full-screen context */
  #noteModal .dash-note-color-picker {
    left: auto;
    right: 0;
  }

  /* Tag picker z-index boost inside full-screen modal */
  #noteModal ~ .dash-tag-picker {
    z-index: 10500;
  }

  /* Larger tap targets and bigger text cursor in editor */
  .dash-note-mobile-bar {
    padding: 0.85rem 1rem;
  }

  .dash-note-back-btn {
    font-size: 1.3rem;
    padding: 0.2rem 0.75rem 0.2rem 0;
  }

  .dash-note-mobile-icon-btn {
    padding: 0.45rem 0.75rem;
    font-size: 0.9rem;
  }

  .dash-note-save-mobile-btn {
    padding: 0.45rem 1.1rem;
    font-size: 0.9rem;
  }

  /* Larger, more readable editor text on mobile */
  #noteModal #noteQuillEditor .ql-editor {
    font-size: 1.05rem;
    line-height: 1.75;
    padding: 1.25rem 1.1rem;
    caret-color: #667eea;
  }
}

/* ══ DESKTOP NOTE EDITOR — fills content canvas (dashboard only) ═════════════
   Use position:fixed on the dialog to occupy exactly the content area
   (right of the 220px sidebar, below the 62px topbar). Bypasses Bootstrap's
   flex-centering which fights height-100% layouts.
   ══════════════════════════════════════════════════════════════════════════ */

@media (min-width: 768px) {
  /* Dialog is fixed directly into the content area — no flex fight */
  body.dash-page #noteModal .modal-dialog {
    position: fixed !important;
    top: 62px !important;
    left: 220px !important;
    right: 0 !important;
    bottom: 0 !important;
    width: auto !important;
    max-width: none !important;
    height: auto !important;
    margin: 0 !important;
  }

  /* Modal content fills the fixed dialog 100% */
  body.dash-page #noteModal .dash-note-modal-content {
    height: 100% !important;
    max-height: 100% !important;
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
    border-left: 1px solid #e2e8f0;
    display: flex !important;
    flex-direction: column !important;
  }

  /* Transparent so note color pervades the whole canvas */
  body.dash-page #noteModal .dash-note-modal-header {
    background: transparent;
    border-bottom: 1.5px solid rgba(0, 0, 0, 0.07);
    border-radius: 0;
    flex-shrink: 0;
  }

  body.dash-page #noteModal #noteQuillToolbar {
    background: transparent;
    flex-shrink: 0;
  }

  body.dash-page #noteModal .dash-note-modal-footer {
    background: transparent;
    border-top: 1.5px solid rgba(0, 0, 0, 0.07);
    flex-shrink: 0;
  }

  /* Body grows to fill remaining height and scrolls independently */
  body.dash-page #noteModal .dash-note-modal-body {
    flex: 1 1 0 !important;
    overflow-y: auto !important;
    min-height: 0 !important;
    max-height: none !important;
  }

  /* Editor container fills the body */
  body.dash-page #noteModal #noteEditorContainer {
    display: flex !important;
    flex-direction: column !important;
    min-height: 100% !important;
  }

  body.dash-page #noteModal #noteQuillEditor {
    flex: 1 !important;
    min-height: 320px !important;
    border: none !important;
  }
}

/* ── Imported calendar groups in sidebar ── */
.dash-sidebar-cal-group {
  cursor: default;
  justify-content: flex-start;
}
.dash-sidebar-cal-group:hover {
  background: #f0f9ff;
  color: #0891b2;
}
.dash-sidebar-cal-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #475569;
  font-size: 0.82rem;
  font-weight: 500;
}
.dash-sidebar-cal-group:hover .dash-sidebar-cal-name {
  color: #0891b2;
}
.dash-sidebar-cal-count {
  font-size: 0.72rem;
  color: #94a3b8;
  font-weight: 600;
  flex-shrink: 0;
}
.dash-cal-del-form {
  margin: 0;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.15s;
}
.dash-sidebar-cal-group:hover .dash-cal-del-form {
  opacity: 1;
}
.dash-cal-del-btn {
  background: none;
  border: none;
  padding: 0 0.15rem;
  cursor: pointer;
  color: #94a3b8;
  font-size: 0.75rem;
  line-height: 1;
  transition: color 0.15s;
}
.dash-cal-del-btn:hover {
  color: #ef4444;
}

/* ══ MOBILE AVATAR AS SETTINGS LINK ════════════════════════════════════════ */

a.dash-mobile-avatar {
  text-decoration: none;
  color: #fff;
  cursor: pointer;
}

/* Calendar import button in mobile top bar */
.dash-mobile-import-btn {
  background: linear-gradient(135deg, #0891b2, #0e7490) !important;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ══ MOBILE HOME — My Calendars + Quick Links ════════════════════════════════
   Hidden on desktop (sidebar shows this content). Only visible ≤767px.
   ══════════════════════════════════════════════════════════════════════════ */

.dash-home-mobile-more {
  display: none;
}

@media (max-width: 767px) {
  .dash-home-mobile-more {
    display: block;
  }
}

/* My Calendars list */
.dash-home-cal-list {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 1.25rem;
}

.dash-home-cal-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid #f1f5f9;
}

.dash-home-cal-item:last-child {
  border-bottom: none;
}

.dash-home-cal-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dash-home-cal-label {
  flex: 1;
  font-size: 0.9rem;
  font-weight: 500;
  color: #1e293b;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dash-home-cal-count {
  font-size: 0.78rem;
  color: #94a3b8;
  font-weight: 600;
  flex-shrink: 0;
}

.dash-home-cal-del-form {
  margin: 0;
  flex-shrink: 0;
}

.dash-home-cal-del-btn {
  background: none;
  border: none;
  padding: 0.4rem 0.5rem;
  cursor: pointer;
  color: #cbd5e1;
  font-size: 0.85rem;
  transition: color 0.15s;
  min-height: 44px;
  min-width: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dash-home-cal-del-btn:hover,
.dash-home-cal-del-btn:active {
  color: #ef4444;
}

/* Quick links 2×2 grid */
.dash-home-quick-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin-bottom: 1.5rem;
}

.dash-home-quick-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.9rem 1rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  text-decoration: none;
  color: #1e293b;
  font-size: 0.875rem;
  font-weight: 600;
  transition: background 0.15s, border-color 0.15s;
  min-height: 52px;
}

.dash-home-quick-link:hover,
.dash-home-quick-link:active {
  background: #f5f3ff;
  border-color: #c4b5fd;
  color: #7B61FF;
}

.dash-home-quick-link i {
  color: #7B61FF;
  font-size: 1rem;
  width: 1.1rem;
  text-align: center;
  flex-shrink: 0;
}

/* ══ COURSE DETAIL — MOBILE PADDING FIX ════════════════════════════════════
   Bootstrap .row.g-3 uses negative margins; without horizontal padding on the
   parent the columns bleed to the screen edge on mobile.
   ══════════════════════════════════════════════════════════════════════════ */

/* Course detail banners (calendar / import notices) */
.course-detail-banner {
  border-radius: 10px;
  padding: .8rem 1.1rem;
  margin: 0 0 1.25rem;
  font-size: .875rem;
  display: flex;
  align-items: flex-start;
  gap: .65rem;
  line-height: 1.5;
}

.course-detail-banner--teal {
  background: #ecfeff;
  border: 1px solid #a5f3fc;
  color: #155e75;
}

.course-detail-banner--blue {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
}

@media (max-width: 767px) {
  .course-detail-root {
    padding: 0 1rem 2rem;
  }

  /* Hero card goes full-bleed on mobile */
  .course-detail-hero {
    margin-left: -1rem;
    margin-right: -1rem;
    border-radius: 0;
  }

  /* Banners also full-bleed on mobile */
  .course-detail-banner {
    margin-left: -1rem;
    margin-right: -1rem;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }
}

/* ══ TASK FILTERS — MOBILE OVERFLOW FIX ════════════════════════════════════ */

@media (max-width: 640px) {
  .dash-filter-group select {
    min-width: 0;
    flex: 1;
  }

  .dash-filter-row {
    gap: 0.6rem;
  }

  .dash-filter-group {
    flex: 1;
    min-width: 0;
  }
}

/* ══ TOUCH TARGET POLISH ════════════════════════════════════════════════════
   Small icon buttons (28px) are below the 44px recommended touch target.
   On touch devices expand the effective tappable area without changing layout.
   ══════════════════════════════════════════════════════════════════════════ */

@media (hover: none), (pointer: coarse) {
  /* Course event edit / delete buttons */
  .course-event-action-btn {
    width: 36px;
    height: 36px;
    font-size: 0.8rem;
  }

  /* Bootstrap modal: slide up from bottom on mobile for easier thumb reach */
  .modal-dialog {
    margin: 0 auto;
    display: flex;
    align-items: flex-end;
    min-height: 100%;
  }

  .modal-content {
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    border-radius: 20px 20px 0 0 !important;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  /* Except the note modal which is already full-screen */
  #noteModal .modal-dialog {
    align-items: stretch;
    min-height: 100%;
  }
  #noteModal .modal-content {
    border-radius: 0 !important;
  }

  /* Dashboard greeting upload pill — larger tap area */
  .dash-home-upload-pill {
    min-height: 44px;
    padding: 0 1rem;
  }

  /* Add task / primary buttons touch comfort */
  .dash-sidebar-add-btn,
  .dash-btn-primary {
    min-height: 44px;
  }
}

/* ── Course color picker ───────────────────────────────────────────── */
.dash-sidebar-course-entry {
  position: relative;
}

.dash-course-color-trigger {
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.15s;
}
.dash-course-color-trigger:hover {
  transform: scale(1.3);
}

.dash-course-color-picker {
  position: absolute;
  left: 0.6rem;
  top: calc(100% + 4px);
  z-index: 300;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.45rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  box-shadow: 0 6px 20px rgba(15,23,42,0.13);
  width: 152px;
}

.dash-course-swatch {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.12s, border-color 0.12s;
  padding: 0;
}
.dash-course-swatch:hover {
  transform: scale(1.2);
  border-color: rgba(0,0,0,0.25);
}
.dash-course-swatch--active {
  border-color: #1e293b !important;
  transform: scale(1.15);
}

/* ── Course danger zone ────────────────────────────────────────────── */
.course-danger-zone {
  border: 1px solid #fecaca;
  border-radius: 12px;
  overflow: hidden;
}

.course-danger-summary {
  list-style: none;
  padding: 0.85rem 1.1rem;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 700;
  color: #b91c1c;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #fff5f5;
  user-select: none;
}
.course-danger-summary::-webkit-details-marker { display: none; }
.course-danger-summary:hover { background: #fee2e2; }

.course-danger-body {
  background: #fff;
  padding: 1rem 1.1rem;
  border-top: 1px solid #fecaca;
}

.course-danger-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.course-danger-row strong {
  font-size: 0.9rem;
  color: #1e293b;
}

.course-danger-row p {
  font-size: 0.82rem;
  color: #64748b;
  margin: 0.2rem 0 0;
}

.course-danger-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  background: #fff;
  border: 1.5px solid #ef4444;
  border-radius: 8px;
  color: #dc2626;
  font-size: 0.85rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.course-danger-btn:hover {
  background: #ef4444;
  color: #fff;
}

@media (hover: none), (pointer: coarse) {
  .course-danger-btn { min-height: 44px; }
}
