:root {
  color-scheme: light;
  --paper: #f2f2f0;
  --surface: #ffffff;
  --surface-alt: #f6f6f4;
  --ink: #111111;
  --muted: #6a6a6a;
  --accent: #1a1a1a;
  --accent-soft: #ececea;
  --success: #4d4d4d;
  --warning: #707070;
  --danger: #3a3a3a;
  --border: #e3e3e0;
  --shadow: 0 12px 28px rgba(17, 17, 17, 0.06);
  --radius-control: 10px;
  --radius-card: 18px;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(26, 26, 26, 0.08), transparent 32%),
    radial-gradient(circle at top right, rgba(26, 26, 26, 0.05), transparent 24%),
    linear-gradient(180deg, #ecece8 0%, #dfdfda 100%);
  color: var(--ink);
}

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

button {
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  background: var(--accent);
  color: #ffffff;
  padding: 0.72rem 1rem;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
  letter-spacing: 0.01em;
  font-weight: 700;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(17, 17, 17, 0.1);
}

button.secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--border);
}

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

.app-shell {
  min-height: 100vh;
  padding: 1rem 1.25rem 1.5rem;
}

.app-shell.is-auth {
  background:
    radial-gradient(circle at 15% 10%, rgba(26, 26, 26, 0.09), transparent 28%),
    radial-gradient(circle at 85% 25%, rgba(93, 121, 255, 0.12), transparent 30%),
    linear-gradient(180deg, #ecece8 0%, #e3e3de 100%);
}

.topbar,
.panel,
.sidebar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.2rem;
  margin-bottom: 1rem;
  position: sticky;
  top: 0.75rem;
  z-index: 10;
  backdrop-filter: blur(10px);
}

.app-shell.is-auth .topbar {
  background: rgba(255, 255, 255, 0.74);
  border-color: rgba(231, 231, 225, 0.9);
}

.topbar--compact {
  justify-content: flex-start;
  border: none;
  background: transparent;
  box-shadow: none;
  padding: 0.5rem 0 1.2rem;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #2b2b2b 0%, #111111 100%);
  color: #ffffff;
  font-weight: 700;
  font-size: 1.1rem;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}

.topbar .wordmark {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  margin: 0;
  color: var(--accent);
  text-transform: uppercase;
}

.wordmark--center {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.workspace-pill {
  color: var(--muted);
  font-size: 0.86rem;
}

.topbar h1 {
  margin: 0;
  font-size: 1rem;
}

.topbar-actions,
.inline-actions,
.input-grid,
.board-columns,
.list-item,
.panel-head {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.search-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.45rem 0.72rem;
  background: var(--surface-alt);
}

.task-summary-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.panel-head {
  justify-content: space-between;
  width: 100%;
}

.panel-toolbar {
  display: flex;
  justify-content: flex-end;
  margin: 0.75rem 0 0.3rem;
}

.panel-toolbar input[type="search"] {
  min-width: min(100%, 320px);
}

.task-summary-chip {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, var(--surface-alt) 100%);
  padding: 0.75rem 0.85rem;
}

button.refresh-btn {
  padding: 0.42rem 0.72rem;
  font-size: 0.84rem;
  line-height: 1;
  border-radius: 999px;
  min-height: 2rem;
}

.task-summary-chip span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.task-summary-chip strong {
  display: block;
  margin-top: 0.35rem;
  font-size: 1.35rem;
}

.tasks-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

.task-list-column {
  min-width: 0;
}

.task-create-form {
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, var(--surface-alt) 100%);
}

.task-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

.task-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #ffffff;
  padding: 0.95rem 1rem;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}

.task-card:hover,
.task-card.selected {
  transform: translateY(-1px);
  border-color: #cfcfcb;
  box-shadow: 0 10px 22px rgba(17, 17, 17, 0.06);
}

.task-card.overdue {
  border-left: 4px solid #7b7b7b;
}

.task-card.upcoming {
  border-left: 4px solid #9a9a9a;
}

.task-card.done {
  border-left: 4px solid #5f5f5f;
}

.task-card-head,
.task-card-meta,
.task-card-footer,
.task-detail-head,
.task-detail-actions {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  justify-content: space-between;
}

.task-card-head strong {
  display: block;
  font-size: 1rem;
}

.task-card-subtitle,
.task-card-detail,
.task-detail-notes {
  color: var(--muted);
}

.task-card-subtitle {
  margin-top: 0.25rem;
  line-height: 1.45;
}

.task-card-meta,
.task-card-footer {
  margin-top: 0.6rem;
  font-size: 0.84rem;
  color: var(--muted);
}

.task-card-footer {
  align-items: flex-start;
}

.task-detail-card {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f7f7f5 100%);
  padding: 1rem;
  box-shadow: var(--shadow);
}

.task-detail-head h3 {
  margin: 0.35rem 0 0;
}

.task-detail-notes {
  margin: 0.9rem 0 1rem;
  line-height: 1.6;
}

.task-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  margin: 0;
}

.task-detail-grid dt {
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.task-detail-grid dd {
  margin: 0.2rem 0 0;
  font-weight: 600;
}

.task-detail-actions {
  flex-wrap: wrap;
  justify-content: flex-start;
  margin-top: 1rem;
}

.status-pill--done {
  background: #e6f3e8;
  color: #404040;
}

.status-pill--upcoming {
  background: #efefed;
  color: #555555;
}

.status-pill--overdue {
  background: #efefed;
  color: #555555;
}

.status-pill--muted {
  background: #f1f1ef;
  color: #555;
}

.task-card.selected .status-pill,
.task-detail-pane .status-pill {
  background: #ececea;
  color: #343434;
}

.task-empty {
  padding: 1rem;
}
.search-pill input {
  border: none;
  background: transparent;
  padding: 0;
  min-width: 140px;
}

.search-pill input:focus-visible {
  outline: none;
}

.layout {
  display: grid;
  grid-template-columns: 236px 1fr;
  gap: 1rem;
}

.app-shell.is-auth .layout {
  grid-template-columns: 1fr !important;
}

.app-shell.is-auth .sidebar {
  display: none !important;
}

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

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.sidebar-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  padding: 1rem;
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.sidebar-groups {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.sidebar-group {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-alt);
}

.sidebar-group-toggle {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--ink);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.65rem 0.75rem;
  font-weight: 700;
  border-radius: 14px;
}

.sidebar-group-toggle .chevron {
  transition: transform 150ms ease;
}

.sidebar-group-toggle[aria-expanded="false"] .chevron {
  transform: rotate(-90deg);
}

.sidebar-group-panel {
  display: none;
  padding: 0 0.55rem 0.6rem;
}

.sidebar-group-panel.open {
  display: block;
}

.nav-btn {
  width: 100%;
  text-align: left;
  background: var(--surface-alt);
  color: var(--ink);
  border-color: var(--border);
  font-weight: 600;
  border-radius: 12px;
}

.nav-btn.active {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: #d4d4cf;
}

.sidebar-card,
.panel {
  padding: 1rem;
}

.sidebar-card {
  background: linear-gradient(180deg, #fcfbf8 0%, var(--surface-alt) 100%);
}

.workspace-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-top: 0.85rem;
}

.workspace-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  background: rgba(17, 17, 17, 0.05);
  color: var(--ink);
  font-size: 0.92rem;
}

.workspace-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
}

.content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.content--centered {
  align-items: center;
  justify-content: center;
  min-height: 70vh;
}

.app-shell.is-auth .content--centered {
  align-items: stretch;
  justify-content: flex-start;
  min-height: calc(100vh - 8rem);
}

.auth-screen {
  width: min(1180px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 420px);
  gap: 1.4rem;
  align-items: stretch;
}

.auth-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(26, 26, 26, 0.08);
  border-radius: 28px;
  background:
    radial-gradient(circle at top right, rgba(26, 26, 26, 0.14), transparent 28%),
    linear-gradient(135deg, #111111 0%, #1f1f1f 42%, #2c2d31 100%);
  color: #f7f7f6;
  padding: 2.2rem;
  box-shadow: 0 24px 50px rgba(17, 17, 17, 0.18);
}

.auth-hero::after {
  content: "";
  position: absolute;
  inset: auto -10% -25% auto;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.18), transparent 68%);
  pointer-events: none;
}

.auth-hero .eyebrow {
  color: rgba(255, 255, 255, 0.62);
}

.auth-hero h1 {
  margin: 0;
  max-width: 12ch;
  font-size: clamp(2.2rem, 4vw, 4.2rem);
  line-height: 0.96;
  letter-spacing: -0.05em;
}

.auth-hero-copy {
  max-width: 52ch;
  margin: 1rem 0 0;
  color: rgba(255, 255, 255, 0.74);
  font-size: 1rem;
  line-height: 1.7;
}

.auth-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
  margin-top: 1.6rem;
}

.auth-metrics article {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.07);
  padding: 0.95rem;
  backdrop-filter: blur(10px);
}

.auth-metrics strong {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.auth-metrics span {
  display: block;
  margin-top: 0.45rem;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.92rem;
  line-height: 1.5;
}

.auth-card {
  margin: 0;
  width: 100%;
  align-self: stretch;
  border-radius: 28px;
  box-shadow: 0 20px 40px rgba(17, 17, 17, 0.1);
}

.auth-card .wordmark--center {
  font-size: 1.55rem;
}

.home-panel.active#homeOverviewPanel {
  background: #1b1c1f;
  border: 1px solid #2d3036;
  border-radius: 24px;
  padding: 1rem;
  box-shadow: 0 24px 46px rgba(17, 17, 17, 0.18);
}

.home-panel.active#homeOverviewPanel .kpi-grid {
  margin-top: 0;
}

.home-panel.active#homeOverviewPanel .kpi-card,
.home-panel.active#homeOverviewPanel .dashboard-card,
.home-panel.active#homeOverviewPanel .metric-row,
.home-panel.active#homeOverviewPanel .stage-legend-item,
.home-panel.active#homeOverviewPanel .home-mix-card,
.home-panel.active#homeOverviewPanel .home-funnel-card {
  background: #23262d;
  color: #f4f5f7;
  border-color: #31343c;
  box-shadow: none;
}

.home-panel.active#homeOverviewPanel .kpi-card p,
.home-panel.active#homeOverviewPanel .kpi-sub,
.home-panel.active#homeOverviewPanel .metric-row-head span,
.home-panel.active#homeOverviewPanel .stage-legend-item span,
.home-panel.active#homeOverviewPanel .home-task-row div,
.home-panel.active#homeOverviewPanel .home-activity-row div,
.home-panel.active#homeOverviewPanel .contract-row-detail {
  color: #aeb4bf;
}

.home-panel.active#homeOverviewPanel .kpi-card::after {
  background: linear-gradient(90deg, #f3f3f0 0%, #8d8d86 100%);
  opacity: 0.24;
}

.home-panel.active#homeOverviewPanel .dashboard-grid {
  grid-template-columns: 1.05fr 0.95fr;
}

.home-panel.active#homeOverviewPanel .dashboard-card h3,
.home-panel.active#homeOverviewPanel .home-mix-head h3,
.home-panel.active#homeOverviewPanel .home-funnel-head h3 {
  color: #f7f7f8;
}

.home-panel.active#homeOverviewPanel .empty {
  color: #9ba2ae;
}

.home-mix-card,
.home-funnel-card {
  border: 1px solid #31343c;
  border-radius: 18px;
  padding: 0.9rem;
}

.home-mix-head,
.home-funnel-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

.home-mix-head h3,
.home-funnel-head h3 {
  margin: 0.1rem 0 0;
}

.home-mix-count,
.home-funnel-count {
  border: 1px solid #31343c;
  border-radius: 999px;
  padding: 0.24rem 0.6rem;
  color: #d7dce5;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.home-activity-row,
.home-task-row {
  display: grid;
  gap: 0.3rem;
  border: 1px solid #31343c;
  border-radius: 14px;
  background: #23262d;
  padding: 0.8rem 0.85rem;
}

.home-activity-row {
  position: relative;
}

.home-activity-row > div:first-child,
.home-task-row > div:first-child {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.home-activity-row strong,
.home-task-row strong {
  color: #f7f7f8;
}

.home-activity-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  display: inline-block;
  margin-bottom: 0.45rem;
}

.contract-row {
  border: 1px solid #31343c;
  border-radius: 14px;
  padding: 0.72rem 0.8rem;
  background: #23262d;
}

.contract-row--warning .metric-row-head strong,
.contract-row--overdue .metric-row-head strong {
  color: #ff8e8e;
}

.contract-row--warning .metric-track span {
  background: linear-gradient(90deg, #f0b04d 0%, #f59e0b 100%);
}

.contract-row--overdue .metric-track span {
  background: linear-gradient(90deg, #ff6b6b 0%, #d94a4a 100%);
}

.contract-row--ok .metric-track span {
  background: linear-gradient(90deg, #4dbdb5 0%, #25683a 100%);
}

.view {
  display: none;
}

.view.active {
  display: block;
  width: 100%;
}

.kpi-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.kpi-card {
  border: 1px solid #d9d9d4;
  background: linear-gradient(180deg, #ffffff 0%, #f3f3f0 100%);
  border-radius: 14px;
  padding: 0.85rem 0.9rem;
  box-shadow: 0 6px 16px rgba(17, 17, 17, 0.05);
  position: relative;
  overflow: hidden;
}

.kpi-card p {
  margin: 0;
  color: #555;
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.kpi-card strong {
  display: block;
  margin-top: 0.5rem;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.kpi-sub {
  display: block;
  margin-top: 0.25rem;
  color: #666;
  font-size: 0.76rem;
}

.kpi-card::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, #1d1d1d 0%, #676767 100%);
  opacity: 0.18;
}

.kpi-card--revenue {
  border-color: #bfbfbb;
  background: linear-gradient(180deg, #fbfbfa 0%, #eeeeea 100%);
}

.kpi-card--revenue::after {
  opacity: 0.42;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 0.9rem;
  margin-top: 0.9rem;
}

.dashboard-card {
  border: 1px solid #d8d8d3;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8f8f5 100%);
  padding: 0.9rem;
  box-shadow: 0 8px 20px rgba(17, 17, 17, 0.04);
}

.dashboard-card--funnel {
  grid-column: 1 / -1;
}

.dashboard-card h3 {
  margin-top: 0;
  font-size: 1rem;
  letter-spacing: 0.01em;
}

.panel-head--tight {
  margin-bottom: 0.7rem;
}

.metric-chart {
  display: flex;
  flex-direction: column;
  gap: 0.58rem;
}

.metric-row {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fcfcfb;
  padding: 0.58rem 0.64rem;
}

.metric-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.34rem;
  text-transform: capitalize;
}

.metric-row-head span {
  color: #595959;
  font-size: 0.86rem;
}

.metric-row-head strong {
  font-size: 0.86rem;
}

.metric-track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: #ecece9;
  overflow: hidden;
}

.metric-track span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #1c1c1c 0%, #626262 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.stage-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.pipeline-funnel-chart-wrap {
  max-width: 400px;
  width: 100%;
  margin: 0 auto;
  height: 320px;
}

.pipeline-funnel-chart-wrap canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

.stage-list--compact {
  margin-top: 0.85rem;
}

.stage-pie-wrap {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 0.9rem;
  align-items: center;
}

.stage-pie {
  width: 180px;
  aspect-ratio: 1;
  border-radius: 50%;
  position: relative;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.65), 0 10px 22px rgba(17, 17, 17, 0.08);
}

.stage-pie::after {
  content: "";
  position: absolute;
  inset: 20px;
  border-radius: 50%;
  background: linear-gradient(180deg, #ffffff 0%, #fafaf8 100%);
  border: 1px solid var(--border);
}

.stage-pie-center {
  position: absolute;
  inset: 20px;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.stage-pie-center strong {
  font-size: 1.45rem;
  line-height: 1;
}

.stage-pie-center span {
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stage-legend {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.stage-legend-item {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.5rem 0.55rem;
  border: 1px solid #dfdfdb;
  border-radius: 10px;
  background: #fbfbfa;
}

.stage-legend-swatch {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  margin-top: 0.2rem;
  flex: none;
}

.stage-legend-item strong,
.stage-legend-item span {
  display: block;
}

.stage-legend-item span {
  color: var(--muted);
  font-size: 0.84rem;
  margin-top: 0.14rem;
}

.stage-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.55rem 0.65rem;
  border: 1px solid #dfdfdb;
  border-radius: 10px;
  background: #fbfbfa;
  text-transform: capitalize;
}

.stage-row--chart {
  display: block;
}

.stage-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.35rem;
}

.stage-track {
  width: 100%;
  height: 7px;
  border-radius: 999px;
  background: #ededea;
  overflow: hidden;
}

.stage-track span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #1f1f1f 0%, #666 100%);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.95rem;
}

input,
select,
textarea {
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  padding: 0.72rem 0.82rem;
  background: var(--surface);
}

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

.checkbox {
  flex-direction: row;
  align-items: center;
  gap: 0.4rem;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent);
  font-size: 0.75rem;
  margin: 0 0 0.25rem;
}

.auth-panel {
  width: min(460px, 100%);
  margin: 0 auto;
  padding: 2rem;
}

.auth-brand {
  margin-bottom: 0.5rem;
}

.auth-panel .hint {
  text-align: center;
}

.auth-panel .hint a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

.auth-panel .hint a:visited,
.auth-panel .hint a:hover,
.auth-panel .hint a:active {
  color: var(--ink);
}

.badge,
.chip {
  border-radius: 999px;
  background: var(--surface-alt);
  padding: 0.35rem 0.7rem;
  font-size: 0.9rem;
  color: var(--ink);
}

.chip--accent {
  background: var(--accent-soft);
  color: var(--accent);
}

.checkbox-inline {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.checkbox-inline input {
  width: auto;
}

.chat-toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  width: min(360px, calc(100vw - 2rem));
  pointer-events: none;
}

.chat-toast {
  pointer-events: auto;
  background: var(--ink, #111111);
  color: #ffffff;
  border-radius: var(--radius-card, 14px);
  padding: 0.85rem 1rem;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  border-left: 5px solid #ffffff;
  animation: chat-toast-in 0.2s ease-out;
}

.chat-toast-body {
  flex: 1;
  min-width: 0;
}

.chat-toast-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 0.25rem;
}

.chat-toast-author {
  font-weight: 700;
  font-size: 0.95rem;
  display: block;
  margin-bottom: 0.2rem;
  color: #ffffff;
}

.chat-toast-text {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.9);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.chat-toast-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.3rem;
  line-height: 1;
  color: #ffffff;
  opacity: 0.75;
  padding: 0.1rem 0.2rem;
}

.chat-toast-close:hover {
  opacity: 1;
}

@keyframes chat-toast-in {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.board-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.9rem;
  align-items: start;
  margin-top: 1rem;
}

.column {
  background: linear-gradient(180deg, #fbfcfe 0%, var(--surface-alt) 100%);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 0.8rem;
  min-height: 220px;
}

.column h3 {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-transform: capitalize;
  color: var(--ink);
}

.column-count {
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 700;
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 0.2rem 0.5rem;
}

.column-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.8rem;
  margin-bottom: 0.65rem;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.04);
}

.column-card strong {
  font-size: 0.95rem;
}

.column-card strong {
  display: block;
  margin-bottom: 0.35rem;
}

.column-card:hover {
  border-color: #c7d7ff;
  box-shadow: 0 8px 16px rgba(37, 99, 235, 0.1);
}

.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.mono {
  font-family: "IBM Plex Mono", monospace;
  font-variant-numeric: tabular-nums;
}

.list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

.list-item {
  justify-content: space-between;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 0.8rem 1rem;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.bulk-list-item {
  align-items: flex-start;
  gap: 0.65rem;
}

.bulk-list-select {
  display: inline-flex;
  align-items: flex-start;
  padding-top: 0.18rem;
  flex: 0 0 auto;
}

.bulk-list-body {
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
  min-width: 0;
  flex: 1 1 auto;
}

.task-card-select {
  margin-top: 0.18rem;
}

.task-card .bulk-list-body {
  min-width: 0;
}

.contact-card-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.85rem;
  margin-top: 1rem;
}

.contact-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f7f7f5 100%);
  padding: 0.9rem;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
  position: relative;
  padding-top: 0.95rem;
  padding-right: 2rem;
}

.contact-card:hover .contact-card-delete,
.contact-card:focus-within .contact-card-delete {
  opacity: 1;
  pointer-events: auto;
}

.contact-card-delete {
  position: absolute;
  top: 0.35rem;
  right: 0.4rem;
  border: none;
  background: transparent;
  color: #878783;
  font-size: 1rem;
  line-height: 1;
  width: auto;
  height: auto;
  padding: 0;
  border-radius: 0;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 140ms ease, color 140ms ease;
}

.contact-card-delete:hover,
.contact-card-delete:focus-visible {
  background: transparent;
  color: #202020;
}

.contact-card-open {
  display: grid;
  gap: 0.3rem;
  text-align: left;
  width: 100%;
  border: none;
  background: transparent;
  color: inherit;
  padding: 0;
  cursor: pointer;
}

.contact-card-open strong {
  font-size: 1rem;
}

.contact-card-open span {
  color: var(--muted);
  font-size: 0.88rem;
}

.contact-card-top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.contact-card-bottom {
  display: flex;
  justify-content: flex-end;
}

.contact-select-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.contact-drawer-panel {
  width: min(420px, 100%);
}

.contact-detail-stack,
.contact-detail-actions {
  margin-top: 0.9rem;
}

.contact-detail-notes {
  margin-top: 0.45rem;
  line-height: 1.6;
}

.contact-empty {
  padding: 1rem;
  border: 1px dashed var(--border);
  border-radius: 16px;
}

.drawer {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.18);
  display: none;
  justify-content: flex-end;
  z-index: 20;
}

.drawer.open {
  display: flex;
}

.drawer-panel {
  background: white;
  width: min(480px, 100%);
  height: 100%;
  padding: 1rem;
  overflow: auto;
  box-shadow: var(--shadow);
}

.icon-btn {
  background: transparent;
  border: none;
  color: var(--ink);
  padding: 0.2rem 0.4rem;
}

.hint {
  color: var(--warning);
}

.empty {
  color: var(--muted);
  font-style: italic;
}

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

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

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

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

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

@media (max-width: 640px) {
  .app-shell {
    padding: 0.7rem;
  }

  .topbar,
  .panel,
  .sidebar-card,
  .sidebar-section {
    padding: 0.85rem;
  }

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

  .panel-head,
  .inline-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .task-summary-row {
    grid-template-columns: 1fr;
  }

  .task-detail-grid {
    grid-template-columns: 1fr;
  }
}

/* Workspace restructure pass: darker nav shell + table-first content */
.app-shell {
  background: #ecece8;
}

.layout {
  gap: 0;
  align-items: start;
}

.sidebar {
  background: #131313;
  border: 1px solid #1f1f1f;
  border-radius: 18px 0 0 18px;
  min-height: calc(100vh - 6.4rem);
  max-height: calc(100vh - 6.4rem);
  padding: 0.8rem;
  position: sticky;
  top: 5.8rem;
  overflow-y: hidden;
  overscroll-behavior: contain;
}

.sidebar:hover,
.sidebar:focus-within {
  overflow-y: auto;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.7rem;
  padding: 0.3rem 0.35rem 0.6rem;
  border-bottom: 1px solid #242424;
}

.sidebar-logo {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: #efefec;
  color: #202020;
  display: grid;
  place-items: center;
  font-weight: 800;
}

.sidebar-title {
  margin: 0;
  color: #f6f6f6;
  font-weight: 700;
}

.sidebar-subtitle {
  color: #9b9b9b;
  font-size: 0.78rem;
}

.sidebar-search {
  margin-bottom: 0.8rem;
}

.sidebar-search input {
  width: 100%;
  border-radius: 10px;
  border: 1px solid #2f2f2f;
  background: #1c1c1c;
  color: #f2f2f2;
  padding: 0.56rem 0.62rem;
}

.sidebar-section {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}

.sidebar .eyebrow {
  color: #7b7b7b;
  font-size: 0.66rem;
  margin-bottom: 0.55rem;
}

.nav-btn-home {
  margin-bottom: 0.62rem;
  background: #252525;
  border-color: #343434;
}

.sidebar-group {
  border-color: #252525;
  background: #191919;
}

.sidebar-group-toggle {
  color: #cfcfcf;
}

.nav-btn {
  background: #202020;
  border-color: #2b2b2b;
  color: #d9d9d9;
  font-weight: 500;
  padding: 0.62rem 0.68rem;
}

.nav-btn.active {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: #c7d7ff;
  font-weight: 700;
}

.content {
  background: #f8f8f6;
  border: 1px solid var(--border);
  border-radius: 0 18px 18px 0;
  padding: 0.9rem;
  min-height: calc(100vh - 6.4rem);
}

.panel {
  box-shadow: none;
}

.panel-table {
  padding: 0.9rem;
}

.bulk-bar {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0.55rem 0 0.75rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
}

.table-wrap {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: #ffffff;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.data-table th,
.data-table td {
  border-bottom: 1px solid #efefec;
  padding: 0.62rem 0.58rem;
  text-align: left;
  vertical-align: middle;
}

.data-table th {
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  color: #646464;
  text-transform: uppercase;
  background: #fbfbf9;
}

.th-btn {
  background: none;
  border: none;
  color: inherit;
  font: inherit;
  padding: 0;
  box-shadow: none;
  transform: none;
}

.th-btn:hover {
  box-shadow: none;
  transform: none;
}

.empty-cell {
  text-align: center;
  color: var(--muted);
  font-style: italic;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #e6f3e8;
  color: #245f2f;
  font-size: 0.78rem;
  padding: 0.2rem 0.55rem;
}

.status-pill--muted {
  background: #f1f1ef;
  color: #555;
}

.status-pill--stage {
  background: #ececea;
  color: #252525;
  text-transform: capitalize;
}

.compact-list .list-item {
  border-radius: 12px;
  padding: 0.62rem 0.72rem;
  margin-bottom: 0.45rem;
}

.details-form {
  margin-top: 0.9rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.65rem;
  background: #fff;
}

.details-form summary {
  cursor: pointer;
  font-weight: 700;
}

.details-form[open] summary {
  margin-bottom: 0.55rem;
}

.section-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1rem 0;
}

.team-chat-box {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
  padding: 0.8rem;
}

.chat-list {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fafaf8;
  max-height: 260px;
  overflow: auto;
  padding: 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0.55rem 0 0.65rem;
}

.chat-message {
  width: fit-content;
  max-width: 84%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.45rem 0.55rem;
  background: #ffffff;
}

.chat-message header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  justify-content: space-between;
  font-size: 0.74rem;
  color: var(--muted);
}

.chat-message p {
  margin: 0.3rem 0 0;
  line-height: 1.35;
}

.chat-message.mine {
  align-self: flex-end;
  background: #f1f1ee;
}

.chat-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.55rem;
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.resource-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
  padding: 0.8rem;
}

.resource-card h3 {
  margin-top: 0;
}

.resource-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.resource-preview {
  display: block;
  margin: 0.5rem 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-alt);
  overflow: hidden;
}

.resource-preview-video iframe {
  width: 100%;
  min-height: 190px;
  border: 0;
  display: block;
}

.resource-preview-link {
  text-decoration: none;
  color: var(--ink);
  padding: 0.6rem 0.7rem;
}

.resource-preview-domain {
  display: block;
  font-weight: 700;
}

.resource-preview-path {
  display: block;
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.resource-preview-image img {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  display: block;
}

.resource-preview-missing {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80px;
  background: var(--surface-alt);
}

.resource-preview-missing-text {
  color: var(--muted);
  font-size: 0.85rem;
  font-style: italic;
  padding: 1rem;
}

.resource-preview-file {
  text-decoration: none;
  color: var(--ink);
  padding: 0.6rem 0.7rem;
}

.resource-preview-file strong {
  display: block;
}

.resource-preview-file span {
  color: var(--muted);
  font-size: 0.85rem;
}

.resource-link {
  display: inline-block;
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  padding: 0.52rem 0.7rem;
  color: var(--ink);
  background: var(--surface);
  font-weight: 600;
}

.resource-link:hover {
  background: var(--surface-alt);
}

.dashboard-grid--secondary {
  margin-top: 0.8rem;
}

.home-launcher {
  margin-top: 0.95rem;
  border: 1px solid #d8d8d3;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f6f6f3 100%);
  padding: 0.7rem 0.8rem;
}

.home-launcher .eyebrow {
  margin-bottom: 0.5rem;
}

.home-launcher-buttons {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.home-switch-btn {
  padding: 0.5rem 0.75rem;
  font-size: 0.88rem;
}

.home-switch-btn.active {
  background: #1c1c1c;
  color: #ffffff;
  border-color: #1c1c1c;
}

.home-panel {
  display: none;
}

.home-panel.active {
  display: block;
  margin-top: 0.9rem;
}

.home-task-board {
  background: #1b1c1f;
  color: #ececec;
  border: 1px solid #2d3036;
}

.home-task-board .eyebrow {
  color: #949aa5;
}

.home-task-board h3 {
  margin: 0.2rem 0 0;
  color: #f4f4f4;
}

.home-task-board-columns {
  display: flex;
  gap: 1.5rem;
  margin-top: 0.9rem;
  overflow-x: auto;
  padding-bottom: 0.2rem;
  min-width: 0;
}

.home-task-board-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.8rem;
  align-items: start;
}

.home-task-board-layout.has-detail {
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.7fr);
}

.home-task-board-columns::-webkit-scrollbar {
  height: 10px;
}

.home-task-board-columns::-webkit-scrollbar-track {
  background: transparent;
}

.home-task-board-columns::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.16);
  border-radius: 999px;
}

.home-task-column {
  flex: 0 0 300px;
  min-width: 300px;
  border: 1px solid #31343c;
  border-radius: 16px;
  background: #1f2126;
  padding: 0.85rem;
}

.home-task-column header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.home-task-column h4 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.2;
  color: #f4f5f7;
  font-weight: 700;
}

.home-task-column h4 span {
  font-size: 0.86rem;
  font-weight: 600;
  color: #9aa1ad;
  margin-left: 0.35rem;
}

.home-task-column--custom {
  border-color: rgba(93, 121, 255, 0.35);
}

.home-task-column-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex: 0 0 auto;
}

.home-task-section-rename,
.home-task-section-delete {
  border: 0;
  background: transparent;
  color: #9aa1ad;
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1;
  padding: 0.15rem 0.3rem;
  border-radius: 6px;
}

.home-task-section-rename:hover,
.home-task-section-delete:hover {
  color: #f4f5f7;
  background: rgba(255, 255, 255, 0.08);
}

.home-task-section-delete.confirming {
  color: #ff6b6b;
  background: rgba(255, 107, 107, 0.16);
  font-size: 0.7rem;
  padding: 0.15rem 0.45rem;
}

.home-section-rename-input {
  flex: 1 1 auto;
  min-width: 0;
  background: #14161b;
  border: 1px solid rgba(93, 121, 255, 0.55);
  border-radius: 8px;
  color: #f4f5f7;
  font-size: 1rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
}

.home-inline-form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.home-inline-form input {
  flex: 1 1 auto;
  min-width: 0;
  background: #14161b;
  border: 1px solid #3a3f49;
  border-radius: 8px;
  color: #f4f5f7;
  padding: 0.4rem 0.6rem;
  font-size: 0.85rem;
}

.home-inline-form input:focus {
  outline: none;
  border-color: rgba(93, 121, 255, 0.7);
}

.home-inline-form--task {
  margin-bottom: 0.4rem;
}

.home-inline-form .ghost {
  border: 0;
  background: transparent;
  color: #9aa1ad;
  font-size: 0.8rem;
  padding: 0.2rem 0.4rem;
}

.home-inline-form .ghost:hover {
  color: #d7dce5;
}

.home-task-column-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  min-height: 140px;
  max-height: min(52vh, 560px);
  overflow-y: auto;
  padding-right: 0.18rem;
  border-radius: 12px;
  transition: background-color 0.15s ease;
}

.home-task-column-list.drag-over {
  background: rgba(93, 121, 255, 0.12);
  outline: 1px dashed rgba(93, 121, 255, 0.55);
}

.home-task-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: #252830;
  color: #ececec;
  padding: 1rem;
  text-align: left;
  cursor: pointer;
}

.home-task-card.dragging {
  opacity: 0.45;
}

.home-task-card-top {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
}

.home-task-card strong {
  display: block;
  font-size: 0.92rem;
  line-height: 1.35;
  color: #f7f7f8;
}

.home-task-card-check {
  flex: 0 0 auto;
  width: 1.2rem;
  height: 1.2rem;
  margin-top: 0.1rem;
  border-radius: 50%;
  border: 1px solid #5c6472;
  color: #c8ced8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  line-height: 1;
}

.home-task-card-subtitle {
  display: block;
  margin-top: 0.6rem;
  font-size: 0.78rem;
  line-height: 1.35;
  color: #aeb4bf;
}

.home-task-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1rem;
}

.home-task-card-avatar {
  flex: 0 0 auto;
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 50%;
  background: #3a3f49;
  color: #e9edf5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.home-task-card-due {
  margin-left: auto;
  font-size: 0.74rem;
  color: #9aa1ad;
  text-align: right;
}

.home-task-card:hover,
.home-task-card:focus-visible {
  outline: none;
  border-color: rgba(93, 121, 255, 0.55);
  box-shadow: 0 0 0 1px rgba(93, 121, 255, 0.45);
}

.home-task-add {
  width: fit-content;
  margin-top: 0.35rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: #9ea5b2;
  padding: 0.35rem 0;
  text-align: left;
  font-size: 0.78rem;
}

.home-task-add:hover {
  color: #d7dce5;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.home-task-empty {
  margin: 0;
  color: #9ba2ae;
  font-size: 0.78rem;
}

.home-task-board-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.75rem;
}

.home-task-add-section {
  border: 0;
  background: transparent;
  color: #98a0ad;
  padding: 0;
  font-size: 0.84rem;
}

.home-task-add-section:hover {
  color: #d3d8e2;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.home-task-board-detail {
  position: sticky;
  top: 5.6rem;
  border: 1px solid #31343c;
  border-radius: 14px;
  background: #191b1f;
  color: #ececec;
  padding: 0.85rem;
  min-height: 320px;
  display: none;
}

.home-task-board-detail.open {
  display: block;
}

.home-task-detail-card {
  position: relative;
}

.home-task-detail-collapse {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  width: 1.9rem;
  height: 1.9rem;
  border: 1px solid #515663;
  border-radius: 999px;
  background: #23252b;
  color: #f2f4f8;
  font-size: 1.35rem;
  line-height: 1;
  display: grid;
  place-items: center;
  padding: 0;
}

.home-task-detail-collapse:hover,
.home-task-detail-collapse:focus-visible {
  outline: none;
  border-color: #6f87ff;
  box-shadow: 0 0 0 1px #6f87ff;
}

.home-board-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.task-detail-section {
  margin-top: 0.75rem;
}

.task-detail-section strong {
  display: block;
  margin-bottom: 0.28rem;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #a1a7b3;
}

.home-task-detail-card h4 {
  margin: 0.15rem 0 0;
  font-size: 1.15rem;
}

.home-task-detail-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.75rem;
}

.task-detail-grid--tight {
  gap: 0.55rem;
}

.timeline-shell {
  margin-top: 0.4rem;
}

.timeline-topbar,
.calendar-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.7rem;
}

.timeline-topbar h3,
.calendar-topbar h3 {
  margin: 0.18rem 0 0;
}

.timeline-controls,
.calendar-controls {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.timeline-scroll-modern {
  overflow-x: auto;
  border: 1px solid #d7d7d2;
  border-radius: 12px;
  background: #151515;
  color: #efefef;
}

.timeline-axis-modern,
.timeline-row-modern {
  display: grid;
  grid-template-columns: 170px minmax(calc(var(--timeline-days) * 92px), 1fr);
  min-width: calc(170px + var(--timeline-days) * 92px);
}

.timeline-axis-modern {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #1e1e1e;
  border-bottom: 1px solid #2a2a2a;
}

.timeline-axis-label,
.timeline-lane-title {
  padding: 0.58rem 0.65rem;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: capitalize;
  border-right: 1px solid #2a2a2a;
}

.timeline-axis-label {
  color: #a9a9a9;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.timeline-day {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  border-left: 1px solid #2a2a2a;
  font-size: 0.75rem;
  color: #a0a0a0;
  padding: 0.55rem 0.25rem;
  width: 92px;
}

.timeline-day.today {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  font-weight: 700;
}

.timeline-row-modern {
  border-bottom: 1px solid #252525;
  background: #171717;
}

.timeline-row-modern:last-child {
  border-bottom: none;
}

.timeline-lane-title {
  background: #1d1d1d;
  color: #d6d6d6;
  border-right: 1px solid #2a2a2a;
  display: flex;
  align-items: center;
}

.timeline-track-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--timeline-days), minmax(92px, 1fr));
  grid-auto-rows: 42px;
  min-height: calc(var(--timeline-rows) * 42px);
}

.timeline-day-slot {
  border-left: 1px solid #252525;
  border-top: 1px solid #202020;
}

.timeline-block {
  border: 1px solid #4a4a4a;
  border-radius: 8px;
  background: linear-gradient(180deg, #3a3a3a 0%, #2b2b2b 100%);
  color: #ffffff;
  padding: 0.35rem 0.42rem;
  font-size: 0.72rem;
  line-height: 1.22;
  text-align: left;
  cursor: pointer;
  align-self: center;
  margin: 0 0.15rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.24);
}

.timeline-block strong {
  display: block;
  font-size: 0.73rem;
  font-weight: 700;
}

.timeline-block span {
  display: block;
  margin-top: 0.15rem;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.68rem;
}

.timeline-block.done {
  background: linear-gradient(180deg, #f2f2f0 0%, #ddddda 100%);
  color: #242424;
  border-color: #b4b4af;
  box-shadow: none;
}

.timeline-block.done span {
  color: #666666;
}

.calendar-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.55fr);
  gap: 0.85rem;
  align-items: start;
}

.calendar-grid-shell {
  border: 1px solid #d8d8d3;
  border-radius: 12px;
  background: #ffffff;
  overflow: hidden;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-weekday {
  padding: 0.55rem 0.4rem;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #666;
  background: #f4f4f1;
  border-bottom: 1px solid #e4e4df;
  text-align: center;
}

.calendar-day {
  border: none;
  border-right: 1px solid #ecece8;
  border-bottom: 1px solid #ecece8;
  background: #ffffff;
  min-height: 106px;
  padding: 0.42rem;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
  text-align: left;
}

.calendar-day:hover {
  background: #f8f8f6;
  box-shadow: inset 0 0 0 1px #d3d3ce;
}

.calendar-day.outside {
  background: #fafaf8;
}

.calendar-day.today {
  box-shadow: inset 0 0 0 1px #1f1f1f;
}

.calendar-day.selected {
  background: #efefec;
  box-shadow: inset 0 0 0 2px #1f1f1f;
}

.calendar-day-number {
  font-weight: 700;
  font-size: 0.83rem;
}

.calendar-day-items {
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
}

.calendar-pill {
  border-radius: 8px;
  padding: 0.16rem 0.35rem;
  font-size: 0.69rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 1px solid #c9c9c4;
}

.calendar-pill.task {
  background: #2f2f2f;
  color: #ffffff;
  border-color: #2f2f2f;
}

.calendar-pill.custom {
  background: #ececea;
  color: #2c2c2c;
}

.calendar-day-items em {
  color: #5f5f5f;
  font-size: 0.68rem;
  font-style: normal;
}

.calendar-sidecard {
  border: 1px solid #d8d8d3;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f7f7f4 100%);
  padding: 0.75rem;
}

.calendar-sidecard h4 {
  margin: 0;
}

.calendar-selected-items {
  margin-top: 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.calendar-item {
  border: 1px solid #d8d8d3;
  border-radius: 10px;
  background: #fbfbf9;
  padding: 0.5rem 0.56rem;
}

.calendar-item strong {
  display: block;
  font-size: 0.84rem;
}

.calendar-item span {
  display: block;
  margin-top: 0.2rem;
  color: #666;
  font-size: 0.74rem;
}

.calendar-add-form {
  margin-top: 0.7rem;
}

@media (max-width: 900px) {
  .layout {
    gap: 0.7rem;
  }

  .sidebar,
  .content {
    border-radius: 16px;
    min-height: 0;
    position: static;
  }

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

  .timeline-axis-modern,
  .timeline-row-modern {
    grid-template-columns: 130px minmax(calc(var(--timeline-days) * 82px), 1fr);
    min-width: calc(130px + var(--timeline-days) * 82px);
  }

  .timeline-track-grid {
    grid-template-columns: repeat(var(--timeline-days), minmax(82px, 1fr));
  }

  .calendar-layout {
    grid-template-columns: 1fr;
  }

  .home-task-board-columns {
    gap: 1rem;
  }

  .home-task-board-layout {
    grid-template-columns: 1fr;
  }

  .home-task-board-detail {
    position: static;
  }

  .home-task-board-layout.has-detail {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .home-task-board-columns {
    gap: 0.85rem;
  }

  .home-task-column {
    flex-basis: 280px;
    min-width: 280px;
  }
}

/* Deals list redesign (Asana-style list layout) */
.deals-list-panel {
  padding: 0.85rem 0.95rem;
}

.deals-list-head {
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
}

.deals-list-controls {
  gap: 0.55rem;
}

.deals-list-controls select,
.deals-list-controls input {
  min-height: 2rem;
}

.deals-bulk-bar {
  margin-top: 0.55rem;
  margin-bottom: 0.7rem;
  padding: 0.45rem 0.55rem;
  border-radius: 10px;
  border-color: #dfdfda;
  background: #fafaf8;
  transition: background-color 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

.deals-bulk-bar strong {
  font-size: 0.82rem;
  color: #666b74;
}

.deals-bulk-bar.bulk-bar--active {
  background: #eef3ff;
  border-color: #c8d7ff;
  box-shadow: inset 0 0 0 1px rgba(92, 124, 250, 0.2);
}

.deals-bulk-bar.bulk-bar--active strong {
  color: #34467f;
}

.deals-table-wrap {
  border: none;
  border-radius: 0;
  background: transparent;
}

.deals-data-table {
  background: transparent;
  border-collapse: separate;
  border-spacing: 0;
}

.deals-data-table thead th {
  text-transform: none;
  letter-spacing: 0.01em;
  color: #6f7480;
  font-size: 0.76rem;
  font-weight: 600;
  background: transparent;
  border-bottom: 1px solid #e6e6e0;
  padding: 0.5rem 0.62rem 0.52rem;
}

.deals-data-table thead th:first-child {
  width: 2.35rem;
}

.deals-data-table tbody td {
  border-bottom: 1px solid #efefea;
  padding: 0.82rem 0.62rem;
  vertical-align: middle;
}

.deals-data-table .deal-row {
  background: transparent;
}

.deals-data-table .deal-row:hover td {
  background: #f6f7fb;
}

.deals-data-table .deal-row--selected td {
  background: #eef3ff;
}

.deal-spread-cell {
  text-align: right;
}

.status-pill--stage-new_lead {
  background: #e9eefb;
  color: #3b4f8f;
}

.status-pill--stage-contacted {
  background: #e7f0ff;
  color: #2e5f9f;
}

.status-pill--stage-appointment {
  background: #ecebff;
  color: #51429d;
}

.status-pill--stage-offer_made {
  background: #ede8ff;
  color: #5842a8;
}

.status-pill--stage-under_contract {
  background: #fff2d9;
  color: #8a5a00;
}

.status-pill--stage-assigned {
  background: #eceef3;
  color: #4d5565;
}

.status-pill--stage-closed {
  background: #e6f5ea;
  color: #25683a;
}

.status-pill--stage-dead {
  background: #fde8e8;
  color: #8d2c2c;
}

.deal-group-row td {
  background: #f9f9f7;
  border-bottom: 1px solid #e7e7e1;
  padding: 0;
}

.deal-group-label {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #4a4f58;
  padding: 0.56rem 0.62rem;
  font-size: 0.78rem;
  font-weight: 650;
}

.deal-group-count {
  margin-left: auto;
  color: #8c919b;
  font-weight: 600;
}

.sms-panel {
  padding: 0.9rem;
}

.sms-blast-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 0.9rem;
}

.sms-compose-panel,
.sms-history-panel,
.sms-thread-panel,
.sms-thread-list-wrap {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
  padding: 0.75rem;
}

.sms-compose-head,
.sms-history-head {
  margin-bottom: 0.6rem;
}

.sms-recipient-filters {
  flex-wrap: wrap;
  margin-bottom: 0.6rem;
}

.sms-recipient-list {
  border: 1px solid #e3e3de;
  border-radius: 10px;
  max-height: 260px;
  overflow: auto;
  background: #fcfcfa;
  margin-bottom: 0.7rem;
}

.sms-recipient-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  padding: 0.45rem 0.55rem;
  border-bottom: 1px solid #efefe9;
}

.sms-recipient-row:last-child {
  border-bottom: none;
}

.sms-recipient-main {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sms-blast-contact-row {
  align-items: flex-start;
  position: relative;
  padding-top: 0.7rem;
  padding-right: 2rem;
}

.sms-blast-contact-main {
  align-items: flex-start;
}

.sms-blast-contact-main input[type="checkbox"] {
  margin-top: 0.18rem;
}

.sms-blast-contact-copy {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  align-items: flex-start;
}

.sms-blast-contact-delete {
  position: absolute;
  top: 0.35rem;
  right: 0.4rem;
  border: none;
  background: transparent;
  color: #878783;
  font-size: 1rem;
  line-height: 1;
  width: auto;
  height: auto;
  padding: 0;
  border-radius: 0;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 140ms ease, color 140ms ease;
}

.sms-blast-contact-row:hover .sms-blast-contact-delete,
.sms-blast-contact-row:focus-within .sms-blast-contact-delete {
  opacity: 1;
  pointer-events: auto;
}

.sms-blast-contact-delete:hover,
.sms-blast-contact-delete:focus-visible {
  background: transparent;
  color: #202020;
}

.disposition-buyer-row {
  align-items: flex-start;
  position: relative;
  padding-top: 0.7rem;
  padding-right: 2rem;
}

.disposition-buyer-copy {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  align-items: flex-start;
}

.disposition-buyer-main {
  align-items: flex-start;
}

.disposition-buyer-main input[type="checkbox"] {
  margin-top: 0.18rem;
}

.disposition-buyer-open {
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.disposition-buyer-open:hover,
.disposition-buyer-open:focus-visible {
  text-decoration: underline;
}

.disposition-buyer-delete {
  position: absolute;
  top: 0.35rem;
  right: 0.4rem;
  border: none;
  background: transparent;
  color: #878783;
  font-size: 1rem;
  line-height: 1;
  width: auto;
  height: auto;
  padding: 0;
  border-radius: 0;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 140ms ease, color 140ms ease, background-color 140ms ease;
}

.disposition-buyer-row:hover .disposition-buyer-delete,
.disposition-buyer-row:focus-within .disposition-buyer-delete {
  opacity: 1;
  pointer-events: auto;
}

.disposition-buyer-delete:hover,
.disposition-buyer-delete:focus-visible {
  background: transparent;
  color: #202020;
}

.sms-recipient-name {
  font-weight: 600;
}

.sms-recipient-meta {
  color: #777;
  font-size: 0.8rem;
}

.sms-compose-meta {
  justify-content: space-between;
  margin-top: 0.5rem;
  margin-bottom: 0.7rem;
}

.sms-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.48rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.sms-status-pill--sent,
.sms-status-pill--stub_sent,
.sms-status-pill--delivered,
.sms-status-pill--received {
  background: #e7f5ea;
  color: #1f6a38;
}

.sms-status-pill--queued,
.sms-status-pill--draft {
  background: #e9eef9;
  color: #35538b;
}

.sms-status-pill--failed {
  background: #fde9e8;
  color: #8f2e2c;
}

.sms-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: grid;
  place-items: center;
  z-index: 80;
}

.sms-modal[hidden] {
  display: none;
}

.sms-modal-card {
  width: min(92vw, 420px);
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem;
  box-shadow: 0 18px 36px rgba(16, 16, 16, 0.2);
}

.sms-modal-card h3 {
  margin: 0 0 0.45rem;
}

.sms-modal-card p {
  margin: 0 0 0.85rem;
  color: #535353;
}

.sms-inbox-layout {
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  gap: 0.9rem;
}

.sms-thread-list-wrap {
  background: #181818;
  border-color: #2a2a2a;
  color: #f4f4f4;
}

.sms-thread-list-wrap input {
  width: 100%;
  border-radius: 10px;
  border: 1px solid #353535;
  background: #1f1f1f;
  color: #f2f2f2;
  padding: 0.52rem 0.58rem;
  margin-bottom: 0.65rem;
}

.sms-thread-list {
  max-height: 68vh;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.sms-thread-row {
  border: 1px solid #2c2c2c;
  border-radius: 10px;
  background: #222;
  color: #e5e5e5;
  padding: 0.55rem 0.6rem;
  text-align: left;
}

.sms-thread-row.active {
  border-color: #5f8bd9;
  background: #253750;
}

.sms-thread-row strong {
  display: block;
}

.sms-thread-row .sms-thread-phone {
  font-size: 0.76rem;
  color: #a9a9a9;
}

.sms-thread-row .sms-thread-preview {
  margin-top: 0.36rem;
  font-size: 0.8rem;
  color: #cfcfcf;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sms-thread-row .sms-thread-time {
  margin-top: 0.24rem;
  font-size: 0.73rem;
  color: #9a9a9a;
}

.sms-thread-panel {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  min-height: 68vh;
}

.sms-thread-header h3 {
  margin: 0;
}

.sms-thread-messages {
  flex: 1;
  border: 1px solid #e5e5df;
  border-radius: 10px;
  background: #f8f8f5;
  padding: 0.7rem;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.sms-bubble {
  max-width: min(78%, 580px);
  padding: 0.52rem 0.6rem;
  border-radius: 12px;
  border: 1px solid #ddddda;
  background: #ffffff;
}

.sms-bubble--outbound {
  margin-left: auto;
  border-color: #c6d8f9;
  background: #eaf1ff;
}

.sms-bubble--inbound {
  margin-right: auto;
  border-color: #dfdfda;
  background: #ffffff;
}

.sms-bubble p {
  margin: 0;
  white-space: pre-wrap;
}

.sms-bubble-meta {
  margin-top: 0.3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.74rem;
  color: #717171;
}

.sms-reply-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.55rem;
}

.sms-reply-form textarea {
  min-height: 88px;
}

@media (max-width: 900px) {
  .deals-list-head {
    align-items: stretch;
  }

  .deals-list-controls {
    width: 100%;
  }

  .sms-blast-layout,
  .sms-inbox-layout {
    grid-template-columns: 1fr;
  }

  .sms-thread-list {
    max-height: 260px;
  }

  .sms-thread-panel {
    min-height: 0;
  }

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

@media (max-width: 640px) {
  .deals-list-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .deals-bulk-bar {
    flex-wrap: wrap;
  }
}
