:root {
  --primary: #136f88;
  --secondary: #32b4a1;
  --brand: var(--primary);
  --brand-dark: #0f5268;
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-muted: #eef3f8;
  --text: #182230;
  --muted: #667085;
  --line: #d9e2ec;
  --control-text: #3c4a58;
  --control-bg: #ffffff;
  --sidebar-bg: #102537;
  --sidebar-border: #cfdbe8;
  --sidebar-text: #d8e5f1;
  --sidebar-muted: #9fb2c4;
  --sidebar-heading: #87a0b7;
  --sidebar-active: rgba(255, 255, 255, 0.1);
  --hero-from: rgba(19, 111, 136, 0.94);
  --hero-to: rgba(16, 37, 55, 0.98);
  --hero-text: #ffffff;
  --hero-muted: #d9edf4;
  --hero-kicker: #99f0df;
  --soft-panel: #f3f7fb;
  --field-bg: transparent;
  --card-shadow: 0 10px 24px rgba(28, 39, 49, 0.06);
  --cyan: #2f9eb0;
  --green: #2f8f67;
  --amber: #bf7b22;
  --rose: #c84d5f;
  --red: #d33f49;
  --shadow: 0 18px 42px rgba(28, 39, 49, 0.1);
  --radius: 8px;
}

:root[data-theme="light"],
body[data-theme="light"] {
  --primary: #0f6e95;
  --secondary: #2a9d8f;
  --brand-dark: #0b5675;
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-muted: #eef5f7;
  --text: #17212f;
  --muted: #687586;
  --line: #dce5ee;
  --control-text: #354557;
  --control-bg: #ffffff;
  --sidebar-bg: #ffffff;
  --sidebar-border: #dce5ee;
  --sidebar-text: #344456;
  --sidebar-muted: #667789;
  --sidebar-heading: #718195;
  --sidebar-active: #e9f5f7;
  --hero-from: rgba(15, 110, 149, 0.88);
  --hero-to: rgba(38, 78, 99, 0.9);
  --hero-text: #ffffff;
  --hero-muted: #e7f5f8;
  --hero-kicker: #c7fff4;
  --soft-panel: #f2f7fa;
  --field-bg: #ffffff;
  --shadow: 0 18px 42px rgba(28, 39, 49, 0.08);
  --card-shadow: 0 10px 24px rgba(28, 39, 49, 0.05);
}

:root[data-theme="dark"],
body[data-theme="dark"] {
  --primary: #42c3d6;
  --secondary: #5be0a7;
  --brand-dark: #2ba7bd;
  --bg: #0d141c;
  --surface: #141f2a;
  --surface-muted: #1d2b37;
  --text: #edf5fb;
  --muted: #9eafbf;
  --line: #2d3d4d;
  --control-text: #dce8f2;
  --control-bg: #141f2a;
  --sidebar-bg: #08111a;
  --sidebar-border: #253545;
  --sidebar-text: #d8e5f1;
  --sidebar-muted: #8fa2b5;
  --sidebar-heading: #7d94aa;
  --sidebar-active: rgba(66, 195, 214, 0.16);
  --hero-from: rgba(9, 18, 27, 0.88);
  --hero-to: rgba(13, 45, 57, 0.92);
  --hero-text: #ffffff;
  --hero-muted: #c3d6e2;
  --hero-kicker: #7ff4dc;
  --soft-panel: #101b25;
  --field-bg: #0f1922;
  --shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
  --card-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  transition: background 0.2s ease, color 0.2s ease;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  height: 100vh;
  flex-direction: column;
  border-right: 1px solid var(--sidebar-border);
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  padding: 22px 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: var(--radius);
  background: var(--secondary);
  color: #08212c;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  color: var(--sidebar-text);
  font-size: 17px;
}

.brand small {
  color: var(--sidebar-muted);
  font-size: 12px;
  margin-top: 2px;
}

.nav-groups {
  display: grid;
  gap: 24px;
  margin-top: 36px;
  overflow: auto;
  padding-right: 2px;
}

.nav-groups h2 {
  margin: 0 0 9px;
  color: var(--sidebar-heading);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  border-radius: var(--radius);
  color: var(--sidebar-text);
  padding: 0 12px;
  text-decoration: none;
}

.nav-link:hover,
.nav-link.active {
  background: var(--sidebar-active);
  color: var(--sidebar-text);
}

.nav-link svg,
.icon-button svg,
.primary-action svg,
.secondary-action svg,
.ghost-button svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.sidebar-footer {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: auto;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  padding: 12px;
  color: #bfd0df;
  font-size: 13px;
}

.status-dot,
.notification-dot {
  display: inline-block;
  border-radius: 999px;
  background: #35c77b;
}

.status-dot {
  width: 9px;
  height: 9px;
}

.main-area {
  min-width: 0;
  padding: 22px;
}

.topbar {
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr) auto auto;
  align-items: center;
  gap: 14px;
}

.menu-toggle {
  display: none;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 0 14px;
}

.search-box svg {
  width: 18px;
  color: var(--muted);
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--text);
  background: var(--field-bg);
}

.search-box input::placeholder {
  color: var(--muted);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.visual-switch {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 4px;
}

.visual-switch button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  padding: 0 10px;
  font-size: 13px;
  font-weight: 800;
}

.visual-switch button.active {
  background: var(--brand);
  color: #ffffff;
}

.visual-switch svg {
  width: 16px;
  height: 16px;
}

.icon-button,
.user-chip {
  position: relative;
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--control-bg);
  color: var(--control-text);
}

.icon-button:hover,
.user-chip:hover {
  border-color: #aebdcb;
  color: var(--brand);
}

.icon-button.solid {
  border-color: var(--brand);
  background: var(--brand);
  color: #ffffff;
}

.notification-dot {
  position: absolute;
  top: 9px;
  right: 10px;
  width: 8px;
  height: 8px;
  border: 2px solid var(--surface);
}

.primary-action,
.secondary-action,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border-radius: var(--radius);
  padding: 0 14px;
  font-weight: 700;
}

.primary-action {
  border: 1px solid var(--brand);
  background: var(--brand);
  color: #ffffff;
}

.primary-action:hover {
  background: var(--brand-dark);
}

.secondary-action,
.ghost-button {
  border: 1px solid var(--line);
  background: var(--control-bg);
  color: var(--control-text);
}

.hero-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 20px;
  align-items: stretch;
  margin-top: 22px;
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, var(--hero-from), var(--hero-to)),
    url("https://images.unsplash.com/photo-1558494949-ef010cbdcc31?auto=format&fit=crop&w=1600&q=80");
  background-position: center;
  background-size: cover;
  color: var(--hero-text);
  padding: clamp(22px, 4vw, 40px);
  box-shadow: var(--shadow);
}

.eyebrow {
  display: inline-block;
  margin-bottom: 8px;
  color: #5d7488;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-strip .eyebrow {
  color: var(--hero-kicker);
}

.hero-strip h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.03;
  letter-spacing: 0;
}

.hero-strip p {
  max-width: 680px;
  margin: 16px 0 0;
  color: var(--hero-muted);
  font-size: 16px;
  line-height: 1.65;
}

.hero-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-self: end;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.11);
  backdrop-filter: blur(10px);
}

.hero-panel div {
  padding: 18px;
}

.hero-panel div + div {
  border-left: 1px solid rgba(255, 255, 255, 0.16);
}

.metric-label {
  display: block;
  color: #bfe4ec;
  font-size: 12px;
  font-weight: 700;
}

.hero-panel strong {
  display: block;
  margin-top: 6px;
  font-size: 28px;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.quick-card,
.panel,
.list-card,
.tool-row {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.quick-card {
  display: grid;
  min-height: 166px;
  align-content: space-between;
  gap: 16px;
  padding: 18px;
  box-shadow: var(--card-shadow);
}

.card-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 800;
}

.card-icon {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: var(--radius);
  color: #ffffff;
}

.accent-cyan .card-icon {
  background: var(--cyan);
}

.accent-green .card-icon {
  background: var(--green);
}

.accent-amber .card-icon {
  background: var(--amber);
}

.accent-rose .card-icon {
  background: var(--rose);
}

.password-preview,
.ip-value,
.weather-line strong {
  font-size: 24px;
  font-weight: 800;
}

.password-preview {
  overflow-wrap: anywhere;
  border-radius: var(--radius);
  background: var(--surface-muted);
  padding: 12px;
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.weather-line {
  display: grid;
  gap: 2px;
}

.quick-card small,
.weather-line span {
  color: var(--muted);
}

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

.inline-tool input {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--field-bg);
  color: var(--text);
  padding: 0 12px;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.8fr);
  gap: 18px;
  margin-top: 18px;
}

.panel {
  padding: 20px;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section-title.compact {
  margin-bottom: 12px;
}

.section-title h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: 0;
}

.segmented-control {
  display: flex;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--soft-panel);
  padding: 3px;
}

.segmented-control button {
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  padding: 0 12px;
  font-weight: 700;
}

.segmented-control button.active {
  background: var(--surface);
  color: var(--brand);
  box-shadow: 0 2px 8px rgba(28, 39, 49, 0.08);
}

.task-manager-module {
  margin-top: 18px;
}

.task-manager-header,
.manager-actions,
.task-toolbar,
.manager-stats {
  display: flex;
  align-items: center;
  gap: 14px;
}

.task-manager-header {
  justify-content: space-between;
  margin-bottom: 18px;
}

.task-manager-header h2 {
  margin: 0;
  font-size: 26px;
  letter-spacing: 0;
}

.manager-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.view-switch,
.label-filter {
  display: flex;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--soft-panel);
  padding: 3px;
}

.view-switch button,
.label-filter button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  padding: 0 11px;
  font-weight: 800;
}

.view-switch button.active,
.label-filter button.active {
  background: var(--surface);
  color: var(--brand);
  box-shadow: 0 2px 8px rgba(28, 39, 49, 0.08);
}

.view-switch svg {
  width: 17px;
  height: 17px;
}

.task-toolbar {
  flex-wrap: wrap;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--soft-panel);
  padding: 12px;
}

.field-control {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.field-control select,
.task-card select {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  padding: 0 34px 0 11px;
}

.priority-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.priority-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.priority-swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.priority-swatch.urgent {
  background: var(--red);
}

.priority-swatch.high {
  background: var(--rose);
}

.priority-swatch.medium {
  background: var(--amber);
}

.priority-swatch.low {
  background: var(--green);
}

.manager-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 14px 0;
}

.manager-stats article {
  min-height: 88px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 14px;
}

.manager-stats span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.manager-stats strong {
  display: block;
  margin-top: 8px;
  font-size: 28px;
}

.task-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(240px, 1fr));
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.task-column {
  display: flex;
  min-height: 360px;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--soft-panel);
}

.task-column.is-over {
  border-color: var(--brand);
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--brand) 35%, transparent);
}

.task-column-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 56px;
  border-bottom: 1px solid var(--line);
  padding: 12px;
}

.task-column-header h3 {
  margin: 0;
  font-size: 15px;
}

.task-count {
  display: inline-grid;
  min-width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.task-dropzone {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 300px;
  padding: 12px;
}

.task-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-left-width: 4px;
  border-radius: var(--radius);
  background: var(--surface);
  padding: 12px;
  box-shadow: var(--card-shadow);
}

.task-card[draggable="true"] {
  cursor: grab;
}

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

.task-card[data-priority="urgent"] {
  border-left-color: var(--red);
}

.task-card[data-priority="high"] {
  border-left-color: var(--rose);
}

.task-card[data-priority="medium"] {
  border-left-color: var(--amber);
}

.task-card[data-priority="low"] {
  border-left-color: var(--green);
}

.task-card-top,
.task-meta-line,
.task-card-footer {
  display: flex;
  align-items: center;
  gap: 8px;
}

.task-card-top,
.task-card-footer {
  justify-content: space-between;
}

.task-card h4 {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 15px;
  line-height: 1.35;
}

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

.task-meta-line {
  flex-wrap: wrap;
}

.avatar-chip,
.task-status,
.task-category {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 900;
}

.avatar-chip {
  background: var(--surface-muted);
  color: var(--text);
}

.task-status {
  background: #e6f6f8;
  color: #116879;
}

.task-category {
  background: #f1eefb;
  color: #5b4a99;
}

.empty-column {
  display: grid;
  min-height: 86px;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.task-table-view {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.task-table-view table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
  background: var(--surface);
}

.task-table-view th,
.task-table-view td {
  border-bottom: 1px solid var(--line);
  padding: 13px 14px;
  text-align: left;
  vertical-align: middle;
}

.task-table-view th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.task-table-view tr:last-child td {
  border-bottom: 0;
}

.table-task-title {
  display: grid;
  gap: 4px;
}

.table-task-title strong {
  overflow-wrap: anywhere;
}

.table-task-title span {
  color: var(--muted);
  font-size: 13px;
}

.is-hidden {
  display: none;
}

.task-list {
  display: grid;
  gap: 10px;
}

.task-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 76px;
  border: 1px solid var(--line);
  border-left-width: 4px;
  border-radius: var(--radius);
  padding: 12px;
  background: var(--surface);
}

.priority-high {
  border-left-color: var(--red);
}

.priority-medium {
  border-left-color: var(--amber);
}

.priority-normal {
  border-left-color: var(--green);
}

.task-row h3,
.task-row p {
  margin: 0;
}

.task-row h3 {
  overflow-wrap: anywhere;
  font-size: 15px;
}

.task-row p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.checkbox-wrap {
  display: grid;
  place-items: center;
}

.checkbox-wrap input {
  position: absolute;
  opacity: 0;
}

.checkbox-wrap span {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--muted);
  border-radius: 6px;
}

.checkbox-wrap input:checked + span {
  border-color: var(--green);
  background:
    linear-gradient(135deg, transparent 52%, #ffffff 52% 62%, transparent 62%),
    linear-gradient(45deg, transparent 44%, #ffffff 44% 56%, transparent 56%),
    var(--green);
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
}

.pill.danger {
  background: #ffe9eb;
  color: #b42f39;
}

.pill.warning {
  background: #fff2df;
  color: #935914;
}

.pill.neutral {
  background: #eaf0f6;
  color: #475768;
}

.pill.info {
  background: #e6f6f8;
  color: #116879;
}

.timeline {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline li {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  gap: 12px;
}

.timeline-dot {
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 50%;
}

.timeline-dot.teal {
  background: var(--cyan);
}

.timeline-dot.orange {
  background: var(--amber);
}

.timeline-dot.red {
  background: var(--red);
}

.timeline strong {
  font-size: 14px;
}

.timeline p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.lists-panel,
.tools-panel {
  grid-column: span 1;
}

.list-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.list-card {
  display: grid;
  gap: 8px;
  min-height: 126px;
  padding: 16px;
}

.list-card svg {
  width: 24px;
  height: 24px;
  color: var(--brand);
}

.list-card.alert svg {
  color: var(--red);
}

.list-card strong {
  overflow-wrap: anywhere;
}

.list-card span {
  color: var(--muted);
  font-size: 13px;
}

.toggle-line {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.switch {
  position: relative;
  width: 44px;
  height: 24px;
  border: 0;
  border-radius: 999px;
  background: var(--line);
  padding: 2px;
}

.switch span {
  display: block;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--surface);
  transition: transform 0.2s ease;
}

.switch[aria-pressed="true"] {
  background: var(--brand);
}

.switch[aria-pressed="true"] span {
  transform: translateX(20px);
}

.tool-table {
  display: grid;
  gap: 10px;
}

.tool-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 12px;
  min-height: 74px;
  padding: 10px;
}

.tool-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: var(--radius);
  background: var(--surface-muted);
  color: var(--brand);
}

.tool-row strong,
.tool-row small {
  display: block;
  overflow-wrap: anywhere;
}

.tool-row small {
  margin-top: 4px;
  color: var(--muted);
}

.is-compact .tool-row {
  min-height: 58px;
}

.is-compact .tool-row small {
  display: none;
}

.is-filtered-out {
  display: none;
}

@media (max-width: 1180px) {
  .quick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .manager-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .content-grid {
    grid-template-columns: 1fr;
  }

  .list-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

  .sidebar {
    position: fixed;
    z-index: 20;
    width: min(84vw, 320px);
    transform: translateX(-105%);
    transition: transform 0.22s ease;
  }

  body.nav-open .sidebar {
    transform: translateX(0);
  }

  .menu-toggle {
    display: inline-grid;
  }

  .topbar {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .visual-switch {
    grid-column: 1 / -1;
    justify-content: space-between;
  }

  .visual-switch button {
    flex: 1;
    justify-content: center;
  }

  .topbar-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }

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

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

  .manager-actions,
  .view-switch,
  .label-filter,
  .field-control {
    width: 100%;
  }

  .view-switch button,
  .label-filter button,
  .field-control select {
    flex: 1;
  }
}

@media (max-width: 640px) {
  .main-area {
    padding: 14px;
  }

  .quick-grid,
  .list-grid {
    grid-template-columns: 1fr;
  }

  .section-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .task-row {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .task-row .pill {
    grid-column: 2;
    width: fit-content;
  }

  .hero-panel {
    grid-template-columns: 1fr;
  }

  .hero-panel div + div {
    border-top: 1px solid rgba(255, 255, 255, 0.16);
    border-left: 0;
  }

  .primary-action {
    flex: 1;
  }

  .visual-switch span {
    display: none;
  }

  .manager-stats {
    grid-template-columns: 1fr;
  }

  .task-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .label-filter {
    overflow-x: auto;
  }

  .priority-legend {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
