/* ============================================================
   MinDag – style.css (functional first)
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 15px;
  background: #f5f5f5;
  color: #1a1a1a;
  min-height: 100vh;
}

/* --- Nav --- */
#nav {
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
  position: sticky;
  top: 0;
  z-index: 10;
}
.nav-inner {
  max-width: 1500px;
  margin: 0 auto 0 0;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  gap: 2rem;
  height: 52px;
}
.nav-brand {
  font-weight: 700;
  font-size: 1.1rem;
  color: #2563eb;
}
.nav-links { display: flex; gap: 0.25rem; }
.nav-link {
  text-decoration: none;
  color: #555;
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  font-size: 0.9rem;
}
.nav-link:hover { background: #f0f0f0; color: #1a1a1a; }
.nav-link.active { background: #eff6ff; color: #2563eb; font-weight: 600; }

/* --- Main --- */
#app {
  max-width: 1500px;
  margin: 0 auto 0 0;
  padding: 2rem 2rem 5rem;
}

/* --- View header --- */
.view-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}
.view-header h1 { font-size: 1.6rem; font-weight: 700; }
.view-header-actions { display: flex; gap: 0.5rem; align-items: center; }
.date-label { font-size: 0.9rem; color: #666; margin-top: 2px; }

/* --- Buttons --- */
.btn-primary {
  background: #2563eb;
  color: #fff;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  white-space: nowrap;
}
.btn-primary:hover { background: #1d4ed8; }
.btn-secondary {
  background: #fff;
  color: #333;
  border: 1px solid #d0d0d0;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
}
.btn-secondary:hover { background: #f5f5f5; }
.btn-danger {
  background: #fff;
  color: #dc2626;
  border: 1px solid #dc2626;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
}
.btn-danger:hover { background: #fef2f2; }
.btn-sm { padding: 0.3rem 0.7rem; font-size: 0.82rem; }
.link-btn { background: none; border: none; color: #2563eb; cursor: pointer; font-size: inherit; text-decoration: underline; }

/* --- Card --- */
.card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 1rem 1.25rem;
}
.mb { margin-bottom: 1.25rem; }
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}
.card-header h2 { font-size: 1rem; font-weight: 600; }

/* --- Log summary (today view) --- */
.log-summary { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.log-pill {
  padding: 0.25rem 0.6rem;
  border-radius: 12px;
  font-size: 0.82rem;
  font-weight: 500;
}
.energy-pill { background: #fef3c7; color: #92400e; }
.mood-pill   { background: #dbeafe; color: #1e40af; }
.symptom-pill { background: #fce7f3; color: #9d174d; }
.ovulation-pill { background: #d1fae5; color: #065f46; }
.log-notes { font-size: 0.85rem; color: #555; margin-top: 0.5rem; width: 100%; }
.empty-hint { font-size: 0.9rem; color: #999; }

/* --- Task list --- */
.task-list { display: flex; flex-direction: column; gap: 2px; }

.task-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 6px;
  padding: 0.6rem 0.75rem;
}
.task-row:hover { border-color: #c0c0c0; }
.task-row.task-done { opacity: 0.55; }

.task-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #ccc;
  background: #fff;
  cursor: pointer;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
}
.task-check.checked { background: #2563eb; border-color: #2563eb; }
.task-check:hover { border-color: #2563eb; }

.task-body { flex: 1; min-width: 0; }
.task-body-main { cursor: pointer; }
.task-title { display: block; font-size: 0.92rem; }
.task-row.task-done .task-title { text-decoration: line-through; }

/* Subtask count badge */
.subtask-count {
  display: inline-block;
  font-size: 0.72rem;
  color: #6b7280;
  background: #f3f4f6;
  border-radius: 10px;
  padding: 0.05rem 0.45rem;
  margin-left: 0.4rem;
  vertical-align: middle;
}

/* Subtask list inline under parent */
.subtask-list {
  margin: 0.35rem 0 0.1rem 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
  border-left: 2px solid #e5e7eb;
  padding-left: 0.6rem;
}
.subtask-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0;
}
.subtask-row .task-check {
  width: 18px;
  height: 18px;
  font-size: 0.65rem;
}
.subtask-title {
  font-size: 0.85rem;
  cursor: pointer;
  color: #374151;
}
.subtask-row.task-done .subtask-title { text-decoration: line-through; color: #9ca3af; }

/* Add subtask button inline */
.add-subtask-btn {
  background: none;
  border: none;
  color: #9ca3af;
  font-size: 0.78rem;
  cursor: pointer;
  padding: 0.15rem 0;
  margin-top: 0.2rem;
  display: block;
}
.add-subtask-btn:hover { color: #2563eb; }

/* Subtasks section inside modal */
.modal-subtasks {
  border-top: 1px solid #e8e8e8;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
}
.modal-subtasks-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
}
.btn-link {
  background: none;
  border: none;
  color: #2563eb;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0;
  font-weight: 500;
}
.btn-link:hover { text-decoration: underline; }
.modal-subtasks-empty { font-size: 0.82rem; color: #9ca3af; }
.modal-subtask-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0;
}
.modal-subtask-row .task-check {
  width: 18px;
  height: 18px;
  font-size: 0.65rem;
}
.modal-subtask-title {
  font-size: 0.88rem;
  cursor: pointer;
  color: #374151;
}
.modal-subtask-row.task-done .modal-subtask-title { text-decoration: line-through; color: #9ca3af; }
.task-notes-preview { display: block; font-size: 0.8rem; color: #777; margin-top: 0.15rem; line-height: 1.3; }
.task-meta { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.3rem; }

.cat-badge {
  font-size: 0.72rem;
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.cat-phd                 { background: #dbeafe; color: #1e40af; }
.cat-hus                 { background: #d1fae5; color: #065f46; }
.cat-privat              { background: #fce7f3; color: #9d174d; }
.cat-bestyrelsesarbejde  { background: #fef3c7; color: #92400e; }

.proj-ref     { font-size: 0.78rem; color: #555; }
.due-tag      { font-size: 0.78rem; color: #555; }
.due-tag.overdue { color: #dc2626; font-weight: 600; }
.planned-tag  { font-size: 0.78rem; color: #888; }
.energy-tag   { font-size: 0.72rem; padding: 0.1rem 0.4rem; border-radius: 4px; }
.energy-low    { background: #f0fdf4; color: #166534; }
.energy-medium { background: #fefce8; color: #854d0e; }
.energy-high   { background: #fef2f2; color: #991b1b; }

.pri-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.pri-5 { background: #dc2626; }
.pri-4 { background: #ea580c; }
.pri-3 { background: #ca8a04; }
.pri-2 { background: #2563eb; }
.pri-1 { background: #9ca3af; }

.done-divider {
  font-size: 0.78rem;
  color: #999;
  padding: 0.75rem 0 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* --- Recurring tasks --- */
.recurring-list { display: flex; flex-direction: column; gap: 4px; }

.recurring-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 6px;
  padding: 0.65rem 0.75rem;
}
.recurring-row:hover { border-color: #c0c0c0; }
.recurring-paused { opacity: 0.6; }

.recurring-body { flex: 1; min-width: 0; }
.recurring-title { font-size: 0.92rem; font-weight: 500; }
.recurring-meta { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.3rem; align-items: center; }
.recurring-freq { font-size: 0.78rem; color: #555; background: #f3f4f6; padding: 0.1rem 0.45rem; border-radius: 10px; }
.recurring-status { font-size: 0.78rem; }
.recurring-status.active { color: #16a34a; }
.recurring-status.paused { color: #d97706; }

.recurring-actions { display: flex; gap: 0.35rem; }
.btn-icon {
  width: 28px;
  height: 28px;
  border-radius: 5px;
  border: 1px solid #e0e0e0;
  background: #fafafa;
  cursor: pointer;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn-icon:hover { background: #f0f0f0; border-color: #bbb; }
.btn-icon-danger:hover { background: #fee2e2; border-color: #fca5a5; color: #dc2626; }

/* --- Projects grid --- */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}
.project-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  cursor: pointer;
}
.project-card:hover { border-color: #2563eb; }
.project-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
}
.project-short { font-size: 0.78rem; font-weight: 700; color: #2563eb; text-transform: uppercase; letter-spacing: 0.05em; }
.project-name  { font-size: 0.95rem; font-weight: 600; margin-bottom: 0.25rem; }
.project-journal { font-size: 0.8rem; color: #777; margin-bottom: 0.6rem; }

.status-badge {
  font-size: 0.72rem;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-weight: 600;
}
.status-idea, .status-protocol           { background: #f3f4f6; color: #374151; }
.status-data_access, .status-data_management { background: #fef3c7; color: #92400e; }
.status-analysis                         { background: #dbeafe; color: #1e40af; }
.status-writing                          { background: #ede9fe; color: #5b21b6; }
.status-submitted, .status-under_review  { background: #fce7f3; color: #9d174d; }
.status-published                        { background: #d1fae5; color: #065f46; }

.progress-wrap { display: flex; align-items: center; gap: 0.5rem; margin: 0.6rem 0; }
.progress-track { flex: 1; height: 6px; background: #e5e7eb; border-radius: 3px; overflow: hidden; }
.progress-fill  { height: 100%; background: #2563eb; border-radius: 3px; transition: width 0.3s; }
.progress-label { font-size: 0.78rem; color: #666; min-width: 30px; text-align: right; }

.project-footer { display: flex; gap: 1rem; font-size: 0.78rem; color: #888; }

/* --- Filter bar --- */
.filter-bar { display: flex; gap: 0.75rem; margin-bottom: 1rem; }
.filter-bar select {
  padding: 0.4rem 0.75rem;
  border: 1px solid #d0d0d0;
  border-radius: 6px;
  font-size: 0.88rem;
  background: #fff;
  cursor: pointer;
}

/* --- Daily log list --- */
.log-list { display: flex; flex-direction: column; gap: 2px; }
.log-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 6px;
  padding: 0.6rem 1rem;
  cursor: pointer;
}
.log-row:hover { border-color: #c0c0c0; }
.log-row-date { font-size: 0.85rem; color: #444; min-width: 130px; }

.log-bars { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.bar-group { display: flex; align-items: center; gap: 0.4rem; }
.bar-label { font-size: 0.72rem; color: #999; width: 12px; }
.bar-track { flex: 1; height: 6px; background: #e5e7eb; border-radius: 3px; overflow: hidden; max-width: 160px; }
.bar-fill  { height: 100%; border-radius: 3px; }
.energy-fill { background: #f59e0b; }
.mood-fill   { background: #3b82f6; }
.bar-val { font-size: 0.78rem; color: #555; min-width: 14px; }

.log-symptoms { display: flex; gap: 0.35rem; }
.sym-dot { font-size: 0.7rem; color: #ec4899; }
.sym-dot.inactive { color: #e5e7eb; }
.pms-dot { color: #8b5cf6; }
.ov-dot  { color: #10b981; }

/* --- Modal --- */
#modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1rem;
}
#modal-overlay.hidden { display: none; }
#modal-box {
  background: #fff;
  border-radius: 10px;
  padding: 1.5rem;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}
.modal-header h2 { font-size: 1.1rem; font-weight: 700; }
.modal-close {
  background: none;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  color: #888;
  padding: 0.25rem;
}
.modal-close:hover { color: #333; }

/* --- Forms --- */
form label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: #444;
  margin-bottom: 0.9rem;
}
form input, form select, form textarea {
  padding: 0.5rem 0.65rem;
  border: 1px solid #d0d0d0;
  border-radius: 6px;
  font-size: 0.9rem;
  font-family: inherit;
  background: #fff;
  color: #1a1a1a;
}
form input:focus, form select:focus, form textarea:focus {
  outline: none;
  border-color: #2563eb;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid #f0f0f0;
}
.form-actions .btn-danger { margin-right: auto; }
.req { color: #dc2626; }

/* --- Checkboxes --- */
.checkbox-group { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 0.9rem; }
.check-label {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.88rem;
  font-weight: normal;
  color: #333;
  cursor: pointer;
  margin-bottom: 0 !important;
}
.check-label input { width: auto; margin: 0; }

/* --- Milestones --- */
.milestones-section { margin-top: 0.5rem; }
.milestones-section h3 { font-size: 0.9rem; font-weight: 600; margin-bottom: 0.5rem; }
.ms-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}
.ms-input { flex: 1; min-width: 100px; }
.ms-date  { width: 125px; flex-shrink: 0; }
.ms-dash  { color: #9ca3af; flex-shrink: 0; }
.ms-remove {
  background: none;
  border: none;
  color: #999;
  cursor: pointer;
  font-size: 0.85rem;
  padding: 0.25rem;
}
.ms-remove:hover { color: #dc2626; }

/* --- Today layout --- */
.today-layout {
  display: grid;
  grid-template-columns: 1fr 230px;
  gap: 1.25rem;
  align-items: start;
}
.today-main { min-width: 0; }
.today-side { position: sticky; top: 64px; }

/* Overdue banner */
.overdue-banner {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  overflow: hidden;
}
.overdue-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0.85rem;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 600;
  color: #c2410c;
}
.overdue-header:hover { background: #fff1e6; }
#overdue-list { padding: 0 0.75rem 0.75rem; }

/* Week strip */
.week-strip { display: flex; flex-direction: column; gap: 1px; }
.ws-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  cursor: pointer;
}
.ws-row:hover { background: #f5f9ff; }
.ws-today { background: #eff6ff; }
.ws-name  { font-size: 0.75rem; color: #888; width: 26px; flex-shrink: 0; }
.ws-num   { font-size: 0.88rem; font-weight: 600; width: 22px; text-align: center; flex-shrink: 0; }
.ws-dots  { display: flex; flex-wrap: wrap; gap: 2px; flex: 1; }
.ws-dot   { width: 7px; height: 7px; border-radius: 50%; }
.ws-count { font-size: 0.7rem; color: #bbb; min-width: 14px; text-align: right; }

/* --- Project detail view --- */
.proj-detail-tasks { display: flex; flex-direction: column; gap: 1rem; }

.ms-section {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
}
.ms-section-done { opacity: 0.65; }

.ms-section-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f0f0f0;
  background: #fafafa;
}
.ms-section-title {
  font-size: 0.92rem;
  font-weight: 600;
  flex: 1;
}
.ms-task-count {
  font-size: 0.78rem;
  color: #999;
  white-space: nowrap;
}

.ms-task-list { padding: 0.4rem 0.75rem 0.75rem; }
.ms-empty { padding: 0.5rem 1rem 0.75rem; }

/* --- Calendar --- */
.cal-list { display: flex; flex-direction: column; gap: 4px; }
.cal-row   { display: flex; align-items: baseline; gap: 0.75rem; padding: 0.35rem 0; border-bottom: 1px solid #f0f0f0; }
.cal-row:last-child { border-bottom: none; }
.cal-time  { font-size: 0.8rem; color: #2563eb; font-weight: 600; min-width: 110px; flex-shrink: 0; }
.cal-title { font-size: 0.9rem; flex: 1; }
.cal-loc   { font-size: 0.78rem; color: #888; }

/* --- Calendar page --- */
.cal-page-layout {
  display: grid;
  grid-template-columns: 1fr 290px;
  gap: 1.25rem;
  align-items: start;
}

/* Month grid */
.month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 1px;
  background: #e0e0e0;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
}
.month-day-header {
  background: #f5f5f5;
  text-align: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: #999;
  padding: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.month-day {
  background: #fff;
  padding: 0.3rem 0.35rem;
  min-height: 100px;
  cursor: pointer;
  vertical-align: top;
  min-width: 0;       /* allow the grid column to shrink (prevents blowout) */
  overflow: hidden;
}
.month-day:hover { background: #f5f9ff; }
.month-day.other-month { background: #fafafa; }
.month-day.other-month .month-day-num { color: #ccc; }
.month-day.is-today .month-day-num {
  background: #2563eb;
  color: #fff;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.month-day.is-selected {
  background: #eff6ff;
  outline: 2px solid #2563eb;
  outline-offset: -1px;
}
.month-day-num {
  font-size: 0.82rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
}
.month-day-items { display: flex; flex-direction: column; gap: 1px; margin-top: 2px; min-width: 0; }
.month-day-item {
  font-size: 0.68rem;
  padding: 0.1rem 0.3rem;
  border-radius: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.5;
}
.item-event                      { background: #6366f1; color: #fff; }
.item-task-phd                   { background: #dbeafe; color: #1e40af; }
.item-task-hus                   { background: #d1fae5; color: #065f46; }
.item-task-privat                { background: #fce7f3; color: #9d174d; }
.item-task-bestyrelsesarbejde    { background: #fef3c7; color: #92400e; }
.month-more { font-size: 0.65rem; color: #888; padding: 0.1rem 0.3rem; }

/* Week grid */
.week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}
.week-col {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  min-height: 320px;
  min-width: 0;       /* allow the grid column to shrink (prevents blowout) */
}
.week-col:hover { border-color: #93c5fd; }
.week-col.is-today { border-color: #2563eb; }
.week-col.is-selected { background: #eff6ff; border-color: #2563eb; }
.week-col-header {
  padding: 0.45rem 0.35rem;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}
.week-day-name { font-size: 0.66rem; color: #aaa; text-transform: uppercase; font-weight: 700; }
.week-day-num  { font-size: 0.9rem; font-weight: 600; }
.today-badge {
  background: #2563eb;
  color: #fff;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
}
.week-col-items { padding: 0.3rem; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.week-event {
  font-size: 0.68rem;
  padding: 0.12rem 0.3rem;
  border-radius: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.week-event-time { font-weight: 700; margin-right: 2px; }
.week-task {
  font-size: 0.68rem;
  padding: 0.12rem 0.3rem;
  border-radius: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}
.week-task:hover { filter: brightness(0.93); }
.cat-week-phd                 { background: #dbeafe; color: #1e40af; }
.cat-week-hus                 { background: #d1fae5; color: #065f46; }
.cat-week-privat              { background: #fce7f3; color: #9d174d; }
.cat-week-bestyrelsesarbejde  { background: #fef3c7; color: #92400e; }

/* Day panel */
.cal-side-panel {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 1rem;
  position: sticky;
  top: 64px;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
}
.cal-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
  gap: 0.5rem;
}
.cal-panel-header h2 { font-size: 0.92rem; font-weight: 600; }
.panel-section { margin-bottom: 1rem; }
.panel-section h3 {
  font-size: 0.7rem;
  color: #aaa;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.panel-event {
  display: flex;
  gap: 0.5rem;
  align-items: baseline;
  padding: 0.3rem 0;
  border-bottom: 1px solid #f5f5f5;
  font-size: 0.85rem;
}
.panel-event:last-child { border-bottom: none; }
.panel-event .cal-time { min-width: 90px; }

/* --- PhD Progress --- */
:root { --gantt-name-w: 110px; }

.phd-position {
  font-size: 0.88rem;
  color: #2563eb;
  font-weight: 600;
  background: #eff6ff;
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
}

.phd-stats-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}
.phd-stat-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 0.75rem 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 90px;
}
.stat-n     { font-size: 1.6rem; font-weight: 700; line-height: 1; }
.stat-label { font-size: 0.75rem; color: #888; }

/* Gantt */
.gantt-wrap { overflow-x: auto; }

.gantt-header-years,
.gantt-header-q {
  display: flex;
  align-items: stretch;
}
.gantt-name-spacer {
  width: var(--gantt-name-w);
  flex-shrink: 0;
}
.gantt-years {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.gantt-year-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.25rem;
  border-left: 1px solid #e0e0e0;
  font-size: 0.8rem;
  font-weight: 700;
  background: #f9fafb;
  line-height: 1.3;
}
.gantt-year-dates { font-size: 0.65rem; color: #aaa; font-weight: 400; }

.gantt-quarters {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(16, 1fr);
}
.gantt-q-cell {
  font-size: 0.6rem;
  color: #bbb;
  text-align: center;
  padding: 0.15rem 0;
  border-left: 1px solid #f0f0f0;
  background: #fafafa;
}

.gantt-rows { padding: 0.25rem 0; }

.gantt-section-header {
  display: flex;
  align-items: center;
  height: 26px;
  margin: 0.4rem 0 0.1rem;
}
.gantt-section-header span {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6b7280;
  background: #f3f4f6;
  border-radius: 4px;
  padding: 0.1rem 0.5rem;
  margin-left: var(--gantt-name-w);
}

.gantt-row {
  display: flex;
  align-items: center;
  height: 32px;
  cursor: pointer;
}
.gantt-row:hover .gantt-track { background: #f5f9ff; }

.gantt-name {
  width: var(--gantt-name-w);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding-right: 0.5rem;
}
.gantt-short { font-size: 0.78rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.gantt-track {
  flex: 1;
  position: relative;
  height: 22px;
  border-radius: 3px;
  display: flex;
  align-items: center;
}
.gantt-bar {
  position: absolute;
  height: 18px;
  border-radius: 4px;
  overflow: visible;
}
.gantt-fill {
  height: 100%;
  border-radius: 4px 0 0 4px;
  transition: width 0.3s;
}
.gantt-pct {
  position: absolute;
  right: -28px;
  font-size: 0.68rem;
  color: #aaa;
  white-space: nowrap;
}
.gantt-milestone {
  position: absolute;
  top: -6px;
  font-size: 0.6rem;
  color: #888;
  transform: translateX(-50%);
  cursor: default;
  z-index: 2;
}
.gantt-milestone.ms-done { color: #10b981; }

/* Courses */
.course-progress-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.course-list { display: flex; flex-direction: column; gap: 0.35rem; }
.course-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.35rem 0;
  border-bottom: 1px solid #f5f5f5;
}
.course-row:last-child { border-bottom: none; }
.course-ects {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  color: #888;
  flex-shrink: 0;
}
.ects-input {
  width: 52px;
  padding: 0.2rem 0.4rem;
  border: 1px solid #d0d0d0;
  border-radius: 4px;
  font-size: 0.82rem;
  text-align: right;
}

/* --- States --- */
.loading      { color: #999; padding: 2rem; text-align: center; }
.empty-state  { color: #999; padding: 2rem; text-align: center; font-size: 0.9rem; }
.error-state  {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  border-radius: 8px;
  padding: 1.5rem;
  margin: 2rem auto;
  max-width: 500px;
}
.error-state h2 { color: #dc2626; margin-bottom: 0.5rem; }
.error-state pre { font-size: 0.78rem; color: #555; margin-top: 0.75rem; white-space: pre-wrap; }

/* --- AI Assistant --- */
#ai-fab {
  position: fixed;
  bottom: 4.5rem;
  right: 1.5rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #2563eb;
  color: #fff;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
#ai-fab:hover { background: #1d4ed8; }

#ai-panel {
  position: fixed;
  bottom: 5.5rem;
  right: 1.5rem;
  width: 360px;
  max-height: 520px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.14);
  display: flex;
  flex-direction: column;
  z-index: 900;
  overflow: hidden;
}
@media (max-width: 480px) {
  #ai-panel { right: 0.5rem; left: 0.5rem; width: auto; }
}

.ai-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f0f0f0;
  background: #f8f9fa;
}
.ai-title { font-weight: 600; font-size: 0.9rem; }
.ai-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  color: #888;
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
}
.ai-close:hover { background: #eee; }

.ai-messages {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.ai-empty {
  color: #9ca3af;
  font-size: 0.85rem;
  text-align: center;
  padding: 1rem 0;
  line-height: 1.5;
}
.ai-msg { display: flex; }
.ai-msg-user  { justify-content: flex-end; }
.ai-msg-assistant { justify-content: flex-start; }

.ai-msg-bubble {
  max-width: 85%;
  padding: 0.5rem 0.75rem;
  border-radius: 10px;
  font-size: 0.85rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}
.ai-msg-user .ai-msg-bubble {
  background: #2563eb;
  color: #fff;
  border-bottom-right-radius: 3px;
}
.ai-msg-assistant .ai-msg-bubble {
  background: #f3f4f6;
  color: #111;
  border-bottom-left-radius: 3px;
}
.ai-typing { color: #9ca3af; letter-spacing: 0.1em; }

.ai-input-row {
  display: flex;
  gap: 0.5rem;
  padding: 0.65rem 0.75rem;
  border-top: 1px solid #f0f0f0;
}
.ai-input-row input {
  flex: 1;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 0.45rem 0.65rem;
  font-size: 0.88rem;
  outline: none;
}
.ai-input-row input:focus { border-color: #2563eb; }
.ai-input-row input:disabled { background: #f9f9f9; color: #aaa; }

/* --- Bottom dock --- */
#bottom-dock {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3.5rem;
  background: rgba(30, 30, 30, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  z-index: 800;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.dock-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 0.3rem 0.75rem;
  border-radius: 8px;
  text-decoration: none;
  color: rgba(255,255,255,0.85);
  font-size: 0.65rem;
  transition: background 0.15s;
}
.dock-item:hover { background: rgba(255,255,255,0.12); }
.dock-item img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

/* ============================================================
   TRACKER
   ============================================================ */

/* Cycle phase colour tokens */
:root {
  --strip-empty:    #f3f4f6;
  --strip-future:   #f9fafb;
  --strip-pms:      #fb923c;
  --strip-pms-pred: #fed7aa;
  --strip-ov:       #34d399;
  --strip-ov-pred:  #a7f3d0;
  --strip-sym:      #c4b5fd;
}

/* --- Strip --- */
.tracker-strip-section {
  margin-bottom: 1.25rem;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  padding: 0.5rem 0.5rem;
}
.strip-scroll {
  display: flex;
  gap: 3px;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: #d1d5db transparent;
  padding-bottom: 4px;
}
.strip-cell {
  flex-shrink: 0;
  width: 30px;
  min-height: 44px;
  border-radius: 5px;
  border: 2px solid transparent;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  position: relative;
  transition: border-color 0.1s;
}
.strip-cell:hover { border-color: #9ca3af; }
.strip-today  { border-color: #2563eb !important; }
.strip-sel    { border-color: #111 !important; box-shadow: 0 0 0 1px #111; }
.strip-future-cell { opacity: 0.7; }
.strip-daynum  { font-size: 0.72rem; font-weight: 600; line-height: 1; }
.strip-dayname { font-size: 0.6rem; color: #6b7280; line-height: 1; }
.strip-month   {
  position: absolute;
  top: -14px;
  left: 0;
  font-size: 0.58rem;
  color: #9ca3af;
  white-space: nowrap;
}

/* --- Layout --- */
.tracker-body {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 1.25rem;
  align-items: start;
}
@media (max-width: 700px) {
  .tracker-body { grid-template-columns: 1fr; }
}
.tracker-sidebar { display: flex; flex-direction: column; gap: 1rem; }

/* --- Check-in card --- */
.tracker-checkin { padding: 1.25rem 1.25rem 1rem; }

.checkin-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.1rem;
}
.checkin-arrow {
  background: none;
  border: 1px solid #e0e0e0;
  border-radius: 5px;
  width: 30px;
  height: 30px;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.checkin-arrow:hover { background: #f3f4f6; }
.checkin-date { font-size: 0.95rem; font-weight: 600; text-align: center; }
.today-badge {
  display: inline-block;
  font-size: 0.68rem;
  background: #dbeafe;
  color: #1e40af;
  border-radius: 8px;
  padding: 0.1rem 0.45rem;
  font-weight: 500;
  vertical-align: middle;
  margin-left: 0.3rem;
}

/* Score sliders */
.checkin-scores { display: flex; flex-direction: column; gap: 0.65rem; margin-bottom: 1rem; }
.score-row { display: flex; align-items: center; gap: 0.75rem; }
.score-label { width: 52px; font-size: 0.82rem; color: #555; flex-shrink: 0; }
.score-range {
  flex: 1;
  -webkit-appearance: none;
  height: 5px;
  border-radius: 3px;
  background: #e5e7eb;
  outline: none;
  cursor: pointer;
}
.score-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--track-color, #6b7280);
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.score-range[data-empty] { opacity: 0.4; }
.score-val { width: 22px; text-align: right; font-size: 0.88rem; font-weight: 600; }
.score-empty { color: #9ca3af; }

/* Symptom chips */
.checkin-chips { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-bottom: 1rem; }
.sym-chip {
  padding: 0.3rem 0.75rem;
  border: 1.5px solid #d1d5db;
  border-radius: 20px;
  background: #fff;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.1s;
}
.sym-chip:hover { border-color: #9ca3af; }
.sym-chip.chip-on { font-weight: 600; }

.checkin-notes {
  width: 100%;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 0.5rem 0.65rem;
  font-size: 0.85rem;
  resize: vertical;
  min-height: 52px;
  margin-bottom: 0.75rem;
  font-family: inherit;
}
.checkin-notes:focus { outline: none; border-color: #2563eb; }
.checkin-save { width: 100%; }

/* --- Prediction card --- */
.pred-card {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  padding: 0.9rem 1rem;
}
.pred-title { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: #6b7280; margin-bottom: 0.6rem; }
.pred-row { display: flex; align-items: center; gap: 0.5rem; font-size: 0.85rem; padding: 0.25rem 0; }
.pred-icon { font-size: 0.7rem; }
.pred-range { font-size: 0.75rem; color: #9ca3af; }
.pred-hint { font-size: 0.82rem; color: #9ca3af; }

/* --- Chart --- */
.tracker-chart-card { padding: 0.9rem 1rem 0.75rem; }
.tracker-chart-wrap { }
.chart-legend {
  display: flex;
  gap: 1rem;
  font-size: 0.75rem;
  justify-content: center;
  margin-top: 0.35rem;
  font-weight: 500;
}
.chart-empty { font-size: 0.82rem; color: #9ca3af; text-align: center; padding: 1rem 0; }

/* ============================================================
   DASHBOARD WIDGETS
   ============================================================ */

.daily-quote {
  background: linear-gradient(90deg, #eff6ff, #faf5ff);
  border: 1px solid #e5e7eb; border-radius: 10px;
  padding: 0.7rem 1.1rem; margin-bottom: 1.25rem;
  display: flex; align-items: baseline; gap: 0.5rem; flex-wrap: wrap;
}
.dq-mark { font-size: 1.4rem; color: #c7d2fe; font-weight: 700; line-height: 0; }
.dq-text { font-style: italic; color: #374151; font-size: 0.95rem; flex: 1; min-width: 60%; }
.dq-author { font-size: 0.8rem; color: #9ca3af; font-weight: 600; }

/* Weekly theme banner */
.theme-banner {
  display: flex; align-items: center; gap: 0.75rem;
  background: #fff; border: 1px solid #e0e0e0; border-radius: 10px;
  padding: 0.55rem 1rem; margin-bottom: 1.25rem;
}
.theme-proj strong { color: #1e40af; }
.theme-deadline { color: #b45309; font-weight: 600; }
.theme-none { color: #9ca3af; font-size: 0.9rem; }
.theme-select { margin-left: auto; font-size: 0.82rem; padding: 0.25rem 0.4rem; border: 1px solid #d0d0d0; border-radius: 6px; }

/* Focus-i-dag blocks */
.fokus-block { margin-bottom: 0.6rem; }
.fokus-block-head {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.78rem; font-weight: 700; color: #4b5563;
  padding: 0.2rem 0.2rem 0.25rem; border-bottom: 1px solid #f0f0f0; margin-bottom: 0.15rem;
}
.fokus-block-count { background: #eef2ff; color: #3730a3; border-radius: 10px; font-size: 0.7rem; padding: 0 0.4rem; }

/* Suggestion: same-block siblings */
.suggest-block { background: #f7f9ff; border: 1px solid #e0e7ff; border-radius: 8px; padding: 0.6rem 0.8rem; margin-bottom: 1rem; }
.suggest-block-head { font-size: 0.8rem; font-weight: 600; color: #3730a3; margin-bottom: 0.35rem; }
.suggest-block-item { font-size: 0.85rem; color: #374151; padding: 0.1rem 0; }

/* Scratchpad / quick notes */
.note-form { margin-bottom: 0.5rem; }
.note-input { width: 100%; padding: 0.5rem 0.6rem; border: 1px solid #d0d0d0; border-radius: 6px; font-size: 0.88rem; }
.note-input:focus { border-color: #2563eb; outline: none; }
.note-list { display: flex; flex-direction: column; gap: 1px; }
.note-row { display: flex; align-items: flex-start; gap: 0.4rem; padding: 0.3rem 0.2rem; border-bottom: 1px solid #f3f4f6; }
.note-text { flex: 1; font-size: 0.86rem; white-space: pre-wrap; word-break: break-word; }
.note-actions { display: flex; gap: 0.15rem; flex-shrink: 0; }
.note-btn { background: none; border: none; cursor: pointer; font-size: 0.78rem; opacity: 0.5; padding: 0 0.2rem; border-radius: 4px; }
.note-btn:hover { opacity: 1; background: #eff6ff; }
.note-del:hover { background: #fef2f2; }

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.widget {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  overflow: hidden;
  cursor: default;
  transition: box-shadow 0.15s;
  display: flex;
  flex-direction: column;
}
.widget:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.widget.drag-over  { border-color: #2563eb; box-shadow: 0 0 0 2px #bfdbfe; }
.widget.drag-source { opacity: 0.5; }

.widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
  user-select: none;
}
.widget-header:hover { background: #f7f9ff; }
.widget-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6b7280;
}
.widget-nav-arrow { color: #9ca3af; font-size: 0.85rem; }

.widget-body { padding: 0.75rem 1rem; min-height: 72px; }

/* Widget edit mode (Tilpas) */
.widget-editing { border-style: dashed; border-color: #c7d2fe; }
.widget-header-edit { cursor: grab; }
.widget-edit-ctrls { display: inline-flex; gap: 0.3rem; align-items: center; }
.widget-ctrl {
  font-size: 0.72rem; border: 1px solid #d0d0d0; background: #fff; color: #374151;
  border-radius: 5px; padding: 0.1rem 0.4rem; cursor: pointer; white-space: nowrap;
}
.widget-ctrl:hover { background: #eff6ff; border-color: #2563eb; }
.widget-ctrl-x:hover { background: #fef2f2; border-color: #dc2626; color: #dc2626; }
.btn-active { background: #eff6ff !important; border-color: #2563eb !important; color: #2563eb !important; }

/* --- LOGIN -------------------------------------------------- */
#login-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: linear-gradient(135deg, #1e3a8a, #2563eb);
  display: flex; align-items: center; justify-content: center;
}
#login-form {
  background: #fff; border-radius: 16px; padding: 2rem 1.75rem;
  width: min(340px, 90vw); box-shadow: 0 10px 40px rgba(0,0,0,0.25);
  display: flex; flex-direction: column; gap: 0.6rem;
}
.login-brand { margin: 0; font-size: 1.5rem; color: #2563eb; text-align: center; }
.login-sub { margin: 0 0 0.5rem; text-align: center; color: #6b7280; font-size: 0.85rem; }
#login-form input {
  padding: 0.65rem 0.75rem; border: 1px solid #d1d5db; border-radius: 8px; font-size: 0.95rem;
}
#login-form input:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px #bfdbfe; }
#login-form button { margin-top: 0.4rem; padding: 0.65rem; font-size: 0.95rem; }
.login-err { color: #dc2626; font-size: 0.82rem; text-align: center; min-height: 1em; margin: 0; }
.nav-logout {
  background: none; border: none; color: #94a3b8; font-size: 0.78rem; cursor: pointer;
  padding: 0.2rem 0.4rem; margin-left: 0.5rem;
}
.nav-logout:hover { color: #dc2626; }

/* --- BUDGET ------------------------------------------------ */
.bud-years { display: inline-flex; gap: 0.25rem; background: #f1f5f9; border-radius: 8px; padding: 0.2rem; }
.bud-year {
  font-size: 0.8rem; border: none; background: transparent; color: #64748b;
  border-radius: 6px; padding: 0.25rem 0.6rem; cursor: pointer; font-weight: 600;
}
.bud-year.active { background: #fff; color: #2563eb; box-shadow: 0 1px 2px rgba(0,0,0,0.08); }

.bud-cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem; margin-bottom: 1rem;
}
.bud-card {
  background: #fff; border: 1px solid #e5e7eb; border-left: 4px solid #94a3b8;
  border-radius: 10px; padding: 0.75rem 0.9rem; display: flex; flex-direction: column; gap: 0.2rem;
}
.bud-card-label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: #6b7280; }
.bud-card-val { font-size: 1.35rem; font-weight: 700; color: #111827; }
.bud-income { border-left-color: #16a34a; }
.bud-fixed  { border-left-color: #d97706; }
.bud-var    { border-left-color: #dc2626; }
.bud-save   { border-left-color: #7c3aed; }
.bud-pos    { border-left-color: #16a34a; }
.bud-neg    { border-left-color: #dc2626; }
.bud-neg .bud-card-val { color: #dc2626; }

.bud-delta { font-size: 0.72rem; font-weight: 600; }
.bud-up   { color: #dc2626; }   /* udgift op = rødt */
.bud-down { color: #16a34a; }
.bud-flat { color: #9ca3af; }
.bud-income .bud-up { color: #16a34a; }
.bud-income .bud-down { color: #dc2626; }

.bud-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1rem; }
.bud-overview { display: flex; flex-direction: column; gap: 0.4rem; }
.bud-overview > div { display: flex; justify-content: space-between; padding: 0.3rem 0; border-bottom: 1px dashed #eef2f7; }
.bud-ov-label { color: #6b7280; font-size: 0.88rem; }
.bud-ov-val { font-weight: 600; color: #111827; }
.bud-ov-total { border-bottom: none !important; margin-top: 0.2rem; padding-top: 0.5rem !important; border-top: 2px solid #e5e7eb; }
.bud-ov-total .bud-ov-label, .bud-ov-total .bud-ov-val { font-weight: 700; font-size: 0.95rem; }
.bud-foot { font-size: 0.75rem; color: #9ca3af; margin-top: 0.4rem; }

.bud-bars { display: flex; flex-direction: column; gap: 0.4rem; }
.bud-bar-row { display: grid; grid-template-columns: 110px 1fr auto; align-items: center; gap: 0.5rem; }
.bud-bar-label { font-size: 0.8rem; color: #374151; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bud-bar-track { background: #f1f5f9; border-radius: 6px; height: 14px; overflow: hidden; }
.bud-bar-fill { height: 100%; background: linear-gradient(90deg,#60a5fa,#2563eb); border-radius: 6px; }
.bud-bar-val { font-size: 0.78rem; font-weight: 600; color: #4b5563; white-space: nowrap; }

.dash-add-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem;
  background: #f7f9ff; border: 1px solid #dbeafe; border-radius: 10px;
  padding: 0.6rem 0.8rem; margin-bottom: 1rem;
}
.dash-add-label { font-size: 0.8rem; font-weight: 600; color: #374151; }
.dash-add-btn {
  font-size: 0.8rem; background: #fff; border: 1px solid #bfdbfe; color: #1e40af;
  border-radius: 14px; padding: 0.2rem 0.6rem; cursor: pointer;
}
.dash-add-btn:hover { background: #dbeafe; }
.dash-edit-hint { font-size: 0.72rem; color: #9ca3af; margin-left: auto; }

/* Cycle-phase widget */
.cyklus-now { display: flex; align-items: center; gap: 0.75rem; }
.cyklus-icon { font-size: 2rem; line-height: 1; }
.cyklus-phase { font-size: 1.1rem; font-weight: 700; }
.cyklus-day { font-size: 0.78rem; color: #6b7280; margin-top: 1px; }

/* Widget: task rows */
.w-task-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0;
}
.w-task-check {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid #ccc;
  background: #fff;
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
}
.w-task-check:hover { border-color: #2563eb; background: #eff6ff; }
.w-task-title {
  flex: 1;
  font-size: 0.875rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.w-task-proj {
  font-size: 0.72rem;
  color: #6b7280;
  background: #f3f4f6;
  padding: 1px 6px;
  border-radius: 4px;
  flex-shrink: 0;
}
.w-task-due  { font-size: 0.75rem; color: #dc2626; flex-shrink: 0; }
.w-overdue-title { color: #dc2626; }
.w-more      { font-size: 0.75rem; color: #9ca3af; margin-top: 0.25rem; }
.w-done-hint { font-size: 0.75rem; color: #6b7280; margin-top: 0.25rem; }

/* Widget: calendar events */
.w-event-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.2rem 0;
}
.w-event-dot  { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.w-event-time { font-size: 0.75rem; color: #6b7280; flex-shrink: 0; white-space: nowrap; }
.w-event-title {
  font-size: 0.875rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Widget: tracker */
.w-tracker-scores  { display: flex; gap: 1.25rem; margin-bottom: 0.5rem; }
.w-score           { display: flex; flex-direction: column; align-items: center; gap: 1px; }
.w-score-label     { font-size: 0.7rem; color: #6b7280; }
.w-score-val       { font-size: 1.4rem; font-weight: 700; color: #1a1a1a; line-height: 1; }
.w-tracker-chips   { display: flex; flex-wrap: wrap; gap: 0.25rem; margin-bottom: 0.4rem; }

/* Widget: projects */
.w-proj-row  { display: flex; align-items: center; gap: 0.5rem; padding: 0.22rem 0; }
.w-proj-name { font-size: 0.8rem; font-weight: 600; width: 68px; flex-shrink: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w-proj-bar  { flex: 1; height: 6px; background: #e5e7eb; border-radius: 3px; overflow: hidden; }
.w-proj-fill { height: 100%; background: #2563eb; border-radius: 3px; }
.w-proj-pct  { font-size: 0.75rem; color: #6b7280; width: 32px; text-align: right; flex-shrink: 0; }

/* Widget: priorities (top-3) */
.w-priority-row {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.4rem 0.3rem; border-radius: 6px; cursor: pointer;
}
.w-priority-row:hover { background: #f7f9ff; }
.w-priority-rank {
  width: 22px; height: 22px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: #2563eb; color: #fff; border-radius: 50%;
  font-size: 0.78rem; font-weight: 700;
}
.w-priority-body { flex: 1; min-width: 0; }
.w-priority-meta { display: flex; gap: 0.4rem; align-items: center; margin-top: 1px; }
.w-priority-when { font-size: 0.75rem; color: #6b7280; }

/* Widget: domain cards */
.domain-cards {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.5rem;
}
.domain-card {
  border: 1px solid #ececec; border-radius: 8px; padding: 0.6rem 0.7rem;
  cursor: pointer; background: #fafafa; transition: border-color 0.12s, background 0.12s;
}
.domain-card:hover { border-color: #2563eb; background: #f7f9ff; }
.domain-name  { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: #6b7280; }
.domain-count { font-size: 1.6rem; font-weight: 700; color: #1a1a1a; line-height: 1.1; }
.domain-unit  { font-size: 0.72rem; font-weight: 500; color: #9ca3af; margin-left: 0.3rem; }
.domain-overdue  { font-size: 0.74rem; color: #dc2626; font-weight: 600; margin-top: 1px; }
.domain-deadline { font-size: 0.72rem; color: #6b7280; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Widget: deadlines */
.w-deadline-row {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.28rem 0.3rem; border-radius: 6px; cursor: pointer;
}
.w-deadline-row:hover { background: #f7f9ff; }
.w-deadline-date  { font-size: 0.75rem; font-weight: 600; color: #1a1a1a; width: 56px; flex-shrink: 0; }
.w-deadline-label { flex: 1; min-width: 0; font-size: 0.85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w-deadline-label.is-proj { font-weight: 600; color: #1e40af; }
.w-deadline-rel   { font-size: 0.72rem; color: #9ca3af; flex-shrink: 0; white-space: nowrap; }

/* Quick Capture */
.qc-box { padding: 0.3rem 0.2rem; }
.qc-label { font-size: 0.8rem; font-weight: 700; color: #6b7280; margin-bottom: 0.5rem; }
#qc-input {
  width: 100%; font-size: 1.1rem; padding: 0.6rem 0.7rem;
  border: 1px solid #d0d0d0; border-radius: 8px; outline: none;
}
#qc-input:focus { border-color: #2563eb; box-shadow: 0 0 0 2px #bfdbfe; }
.qc-hint { font-size: 0.78rem; color: #9ca3af; margin-top: 0.5rem; }

/* Inbox banner + badge */
.inbox-banner {
  display: block; width: 100%; text-align: left;
  background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af;
  border-radius: 8px; padding: 0.6rem 0.9rem; margin-bottom: 1rem;
  font-size: 0.9rem; font-weight: 600; cursor: pointer;
}
.inbox-banner:hover { background: #dbeafe; }
.cat-inbox { background: #eff6ff; color: #1e40af; }

/* Context tag (F3.2) */
.context-tag {
  font-size: 0.72rem; padding: 0.05rem 0.4rem; border-radius: 10px;
  background: #f3f4f6; color: #4b5563; white-space: nowrap;
}
.ctx-deep_work { background: #ede9fe; color: #5b21b6; }
.ctx-email     { background: #e0f2fe; color: #075985; }
.ctx-admin     { background: #f3f4f6; color: #4b5563; }
.ctx-moede     { background: #fef3c7; color: #92400e; }

/* Project next action */
.project-next-action {
  font-size: 0.82rem; color: #2563eb; margin: 0.15rem 0 0.4rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Widget: next actions */
.w-na-row {
  display: flex; align-items: baseline; gap: 0.5rem;
  padding: 0.3rem 0.3rem; border-radius: 6px; cursor: pointer;
}
.w-na-row:hover { background: #f7f9ff; }
.w-na-proj {
  font-size: 0.72rem; font-weight: 700; color: #1e40af;
  background: #eff6ff; padding: 1px 6px; border-radius: 4px; flex-shrink: 0;
}
.w-na-action { font-size: 0.85rem; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Suggest-next-task modal */
.suggest-box { padding: 0.3rem 0.2rem; }
.suggest-card {
  border: 1px solid #e5e7eb; border-radius: 10px; padding: 0.9rem 1rem;
  background: #fafafa; margin: 0.5rem 0 1rem;
}
.suggest-title { font-size: 1.05rem; font-weight: 600; margin-bottom: 0.4rem; }
.suggest-meta  { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; margin-bottom: 0.5rem; }
.suggest-est   { font-size: 0.78rem; color: #6b7280; }
.suggest-reasons { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.suggest-reason {
  font-size: 0.72rem; padding: 0.1rem 0.5rem; border-radius: 10px;
  background: #eef2ff; color: #3730a3;
}
.suggest-actions { display: flex; justify-content: flex-end; gap: 0.5rem; flex-wrap: wrap; }

/* ============================================================
   PROJECTS: view toggle, Kanban, Manuscript (F3.4)
   ============================================================ */
.view-toggle { display: inline-flex; gap: 0.25rem; margin-right: 0.5rem; }

/* Kanban */
.kanban-scroll { overflow-x: auto; padding-bottom: 0.5rem; }
.kanban-board {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 220px;
  gap: 0.75rem;
  align-items: start;
}
.kb-col {
  background: #f5f6f8; border: 1px solid #e5e7eb; border-radius: 10px;
  padding: 0.5rem; min-height: 120px;
}
.kb-col.drag-over { border-color: #2563eb; background: #eff6ff; }
.kb-col-header {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.04em; color: #6b7280; padding: 0.2rem 0.3rem 0.5rem;
  display: flex; justify-content: space-between; align-items: center;
}
.kb-col-count {
  background: #e5e7eb; color: #4b5563; border-radius: 10px;
  font-size: 0.7rem; padding: 0 0.4rem; font-weight: 600;
}
.kb-col-body { display: flex; flex-direction: column; gap: 0.5rem; }
.kb-card {
  background: #fff; border: 1px solid #e5e7eb; border-radius: 8px;
  padding: 0.55rem 0.6rem; cursor: pointer;
}
.kb-card:hover { border-color: #2563eb; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.kb-card-title   { font-weight: 600; font-size: 0.88rem; }
.kb-card-journal { font-size: 0.72rem; color: #6b7280; margin-top: 1px; }
.kb-card-next    { font-size: 0.74rem; color: #2563eb; margin-top: 0.25rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kb-card-foot    { display: flex; justify-content: space-between; font-size: 0.72rem; color: #9ca3af; margin-top: 0.4rem; }
.kb-card-pct     { font-weight: 600; }
.kb-empty        { min-height: 24px; }

/* Manuscript tracker */
.mt-wrap { overflow-x: auto; }
.mt-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.mt-table th {
  text-align: left; font-size: 0.7rem; text-transform: uppercase;
  letter-spacing: 0.03em; color: #9ca3af; font-weight: 700;
  padding: 0.5rem 0.6rem; border-bottom: 1px solid #e5e7eb; white-space: nowrap;
}
.mt-table td { padding: 0.55rem 0.6rem; border-bottom: 1px solid #f0f0f0; vertical-align: middle; }
.mt-table tbody tr { cursor: pointer; }
.mt-table tbody tr:hover { background: #f7f9ff; }
.mt-name    { font-weight: 600; }
.mt-journal { font-size: 0.72rem; color: #6b7280; }
.mt-next    { color: #2563eb; }
.mt-center  { text-align: center; }
.mt-na      { color: #cbd5e1; }
.mt-overdue { color: #dc2626; font-weight: 600; }

.mt-timeline { min-width: 160px; width: 200px; }
.mt-bar {
  position: relative; height: 14px; background: #f1f5f9;
  border-radius: 7px; overflow: hidden;
}
.mt-bar-fill { position: absolute; top: 0; height: 100%; background: #bfdbfe; border-radius: 7px; }
.mt-marker { position: absolute; top: -1px; width: 3px; height: 16px; border-radius: 2px; }
.mt-submit { background: #16a34a; }
.mt-review { background: #f59e0b; }
.mt-today  { position: absolute; top: -2px; width: 2px; height: 18px; background: #dc2626; }

/* Co-author picker (project modal) */
.coauthor-section { margin: 0.75rem 0; }
.coauthor-head { display: flex; justify-content: space-between; align-items: center; }
.coauthor-list { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.4rem; }
.coauthor-chip {
  display: inline-flex; align-items: center; gap: 0.35rem;
  border: 1px solid #d0d0d0; border-radius: 16px; padding: 0.25rem 0.6rem;
  font-size: 0.82rem; cursor: pointer; user-select: none; background: #fff;
}
.coauthor-chip:hover { border-color: #2563eb; }
.coauthor-chip input { margin: 0; cursor: pointer; }
.coauthor-role { font-size: 0.68rem; color: #9ca3af; }

/* Weekly review (F3.5) */
.review-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
}
.rev-card { background: #fff; border: 1px solid #e0e0e0; border-radius: 10px; overflow: hidden; }
.rev-card.rev-warn { border-color: #fcd34d; }
.rev-card-head {
  display: flex; align-items: center; gap: 0.4rem;
  padding: 0.6rem 0.9rem; border-bottom: 1px solid #f0f0f0;
  font-size: 0.82rem; font-weight: 700; color: #374151;
}
.rev-card.rev-warn .rev-card-head { background: #fffbeb; }
.rev-count {
  margin-left: auto; background: #eef2ff; color: #3730a3;
  border-radius: 10px; font-size: 0.72rem; padding: 0 0.45rem; font-weight: 700;
}
.rev-card-body { padding: 0.7rem 0.9rem; }
.rev-line {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.22rem 0; font-size: 0.85rem;
}
.rev-line > span:nth-child(2) { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rev-date { font-size: 0.75rem; font-weight: 600; width: 52px; flex-shrink: 0; }
.rev-rel  { font-size: 0.72rem; color: #9ca3af; flex-shrink: 0; }
.rev-proj { font-size: 0.72rem; color: #6b7280; background: #f3f4f6; padding: 0 0.4rem; border-radius: 4px; }
.rev-bottleneck { margin-left: auto; font-size: 0.75rem; color: #b45309; font-weight: 600; }
.rev-more { font-size: 0.75rem; color: #9ca3af; margin-top: 0.3rem; }
.rev-note { font-size: 0.78rem; color: #92400e; margin-top: 0.4rem; }
.rev-chips { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.rev-chip {
  font-size: 0.78rem; font-weight: 600; color: #1e40af;
  background: #eff6ff; border: 1px solid #dbeafe; border-radius: 14px;
  padding: 0.15rem 0.55rem; cursor: pointer;
}
.rev-chip:hover { background: #dbeafe; }

/* ============================================================
   TIMER (weekly hours)
   ============================================================ */
.timer-summary { text-align: right; }
.timer-saldo { font-size: 1.5rem; font-weight: 700; }
.timer-saldo.pos { color: #16a34a; }
.timer-saldo.neg { color: #dc2626; }
.timer-saldo-lbl { display: block; font-size: 0.72rem; color: #9ca3af; }

.timer-editor { }
.timer-week-nav { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.9rem; }
.timer-week-label { font-weight: 600; font-size: 0.95rem; }
.timer-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0.5rem; margin-bottom: 0.75rem; }
.timer-day { display: flex; flex-direction: column; gap: 0.25rem; }
.timer-day > span { font-size: 0.72rem; font-weight: 600; color: #6b7280; text-align: center; }
.timer-day input { width: 100%; text-align: center; padding: 0.4rem; border: 1px solid #d0d0d0; border-radius: 6px; font-size: 0.95rem; }
.timer-day input:focus { border-color: #2563eb; outline: none; }
.timer-extra { display: flex; gap: 0.75rem; margin-bottom: 0.75rem; flex-wrap: wrap; }
.timer-field { display: flex; flex-direction: column; gap: 0.25rem; }
.timer-field > span { font-size: 0.72rem; font-weight: 600; color: #6b7280; }
.timer-field input { padding: 0.4rem 0.5rem; border: 1px solid #d0d0d0; border-radius: 6px; font-size: 0.9rem; width: 110px; }
.timer-field-grow { flex: 1; }
.timer-field-grow input { width: 100%; }
.timer-totals { display: flex; align-items: flex-end; gap: 1.5rem; border-top: 1px solid #eee; padding-top: 0.75rem; }
.timer-total { display: flex; flex-direction: column; }
.timer-total-num { font-size: 1.4rem; font-weight: 700; line-height: 1; }
.timer-total-num.pos { color: #16a34a; }
.timer-total-num.neg { color: #dc2626; }
.timer-total-lbl { font-size: 0.72rem; color: #9ca3af; }
.timer-totals .btn-primary { margin-left: auto; }

.timer-table-wrap { overflow-x: auto; }
.timer-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.timer-table th { font-size: 0.68rem; text-transform: uppercase; color: #9ca3af; font-weight: 700; padding: 0.4rem 0.5rem; text-align: center; border-bottom: 1px solid #e5e7eb; }
.timer-table th:first-child { text-align: left; }
.timer-table td { padding: 0.45rem 0.5rem; text-align: center; border-bottom: 1px solid #f0f0f0; }
.timer-table tbody tr { cursor: pointer; }
.timer-table tbody tr:hover { background: #f7f9ff; }
.timer-table tr.is-current { background: #eff6ff; }
.timer-wk { text-align: left; font-weight: 600; white-space: nowrap; }
.timer-wk-yr { font-size: 0.7rem; color: #9ca3af; font-weight: 400; }
.timer-strong { font-weight: 700; }
.timer-pos { color: #16a34a; font-weight: 600; }
.timer-neg { color: #dc2626; font-weight: 600; }

/* ============================================================
   STATISTIK
   ============================================================ */
.stat-h2 { font-size: 1rem; font-weight: 600; margin-bottom: 0.8rem; }
.stat-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.75rem; margin-bottom: 1.25rem; }
.stat-card { background: #fff; border: 1px solid #e0e0e0; border-radius: 10px; padding: 0.9rem 1rem; }
.stat-card.stat-warn { border-color: #fecaca; background: #fef2f2; }
.stat-num { font-size: 2rem; font-weight: 700; line-height: 1; }
.stat-card-label { font-size: 0.78rem; font-weight: 600; color: #374151; margin-top: 0.35rem; }
.stat-card-unit { font-size: 0.72rem; color: #9ca3af; }

.stat-cat-row { display: flex; align-items: center; gap: 0.6rem; padding: 0.3rem 0; }
.stat-cat-label { width: 90px; flex-shrink: 0; font-size: 0.85rem; }
.stat-cat-bar { flex: 1; height: 14px; background: #f1f5f9; border-radius: 7px; overflow: hidden; }
.stat-cat-fill { height: 100%; border-radius: 7px; min-width: 2px; }
.stat-cat-num { width: 28px; text-align: right; font-size: 0.85rem; font-weight: 600; color: #4b5563; }

/* ============================================================
   HJEM (household chores)
   ============================================================ */
.hjem-load { font-size: 0.78rem; color: #6b7280; }

/* Today's chore list */
.chore-today-list { display: flex; flex-direction: column; gap: 2px; }
.chore-today-row {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.5rem 0.4rem; border-bottom: 1px solid #f3f4f6;
}
.chore-check {
  width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0;
  border: 2px solid #ccc; background: #fff; cursor: pointer; padding: 0;
}
.chore-check:hover { border-color: #16a34a; background: #f0fdf4; }
.chore-today-name { flex: 1; font-size: 0.92rem; }
.chore-badge { font-size: 0.7rem; padding: 0.1rem 0.45rem; border-radius: 10px; font-weight: 600; }
.chore-snooze {
  font-size: 0.74rem; color: #6b7280; background: none; border: 1px solid #e5e7eb;
  border-radius: 6px; padding: 0.2rem 0.5rem; cursor: pointer; white-space: nowrap;
}
.chore-snooze:hover { background: #f5f5f5; }

/* Freshness buckets (badge + tile + dot share colors) */
.chore-fresh   { background: #dcfce7; color: #166534; }
.chore-soon    { background: #fef9c3; color: #854d0e; }
.chore-overdue { background: #fee2e2; color: #991b1b; }
.chore-never   { background: #e5e7eb; color: #4b5563; }

/* Freshness grid */
.chore-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 0.5rem; }
.chore-tile {
  position: relative; text-align: left; border: 1px solid #e5e7eb; border-radius: 8px;
  padding: 0.55rem 0.6rem; cursor: pointer; display: flex; flex-direction: column; gap: 0.15rem;
}
.chore-tile.chore-fresh   { background: #f0fdf4; border-color: #bbf7d0; }
.chore-tile.chore-soon    { background: #fefce8; border-color: #fde68a; }
.chore-tile.chore-overdue { background: #fef2f2; border-color: #fecaca; }
.chore-tile.chore-never   { background: #f9fafb; border-color: #e5e7eb; }
.chore-tile.chore-donetoday { background: #16a34a; border-color: #15803d; }
.chore-tile.chore-donetoday .chore-tile-name,
.chore-tile.chore-donetoday .chore-tile-age { color: #fff; }
.chore-tile.chore-donetoday .chore-tile-freq { color: #dcfce7; }
.chore-tile:hover { box-shadow: 0 1px 5px rgba(0,0,0,0.08); }
.chore-tile-name { font-size: 0.85rem; font-weight: 600; }
.chore-tile-age  { font-size: 0.72rem; color: #6b7280; }
.chore-tile-freq { position: absolute; top: 0.4rem; right: 0.5rem; font-size: 0.62rem; color: #9ca3af; }

.chore-legend { display: flex; gap: 1rem; margin-top: 0.7rem; font-size: 0.75rem; color: #6b7280; flex-wrap: wrap; }
.chore-legend span { display: inline-flex; align-items: center; gap: 0.3rem; }
.chore-dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.chore-dot.chore-fresh { background: #4ade80; } .chore-dot.chore-soon { background: #facc15; }
.chore-dot.chore-overdue { background: #f87171; } .chore-dot.chore-never { background: #cbd5e1; }
.chore-dot.chore-donetoday-dot { background: #16a34a; }

/* Joker individuel historik */
.joker-hist { display: flex; flex-direction: column; gap: 0.05rem; }
.joker-hist-row { display: grid; grid-template-columns: 12px 1fr auto auto; align-items: center; gap: 0.6rem; padding: 0.32rem 0; border-bottom: 1px dashed #f1f5f9; }
.joker-hist-dot { width: 10px; height: 10px; border-radius: 3px; }
.joker-hist-dot.chore-fresh { background: #4ade80; } .joker-hist-dot.chore-soon { background: #facc15; }
.joker-hist-dot.chore-overdue { background: #f87171; } .joker-hist-dot.chore-never { background: #cbd5e1; }
.joker-hist-name { font-size: 0.84rem; }
.joker-hist-count { font-size: 0.78rem; font-weight: 700; color: #6b21a8; }
.joker-hist-rel { font-size: 0.75rem; color: #9ca3af; min-width: 72px; text-align: right; }

/* Joker */
.joker-card { margin-top: 0.75rem; border: 1px dashed #c4b5fd; background: #faf5ff; border-radius: 10px; padding: 0.75rem 0.9rem; }
.joker-title { font-weight: 700; font-size: 0.9rem; color: #6b21a8; }
.joker-hint { font-size: 0.76rem; color: #9ca3af; margin: 0.2rem 0 0.5rem; }
.joker-opts { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.joker-opt {
  font-size: 0.82rem; background: #fff; border: 1px solid #ddd6fe; color: #5b21b6;
  border-radius: 14px; padding: 0.3rem 0.7rem; cursor: pointer;
}
.joker-opt:hover { background: #ede9fe; }

/* Per-room history strip */
.chore-hist { display: flex; flex-direction: column; gap: 3px; overflow-x: auto; }
.ch-row { display: flex; align-items: center; gap: 0.5rem; }
.ch-room { width: 120px; flex-shrink: 0; font-size: 0.78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-cells { display: flex; gap: 2px; }
.ch-cell { width: 8px; height: 8px; border-radius: 2px; background: #eef0f2; flex-shrink: 0; }
.ch-cell.ch-on { background: #16a34a; }
.ch-count { font-size: 0.72rem; color: #9ca3af; flex-shrink: 0; margin-left: 0.3rem; }

/* Task postpone */
.task-snooze, .w-task-snooze {
  background: none; border: none; cursor: pointer; flex-shrink: 0;
  font-size: 0.9rem; opacity: 0.45; padding: 0 0.2rem; border-radius: 4px;
}
.task-snooze:hover, .w-task-snooze:hover { opacity: 1; background: #eff6ff; }
.postpone-task { font-weight: 600; margin-bottom: 0.8rem; }
.postpone-opts { display: flex; flex-direction: column; gap: 0.5rem; }
.postpone-opts .btn-secondary { text-align: left; }
