:root {
  --bg: #f5f7f9;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border: #d8dee7;
  --border-soft: #e7ebf0;
  --text: #16202e;
  --muted: #667085;
  --muted-2: #8a94a6;
  --teal: #0f766e;
  --blue: #2563eb;
  --amber: #d97706;
  --red: #b42318;
  --green: #15803d;
  --shadow: 0 16px 38px rgba(20, 32, 46, 0.09);
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
  border-right: 1px solid var(--border);
  background: #ffffff;
  padding: 22px 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: #14202e;
  color: #fff;
  font-weight: 800;
  letter-spacing: 0;
}

.brand h1,
.brand p,
.topbar h2,
.topbar p,
.modal h3 {
  margin: 0;
}

.brand h1 {
  font-size: 18px;
  line-height: 1.2;
}

.brand p {
  color: var(--muted);
  font-size: 13px;
}

.nav-section {
  display: grid;
  gap: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #334155;
  padding: 10px;
  text-align: left;
}

.nav-item.active,
.nav-item:hover {
  border-color: var(--border-soft);
  background: var(--surface-2);
}

.nav-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.nav-icon {
  display: inline-grid;
  width: 20px;
  height: 20px;
  place-items: center;
  flex: 0 0 auto;
  font-size: 17px;
  font-weight: 900;
  line-height: 1;
}

.icon-active { color: #94a3b8; }
.icon-today { color: #35c8c5; }
.icon-high { color: #ff625a; }
.icon-waiting { color: #ffa94d; }

.slate { background: #64748b; }
.teal { background: var(--teal); }
.red { background: var(--red); }
.amber { background: var(--amber); }
.blue { background: var(--blue); }
.green { background: var(--green); }

.sidebar-card,
.today-strip {
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: var(--surface-2);
  padding: 16px;
}

.sidebar-card strong {
  display: block;
  margin-top: 4px;
  font-size: 20px;
}

.sidebar-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.sidebar-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.main {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  min-width: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.92);
  padding: 18px 22px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar h2 {
  font-size: 24px;
  line-height: 1.2;
}

.eyebrow {
  color: var(--muted-2);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(360px, 36vw);
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  padding: 9px 11px;
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
}

select,
input,
textarea {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
}

select {
  min-height: 40px;
  padding: 0 34px 0 10px;
}

.primary-button,
.ghost-button,
.icon-button,
.danger-button {
  border-radius: 8px;
  border: 1px solid transparent;
  min-height: 40px;
  padding: 0 14px;
  font-weight: 700;
}

.primary-button {
  background: #14202e;
  color: #fff;
}

.primary-button:hover {
  background: #223246;
}

.ghost-button {
  display: inline-grid;
  place-items: center;
  border-color: var(--border);
  background: var(--surface);
  color: #334155;
  text-decoration: none;
}

.ghost-button:hover {
  background: var(--surface-2);
}

.ghost-button.compact {
  padding-inline: 10px;
}

.icon-button {
  display: grid;
  width: 40px;
  place-items: center;
  border-color: var(--border);
  background: var(--surface);
  color: #334155;
  font-size: 20px;
}

.danger-button {
  border-color: #fecaca;
  background: #fff1f2;
  color: var(--red);
}

.wide {
  width: 100%;
}

.today-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 18px 22px 0;
  background: #ffffff;
}

.today-strip strong {
  display: block;
  margin-top: 2px;
  font-size: 18px;
}

.stat-row {
  display: flex;
  gap: 10px;
}

.stat {
  min-width: 82px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 8px 10px;
  text-align: center;
}

.stat span {
  display: block;
  font-size: 20px;
  font-weight: 800;
}

.stat small {
  color: var(--muted);
  font-weight: 700;
}

.workspace-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 14px;
  min-height: 0;
  overflow: auto;
  padding: 18px 22px 24px;
}

.view-surface.board {
  display: grid;
  grid-auto-columns: minmax(280px, 320px);
  grid-auto-flow: column;
  gap: 14px;
  align-items: start;
  min-height: 100%;
}

.column {
  display: grid;
  grid-template-rows: auto minmax(160px, 1fr);
  max-height: calc(100vh - 208px);
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #eef2f6;
  overflow: hidden;
}

.column-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.82);
  padding: 11px;
}

.column-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.column-title span:first-child {
  flex: 0 0 auto;
  width: 9px;
  height: 28px;
  border-radius: 4px;
}

.column-title h3 {
  margin: 0;
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.count {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.card-list {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 160px;
  overflow-y: auto;
  padding: 10px;
}

.card-list.drag-over {
  outline: 2px solid rgba(15, 118, 110, 0.35);
  outline-offset: -4px;
  background: rgba(15, 118, 110, 0.06);
}

.task-card {
  border: 1px solid var(--border-soft);
  border-left: 4px solid #64748b;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(20, 32, 46, 0.05);
  padding: 11px;
}

.task-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 8px 18px rgba(20, 32, 46, 0.09);
}

.task-card.dragging {
  opacity: 0.55;
}

.card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.priority {
  border-radius: 999px;
  padding: 3px 7px;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.priority.low { background: #ecfdf3; color: var(--green); }
.priority.normal { background: #eff6ff; color: var(--blue); }
.priority.high { background: #fff7ed; color: var(--amber); }
.priority.urgent { background: #fff1f2; color: var(--red); }

.card-title {
  margin: 0 0 7px;
  font-size: 15px;
  line-height: 1.35;
}

.card-description {
  display: -webkit-box;
  margin: 0 0 10px;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-next {
  margin: 0 0 10px;
  border-left: 3px solid var(--teal);
  color: #263548;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  padding-left: 8px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 10px;
}

.tag {
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  background: #f8fafc;
  color: #475569;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 6px;
}

.recurrence-pill {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  margin: 0 0 10px;
  border: 1px solid #bbf7d0;
  border-radius: 6px;
  background: #f0fdf4;
  color: var(--green);
  font-size: 11px;
  font-weight: 900;
  padding: 3px 6px;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.due.overdue {
  color: var(--red);
}

.empty {
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  color: var(--muted);
  padding: 18px;
  text-align: center;
}

.auth-screen {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.auth-panel {
  width: min(440px, 100%);
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  padding: 24px;
}

.auth-brand {
  margin-bottom: 24px;
}

.auth-panel label,
.form-grid label {
  display: grid;
  gap: 7px;
  color: #344054;
  font-size: 13px;
  font-weight: 800;
}

.auth-panel input,
.form-grid input,
.form-grid select,
.form-grid textarea {
  width: 100%;
  min-height: 42px;
  padding: 9px 10px;
}

.form-note {
  min-height: 20px;
  color: var(--muted);
  font-size: 13px;
}

.modal {
  width: min(720px, calc(100vw - 32px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  box-shadow: var(--shadow);
}

.detail-panel {
  position: sticky;
  top: 86px;
  align-self: start;
  max-height: calc(100vh - 110px);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.detail-panel form {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  max-height: calc(100vh - 110px);
}

.detail-header,
.detail-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--border-soft);
  padding: 14px;
}

.detail-actions {
  border-top: 1px solid var(--border-soft);
  border-bottom: 0;
}

.detail-header h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
}

.detail-empty {
  color: var(--muted);
  line-height: 1.55;
  padding: 18px;
}

.detail-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  overflow-y: auto;
  padding: 14px;
}

.detail-fields label,
.field-label {
  display: grid;
  gap: 7px;
  color: #344054;
  font-size: 12px;
  font-weight: 800;
}

.detail-fields .full {
  grid-column: 1 / -1;
}

.detail-fields input,
.detail-fields select,
.detail-fields textarea {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
}

.typeahead-menu {
  position: absolute;
  z-index: 50;
  display: grid;
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  padding: 5px;
}

.typeahead-menu[hidden] {
  display: none;
}

.typeahead-menu button {
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  padding: 7px 9px;
  text-align: left;
  font: inherit;
  font-weight: 700;
}

.typeahead-menu button:hover,
.typeahead-menu button.active {
  background: var(--surface-2);
}

.checklist-panel,
.comments-panel {
  display: grid;
  gap: 10px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: var(--surface-2);
  padding: 12px;
}

.checklist-items,
.comments-list {
  display: grid;
  gap: 8px;
}

.checklist-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border-soft);
  border-radius: 7px;
  background: #fff;
  padding: 8px;
}

.checklist-row span {
  color: #27364a;
  font-size: 13px;
  line-height: 1.35;
}

.mini-button {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--muted);
  font-weight: 900;
}

.inline-add {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.comment-item {
  border: 1px solid var(--border-soft);
  border-radius: 7px;
  background: #fff;
  padding: 9px;
}

.comment-item p {
  margin: 0;
  color: #27364a;
  font-size: 13px;
  line-height: 1.45;
}

.comment-item time {
  display: block;
  margin-top: 6px;
  color: var(--muted-2);
  font-size: 11px;
  font-weight: 800;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
}

.metric-card,
.summary-panel,
.timeline-group,
.calendar-month {
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(19, 32, 47, 0.04);
  padding: 14px;
}

.metric-card strong {
  display: block;
  margin-top: 4px;
  font-size: 28px;
}

.metric-card p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.dashboard-panels {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.summary-panel h3,
.timeline-group h3,
.calendar-month h3 {
  margin: 0 0 10px;
  font-size: 15px;
}

.summary-list,
.timeline-view,
.calendar-view,
.list-view {
  display: grid;
  gap: 10px;
}

.summary-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  padding: 10px;
  text-align: left;
}

.summary-card:hover {
  border-color: #c8d2dc;
  background: #fff;
}

.summary-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.summary-main strong,
.summary-main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.summary-main small,
.summary-detail {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.timeline-group,
.calendar-month {
  margin-bottom: 12px;
}

.calendar-days {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}

.calendar-card {
  align-items: flex-start;
  flex-direction: column;
}

.calendar-card span {
  color: var(--teal);
  font-size: 12px;
  font-weight: 900;
}

.calendar-card small {
  color: var(--muted);
  font-weight: 700;
}

.task-table {
  display: grid;
  min-width: 900px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.task-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) 160px 130px 120px 100px minmax(220px, 1fr);
  gap: 10px;
  align-items: center;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--border-soft);
  border-radius: 0;
  background: #fff;
  color: var(--text);
  padding: 10px 12px;
  text-align: left;
}

.task-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-head {
  background: #eef3f7;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.compact-empty {
  min-height: 0;
  padding: 10px;
}

.modal::backdrop {
  background: rgba(15, 23, 42, 0.48);
}

.modal-card {
  background: #fff;
}

.modal-card.small {
  max-width: 460px;
}

.modal-header,
.modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--border-soft);
  padding: 16px;
}

.modal-actions {
  border-top: 1px solid var(--border-soft);
  border-bottom: 0;
}

.modal-header h3 {
  font-size: 20px;
}

.modal-spacer {
  flex: 1;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 16px;
}

.form-grid .full {
  grid-column: 1 / -1;
}

.checkbox-line {
  align-items: center;
  grid-template-columns: auto 1fr;
  padding-top: 23px;
}

.checkbox-line.no-pad {
  padding-top: 0;
}

.checkbox-line input {
  width: 18px;
  min-height: 18px;
}

.recurrence-box {
  display: grid;
  gap: 12px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: var(--surface-2);
  padding: 12px;
}

.recurrence-fields {
  display: grid;
  grid-template-columns: 1fr 120px;
  gap: 12px;
}

.field-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
}

.help-page {
  background: #fff;
}

.help-shell {
  width: min(920px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 32px 0 48px;
}

.help-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 20px;
}

.help-header .brand h1 {
  font-size: 26px;
}

.help-content {
  display: grid;
  gap: 22px;
  padding-top: 24px;
}

.help-section {
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: var(--surface-2);
  padding: 18px;
}

.help-section h2 {
  margin: 0 0 10px;
  font-size: 18px;
}

.help-section p,
.help-section li {
  color: #344054;
  line-height: 1.55;
}

.help-section p {
  margin: 0 0 10px;
}

.help-section ol,
.help-section ul {
  margin: 0;
  padding-left: 22px;
}

/* Synology-inspired command-center layout */
:root {
  --bg: #f3f6f8;
  --surface: #ffffff;
  --surface-2: #f7f9fb;
  --border: #dfe5eb;
  --border-soft: #edf1f4;
  --text: #182233;
  --muted: #657386;
  --muted-2: #93a0ae;
  --teal: #0e9a97;
  --blue: #2f6feb;
  --amber: #f59e42;
  --red: #e15249;
  --green: #56b568;
  --sidebar-bg: #172331;
  --sidebar-bg-2: #223242;
  --topbar-bg: #07121f;
  --shadow: 0 10px 26px rgba(19, 32, 47, 0.08);
}

.app-shell {
  grid-template-columns: 274px minmax(0, 1fr);
}

.sidebar {
  border-right: 0;
  background: linear-gradient(180deg, var(--sidebar-bg) 0%, #1d2a38 100%);
  color: #e8eef4;
  padding: 18px 14px;
}

.sidebar .brand {
  padding: 0 8px 10px;
}

.sidebar .brand-mark {
  background: var(--teal);
}

.sidebar .brand h1 {
  color: #ffffff;
}

.sidebar .brand p,
.sidebar .eyebrow,
.nav-label {
  color: #aab6c3;
}

.nav-group {
  display: grid;
  gap: 8px;
}

.nav-label {
  padding: 0 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-section.compact {
  gap: 4px;
}

.nav-item {
  color: #e5edf5;
  min-height: 38px;
}

.nav-item.active,
.nav-item:hover {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(14, 154, 151, 0.82);
}

.nav-count {
  display: inline-grid;
  min-width: 24px;
  height: 22px;
  place-items: center;
  margin-left: auto;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #dce7ef;
  font-size: 12px;
  font-weight: 800;
}

.nav-dot.project-0,
.project-dot.project-0 { background: #32bbb8; }
.nav-dot.project-1,
.project-dot.project-1 { background: #3b82f6; }
.nav-dot.project-2,
.project-dot.project-2 { background: #f59e42; }
.nav-dot.project-3,
.project-dot.project-3 { background: #62bd67; }
.nav-dot.project-4,
.project-dot.project-4 { background: #a78bfa; }

.sidebar-card {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.sidebar-card p,
.sidebar-card strong {
  color: #e8eef4;
}

.sidebar-footer .ghost-button,
.sidebar-footer .import-label {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #edf4fa;
}

.main {
  background: var(--bg);
}

.topbar {
  border-bottom: 0;
  background: var(--topbar-bg);
  color: #f8fbff;
  padding: 14px 18px;
}

.topbar .eyebrow {
  color: #8fa1b7;
}

.topbar h2 {
  font-size: 20px;
}

.topbar .ghost-button,
.topbar .icon-button {
  border-color: #d7dee7;
  background: #ffffff;
  color: #263548;
}

.topbar .primary-button {
  background: var(--teal);
}

.topbar .primary-button:hover {
  background: #087c7a;
}

.search-box {
  width: min(520px, 42vw);
  min-height: 42px;
}

.today-strip {
  margin: 14px 18px 0;
  box-shadow: 0 1px 2px rgba(19, 32, 47, 0.04);
}

.workspace-wrap {
  padding: 14px 18px 22px;
}

.board {
  display: grid;
  grid-auto-flow: row;
  grid-auto-columns: unset;
  gap: 16px;
  min-width: max-content;
}

.project-lane {
  display: grid;
  gap: 8px;
}

.project-lane-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 100%;
  border-bottom: 1px solid var(--border);
  padding: 0 4px 7px;
  color: #1d2b3d;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.project-lane-header div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.project-lane-header span:last-child {
  color: var(--muted);
  font-size: 12px;
  text-transform: none;
}

.project-dot {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 999px;
}

.project-board {
  display: grid;
  grid-template-columns: repeat(var(--column-count, 5), minmax(190px, 1fr));
  gap: 12px;
  min-width: 980px;
}

.column {
  max-height: none;
  border-color: var(--border-soft);
  background: transparent;
}

.column-header {
  border-bottom: 0;
  background: transparent;
  padding: 4px 4px 6px;
}

.column-title h3 {
  font-size: 13px;
}

.column-title span:first-child {
  width: 4px;
  height: 18px;
}

.card-list {
  min-height: 92px;
  padding: 0;
}

.task-card {
  width: 100%;
  border-top: 3px solid #64748b;
  border-left-width: 1px;
  text-align: left;
}

.task-card:hover {
  transform: translateY(-1px);
}

.priority {
  border-radius: 4px;
  background: transparent;
  padding: 0;
}

.priority.low { color: #6b7280; }
.priority.normal { color: #e89036; }
.priority.high { color: #c42323; }
.priority.urgent { color: #be123c; }

.empty {
  min-height: 76px;
  background: rgba(255, 255, 255, 0.45);
}

.board-empty {
  min-width: 360px;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  max-width: 360px;
  transform: translateY(140%);
  transition: transform 160ms ease;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #14202e;
  color: #fff;
  padding: 12px 14px;
  box-shadow: var(--shadow);
  z-index: 100;
}

.toast.show {
  transform: translateY(0);
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .nav-section,
  .sidebar-footer {
    display: flex;
    overflow-x: auto;
  }

  .sidebar-card {
    display: none;
  }

  .topbar,
  .today-strip {
    align-items: flex-start;
    flex-direction: column;
  }

  .toolbar {
    flex-wrap: wrap;
    width: 100%;
  }

  .search-box {
    width: 100%;
  }

  .workspace-wrap {
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .detail-panel {
    position: static;
    max-height: none;
  }

  .detail-panel form {
    max-height: none;
  }

  .board {
    grid-auto-flow: row;
    grid-auto-columns: unset;
  }

  .column {
    max-height: none;
  }

  .project-board {
    grid-template-columns: repeat(var(--column-count, 5), minmax(220px, 86vw));
    min-width: max-content;
  }
}

@media (max-width: 620px) {
  .form-grid {
    grid-template-columns: 1fr;
  }

  .detail-fields,
  .dashboard-grid,
  .dashboard-panels {
    grid-template-columns: 1fr;
  }

  .task-table {
    min-width: 760px;
  }

  .stat-row {
    width: 100%;
  }

  .stat {
    flex: 1;
  }

  .recurrence-fields {
    grid-template-columns: 1fr;
  }

  .help-header {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* 20260701-2310: closer match to the requested command-center reference */
body {
  overflow: hidden;
}

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

.app-shell.sidebar-collapsed {
  grid-template-columns: 72px minmax(0, 1fr);
}

.sidebar {
  gap: 18px;
  overflow-y: auto;
  background:
    linear-gradient(180deg, rgba(13, 27, 40, 0.94), rgba(29, 43, 56, 0.98)),
    #172331;
  padding: 18px 14px 16px;
}

.sidebar .brand {
  gap: 12px;
  min-height: 52px;
  padding: 0 4px 10px;
}

.sidebar .brand-mark {
  width: 46px;
  height: 46px;
  background: #119c99;
  font-size: 17px;
}

.sidebar .brand h1 {
  font-size: 16px;
  line-height: 1.2;
}

.sidebar .brand p {
  font-size: 13px;
}

.sidebar-toggle {
  display: grid;
}

.app-shell.sidebar-collapsed .sidebar {
  padding-inline: 10px;
}

.app-shell.sidebar-collapsed .sidebar .brand {
  justify-content: center;
  padding-inline: 0;
}

.app-shell.sidebar-collapsed .sidebar .brand > div:not(.brand-mark),
.app-shell.sidebar-collapsed .nav-label,
.app-shell.sidebar-collapsed .sidebar-card,
.app-shell.sidebar-collapsed .sidebar-footer,
.app-shell.sidebar-collapsed .nav-count {
  display: none;
}

.app-shell.sidebar-collapsed .nav-group,
.app-shell.sidebar-collapsed .nav-section {
  justify-items: center;
}

.app-shell.sidebar-collapsed .nav-item {
  justify-content: center;
  width: 48px;
  min-height: 42px;
  padding: 8px;
  font-size: 0;
}

.app-shell.sidebar-collapsed .nav-item .nav-dot,
.app-shell.sidebar-collapsed .nav-item .nav-icon {
  margin: 0;
}

.app-shell.sidebar-collapsed .nav-item .nav-icon {
  font-size: 17px;
}

.view-nav {
  display: none;
}

.nav-section {
  gap: 4px;
}

.nav-item {
  min-height: 36px;
  border-radius: 5px;
  padding: 8px 10px;
  font-size: 14px;
}

.nav-item .nav-icon {
  margin-right: 2px;
}

.nav-item.active,
.nav-item:hover {
  background: linear-gradient(90deg, rgba(21, 157, 151, 0.98), rgba(25, 137, 132, 0.9));
}

.sidebar-card {
  margin-top: auto;
}

.sidebar-footer {
  margin-top: 0;
}

.main {
  grid-template-rows: 64px 52px auto minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
}

.topbar {
  display: grid;
  grid-template-columns: auto minmax(260px, 520px) minmax(320px, 1fr);
  gap: 14px;
  align-items: center;
  min-height: 64px;
  padding: 10px 18px;
  position: static;
}

.topbar .search-box {
  width: 100%;
  min-height: 42px;
  border-color: #cdd6df;
}

.top-tools {
  justify-content: end;
}

.top-tools select {
  max-width: 156px;
}

.top-tools .primary-button {
  min-width: 124px;
  background: #0f9f9b;
}

.top-tools .icon-button {
  width: 38px;
  min-height: 38px;
  border-color: transparent;
  background: transparent;
  color: #dce7f2;
  font-size: 18px;
}

.view-tabs {
  display: flex;
  align-items: center;
  gap: 24px;
  overflow-x: auto;
  border-bottom: 1px solid #d7dee7;
  background: rgba(255, 255, 255, 0.96);
  padding: 0 18px;
}

.view-tab {
  position: relative;
  min-height: 52px;
  border: 0;
  background: transparent;
  color: #1d2939;
  font-weight: 800;
  padding: 0 2px;
}

.view-tab.active {
  color: #087f7d;
}

.view-tab.active::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  background: #10a6a1;
  content: "";
}

.view-tab:disabled {
  color: #7b8794;
  cursor: default;
}

.today-strip.workload-strip {
  display: grid;
  grid-template-columns: 180px minmax(360px, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin: 14px 18px 0;
  border-color: #dce3ea;
  background: #ffffff;
  padding: 12px 14px;
}

.workload-strip strong {
  font-size: 13px;
}

.workload-days {
  display: grid;
  grid-template-columns: repeat(5, minmax(104px, 1fr));
  gap: 8px;
  min-width: 0;
}

.workload-day {
  display: grid;
  gap: 6px;
  min-width: 0;
  border: 1px solid #edf1f4;
  border-radius: 5px;
  background: #fbfcfd;
  padding: 7px 8px;
}

.workload-day span,
.workload-day strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workload-day span {
  color: #344054;
  font-size: 12px;
  font-weight: 800;
}

.workload-day strong {
  color: #182233;
  font-size: 12px;
}

.load-track {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8ecf1;
}

.load-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.load-track .under { background: #47beb9; }
.load-track .normal { background: #2f6feb; }
.load-track .over { background: #ef4444; }

.stat-row {
  gap: 8px;
}

.stat {
  min-width: 66px;
  border-color: transparent;
  padding: 4px 6px;
}

.stat span {
  font-size: 18px;
}

.stat small {
  font-size: 11px;
}

.workspace-wrap {
  grid-template-columns: minmax(0, 1fr) 402px;
  gap: 0;
  min-height: 0;
  overflow: hidden;
  padding: 0;
}

.view-surface {
  min-width: 0;
  overflow: auto;
  padding: 14px 18px 28px;
}

.board {
  display: grid;
  grid-auto-columns: unset;
  grid-auto-flow: row;
  gap: 12px;
  min-width: 900px;
}

.view-surface.board {
  display: grid;
  grid-auto-columns: unset;
  grid-auto-flow: row;
  align-items: start;
}

.detail-empty[hidden],
.detail-fields[hidden],
.detail-actions[hidden] {
  display: none !important;
}

.kanban-header-row,
.project-board {
  display: grid;
  align-items: stretch;
  grid-template-columns: repeat(var(--column-count, 6), minmax(142px, 1fr));
  gap: 12px;
}

.kanban-header-row {
  position: sticky;
  top: 0;
  z-index: 4;
  border-bottom: 1px solid #dfe5eb;
  background: #f3f6f8;
  padding-bottom: 8px;
}

.kanban-column-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  border-radius: 6px;
  min-height: 30px;
  color: #182233;
  font-size: 13px;
  font-weight: 900;
  padding: 3px 4px;
}

.kanban-column-head strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kanban-column-head span {
  color: #4b5565;
  font-size: 12px;
}

.kanban-column-head button {
  width: 24px;
  height: 24px;
  border: 0;
  background: transparent;
  color: #536174;
}

.project-lane {
  gap: 8px;
  border-bottom: 1px solid #e6ebf0;
  padding-bottom: 10px;
}

.project-lane-header {
  min-height: 26px;
  border-bottom: 0;
  padding: 0 2px;
}

.project-lane-header span:last-child {
  display: none;
}

.project-cell {
  min-height: clamp(180px, calc(100vh - 420px), 520px);
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.36);
  overflow: visible;
  padding: 8px;
  transition: border-color 120ms ease, background 120ms ease, box-shadow 120ms ease;
}

.card-list {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 100%;
}

.project-cell.drag-over,
.kanban-column-head.drag-over,
.card-list.drag-over {
  border-color: #2f6feb;
  background: rgba(47, 111, 235, 0.08);
  box-shadow: inset 0 0 0 2px rgba(47, 111, 235, 0.22);
}

.task-card {
  position: relative;
  min-height: 112px;
  border: 1px solid #dfe5eb;
  border-top: 3px solid #64748b;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.08);
  padding: 10px;
}

.task-card .count {
  display: inline-grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 1px solid #cfd7df;
  border-radius: 999px;
  color: #253245;
  font-size: 10px;
}

.card-topline {
  margin-bottom: 7px;
}

.card-title {
  font-size: 13px;
}

.card-description {
  font-size: 12px;
  margin-bottom: 8px;
}

.card-next {
  border-left: 0;
  border-radius: 4px;
  background: #fde8e5;
  color: #93312b;
  padding: 5px 7px;
}

.tag-row,
.recurrence-pill {
  margin-bottom: 8px;
}

.card-meta {
  font-size: 12px;
}

.empty {
  min-height: 70px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.52);
  font-size: 12px;
}

.detail-panel {
  position: static;
  width: 402px;
  max-height: none;
  height: 100%;
  border-width: 0 0 0 1px;
  border-color: #d9e0e7;
  border-radius: 0;
  box-shadow: none;
}

.detail-panel form {
  max-height: none;
  height: 100%;
}

.detail-header {
  align-items: start;
  min-height: 86px;
  padding: 18px;
}

.detail-header h3 {
  font-size: 22px;
  line-height: 1.2;
}

.detail-fields {
  gap: 14px;
  padding: 16px 18px;
}

.detail-fields label,
.field-label {
  color: #344054;
  font-size: 11px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.detail-fields input,
.detail-fields select,
.detail-fields textarea {
  border-radius: 4px;
}

.checklist-panel,
.comments-panel,
.comment-item,
.checklist-row {
  border-radius: 4px;
}

.comment-item {
  background: #f6f8fb;
}

.detail-actions {
  padding: 12px 18px;
}

.dashboard-view,
.timeline-view,
.calendar-view,
.list-view {
  display: block;
}

@media (max-width: 1180px) {
  .topbar {
    grid-template-columns: auto minmax(180px, 1fr);
    height: auto;
  }

  .top-tools {
    grid-column: 1 / -1;
    justify-content: start;
  }

  .today-strip.workload-strip {
    grid-template-columns: 1fr;
  }

  .workload-days {
    grid-template-columns: repeat(5, minmax(104px, 1fr));
  }
}

@media (max-width: 900px) {
  html,
  body {
    width: 100%;
    min-width: 0;
    overflow-x: hidden;
  }

  body {
    overflow-y: auto;
  }

  .app-shell {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    max-width: 100vw;
    min-width: 0;
    height: auto;
    min-height: 100svh;
  }

  .app-shell.sidebar-collapsed {
    grid-template-columns: 1fr;
  }

  .sidebar {
    width: 100%;
    max-width: 100vw;
    min-width: 0;
    max-height: none;
    overflow: visible;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 14px 12px 12px;
  }

  .sidebar .brand {
    min-height: 44px;
    min-width: 0;
    padding-bottom: 8px;
  }

  .sidebar .brand-mark {
    width: 40px;
    height: 40px;
  }

  .sidebar-card {
    display: none;
  }

  .nav-section,
  .sidebar-footer {
    display: flex;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
  }

  .nav-group {
    min-width: 0;
  }

  .nav-item,
  .sidebar-footer .ghost-button,
  .sidebar-footer .import-label {
    flex: 0 0 auto;
    width: auto;
    max-width: calc(100vw - 24px);
    white-space: nowrap;
  }

  .main {
    display: grid;
    grid-template-rows: auto auto auto auto;
    min-height: 0;
    min-width: 0;
    max-width: 100vw;
    overflow: visible;
  }

  .topbar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    min-height: 0;
    padding: 12px;
  }

  .sidebar-toggle {
    display: none;
  }

  .app-shell.sidebar-collapsed .sidebar .brand > div:not(.brand-mark) {
    display: block;
  }

  .app-shell.sidebar-collapsed .nav-label {
    display: block;
  }

  .app-shell.sidebar-collapsed .sidebar-footer {
    display: flex;
  }

  .app-shell.sidebar-collapsed .nav-count {
    display: inline-grid;
  }

  .app-shell.sidebar-collapsed .nav-group,
  .app-shell.sidebar-collapsed .nav-section {
    justify-items: stretch;
  }

  .app-shell.sidebar-collapsed .nav-item {
    justify-content: flex-start;
    width: auto;
    min-height: 36px;
    padding: 8px 10px;
    font-size: 14px;
  }

  .app-shell.sidebar-collapsed .nav-item .nav-icon {
    font-size: 17px;
  }

  .top-tools {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 8px;
    width: 100%;
  }

  .top-tools select {
    grid-column: 1 / -1;
    max-width: none;
    width: 100%;
  }

  .top-tools .primary-button {
    min-width: 0;
    justify-self: start;
  }

  .view-tabs {
    gap: 18px;
    padding: 0 12px;
    -webkit-overflow-scrolling: touch;
  }

  .today-strip.workload-strip {
    grid-template-columns: 1fr;
    gap: 12px;
    margin: 12px;
    padding: 12px;
  }

  .workload-days {
    grid-template-columns: repeat(5, minmax(92px, 1fr));
    overflow-x: auto;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
  }

  .stat-row {
    width: 100%;
  }

  .stat {
    flex: 1 1 0;
    min-width: 0;
  }

  .workspace-wrap {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    min-height: 0;
    overflow: visible;
  }

  .view-surface {
    max-width: 100vw;
    overflow-x: auto;
    overflow-y: visible;
    padding: 10px 12px 18px;
    -webkit-overflow-scrolling: touch;
  }

  .board {
    min-width: 820px;
  }

  .detail-panel {
    width: auto;
    height: auto;
    min-height: 0;
    border-width: 1px 0 0;
  }

  .detail-panel form {
    height: auto;
  }
}

@media (max-width: 560px) {
  .top-tools {
    grid-template-columns: 1fr auto auto;
  }

  .top-tools .primary-button {
    padding-inline: 10px;
  }

  .icon-button {
    width: 38px;
  }

  .detail-fields,
  .form-grid,
  .dashboard-grid,
  .dashboard-panels {
    grid-template-columns: 1fr;
  }

  .inline-add,
  .recurrence-fields {
    grid-template-columns: 1fr;
  }

  .modal {
    width: min(720px, calc(100vw - 20px));
  }

  .modal-card,
  .auth-panel {
    max-height: calc(100svh - 20px);
    overflow-y: auto;
  }
}

@media (max-width: 430px) {
  .topbar,
  .today-strip.workload-strip,
  .sidebar {
    padding-inline: 10px;
  }

  .view-tabs {
    padding-inline: 10px;
  }

  .search-box {
    min-height: 40px;
  }

  .primary-button,
  .ghost-button,
  .icon-button,
  .danger-button,
  select {
    min-height: 38px;
  }

  .board {
    min-width: 760px;
  }

  .kanban-header-row,
  .project-board {
    gap: 8px;
    grid-template-columns: repeat(var(--column-count, 6), minmax(120px, 1fr));
  }

  .task-card {
    min-height: 104px;
    padding: 9px;
  }
}

body.help-page {
  min-height: 100vh;
  overflow-y: auto;
}

body.help-page .help-shell {
  min-height: 100vh;
  padding-bottom: 72px;
}
