/* 9AM responsive shell. */
.nav-toggle {
  display: none;
}

.nav-scrim {
  display: none;
}

@media (max-width: 820px) {

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

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 60;
  width: 264px;
  max-width: 82vw;
  height: 100dvh;
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-4);
  overflow-y: auto;
  overflow-x: hidden;
  padding: var(--space-4) var(--space-3) calc(var(--space-4) + env(safe-area-inset-bottom));
  background: var(--surface-2);
  box-shadow: var(--shadow-overlay);
  transform: translateX(-100%);
  transition: transform 260ms var(--ease);
  -webkit-overflow-scrolling: touch;
}

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

.sidebar-brand {
  padding: var(--space-1) var(--space-2) var(--space-1);
}

.sidebar-nav {
  flex-direction: column;
  flex: 0 1 auto;
}

.sidebar .nav-item {
  min-height: 44px;
}

.nav-scrim {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 55;
  background: var(--scrim);
  opacity: 0;
  visibility: hidden;
  transition: opacity 260ms var(--ease), visibility 260ms var(--ease);
}

body.nav-open .nav-scrim {
  opacity: 1;
  visibility: visible;
}

body.nav-open {
  overflow: hidden;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-panel);
  background: none;
  color: var(--ink);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.nav-toggle:active {
  background: var(--accent-soft);
}

.topbar {
  flex-wrap: nowrap;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
}

.topbar-titles {
  flex: 1 1 auto;
  min-width: 0;
}

.topbar-title {
  font-size: 20px;
  overflow: hidden;
  text-overflow: clip;
  white-space: nowrap;
}

.topbar-search {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  max-width: none;
  padding: 0;
  justify-content: center;
}

.topbar-search span {
  display: none;
}

.workspace-badge {
  display: none;
}

.content {
  padding: var(--space-4) var(--space-4) calc(var(--space-6) + env(safe-area-inset-bottom));
}

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-left: 0;
  padding-right: 0;
}

.sheet-table {
  overflow: visible;
  border-radius: 0;
}

.sheet-table thead th:nth-child(1),
.sheet-table .select-cell {
  position: sticky;
  left: 0;
  z-index: 3;
}

.sheet-table thead th:nth-child(2),
.sheet-table .item-cell {
  position: sticky;
  left: 40px;
  z-index: 3;
}

.sheet-table thead th:nth-child(1),
.sheet-table thead th:nth-child(2) {
  z-index: 4;
  background: var(--surface-2);
}

.sheet-table .select-cell,
.sheet-table .item-cell {
  background: var(--surface);
}

.sheet-table thead th:nth-child(2),
.sheet-table .item-cell {
  box-shadow: var(--shadow-sticky);
}

.sheet-row:hover .select-cell,
.sheet-row:hover .item-cell {
  background: var(--surface-hover);
}

.sheet-row.is-selected .select-cell,
.sheet-row.is-selected .item-cell {
  background: var(--accent-soft);
}

input,
select,
textarea,
.search-input {
  font-size: var(--text-lg);
}

.select-cell input {
  width: 18px;
  height: 18px;
}

.sheet-row > td {
  height: 52px;
}

.drawer-panel {
  width: 100%;
  border-radius: 0;
  padding-bottom: env(safe-area-inset-bottom);
}

}

@media (max-width: 600px) {

.board-toolbar {
  flex-wrap: wrap;
}

.topbar-title {
  font-size: 18px;
}

}
