:root {
  color-scheme: light;
  --bg: #fbfbfa;
  --panel: #f7f7f5;
  --surface: #ffffff;
  --surface-muted: #f5f5f3;
  --line: #e4e4e0;
  --line-strong: #d6d6d1;
  --text: #171717;
  --muted: #6c6c67;
  --subtle: #8f8f89;
  --blue: #2563eb;
  --green: #16a34a;
  --orange: #f97316;
  --red: #ef4444;
  --purple: #7c3aed;
  --radius: 6px;
  --sidebar: 244px;
  --detail: 360px;
}

* {
  box-sizing: border-box;
}

html,
body,
#app {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "PingFang SC",
    "Hiragino Sans GB",
    "Microsoft YaHei",
    sans-serif;
  font-size: 14px;
  line-height: 1.45;
}

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

button {
  cursor: pointer;
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow: hidden;
  border-right: 1px solid var(--line);
  background: var(--panel);
  padding: 16px 12px;
}

.workspace-switcher,
.user-row,
.nav-item,
.project-nav-row,
.subnav-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.workspace-switcher {
  min-height: 34px;
  padding: 0 4px;
  font-weight: 600;
}

.workspace-logo,
.avatar,
.project-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: #111;
  font-size: 11px;
  font-weight: 700;
}

.workspace-logo {
  background: #111;
  color: #fff;
}

.project-icon {
  color: #111;
}

.project-icon.camera::before {
  content: "CAM";
}

.project-icon.strawberry::before {
  content: "XHS";
}

.project-icon.globe::before {
  content: "SEO";
}

.project-icon.image::before {
  content: "IMG";
}

.project-icon::before {
  content: none !important;
}

.project-icon img {
  width: 100%;
  height: 100%;
  display: block;
  grid-area: 1 / 1;
  border-radius: inherit;
  object-fit: cover;
  opacity: 0;
}

.project-icon.has-image {
  padding: 0;
  overflow: hidden;
}

.project-icon.has-image.image-loaded img {
  opacity: 1;
}

.project-initials {
  grid-area: 1 / 1;
  font-size: 11px;
  font-weight: 700;
}

.project-icon.has-image.image-loaded .project-initials {
  display: none;
}

.kbd {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 21px;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 12px;
}

.nav-section,
.project-section {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item,
.project-nav-row,
.subnav-row {
  min-height: 34px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: #252522;
  padding: 0 10px;
  text-align: left;
  text-decoration: none;
}

.nav-item:hover,
.project-nav-row:hover,
.subnav-row:hover,
.nav-item.active,
.project-nav-row.active,
.subnav-row.active {
  background: #ececea;
}

.nav-item .label,
.project-nav-row .label,
.subnav-row .label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-mark,
.mini-mark {
  display: grid;
  place-items: center;
  width: 18px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.count,
.meta-small {
  color: var(--muted);
  font-size: 12px;
}

.section-label {
  margin: 8px 10px 6px;
  color: var(--muted);
  font-size: 12px;
}

.subnav {
  margin-left: 32px;
  padding-left: 9px;
  border-left: 1px solid var(--line);
}

.subnav-row {
  min-height: 28px;
  padding: 0 8px;
  color: #30302d;
  font-size: 13px;
}

.sidebar-footer {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.nav-item.secondary {
  width: 100%;
  margin-bottom: 8px;
}

.user-row {
  min-height: 34px;
  padding: 0 8px;
}

.avatar {
  border-radius: 50%;
  background: #e8e8e4;
  color: #30302d;
}

.main {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--detail);
  min-height: 100vh;
}

.main.no-detail {
  grid-template-columns: minmax(0, 1fr);
}

.content {
  min-width: 0;
  padding: 28px 30px 40px;
}

.detail-panel {
  border-left: 1px solid var(--line);
  background: var(--bg);
  padding: 28px 26px 36px;
  overflow: auto;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.crumb {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 12px;
}

h1 {
  margin: 0;
  font-size: 27px;
  line-height: 1.15;
  font-weight: 650;
  letter-spacing: 0;
}

h2 {
  margin: 0 0 14px;
  font-size: 18px;
  line-height: 1.25;
  font-weight: 630;
  letter-spacing: 0;
}

h3 {
  margin: 0;
  font-size: 14px;
  line-height: 1.3;
  font-weight: 620;
}

.subtitle {
  margin-top: 8px;
  color: var(--muted);
}

.toolbar,
.filters,
.tabs,
.meta-row,
.button-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.toolbar {
  justify-content: flex-end;
}

.filters {
  min-height: 49px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 22px;
}

.tabs {
  gap: 28px;
  border-bottom: 1px solid var(--line);
  margin: 24px 0;
}

.view-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin: 22px 0;
}

.view-toolbar .filters {
  min-height: 46px;
  border: 0;
  margin: 0;
}

.tab {
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #3a3a36;
  padding: 0 0 12px;
}

.tab.active {
  border-bottom-color: #111;
  color: #111;
}

.btn,
.chip,
.select {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: #22221f;
  padding: 0 11px;
  text-decoration: none;
}

.btn:hover,
.chip:hover,
.select:hover {
  border-color: var(--line-strong);
  background: #f8f8f6;
}

.chip.active {
  border-color: var(--line-strong);
  background: #ececea;
  color: #111;
}

.btn.primary {
  border-color: #111;
  background: #111;
  color: #fff;
}

.btn.ghost {
  background: transparent;
}

.btn.small,
.chip.small {
  min-height: 26px;
  padding: 0 8px;
  font-size: 12px;
}

.table,
.group {
  border-top: 1px solid var(--line);
}

.table-row,
.table-head,
.property-row,
.source-row,
.activity-row,
.action-row {
  display: grid;
  align-items: center;
  min-height: 48px;
  border-bottom: 1px solid var(--line);
  column-gap: 14px;
}

.table-head {
  min-height: 38px;
  color: var(--muted);
  font-size: 12px;
}

.table-row {
  cursor: pointer;
}

.table-row:hover,
.table-row.selected {
  background: #f4f4f2;
}

.projects-table .table-head,
.projects-table .table-row {
  grid-template-columns: minmax(170px, 1.3fr) 72px minmax(140px, 1fr) minmax(160px, 1.05fr) 116px 76px 88px;
}

.workstreams-table .table-head,
.workstreams-table .table-row {
  grid-template-columns: minmax(150px, 1.2fr) 102px 120px minmax(130px, 1fr) minmax(130px, 1fr) 70px;
}

.items-table .table-head,
.items-table .table-row {
  grid-template-columns: 74px 68px minmax(180px, 1.4fr) 140px 116px 76px 112px 118px;
}

.recent-table .table-head,
.recent-table .table-row {
  grid-template-columns: 78px minmax(160px, 1.2fr) 120px 112px 78px 70px;
}

.source-table .table-head,
.source-table .table-row {
  grid-template-columns: minmax(190px, 1.2fr) 80px minmax(170px, 1fr) minmax(160px, 1fr);
}

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

.cell-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}

.muted {
  color: var(--muted);
}

.subtle {
  color: var(--subtle);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--subtle);
}

.status-dot.On-track,
.status-dot.Active,
.status-dot.Context-ready,
.status-dot.Yes {
  background: var(--green);
}

.status-dot.At-risk,
.status-dot.In-review {
  background: var(--orange);
}

.status-dot.Watching,
.status-dot.In-progress {
  background: var(--blue);
}

.status-dot.Needs-source,
.status-dot.Waiting,
.status-dot.Todo {
  background: #a8a8a2;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  width: fit-content;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8f8f6;
  color: #30302d;
  padding: 0 8px;
  font-size: 12px;
  white-space: nowrap;
}

.pill.green {
  border-color: #c9e8d4;
  background: #f1fbf4;
  color: #15803d;
}

.pill.orange {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #ea580c;
}

.pill.blue {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #2563eb;
}

.pill.purple {
  border-color: #ddd6fe;
  background: #f5f3ff;
  color: #6d28d9;
}

.pill.red {
  border-color: #fecaca;
  background: #fef2f2;
  color: #dc2626;
}

.progress {
  width: 84px;
  height: 4px;
  border-radius: 999px;
  background: #e8e8e4;
  overflow: hidden;
}

.progress span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--green);
}

.progress.risk span {
  background: var(--orange);
}

.section-block {
  margin-top: 28px;
}

.today-grid {
  display: grid;
  gap: 22px;
}

.today-page-header {
  align-items: center;
  margin-bottom: 18px;
}

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

.today-metric-card {
  min-width: 0;
  min-height: 86px;
  display: flex;
  align-items: center;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 16px 18px;
  text-align: left;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.04);
}

button.today-metric-card:hover {
  border-color: var(--line-strong);
  background: #f8f8f6;
}

.today-metric-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #f3f4f6;
  color: #334155;
  font-size: 12px;
  font-weight: 750;
}

.today-metric-card.blue .today-metric-icon {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: var(--blue);
}

.today-metric-card.orange .today-metric-icon {
  border-color: #fed7aa;
  background: #fff7ed;
  color: var(--orange);
}

.today-metric-card.purple .today-metric-icon {
  border-color: #ddd6fe;
  background: #f5f3ff;
  color: var(--purple);
}

.today-metric-card.green .today-metric-icon {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: var(--green);
}

.today-metric-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.today-metric-copy span {
  color: #4b5563;
  font-size: 13px;
}

.today-metric-copy strong {
  color: #111827;
  font-size: 25px;
  line-height: 1;
}

.today-workbench {
  display: grid;
  grid-template-columns: minmax(520px, 1.15fr) minmax(420px, 0.9fr);
  gap: 18px;
  align-items: start;
}

.today-side-column {
  display: grid;
  gap: 14px;
}

.today-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.05);
}

.today-panel-header,
.recent-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.today-panel-header {
  min-height: 58px;
  border-bottom: 1px solid var(--line);
  padding: 14px 18px;
}

.today-panel-title,
.today-section-title {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.today-panel-title h2,
.today-section-title h3,
.recent-panel-header h3 {
  margin: 0;
}

.today-panel-title .muted {
  font-size: 13px;
}

.today-panel-mark,
.today-section-mark {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 750;
}

.today-panel-mark {
  width: 25px;
  height: 25px;
}

.today-section-mark {
  width: 22px;
  height: 22px;
}

.today-panel-mark.blue,
.today-section-mark.blue {
  background: #eff6ff;
  color: var(--blue);
}

.today-section-mark.orange {
  background: #fff7ed;
  color: var(--orange);
}

.today-section-mark.purple {
  background: #f5f3ff;
  color: var(--purple);
}

.muted-mark {
  border: 1px solid var(--line);
  color: var(--muted);
}

.today-focus-section {
  padding: 16px 18px 18px;
}

.today-focus-section + .today-focus-section {
  border-top: 1px solid var(--line);
}

.today-section-heading,
.today-section-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.today-section-heading {
  margin-bottom: 13px;
}

.count-badge {
  display: grid;
  place-items: center;
  min-width: 29px;
  height: 29px;
  border-radius: 999px;
  background: #f1f1ef;
  color: #171717;
  font-size: 12px;
  font-weight: 650;
}

.more-button {
  min-width: 28px;
  min-height: 28px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  padding: 0 6px;
}

.more-button:hover {
  background: #f1f1ef;
  color: #111;
}

.today-action-list,
.today-waiting-list {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.today-action-row,
.today-waiting-row {
  display: grid;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  border-bottom: 1px solid var(--line);
  padding: 0 14px;
}

.today-action-row:last-child,
.today-waiting-row:last-child {
  border-bottom: 0;
}

.today-action-row {
  grid-template-columns: 24px minmax(160px, 1.3fr) minmax(130px, 0.8fr) 68px 104px 26px;
}

.today-waiting-row {
  grid-template-columns: 76px minmax(150px, 1.15fr) minmax(130px, 0.8fr) 104px 70px;
  cursor: pointer;
}

.today-waiting-row:not([data-route]) {
  cursor: default;
}

.today-action-row:hover,
.today-waiting-row:hover {
  background: #fbfbfa;
}

.today-index {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 1px solid var(--orange);
  border-radius: 50%;
  color: var(--orange);
  font-size: 12px;
  font-weight: 700;
}

.today-action-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #161616;
  font-weight: 560;
}

.today-project-chip {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.today-project-chip > span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-icon.mini-project-icon {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  font-size: 10px;
}

.project-icon.mini-project-icon .project-initials {
  font-size: 10px;
}

.today-time,
.today-waiting-status {
  color: #4b5563;
  font-size: 13px;
}

.today-link-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  border: 0;
  background: transparent;
  color: var(--blue);
  padding: 0;
  margin-top: 14px;
  font-weight: 560;
}

.today-link-button.compact {
  min-height: 24px;
  margin-top: 0;
  font-size: 13px;
}

.capture-box {
  padding: 16px;
}

.capture-box textarea {
  width: 100%;
  min-height: 112px;
  resize: none;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #fcfcfb;
  color: #2d2d2a;
  outline: 0;
  padding: 14px 16px;
}

.capture-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.capture-actions .btn.primary {
  margin-left: auto;
}

.capture-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  color: #334155;
}

.capture-select,
.capture-tool {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #334155;
  padding: 0 8px;
}

.capture-select select {
  max-width: 180px;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #334155;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.capture-select {
  border: 1px solid transparent;
}

.capture-select:hover,
.capture-tool:hover {
  background: #f4f4f2;
}

.capture-tool.active {
  background: #eff6ff;
  color: var(--blue);
}

.capture-actions .btn:disabled {
  cursor: wait;
  opacity: 0.72;
}

.capture-notice {
  min-height: 28px;
  display: flex;
  align-items: center;
  border-top: 1px solid var(--line);
  margin-top: 12px;
  padding-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.tool-mark {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
}

.recent-capture-panel {
  padding: 16px;
}

.recent-panel-header {
  margin-bottom: 12px;
}

.recent-record-list {
  min-width: 0;
  display: grid;
  gap: 10px;
}

.recent-record-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 13px 14px;
}

.recent-record-title {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  min-width: 0;
}

.record-dot {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--subtle);
}

.record-dot.green {
  background: var(--green);
}

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

.record-dot.blue {
  background: var(--blue);
}

.record-dot.purple {
  background: var(--purple);
}

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

.record-dot.gray {
  background: #8f8f89;
}

.record-dot.yellow {
  background: #f59e0b;
}

.recent-record-title strong {
  flex: 1 1 auto;
  min-width: 0;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-height: 1.35;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.recent-record-body {
  position: relative;
  max-width: 100%;
  max-height: 5.8em;
  overflow: hidden;
  margin: 8px 0 0;
  color: #4b5563;
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.recent-record-card.has-overflow .recent-record-body::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 2.2em;
  background: linear-gradient(rgba(255, 255, 255, 0), #fff 82%);
  pointer-events: none;
}

.recent-record-meta,
.recent-record-actions {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.recent-record-meta > * {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.recent-record-meta {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}

.recent-record-actions {
  justify-content: flex-end;
  margin-top: 8px;
}

.recent-record-actions button {
  min-height: 24px;
  border: 0;
  background: transparent;
  color: #64748b;
  padding: 0 4px;
  font-size: 12px;
}

.recent-record-actions button:hover {
  color: var(--blue);
}

.recent-record-actions button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.inbox-page-header {
  align-items: flex-start;
}

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

.inbox-metric-card {
  min-width: 0;
  min-height: 86px;
  display: flex;
  align-items: center;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 16px 18px;
  text-align: left;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.04);
}

.inbox-metric-card:hover {
  border-color: var(--line-strong);
  background: #f8f8f6;
}

.inbox-metric-card.yellow .today-metric-icon {
  border-color: #fde68a;
  background: #fffbeb;
  color: #f59e0b;
}

.inbox-page-panel {
  padding: 16px;
}

.inbox-control-row {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(190px, 220px) minmax(190px, 220px);
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}

.inbox-search,
.inbox-select-control {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 9px;
  min-width: 0;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 0 12px;
}

.inbox-search span,
.inbox-select-control span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.inbox-search input,
.inbox-select-control select {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #1f2937;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inbox-filter-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

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

.inbox-list-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px 16px;
}

.inbox-list-main {
  min-width: 0;
}

.inbox-record-body-wrap {
  position: relative;
  margin-top: 8px;
}

.inbox-record-body {
  margin: 8px 0 0;
  color: #4b5563;
  line-height: 1.5;
  white-space: pre-wrap;
}

.inbox-record-body-wrap.has-more:not(.expanded) .inbox-record-body {
  max-height: 6em;
  overflow: hidden;
}

.inbox-record-body-wrap.has-more:not(.expanded)::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 28px;
  height: 2.6em;
  background: linear-gradient(rgba(255, 255, 255, 0), #fff 86%);
  pointer-events: none;
}

.show-more-button {
  position: relative;
  z-index: 1;
  min-height: 24px;
  border: 0;
  background: transparent;
  color: var(--blue);
  padding: 0;
  margin-top: 5px;
  font-size: 13px;
  font-weight: 560;
}

.show-more-button:hover {
  color: #1d4ed8;
}

.inline-link {
  border: 0;
  background: transparent;
  color: var(--blue);
  padding: 0;
}

.inbox-modal-source {
  border-bottom: 1px solid var(--line);
  padding: 14px 16px;
}

.inbox-modal-source strong {
  display: block;
  margin-top: 5px;
}

.inbox-modal-source p {
  margin: 8px 0 0;
  color: #4b5563;
  white-space: pre-wrap;
}

.compact-table .table-row,
.compact-table .table-head {
  min-height: 42px;
}

.compact-table.recent-table .table-head,
.compact-table.recent-table .table-row {
  grid-template-columns: minmax(190px, 1.5fr) minmax(120px, 0.9fr) 104px 76px;
}

.compact-table.recent-table .table-head:has(:nth-child(5)),
.compact-table.recent-table .table-row:has(:nth-child(5)) {
  grid-template-columns: 86px minmax(180px, 1.4fr) minmax(120px, 0.9fr) 104px 74px;
}

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

.quick-view-card {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-height: 78px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  padding: 12px;
  text-align: left;
}

.quick-view-card:hover {
  border-color: var(--line-strong);
  background: #f8f8f6;
}

.quick-view-card span {
  color: var(--muted);
  font-size: 12px;
}

.settings-page-header {
  margin-bottom: 18px;
}

.settings-notice {
  display: flex;
  align-items: center;
  min-height: 42px;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  background: #f0fdf4;
  color: #166534;
  padding: 0 14px;
  margin-bottom: 16px;
}

.settings-notice.error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #b91c1c;
}

.settings-panel {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.05);
  padding: 26px 28px;
}

.settings-panel + .settings-panel {
  margin-top: 20px;
}

.settings-panel-head {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 20px;
}

.settings-panel-head h2 {
  margin: 0;
}

.settings-panel-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.settings-panel-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f5f5f3;
  color: #171717;
  font-size: 12px;
  font-weight: 700;
}

.settings-field-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px 20px;
}

.settings-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.settings-field span {
  color: #171717;
  font-size: 13px;
  font-weight: 520;
}

.settings-field input,
.settings-field select,
.settings-category-editor input,
.settings-readonly input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 0 14px;
  outline: 0;
}

.settings-field input:disabled,
.settings-field select:disabled,
.settings-category-chip button:disabled,
.settings-category-editor .btn:disabled {
  opacity: 0.68;
  cursor: wait;
}

.settings-category-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.settings-category-chip,
.settings-category-add {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  border-radius: 999px;
  background: #fff;
  color: #1f2937;
  padding: 0 16px;
}

.settings-category-chip {
  border: 1px solid var(--line);
}

.settings-category-chip button {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0;
  font-size: 18px;
  line-height: 1;
}

.settings-category-add {
  border: 1px dashed var(--line-strong);
  background: #fbfbfa;
}

.settings-category-editor {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.settings-category-editor input {
  width: 220px;
}

.settings-data-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(180px, 0.5fr) minmax(180px, 0.5fr);
  gap: 18px 20px;
  align-items: end;
}

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

.settings-readonly {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.settings-readonly span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.settings-action-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.settings-action-group span {
  color: #171717;
  font-size: 13px;
  font-weight: 520;
}

.settings-link-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  margin-top: 18px;
  padding-top: 18px;
}

.settings-doc-content {
  padding: 18px 20px 22px;
}

.settings-doc-content p {
  margin: 0;
  color: #343431;
  line-height: 1.6;
}

.settings-doc-content p + p {
  margin-top: 12px;
}

.today-entry-grid {
  margin-bottom: 24px;
}

.inbox-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.inbox-stat {
  display: grid;
  align-content: center;
  gap: 6px;
  min-height: 74px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  padding: 12px;
  text-align: left;
}

.inbox-stat:hover,
.inbox-stat.active {
  border-color: var(--line-strong);
  background: #f8f8f6;
}

.inbox-stat span {
  color: var(--muted);
  font-size: 12px;
}

.inbox-stat strong {
  font-size: 24px;
  line-height: 1;
}

.inbox-table .table-head,
.inbox-table .table-row {
  grid-template-columns: 112px minmax(190px, 1.4fr) minmax(120px, 0.9fr) minmax(118px, 0.85fr) 112px 78px 104px;
}

.table-row:not([data-route]):not([data-select-item]) {
  cursor: default;
}

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

.next-strip {
  display: grid;
  grid-template-columns: 146px minmax(0, 1fr) 120px 120px;
  align-items: center;
  min-height: 49px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 0 14px;
  column-gap: 16px;
}

.right-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
}

.side-section {
  margin-top: 28px;
}

.side-list {
  border-top: 1px solid var(--line);
}

.property-row {
  grid-template-columns: minmax(110px, 1fr) minmax(0, 1.15fr);
  min-height: 41px;
}

.property-row > :first-child {
  color: var(--muted);
}

.property-row > :last-child {
  text-align: right;
}

.action-row {
  grid-template-columns: 14px minmax(0, 1fr) 62px;
  min-height: 58px;
}

.group-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 24px 0 8px;
  font-size: 16px;
  font-weight: 620;
}

.issue-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 28px;
}

.issue-title {
  margin: 14px 0 14px;
  font-size: 22px;
  font-weight: 650;
}

.detail-meta-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
  margin-bottom: 20px;
}

.detail-meta-grid .label {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 5px;
}

.body-section {
  border-bottom: 1px solid var(--line);
  padding: 15px 0;
}

.body-section p {
  max-width: 760px;
  margin: 8px 0 0;
  color: #343431;
}

.check-row,
.bullet-row {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 28px;
}

.checkbox {
  width: 14px;
  height: 14px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--surface);
}

.source-row {
  grid-template-columns: minmax(0, 1fr) 72px;
  min-height: 38px;
}

.activity-row {
  grid-template-columns: 34px minmax(0, 1fr);
  min-height: 42px;
}

.comment-box {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 0 12px;
  color: var(--muted);
}

.handoff-preview {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

.handoff-line {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
  font-size: 12px;
}

.handoff-line:last-child {
  border-bottom: 0;
}

.handoff-line span:first-child {
  color: var(--muted);
}

.drawer {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 10;
  width: min(520px, calc(100vw - 40px));
  max-height: min(680px, calc(100vh - 40px));
  display: none;
  flex-direction: column;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
}

.drawer.open {
  display: flex;
}

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

.drawer textarea {
  min-height: 340px;
  resize: none;
  border: 0;
  outline: 0;
  padding: 16px;
  color: #20201d;
  background: var(--surface);
}

.empty {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 32px 0;
  color: var(--muted);
}

.empty.compact {
  border: 0;
  padding: 14px 0;
  font-size: 13px;
}

.board-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.board-column {
  min-width: 0;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.board-card,
.calendar-item {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  padding: 12px;
  text-align: left;
}

.board-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 8px;
}

.board-card:hover,
.board-card.selected,
.calendar-item:hover {
  border-color: var(--line-strong);
  background: #f7f7f5;
}

.board-card-title {
  font-weight: 560;
}

.timeline-list {
  border-top: 1px solid var(--line);
  margin-top: 22px;
}

.timeline-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 18px;
  min-height: 68px;
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
  cursor: pointer;
}

.timeline-row:hover {
  background: #f7f7f5;
}

.timeline-date {
  color: var(--muted);
  font-size: 13px;
}

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

.calendar-day {
  min-width: 0;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.calendar-item {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-bottom: 8px;
}

.calendar-page {
  min-width: 0;
}

.calendar-page-header {
  align-items: center;
  margin-bottom: 16px;
}

.calendar-title-row {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.calendar-view-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f2f2ef;
  padding: 3px;
}

.calendar-view-switch.compact {
  min-height: 32px;
  margin-left: auto;
}

.calendar-view-tab {
  min-height: 28px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #4b4b46;
  padding: 0 12px;
}

.calendar-view-tab.active {
  background: var(--surface);
  color: var(--blue);
  box-shadow: 0 0 0 1px #dbe7ff;
}

.calendar-import-note {
  border: 1px solid #bfdbfe;
  border-radius: var(--radius);
  background: #eff6ff;
  color: #1d4ed8;
  padding: 10px 12px;
  margin-bottom: 12px;
  font-size: 13px;
}

.calendar-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.calendar-select {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  flex: 1 1 150px;
  max-width: 230px;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 0 10px;
  color: #30302d;
}

.calendar-select span {
  color: #30302d;
  font-weight: 520;
}

.calendar-select select {
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  outline: none;
}

.calendar-filter-button {
  flex: 0 0 auto;
  min-height: 36px;
}

.calendar-stats-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  margin-bottom: 18px;
  overflow: hidden;
}

.calendar-stat {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 70px;
  padding: 10px 18px;
}

.calendar-stat:not(:last-child) {
  border-right: 1px solid var(--line);
}

.calendar-stat-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #f4f4f2;
  border: 1px solid var(--line);
}

.calendar-stat-icon.blue {
  border-color: #bfdbfe;
  background: #eff6ff;
}

.calendar-stat-icon.green {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.calendar-stat-icon.orange {
  border-color: #fed7aa;
  background: #fff7ed;
}

.calendar-stat-icon.purple {
  border-color: #ddd6fe;
  background: #f5f3ff;
}

.calendar-stat-icon.red {
  border-color: #fecaca;
  background: #fef2f2;
}

.calendar-stat-label {
  color: #343431;
  font-size: 13px;
}

.calendar-stat-value {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 2px;
  font-size: 25px;
  line-height: 1;
  font-weight: 650;
}

.calendar-stat-value span {
  color: var(--blue);
  font-size: 12px;
  font-weight: 560;
}

.calendar-shell {
  min-width: 0;
  overflow-x: auto;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.week-calendar {
  min-width: 1060px;
  display: grid;
  grid-template-columns: 58px repeat(7, minmax(132px, 1fr));
  background: var(--surface);
}

.week-time-cell,
.week-day-header,
.week-slot {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.week-time-cell {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  color: var(--muted);
  font-size: 12px;
  padding-top: 10px;
}

.week-corner {
  min-height: 40px;
  padding: 0;
}

.week-day-header {
  min-height: 40px;
  display: grid;
  place-items: center;
  color: #454541;
  font-weight: 560;
}

.week-day-header.active {
  color: var(--blue);
  box-shadow: inset 0 -2px 0 var(--blue);
}

.week-slot {
  min-height: 112px;
  padding: 8px;
  background: #fff;
}

.week-slot.active-day {
  background: #fcfdff;
}

.calendar-event {
  width: 100%;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text);
  padding: 8px;
  text-align: left;
}

.calendar-event + .calendar-event {
  margin-top: 6px;
}

.calendar-event:hover,
.calendar-event.selected {
  border-color: var(--line);
  background: #f8f8f6;
}

.calendar-event.selected {
  box-shadow: inset 2px 0 0 var(--blue);
}

.calendar-event-top {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
}

.calendar-event-title {
  margin-top: 5px;
  color: #242421;
  font-weight: 560;
  line-height: 1.35;
}

.calendar-event-tags {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 7px;
}

.calendar-event-time {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.platform-badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #f8f8f6;
  color: #30302d;
  padding: 0 6px;
  font-size: 12px;
  font-weight: 620;
  white-space: nowrap;
}

.platform-badge.red {
  border-color: #fecaca;
  background: #fff1f2;
  color: #e11d48;
}

.platform-badge.green {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #16a34a;
}

.platform-badge.blue {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #2563eb;
}

.platform-badge.black {
  border-color: #d4d4d4;
  background: #171717;
  color: #fff;
}

.platform-badge.orange {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #ea580c;
}

.platform-badge.purple {
  border-color: #ddd6fe;
  background: #f5f3ff;
  color: #6d28d9;
}

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

.calendar-board-column {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 12px;
}

.calendar-list-table,
.review-table {
  overflow-x: auto;
  border-top: 1px solid var(--line);
}

.calendar-list-head,
.calendar-list-row {
  display: grid;
  grid-template-columns: 122px minmax(220px, 1.2fr) 112px 112px 96px minmax(180px, 1fr);
  align-items: center;
  gap: 14px;
  min-width: 900px;
  min-height: 46px;
  border-bottom: 1px solid var(--line);
}

.calendar-list-head {
  color: var(--muted);
  font-size: 12px;
}

.calendar-list-row {
  width: 100%;
  border-top: 0;
  border-right: 0;
  border-left: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.calendar-list-row:hover,
.calendar-list-row.selected {
  background: #f4f4f2;
}

.calendar-review {
  margin-top: 18px;
}

.review-head,
.review-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) 80px minmax(180px, 1fr) minmax(190px, 1fr) minmax(132px, 0.8fr);
  align-items: center;
  gap: 14px;
  min-width: 920px;
  min-height: 48px;
  border-bottom: 1px solid var(--line);
}

.review-head {
  color: var(--muted);
  font-size: 12px;
}

.review-metric {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 64px;
  align-items: end;
  gap: 10px;
}

.mini-spark {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 24px;
}

.mini-spark span {
  width: 5px;
  border-radius: 2px 2px 0 0;
  background: #60a5fa;
}

.calendar-review-link {
  margin-top: 10px;
  color: var(--blue);
}

.calendar-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
}

.calendar-detail-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  margin-bottom: 10px;
}

.calendar-detail-title {
  margin-bottom: 20px;
  font-size: 20px;
  line-height: 1.3;
}

.calendar-detail-list .property-row {
  grid-template-columns: 110px minmax(0, 1fr);
}

.calendar-detail-list .property-row > :last-child {
  text-align: left;
}

.calendar-assist-list {
  display: grid;
  gap: 9px;
  margin-top: 12px;
}

.calendar-assist-button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: #30302d;
  padding: 0 12px;
  text-align: left;
}

.calendar-assist-button:hover {
  border-color: var(--line-strong);
  background: #f8f8f6;
}

.calendar-assist-note {
  border: 1px solid #ddd6fe;
  border-radius: var(--radius);
  background: #f5f3ff;
  color: #6d28d9;
  padding: 10px 12px;
  margin-top: 12px;
  font-size: 13px;
}

.calendar-detail-foot {
  margin-top: 28px;
  font-size: 12px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  background: rgba(20, 20, 18, 0.18);
}

.modal {
  width: min(560px, calc(100vw - 36px));
  max-height: calc(100vh - 36px);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  overflow: auto;
}

.calendar-modal {
  width: min(760px, calc(100vw - 36px));
}

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

.modal-error {
  border-bottom: 1px solid #fecaca;
  background: #fef2f2;
  color: #b91c1c;
  padding: 10px 16px;
  font-size: 13px;
}

.form-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.form-grid .form-check {
  flex-direction: row;
  align-items: center;
  min-height: 34px;
  color: var(--text);
}

.form-check input {
  width: 14px;
  height: 14px;
  margin: 0;
}

.form-grid input,
.form-grid select,
.form-grid textarea {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  padding: 7px 9px;
}

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

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

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding: 12px 16px;
}

@media (max-width: 1220px) {
  .today-metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .inbox-overview-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

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

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

@media (max-width: 1320px) {
  :root {
    --detail: 318px;
    --sidebar: 218px;
  }

  .projects-table .table-head,
  .projects-table .table-row {
    grid-template-columns: minmax(152px, 1.1fr) 58px minmax(128px, 1fr) minmax(132px, 1fr) 86px;
  }

  .projects-table .table-head > :nth-child(5),
  .projects-table .table-head > :nth-child(6),
  .projects-table .table-row > :nth-child(5),
  .projects-table .table-row > :nth-child(6) {
    display: none;
  }

  .items-table .table-head,
  .items-table .table-row {
    grid-template-columns: 70px minmax(170px, 1.4fr) 124px 110px 70px;
  }

  .items-table .table-head > :nth-child(2),
  .items-table .table-head > :nth-child(7),
  .items-table .table-head > :nth-child(8),
  .items-table .table-row > :nth-child(2),
  .items-table .table-row > :nth-child(7),
  .items-table .table-row > :nth-child(8) {
    display: none;
  }

  .workstreams-table .table-head,
  .workstreams-table .table-row {
    grid-template-columns: minmax(132px, 1.05fr) 94px 112px minmax(124px, 1fr) minmax(124px, 1fr);
  }

  .workstreams-table .table-head > :nth-child(6),
  .workstreams-table .table-row > :nth-child(6) {
    display: none;
  }

  .inbox-table .table-head,
  .inbox-table .table-row {
    grid-template-columns: 104px minmax(170px, 1.3fr) minmax(116px, 0.8fr) 104px 74px;
  }

  .inbox-table .table-head > :nth-child(4),
  .inbox-table .table-head > :nth-child(7),
  .inbox-table .table-row > :nth-child(4),
  .inbox-table .table-row > :nth-child(7) {
    display: none;
  }
}

@media (max-width: 860px) {
  :root {
    --sidebar: 188px;
  }

  .shell {
    grid-template-columns: var(--sidebar) minmax(0, 1fr);
  }

  .sidebar {
    position: sticky;
    height: 100vh;
    border-right: 1px solid var(--line);
    border-bottom: 0;
    padding-inline: 10px;
  }

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

  .detail-panel {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .content {
    padding: 22px 16px 32px;
  }

  .project-nav-row,
  .nav-item {
    padding-inline: 8px;
  }

  .subnav {
    margin-left: 20px;
  }

  .meta-small,
  .count {
    display: none;
  }

  .page-header {
    flex-direction: column;
  }

  .view-toolbar {
    align-items: stretch;
    flex-direction: column;
    padding: 8px 0;
  }

  .view-toolbar .calendar-view-switch {
    margin-left: 0;
  }

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

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

  .settings-panel {
    padding: 20px 18px;
  }

  .settings-panel-head {
    gap: 14px;
  }

  .settings-field-grid,
  .settings-data-grid {
    grid-template-columns: 1fr;
  }

  .inbox-overview-grid,
  .inbox-control-row,
  .inbox-list-card {
    grid-template-columns: 1fr;
  }

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

  .calendar-page-header {
    align-items: stretch;
  }

  .calendar-title-row {
    align-items: flex-start;
    gap: 12px;
  }

  .calendar-view-switch {
    width: 100%;
    overflow-x: auto;
  }

  .calendar-view-tab {
    flex: 0 0 auto;
  }

  .calendar-select,
  .calendar-filter-button {
    flex-basis: 100%;
    max-width: none;
  }

  .calendar-stats-row {
    grid-template-columns: repeat(5, 156px);
    overflow-x: auto;
  }

  .calendar-stat {
    padding-inline: 12px;
  }

  .today-action-row {
    grid-template-columns: 24px minmax(180px, 1fr) 68px 104px 26px;
  }

  .today-action-row .today-project-chip {
    display: none;
  }

  .today-waiting-row {
    grid-template-columns: 76px minmax(180px, 1fr) 104px 70px;
  }

  .today-waiting-row .today-project-chip {
    display: none;
  }

  .detail-meta-grid,
  .next-strip {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 12px;
  }

  .table {
    overflow-x: auto;
  }

  .table-head,
  .table-row {
    min-width: 780px;
  }

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

@media (max-width: 700px) {
  .shell {
    display: block;
  }

  .sidebar {
    position: relative;
    height: auto;
    gap: 10px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 12px;
  }

  .workspace-switcher {
    min-height: 30px;
  }

  .nav-section {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .project-section,
  .sidebar-footer {
    display: none;
  }

  .nav-item {
    justify-content: center;
    min-height: 36px;
  }

  .nav-mark {
    display: none;
  }

  .content {
    padding: 18px 14px 28px;
  }

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

  .inbox-overview-grid {
    grid-template-columns: 1fr;
  }

  .today-panel-header,
  .recent-panel-header,
  .capture-actions {
    align-items: stretch;
  }

  .capture-actions .btn.primary {
    width: 100%;
    justify-content: center;
    margin-left: 0;
  }
}
