:root {
  color-scheme: dark;
  --bg: #0b0d10;
  --panel: #111419;
  --panel-2: #171b21;
  --line: #262c34;
  --line-soft: #1c2128;
  --text: #f4f6f8;
  --muted: #8f98a3;
  --accent: #8ce8d0;
  --accent-strong: #b7f4e4;
  --danger: #ff9d9d;
  --warning: #ffd48a;
  --success: #a8e6b3;
  --radius: 20px;
  --shadow: 0 18px 50px rgba(0,0,0,.28);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% -12%, rgba(140,232,208,.08), transparent 32rem),
    radial-gradient(circle at 100% 0%, rgba(122,162,255,.06), transparent 28rem),
    var(--bg);
  color: var(--text);
}
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
a { color: inherit; }

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid var(--line-soft);
  padding: 30px 20px;
  background: rgba(9,11,14,.74);
  backdrop-filter: blur(16px);
}

.brand-title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -.02em;
  margin: 0 10px 5px;
}
.brand-subtitle {
  color: var(--muted);
  font-size: 12px;
  margin: 0 10px 30px;
}

.nav-label {
  color: #66707b;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin: 24px 10px 10px;
}

.nav-button {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: #b7bec7;
  padding: 10px 12px;
  border-radius: 10px;
  transition: .18s ease;
}
.nav-button:hover { background: rgba(255,255,255,.04); color: var(--text); }
.nav-button.active { background: rgba(140,232,208,.09); color: var(--accent-strong); }

.sidebar-footer {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 24px;
}

.main {
  min-width: 0;
  padding: 34px clamp(22px, 4vw, 60px) 60px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 30px;
}
.eyebrow {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 10px;
  font-weight: 800;
  margin-bottom: 8px;
}
h1 {
  margin: 0;
  font-size: clamp(32px, 4vw, 50px);
  line-height: 1;
  letter-spacing: -.045em;
  font-weight: 720;
}
.subtitle {
  margin: 11px 0 0;
  color: var(--muted);
  max-width: 680px;
  line-height: 1.55;
}
.actions { display: flex; gap: 10px; flex-wrap: wrap; }

.button {
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 11px;
  font-weight: 650;
  transition: .18s ease;
}
.button:hover { transform: translateY(-1px); border-color: #3a424d; }
.button.primary { background: var(--accent); color: #07110e; border-color: transparent; }
.button.primary:hover { background: var(--accent-strong); }
.button.ghost { background: transparent; }
.button.danger { color: var(--danger); }
.button.small { padding: 7px 10px; font-size: 12px; }

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}
.metric {
  background: linear-gradient(180deg, rgba(255,255,255,.025), rgba(255,255,255,.012));
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  padding: 18px;
}
.metric-label { color: var(--muted); font-size: 12px; margin-bottom: 10px; }
.metric-value { font-size: 28px; font-weight: 720; letter-spacing: -.04em; }
.metric-value.warn { color: var(--warning); }
.metric-value.danger { color: var(--danger); }
.metric-value.success { color: var(--success); }

.toolbar {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) 190px 170px 200px;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}
.control {
  width: 100%;
  border: 1px solid var(--line);
  background: #0f1216;
  color: var(--text);
  border-radius: 11px;
  padding: 11px 12px;
  outline: none;
}
.control:focus { border-color: rgba(140,232,208,.55); box-shadow: 0 0 0 3px rgba(140,232,208,.06); }
.control::placeholder { color: #5f6873; }
textarea.control { min-height: 120px; resize: vertical; }
.optional-label { color: #65707b; font-weight: 500; }
.field-help { color: #68717c; font-size: 10px; line-height: 1.4; }

.journal-toolbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin: -2px 0 18px;
}
.journal-toolbar label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}
.journal-toolbar .control { width: 190px; }

.section-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin: 24px 0 12px;
}
.section-title { font-size: 15px; font-weight: 700; }
.section-meta { color: var(--muted); font-size: 12px; }

.list {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(17,20,25,.72);
  box-shadow: var(--shadow);
}
.item-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) 170px 210px 145px;
  gap: 18px;
  align-items: center;
  padding: 17px 18px;
  border-bottom: 1px solid var(--line-soft);
  transition: background .16s ease, box-shadow .16s ease;
  cursor: pointer;
  outline: none;
}
.item-row:last-child { border-bottom: 0; }
.item-row:hover { background: rgba(255,255,255,.025); }
.item-row:focus-visible { box-shadow: inset 0 0 0 2px rgba(140,232,208,.45); background: rgba(140,232,208,.035); }
.item-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.item-main { min-width: 0; }
.item-title {
  font-weight: 650;
  letter-spacing: -.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.item-content {
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.item-project, .item-date { min-width: 0; color: #a6aeb8; font-size: 12px; }
.item-project { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-date { display: flex; flex-direction: column; gap: 5px; line-height: 1.35; }
.date-line { display: flex; flex-direction: column; gap: 1px; }
.date-label {
  color: #66707b;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.date-line.created { color: #8f98a3; }
.row-actions { min-width: 0; display: flex; gap: 7px; justify-content: flex-end; }

.badge {
  width: fit-content;
  border: 1px solid #2c333c;
  color: #b9c2cc;
  background: #15191e;
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.badge.task { border-color: rgba(140,232,208,.24); color: var(--accent-strong); background: rgba(140,232,208,.06); }
.badge.done { color: #8ea096; }
.badge.waiting { color: var(--warning); }
.badge.archived { color: #707985; }

.empty {
  padding: 52px 24px;
  text-align: center;
  color: var(--muted);
}
.load-more-wrap { display: flex; justify-content: center; margin-top: 16px; }

.list.today-dashboard,
.list.project-detail-list {
  border: 0;
  border-radius: 0;
  overflow: visible;
  background: transparent;
  box-shadow: none;
  display: grid;
  gap: 22px;
}
.today-section {
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  overflow: hidden;
  background: rgba(17,20,25,.7);
  box-shadow: 0 12px 36px rgba(0,0,0,.16);
}
.today-section.overdue { border-color: rgba(255,157,157,.18); }
.today-section.today { border-color: rgba(140,232,208,.2); }
.today-section.tomorrow { border-color: rgba(122,162,255,.2); }
.today-section.week { border-color: rgba(168,230,179,.14); }
.today-section.later { border-color: rgba(170,155,255,.14); }
.today-section.nodue { border-color: rgba(143,152,163,.16); }
.today-section.waiting { border-color: rgba(255,212,138,.16); }
.today-section.completed { border-color: rgba(168,230,179,.14); }
.today-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 17px;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(255,255,255,.014);
}
.today-section-title { font-size: 13px; font-weight: 760; letter-spacing: -.01em; }
.today-section-count {
  min-width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #171b21;
  color: #bfc6ce;
  font-size: 11px;
  font-weight: 750;
}
.today-section-list .item-row { grid-template-columns: 120px minmax(0, 1fr) minmax(130px, 190px) 210px auto; }
.today-empty { padding: 24px 18px; color: #68717c; font-size: 12px; }

.list.projects-list {
  border: 0;
  border-radius: 0;
  overflow: visible;
  background: transparent;
  box-shadow: none;
}
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.project-card {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,.026), rgba(255,255,255,.012));
  box-shadow: 0 14px 38px rgba(0,0,0,.16);
  cursor: pointer;
  outline: none;
  transition: .18s ease;
}
.project-card:hover {
  transform: translateY(-2px);
  border-color: #343d47;
  background: rgba(255,255,255,.028);
}
.project-card:focus-visible { box-shadow: 0 0 0 2px rgba(140,232,208,.22); }
.project-card-top {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}
.project-name {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: -.025em;
}
.project-description {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.project-open-mark {
  color: #68737e;
  font-size: 28px;
  line-height: 1;
}
.project-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 22px;
}
.project-stats div {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: rgba(0,0,0,.12);
}
.project-stats strong {
  display: block;
  font-size: 19px;
  letter-spacing: -.03em;
}
.project-stats span {
  display: block;
  margin-top: 3px;
  color: #737d88;
  font-size: 9px;
  line-height: 1.25;
}
.project-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 15px;
  color: #707a85;
  font-size: 10px;
}

.project-detail-header {
  padding: 18px 20px;
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  background: rgba(17,20,25,.72);
}
.project-detail-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-end;
  margin-top: 20px;
}
.project-detail-heading h2 {
  margin: 0;
  font-size: clamp(25px, 4vw, 38px);
  letter-spacing: -.04em;
}
.project-detail-summary {
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
}
.project-links-panel {
  padding: 18px 20px;
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  background: rgba(17,20,25,.72);
}
.project-links-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}
.project-links-heading h3 {
  margin: 3px 0 0;
  font-size: 18px;
}
.project-links-groups {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}
.project-links-group {
  display: grid;
  gap: 8px;
}
.project-links-group-title {
  color: #8d97a2;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.project-link-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 11px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 13px;
  background: rgba(10,12,16,.5);
}
.project-link-row.current {
  border-color: rgba(140,232,208,.28);
  background: rgba(140,232,208,.055);
}
.project-link-main {
  display: flex;
  gap: 11px;
  align-items: center;
  min-width: 0;
}
.project-link-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 9px;
  background: rgba(255,255,255,.045);
}
.project-link-copy { min-width: 0; }
.project-link-label {
  display: block;
  color: var(--text);
  font-size: 13px;
  font-weight: 680;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.project-link-label:hover { color: var(--accent-strong); }
.project-link-meta {
  margin-top: 3px;
  color: #717b86;
  font-size: 10px;
}
.project-link-actions {
  display: flex;
  gap: 6px;
  flex: 0 0 auto;
}
.project-links-empty {
  padding: 12px;
  border: 1px dashed #303741;
  border-radius: 12px;
  color: var(--muted);
  font-size: 12px;
}
.project-links-history {
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  padding: 11px 0;
}
.project-links-history summary {
  cursor: pointer;
  color: #a6aeb8;
  font-size: 12px;
  font-weight: 650;
}
.project-links-history-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}
.danger-text { color: #e59a9a; }
.checkbox-line {
  display: flex;
  gap: 9px;
  align-items: center;
  min-height: 40px;
}
.checkbox-line input { width: 16px; height: 16px; }
.project-link-primary-field { align-self: end; }

.project-sections { display: grid; gap: 16px; }

.list.journal-list {
  border: 0;
  border-radius: 0;
  overflow: visible;
  background: transparent;
  box-shadow: none;
  display: grid;
  gap: 28px;
}
.journal-day { min-width: 0; }
.journal-day-title {
  margin: 0 0 13px 84px;
  color: #bfc7cf;
  font-size: 13px;
  font-weight: 760;
  text-transform: capitalize;
}
.journal-day-events {
  position: relative;
  display: grid;
  gap: 10px;
  margin-left: 84px;
  padding-left: 24px;
  border-left: 1px solid #252c34;
}
.journal-event {
  position: relative;
  outline: none;
  cursor: pointer;
}
.journal-event::before {
  content: '';
  position: absolute;
  left: -30px;
  top: 24px;
  width: 11px;
  height: 11px;
  border-radius: 999px;
  border: 2px solid #4b5662;
  background: var(--bg);
  box-shadow: 0 0 0 4px var(--bg);
}
.journal-event.occurred::before { border-color: var(--accent); }
.journal-event.completed::before { border-color: var(--success); }
.journal-event-time {
  position: absolute;
  right: calc(100% + 42px);
  top: 19px;
  width: 66px;
  color: #737d88;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}
.journal-event-card {
  border: 1px solid var(--line-soft);
  border-radius: 15px;
  padding: 15px 17px;
  background: rgba(17,20,25,.74);
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}
.journal-event:hover .journal-event-card {
  border-color: #343c46;
  background: rgba(255,255,255,.026);
  transform: translateY(-1px);
}
.journal-event:focus-visible .journal-event-card {
  border-color: rgba(140,232,208,.45);
  box-shadow: 0 0 0 2px rgba(140,232,208,.08);
}
.journal-event-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.journal-event-kind {
  color: #7d8792;
  font-size: 10px;
  font-weight: 780;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.journal-event.completed .journal-event-kind { color: var(--success); }
.journal-event.occurred .journal-event-kind { color: var(--accent); }
.journal-event-title {
  margin-top: 9px;
  color: var(--text);
  font-size: 15px;
  font-weight: 690;
  line-height: 1.35;
  letter-spacing: -.015em;
}
.journal-event-project {
  margin-top: 5px;
  color: #7f8994;
  font-size: 11px;
}
.journal-event-content {
  margin-top: 9px;
  color: #9ca5af;
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.quick-fab {
  position: fixed;
  z-index: 20;
  right: 28px;
  bottom: 28px;
  width: 54px;
  height: 54px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #07110e;
  font-size: 30px;
  font-weight: 500;
  line-height: 1;
  box-shadow: 0 16px 44px rgba(0,0,0,.38);
  cursor: pointer;
  transition: .18s ease;
}
.quick-fab:hover { transform: translateY(-2px) scale(1.02); background: var(--accent-strong); }

.dialog {
  width: min(620px, calc(100vw - 28px));
  max-height: calc(100dvh - 28px);
  overflow-y: auto;
  border: 1px solid #303741;
  border-radius: 20px;
  background: #111419;
  color: var(--text);
  padding: 0;
  box-shadow: 0 30px 90px rgba(0,0,0,.55);
}
.dialog::backdrop { background: rgba(0,0,0,.68); backdrop-filter: blur(7px); }
.dialog-inner { padding: 24px; }
.dialog-header { display: flex; justify-content: space-between; align-items: start; gap: 20px; margin-bottom: 22px; }
.dialog-title { margin: 0; font-size: 23px; letter-spacing: -.03em; }
.dialog-subtitle { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field label { color: #aab2bc; font-size: 11px; font-weight: 700; }
.dialog-footer { display: flex; justify-content: space-between; gap: 10px; margin-top: 22px; }
.dialog-footer-right { display: flex; gap: 8px; }

.quick-dialog { width: min(560px, calc(100vw - 24px)); }
.quick-types {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
  margin-bottom: 18px;
}
.quick-type {
  border: 1px solid var(--line);
  background: #0f1216;
  color: #aab3bd;
  border-radius: 11px;
  padding: 10px 8px;
  font-size: 11px;
  font-weight: 700;
}
.quick-type.active {
  border-color: rgba(140,232,208,.38);
  background: rgba(140,232,208,.08);
  color: var(--accent-strong);
}
.quick-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.quick-title { font-size: 17px; padding: 14px; }
textarea.quick-content { min-height: 90px; }
.quick-footer { margin-top: 18px; }
.quick-save { width: 100%; padding: 12px 16px; }

.detail-dialog { width: min(680px, calc(100vw - 28px)); }
.detail-inner { padding: 28px; }
.detail-topline { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.detail-badges { display: flex; flex-wrap: wrap; gap: 7px; }
.detail-title {
  margin: 24px 0 0;
  font-size: clamp(25px, 4vw, 36px);
  line-height: 1.15;
  letter-spacing: -.035em;
}
.detail-content {
  margin-top: 20px;
  padding: 18px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: #0e1115;
  color: #c4cbd3;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.65;
  font-size: 14px;
}
.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}
.detail-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 13px 14px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: rgba(255,255,255,.012);
  color: #b5bdc6;
  font-size: 13px;
}
.detail-label {
  color: #66707b;
  font-size: 9px;
  font-weight: 780;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.detail-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 24px; }

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.login-card {
  width: min(430px, 100%);
  background: rgba(17,20,25,.88);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 34px;
  box-shadow: var(--shadow);
}
.login-card h1 { font-size: 34px; margin-bottom: 10px; }
.login-card p { color: var(--muted); line-height: 1.55; margin: 0 0 26px; }
.login-card .field { margin-bottom: 14px; }
.login-card .button { width: 100%; margin-top: 8px; }
.login-error { color: var(--danger); font-size: 12px; margin: 0 0 16px; }
.login-note { color: #68717c; font-size: 11px; margin-top: 18px; }

.mobile-nav { display: none; }

@media (max-width: 1180px) {
  .toolbar { grid-template-columns: minmax(220px, 1fr) minmax(170px, 200px); }
  .item-row,
  .today-section-list .item-row {
    grid-template-columns: 100px minmax(0, 1fr) 140px 190px 132px;
    gap: 12px;
  }
  .item-date { grid-column: auto; }
  .projects-grid { grid-template-columns: 1fr; }
}

@media (max-width: 1050px) {
  .metrics { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 780px) {
  .app-shell { display: block; }
  .sidebar { display: none; }
  .main { padding: 22px 16px 104px; }
  .topbar { display: block; }
  .actions { margin-top: 18px; }
  .toolbar { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .metric { padding: 15px; }
  .metric-value { font-size: 25px; }
  .journal-toolbar { justify-content: space-between; margin-top: 0; }
  .journal-toolbar .control { width: 170px; }

  .item-row,
  .today-section-list .item-row {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 17px 16px;
    touch-action: manipulation;
  }
  .item-row:active { background: rgba(140,232,208,.045); }
  .item-title {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    line-height: 1.4;
  }
  .item-content {
    margin-top: 7px;
    white-space: pre-wrap;
    overflow: visible;
    text-overflow: clip;
    overflow-wrap: anywhere;
    line-height: 1.55;
    font-size: 13px;
  }
  .item-project { order: 3; }
  .item-date { grid-column: auto; order: 4; }
  .row-actions { justify-content: flex-start; order: 5; }
  .item-badges { order: 1; }
  .item-main { order: 2; }

  .list.today-dashboard,
  .list.project-detail-list { gap: 16px; }
  .today-section { border-radius: 15px; }
  .today-section-header { padding: 13px 15px; }

  .projects-grid { grid-template-columns: 1fr; gap: 11px; }
  .project-card { padding: 17px; border-radius: 15px; }
  .project-name { font-size: 18px; }
  .project-stats { grid-template-columns: repeat(2, 1fr); margin-top: 17px; }
  .project-footer { flex-direction: column; gap: 4px; }
  .project-detail-header { padding: 16px; border-radius: 15px; }
  .project-detail-heading { align-items: flex-start; flex-direction: column; }
  .project-detail-heading .button { width: 100%; }
  .project-links-panel { padding: 16px; border-radius: 15px; }
  .project-links-heading { align-items: flex-start; flex-direction: column; }
  .project-links-heading .button { width: 100%; }
  .project-link-row { align-items: flex-start; flex-direction: column; }
  .project-link-main { width: 100%; }
  .project-link-actions { width: 100%; }
  .project-link-actions .button { flex: 1; }

  .list.journal-list { gap: 22px; }
  .journal-day-title { margin-left: 0; font-size: 12px; }
  .journal-day-events {
    margin-left: 7px;
    padding-left: 18px;
  }
  .journal-event::before {
    left: -24px;
    top: 21px;
    width: 10px;
    height: 10px;
  }
  .journal-event-time {
    position: static;
    width: auto;
    margin: 0 0 5px 2px;
    text-align: left;
    font-size: 10px;
  }
  .journal-event-card { padding: 14px 15px; }
  .journal-event-title { font-size: 14px; }
  .journal-event-content {
    -webkit-line-clamp: 5;
    font-size: 12px;
  }

  .quick-fab {
    right: 17px;
    bottom: 82px;
    width: 52px;
    height: 52px;
    font-size: 29px;
  }
  .quick-types { grid-template-columns: repeat(2, 1fr); }
  .quick-form-grid { grid-template-columns: 1fr; }
  textarea.quick-content { min-height: 110px; }

  .form-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: 1; }
  textarea.control { min-height: 180px; line-height: 1.5; }
  .dialog {
    width: calc(100vw - 18px);
    max-height: calc(100dvh - 18px);
    border-radius: 16px;
  }
  .dialog-inner { padding: 18px; }
  .dialog-header { gap: 12px; }
  .dialog-footer { align-items: stretch; flex-direction: column-reverse; }
  .dialog-footer-right { display: grid; grid-template-columns: 1fr 1fr; }

  .detail-inner { padding: 20px; }
  .detail-title { margin-top: 20px; font-size: 27px; }
  .detail-content { padding: 15px; font-size: 14px; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .detail-actions .button:only-child { grid-column: 1 / -1; }

  .mobile-nav {
    display: flex;
    position: fixed;
    z-index: 10;
    left: 10px;
    right: 10px;
    bottom: 10px;
    padding: 8px;
    gap: 6px;
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: rgba(14,17,21,.94);
    backdrop-filter: blur(18px);
  }
  .mobile-nav .nav-button { min-width: max-content; width: auto; }
}


/* Item sorting and dated follow-ups */
.toolbar #sortFilter {
  min-width: 190px;
}

.followups {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.followups-heading,
.followup-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.followups-heading h3 {
  margin: 2px 0 0;
  font-size: 1.05rem;
}

.followups-count {
  min-width: 28px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--surface-strong, rgba(255, 255, 255, 0.08));
  text-align: center;
  font-size: 0.78rem;
}

.followups-list {
  display: grid;
  gap: 10px;
  max-height: 290px;
  margin: 14px 0;
  overflow: auto;
}

.followup {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface, rgba(255, 255, 255, 0.035));
}

.followup-meta {
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.78rem;
}

.followup-content {
  white-space: pre-wrap;
  line-height: 1.5;
}

.followups-empty {
  padding: 16px;
  color: var(--muted);
  text-align: center;
}

.followups-form {
  display: grid;
  gap: 8px;
}

.followups-form label {
  font-size: 0.84rem;
  font-weight: 700;
}

.followups-form textarea {
  min-height: 86px;
  resize: vertical;
}

.followups-form .button {
  justify-self: end;
}

@media (max-width: 760px) {
  .toolbar #sortFilter {
    min-width: 0;
  }

  .followup-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }
}


/* Project priority cockpit */
.cockpit-list{border:0;background:transparent;box-shadow:none;overflow:visible}
.cockpit-rules{display:grid;grid-template-columns:minmax(0,1fr)auto;gap:22px;align-items:center;padding:22px;margin-bottom:22px;border:1px solid var(--line-soft);border-radius:20px;background:rgba(17,20,25,.78)}
.cockpit-rules h2{margin:4px 0 6px;font-size:24px}
.cockpit-rules p{margin:0;max-width:760px;color:var(--muted);line-height:1.55}
.cockpit-counts{display:flex;gap:10px}
.cockpit-counts>div{min-width:88px;padding:12px 14px;border:1px solid var(--line-soft);border-radius:14px;background:rgba(255,255,255,.025);text-align:center}
.cockpit-counts strong{display:block;font-size:22px}
.cockpit-counts span{display:block;margin-top:2px;color:var(--muted);font-size:10px;text-transform:uppercase;letter-spacing:.06em}
.cockpit-columns{display:grid;gap:20px}
.cockpit-group{padding:18px;border:1px solid var(--line-soft);border-radius:20px;background:rgba(17,20,25,.5)}
.cockpit-group-heading{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;margin-bottom:14px}
.cockpit-group-heading h2{margin:0;font-size:18px}
.cockpit-group-heading p{margin:4px 0 0;color:var(--muted);font-size:12px;line-height:1.45}
.cockpit-group-heading>span{display:grid;place-items:center;min-width:30px;height:30px;border-radius:999px;background:rgba(255,255,255,.05);font-weight:700}
.cockpit-group-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.cockpit-group-finish_now .cockpit-group-grid{grid-template-columns:1fr}
.cockpit-project-card{padding:17px;border:1px solid var(--line-soft);border-radius:16px;background:rgba(9,11,14,.72)}
.cockpit-finish_now{border-color:rgba(140,232,208,.38);box-shadow:0 0 0 1px rgba(140,232,208,.06) inset}
.cockpit-card-head{display:flex;justify-content:space-between;gap:14px;align-items:flex-start}
.cockpit-card-head h3{margin:7px 0 0;font-size:18px}
.cockpit-state-pill{display:inline-flex;padding:4px 8px;border:1px solid rgba(140,232,208,.24);border-radius:999px;color:var(--accent-strong);font-size:9px;font-weight:800;letter-spacing:.06em;text-transform:uppercase}
.cockpit-waiting .cockpit-state-pill{color:#f6c96f;border-color:rgba(246,201,111,.25)}
.cockpit-next .cockpit-state-pill,.cockpit-parking .cockpit-state-pill,.cockpit-reference .cockpit-state-pill{color:var(--muted);border-color:var(--line-soft)}
.cockpit-why{margin:14px 0;color:#b9c1ca;font-size:12px;line-height:1.55}
.cockpit-next{padding:12px 13px;border-radius:13px;background:rgba(140,232,208,.055)}
.cockpit-next span,.cockpit-project-line span,.cockpit-project-meta span{display:block;color:var(--muted);font-size:9px;text-transform:uppercase;letter-spacing:.06em}
.cockpit-next strong{display:block;margin-top:5px;line-height:1.45}
.cockpit-project-meta{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:12px}
.cockpit-project-meta>div{padding:10px;border:1px solid var(--line-soft);border-radius:11px}
.cockpit-project-meta strong{display:block;margin-top:4px;font-size:12px}
.cockpit-project-line{margin-top:10px;padding:10px 12px;border-left:2px solid #39424c;background:rgba(255,255,255,.02)}
.cockpit-project-line strong{display:block;margin-top:4px;font-size:12px;line-height:1.45}
.cockpit-card-footer{display:flex;justify-content:flex-end;margin-top:14px}
.cockpit-empty{padding:18px;border:1px dashed var(--line-soft);border-radius:14px;color:var(--muted);font-size:12px}
@media(max-width:900px){.cockpit-rules{grid-template-columns:1fr}.cockpit-counts{display:grid;grid-template-columns:repeat(3,1fr)}.cockpit-group-grid{grid-template-columns:1fr}}
@media(max-width:560px){.cockpit-counts{grid-template-columns:1fr}.cockpit-project-meta{grid-template-columns:1fr}.cockpit-rules h2{font-size:20px}}


/* Appearance controls */
.display-controls{display:flex;gap:8px;padding-right:2px}
.display-toggle{min-width:104px}
html[data-theme="light"]{
  color-scheme:light;
  --bg:#f6f7fb;
  --panel:#ffffff;
  --panel-2:#f4f6f9;
  --line:#d9dee7;
  --line-soft:#e8ebf0;
  --text:#1d2530;
  --muted:#687384;
  --accent:#36b89a;
  --accent-strong:#19896f;
  --danger:#c84b55;
  --warning:#9b6b08;
  --success:#287a43;
  --shadow:0 18px 48px rgba(34,45,60,.08);
}
html[data-theme="light"] body{
  background:
    radial-gradient(circle at 18% -12%, rgba(54,184,154,.10), transparent 32rem),
    radial-gradient(circle at 100% 0%, rgba(95,120,245,.07), transparent 28rem),
    var(--bg);
}
html[data-theme="light"] .sidebar{background:rgba(255,255,255,.86)}
html[data-theme="light"] .nav-button{color:#536071}
html[data-theme="light"] .nav-button:hover{background:rgba(31,43,59,.05);color:var(--text)}
html[data-theme="light"] .nav-button.active{background:rgba(54,184,154,.11);color:#14725e}
html[data-theme="light"] .control{background:#fff;color:var(--text)}
html[data-theme="light"] .control::placeholder{color:#9aa4b2}
html[data-theme="light"] .button{background:#fff;color:var(--text)}
html[data-theme="light"] .button.ghost{background:transparent}
html[data-theme="light"] .button.primary{background:var(--accent);color:#fff}
html[data-theme="light"] .list,
html[data-theme="light"] .metric,
html[data-theme="light"] .today-section,
html[data-theme="light"] .project-card,
html[data-theme="light"] .project-detail-header,
html[data-theme="light"] .project-links-panel,
html[data-theme="light"] .file-card{background:rgba(255,255,255,.88)}
html[data-theme="light"] .item-row:hover,
html[data-theme="light"] .journal-event-card:hover{background:rgba(54,184,154,.035)}
html[data-theme="light"] .cockpit-rules,
html[data-theme="light"] .cockpit-group{background:rgba(255,255,255,.76)}
html[data-theme="light"] .cockpit-project-card{background:#fff}
html[data-theme="light"] .cockpit-why{color:#5b6675}
html[data-theme="light"] .cockpit-next{background:rgba(54,184,154,.065)}
html[data-theme="light"] .cockpit-project-line{background:#f7f8fa;border-left-color:#c7ced8}
html[data-theme="light"] .cockpit-counts>div,
html[data-theme="light"] .cockpit-group-heading>span{background:#f6f7f9}
html[data-theme="light"] .mobile-nav{background:rgba(255,255,255,.94)}

/* Workspace layout, classic remains untouched */
html[data-layout="workspace"] .app-shell{grid-template-columns:220px minmax(0,1fr)}
html[data-layout="workspace"] .sidebar{padding:22px 14px}
html[data-layout="workspace"] .brand-title{font-size:15px;margin-left:9px}
html[data-layout="workspace"] .brand-subtitle{margin:0 9px 22px}
html[data-layout="workspace"] .nav-label{margin:20px 9px 7px}
html[data-layout="workspace"] .nav-button{padding:8px 10px;border-radius:8px;font-size:13px}
html[data-layout="workspace"] .sidebar-footer{left:14px;right:14px}
html[data-layout="workspace"] .main{padding:24px clamp(18px,3vw,38px) 56px;max-width:1900px;width:100%;margin:0 auto}
html[data-layout="workspace"] .topbar{align-items:center;margin-bottom:22px;padding:0 2px}
html[data-layout="workspace"] h1{font-size:clamp(30px,3vw,42px)}
html[data-layout="workspace"] .subtitle{font-size:13px;margin-top:8px}
html[data-layout="workspace"] .button{padding:8px 11px;border-radius:8px;font-size:12px}
html[data-layout="workspace"] .button.small{padding:6px 8px;font-size:11px}
html[data-layout="workspace"] .metrics{gap:9px}
html[data-layout="workspace"] .metric{padding:14px;border-radius:11px}
html[data-layout="workspace"] .list{border-radius:12px;box-shadow:none}
html[data-layout="workspace"] .item-row{padding:13px 14px}
html[data-layout="workspace"] .dialog-inner{border-radius:14px}
html[data-layout="workspace"] .control{border-radius:8px;padding:9px 10px}

/* Workspace cockpit */
.workspace-cockpit{display:grid;gap:18px}
.workspace-overview{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:18px;
  align-items:center;
  padding:16px 18px;
  border:1px solid var(--line-soft);
  border-radius:12px;
  background:var(--panel);
}
.workspace-overview-copy h2{margin:2px 0 4px;font-size:18px;letter-spacing:-.02em}
.workspace-overview-copy p{margin:0;color:var(--muted);font-size:12px;line-height:1.45}
.workspace-stats{display:flex;gap:8px}
.workspace-stat{
  min-width:76px;
  padding:9px 11px;
  border:1px solid var(--line-soft);
  border-radius:9px;
  background:var(--panel-2);
  text-align:center;
}
.workspace-stat strong{display:block;font-size:18px}
.workspace-stat span{display:block;margin-top:2px;color:var(--muted);font-size:9px;text-transform:uppercase;letter-spacing:.06em}

.workspace-focus-board{
  display:grid;
  grid-template-columns:repeat(4,minmax(220px,1fr));
  gap:10px;
  align-items:start;
  overflow-x:auto;
  padding-bottom:3px;
}
.workspace-column{
  min-width:220px;
  border:1px solid var(--line-soft);
  border-radius:12px;
  background:color-mix(in srgb,var(--panel) 82%,transparent);
  overflow:hidden;
}
.workspace-column[data-state="finish_now"]{border-top:3px solid #8b5cf6}
.workspace-column[data-state="active"]{border-top:3px solid #3b82f6}
.workspace-column[data-state="waiting"]{border-top:3px solid #f59e0b}
.workspace-column[data-state="next"]{border-top:3px solid #64748b}
.workspace-column-heading{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
  padding:12px 12px 9px;
  border-bottom:1px solid var(--line-soft);
}
.workspace-column-title{display:flex;align-items:center;gap:7px;font-size:14px;font-weight:760}
.workspace-column-title::before{content:"";width:7px;height:7px;border-radius:999px;background:#64748b}
.workspace-column[data-state="finish_now"] .workspace-column-title::before{background:#8b5cf6}
.workspace-column[data-state="active"] .workspace-column-title::before{background:#3b82f6}
.workspace-column[data-state="waiting"] .workspace-column-title::before{background:#f59e0b}
.workspace-column[data-state="next"] .workspace-column-title::before{background:#64748b}
.workspace-column-subtitle{margin-top:4px;color:var(--muted);font-size:10.5px;line-height:1.4}
.workspace-column-count{
  display:grid;place-items:center;min-width:23px;height:23px;padding:0 6px;
  border-radius:999px;background:var(--panel-2);color:var(--muted);font-size:11px;font-weight:750
}
.workspace-dropzone{display:grid;align-content:start;align-items:start;gap:8px;min-height:0;padding:9px}
.workspace-dropzone.drag-over{background:rgba(140,232,208,.055)}
.workspace-card{
  border:1px solid var(--line-soft);
  border-radius:9px;
  padding:11px;
  background:var(--panel);
  box-shadow:0 3px 12px rgba(0,0,0,.06);
  cursor:grab;
}
.workspace-card:active{cursor:grabbing}
.workspace-card.dragging{opacity:.45}
.workspace-card-head{display:flex;justify-content:space-between;gap:8px;align-items:flex-start}
.workspace-card-name{font-size:15px;font-weight:760;line-height:1.32}
.workspace-card-edit{
  width:25px;height:25px;display:grid;place-items:center;padding:0;border:0;border-radius:6px;
  background:transparent;color:var(--muted);font-size:15px
}
.workspace-card-edit:hover{background:var(--panel-2);color:var(--text)}
.workspace-card-why{
  margin:9px 0 0;color:var(--muted);font-size:11.5px;line-height:1.45;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden
}
.workspace-card-next{
  margin-top:9px;padding:8px 9px;border-radius:7px;background:var(--panel-2);
  font-size:11.5px;line-height:1.45
}
.workspace-card-next span{display:block;margin-bottom:4px;color:var(--muted);font-size:9px;text-transform:uppercase;letter-spacing:.06em}
.workspace-card-meta{display:flex;gap:7px;flex-wrap:wrap;margin-top:10px;color:var(--muted);font-size:10px}
.workspace-card-meta span{display:inline-flex;align-items:center;gap:4px}
.workspace-card-footer{display:flex;justify-content:flex-end;margin-top:9px}
.workspace-empty{
  min-height:92px;display:grid;place-items:center;padding:14px;border:1px dashed var(--line-soft);
  border-radius:8px;color:var(--muted);font-size:11px;text-align:center
}

.workspace-backlog{
  border:1px solid var(--line-soft);
  border-radius:12px;
  background:var(--panel);
  overflow:hidden;
}
.workspace-backlog-head{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(220px,320px);
  gap:14px;
  align-items:center;
  padding:14px 15px;
  border-bottom:1px solid var(--line-soft);
}
.workspace-backlog-head h2{margin:0;font-size:14px}
.workspace-backlog-head p{margin:3px 0 0;color:var(--muted);font-size:10px}
.workspace-backlog-search{height:34px}
.workspace-backlog-section{padding:10px 12px 12px}
.workspace-backlog-section + .workspace-backlog-section{border-top:1px solid var(--line-soft)}
.workspace-backlog-title{
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  padding:2px 2px 8px;font-size:11px;font-weight:750
}
.workspace-backlog-title span{color:var(--muted);font-size:9px;font-weight:650}
.workspace-backlog-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
.workspace-backlog-card{
  display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:center;
  padding:9px 10px;border:1px solid var(--line-soft);border-radius:8px;background:var(--panel-2)
}
.workspace-backlog-name{font-size:11px;font-weight:720;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.workspace-backlog-meta{margin-top:2px;color:var(--muted);font-size:9px}
.workspace-backlog-actions{display:flex;gap:4px}
.workspace-backlog-empty{padding:12px;color:var(--muted);font-size:10px}
.workspace-backlog-card[hidden]{display:none!important}

html[data-theme="light"] .workspace-card{box-shadow:0 2px 10px rgba(26,40,58,.06)}
html[data-theme="light"] .workspace-column,
html[data-theme="light"] .workspace-overview,
html[data-theme="light"] .workspace-backlog{background:#fff}

@media(max-width:1200px){
  .workspace-focus-board{grid-template-columns:repeat(4,minmax(250px,1fr))}
  .workspace-backlog-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:780px){
  .display-controls{width:100%;order:2}
  .display-toggle{flex:1;min-width:0}
  html[data-layout="workspace"] .main{padding:18px 14px 100px}
  .workspace-overview{grid-template-columns:1fr}
  .workspace-stats{display:grid;grid-template-columns:repeat(3,1fr)}
  .workspace-focus-board{grid-template-columns:repeat(4,minmax(270px,1fr));margin-right:-14px}
  .workspace-backlog-head{grid-template-columns:1fr}
  .workspace-backlog-grid{grid-template-columns:1fr}
}


/* Cockpit focus tasks */
.task-focus-option{
  display:flex;
  align-items:flex-start;
  gap:11px;
  padding:12px 13px;
  border:1px solid var(--line);
  border-radius:10px;
  background:var(--panel-2);
  cursor:pointer;
}
.task-focus-option input{
  width:17px;
  height:17px;
  margin:2px 0 0;
  flex:0 0 auto;
  accent-color:var(--accent);
}
.task-focus-option span{display:grid;gap:3px}
.task-focus-option strong{font-size:12px}
.task-focus-option small{color:var(--muted);font-size:10px;line-height:1.4}

.cockpit-focus-tasks{
  margin-top:11px;
  padding-top:10px;
  border-top:1px solid var(--line-soft);
}
.cockpit-focus-tasks.is-empty{
  padding-top:6px;
}
.cockpit-focus-tasks.is-empty .cockpit-add-focus-task{
  margin-top:0;
}
.cockpit-focus-tasks-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  margin-bottom:6px;
  color:var(--muted);
  font-size:9px;
  font-weight:760;
  letter-spacing:.055em;
  text-transform:uppercase;
}
.cockpit-focus-tasks-head strong{
  min-width:21px;
  height:21px;
  display:grid;
  place-items:center;
  padding:0 5px;
  border-radius:999px;
  background:var(--panel-2);
  color:var(--text);
  font-size:10px;
}
.cockpit-focus-task-list{display:grid;gap:5px}
.cockpit-focus-task{
  display:grid;
  grid-template-columns:24px minmax(0,1fr);
  gap:6px;
  align-items:center;
  padding:5px 6px;
  border:1px solid var(--line-soft);
  border-radius:7px;
  background:var(--panel-2);
}
.cockpit-focus-task.has-status{
  grid-template-columns:24px minmax(0,1fr) auto;
}
.cockpit-focus-task.has-status .cockpit-focus-task-main{
  overflow:hidden;
  -webkit-mask-image:linear-gradient(to right,#000 0,#000 calc(100% - 24px),transparent 100%);
  mask-image:linear-gradient(to right,#000 0,#000 calc(100% - 24px),transparent 100%);
}
.cockpit-focus-status{
  align-self:center;
  justify-self:end;
  padding:3px 7px;
  border:1px solid rgba(96,165,250,.30);
  border-radius:999px;
  background:rgba(59,130,246,.09);
  color:#9fc7ff;
  font-size:8.5px;
  font-weight:760;
  line-height:1.2;
  white-space:nowrap;
}
.cockpit-focus-check{
  width:22px;
  height:22px;
  padding:0;
  border:1px solid var(--line);
  border-radius:6px;
  background:var(--panel);
  color:var(--muted);
  cursor:pointer;
}
.cockpit-focus-check:hover{border-color:var(--accent);color:var(--accent-strong)}
.cockpit-focus-task-main{
  min-width:0;
  padding:0;
  border:0;
  background:transparent;
  color:var(--text);
  text-align:left;
  cursor:pointer;
}
.cockpit-focus-task-title{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:11px;
  font-weight:680;
  line-height:1.35;
}
.cockpit-focus-task-date{
  display:block;
  margin-top:2px;
  color:var(--muted);
  font-size:9px;
}
.cockpit-focus-task-empty,
.cockpit-focus-task-more{
  padding:5px 2px;
  color:var(--muted);
  font-size:9px;
}
.cockpit-add-focus-task{
  margin-top:6px;
  padding:5px 0;
  border:0;
  background:transparent;
  color:var(--accent-strong);
  font-size:10px;
  font-weight:720;
  cursor:pointer;
}
.cockpit-add-focus-task:hover{text-decoration:underline}

html[data-layout="workspace"] .cockpit-focus-tasks{margin-top:10px}
html[data-layout="workspace"] .cockpit-focus-task-title{font-size:11.5px}
html[data-layout="workspace"] .cockpit-add-focus-task{font-size:10.5px}
html[data-theme="light"] .task-focus-option,
html[data-theme="light"] .cockpit-focus-task{background:#f6f8fb}
html[data-theme="light"] .cockpit-focus-check{background:#fff}
html[data-theme="light"] .cockpit-focus-status{
  border-color:#c9dcfb;
  background:#eef5ff;
  color:#235fba;
}

@media(max-width:780px){
  .cockpit-focus-task-title{white-space:normal}
}

.badge.cockpit-focus{
  background:rgba(140,232,208,.09);
  border-color:rgba(140,232,208,.22);
  color:var(--accent-strong);
}
html[data-theme="light"] .badge.cockpit-focus{
  background:rgba(54,184,154,.09);
  border-color:rgba(54,184,154,.22);
  color:#14725e;
}


/* 2026-09-28 visual readability and complete light-theme pass */
:root{
  --border:var(--line);
  --surface:rgba(255,255,255,.035);
  --surface-strong:rgba(255,255,255,.08);
}

/* Readability: approximate the comfort of browser zoom without scaling layout */
html[data-layout="workspace"] body{font-size:17px}
html[data-layout="workspace"] .brand-title{font-size:17px}
html[data-layout="workspace"] .brand-subtitle{font-size:12.5px}
html[data-layout="workspace"] .nav-label{font-size:11px}
html[data-layout="workspace"] .nav-button{font-size:15.5px;line-height:1.3}
html[data-layout="workspace"] .button{font-size:14px}
html[data-layout="workspace"] .button.small{font-size:12.5px}
html[data-layout="workspace"] .subtitle{font-size:14.5px}
html[data-layout="workspace"] .control{font-size:14.5px}
html[data-layout="workspace"] .section-title{font-size:17px}
html[data-layout="workspace"] .section-meta{font-size:13px}
html[data-layout="workspace"] .item-title{font-size:17px}
html[data-layout="workspace"] .item-content{font-size:14px;line-height:1.45}
html[data-layout="workspace"] .item-project,
html[data-layout="workspace"] .item-date{font-size:14px}
html[data-layout="workspace"] .date-label{font-size:10px}
html[data-layout="workspace"] .badge{font-size:11.5px;padding:5px 9px}
html[data-layout="workspace"] .today-section-title{font-size:15px}
html[data-layout="workspace"] .today-section-count{font-size:12px}
html[data-layout="workspace"] .today-empty{font-size:13.5px}
html[data-layout="workspace"] .project-name{font-size:22px}
html[data-layout="workspace"] .project-description{font-size:14px}
html[data-layout="workspace"] .project-stats span{font-size:10.5px}
html[data-layout="workspace"] .project-footer{font-size:11.5px}
html[data-layout="workspace"] .project-detail-summary{font-size:13.5px}
html[data-layout="workspace"] .project-links-group-title{font-size:12px}
html[data-layout="workspace"] .project-link-label{font-size:14px}
html[data-layout="workspace"] .project-link-meta{font-size:11.5px}
html[data-layout="workspace"] .project-links-empty{font-size:13px}
html[data-layout="workspace"] .project-links-history summary{font-size:13px}
html[data-layout="workspace"] .journal-toolbar label{font-size:12.5px}
html[data-layout="workspace"] .journal-day-title{font-size:15px}
html[data-layout="workspace"] .journal-event-time{font-size:12.5px}
html[data-layout="workspace"] .journal-event-kind{font-size:11px}
html[data-layout="workspace"] .journal-event-title{font-size:17px}
html[data-layout="workspace"] .journal-event-project{font-size:12.5px}
html[data-layout="workspace"] .journal-event-content{font-size:13.5px}
html[data-layout="workspace"] .dialog-title{font-size:25px}
html[data-layout="workspace"] .dialog-subtitle{font-size:13.5px}
html[data-layout="workspace"] .field label{font-size:12.5px}
html[data-layout="workspace"] .field-help{font-size:11.5px}
html[data-layout="workspace"] .quick-type{font-size:13px}
html[data-layout="workspace"] .quick-title{font-size:18px}
html[data-layout="workspace"] .detail-content{font-size:15px}
html[data-layout="workspace"] .detail-field{font-size:14px}
html[data-layout="workspace"] .detail-label{font-size:10px}
html[data-layout="workspace"] .followup-meta{font-size:13px}
html[data-layout="workspace"] .followup-content{font-size:14px}
html[data-layout="workspace"] .followups-form label{font-size:13px}
html[data-layout="workspace"] .workspace-overview-copy p{font-size:13.5px}
html[data-layout="workspace"] .workspace-stat span{font-size:10px}
html[data-layout="workspace"] .workspace-card-name{font-size:16px}
html[data-layout="workspace"] .workspace-card-why{font-size:12.5px}
html[data-layout="workspace"] .workspace-card-next{font-size:12.5px}
html[data-layout="workspace"] .workspace-card-next span{font-size:9.5px}
html[data-layout="workspace"] .workspace-card-meta{font-size:11px}
html[data-layout="workspace"] .workspace-backlog-head p{font-size:11.5px}
html[data-layout="workspace"] .workspace-backlog-name{font-size:12.5px}
html[data-layout="workspace"] .workspace-backlog-meta{font-size:10.5px}
html[data-layout="workspace"] .cockpit-focus-task-title{font-size:12.5px}
html[data-layout="workspace"] .cockpit-focus-task-date{font-size:10px}
html[data-layout="workspace"] .cockpit-focus-status{font-size:9px;padding:3px 7px}
html[data-layout="workspace"] .cockpit-add-focus-task{font-size:11.5px}

/* More useful status colors in both themes */
.badge.todo{border-color:rgba(148,163,184,.28);color:#b9c4d1;background:rgba(148,163,184,.07)}
.badge.in_progress{border-color:rgba(96,165,250,.30);color:#9fc7ff;background:rgba(59,130,246,.09)}
.badge.waiting{border-color:rgba(245,158,11,.30);color:#ffd48a;background:rgba(245,158,11,.08)}
.badge.active{border-color:rgba(52,211,153,.27);color:#9de6c9;background:rgba(52,211,153,.07)}
.badge.done{border-color:rgba(74,222,128,.24);color:#a8e6b3;background:rgba(74,222,128,.06)}
.badge.archived{border-color:rgba(148,163,184,.18);color:#89939f;background:rgba(148,163,184,.045)}
.badge.note{border-color:rgba(96,165,250,.25);color:#a8c9ff;background:rgba(59,130,246,.065)}
.badge.idea{border-color:rgba(167,139,250,.26);color:#cabbff;background:rgba(139,92,246,.07)}
.badge.decision{border-color:rgba(129,140,248,.26);color:#bbc2ff;background:rgba(99,102,241,.07)}
.badge.activity{border-color:rgba(34,211,238,.24);color:#9deaf5;background:rgba(6,182,212,.06)}
.badge.inbox{border-color:rgba(148,163,184,.22);color:#b8c1cd;background:rgba(148,163,184,.055)}

/* Full light-theme coverage */
html[data-theme="light"]{
  --bg:#f5f7fb;
  --panel:#ffffff;
  --panel-2:#f5f7fa;
  --line:#d9e0e9;
  --line-soft:#e7ebf1;
  --text:#17202b;
  --muted:#607084;
  --accent:#26ad8d;
  --accent-strong:#13765f;
  --danger:#b93849;
  --warning:#946000;
  --success:#23733e;
  --border:#d9e0e9;
  --surface:#f7f9fb;
  --surface-strong:#edf1f5;
  --shadow:0 12px 36px rgba(30,45,65,.08);
}
html[data-theme="light"] body{color:var(--text)}
html[data-theme="light"] .sidebar{border-color:var(--line-soft)}
html[data-theme="light"] .brand-title{color:#17202b}
html[data-theme="light"] .brand-subtitle,
html[data-theme="light"] .nav-label{color:#718096}
html[data-theme="light"] .nav-button{color:#445266}
html[data-theme="light"] .nav-button:hover{background:#f1f4f7;color:#17202b}
html[data-theme="light"] .nav-button.active{background:#e8f7f3;color:#116b57}

html[data-theme="light"] .button{
  border-color:#d5dde7;
  background:#fff;
  color:#1c2734;
  box-shadow:0 1px 1px rgba(30,45,65,.02);
}
html[data-theme="light"] .button:hover{border-color:#aeb9c7;background:#f9fafb}
html[data-theme="light"] .button.ghost{background:transparent}
html[data-theme="light"] .button.primary{background:#2fbea0;color:#fff;border-color:#2fbea0}
html[data-theme="light"] .button.primary:hover{background:#25a98e;border-color:#25a98e}
html[data-theme="light"] .button.danger{color:#b93849}

html[data-theme="light"] .control{
  border-color:#d5dde7;
  background:#fff;
  color:#17202b;
}
html[data-theme="light"] .control:focus{
  border-color:rgba(38,173,141,.62);
  box-shadow:0 0 0 3px rgba(38,173,141,.10);
}
html[data-theme="light"] .control::placeholder{color:#929dac}
html[data-theme="light"] .optional-label,
html[data-theme="light"] .field-help{color:#778497}
html[data-theme="light"] .field label{color:#47566a}

html[data-theme="light"] .list,
html[data-theme="light"] .metric,
html[data-theme="light"] .today-section,
html[data-theme="light"] .project-card,
html[data-theme="light"] .project-detail-header,
html[data-theme="light"] .project-links-panel,
html[data-theme="light"] .file-card,
html[data-theme="light"] .workspace-overview,
html[data-theme="light"] .workspace-column,
html[data-theme="light"] .workspace-card,
html[data-theme="light"] .workspace-backlog{
  background:#fff;
  border-color:var(--line-soft);
  box-shadow:0 5px 20px rgba(30,45,65,.045);
}
html[data-theme="light"] .item-row{border-color:var(--line-soft)}
html[data-theme="light"] .item-row:hover{background:#f8fbfa}
html[data-theme="light"] .item-content,
html[data-theme="light"] .item-project,
html[data-theme="light"] .item-date{color:#617084}
html[data-theme="light"] .date-label{color:#7a8798}
html[data-theme="light"] .date-line.created{color:#778497}

html[data-theme="light"] .badge{
  border-color:#dce2ea;
  background:#f3f5f8;
  color:#536173;
}
html[data-theme="light"] .badge.task{border-color:#bfe9df;color:#126b57;background:#eaf8f4}
html[data-theme="light"] .badge.todo{border-color:#d8dee7;color:#566579;background:#f1f3f6}
html[data-theme="light"] .badge.in_progress{border-color:#c9dcfb;color:#235fba;background:#eef5ff}
html[data-theme="light"] .badge.waiting{border-color:#efd9a5;color:#805500;background:#fff7e5}
html[data-theme="light"] .badge.active{border-color:#bfe7d3;color:#1f704c;background:#eaf8f0}
html[data-theme="light"] .badge.done{border-color:#c6e8cf;color:#277541;background:#eff9f1}
html[data-theme="light"] .badge.archived{border-color:#dde2e8;color:#707c8c;background:#f4f5f7}
html[data-theme="light"] .badge.note{border-color:#cadcf7;color:#315f9e;background:#eef5ff}
html[data-theme="light"] .badge.idea{border-color:#d9cff9;color:#6548a8;background:#f5f1ff}
html[data-theme="light"] .badge.decision{border-color:#d2d6fa;color:#4f58a8;background:#f1f2ff}
html[data-theme="light"] .badge.activity{border-color:#c2e8ec;color:#25717b;background:#edf9fa}
html[data-theme="light"] .badge.inbox{border-color:#dce2e8;color:#596677;background:#f4f6f8}
html[data-theme="light"] .badge.cockpit-focus{background:#e8f7f2;border-color:#b9e7da;color:#116b57}

html[data-theme="light"] .today-section-header{background:#f8fafb}
html[data-theme="light"] .today-section-count{background:#eef2f6;color:#526174}
html[data-theme="light"] .today-empty{color:#7a8798}
html[data-theme="light"] .today-section.overdue{border-color:#f0cfd3}
html[data-theme="light"] .today-section.today{border-color:#bee7dc}
html[data-theme="light"] .today-section.tomorrow{border-color:#cadbfa}
html[data-theme="light"] .today-section.week{border-color:#cde8d4}
html[data-theme="light"] .today-section.later{border-color:#d9d3f6}
html[data-theme="light"] .today-section.nodue{border-color:#dce2e8}
html[data-theme="light"] .today-section.waiting{border-color:#eedcad}
html[data-theme="light"] .today-section.completed{border-color:#cee8d4}

html[data-theme="light"] .project-card:hover{
  background:#fbfcfd;
  border-color:#c7d0dc;
}
html[data-theme="light"] .project-open-mark{color:#8793a2}
html[data-theme="light"] .project-stats div{
  background:#f7f9fb;
  border-color:#e4e9ef;
}
html[data-theme="light"] .project-stats span,
html[data-theme="light"] .project-footer,
html[data-theme="light"] .project-links-group-title,
html[data-theme="light"] .project-link-meta{color:#687689}
html[data-theme="light"] .project-link-row{
  background:#f8fafb;
  border-color:#e0e6ed;
}
html[data-theme="light"] .project-link-row.current{
  background:#ecf8f5;
  border-color:#bfe5db;
}
html[data-theme="light"] .project-link-icon{background:#eef2f6}
html[data-theme="light"] .project-links-empty{
  border-color:#cfd7e1;
  color:#738095;
}
html[data-theme="light"] .project-links-history summary{color:#536174}

html[data-theme="light"] .journal-day-title{color:#455468}
html[data-theme="light"] .journal-day-events{border-left-color:#d5dce5}
html[data-theme="light"] .journal-event::before{
  background:#f5f7fb;
  box-shadow:0 0 0 4px #f5f7fb;
  border-color:#9aa6b5;
}
html[data-theme="light"] .journal-event-card{
  background:#fff;
  border-color:#e0e6ed;
  box-shadow:0 3px 14px rgba(30,45,65,.035);
}
html[data-theme="light"] .journal-event:hover .journal-event-card{
  background:#f9fbfc;
  border-color:#c8d2dd;
}
html[data-theme="light"] .journal-event-time,
html[data-theme="light"] .journal-event-kind,
html[data-theme="light"] .journal-event-project{color:#6d7a8d}
html[data-theme="light"] .journal-event-content{color:#536174}

html[data-theme="light"] .dialog{
  border-color:#d5dde7;
  background:#fff;
  color:#17202b;
  box-shadow:0 28px 80px rgba(35,49,68,.20);
}
html[data-theme="light"] .dialog::backdrop{background:rgba(35,45,58,.36)}
html[data-theme="light"] .quick-type{
  border-color:#d5dde7;
  background:#f5f7fa;
  color:#536174;
}
html[data-theme="light"] .quick-type:hover{background:#eef2f6}
html[data-theme="light"] .quick-type.active{
  border-color:#a8ddcf;
  background:#e7f7f2;
  color:#116b57;
}
html[data-theme="light"] .detail-content{
  background:#f7f9fb;
  border-color:#e2e7ed;
  color:#344255;
}
html[data-theme="light"] .detail-field{
  background:#fafbfc;
  border-color:#e4e8ee;
  color:#344255;
}
html[data-theme="light"] .detail-label{color:#758195}
html[data-theme="light"] .task-focus-option{
  background:#f7f9fb;
  border-color:#dce3eb;
}
html[data-theme="light"] .cockpit-focus-task{
  background:#f6f8fb;
  border-color:#e2e7ed;
}
html[data-theme="light"] .cockpit-focus-check{
  background:#fff;
  border-color:#d5dde7;
  color:#6f7b8c;
}

html[data-theme="light"] .followups{border-top-color:#e1e6ed}
html[data-theme="light"] .followups-count{background:#eef2f6;color:#536174}
html[data-theme="light"] .followup{
  background:#f8fafb;
  border-color:#e1e6ed;
}
html[data-theme="light"] .followup-meta{color:#718095}
html[data-theme="light"] .followups-empty{color:#778497}

html[data-theme="light"] .cockpit-rules,
html[data-theme="light"] .cockpit-group{background:#fff;border-color:#e1e6ed}
html[data-theme="light"] .cockpit-project-card{background:#fff;border-color:#e1e6ed}
html[data-theme="light"] .cockpit-why{color:#59687a}
html[data-theme="light"] .cockpit-next{background:#f1f7f5}
html[data-theme="light"] .cockpit-project-line{background:#f7f9fb;border-left-color:#cbd4df}
html[data-theme="light"] .cockpit-counts>div,
html[data-theme="light"] .cockpit-group-heading>span{background:#f3f5f8}
html[data-theme="light"] .workspace-stat,
html[data-theme="light"] .workspace-card-next,
html[data-theme="light"] .workspace-backlog-card,
html[data-theme="light"] .workspace-column-count{background:#f5f7fa}
html[data-theme="light"] .workspace-backlog-card{border-color:#e2e7ed}
html[data-theme="light"] .workspace-card-edit{color:#738095}
html[data-theme="light"] .workspace-card-edit:hover{background:#eef2f6;color:#17202b}
html[data-theme="light"] .workspace-empty{border-color:#d8e0e9;color:#748195}

html[data-theme="light"] .files-empty-state{
  background:#fff;
  border-color:#d4dbe4;
}
html[data-theme="light"] .file-icon{
  background:#edf8f5;
  border-color:#c5e7de;
  color:#126b57;
}
html[data-theme="light"] .file-path,
html[data-theme="light"] .file-meta{color:#6c798b}

html[data-theme="light"] .mobile-nav{
  background:rgba(255,255,255,.96);
  border-color:#d5dde7;
  box-shadow:0 10px 30px rgba(30,45,65,.12);
}

/* Avoid over-scaling on smaller screens */
@media(max-width:780px){
  html[data-layout="workspace"] .nav-button{font-size:14px}
  html[data-layout="workspace"] .button{font-size:13px}
  html[data-layout="workspace"] .item-title{font-size:15px}
  html[data-layout="workspace"] .journal-event-title{font-size:16px}
}

html[data-theme="light"] .login-card{
  background:#fff;
  border-color:#d8e0e9;
  box-shadow:0 18px 48px rgba(30,45,65,.12);
}
html[data-theme="light"] .login-note{color:#738095}


/* One-level project hierarchy */
.project-family{
  min-width:0;
  display:grid;
  gap:9px;
  align-content:start;
}
.subprojects-panel{
  margin-left:18px;
  padding:10px;
  border-left:2px solid var(--line);
  border-radius:0 12px 12px 0;
  background:color-mix(in srgb,var(--panel) 72%,transparent);
}
.subprojects-panel-heading{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  padding:1px 3px 8px;
  color:var(--muted);
  font-size:11px;
  font-weight:760;
  letter-spacing:.05em;
  text-transform:uppercase;
}
.subprojects-panel-heading strong{
  min-width:23px;
  height:23px;
  display:grid;
  place-items:center;
  padding:0 6px;
  border-radius:999px;
  background:var(--panel-2);
  color:var(--text);
  font-size:10px;
}
.subprojects-grid{display:grid;gap:7px}
.project-card.subproject-card{
  padding:0;
  border-radius:12px;
  box-shadow:none;
  background:var(--panel-2);
  overflow:hidden;
}
.project-card.subproject-card:hover{
  transform:none;
}
.subproject-card-summary{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  min-height:50px;
  padding:10px 11px 10px 14px;
}
.project-card.subproject-card .project-name{
  min-width:0;
  font-size:15px;
  line-height:1.3;
}
.subproject-expand{
  width:31px;
  height:31px;
  display:grid;
  place-items:center;
  flex:0 0 auto;
  border:1px solid transparent;
  border-radius:8px;
  background:transparent;
  color:var(--muted);
  cursor:pointer;
  transition:.16s ease;
}
.subproject-expand:hover{
  border-color:var(--line-soft);
  background:rgba(255,255,255,.035);
  color:var(--text);
}
.subproject-expand span{
  display:block;
  font-size:23px;
  line-height:1;
  transform:rotate(90deg);
  transition:transform .16s ease;
}
.project-card.subproject-card.is-expanded .subproject-expand span{
  transform:rotate(-90deg);
}
.subproject-card-details{
  padding:0 14px 13px;
  border-top:1px solid var(--line-soft);
}
.subproject-detail-meta{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding-top:11px;
}
.project-card.subproject-card .project-description{
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}
.project-card.subproject-card .project-stats{margin-top:13px}
.project-card.subproject-card .project-footer{margin-top:10px}
.project-parent-label,
.cockpit-parent-label,
.workspace-card-parent,
.workspace-backlog-parent{
  margin-bottom:4px;
  color:var(--muted);
  font-size:10px;
  font-weight:720;
  letter-spacing:.03em;
}
.project-detail-actions{
  display:flex;
  gap:8px;
  align-items:center;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.project-breadcrumb{
  display:block;
  margin:0 0 6px;
  padding:0;
  border:0;
  background:transparent;
  color:var(--accent-strong);
  font-size:12px;
  font-weight:720;
  text-align:left;
  cursor:pointer;
}
.project-breadcrumb:hover{text-decoration:underline}
.project-subprojects-detail{
  padding:18px 20px;
  border:1px solid var(--line-soft);
  border-radius:18px;
  background:rgba(17,20,25,.72);
}
.project-subprojects-detail-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:9px;
  margin-top:14px;
}
.project-subproject-detail-card{
  display:grid;
  gap:4px;
  padding:12px 13px;
  border:1px solid var(--line-soft);
  border-radius:11px;
  background:var(--panel-2);
  color:var(--text);
  text-align:left;
  cursor:pointer;
}
.project-subproject-detail-card:hover{
  border-color:rgba(140,232,208,.30);
  transform:translateY(-1px);
}
.project-subproject-detail-name{
  font-size:14px;
  font-weight:740;
}
.project-subproject-detail-meta{
  color:var(--muted);
  font-size:11px;
  line-height:1.4;
}
html[data-layout="workspace"] .project-parent-label,
html[data-layout="workspace"] .cockpit-parent-label,
html[data-layout="workspace"] .workspace-card-parent,
html[data-layout="workspace"] .workspace-backlog-parent{font-size:11px}
html[data-layout="workspace"] .project-subproject-detail-name{font-size:15px}
html[data-layout="workspace"] .project-subproject-detail-meta{font-size:12px}

html[data-theme="light"] .subprojects-panel{
  border-left-color:#cfd8e3;
  background:#f7f9fb;
}
html[data-theme="light"] .project-card.subproject-card,
html[data-theme="light"] .project-subproject-detail-card{
  background:#f8fafb;
  border-color:#e0e6ed;
}
html[data-theme="light"] .subproject-expand:hover{
  background:#eef2f6;
  border-color:#d9e0e8;
}
html[data-theme="light"] .subproject-card-details{
  border-top-color:#e0e6ed;
}
html[data-theme="light"] .project-subprojects-detail{
  background:#fff;
  border-color:#e0e6ed;
}
html[data-theme="light"] .project-subproject-detail-card:hover{
  background:#f4f8f7;
  border-color:#bcded5;
}

@media(max-width:780px){
  .subprojects-panel{margin-left:8px}
  .subproject-card-summary{min-height:48px;padding:9px 9px 9px 12px}
  .project-card.subproject-card .project-name{font-size:15px}
  .subproject-expand{width:34px;height:34px}
  .project-subprojects-detail-grid{grid-template-columns:1fr}
  .project-detail-actions{justify-content:flex-start}
}


/* Quick project switcher inside a project */
.project-switch-toolbar{
  display:grid;
  grid-template-columns:minmax(180px,260px) minmax(320px,1fr);
  gap:16px;
  align-items:center;
  margin-bottom:18px;
  padding:12px 14px;
  border:1px solid var(--line-soft);
  border-radius:12px;
  background:var(--panel);
}
.project-switch-label{
  display:grid;
  gap:3px;
}
.project-switch-label span{
  font-size:12px;
  font-weight:760;
}
.project-switch-label small{
  color:var(--muted);
  font-size:10.5px;
  line-height:1.35;
}
.project-switch-search{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:8px;
  align-items:center;
}
html[data-layout="workspace"] .project-switch-label span{font-size:13px}
html[data-layout="workspace"] .project-switch-label small{font-size:11.5px}

html[data-theme="light"] .project-switch-toolbar{
  background:#fff;
  border-color:#e1e6ed;
  box-shadow:0 4px 16px rgba(30,45,65,.035);
}

@media(max-width:780px){
  .project-switch-toolbar{
    grid-template-columns:1fr;
    gap:10px;
    padding:11px 12px;
  }
  .project-switch-search{
    grid-template-columns:1fr;
  }
  .project-switch-search .button{width:100%}
}


/* Project spaces: Business / Personal / System */
.space-controls{
  display:flex;
  gap:4px;
  padding:4px;
  border:1px solid var(--line-soft);
  border-radius:10px;
  background:var(--panel-2);
}
.space-toggle{
  border:0;
  border-radius:7px;
  padding:7px 10px;
  background:transparent;
  color:var(--muted);
  font:inherit;
  font-size:11px;
  font-weight:720;
  cursor:pointer;
}
.space-toggle:hover{
  color:var(--text);
  background:var(--surface-strong);
}
.space-toggle.active{
  color:var(--text);
  background:var(--panel);
  box-shadow:0 1px 5px rgba(0,0,0,.14);
}
.space-toggle[data-space="business"].active{color:#8fc5ff}
.space-toggle[data-space="personal"].active{color:#dfb8ff}
.space-toggle[data-space="system"].active{color:#b9c2cf}

.space-badge{
  display:inline-flex;
  align-items:center;
  flex:0 0 auto;
  padding:3px 7px;
  border:1px solid var(--line);
  border-radius:999px;
  color:var(--muted);
  background:var(--panel-2);
  font-size:9px;
  font-weight:760;
  line-height:1.2;
  letter-spacing:.02em;
}
.space-badge.business{
  border-color:rgba(96,165,250,.25);
  color:#9fc7ff;
  background:rgba(59,130,246,.075);
}
.space-badge.personal{
  border-color:rgba(192,132,252,.26);
  color:#d9b1ff;
  background:rgba(168,85,247,.075);
}
.space-badge.system{
  border-color:rgba(148,163,184,.24);
  color:#b9c3cf;
  background:rgba(148,163,184,.07);
}

.project-title-line,
.project-detail-title-line,
.workspace-card-title-line,
.workspace-backlog-title-line,
.cockpit-card-tags{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
.project-title-line .project-name,
.project-detail-title-line h2{margin:0}
.project-space-help{
  min-height:38px;
  display:flex;
  align-items:center;
}
#projectCreateSpace:disabled,
#cockpitProjectSpace:disabled{
  opacity:.72;
  cursor:not-allowed;
}

html[data-layout="workspace"] .space-toggle{font-size:12px}
html[data-layout="workspace"] .space-badge{font-size:10px}

html[data-theme="light"] .space-controls{
  background:#f2f5f8;
  border-color:#dde4eb;
}
html[data-theme="light"] .space-toggle{color:#657286}
html[data-theme="light"] .space-toggle:hover{
  color:#17202b;
  background:#e9edf2;
}
html[data-theme="light"] .space-toggle.active{
  background:#fff;
  color:#17202b;
  box-shadow:0 1px 4px rgba(30,45,65,.10);
}
html[data-theme="light"] .space-toggle[data-space="business"].active{color:#235fba}
html[data-theme="light"] .space-toggle[data-space="personal"].active{color:#7440a8}
html[data-theme="light"] .space-toggle[data-space="system"].active{color:#536174}
html[data-theme="light"] .space-badge.business{
  border-color:#cadcf7;
  color:#315f9e;
  background:#eef5ff;
}
html[data-theme="light"] .space-badge.personal{
  border-color:#decdf4;
  color:#7440a8;
  background:#f7f1ff;
}
html[data-theme="light"] .space-badge.system{
  border-color:#dce2e8;
  color:#5f6d7e;
  background:#f3f5f7;
}

@media(max-width:1100px){
  .topbar .actions{flex-wrap:wrap}
  .space-controls{order:2}
}
@media(max-width:780px){
  .space-controls{
    width:100%;
    order:0;
    overflow-x:auto;
  }
  .space-toggle{
    flex:1;
    min-width:max-content;
  }
}


/* Focus du jour */
.badge.daily-focus{
  border-color:rgba(251,191,36,.28);
  color:#ffd77c;
  background:rgba(245,158,11,.08);
}
.daily-focus-panel{
  padding:18px 20px;
  border:1px solid var(--line-soft);
  border-radius:18px;
  background:var(--panel);
  box-shadow:var(--shadow);
}
.daily-focus-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
}
.daily-focus-head h2{
  margin:4px 0 6px;
  font-size:21px;
}
.daily-focus-head p{
  margin:0;
  color:var(--muted);
  font-size:12px;
  line-height:1.5;
}
.daily-focus-count{
  min-width:72px;
  display:flex;
  align-items:baseline;
  justify-content:center;
  gap:3px;
  padding:10px 12px;
  border:1px solid var(--line-soft);
  border-radius:13px;
  background:var(--panel-2);
}
.daily-focus-count strong{font-size:26px}
.daily-focus-count span{color:var(--muted);font-size:12px}
.daily-focus-list{
  display:grid;
  gap:7px;
  margin-top:14px;
}
.daily-focus-card{
  display:grid;
  grid-template-columns:30px minmax(0,1fr) auto;
  gap:10px;
  align-items:center;
  padding:9px 10px;
  border:1px solid var(--line-soft);
  border-radius:11px;
  background:var(--panel-2);
}
.daily-focus-rank{
  width:27px;
  height:27px;
  display:grid;
  place-items:center;
  border-radius:8px;
  background:var(--surface-strong);
  color:var(--muted);
  font-size:11px;
  font-weight:800;
}
.daily-focus-main{
  min-width:0;
  padding:0;
  border:0;
  background:transparent;
  color:var(--text);
  text-align:left;
  cursor:pointer;
}
.daily-focus-title{
  display:block;
  font-size:14px;
  font-weight:760;
  line-height:1.35;
}
.daily-focus-project{
  display:block;
  margin-top:3px;
  color:var(--muted);
  font-size:10.5px;
}
.daily-focus-actions{
  display:flex;
  gap:6px;
  align-items:center;
}
.daily-focus-empty{
  display:grid;
  gap:4px;
  padding:18px;
  border:1px dashed var(--line);
  border-radius:11px;
  color:var(--muted);
  text-align:center;
}
.daily-focus-empty strong{color:var(--text);font-size:13px}
.daily-focus-empty span{font-size:11px}
.daily-focus-hint{
  margin-top:8px;
  color:var(--muted);
  font-size:10px;
  text-align:right;
}

/* Weekly review */
.review-list{
  border:0;
  background:transparent;
  box-shadow:none;
}
.weekly-review{display:grid;gap:14px}
.review-overview{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:20px;
  padding:20px;
  border:1px solid var(--line-soft);
  border-radius:18px;
  background:var(--panel);
  box-shadow:var(--shadow);
}
.review-overview h2{
  margin:4px 0 7px;
  font-size:22px;
}
.review-overview p{
  max-width:760px;
  margin:0;
  color:var(--muted);
  font-size:12px;
  line-height:1.55;
}
.review-score{
  min-width:112px;
  display:grid;
  justify-items:center;
  gap:1px;
  padding:12px 14px;
  border:1px solid var(--line-soft);
  border-radius:14px;
  background:var(--panel-2);
}
.review-score strong{font-size:30px;line-height:1}
.review-score span{color:var(--muted);font-size:10px;text-align:center}
.review-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}
.review-section{
  min-width:0;
  padding:15px;
  border:1px solid var(--line-soft);
  border-radius:15px;
  background:var(--panel);
}
.review-section-head{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:flex-start;
  padding-bottom:10px;
  border-bottom:1px solid var(--line-soft);
}
.review-section-head h2{
  margin:0;
  font-size:15px;
}
.review-section-head p{
  margin:4px 0 0;
  color:var(--muted);
  font-size:10.5px;
  line-height:1.45;
}
.review-section-head>span{
  min-width:25px;
  height:25px;
  display:grid;
  place-items:center;
  padding:0 6px;
  border-radius:999px;
  background:var(--panel-2);
  color:var(--text);
  font-size:10px;
  font-weight:800;
}
.review-section-list{
  display:grid;
  gap:7px;
  margin-top:10px;
}
.review-card{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:10px;
  padding:10px 11px;
  border:1px solid var(--line-soft);
  border-radius:11px;
  background:var(--panel-2);
}
.review-card-main{min-width:0}
.review-card-tags{
  display:flex;
  gap:5px;
  flex-wrap:wrap;
  align-items:center;
  margin-bottom:5px;
}
.review-card-title{
  font-size:13px;
  font-weight:760;
  line-height:1.35;
}
.review-card-title>span{
  color:var(--muted);
  font-size:10px;
  font-weight:650;
}
.review-card-message{
  margin-top:4px;
  color:var(--text);
  font-size:11px;
  line-height:1.45;
}
.review-card-meta{
  display:flex;
  gap:5px 9px;
  flex-wrap:wrap;
  margin-top:6px;
  color:var(--muted);
  font-size:9.5px;
}
.review-card-actions{
  display:flex;
  gap:5px;
  align-items:flex-start;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.review-clear{
  padding:17px 10px;
  color:var(--muted);
  font-size:11px;
  text-align:center;
  border:1px dashed var(--line);
  border-radius:10px;
}
.review-section.overdue{border-top-color:rgba(239,68,68,.35)}
.review-section.waiting{border-top-color:rgba(245,158,11,.35)}
.review-section.stale{border-top-color:rgba(148,163,184,.35)}
.review-section.clarify{border-top-color:rgba(96,165,250,.35)}
.review-section.close{border-top-color:rgba(52,211,153,.35)}

html[data-layout="workspace"] .daily-focus-head h2{font-size:23px}
html[data-layout="workspace"] .daily-focus-head p{font-size:13px}
html[data-layout="workspace"] .daily-focus-title{font-size:15px}
html[data-layout="workspace"] .daily-focus-project{font-size:11.5px}
html[data-layout="workspace"] .review-overview h2{font-size:24px}
html[data-layout="workspace"] .review-overview p{font-size:13px}
html[data-layout="workspace"] .review-section-head h2{font-size:16px}
html[data-layout="workspace"] .review-section-head p{font-size:11.5px}
html[data-layout="workspace"] .review-card-title{font-size:14px}
html[data-layout="workspace"] .review-card-message{font-size:12px}
html[data-layout="workspace"] .review-card-meta{font-size:10.5px}

html[data-theme="light"] .badge.daily-focus{
  border-color:#efd9a5;
  color:#805500;
  background:#fff7e5;
}
html[data-theme="light"] .daily-focus-panel,
html[data-theme="light"] .review-overview,
html[data-theme="light"] .review-section{
  background:#fff;
  border-color:#e1e6ed;
  box-shadow:0 5px 20px rgba(30,45,65,.045);
}
html[data-theme="light"] .daily-focus-count,
html[data-theme="light"] .daily-focus-card,
html[data-theme="light"] .review-score,
html[data-theme="light"] .review-card{
  background:#f7f9fb;
  border-color:#e1e6ed;
}
html[data-theme="light"] .daily-focus-rank{background:#edf1f5}
html[data-theme="light"] .daily-focus-empty,
html[data-theme="light"] .review-clear{border-color:#cfd8e3}

@media(max-width:900px){
  .review-grid{grid-template-columns:1fr}
}
@media(max-width:780px){
  .daily-focus-head,
  .review-overview{display:grid}
  .daily-focus-count,
  .review-score{justify-self:start}
  .daily-focus-card,
  .review-card{grid-template-columns:1fr}
  .daily-focus-rank{display:none}
  .daily-focus-actions,
  .review-card-actions{justify-content:flex-start}
}


/* Persistent Focus rollover */
.badge.daily-focus.overdue-focus{
  border-color:rgba(248,113,113,.34);
  color:#ffb0b0;
  background:rgba(239,68,68,.09);
}
.badge.daily-focus.scheduled{
  border-color:rgba(96,165,250,.30);
  color:#a9ccff;
  background:rgba(59,130,246,.08);
}
.daily-focus-flags{
  display:flex;
  gap:5px;
  flex-wrap:wrap;
  margin-bottom:4px;
}
.detail-focus-field{
  grid-column:1/-1;
}
.detail-focus-editor{
  display:grid;
  grid-template-columns:minmax(180px,260px) auto;
  gap:8px;
  align-items:center;
}
#detailFocusStatus{
  display:block;
  margin-top:7px;
  line-height:1.45;
}
html[data-theme="light"] .badge.daily-focus.overdue-focus{
  border-color:#efc7cc;
  color:#a43242;
  background:#fff1f2;
}
html[data-theme="light"] .badge.daily-focus.scheduled{
  border-color:#c9dcfb;
  color:#315f9e;
  background:#eef5ff;
}
@media(max-width:780px){
  .detail-focus-editor{grid-template-columns:1fr}
  .detail-focus-editor .button{width:100%}
}


/* Reorder Focus du jour */
.daily-focus-order{
  display:grid;
  justify-items:center;
  align-content:center;
  gap:4px;
}
.daily-focus-drag-handle{
  display:grid;
  place-items:center;
  width:27px;
  min-height:22px;
  border-radius:7px;
  color:var(--muted);
  font-size:14px;
  font-weight:800;
  letter-spacing:-2px;
  cursor:grab;
  user-select:none;
}
.daily-focus-drag-handle:hover{
  color:var(--text);
  background:var(--surface-strong);
}
.daily-focus-drag-handle:active{cursor:grabbing}
.daily-focus-move-controls{
  display:flex;
  gap:4px;
}
.daily-focus-move{
  width:30px;
  min-width:30px;
  padding-left:0;
  padding-right:0;
  font-size:14px;
  font-weight:800;
}
.daily-focus-move:disabled{
  opacity:.28;
  cursor:not-allowed;
}
.daily-focus-card.dragging{
  opacity:.48;
  transform:scale(.99);
}
.daily-focus-card.drag-over{
  border-color:rgba(140,232,208,.55);
  box-shadow:0 0 0 2px rgba(140,232,208,.10);
}
html[data-theme="light"] .daily-focus-card.drag-over{
  border-color:#92d5c4;
  box-shadow:0 0 0 2px rgba(38,173,141,.09);
}

@media(max-width:780px){
  .daily-focus-card{
    grid-template-columns:34px minmax(0,1fr);
    align-items:start;
  }
  .daily-focus-order{
    grid-row:1 / 3;
    padding-top:2px;
  }
  .daily-focus-rank{display:grid}
  .daily-focus-drag-handle{display:none}
  .daily-focus-actions{
    grid-column:2;
    justify-content:flex-start;
    flex-wrap:wrap;
  }
  .daily-focus-move{
    width:38px;
    min-width:38px;
    min-height:36px;
    font-size:18px;
  }
}


/* Whole-card drag for Focus du jour */
.daily-focus-card{
  cursor:grab;
}
.daily-focus-card:active{
  cursor:grabbing;
}
.daily-focus-main,
.daily-focus-actions,
.daily-focus-actions button{
  cursor:default;
}
.daily-focus-main{
  cursor:pointer;
}
.daily-focus-move-controls{
  display:none;
}
@media(max-width:780px){
  .daily-focus-card{
    cursor:default;
  }
  .daily-focus-move-controls{
    display:flex;
  }
}


/* Project summary/context panel */
.project-description-panel{
  padding:18px 20px;
  border:1px solid var(--line-soft);
  border-radius:18px;
  background:rgba(17,20,25,.72);
}
.project-description-panel-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
}
.project-description-panel-head h3{
  margin:3px 0 0;
  font-size:18px;
}
.project-description-panel-content{
  margin-top:14px;
  color:var(--text);
  font-size:13px;
  line-height:1.7;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
}
html[data-layout="workspace"] .project-description-panel-content{
  font-size:14px;
}
html[data-theme="light"] .project-description-panel{
  background:#fff;
  border-color:#e0e6ed;
}
html[data-theme="light"] .project-description-panel-content{
  color:#344255;
}
@media(max-width:780px){
  .project-description-panel{
    padding:15px 16px;
  }
}


/* Task status visibility across Cockpit and Focus du jour */
.badge.todo{
  border-color:rgba(148,163,184,.38);
  color:#d2d8e0;
  background:rgba(148,163,184,.14);
}
.badge.in_progress{
  border-color:rgba(52,211,153,.38);
  color:#9be8cb;
  background:rgba(16,185,129,.13);
}
.badge.paused{
  border-color:rgba(250,204,21,.42);
  color:#ffe079;
  background:rgba(234,179,8,.13);
}
.badge.active{
  border-color:rgba(52,211,153,.27);
  color:#9be8cb;
  background:rgba(16,185,129,.08);
}
.badge.waiting{
  border-color:rgba(251,191,36,.28);
  color:#ffd77c;
  background:rgba(245,158,11,.08);
}
.badge.done{
  border-color:rgba(74,222,128,.24);
  color:#9ce8b5;
  background:rgba(34,197,94,.07);
}
.badge.archived{
  border-color:rgba(148,163,184,.18);
  color:#7f8996;
  background:rgba(148,163,184,.04);
}

.task-status-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  align-self:center;
  justify-self:end;
  flex:0 0 auto;
  min-height:18px;
  padding:2px 7px;
  border:1px solid var(--line-soft);
  border-radius:999px;
  font-size:8.5px;
  font-weight:780;
  line-height:1.2;
  white-space:nowrap;
}
.task-status-badge.todo{
  border-color:rgba(148,163,184,.38);
  color:#d2d8e0;
  background:rgba(148,163,184,.14);
}
.task-status-badge.in_progress{
  border-color:rgba(52,211,153,.38);
  color:#9be8cb;
  background:rgba(16,185,129,.13);
}
.task-status-badge.paused{
  border-color:rgba(250,204,21,.42);
  color:#ffe079;
  background:rgba(234,179,8,.13);
}
.task-status-badge.active{
  border-color:rgba(52,211,153,.27);
  color:#9be8cb;
  background:rgba(16,185,129,.08);
}
.task-status-badge.waiting{
  border-color:rgba(251,191,36,.28);
  color:#ffd77c;
  background:rgba(245,158,11,.08);
}
.task-status-badge.done{
  border-color:rgba(74,222,128,.24);
  color:#9ce8b5;
  background:rgba(34,197,94,.07);
}
.task-status-badge.archived{
  border-color:rgba(148,163,184,.18);
  color:#7f8996;
  background:rgba(148,163,184,.04);
}

.daily-focus-flags .task-status-badge{
  font-size:9px;
  padding:3px 7px;
}
html[data-layout="workspace"] .task-status-badge{
  font-size:9px;
  padding:3px 7px;
}

html[data-theme="light"] .badge.todo,
html[data-theme="light"] .task-status-badge.todo{
  border-color:#c5ccd5;
  color:#536173;
  background:#e8ebef;
}
html[data-theme="light"] .badge.in_progress,
html[data-theme="light"] .task-status-badge.in_progress{
  border-color:#b7dfd0;
  color:#176b52;
  background:#e8f7f1;
}
html[data-theme="light"] .badge.paused,
html[data-theme="light"] .task-status-badge.paused{
  border-color:#ecd17b;
  color:#7a5800;
  background:#fff3c9;
}
html[data-theme="light"] .badge.active,
html[data-theme="light"] .task-status-badge.active{
  border-color:#c9eadf;
  color:#18745c;
  background:#effaf6;
}
html[data-theme="light"] .badge.waiting,
html[data-theme="light"] .task-status-badge.waiting{
  border-color:#f0d9a5;
  color:#8a6518;
  background:#fff8e7;
}
html[data-theme="light"] .badge.done,
html[data-theme="light"] .task-status-badge.done{
  border-color:#cae9d4;
  color:#2f7b48;
  background:#effaf2;
}
html[data-theme="light"] .badge.archived,
html[data-theme="light"] .task-status-badge.archived{
  border-color:#dde2e8;
  color:#7b8795;
  background:#f5f6f8;
}


/* Compact task status pills, same visual language as project space badges */
html[data-layout="workspace"] .space-badge.task-status-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:max-content;
  min-width:0;
  min-height:0;
  padding:3px 7px;
  border-radius:999px;
  font-size:10px;
  font-weight:760;
  line-height:1.2;
  letter-spacing:.02em;
  text-transform:none;
  white-space:nowrap;
}
html[data-layout="workspace"] .space-badge.task-status-badge.todo{
  border-color:#c5ccd5;
  color:#536173;
  background:#e8ebef;
}
html[data-layout="workspace"] .space-badge.task-status-badge.in_progress{
  border-color:#b7dfd0;
  color:#176b52;
  background:#e8f7f1;
}
html[data-layout="workspace"] .space-badge.task-status-badge.paused{
  border-color:#ecd17b;
  color:#7a5800;
  background:#fff3c9;
}
html[data-layout="workspace"] .space-badge.task-status-badge.waiting{
  border-color:#f0d9a5;
  color:#8a6518;
  background:#fff8e7;
}
html[data-theme="dark"][data-layout="workspace"] .space-badge.task-status-badge.todo{
  border-color:rgba(148,163,184,.38);
  color:#d2d8e0;
  background:rgba(148,163,184,.14);
}
html[data-theme="dark"][data-layout="workspace"] .space-badge.task-status-badge.in_progress{
  border-color:rgba(52,211,153,.38);
  color:#9be8cb;
  background:rgba(16,185,129,.13);
}
html[data-theme="dark"][data-layout="workspace"] .space-badge.task-status-badge.paused{
  border-color:rgba(250,204,21,.42);
  color:#ffe079;
  background:rgba(234,179,8,.13);
}


/* Direct task status editing from detail view */
.detail-status-control{
  width:100%;
  min-height:38px;
  font-weight:720;
}
.detail-status-field{
  justify-content:center;
}

/* Collapsible Cockpit project cards */
.workspace-card-heading-main{
  min-width:0;
}
.workspace-card-head-actions{
  display:flex;
  align-items:center;
  gap:3px;
  flex:0 0 auto;
}
.workspace-card-toggle{
  width:25px;
  height:25px;
  display:grid;
  place-items:center;
  padding:0;
  border:0;
  border-radius:6px;
  background:transparent;
  color:var(--muted);
  font-size:15px;
  line-height:1;
  cursor:pointer;
}
.workspace-card-toggle:hover{
  background:var(--panel-2);
  color:var(--text);
}
.workspace-card.is-collapsed{
  height:auto;
  min-height:0;
  align-self:start;
  padding:10px 11px;
}
.workspace-card.is-collapsed .workspace-card-head{
  align-items:center;
}
.workspace-card.is-collapsed .workspace-card-title-line{
  gap:7px;
}
.workspace-card.is-collapsed .workspace-card-name{
  white-space:normal;
}
html[data-theme="light"] .workspace-card-toggle{
  color:#738095;
}
html[data-theme="light"] .workspace-card-toggle:hover{
  background:#eef2f6;
  color:#17202b;
}


/* Compact project task rows: badges above the task title instead of a wide left column */
.list.project-detail-list .project-task-row .item-badges{
  gap:5px;
}
.list.project-detail-list .project-task-row .item-badges .badge{
  padding:3px 7px;
  border-radius:999px;
  font-size:9px;
  font-weight:750;
  line-height:1.2;
  letter-spacing:.025em;
  text-transform:none;
}

@media(min-width:781px){
  .list.project-detail-list .today-section-list .project-task-row{
    grid-template-columns:minmax(0,1fr) minmax(120px,180px) 190px auto;
    grid-template-areas:
      "badges project date actions"
      "main project date actions";
    column-gap:18px;
    row-gap:6px;
    align-items:center;
  }
  .list.project-detail-list .project-task-row .item-badges{
    grid-area:badges;
    align-self:end;
    justify-self:start;
  }
  .list.project-detail-list .project-task-row .item-main{
    grid-area:main;
    align-self:start;
  }
  .list.project-detail-list .project-task-row .item-project{
    grid-area:project;
  }
  .list.project-detail-list .project-task-row .item-date{
    grid-area:date;
  }
  .list.project-detail-list .project-task-row .row-actions{
    grid-area:actions;
  }
}

/* Tâches : lignes plus denses et filtre par catégorie de projet. */
.toolbar.task-toolbar{
  grid-template-columns:minmax(260px,1fr) minmax(140px,190px) minmax(150px,185px) minmax(140px,170px) minmax(180px,200px);
}
.list.task-list .item-row{
  /* Reserve the same width for actions even when + Focus is unavailable. */
  grid-template-columns:100px minmax(0,1fr) minmax(110px,165px) minmax(190px,215px) 190px;
  gap:12px;
  min-height:58px;
  padding:8px 12px;
}
.list.task-list .item-main{min-width:0;max-width:100%;overflow:hidden}
.list.task-list .item-title,
.list.task-list .item-content{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.list.task-list .item-badges{gap:4px}
.list.task-list .item-badges .badge{
  padding:3px 7px;
  font-size:9px;
  line-height:1.2;
  letter-spacing:.02em;
}
html[data-layout="workspace"] .list.task-list .item-title{font-size:15px;line-height:1.25}
html[data-layout="workspace"] .list.task-list .item-content{
  margin-top:2px;
  font-size:12px;
  line-height:1.25;
}
html[data-layout="workspace"] .list.task-list .item-project,
html[data-layout="workspace"] .list.task-list .item-date{font-size:12px}
.list.task-list .item-date{gap:2px;line-height:1.25}
.list.task-list .date-line{
  display:flex;
  flex-direction:row;
  align-items:baseline;
  gap:5px;
  min-width:0;
}
html[data-layout="workspace"] .list.task-list .date-label{
  flex:0 0 auto;
  font-size:9px;
  letter-spacing:.025em;
}
.list.task-list .row-actions{gap:5px}
html[data-layout="workspace"] .list.task-list .button.small{
  padding:5px 7px;
  font-size:11px;
}
@media(max-width:1220px) and (min-width:781px){
  .toolbar.task-toolbar{grid-template-columns:repeat(2,minmax(0,1fr))}
  .toolbar.task-toolbar #searchInput{grid-column:1/-1}
  .list.task-list .item-row{
    grid-template-columns:90px minmax(0,1fr) minmax(175px,195px) 190px;
    grid-template-areas:
      "badges main date actions"
      "badges project date actions";
    column-gap:10px;
    row-gap:2px;
  }
  .list.task-list .item-badges{grid-area:badges}
  .list.task-list .item-main{grid-area:main}
  .list.task-list .item-project{grid-area:project}
  .list.task-list .item-date{grid-area:date}
  .list.task-list .row-actions{grid-area:actions;flex-wrap:wrap}
}
@media(max-width:780px){
  .toolbar.task-toolbar{grid-template-columns:1fr}
  .toolbar.task-toolbar #searchInput{grid-column:auto}
  .list.task-list .item-row{
    grid-template-columns:minmax(0,1fr);
    grid-template-areas:none;
    gap:6px;
    padding:10px 12px;
  }
  .list.task-list .item-badges,
  .list.task-list .item-main,
  .list.task-list .item-project,
  .list.task-list .item-date,
  .list.task-list .row-actions{grid-area:auto}
  .list.task-list .item-content{
    display:-webkit-box;
    -webkit-line-clamp:2;
    -webkit-box-orient:vertical;
    white-space:normal;
    overflow:hidden;
    overflow-wrap:anywhere;
  }
  .list.task-list .item-date{
    flex-direction:row;
    flex-wrap:wrap;
    gap:4px 12px;
  }
  html[data-layout="workspace"] .list.task-list .button.small{
    padding:7px 10px;
    font-size:12px;
  }
}

/* Modification rapide de l'échéance depuis la fenêtre de détail. */
.detail-deadline-field{grid-column:1/-1}
.detail-deadline-editor[hidden]{display:none}
.detail-deadline-editor{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,170px) auto;
  column-gap:10px;
  row-gap:6px;
  align-items:end;
  min-width:0;
}
.detail-deadline-input{
  display:grid;
  gap:5px;
  min-width:0;
}
.detail-deadline-input span{
  color:var(--muted);
  font-size:11px;
  font-weight:650;
}
.detail-deadline-input .control{
  width:100%;
  min-width:0;
  min-height:38px;
}
#detailDeadlineSave{
  min-height:38px;
  align-self:end;
  white-space:nowrap;
}
.detail-deadline-feedback{grid-column:1/-1}
.detail-deadline-feedback:empty{display:none}
.detail-deadline-feedback[data-state="error"]{color:var(--danger)}
.detail-deadline-feedback[data-state="success"]{color:var(--accent-strong)}
@media(max-width:600px){
  .detail-deadline-editor{grid-template-columns:repeat(2,minmax(0,1fr))}
  #detailDeadlineSave{grid-column:1/-1;width:100%}
}
@media(max-width:400px){
  .detail-deadline-editor{grid-template-columns:1fr}
}

/* Dot registry: independent responsibilities, canonical UUID project links. */
.list.dot-list { border: 0; background: transparent; overflow: visible; box-shadow: none; }
.dot-intro, .dot-card-heading { display: flex; align-items: start; justify-content: space-between; gap: 16px; }
.dot-intro p { color: var(--muted); margin-top: 6px; }
.dot-filters { display: grid; grid-template-columns: minmax(180px, 2fr) 1fr 1fr auto; gap: 12px; align-items: end; margin: 20px 0; }
.dot-filters label { display: grid; gap: 6px; font-size: 13px; }
.dot-filters span { padding-bottom: 10px; color: var(--muted); }
.dot-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap: 16px; }
.dot-card { padding: 20px; border: 1px solid var(--line-soft); border-radius: 16px; min-width: 0; overflow-wrap: anywhere; background: var(--panel); }
.dot-card.is-selected { outline: 2px solid var(--accent); outline-offset: 3px; }
.dot-card h2 { margin: 10px 0; font-size: 20px; }
.dot-card a { color: var(--accent-strong); text-decoration: underline; text-underline-offset: 3px; }
.dot-card dl { display: grid; gap: 4px; margin: 16px 0; }
.dot-card dt, .dot-card small { color: var(--muted); font-size: 12px; }
.dot-card dd { margin: 0 0 10px; white-space: pre-wrap; }
.dot-status small { display: inline-block; }
.dot-targets, .dot-chats { display: grid; gap: 10px; margin: 16px 0; }
.dot-target { display: block; padding: 8px 0; min-height: 36px; }
.dot-missing { color: var(--muted); }
.dot-target-fieldset { margin: 16px 0; }
#dotTargetInputs { max-height: 240px; overflow: auto; }
.dot-target-choice { display: flex; align-items: center; gap: 10px; padding: 10px 4px; min-height: 44px; overflow-wrap: anywhere; }
.dot-target-choice input { flex-shrink: 0; }
.dot-chat-input { display: grid; gap: 8px; margin: 12px 0; padding-bottom: 12px; border-bottom: 1px solid var(--line-soft); }
.dot-chat-input label { display: grid; gap: 4px; }
#dotEditorError { color: var(--danger); }
.dot-card a:focus-visible, .dot-card button:focus-visible, .dot-target-choice:focus-within { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (max-width: 780px) {
  .dot-intro { flex-direction: column; }
  .dot-filters { grid-template-columns: 1fr; }
  .dot-card { padding: 16px; }
  .dot-card-heading { flex-wrap: wrap; }
  .dot-card-heading button, .dot-intro button { min-height: 44px; }
}
