:root {
  color-scheme: dark;
  --bg: #050505;
  --ink: #fff4ea;
  --text: #ffe9d9;
  --muted: #c6b3a4;
  --subtle: #8f7a6b;
  --glass: rgba(198, 214, 236, 0.14);
  --glass-strong: rgba(255, 208, 168, 0.62);
  --glass-soft: rgba(198, 214, 236, 0.08);
  --glass-deep: rgba(20, 10, 5, 0.7);
  --line: rgba(186, 204, 228, 0.28);
  --line-strong: rgba(210, 224, 244, 0.42);
  --accent: #7ED6CC;
  --accent-soft: rgba(126, 214, 204, 0.24);
  --accent-strong: rgba(126, 214, 204, 0.62);
  --blue: #5fbdb3;
  --blue-2: #9de9e1;
  --cyan: #7ED6CC;
  --cyan-soft: rgba(126, 214, 204, 0.24);
  --violet: #8d85ff;
  --danger: #ff7b8b;
  --gold: #ffd071;
  --ok: #72efbd;
  --shadow: 0 12px 34px rgba(0, 0, 0, 0.32);
  --inner: inset 0 1px 0 rgba(255, 255, 255, 0.24);
  --radius: 16px;
  font-family: "SF Pro Text", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, ui-sans-serif, system-ui, sans-serif;
}

:root[data-theme="orange"] {
  color-scheme: dark;
  --bg: #7ED6CC;
  --ink: #1b120b;
  --text: #2a1a0f;
  --muted: #5f4530;
  --subtle: #7e5f47;
  --glass: rgba(10, 10, 10, 0.12);
  --glass-strong: rgba(28, 20, 12, 0.72);
  --glass-soft: rgba(15, 10, 5, 0.08);
  --glass-deep: rgba(255, 189, 131, 0.56);
  --line: rgba(24, 16, 9, 0.28);
  --line-strong: rgba(18, 12, 8, 0.44);
  --blue: #1f140b;
  --blue-2: #322014;
  --cyan: #2a1a0f;
  --cyan-soft: rgba(42, 26, 15, 0.2);
  --shadow: 0 12px 30px rgba(39, 20, 6, 0.22);
  --inner: inset 0 1px 0 rgba(255, 228, 205, 0.32);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 8%, rgba(170, 188, 210, 0.14), transparent 24%),
    radial-gradient(circle at 82% 88%, rgba(155, 170, 190, 0.1), transparent 28%),
    linear-gradient(145deg, #000000 0%, #050505 45%, #0b0704 100%);
  overflow-x: hidden;
}

body.is-loading-intro {
  overflow: hidden;
}

:root[data-theme="orange"] body {
  background:
    radial-gradient(circle at 10% 8%, rgba(19, 12, 7, 0.18), transparent 24%),
    radial-gradient(circle at 82% 88%, rgba(24, 14, 9, 0.12), transparent 28%),
    linear-gradient(145deg, #b8f0ea 0%, #7ED6CC 45%, #5dbfb4 100%);
}

.project-quick-list {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  max-width: 540px;
}

.project-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--ink);
  font-weight: 700;
}

.project-chip.is-active {
  border-color: var(--accent-strong);
  box-shadow: 0 0 18px var(--accent-soft);
}

.cursor-glow {
  position: fixed;
  left: 0;
  top: 0;
  width: 300px;
  height: 300px;
  pointer-events: none;
  z-index: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 38% 34%, rgba(235, 255, 252, 0.5), rgba(126, 214, 204, 0.34) 36%, rgba(86, 190, 178, 0.14) 64%, transparent 84%);
  filter: blur(12px) saturate(118%);
  mix-blend-mode: screen;
  opacity: 0.72;
  transform: translate3d(calc(var(--mx, 50vw) - 150px), calc(var(--my, 50vh) - 150px), 0);
}

.cursor-glow::after {
  content: "";
  position: absolute;
  inset: 28%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(126, 214, 204, 0.72) 0%, rgba(126, 214, 204, 0.26) 35%, transparent 70%);
  filter: blur(2px);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(115deg, rgba(175, 194, 218, 0.14), transparent 19%),
    linear-gradient(285deg, rgba(36, 19, 10, 0.52), transparent 42%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(120deg, transparent 0%, black 22%, black 80%, transparent 100%);
}

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

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.app-shell {
  display: grid;
  grid-template-columns: 198px minmax(0, 1fr);
  gap: 26px;
  min-height: 100vh;
  padding: 38px;
  position: relative;
  z-index: 1;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 720ms ease, transform 720ms ease, filter 720ms ease;
}

body.is-loading-intro .app-shell {
  opacity: 0;
  transform: translateY(24px) scale(0.985);
  filter: blur(12px);
}

.intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 8;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: rgba(3, 3, 3, 0.3);
  transition: opacity 820ms ease, visibility 820ms ease;
}

.intro-overlay.is-leaving {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.intro-backdrop {
  position: absolute;
  inset: -10%;
  background:
    radial-gradient(circle at 50% 26%, rgba(126, 214, 204, 0.28), transparent 20%),
    radial-gradient(circle at 50% 50%, rgba(126, 214, 204, 0.16), transparent 32%),
    linear-gradient(145deg, rgba(0, 0, 0, 0.95), rgba(12, 8, 5, 0.92));
  transform: scale(1.06);
}

.intro-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(180deg, transparent 0%, black 16%, black 82%, transparent 100%);
  opacity: 0.45;
}

.intro-panel {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 18px;
  width: min(88vw, 980px);
  padding: 30px 24px;
  animation: introPanelIn 1650ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.intro-logo {
  width: min(82vw, 920px);
  max-height: 58vh;
  object-fit: contain;
  filter:
    drop-shadow(0 0 26px rgba(126, 214, 204, 0.18))
    drop-shadow(0 28px 52px rgba(0, 0, 0, 0.38));
  transform-origin: center center;
  animation:
    introLogoIn 1800ms cubic-bezier(0.16, 1, 0.3, 1) both,
    introLogoFloat 5400ms ease-in-out 1800ms infinite;
}

.intro-caption {
  margin: 0;
  color: rgba(255, 237, 220, 0.8);
  font-size: 13px;
  font-weight: 720;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  animation: introCaptionIn 1500ms ease both 320ms;
}

@keyframes introPanelIn {
  0% {
    opacity: 0;
    transform: translateY(22px) scale(0.97);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes introLogoIn {
  0% {
    opacity: 0;
    transform: translateY(18px) scale(0.88);
    filter:
      blur(8px)
      drop-shadow(0 0 12px rgba(126, 214, 204, 0.1))
      drop-shadow(0 20px 34px rgba(0, 0, 0, 0.2));
  }
  60% {
    opacity: 1;
    transform: translateY(0) scale(1.03);
    filter:
      blur(0)
      drop-shadow(0 0 22px rgba(126, 214, 204, 0.15))
      drop-shadow(0 24px 42px rgba(0, 0, 0, 0.28));
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes introLogoFloat {
  0%, 100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-8px) scale(1.012);
  }
}

@keyframes introCaptionIn {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.sidebar {
  position: sticky;
  top: 38px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  height: calc(100vh - 76px);
  padding: 8px 6px;
  scrollbar-width: none;
}

.sidebar::-webkit-scrollbar,
.nav-list::-webkit-scrollbar,
.week-grid::-webkit-scrollbar,
.kanban::-webkit-scrollbar,
.timeline::-webkit-scrollbar,
.task-table::-webkit-scrollbar {
  display: none;
}

.brand {
  display: grid;
  gap: 12px;
  color: var(--ink);
  font-weight: 800;
}

.brand-user-select {
  min-width: 0;
}

.brand-user-select select {
  width: 100%;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--ink);
  padding: 0 10px;
  backdrop-filter: blur(12px);
}

.brand-logo {
  width: 100%;
  max-width: 156px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.28));
}

.nav-list {
  display: grid;
  gap: 10px;
  scrollbar-width: none;
}

.nav-item {
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  width: 100%;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: rgba(236, 244, 255, 0.68);
  text-align: left;
  padding: 0 13px;
  position: relative;
}

.nav-item.is-active,
.nav-item:hover {
  border-color: rgba(126, 214, 204, 0.24);
  background: rgba(126, 214, 204, 0.12);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 12px 26px rgba(0, 0, 0, 0.24);
}

.nav-alert {
  position: absolute;
  right: 10px;
  top: 10px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(126, 214, 204, 0.8);
  display: none;
}

.nav-alert.is-visible {
  display: block;
}

.sidebar-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  color: rgba(231, 242, 255, 0.72);
  font-size: 12px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 18px var(--accent);
}

.status-dot.is-warn {
  background: var(--accent);
  box-shadow: 0 0 18px var(--accent);
}

.status-dot.is-error {
  background: var(--danger);
  box-shadow: 0 0 18px var(--danger);
}

.workspace {
  min-width: 0;
}

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

.eyebrow {
  margin: 0 0 7px;
  color: rgba(224, 235, 250, 0.72);
  font-size: 12px;
  font-weight: 760;
  text-transform: uppercase;
  letter-spacing: 0;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  color: var(--ink);
  font-size: clamp(32px, 4vw, 54px);
  line-height: 1.02;
  letter-spacing: 0;
  text-shadow: 0 20px 42px rgba(0, 0, 0, 0.45);
}

h2 {
  margin-bottom: 0;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.2;
}

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

.search {
  display: grid;
  grid-template-columns: 18px minmax(120px, 230px);
  align-items: center;
  gap: 9px;
  height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(235, 244, 255, 0.13);
  color: rgba(238, 247, 255, 0.8);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.26), 0 18px 34px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(14px);
}

.search input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.search input::placeholder {
  color: rgba(229, 239, 252, 0.58);
}

.primary-button,
.secondary-button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 0 15px;
  font-weight: 780;
  white-space: nowrap;
}

.primary-button {
  border-color: rgba(255, 255, 255, 0.2);
  background: linear-gradient(135deg, #a8ece4, #7ED6CC);
  color: #092220;
  box-shadow: 0 10px 22px rgba(126, 214, 204, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.primary-button:hover {
  filter: brightness(1.08);
}

.secondary-button {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.14);
  color: var(--ink);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.secondary-button:hover,
.icon-button:hover {
  transform: translateY(-1px);
}

.icon-button {
  width: 42px;
  padding: 0;
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(230, 240, 253, 0.16);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24), 0 8px 20px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(14px);
}

.icon-button svg,
.primary-button svg,
.secondary-button svg,
.timer-button svg,
.nav-item svg,
.search svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

main {
  position: relative;
  width: min(100%, 1740px);
  margin: 0 auto;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.metric {
  position: relative;
  min-height: 92px;
  padding: 16px 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(150deg, rgba(243, 249, 255, 0.18), rgba(43, 57, 72, 0.2));
  box-shadow: var(--shadow), var(--inner);
  backdrop-filter: blur(22px) saturate(145%);
  cursor: pointer;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 140ms ease;
}

.metric::after {
  content: "";
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 147, 72, 0.4), transparent 68%);
}

.metric:hover {
  border-color: rgba(126, 214, 204, 0.45);
  box-shadow: var(--shadow), 0 0 0 1px rgba(126, 214, 204, 0.12), 0 0 28px rgba(126, 214, 204, 0.18), var(--inner);
  transform: translateY(-1px);
}

.metric.is-active {
  border-color: rgba(126, 214, 204, 0.65);
  box-shadow: var(--shadow), 0 0 0 1px rgba(126, 214, 204, 0.2), 0 0 34px rgba(126, 214, 204, 0.28), var(--inner);
}

.metric span {
  display: block;
  color: rgba(232, 241, 255, 0.7);
  font-size: 12px;
  font-weight: 760;
  text-transform: uppercase;
}

.metric strong {
  display: block;
  margin-top: 8px;
  color: #fff;
  font-size: 31px;
  line-height: 1;
}

.control-row {
  display: grid;
  grid-template-columns: minmax(240px, 310px) minmax(360px, 1fr) auto auto;
  grid-template-areas:
    "project projects toggle1 toggle2"
    "assign actions state state"
    "tabs tabs tabs tabs";
  align-items: center;
  gap: 16px 18px;
  margin-bottom: 14px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(10, 20, 31, 0.52), rgba(7, 13, 22, 0.46));
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(22px);
}

.control-row > .select-wrap:first-of-type {
  grid-area: project;
  width: 100%;
}

.project-quick-list {
  grid-area: projects;
  align-self: start;
}

.assignee-wrap {
  grid-area: assign;
  align-self: start;
}

.filter-actions {
  grid-area: actions;
}

.filter-state {
  grid-area: state;
}

.control-row .toggle:nth-of-type(1) {
  grid-area: toggle1;
  justify-self: end;
}

.control-row .toggle:nth-of-type(2) {
  grid-area: toggle2;
  justify-self: start;
}

.control-row .segmented {
  grid-area: tabs;
  justify-self: start;
}

.filter-actions {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  align-self: center;
  justify-self: start;
  white-space: nowrap;
  padding-left: 8px;
}

.filter-state {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  align-self: center;
  justify-self: start;
  min-height: 18px;
  padding-left: 4px;
}

.control-row .segmented {
  align-self: center;
}

.tracker-row {
  margin-bottom: 22px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(10, 20, 31, 0.46), rgba(7, 13, 22, 0.4));
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(22px);
}

.tracker-row .timer-strip-inline {
  max-width: none;
}

.segmented {
  display: inline-grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(112px, auto);
  gap: 8px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(7, 13, 23, 0.32);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.segmented button {
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(229, 239, 252, 0.68);
  font-weight: 780;
}

.segmented .is-selected {
  background: linear-gradient(135deg, rgba(168, 236, 228, 0.94), rgba(126, 214, 204, 0.94));
  color: #092220;
  box-shadow: 0 12px 26px rgba(126, 214, 204, 0.32), inset 0 1px 1px rgba(255, 255, 255, 0.36);
}

.select-wrap {
  display: inline-grid;
  grid-template-columns: auto minmax(160px, 210px);
  align-items: center;
  gap: 10px;
  color: rgba(229, 239, 252, 0.72);
  font-size: 13px;
  font-weight: 760;
}

.assignee-wrap {
  grid-template-columns: auto 1fr;
  min-width: 280px;
}

.user-select-wrap {
  grid-template-columns: auto minmax(132px, 172px);
}

.select-wrap select,
.field select,
.field input,
.field textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 16px;
  background: rgba(242, 247, 255, 0.78);
  color: #121a25;
  outline: 0;
}

.select-wrap select {
  height: 40px;
  padding: 0 12px;
}

.assignee-checklist {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 440px;
}

.assignee-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 10px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
}

.assignee-chip input {
  accent-color: var(--blue);
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: rgba(229, 239, 252, 0.72);
  font-size: 13px;
  font-weight: 760;
  min-height: 36px;
}

.toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.toggle span {
  position: relative;
  width: 54px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(235, 244, 255, 0.2);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.42), 0 12px 28px rgba(0, 0, 0, 0.28);
}

.toggle span::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f8fbff, #b8c4d4);
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.toggle input:checked + span {
  background: linear-gradient(135deg, #a8ece4, #7ED6CC);
}

.toggle input:checked + span::after {
  transform: translateX(22px);
  background: #f8fbff;
  box-shadow: 0 0 20px rgba(126, 214, 204, 0.62);
}

.toggle em {
  font-style: normal;
}

.dashboard-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(380px, 1.04fr) minmax(300px, 0.66fr);
  grid-template-areas:
    "tasks tasks focus"
    "projects projects notes"
    "outreach outreach notes";
  gap: 20px;
  align-items: start;
}

.dashboard-grid[data-active-view="week"] {
  display: block;
  width: 100%;
}

.dashboard-grid[data-active-view="board"] {
  display: block;
  width: 100%;
}

body[data-active-view="week"] .metrics,
body[data-active-view="board"] .metrics,
body[data-active-view="week"] .tracker-row,
body[data-active-view="board"] .tracker-row {
  display: none;
}

body[data-active-view="week"] .control-row,
body[data-active-view="board"] .control-row {
  margin-bottom: 22px;
}

body[data-active-view="week"] .control-row {
  grid-template-columns: minmax(240px, 310px) minmax(360px, 1fr);
  grid-template-areas:
    "tabs tabs"
    "project projects"
    "projects projects";
}

body[data-active-view="week"] .control-row .assignee-wrap,
body[data-active-view="week"] .control-row .filter-actions,
body[data-active-view="week"] .control-row .filter-state,
body[data-active-view="week"] .control-row .toggle,
body[data-active-view="board"] .control-row .assignee-wrap,
body[data-active-view="board"] .control-row .filter-actions,
body[data-active-view="board"] .control-row .filter-state,
body[data-active-view="board"] .control-row .toggle {
  display: none;
}

body[data-active-view="board"] .control-row {
  grid-template-columns: minmax(240px, 310px) minmax(360px, 1fr) auto auto;
  grid-template-areas:
    "tabs tabs tabs tabs"
    "project projects toggle1 toggle2";
}

body[data-active-view="week"] .control-row > .select-wrap:first-of-type,
body[data-active-view="board"] .control-row > .select-wrap:first-of-type {
  align-self: start;
}

body[data-active-view="week"] .project-quick-list,
body[data-active-view="board"] .project-quick-list {
  width: 100%;
  max-width: none;
  align-self: start;
}

body[data-active-view="board"] .control-row .toggle:nth-of-type(1) {
  justify-self: end;
}

body[data-active-view="board"] .control-row .toggle:nth-of-type(2) {
  justify-self: start;
}

.dashboard-grid[data-active-view="overview"] .week-panel,
.dashboard-grid[data-active-view="overview"] .board-panel,
.dashboard-grid[data-active-view="overview"] .team-panel {
  display: none;
}

.dashboard-grid[data-active-view="week"] .task-panel,
.dashboard-grid[data-active-view="week"] .project-panel,
.dashboard-grid[data-active-view="week"] .focus-panel,
.dashboard-grid[data-active-view="week"] .board-panel,
.dashboard-grid[data-active-view="week"] .notes-panel,
.dashboard-grid[data-active-view="week"] .team-panel,
.dashboard-grid[data-active-view="board"] .task-panel,
.dashboard-grid[data-active-view="board"] .project-panel,
.dashboard-grid[data-active-view="board"] .focus-panel,
.dashboard-grid[data-active-view="board"] .week-panel,
.dashboard-grid[data-active-view="board"] .notes-panel,
.dashboard-grid[data-active-view="board"] .team-panel {
  display: none;
}

.planning-panel {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(240, 249, 255, 0.2), rgba(34, 49, 65, 0.24));
  box-shadow: var(--shadow), var(--inner);
  backdrop-filter: blur(18px) saturate(120%);
  transform: translateY(0) scale(1);
  transform-origin: center center;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.planning-panel:hover {
  transform: translateY(-2px) scale(1.012);
  border-color: rgba(186, 204, 228, 0.38);
  box-shadow: var(--shadow), 0 0 0 1px rgba(255, 255, 255, 0.06), 0 24px 44px rgba(0, 0, 0, 0.28), var(--inner);
  background: linear-gradient(145deg, rgba(248, 252, 255, 0.22), rgba(37, 50, 66, 0.28));
}

.focus-panel {
  grid-area: focus;
  border-color: rgba(126, 214, 204, 0.24);
  box-shadow: var(--shadow), 0 0 0 1px rgba(126, 214, 204, 0.04), 0 0 46px rgba(126, 214, 204, 0.1), var(--inner);
  min-height: 388px;
}

.project-panel {
  grid-area: projects;
  min-height: 388px;
}

.week-panel {
  grid-area: week;
  min-height: 354px;
}

.task-panel {
  grid-area: tasks;
  min-height: 388px;
}

.board-panel {
  grid-area: board;
  min-height: 516px;
}

.notes-panel {
  grid-area: notes;
  border-color: rgba(126, 214, 204, 0.26);
  min-height: 516px;
}

.team-panel {
  grid-area: team;
  min-height: 244px;
}

.outreach-panel {
  grid-area: outreach;
  min-height: 360px;
  border-color: rgba(126, 214, 204, 0.24);
}

.dashboard-grid[data-active-view="overview"] .project-panel,
.dashboard-grid[data-active-view="overview"] .notes-panel,
.dashboard-grid[data-active-view="overview"] .outreach-panel {
  min-height: 300px;
}

.dashboard-grid[data-active-view="overview"] .focus-panel {
  min-height: 520px;
}

.dashboard-grid[data-active-view="week"] .week-panel {
  min-height: 720px;
  width: 100%;
  max-width: none;
  display: block;
}

.dashboard-grid[data-active-view="board"] .board-panel {
  min-height: 720px;
  width: 100%;
  max-width: none;
  display: block;
}

.dashboard-grid[data-active-view="week"] .week-panel,
.dashboard-grid[data-active-view="board"] .board-panel {
  border-color: rgba(190, 206, 228, 0.36);
  box-shadow: var(--shadow), 0 0 0 1px rgba(255, 255, 255, 0.06), 0 30px 60px rgba(0, 0, 0, 0.28), var(--inner);
}

.dashboard-grid[data-active-view="week"] .week-grid,
.dashboard-grid[data-active-view="board"] .kanban {
  width: 100%;
}

.team-list {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.team-member {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
}

.team-member.is-active {
  border-color: rgba(126, 214, 204, 0.4);
  box-shadow: 0 0 24px rgba(126, 214, 204, 0.12);
}

.member-main {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  text-align: left;
}

.member-avatar {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #a8ece4, #7ED6CC);
  color: #092220;
}

.member-copy strong {
  display: block;
  font-size: 14px;
}

.member-copy small {
  color: var(--muted);
  font-size: 12px;
}

.member-form {
  margin: 0 16px 16px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.member-form input {
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  padding: 0 12px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 74px;
  padding: 18px 20px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.13);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent);
}

.mini-actions {
  display: flex;
  gap: 7px;
}

.section-tools {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.panel-expand-btn {
  opacity: 0.82;
}

.planning-panel:hover .panel-expand-btn,
.panel-expand-btn:focus-visible {
  opacity: 1;
}

.count-pill {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 30px;
  border-radius: 999px;
  background: rgba(235, 244, 255, 0.16);
  color: var(--ink);
  font-weight: 800;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.32);
}

.timeline,
.project-list,
.task-table,
.kanban,
.lead-list,
.notes-panel textarea {
  padding: 16px 18px 18px;
}

.outreach-shell {
  display: grid;
  gap: 14px;
  padding: 16px 18px 18px;
}

.outreach-top {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(280px, 0.82fr);
  gap: 14px;
  align-items: start;
}

.composer-card,
.bot-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  background: rgba(6, 14, 24, 0.32);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.12), 0 18px 34px rgba(0, 0, 0, 0.18);
}

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

.composer-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.bot-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bot-orb {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ecfffc, #7ED6CC 52%, #22423f 100%);
  color: #06211d;
  box-shadow: 0 0 24px rgba(126, 214, 204, 0.26);
}

.bot-card-header strong {
  display: block;
  color: var(--ink);
  font-size: 15px;
}

.bot-card-header p {
  margin: 4px 0 0;
  color: rgba(226, 237, 250, 0.72);
  font-size: 12px;
}

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

.bot-metrics article {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
}

.bot-metrics span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.bot-metrics strong {
  display: block;
  margin-top: 6px;
  color: var(--ink);
  font-size: 22px;
}

.bot-log {
  display: grid;
  gap: 8px;
}

.bot-log-item {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
}

.bot-log-item strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
}

.bot-log-item p {
  margin: 4px 0 0;
  color: rgba(226, 237, 250, 0.68);
  font-size: 12px;
}

.quick-lead-form,
.bulk-lead-form {
  display: grid;
  gap: 10px;
}

.bulk-lead-actions {
  display: flex;
  justify-content: flex-end;
}

.outreach-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  font-weight: 700;
}

.status-chip strong {
  color: var(--muted);
  font-size: 12px;
}

.status-chip.is-active {
  border-color: rgba(126, 214, 204, 0.34);
  box-shadow: 0 0 22px rgba(126, 214, 204, 0.14);
}

.lead-list {
  display: grid;
  gap: 10px;
  padding: 0;
}

.lead-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) minmax(170px, 0.9fr) minmax(220px, 1fr) 46px;
  align-items: center;
  gap: 12px;
  min-height: 86px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 20px;
  background: rgba(6, 14, 24, 0.32);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.lead-row:hover {
  border-color: rgba(126, 214, 204, 0.3);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.12), 0 18px 34px rgba(0, 0, 0, 0.24);
}

.lead-main h3,
.lead-next strong {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
}

.lead-main p,
.lead-next small {
  display: block;
  margin: 4px 0 0;
  color: rgba(226, 237, 250, 0.68);
  font-size: 12px;
  line-height: 1.35;
}

.lead-meta {
  display: grid;
  gap: 8px;
  justify-items: start;
  color: rgba(226, 237, 250, 0.7);
  font-size: 12px;
}

.lead-next {
  min-width: 0;
}

.lead-form-grid textarea[name="draft"] {
  min-height: 220px;
  font-family: inherit;
  line-height: 1.5;
}

@media (max-width: 1180px) {
  .outreach-top {
    grid-template-columns: 1fr;
  }

  .lead-row {
    grid-template-columns: minmax(0, 1fr) minmax(180px, 0.8fr) 42px;
    grid-template-areas:
      "main meta actions"
      "next next next";
  }

  .lead-main {
    grid-area: main;
  }

  .lead-meta {
    grid-area: meta;
  }

  .lead-next {
    grid-area: next;
  }

  .lead-row .row-actions {
    grid-area: actions;
  }
}

@media (max-width: 760px) {
  .composer-grid,
  .bot-metrics {
    grid-template-columns: 1fr;
  }

  .composer-actions {
    flex-direction: column;
  }

  .lead-row {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "main"
      "meta"
      "next"
      "actions";
  }

  .lead-row .row-actions {
    justify-content: flex-start;
  }
}

.timer-strip {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin: 16px 16px 0;
  padding: 13px;
  border: 1px solid rgba(126, 214, 204, 0.22);
  border-radius: 24px;
  background: rgba(5, 13, 22, 0.34);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.18), 0 18px 34px rgba(0, 0, 0, 0.22);
}

.timer-strip-panel {
  margin: 16px;
  min-height: 180px;
  align-content: start;
  grid-template-columns: 64px minmax(0, 1fr);
}

.timer-strip-inline {
  margin: 0;
  min-height: 0;
  grid-template-columns: 1fr;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.tracker-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  min-height: 92px;
  padding: 16px 18px;
  border: 1px solid rgba(126, 214, 204, 0.22);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(7, 14, 23, 0.62), rgba(11, 18, 27, 0.5));
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.18), 0 18px 34px rgba(0, 0, 0, 0.18);
}

.tracker-card.is-live {
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.18), 0 18px 34px rgba(0, 0, 0, 0.22), 0 0 28px color-mix(in srgb, var(--timer-color, var(--cyan)) 18%, transparent);
}

.tracker-summary {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.tracker-controls {
  display: inline-grid;
  grid-template-columns: minmax(220px, 280px) auto;
  align-items: end;
  gap: 12px;
}

.timer-strip-inline .timer-orb,
.tracker-summary .timer-orb {
  width: 48px;
  height: 48px;
}

.timer-strip-inline .timer-copy strong {
  font-size: 22px;
  letter-spacing: 0;
}

.timer-strip-inline .timer-copy em {
  margin-top: 3px;
  font-size: 12px;
}

.tracker-picker {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  min-width: 0;
}

.tracker-picker select {
  width: 100%;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  padding: 0 10px;
}

.tracker-inline-actions {
  display: inline-grid;
  grid-auto-flow: column;
  grid-auto-columns: 38px;
  gap: 8px;
  justify-self: end;
  align-self: end;
}

.tracker-inline-actions .timer-button {
  width: 38px;
  height: 38px;
  min-width: 38px;
  min-height: 38px;
  padding: 0;
}

.focus-panel .timeline {
  max-height: 308px;
}

.timer-orb {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: radial-gradient(circle at 36% 28%, #e9fdff, var(--timer-color, var(--cyan)) 48%, #23334f 100%);
  color: #fff;
  box-shadow: 0 0 24px color-mix(in srgb, var(--timer-color, var(--cyan)) 58%, transparent), inset 0 1px 1px rgba(255, 255, 255, 0.7);
}

.timer-orb.is-running {
  animation: timerPulse 1.4s ease-in-out infinite;
}

.timer-copy {
  min-width: 0;
}

.timer-copy span,
.project-timer span {
  display: block;
  color: rgba(226, 237, 250, 0.62);
  font-size: 12px;
  font-weight: 780;
}

.timer-copy strong {
  display: block;
  margin-top: 2px;
  color: var(--ink);
  font-size: 28px;
  line-height: 1;
}

.timer-copy em {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: rgba(226, 237, 250, 0.7);
  font-size: 12px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@keyframes timerPulse {
  0%,
  100% {
    box-shadow: 0 0 20px color-mix(in srgb, var(--timer-color, var(--cyan)) 45%, transparent), inset 0 1px 1px rgba(255, 255, 255, 0.7);
  }

  50% {
    box-shadow: 0 0 42px color-mix(in srgb, var(--timer-color, var(--cyan)) 82%, transparent), inset 0 1px 1px rgba(255, 255, 255, 0.8);
  }
}

.timeline {
  display: grid;
  gap: 12px;
  max-height: 432px;
  overflow: auto;
  align-content: start;
}

.timeline-item {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 12px;
  min-height: 78px;
  padding: 12px 13px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-left: 4px solid var(--cyan);
  border-radius: 22px;
  background: rgba(6, 14, 24, 0.34);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.16), 0 18px 36px rgba(0, 0, 0, 0.22);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.timeline-item:hover {
  border-color: rgba(126, 214, 204, 0.34);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.18), 0 20px 38px rgba(0, 0, 0, 0.3), 0 0 28px rgba(126, 214, 204, 0.12);
}

.time-block {
  display: grid;
  place-items: center;
  min-height: 38px;
  border-radius: 999px;
  background: rgba(234, 243, 255, 0.14);
  color: rgba(235, 244, 255, 0.76);
  font-size: 12px;
  font-weight: 800;
}

.timeline-item h3,
.project-card h3,
.task-row h3,
.kanban-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.25;
  letter-spacing: 0;
}

.timeline-item p,
.kanban-card p {
  margin: 4px 0 0;
  color: rgba(226, 237, 250, 0.66);
  font-size: 12px;
  line-height: 1.35;
}

.task-subline {
  margin: 4px 0 0;
  color: rgba(226, 237, 250, 0.72);
  font-size: 12px;
  line-height: 1.35;
}

.detail-subline {
  margin-top: 8px;
  font-size: 14px;
}

.project-list {
  display: grid;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  align-content: start;
}

.project-row {
  display: grid;
  grid-template-columns: minmax(230px, 1.35fr) minmax(82px, 0.5fr) minmax(108px, 0.6fr) minmax(108px, 0.6fr) minmax(132px, 0.7fr);
  align-items: center;
  gap: 12px;
  min-height: 74px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 20px;
  background: rgba(6, 14, 24, 0.32);
  color: rgba(236, 244, 255, 0.8);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.project-row.is-tracking {
  border-color: rgba(126, 214, 204, 0.55);
  box-shadow: 0 0 22px rgba(126, 214, 204, 0.2);
}

.project-row:hover {
  border-color: rgba(126, 214, 204, 0.3);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.12), 0 18px 34px rgba(0, 0, 0, 0.24);
}

.project-row h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.project-panel .section-heading {
  min-height: 74px;
}

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

.comment-list {
  display: grid;
  gap: 6px;
}

.comment-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.04);
}

.comment-item strong {
  display: block;
  font-size: 12px;
}

.comment-item p {
  margin: 4px 0 0;
  font-size: 13px;
}

.comment-form {
  display: grid;
  grid-template-columns: 1fr 42px;
  gap: 8px;
}

.comment-form input {
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  padding: 0 10px;
}

.chat-list {
  padding: 16px;
  display: grid;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
}

.chat-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.04);
}

.chat-item.is-own {
  border-color: var(--line-strong);
}

.chat-item strong {
  font-size: 12px;
}

.chat-item p {
  margin: 4px 0 0;
  font-size: 13px;
}

.chat-form {
  display: grid;
  grid-template-columns: 132px 1fr auto;
  gap: 8px;
  padding: 0 16px 16px;
}

.chat-form select,
.chat-form input {
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  padding: 0 12px;
}

.project-card {
  display: grid;
  gap: 12px;
  min-height: 166px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 22px;
  background: rgba(236, 245, 255, 0.12);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.18), 0 16px 32px rgba(0, 0, 0, 0.22);
}

.project-card.is-tracking {
  border-color: rgba(126, 214, 204, 0.34);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.2), 0 18px 36px rgba(0, 0, 0, 0.26), 0 0 34px rgba(126, 214, 204, 0.12);
}

.project-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.project-name {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.swatch {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex: 0 0 auto;
  box-shadow: 0 0 20px currentColor;
}

.progress {
  height: 10px;
  border-radius: 999px;
  background: rgba(3, 8, 14, 0.34);
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.36);
}

.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  box-shadow: 0 0 18px rgba(126, 214, 204, 0.42);
}

.project-meta,
.task-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  color: rgba(226, 237, 250, 0.66);
  font-size: 11px;
}

.project-timer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 58px;
  padding: 11px 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  background: rgba(4, 10, 18, 0.34);
}

.project-timer strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
}

.project-timer small {
  flex: 0 0 auto;
  max-width: 108px;
  overflow: hidden;
  color: color-mix(in srgb, var(--timer-color, var(--cyan)) 72%, #ffffff);
  font-size: 12px;
  font-weight: 780;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.timer-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(229, 240, 255, 0.16);
  color: var(--ink);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.25), 0 12px 24px rgba(0, 0, 0, 0.2);
}

.timer-button.start:not(:disabled) {
  background: linear-gradient(135deg, #a8ece4, #7ED6CC);
  color: #092220;
  box-shadow: 0 16px 30px rgba(126, 214, 204, 0.28), inset 0 1px 1px rgba(255, 255, 255, 0.42);
}

.timer-button.pause:not(:disabled) {
  background: rgba(126, 214, 204, 0.18);
  color: #e7fffb;
}

.timer-button.stop:not(:disabled) {
  background: rgba(255, 123, 139, 0.16);
  color: #ffe0e5;
}

.timer-button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(108px, 1fr));
  min-height: 334px;
  overflow-x: auto;
}

.dashboard-grid[data-active-view="week"] .week-grid {
  min-height: 620px;
  grid-template-columns: repeat(7, minmax(160px, 1fr));
  gap: 10px;
  padding: 14px;
  overflow: visible;
}

.day-column {
  min-width: 108px;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.day-column:last-child {
  border-right: 0;
}

.dashboard-grid[data-active-view="week"] .day-column {
  min-width: 0;
  border-right: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  overflow: hidden;
  background: rgba(9, 16, 26, 0.24);
}

.day-header {
  display: grid;
  gap: 2px;
  height: 58px;
  padding: 11px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(246, 250, 255, 0.08);
}

.day-header strong {
  color: var(--ink);
  font-size: 13px;
}

.day-header span {
  color: rgba(226, 237, 250, 0.62);
  font-size: 12px;
}

.day-column.is-today .day-header {
  background: rgba(126, 214, 204, 0.2);
  box-shadow: inset 0 0 26px rgba(126, 214, 204, 0.12);
}

.dashboard-grid[data-active-view="week"] .day-header {
  height: 72px;
  padding: 14px 14px 12px;
}

.dashboard-grid[data-active-view="week"] .day-header strong {
  font-size: 15px;
}

.day-stack {
  display: grid;
  align-content: start;
  gap: 7px;
  padding: 9px;
}

.dashboard-grid[data-active-view="week"] .day-stack {
  gap: 10px;
  padding: 12px;
}

.day-task {
  min-height: 56px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  background: rgba(9, 18, 29, 0.42);
  color: var(--ink);
  font-size: 11px;
  transition: border-color 160ms ease;
}

.day-task:hover {
  border-color: rgba(126, 214, 204, 0.28);
}

.day-event,
.timeline-item-event {
  border-left-color: var(--accent) !important;
  background: rgba(52, 38, 24, 0.26);
}

.dashboard-grid[data-active-view="week"] .day-task {
  min-height: 74px;
  padding: 10px 11px;
  border-radius: 18px;
  font-size: 12px;
}

.task-table {
  display: grid;
  gap: 10px;
  max-height: 432px;
  overflow: auto;
  align-content: start;
}

.task-row {
  display: grid;
  grid-template-columns: minmax(210px, 1.4fr) minmax(96px, 0.55fr) minmax(108px, 0.58fr) minmax(112px, 0.62fr) 86px;
  align-items: center;
  gap: 12px;
  min-height: 78px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 20px;
  background: rgba(6, 14, 24, 0.32);
  color: rgba(236, 244, 255, 0.8);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.task-row:hover {
  border-color: rgba(126, 214, 204, 0.32);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.12), 0 18px 34px rgba(0, 0, 0, 0.24);
}

.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  max-width: 100%;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.tag-button {
  cursor: pointer;
  border-width: 1px;
  transition: transform 140ms ease, box-shadow 140ms ease, filter 140ms ease;
}

.tag-button:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
}

.tag-high {
  background: rgba(233, 126, 145, 0.14);
  color: #ffdbe2;
  border: 1px solid rgba(233, 126, 145, 0.3);
}

.tag-mid {
  background: rgba(126, 214, 204, 0.14);
  color: #defcf8;
  border: 1px solid rgba(126, 214, 204, 0.32);
}

.tag-low {
  background: rgba(126, 214, 204, 0.1);
  color: #defcf8;
  border: 1px solid rgba(126, 214, 204, 0.24);
}

.tag-progress {
  background: rgba(126, 214, 204, 0.16);
  color: #defcf8;
  border: 1px solid rgba(126, 214, 204, 0.3);
}

.tag-status-open {
  background: rgba(126, 214, 204, 0.12);
  color: #defcf8;
  border: 1px solid rgba(126, 214, 204, 0.28);
}

.tag-status-work {
  background: rgba(99, 191, 180, 0.16);
  color: #e2fffb;
  border: 1px solid rgba(99, 191, 180, 0.3);
}

.tag-status-wait {
  background: rgba(164, 191, 188, 0.14);
  color: #edf7f6;
  border: 1px solid rgba(164, 191, 188, 0.28);
}

.tag-status-done {
  background: rgba(126, 214, 204, 0.08);
  color: rgba(222, 252, 248, 0.78);
  border: 1px solid rgba(126, 214, 204, 0.18);
}

.row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.row-actions .icon-button {
  width: 34px;
  height: 34px;
  min-height: 34px;
}

.kanban {
  display: grid;
  grid-template-columns: repeat(4, minmax(210px, 1fr));
  gap: 14px;
  overflow-x: auto;
  align-items: start;
}

.dashboard-grid[data-active-view="board"] .kanban {
  min-height: 610px;
  grid-template-columns: repeat(4, minmax(260px, 1fr));
  gap: 16px;
}

.kanban-column {
  min-width: 210px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 22px;
  background: rgba(6, 14, 24, 0.28);
}

.kanban-column header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 13px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--ink);
  font-size: 13px;
  font-weight: 820;
}

.kanban-stack {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 144px;
  padding: 9px;
}

.kanban-card {
  min-height: 88px;
  padding: 10px 11px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  background: rgba(236, 245, 255, 0.1);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.2);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.kanban-card:hover {
  border-color: rgba(126, 214, 204, 0.28);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.24);
}

.progress-column {
  background: rgba(7, 14, 24, 0.34);
}

.progress-card {
  display: grid;
  gap: 10px;
  min-height: 152px;
  padding: 14px 14px 13px;
}

.progress-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.progress-compact {
  height: 8px;
}

.progress-meta {
  justify-content: space-between;
  gap: 8px;
}

.notes-panel textarea {
  display: block;
  width: 100%;
  min-height: 438px;
  border: 0;
  resize: vertical;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.45;
  border-radius: 14px;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 100px;
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: 18px;
  color: rgba(226, 237, 250, 0.62);
  text-align: center;
  padding: 18px;
}

.modal {
  width: min(620px, calc(100vw - 28px));
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: 0 28px 100px rgba(0, 0, 0, 0.5);
  padding: 0;
  background: linear-gradient(145deg, rgba(18, 24, 32, 0.96), rgba(10, 15, 23, 0.94));
  color: var(--text);
  box-shadow: var(--shadow), var(--inner), 0 30px 80px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(20px) saturate(125%);
}

.modal-wide {
  width: min(1180px, calc(100vw - 28px));
}

.modal::backdrop {
  background: rgba(3, 8, 14, 0.58);
  backdrop-filter: blur(10px);
}

.modal .icon-button {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.16);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 66px;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.modal-header h2 {
  color: var(--ink);
  font-size: 20px;
}

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

.field {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
}

.field-wide {
  grid-column: 1 / -1;
}

.field input:not([type="color"]):not([type="range"]),
.field select {
  height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
}

.field textarea {
  min-height: 92px;
  resize: vertical;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
}

.field input[type="color"] {
  height: 42px;
  padding: 4px;
}

.field input[type="range"] {
  height: 42px;
  accent-color: var(--blue);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.modal-actions.detail-actions {
  padding: 0;
  border-top: 0;
}

.danger-button {
  margin-right: auto;
  border-color: rgba(126, 214, 204, 0.3);
  background: rgba(126, 214, 204, 0.12);
  color: #e7fffb;
}

.panel-expand-content {
  padding: 18px;
  background: linear-gradient(180deg, rgba(8, 12, 18, 0.38), rgba(8, 12, 18, 0.08));
}

.panel-expand-preview {
  transform: none !important;
  border-radius: 22px;
  min-height: min(72vh, 780px);
  background: linear-gradient(145deg, rgba(240, 249, 255, 0.18), rgba(28, 38, 52, 0.22));
}

.panel-expand-preview:hover {
  transform: none !important;
}

.panel-expand-preview .timeline,
.panel-expand-preview .project-list,
.panel-expand-preview .task-table,
.panel-expand-preview .kanban,
.panel-expand-preview textarea,
.panel-expand-preview .team-list {
  max-height: min(58vh, 620px);
  overflow: auto;
}

.panel-expand-preview textarea {
  min-height: min(52vh, 540px);
}

.detail-sheet {
  display: grid;
  gap: 16px;
}

.detail-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)),
    radial-gradient(circle at top right, color-mix(in srgb, var(--detail-color, var(--cyan)) 22%, transparent), transparent 42%);
}

.detail-kicker {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  text-transform: uppercase;
}

.detail-hero h3 {
  margin: 0;
  font-size: 24px;
  color: var(--ink);
}

.detail-copy {
  margin: 8px 0 0;
  color: rgba(226, 237, 250, 0.72);
  line-height: 1.5;
}

.detail-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

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

.detail-card {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
}

.detail-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.detail-card strong {
  color: var(--ink);
  font-size: 15px;
}

.detail-progress {
  height: 10px;
}

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

.detail-list-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
}

.detail-list-item strong {
  display: block;
  color: var(--ink);
}

.detail-list-item p {
  margin: 6px 0 0;
  color: rgba(226, 237, 250, 0.68);
  font-size: 13px;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 20;
  padding: 12px 15px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 18px;
  background: rgba(10, 18, 29, 0.72);
  color: #fff;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  font-size: 14px;
}

@media (max-width: 1260px) {
  .app-shell {
    grid-template-columns: 178px minmax(0, 1fr);
    padding: 26px;
  }

  .sidebar {
    top: 26px;
    height: calc(100vh - 52px);
  }

  .metrics {
    grid-template-columns: repeat(3, minmax(160px, 1fr));
  }

  .control-row {
    grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr);
    grid-template-areas:
      "project projects"
      "toggle1 toggle2"
      "assign actions"
      "state state"
      "tabs tabs";
  }

  .tracker-row {
    padding: 16px;
  }

  .tracker-card {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

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

  .control-row .toggle:nth-of-type(1) {
    justify-self: start;
  }

  .control-row .toggle:nth-of-type(2) {
    justify-self: start;
  }

  .control-row .segmented {
    justify-self: start;
  }

  .dashboard-grid {
    grid-template-columns: minmax(280px, 1fr) minmax(330px, 1fr);
    grid-template-areas:
      "tasks tasks"
      "projects projects"
      "focus focus"
      "week team"
      "board notes";
  }

  .task-panel,
  .project-panel,
  .focus-panel,
  .week-panel,
  .board-panel,
  .notes-panel,
  .team-panel {
    min-height: 0;
  }

  .project-row {
    grid-template-columns: minmax(180px, 1fr) 88px 100px 100px 120px;
  }

  .dashboard-grid[data-active-view="week"] {
    grid-template-areas:
      "week week"
      "projects projects"
      "tasks tasks"
      "focus notes"
      "team notes"
      "board board";
  }

  .dashboard-grid[data-active-view="board"] {
    grid-template-areas:
      "board board"
      "projects projects"
      "tasks tasks"
      "focus focus"
      "week team"
      "notes notes";
  }
}

@media (max-width: 1080px) {
  .control-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
      "project project"
      "projects projects"
      "toggle1 toggle2"
      "assign actions"
      "state state"
      "tabs tabs";
  }

  .control-row > * {
    min-width: 0;
  }

  .select-wrap {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .filter-actions,
  .filter-state,
  .toggle {
    align-self: center;
  }

  .project-quick-list {
    max-width: none;
  }

  .assignee-wrap {
    min-width: 0;
  }

  .tracker-controls {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .tracker-inline-actions {
    justify-self: start;
  }

  .tracker-row .timer-strip-inline {
    max-width: none;
  }

  .dashboard-grid {
    gap: 18px;
  }

  .project-row {
    grid-template-columns: 1fr;
    align-items: start;
  }
}

@media (max-width: 920px) {
  .planning-panel,
  .planning-panel:hover {
    transform: none;
  }

  .app-shell {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 16px;
  }

  .sidebar {
    position: static;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    height: auto;
    padding: 12px;
    overflow-x: auto;
  }

  .brand {
    flex: 1 0 122px;
  }

  .nav-list {
    display: flex;
    gap: 8px;
    flex: 1 1 280px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 2px;
  }

  .nav-item {
    width: 48px;
    min-width: 48px;
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 0 8px;
  }

  .nav-item span {
    display: none;
  }

  .sidebar-footer {
    display: none;
  }

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

  .topbar-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .control-row {
    align-items: stretch;
    overflow: visible;
    grid-template-columns: 1fr;
    grid-template-areas:
      "project"
      "projects"
      "assign"
      "actions"
      "state"
      "toggle1"
      "toggle2"
      "tabs";
  }

  .tracker-row {
    padding: 14px;
  }

  .control-row .segmented {
    width: 100%;
    justify-self: stretch;
  }

  .control-row .toggle:nth-of-type(1),
  .control-row .toggle:nth-of-type(2),
  .filter-state {
    justify-self: start;
  }

  .user-select-wrap {
    width: 100%;
    grid-template-columns: auto minmax(0, 1fr);
  }

  .search {
    grid-template-columns: 18px minmax(0, 1fr);
    width: 100%;
  }

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

  .dashboard-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "tasks"
      "projects"
      "focus"
      "team"
      "week"
      "board"
      "notes";
  }

  .dashboard-grid[data-active-view="week"] {
    grid-template-areas:
      "week"
      "projects"
      "tasks"
      "focus"
      "team"
      "board"
      "notes";
  }

  .dashboard-grid[data-active-view="board"] {
    grid-template-areas:
      "board"
      "projects"
      "tasks"
      "focus"
      "team"
      "week"
      "notes";
  }

  .task-row {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .project-row {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .row-actions {
    justify-content: flex-start;
  }

  .timer-strip-inline {
    row-gap: 10px;
  }

  .tracker-picker,
  .tracker-inline-actions {
    grid-column: auto;
  }

  .tracker-row .timer-strip-inline {
    max-width: none;
  }

  .notes-panel textarea {
    min-height: 260px;
  }

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

@media (prefers-reduced-motion: reduce) {
  .app-shell,
  .intro-overlay,
  .intro-panel,
  .intro-logo,
  .intro-caption {
    transition: none;
    animation: none;
  }
}

@media (max-width: 560px) {
  .app-shell {
    padding: 10px;
  }

  h1 {
    font-size: 30px;
  }

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

  .control-row {
    align-items: stretch;
  }

  .segmented {
    width: 100%;
    grid-auto-columns: 1fr;
  }

  .control-row .segmented {
    order: initial;
  }

  .select-wrap {
    width: 100%;
    grid-template-columns: 1fr;
  }

  .assignee-wrap {
    width: 100%;
    grid-template-columns: 1fr;
    min-width: 0;
  }

  .cursor-glow {
    display: none;
  }

  .primary-button,
  .secondary-button {
    min-width: 118px;
  }

  .metrics {
    gap: 12px;
  }

  .metric,
  .planning-panel {
    border-radius: 16px;
  }

  .tracker-row {
    border-radius: 16px;
  }

  .section-heading,
  .timeline,
  .project-list,
  .task-table,
  .kanban,
  .notes-panel textarea {
    padding-left: 14px;
    padding-right: 14px;
  }
}
