:root {
  color-scheme: light;
  --canvas: #f5f7fa;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --ink: #17202c;
  --muted: #667085;
  --quiet: #8b95a7;
  --line: #dce3ee;
  --line-strong: #b8c2d1;
  --blue: #2459e6;
  --blue-dark: #1d4ed8;
  --blue-soft: #eef4ff;
  --green: #0f9f6e;
  --green-soft: #ecfdf3;
  --amber: #b66a16;
  --amber-soft: #fff6e5;
  --red: #b42318;
  --red-soft: #fef3f2;
  --shadow: 0 18px 45px rgba(31, 42, 55, 0.08);
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--canvas);
  color: var(--ink);
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

a {
  color: inherit;
}

svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

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

.sidebar {
  position: sticky;
  top: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 22px;
  height: 100vh;
  border-right: 1px solid var(--line);
  background: #ffffff;
  padding: 22px 16px;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.product-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  background: var(--blue);
  color: #ffffff;
  font-size: 18px;
  font-weight: 850;
  box-shadow: 0 12px 24px rgba(36, 89, 230, 0.22);
}

.brand-block h1 {
  margin: 0;
  color: var(--ink);
  font-size: 19px;
  line-height: 1.1;
  letter-spacing: 0;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 780;
  letter-spacing: 0;
  text-transform: uppercase;
}

.side-nav {
  display: grid;
  align-content: start;
  gap: 6px;
}

.side-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  padding: 0 11px;
  font-size: 14px;
  font-weight: 760;
  text-align: left;
  text-decoration: none;
}

.side-nav-item:hover,
.side-nav-item.is-active {
  background: var(--blue-soft);
  color: var(--blue);
}

.account-card {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  padding: 10px;
}

.account-avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--blue);
  font-weight: 850;
}

.account-card strong,
.account-card span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-card strong {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.3;
}

.account-card span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.account-card .link-button {
  grid-column: 1 / -1;
  justify-content: flex-start;
}

.server-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  padding: 0 12px;
  font-size: 13px;
  font-weight: 760;
  text-align: center;
}

.server-status.is-busy {
  border-color: rgba(182, 106, 22, 0.3);
  background: var(--amber-soft);
  color: var(--amber);
}

.server-status.is-ok {
  border-color: rgba(15, 159, 110, 0.28);
  background: var(--green-soft);
  color: var(--green);
}

.server-status.is-error {
  border-color: rgba(180, 35, 24, 0.26);
  background: var(--red-soft);
  color: var(--red);
}

.main-shell {
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 24px;
}

.top-bar {
  position: relative;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-height: 44px;
}

.workspace-context {
  display: grid;
  justify-items: start;
  min-width: 0;
  margin-right: auto;
}

.workspace-context span,
.workspace-context strong {
  display: block;
  overflow: hidden;
  max-width: 420px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.workspace-context strong {
  color: var(--ink);
  font-size: 18px;
  line-height: 1.2;
}

.account-menu {
  position: relative;
}

.account-button {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--ink);
  padding: 4px 10px 4px 6px;
  box-shadow: 0 8px 22px rgba(31, 42, 55, 0.05);
}

.account-button:hover,
.account-button[aria-expanded="true"] {
  border-color: var(--line-strong);
  background: var(--surface-soft);
}

.account-button svg {
  width: 16px;
  height: 16px;
  color: var(--muted);
}

.account-copy {
  display: grid;
  justify-items: start;
  min-width: 0;
}

.account-copy strong,
.account-copy span,
.account-menu-profile strong,
.account-menu-profile span {
  display: block;
  overflow: hidden;
  max-width: 220px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-copy strong,
.account-menu-profile strong {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.3;
}

.account-copy span,
.account-menu-profile span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.account-menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  display: grid;
  gap: 4px;
  width: 260px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow);
  padding: 8px;
}

.account-menu-profile {
  border-bottom: 1px solid var(--line);
  padding: 8px 8px 12px;
  margin-bottom: 4px;
}

.account-menu-panel button {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  padding: 0 9px;
  font-size: 13px;
  font-weight: 760;
  text-align: left;
}

.account-menu-panel button:hover {
  background: var(--surface-soft);
}

.view {
  display: grid;
  gap: 18px;
}

.view[hidden] {
  display: none;
}

.auth-view {
  max-width: none;
}

.auth-route .app-shell {
  display: block;
  min-height: 100vh;
}

.auth-route .sidebar,
.auth-route .top-bar {
  display: none;
}

.auth-route .main-shell {
  min-height: 100vh;
  padding: 0;
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 440px);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
  width: min(1080px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: clamp(24px, 6vw, 72px);
}

.auth-intro {
  display: grid;
  align-content: center;
  gap: 36px;
}

.auth-brand {
  width: max-content;
}

.auth-intro h2,
.auth-card-head h2 {
  margin: 0;
  letter-spacing: 0;
}

.auth-intro h2 {
  max-width: 560px;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.02;
}

.auth-intro p:not(.eyebrow) {
  max-width: 460px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

.auth-card-stack {
  display: grid;
  gap: 12px;
}

.auth-card-head h2 {
  font-size: 26px;
  line-height: 1.1;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.page-header h2,
.panel h2,
.project-row h3,
.page-row h3 {
  margin: 0;
  letter-spacing: 0;
}

.page-header h2 {
  font-size: 28px;
  line-height: 1.1;
}

.panel h2 {
  font-size: 18px;
  line-height: 1.2;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 780;
  text-decoration: none;
}

.page-actions {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.auth-panel {
  padding: 22px;
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-form[hidden] {
  display: none;
}

.form-head h3 {
  margin: 0;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: 0;
}

.auth-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 780;
}

.auth-message {
  margin-top: 16px;
  border: 1px solid rgba(15, 159, 110, 0.24);
  border-radius: var(--radius);
  background: var(--green-soft);
  color: var(--green);
  padding: 12px;
  font-size: 13px;
  line-height: 1.45;
}

.auth-message.is-error {
  border-color: rgba(180, 35, 24, 0.26);
  background: var(--red-soft);
  color: var(--red);
}

.auth-message a {
  color: inherit;
  font-weight: 820;
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 18px;
}

.list-header {
  border-bottom: 1px solid var(--line);
}

.list-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: min(560px, 55%);
}

.search-field {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 220px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--quiet);
  padding: 0 11px;
}

.search-field:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(36, 89, 230, 0.1);
}

.search-field input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 14px;
}

.segmented {
  display: inline-flex;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  padding: 3px;
}

.segmented button {
  min-width: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  padding: 0 10px;
  font-size: 13px;
  font-weight: 760;
}

.segmented button.is-active {
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 1px 4px rgba(31, 42, 55, 0.1);
}

.primary-button,
.secondary-button,
.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  min-height: 40px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  padding: 0 13px;
  font-weight: 780;
  text-decoration: none;
  white-space: nowrap;
}

.primary-button {
  background: var(--blue);
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(36, 89, 230, 0.18);
}

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

.secondary-button {
  border-color: var(--line);
  background: #ffffff;
  color: var(--ink);
}

.secondary-button:hover {
  border-color: var(--line-strong);
  background: var(--surface-soft);
}

.icon-only {
  width: 40px;
  padding: 0;
}

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

.metric {
  display: grid;
  gap: 4px;
  min-height: 74px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 14px;
  box-shadow: 0 10px 26px rgba(31, 42, 55, 0.05);
}

.metric strong {
  color: var(--ink);
  font-size: 26px;
  line-height: 1;
}

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

.metric.is-blue {
  border-color: rgba(36, 89, 230, 0.22);
  background: var(--blue-soft);
}

.metric.is-blue strong {
  color: var(--blue);
}

.metric.is-amber {
  border-color: rgba(182, 106, 22, 0.24);
  background: var(--amber-soft);
}

.metric.is-amber strong {
  color: var(--amber);
}

.latest-result {
  margin: 14px 18px 0;
  padding: 12px;
  border: 1px solid rgba(15, 159, 110, 0.24);
  border-radius: var(--radius);
  background: var(--green-soft);
}

.latest-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--green);
  font-size: 13px;
  font-weight: 820;
}

.latest-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.latest-links a,
.latest-links button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 34px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
  padding: 0 10px;
  font-size: 13px;
  font-weight: 780;
  text-decoration: none;
}

.project-table-head,
.project-row {
  display: grid;
  grid-template-columns: minmax(260px, 1.5fr) 140px 120px 150px 96px;
  gap: 12px;
  align-items: center;
}

.project-table-head {
  min-height: 38px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--muted);
  padding: 0 18px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.projects-list,
.pages-list,
.comments-list {
  display: grid;
}

.project-row {
  min-height: 82px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
  padding: 14px 18px;
}

.project-row:last-child {
  border-bottom: 0;
}

.project-row:hover {
  background: #fbfcfe;
}

.project-name-cell {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
  text-decoration: none;
}

.project-initial {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(36, 89, 230, 0.18);
  border-radius: var(--radius);
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 15px;
  font-weight: 850;
}

.project-title-wrap,
.project-files-cell,
.project-date-cell {
  min-width: 0;
}

.project-row h3 {
  overflow: hidden;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-url {
  overflow: hidden;
  margin-top: 4px;
  color: var(--quiet);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-comments-cell,
.project-files-cell,
.project-date-cell {
  display: grid;
  gap: 4px;
}

.comment-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: max-content;
  min-height: 26px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  padding: 0 10px;
  font-size: 12px;
  font-weight: 820;
  white-space: nowrap;
}

.comment-badge.has-open {
  border-color: rgba(182, 106, 22, 0.24);
  background: var(--amber-soft);
  color: var(--amber);
}

.comment-detail,
.project-files-cell span,
.project-date-cell span,
.page-row span {
  overflow: hidden;
  color: var(--quiet);
  font-size: 12px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-files-cell strong,
.project-date-cell strong {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
}

.project-actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
}

.row-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--muted);
  padding: 0;
  text-decoration: none;
}

.row-action:hover {
  border-color: var(--line-strong);
  background: var(--surface-soft);
  color: var(--ink);
}

.row-action.primary-link {
  border-color: rgba(36, 89, 230, 0.24);
  background: var(--blue-soft);
  color: var(--blue);
}

.project-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.8fr) minmax(0, 1.2fr);
  gap: 18px;
  align-items: start;
}

.page-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  min-height: 72px;
  border-top: 1px solid var(--line);
  padding: 14px 18px;
}

.page-row h3 {
  overflow: hidden;
  font-size: 15px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.comment-row {
  display: grid;
  gap: 9px;
  border-top: 1px solid var(--line);
  padding: 16px 18px;
}

.comment-row.resolved {
  background: var(--surface-soft);
}

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

.comment-number,
.comment-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 820;
}

.comment-number {
  background: var(--blue-soft);
  color: var(--blue);
}

.comment-status {
  background: var(--surface-soft);
  color: var(--muted);
}

.comment-row p {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.45;
}

.comment-row code {
  overflow-wrap: anywhere;
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--muted);
  padding: 9px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.45;
}

.menu-wrap {
  position: relative;
}

.action-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  display: none;
  min-width: 190px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow);
  padding: 6px;
}

.action-menu.open {
  display: grid;
  gap: 4px;
}

.action-menu button {
  display: flex;
  align-items: center;
  min-height: 36px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  padding: 0 10px;
  font-size: 13px;
  font-weight: 760;
  text-align: left;
}

.action-menu button:hover {
  background: var(--surface-soft);
}

.drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(23, 32, 44, 0.34);
  opacity: 0;
  transition: opacity 160ms ease;
}

.drawer-overlay.open {
  opacity: 1;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 41;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(420px, 100vw);
  height: 100vh;
  border-left: 1px solid var(--line);
  background: #ffffff;
  box-shadow: -18px 0 42px rgba(31, 42, 55, 0.14);
  transform: translateX(100%);
  transition: transform 160ms ease;
}

.drawer.open {
  transform: translateX(0);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(23, 32, 44, 0.38);
}

.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 51;
  display: grid;
  width: min(440px, calc(100vw - 32px));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 24px 64px rgba(31, 42, 55, 0.18);
  transform: translate(-50%, -50%);
}

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

.modal-head h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: 0;
}

.modal-form {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding: 18px;
}

.upload-form {
  display: grid;
  align-content: start;
  gap: 14px;
  overflow: auto;
  padding: 18px;
}

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

.field input {
  min-width: 0;
  width: 100%;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--ink);
  padding: 0 12px;
  outline: none;
}

.field input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(36, 89, 230, 0.1);
}

.drop-zone {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 160px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--muted);
  text-align: center;
  outline: none;
  cursor: pointer;
}

.drop-zone:hover,
.drop-zone:focus-visible,
.drop-zone.is-dragover {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(36, 89, 230, 0.1);
}

.drop-zone strong {
  color: var(--ink);
  font-size: 16px;
  line-height: 1.2;
}

.drop-zone span {
  font-size: 13px;
}

.drop-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(36, 89, 230, 0.18);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--blue);
}

.drop-icon svg {
  width: 24px;
  height: 24px;
}

.button-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}

.link-button {
  min-height: auto;
  border: 0;
  background: transparent;
  color: var(--blue);
  padding: 0;
  font-size: 13px;
}

.file-summary {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  overflow: hidden;
}

.file-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 40px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
}

.file-list {
  max-height: 220px;
  margin: 0;
  padding: 0;
  overflow: auto;
  list-style: none;
}

.file-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 40px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.file-list li:last-child {
  border-bottom: 0;
}

.file-list .file-empty {
  grid-template-columns: 1fr;
  gap: 2px;
  min-height: 64px;
  text-align: center;
}

.file-meta {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 8px;
}

.file-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 23px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--quiet);
  font-size: 11px;
  font-weight: 820;
}

.file-list strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.empty-state {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 220px;
  color: var(--muted);
  padding: 28px 14px;
  font-size: 14px;
  text-align: center;
}

.empty-state svg {
  width: 28px;
  height: 28px;
  color: var(--blue);
}

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

.empty-state span {
  color: var(--muted);
}

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

  .sidebar {
    position: static;
    grid-template-columns: auto 1fr auto;
    grid-template-rows: auto;
    align-items: center;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .side-nav {
    display: flex;
  }

}

@media (max-width: 860px) {
  .main-shell {
    padding: 16px;
  }

  .page-header,
  .list-header {
    align-items: stretch;
    flex-direction: column;
  }

  .top-bar {
    align-items: stretch;
    justify-content: space-between;
  }

  .workspace-context {
    grid-column: 1 / -1;
  }

  .page-actions,
  .list-tools {
    justify-content: flex-start;
    min-width: 0;
    width: 100%;
  }

  .search-field {
    flex: 1;
    min-width: 0;
  }

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

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

  .project-table-head {
    display: none;
  }

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

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

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

  .auth-shell {
    grid-template-columns: 1fr;
    align-content: start;
    gap: 24px;
  }

  .auth-intro {
    gap: 24px;
  }

  .auth-intro h2 {
    font-size: 34px;
  }
}

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

  .side-nav {
    overflow-x: auto;
  }

  .page-actions,
  .list-tools,
  .button-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .segmented {
    width: 100%;
  }

  .segmented button {
    flex: 1;
  }

  .icon-only {
    width: 100%;
  }

  .top-bar {
    display: grid;
    grid-template-columns: 1fr;
  }

  .workspace-context span,
  .workspace-context strong {
    max-width: 100%;
  }

  .server-status {
    width: 100%;
  }

  .account-button {
    width: 100%;
    justify-content: flex-start;
  }

  .account-menu-panel {
    left: 0;
    right: auto;
    width: 100%;
  }

  .auth-shell {
    padding: 22px;
  }

  .auth-intro h2 {
    font-size: 30px;
  }
}
