:root {
  --bg: #f6f4ef;
  --panel: #fffdf8;
  --panel-2: #f0f6f4;
  --ink: #24221f;
  --muted: #706c64;
  --line: #ddd7cc;
  --accent: #0f766e;
  --accent-dark: #0b5f59;
  --blue: #2f5f98;
  --gold: #ad6a00;
  --red: #a43f3f;
  --green: #407a4a;
  --shadow: 0 18px 50px rgba(44, 38, 30, 0.12);
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
}

body.auth-locked {
  overflow: hidden;
}

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

button {
  cursor: pointer;
}

.auth-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  place-items: center;
  padding: 24px;
  background: var(--bg);
}

body.auth-locked .auth-screen {
  display: grid;
}

body.auth-locked .app-shell {
  display: none;
}

.auth-card {
  width: min(100%, 380px);
  display: grid;
  gap: 12px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.auth-card h1 {
  font-size: 24px;
}

.auth-card p {
  color: var(--muted);
  margin-bottom: 8px;
}

.auth-card label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.auth-card input[type="password"] {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 12px;
  background: #fff;
  color: var(--ink);
}

.auth-mark {
  color: #f8f3ea;
}

.remember-row {
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: none;
}

.remember-row input {
  accent-color: var(--accent);
}

.auth-error {
  min-height: 18px;
  color: var(--red);
  font-size: 13px;
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 22px 16px;
  background: #202623;
  color: #f8f3ea;
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: #0f766e;
  border-radius: var(--radius);
  font-weight: 800;
  font-size: 13px;
}

.brand-title {
  font-weight: 800;
  line-height: 1.2;
}

.brand-subtitle {
  color: #c9d2cb;
  font-size: 13px;
}

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

.nav-item {
  min-height: 38px;
  width: 100%;
  padding: 9px 11px;
  border: 1px solid transparent;
  background: transparent;
  color: #e6eee9;
  text-align: left;
  border-radius: var(--radius);
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.nav-item.active {
  background: #f8f3ea;
  color: var(--ink);
}

.nav-section-label {
  margin-top: 10px;
  padding: 6px 11px 2px;
  color: #9fb1a8;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.nav-item.secondary {
  min-height: 32px;
  padding: 7px 11px;
  color: #c9d2cb;
  font-size: 13px;
}

.sidebar-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #c9d2cb;
  font-size: 13px;
}

.sync-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #d99b24;
}

.sync-dot.connected {
  background: #52a164;
}

.main-panel {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 88px;
  padding: 22px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(246, 244, 239, 0.92);
  backdrop-filter: blur(10px);
}

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

h1 {
  font-size: 25px;
  line-height: 1.2;
}

.topbar p {
  margin-top: 6px;
  color: var(--muted);
}

.top-actions,
.modal-action-group,
.view-actions,
.row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

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

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

.primary-button,
.secondary-button,
.icon-button {
  min-height: 36px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 140ms ease, color 140ms ease, border-color 140ms ease;
}

.primary-button {
  padding: 0 13px;
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}

.primary-button:hover {
  background: var(--accent-dark);
}

.secondary-button {
  padding: 0 12px;
  background: var(--panel);
  color: var(--ink);
}

.secondary-button:hover,
.icon-button:hover {
  border-color: #bfb8ab;
  background: #f0ebe1;
}

.icon-button {
  width: 36px;
  padding: 0;
  background: var(--panel);
  color: var(--ink);
}

.icon-button.ghost {
  border-color: transparent;
  background: transparent;
}

svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

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

.stat-card,
.panel,
.mini-panel,
.settings-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.stat-card {
  padding: 15px;
}

.stat-value {
  font-size: 30px;
  font-weight: 800;
  line-height: 1;
}

.stat-label {
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
}

.section-stack {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.panel {
  overflow: hidden;
}

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

.panel-header h2,
.mini-panel h3 {
  font-size: 15px;
}

.panel-header p {
  color: var(--muted);
  font-size: 13px;
  margin-top: 3px;
}

.panel-body {
  padding: 14px 16px 16px;
}

.mini-panel {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.mini-panel h3 {
  padding: 14px 14px 10px;
  border-bottom: 1px solid var(--line);
}

.workflow-grid,
.client-sheet-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.workflow-card,
.client-sheet-card,
.client-sheet-block {
  background: #fff;
  border: 1px solid #e7e0d4;
  border-radius: var(--radius);
}

.workflow-card {
  padding: 14px;
}

.workflow-card h3,
.client-sheet-block h3 {
  font-size: 15px;
}

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

.stage-list,
.stage-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.stage-list {
  margin-top: 12px;
}

.stage-strip {
  overflow-x: auto;
  flex-wrap: nowrap;
  padding: 12px 0 4px;
  max-width: 100%;
  min-width: 0;
}

.stage-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 8px;
  border: 1px solid #dfd7ca;
  border-radius: 999px;
  background: #faf7ef;
  color: #5b554c;
  font-size: 12px;
  white-space: nowrap;
}

.stage-chip.current {
  border-color: var(--accent);
  background: #e0f1ee;
  color: var(--accent-dark);
  font-weight: 800;
}

.workflow-notes {
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

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

.entity-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.entity-tab {
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--muted);
  font-weight: 750;
  white-space: nowrap;
}

.entity-tab.active {
  border-color: var(--accent);
  background: #e0f1ee;
  color: var(--accent-dark);
}

.client-sheet-card {
  padding: 16px;
  min-width: 0;
}

.client-sheet-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.client-sheet-header .view-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.client-sheet-header h2 {
  margin-bottom: 8px;
  font-size: 20px;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.status-tile {
  min-height: 70px;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbf8f0;
}

.status-tile span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.status-tile strong {
  font-size: 14px;
  line-height: 1.25;
}

.client-sheet-block {
  min-height: 180px;
  overflow: hidden;
  min-width: 0;
}

.client-sheet-block[data-drop-status] {
  outline: 1px dashed transparent;
  outline-offset: -4px;
}

.client-sheet-block[data-drop-status].drag-over {
  outline-color: var(--accent);
  background: #f0f6f4;
}

.client-sheet-block h3 {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  background: #fbf8f0;
}

.purchase-board-panel {
  margin: 14px 0;
  border: 1px solid #e7e0d4;
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
}

.purchase-board-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  background: #fbf8f0;
}

.purchase-board-header h3 {
  font-size: 15px;
}

.purchase-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 7px;
}

.purchase-summary span {
  padding: 4px 7px;
  border-radius: 999px;
  background: #ebe5d9;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.purchase-board-scroll {
  overflow-x: auto;
  padding: 10px;
}

.purchase-board {
  display: grid;
  grid-template-columns: repeat(5, minmax(190px, 1fr));
  gap: 8px;
  min-width: 1010px;
}

.purchase-column {
  min-height: 220px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  overflow: hidden;
}

.purchase-column.drag-over {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.purchase-column-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 42px;
  padding: 10px;
  border-bottom: 1px solid var(--line);
  background: #fbf8f0;
}

.purchase-column-header strong {
  font-size: 12px;
  line-height: 1.25;
}

.purchase-column-header span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.purchase-column-cards {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 8px;
}

.purchase-card {
  position: relative;
  border: 1px solid #e7e0d4;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 5px 18px rgba(38, 33, 27, 0.06);
}

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

.purchase-card-main {
  width: 100%;
  display: grid;
  gap: 5px;
  padding: 9px 34px 9px 9px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.purchase-card-delete {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 1;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
}

.purchase-card-delete:hover {
  border-color: #ead2cf;
  background: #fff1ef;
  color: var(--red);
}

.purchase-card-delete svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.purchase-card-main strong {
  font-size: 13px;
  line-height: 1.25;
}

.purchase-card-main span,
.purchase-card-main p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.purchase-card-main p {
  margin: 0;
}

.purchase-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.purchase-card-meta span {
  padding: 3px 6px;
  border-radius: 999px;
  background: #ebe5d9;
  color: #4f4941;
}

.compact-list {
  display: grid;
  gap: 7px;
  padding: 10px;
}

.compact-row {
  width: 100%;
  display: grid;
  gap: 4px;
  padding: 9px;
  border: 1px solid #e7e0d4;
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.compact-row:hover {
  background: #faf6ed;
}

.compact-row-main {
  width: 100%;
  display: grid;
  gap: 4px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.compact-row-main strong {
  font-size: 13px;
  line-height: 1.25;
}

.compact-row-main span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.compact-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 5px;
}

.tiny-button {
  min-height: 26px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbf8f0;
  color: var(--ink);
  font-size: 12px;
  font-weight: 750;
}

.tiny-button:hover {
  border-color: var(--accent);
  background: #e0f1ee;
  color: var(--accent-dark);
}

.empty-state.compact {
  padding: 10px;
  font-size: 13px;
}

.mini-list {
  display: grid;
  gap: 8px;
  padding: 12px;
  max-height: 430px;
  overflow: auto;
}

.mini-item {
  width: 100%;
  border: 1px solid #e7e0d4;
  background: #fff;
  border-radius: var(--radius);
  padding: 10px;
  color: var(--ink);
  text-align: left;
}

.mini-title {
  font-weight: 750;
  line-height: 1.25;
}

.mini-meta {
  margin-top: 7px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.empty-state {
  color: var(--muted);
  padding: 14px;
  font-size: 14px;
}

.table-wrap {
  overflow-x: auto;
}

.record-table {
  width: 100%;
  min-width: 880px;
  border-collapse: collapse;
}

.record-table th,
.record-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 14px;
}

.record-table th {
  position: static;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  background: #fbf8f0;
}

.record-table thead th {
  border-bottom: 1px solid var(--line);
}

.record-table tbody tr:first-child td {
  border-top: 0;
}

.record-table tbody tr:hover {
  background: #faf6ed;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  min-height: 22px;
  max-width: 100%;
  padding: 3px 8px;
  border-radius: 999px;
  background: #ece7dc;
  color: #4c463d;
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.badge.doing,
.badge.active,
.badge.approved {
  background: #e0f1e5;
  color: var(--green);
}

.badge.waiting,
.badge.blocked,
.badge.needed {
  background: #fff1cf;
  color: var(--gold);
}

.badge.risk,
.badge.overdue,
.badge.rejected {
  background: #f9dfdc;
  color: var(--red);
}

.badge.client {
  background: #e1ebf7;
  color: var(--blue);
}

.board-shell {
  display: grid;
  gap: 12px;
}

.board-header {
  position: sticky;
  top: 0;
  z-index: 6;
  padding-bottom: 8px;
  background: var(--panel);
  box-shadow: 0 8px 16px rgba(44, 38, 30, 0.06);
}

.board-header,
.board-row {
  display: grid;
  grid-template-columns: 160px repeat(7, minmax(185px, 1fr));
  gap: 8px;
  min-width: 1505px;
}

.board-scroll {
  max-height: calc(100vh - 220px);
  overflow: auto;
  padding-bottom: 10px;
  overscroll-behavior: contain;
}

.board-header > div:first-child {
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--panel);
}

.board-cell,
.board-label,
.board-status {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.board-status {
  min-height: 42px;
  padding: 11px 12px;
  font-size: 13px;
  font-weight: 800;
  color: var(--muted);
}

.board-label {
  min-height: 116px;
  padding: 12px;
  background: #fbf8f0;
}

.board-label strong {
  display: block;
  margin-bottom: 6px;
}

.board-label span {
  display: block;
  color: var(--muted);
  line-height: 1.35;
}

.board-cell {
  min-height: 116px;
  padding: 8px;
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 8px;
}

.board-cell.drag-over {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.task-card {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e7e0d4;
  border-radius: var(--radius);
  padding: 9px;
  box-shadow: 0 5px 18px rgba(38, 33, 27, 0.06);
}

.task-card.process-step-card {
  padding: 8px 9px;
  background: #fbf8f0;
  box-shadow: none;
}

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

.task-card-title {
  font-size: 13px;
  font-weight: 800;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.process-step-card .task-card-title {
  font-size: 12px;
  font-weight: 750;
}

.task-card-meta {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.task-card-meta .badge {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.prototype-item-card {
  width: 100%;
  display: grid;
  gap: 7px;
  padding: 11px;
  border: 1px solid #e7e0d4;
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.prototype-item-card:hover {
  background: #faf6ed;
}

.prototype-item-card strong {
  font-size: 14px;
  line-height: 1.25;
}

.prototype-item-card > span {
  color: var(--muted);
  font-size: 12px;
}

.checklist {
  display: grid;
  gap: 9px;
}

.checkline {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: var(--muted);
  font-size: 14px;
}

.checkline input {
  margin-top: 3px;
  accent-color: var(--accent);
}

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

.settings-panel {
  padding: 16px;
}

.settings-panel h2 {
  font-size: 16px;
  margin-bottom: 12px;
}

.settings-note {
  color: var(--muted);
  font-size: 12px;
  margin-top: 8px;
  overflow-wrap: anywhere;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: 8px 10px;
}

.field textarea {
  min-height: 90px;
  resize: vertical;
}

.field.checkbox-field {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-height: 38px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.field.checkbox-field input[type="checkbox"] {
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 0;
  padding: 0;
  border: 1px solid #8f897e;
  border-radius: 4px;
  accent-color: var(--accent);
}

.field.checkbox-field label {
  text-transform: none;
  font-size: 14px;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.2;
}

.field.context-muted {
  opacity: 0.58;
}

.field.context-muted input,
.field.context-muted label {
  cursor: not-allowed;
}

.modal {
  width: min(860px, calc(100vw - 28px));
  max-height: calc(100vh - 40px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0;
  background: var(--panel);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.modal::backdrop {
  background: rgba(25, 24, 22, 0.34);
}

.modal-backdrop.hidden,
.hidden {
  display: none;
}

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

.modal-header h2 {
  font-size: 18px;
}

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

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

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

.modal-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 18px 18px;
  border-top: 1px solid var(--line);
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  display: none;
  max-width: 360px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: #202623;
  color: #fff;
  box-shadow: var(--shadow);
  font-size: 14px;
}

.toast.show {
  display: block;
}

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

  .sidebar {
    position: static;
    height: auto;
    gap: 14px;
  }

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

  .nav-section-label {
    grid-column: 1 / -1;
    text-align: center;
  }

  .nav-item {
    text-align: center;
  }

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

  .client-sheet-header {
    flex-direction: column;
  }

  .client-sheet-header .view-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .grid-4,
  .grid-2,
  .workflow-grid,
  .client-sheet-columns,
  .status-grid,
  .prototype-item-grid,
  .settings-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .field.full {
    grid-column: auto;
  }
}

@media (max-width: 560px) {
  .content,
  .topbar {
    padding-left: 16px;
    padding-right: 16px;
  }

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

  .top-actions {
    width: 100%;
    justify-content: space-between;
  }
}
