/* ===== IN-PLACE EXPANDING QUICK ADD BAR ===== */
.hero-add-bar {
  width: 100%;
  max-width: 640px;
  position: relative;
  z-index: 10;
}

.hero-add-bar__row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.85rem 1.25rem;
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
  will-change: box-shadow;
}

.hero-add-bar__icon {
  color: var(--text-muted);
  font-size: 0.9rem;
  flex-shrink: 0;
  transition: color 0.25s ease;
}

.hero-add-bar__input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 0.95rem;
  color: var(--text);
  outline: none !important;
  box-shadow: none !important;
  -webkit-appearance: none;
  font-family: inherit;
}

.hero-add-bar__input:focus {
  outline: none !important;
  box-shadow: none !important;
}

.hero-add-bar__input::placeholder {
  color: var(--text-subtle, var(--text-muted));
}

/* Mode toggle button (manual ↔ AI) */
.hero-add-bar__mode-toggle {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  transition: background 0.15s ease, color 0.15s ease;
  flex-shrink: 0;
}

.hero-add-bar__mode-toggle:hover {
  background: var(--surface-2);
  color: var(--primary);
}

/* When in AI mode, highlight the toggle */
.hero-add-bar.ai-mode .hero-add-bar__mode-toggle {
  background: var(--primary);
  color: white;
}

.hero-add-bar.ai-mode .hero-add-bar__mode-toggle:hover {
  background: var(--primary-strong, #4A58DB);
}

/* Subtle left accent on the row in AI mode */
.hero-add-bar.ai-mode .hero-add-bar__row {
  border-left: 2px solid var(--primary);
}

.hero-add-bar__collapse {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: none;
  background: var(--surface-2);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  transition: all 0.15s ease;
}

.hero-add-bar__collapse:hover {
  background: var(--surface-3);
  color: var(--text);
}

/* Body: hidden by default, slides open */
.hero-add-bar__body {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.3s ease 0.05s;
  background: var(--surface);
  border-radius: 0 0 12px 12px;
}

/* ── EXPANDED STATE ── */
/* Row stays visually identical — only a subtle shadow appears.
   No border-radius, padding, or border-width changes. */
.hero-add-bar.expanded .hero-add-bar__row {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.hero-add-bar.expanded .hero-add-bar__icon {
  color: var(--text);
}

.hero-add-bar.expanded .hero-add-bar__body {
  max-height: 360px;
  opacity: 1;
  padding: 0.5rem 1.25rem 0.75rem;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.hero-add-bar.expanded .hero-add-bar__body .live-task-list {
  max-height: 260px;
  overflow-y: auto;
  min-height: 40px;
}

/* Content dims behind expanded bar */
#dashboardContent {
  transition: opacity 0.35s ease, filter 0.35s ease;
}

#dashboardContent.dimmed {
  opacity: 0.2;
  pointer-events: none;
  filter: blur(3px);
}

/* ===== DASHBOARD CHECKLIST PANEL (left column - legacy, kept for compat) ===== */
/* Now uses .dashboard-focus-panel in index.css */

/* ===== LEGACY TASKS PANEL ===== */
.dashboard-tasks-panel {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  min-height: 400px;
  max-height: 800px;
}

.dashboard-tasks-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.dashboard-tasks-panel__header h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dashboard-tasks-panel__header h3 i {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.dashboard-tasks-panel__add {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.15s ease;
  font-size: 0.75rem;
}

.dashboard-tasks-panel__add:hover {
  background: var(--surface-2);
  color: var(--primary);
}

.dashboard-tasks-panel__body {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

/* Override all_tasks styles to fit dashboard panel context */
.dashboard-tasks-panel .at-section-divider {
  padding: 0.5rem 0.85rem;
  border-bottom: 1px solid var(--border);
}

.dashboard-tasks-panel .at-section-divider__title {
  font-size: 0.75rem;
}

.dashboard-tasks-panel .at-section-divider__icon {
  font-size: 0.7rem;
}

.dashboard-tasks-panel .task-count {
  font-size: 0.65rem;
}

.dashboard-tasks-panel .task-card {
  padding: 0.5rem 0.85rem;
}

.dashboard-tasks-panel .task-card__title {
  font-size: 0.825rem;
}

.dashboard-tasks-panel .task-card__meta {
  font-size: 0.7rem;
}

.dashboard-tasks-panel .task-pill {
  font-size: 0.65rem;
}

/* ===== AI RESPONSE AREA (inside the add bar body) ===== */
.ai-response-area {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 240px;
  overflow-y: auto;
  min-height: 40px;
}

.ai-response-hint {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 0;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-style: italic;
}

.ai-response-hint i {
  color: var(--primary);
  opacity: 0.5;
}

.ai-response-query {
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.25rem;
}

.ai-response-thinking {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 0.5rem 0;
}

.ai-response-thinking i {
  color: var(--primary);
}

.ai-response-card {
  display: flex;
  gap: 0.6rem;
  padding: 0.6rem 0.75rem;
  background: var(--surface-2);
  border-radius: 8px;
  animation: chatMsgIn 0.2s ease-out;
}

.ai-response-card__icon {
  color: var(--primary);
  font-size: 0.75rem;
  flex-shrink: 0;
  margin-top: 0.15rem;
}

.ai-response-card__text {
  font-size: 0.825rem;
  line-height: 1.55;
  color: var(--text);
  white-space: pre-wrap;
}

.ai-response-card--success {
  background: var(--success-bg, rgba(16, 185, 129, 0.06));
  border-left: 3px solid var(--success, #10b981);
}

.ai-response-card--success .ai-response-card__icon {
  color: var(--success, #10b981);
}

.ai-response-card__content {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.ai-response-card__content strong {
  font-size: 0.825rem;
  color: var(--text);
}

.ai-response-tasks {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.ai-response-tasks li {
  font-size: 0.8rem;
  color: var(--text);
  padding: 0.15rem 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.ai-response-tasks li::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--success, #10b981);
  flex-shrink: 0;
}

.ai-response-tasks__date {
  font-size: 0.7rem;
  color: var(--text-muted);
}


.ai-response-message {
  font-size: 0.75rem;
  color: var(--text-muted);
  padding: 0.25rem 0;
  font-style: italic;
}

.ai-response-card--error {
  background: var(--danger-bg, rgba(239, 68, 68, 0.06));
  color: var(--danger, #ef4444);
  font-size: 0.8rem;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
}

/* ===== AI CHAT PANEL (legacy, kept for compat) ===== */
.ai-chat-panel {
  width: 100%;
  max-width: 640px;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  max-height: 420px;
  overflow: hidden;
  animation: viewFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.ai-chat-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.ai-chat-panel__title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

.ai-chat-panel__title i {
  color: var(--primary);
  font-size: 0.8rem;
}

.ai-chat-panel__close {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  transition: all 0.15s ease;
}

.ai-chat-panel__close:hover {
  background: var(--surface-2);
  color: var(--text);
}

.ai-chat-panel__messages {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-height: 120px;
}

.ai-chat-panel__welcome {
  text-align: center;
  padding: 1.5rem 0.5rem;
  color: var(--text-muted);
}

.ai-chat-panel__welcome p {
  font-size: 0.85rem;
  color: var(--text);
  margin: 0 0 0.35rem;
  font-weight: 500;
}

.ai-chat-panel__welcome span {
  font-size: 0.75rem;
  font-style: italic;
}

.ai-chat-panel__input-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.75rem;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.ai-chat-panel__input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 0.875rem;
  color: var(--text);
  outline: none !important;
  box-shadow: none !important;
  font-family: inherit;
  padding: 0.4rem 0;
}

.ai-chat-panel__input::placeholder {
  color: var(--text-subtle, var(--text-muted));
}

.ai-chat-panel__send {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: var(--primary);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.ai-chat-panel__send:hover {
  background: var(--primary-strong);
}

/* Chat messages (shared between AI panel) */
.ai-chat-msg {
  max-width: 80%;
  padding: 0.5rem 0.75rem;
  border-radius: 10px;
  font-size: 0.8rem;
  line-height: 1.5;
  animation: chatMsgIn 0.2s ease-out;
}

@keyframes chatMsgIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.ai-chat-msg--user {
  align-self: flex-end;
  background: var(--primary);
  color: white;
  border-bottom-right-radius: 3px;
}

.ai-chat-msg--ai {
  align-self: flex-start;
  background: var(--surface-2);
  color: var(--text);
  border-bottom-left-radius: 3px;
}

.ai-chat-msg--thinking {
  align-self: flex-start;
  background: var(--surface-2);
  color: var(--text-muted);
  font-style: italic;
}

/* ===== LEGACY INLINE AI CHAT VIEW (unused, kept for compat) ===== */
.ai-chat-inline {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  min-height: 450px;
  max-height: 70vh;
  overflow: hidden;
}

.ai-chat-inline__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.ai-chat-inline__title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ai-chat-inline__title i {
  color: var(--primary);
}

.ai-chat-inline__title h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
  color: var(--text);
}

.ai-chat-inline__close {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ai-chat-inline__close:hover {
  background: var(--surface-2);
  color: var(--text);
}

.ai-chat-inline__messages {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.ai-chat-inline__welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

.ai-chat-inline__welcome i {
  font-size: 2.5rem;
  color: var(--primary);
  opacity: 0.4;
  margin-bottom: 1rem;
}

.ai-chat-inline__welcome p {
  font-size: 0.95rem;
  color: var(--text);
  margin: 0 0 0.5rem;
  font-weight: 500;
}

.ai-chat-inline__welcome span {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
}

/* Chat messages */
.ai-chat-msg {
  max-width: 80%;
  padding: 0.65rem 0.9rem;
  border-radius: 12px;
  font-size: 0.875rem;
  line-height: 1.5;
  animation: chatMsgIn 0.25s ease-out;
}

@keyframes chatMsgIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.ai-chat-msg--user {
  align-self: flex-end;
  background: var(--primary);
  color: white;
  border-bottom-right-radius: 4px;
}

.ai-chat-msg--ai {
  align-self: flex-start;
  background: var(--surface-2);
  color: var(--text);
  border-bottom-left-radius: 4px;
}

.ai-chat-msg--thinking {
  align-self: flex-start;
  background: var(--surface-2);
  color: var(--text-muted);
  font-style: italic;
}

.ai-chat-inline__input-row {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.ai-chat-inline__textarea {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.6rem 0.85rem;
  font-size: 0.875rem;
  font-family: inherit;
  background: var(--surface-2);
  color: var(--text);
  resize: none;
  outline: none;
  transition: border-color 0.15s ease;
}

.ai-chat-inline__textarea:focus {
  border-color: var(--primary);
}

.ai-chat-inline__send {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: none;
  background: var(--primary);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.ai-chat-inline__send:hover {
  background: var(--primary-strong);
}

/* ===== VIEW SWITCHING ===== */
.dashboard-view {
  animation: viewFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.dashboard-view--hidden {
  display: none !important;
}

@keyframes viewFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== DEADLINES & FEEDBACK PANEL ===== */
.dl-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}

.dl-panel__grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  min-height: 360px;
  max-height: 600px;
}

/* Column shared styles */
.dl-timeline-col,
.dl-feedback-col {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.dl-feedback-col {
  border-left: 1px solid var(--border);
}

/* Column headers */
.dl-col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  background: var(--surface);
}

.dl-col-header__left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.dl-col-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.dl-col-icon--deadlines {
  background: var(--primary-bg);
  color: var(--primary);
}

.dl-col-icon--feedback {
  background: var(--warning-bg);
  color: var(--warning-strong, #d97706);
}

.dl-col-title {
  font-size: 0.95rem;
  font-weight: 650;
  color: var(--text);
  margin: 0;
  line-height: 1.2;
}

.dl-col-subtitle {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin: 0.1rem 0 0;
}

.dl-feedback-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 11px;
  background: var(--warning-bg);
  color: var(--warning-strong, #d97706);
  font-size: 0.72rem;
  font-weight: 700;
}

/* ===== TIMELINE ===== */
.dl-timeline-body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.25rem;
  min-height: 0;
}

.dl-timeline-body::-webkit-scrollbar { width: 4px; }
.dl-timeline-body::-webkit-scrollbar-track { background: transparent; }
.dl-timeline-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }

.dl-timeline {
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Timeline item */
.dl-tl-item {
  display: flex;
  gap: 0.85rem;
  --urgency-color: var(--primary);
  --urgency-bg: var(--primary-bg);
  animation: dlCardIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

.dl-tl-item--warning {
  --urgency-color: var(--warning, #f59e0b);
  --urgency-bg: var(--warning-bg);
}

.dl-tl-item--critical {
  --urgency-color: var(--danger, #ef4444);
  --urgency-bg: var(--danger-bg);
}

@keyframes dlCardIn {
  from { opacity: 0; transform: translateX(-8px) translateY(4px); }
  to { opacity: 1; transform: none; }
}

/* Node (icon + line) */
.dl-tl-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  width: 32px;
  padding-top: 0.65rem;
}

.dl-tl-node__icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--surface);
  border: 2px solid var(--urgency-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  color: var(--urgency-color);
  z-index: 1;
  box-shadow: 0 0 0 3px var(--urgency-bg, var(--primary-bg));
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.dl-tl-item--critical .dl-tl-node__icon {
  background: var(--danger, #ef4444);
  color: white;
  animation: urgentPulse 2.5s ease-in-out infinite;
}

@keyframes urgentPulse {
  0%, 100% { box-shadow: 0 0 0 3px var(--danger-bg); }
  50% { box-shadow: 0 0 0 6px transparent; }
}

.dl-tl-node__line {
  width: 2px;
  flex: 1;
  margin-top: 0.3rem;
  background: linear-gradient(to bottom, var(--urgency-color), var(--border) 70%, transparent);
  border-radius: 1px;
  opacity: 0.4;
}

/* Card */
.dl-tl-card {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  margin-bottom: 0.6rem;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.dl-tl-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2.5px;
  background: linear-gradient(90deg, var(--urgency-color), transparent 80%);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.dl-tl-card:hover {
  border-color: var(--border-2);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
  transform: translateY(-1px);
}

.dl-tl-card:hover::before {
  opacity: 1;
}

.dl-tl-item--critical .dl-tl-card {
  border-left: 3px solid var(--danger, #ef4444);
  background: var(--danger-bg);
}

.dl-tl-item--warning .dl-tl-card {
  border-left: 3px solid var(--warning, #f59e0b);
}

/* Card top */
.dl-tl-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.3rem;
}

.dl-tl-card__title {
  font-size: 0.88rem;
  font-weight: 620;
  color: var(--text);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Countdown badge */
.dl-tl-card__countdown {
  display: flex;
  align-items: baseline;
  gap: 0.2rem;
  flex-shrink: 0;
  padding: 0.2rem 0.55rem;
  border-radius: 7px;
  background: var(--urgency-bg, var(--primary-bg));
}

.dl-tl-countdown__value {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--urgency-color);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.dl-tl-countdown__unit {
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--urgency-color);
  opacity: 0.7;
  text-transform: lowercase;
}

.dl-tl-item--critical .dl-tl-card__countdown {
  background: var(--danger, #ef4444);
}
.dl-tl-item--critical .dl-tl-countdown__value,
.dl-tl-item--critical .dl-tl-countdown__unit {
  color: white;
}

/* Card meta */
.dl-tl-card__meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.dl-tl-card__subject {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-weight: 550;
}

.dl-tl-card__subject-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--subject-color, var(--primary));
  flex-shrink: 0;
}

.dl-tl-card__date {
  font-weight: 400;
}

/* Card progress */
.dl-tl-card__progress {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.dl-tl-card__progress-track {
  flex: 1;
  height: 4px;
  background: var(--surface-3);
  border-radius: 2px;
  overflow: hidden;
}

.dl-tl-card__progress-fill {
  height: 100%;
  border-radius: 2px;
  background: var(--urgency-color);
  transition: width 0.6s ease;
}

.dl-tl-card__progress-label {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* ===== FEEDBACK COLUMN ===== */
.dl-feedback-body {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem 1rem;
  min-height: 0;
  max-height: 480px;
}

.dl-feedback-body::-webkit-scrollbar { width: 4px; }
.dl-feedback-body::-webkit-scrollbar-track { background: transparent; }
.dl-feedback-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }

/* Feedback loading */
.dl-feedback-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  gap: 0.75rem;
}

.dl-feedback-loading__spinner {
  width: 24px;
  height: 24px;
  border: 2.5px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: dlSpin 0.7s linear infinite;
}

@keyframes dlSpin {
  to { transform: rotate(360deg); }
}

/* Feedback cards */
.dl-fb-card {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0.75rem 0.85rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--warning, #f59e0b);
  border-radius: 10px;
  margin-bottom: 0.5rem;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  animation: dlFbIn 0.3s ease-out both;
}

.dl-fb-card:nth-child(1) { animation-delay: 0ms; }
.dl-fb-card:nth-child(2) { animation-delay: 60ms; }
.dl-fb-card:nth-child(3) { animation-delay: 120ms; }
.dl-fb-card:nth-child(4) { animation-delay: 180ms; }

@keyframes dlFbIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.dl-fb-card:hover {
  border-color: var(--border-2);
  border-left-color: var(--primary);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
  transform: translateY(-1px);
}

.dl-fb-card__info {
  flex: 1;
  min-width: 0;
}

.dl-fb-card__type {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  background: var(--surface-2);
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.dl-fb-card__title {
  font-size: 0.85rem;
  font-weight: 620;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 0.15rem;
}

.dl-fb-card__subject {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.dl-fb-card__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.dl-fb-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.7rem;
  background: var(--primary);
  color: white;
  border-radius: 7px;
  text-decoration: none;
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
  transition: all 0.15s ease;
  border: none;
  cursor: pointer;
}

.dl-fb-card__cta:hover {
  background: var(--primary-strong);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(91, 108, 240, 0.25);
}

.dl-fb-card__cta i { font-size: 0.6rem; }

.dl-fb-card__dismiss {
  background: none;
  border: none;
  color: var(--text-subtle, var(--text-muted));
  font-size: 0.65rem;
  cursor: pointer;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  transition: all 0.15s ease;
  opacity: 0;
}

.dl-fb-card:hover .dl-fb-card__dismiss {
  opacity: 1;
}

.dl-fb-card__dismiss:hover {
  color: var(--danger, #ef4444);
  background: var(--danger-bg);
}

/* Dismiss confirmation */
.dl-fb-confirm {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.45rem 0.65rem;
  margin-top: 0;
  background: var(--surface-2);
  border-radius: 7px;
  font-size: 0.72rem;
  color: var(--text-muted);
  animation: dlFbIn 0.15s ease-out;
}

.dl-fb-confirm__actions {
  display: flex;
  gap: 0.35rem;
}

.dl-fb-confirm__yes {
  padding: 0.2rem 0.5rem;
  border: none;
  border-radius: 5px;
  font-size: 0.68rem;
  font-weight: 600;
  cursor: pointer;
  background: var(--danger, #ef4444);
  color: white;
  transition: opacity 0.15s;
}

.dl-fb-confirm__yes:hover { opacity: 0.85; }

.dl-fb-confirm__no {
  padding: 0.2rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 5px;
  font-size: 0.68rem;
  font-weight: 600;
  cursor: pointer;
  background: var(--surface);
  color: var(--text);
  transition: background 0.15s;
}

.dl-fb-confirm__no:hover { background: var(--surface-2); }

/* Submitted animation */
.dl-fb-card--submitted {
  animation: dlFbDismiss 0.4s ease-in forwards !important;
}

@keyframes dlFbDismiss {
  0% { opacity: 1; transform: scale(1); }
  40% { opacity: 1; transform: scale(1.01); background: var(--success-bg); border-left-color: var(--success); }
  100% { opacity: 0; transform: translateX(16px); height: 0; padding: 0; margin: 0; overflow: hidden; }
}

/* ===== EMPTY STATES ===== */
.dl-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1rem;
  text-align: center;
  min-height: 200px;
}

.dl-empty-state__icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--text-muted);
  opacity: 0.5;
  margin-bottom: 0.75rem;
}

.dl-empty-state__title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 0.2rem;
}

.dl-empty-state__desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0;
  max-width: 220px;
}

/* Feedback empty state */
.dl-fb-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.25rem;
  text-align: center;
  min-height: 200px;
}

.dl-fb-empty__icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--success-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--success);
  margin-bottom: 0.75rem;
}

.dl-fb-empty__title {
  font-size: 0.92rem;
  font-weight: 620;
  color: var(--text);
  margin: 0 0 0.2rem;
}

.dl-fb-empty__desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 0;
  max-width: 200px;
}

/* ===== DL PANEL RESPONSIVE ===== */
@media (max-width: 900px) {
  .dl-panel__grid {
    grid-template-columns: 1fr;
    max-height: none;
  }

  .dl-feedback-col {
    border-left: none;
    border-top: 1px solid var(--border);
  }

  .dl-timeline-body,
  .dl-feedback-body {
    max-height: 350px;
  }
}

/* ===== SUBJECTS VIEW — 2-COL WIDE CARDS ===== */
.subjects-view { padding: 0.5rem 0; }

.subjects-view__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.subjects-view__header h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.subjects-view__links {
  display: flex;
  gap: 0.35rem;
}

.subjects-view__link {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.15s ease;
}

.subjects-view__link:hover {
  color: var(--primary);
  border-color: var(--primary);
}

/* 2-column grid */
.sdash-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

/* ===== SUBJECT CARD (horizontal / wide) ===== */
.sdash-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  animation: viewFadeIn 0.35s ease-out backwards;
}

.sdash-card:nth-child(1) { animation-delay: 0s; }
.sdash-card:nth-child(2) { animation-delay: 0.04s; }
.sdash-card:nth-child(3) { animation-delay: 0.08s; }
.sdash-card:nth-child(4) { animation-delay: 0.12s; }
.sdash-card:nth-child(5) { animation-delay: 0.16s; }
.sdash-card:nth-child(6) { animation-delay: 0.2s; }

.sdash-card:hover {
  border-color: var(--subject-color);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.07);
  transform: translateY(-2px);
}

/* Left column: accent bar + ring */
.sdash-card__left {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem 1.5rem 0.5rem;
  position: relative;
}

.sdash-card__bar {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--subject-color);
  border-radius: 0 4px 4px 0;
}

.sdash-ring-canvas {
  width: 104px;
  height: 104px;
}

/* Right column: header + chart */
.sdash-card__right {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 1.1rem 1.25rem 1.25rem 0.25rem;
  gap: 0.75rem;
  min-width: 0;
}

/* Header: name + stats */
.sdash-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.sdash-card__name-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
}

.sdash-card__name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.sdash-card__qual {
  font-size: 0.6rem;
  color: var(--text-muted);
  font-weight: 500;
  background: var(--surface-2);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  text-transform: uppercase;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}

/* Stats in header */
.sdash-card__stats {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}

.sdash-fstat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.05rem;
}

.sdash-fstat__val {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
}

.sdash-fstat__lbl {
  font-size: 0.6rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.sdash-fstat__sep {
  width: 1px;
  height: 20px;
  background: var(--border);
  flex-shrink: 0;
}

/* Weekly chart area */
.sdash-card__chart-area {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
  min-height: 0;
}

.sdash-card__chart-label {
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.sdash-weekly-canvas {
  width: 100%;
  height: 90px;
  display: block;
}

/* ===== SUBJECTS RESPONSIVE ===== */
@media (max-width: 900px) {
  .sdash-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .subjects-view__header {
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-start;
  }

  .subjects-view__links {
    flex-wrap: wrap;
  }

  .sdash-card {
    flex-direction: column;
  }

  .sdash-card__left {
    flex-direction: row;
    padding: 0.75rem 1rem;
    justify-content: flex-start;
  }

  .sdash-card__bar {
    top: 0;
    bottom: auto;
    left: 0;
    right: 0;
    width: auto;
    height: 4px;
    border-radius: 0 0 4px 4px;
  }

  .sdash-ring-canvas {
    width: 80px;
    height: 80px;
  }

  .sdash-card__right {
    padding: 0 1rem 0.85rem;
  }

  .sdash-card__header {
    flex-direction: column;
    gap: 0.35rem;
  }
}
