:root {
  --bg: #f5f6f8;
  --panel: #ffffff;
  --line: #d9dee7;
  --text: #1f2937;
  --muted: #667085;
  --brand: #2563eb;
  --brand-strong: #1d4ed8;
  --brand-soft: #eaf1ff;
  --danger: #b42318;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
}

body {
  overflow: hidden;
}

.app {
  position: fixed;
  inset: 0;
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  transition: grid-template-columns 0.18s ease;
}

body.sidebar-collapsed .app {
  grid-template-columns: 52px minmax(0, 1fr);
}

.sidebar {
  display: flex;
  min-width: 0;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: var(--panel);
}

.brand {
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.brand-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}

.brand-copy {
  min-width: 0;
  flex: 1;
}

.brand h1 {
  margin: 0;
  font-size: 19px;
}

.brand p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.sidebar-toggle {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
}

.sidebar-toggle:hover {
  border-color: var(--brand);
  color: var(--brand);
}

body.sidebar-collapsed .brand {
  padding: 10px;
}

body.sidebar-collapsed .brand-copy,
body.sidebar-collapsed #openUploadButton,
body.sidebar-collapsed #openDocButton,
body.sidebar-collapsed .library-switch,
body.sidebar-collapsed .search,
body.sidebar-collapsed .groups {
  display: none;
}

body.sidebar-collapsed .brand-top {
  justify-content: center;
}

.drop {
  display: grid;
  place-items: center;
  min-height: 96px;
  border: 1px dashed #aeb8c8;
  border-radius: 10px;
  background: #fbfcff;
  cursor: pointer;
}

.drop.dragover {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.drop input {
  display: none;
}

.drop-title {
  font-size: 14px;
  font-weight: 700;
}

.drop-sub {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.source-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f6f8fb;
}

.source-mode-button {
  height: 32px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.source-mode-button.active {
  background: #fff;
  color: var(--brand);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}

#titleInput,
#ownerInput,
#newGroupInput,
#searchInput,
#groupSelect,
.field input,
.field select {
  width: 100%;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  outline: none;
  background: #fff;
  color: var(--text);
  font-size: 13px;
}

#titleInput {
  margin-top: 10px;
}

.group-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  margin-top: 8px;
}

.primary,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
  color: var(--text);
  font-size: 13px;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
}

.primary {
  width: 100%;
  margin-top: 10px;
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
  font-weight: 700;
}

.primary:hover {
  background: var(--brand-strong);
}

.primary:disabled,
.button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.compact {
  margin-top: 12px;
}

.action-row {
  margin-top: 12px;
}

.action-row .compact {
  margin-top: 0;
}

.library-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-top: 12px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f6f8fb;
}

.tab {
  height: 30px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.tab.active {
  background: #fff;
  color: var(--brand);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}

.hidden {
  display: none !important;
}

.button:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.status {
  min-height: 34px;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.status-selected {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1d4ed8;
}

.status-loading {
  border-color: #facc15;
  background: #fefce8;
  color: #854d0e;
}

.status-success {
  border-color: #86efac;
  background: #f0fdf4;
  color: #166534;
}

.status-error,
.status.error {
  border-color: #fca5a5;
  background: #fef2f2;
  color: var(--danger);
}

.search {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.groups {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 8px;
}

.group {
  margin-bottom: 10px;
}

.group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.group-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 1;
  height: 30px;
  border: 0;
  border-radius: 8px;
  padding: 0 8px;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.group-toggle:hover {
  background: #f2f5fa;
}

.group-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.chevron {
  color: #98a2b3;
  font-size: 12px;
  line-height: 1;
  transition: transform 0.15s ease;
}

.group.collapsed .chevron {
  transform: rotate(-90deg);
}

.count {
  font-weight: 600;
}

.group-action {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 24px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
}

.group-action:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.group-action svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.danger-action:hover {
  border-color: #fca5a5;
  background: #fef2f2;
  color: var(--danger);
}

.items {
  display: grid;
  gap: 4px;
}

.item {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  width: 100%;
  border: 0;
  border-radius: 8px;
  padding: 10px 9px;
  text-align: left;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.item:hover {
  background: #f2f5fa;
}

.item.active {
  background: var(--brand-soft);
  color: #1746a2;
}

.item:focus-visible {
  outline: 2px solid #93c5fd;
  outline-offset: 2px;
}

.item.dragging {
  opacity: 0.45;
}

.handle {
  color: #98a2b3;
  cursor: grab;
  line-height: 22px;
}

.item-copy {
  min-width: 0;
}

.item-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
}

.delete-item {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  opacity: 0;
}

.item:hover .delete-item,
.item:focus-within .delete-item,
.item.active .delete-item {
  opacity: 1;
}

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

.item-title,
.item-path {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
}

.source-badge {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 2px 6px;
  font-size: 10px;
  line-height: 1.2;
  font-weight: 800;
}

.source-badge-html {
  background: #eef2ff;
  color: #3152c9;
}

.source-badge-axure {
  background: #fff7ed;
  color: #c2410c;
}

.item-title span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item-path {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.empty {
  padding: 18px 10px;
  color: var(--muted);
  font-size: 13px;
}

.viewer {
  display: grid;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  grid-template-rows: 58px auto minmax(0, 1fr);
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
}

.logout-form {
  margin: 0;
}

.logout-form .button {
  white-space: nowrap;
}

.current {
  flex: 1;
  min-width: 0;
}

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

.current strong {
  font-size: 15px;
}

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

iframe {
  display: block;
  grid-row: 3;
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  background: #fff;
}

.prototype-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding: 8px 14px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfe;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  overflow-x: auto;
}

.prototype-meta strong {
  color: var(--text);
  font-weight: 700;
}

.meta-link a,
.doc-card dd a {
  color: var(--brand);
  font-weight: 700;
  text-decoration: none;
}

.meta-link a {
  display: inline-block;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
  white-space: nowrap;
}

.meta-link a:hover,
.doc-card dd a:hover {
  text-decoration: underline;
}

.version-actions {
  display: inline-flex;
  gap: 8px;
  margin-left: auto;
}

.meta-button {
  height: 26px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 10px;
  background: #fff;
  color: var(--text);
  font-size: 12px;
  cursor: pointer;
}

.meta-button:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.doc-detail {
  grid-row: 3;
  min-height: 0;
  padding: 24px 32px 32px;
  overflow: auto;
  background: #f8fafc;
}

.doc-workspace {
  display: grid;
  gap: 18px;
  max-width: 1160px;
}

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

.doc-workspace-header h2 {
  margin: 0;
  font-size: 22px;
}

.doc-workspace-header p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.doc-view-switch {
  display: inline-grid;
  grid-template-columns: repeat(3, auto);
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #eef2f7;
}

.doc-view-button {
  height: 30px;
  border: 0;
  border-radius: 7px;
  padding: 0 12px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.doc-view-button.active {
  background: #fff;
  color: var(--brand);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}

.doc-group-view,
.doc-list-view {
  display: grid;
  gap: 18px;
}

.doc-group-section,
.doc-table-section {
  display: grid;
  gap: 10px;
}

.doc-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.doc-group-header h3 {
  margin: 0;
  font-size: 15px;
}

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

.doc-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.doc-summary-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  background: #fff;
}

.doc-summary-card.active {
  border-color: #b6c9ff;
  background: #f8fbff;
}

.doc-summary-top,
.doc-summary-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.doc-summary-card h3 {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
}

.doc-summary-card p,
.doc-summary-time {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.doc-summary-card p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.doc-summary-actions {
  justify-content: flex-start;
}

.doc-summary-actions .button,
.doc-table-actions .button {
  height: 30px;
  padding: 0 10px;
  font-size: 12px;
}

.doc-table {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.doc-table-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) minmax(240px, 1.8fr) auto;
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
}

.doc-table-row:first-child {
  border-top: 0;
}

.doc-table-row.active {
  background: #f1f6ff;
}

.doc-table-title,
.doc-table-meta {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.doc-table-title {
  font-size: 13px;
  font-weight: 800;
}

.doc-table-meta {
  color: var(--muted);
  font-size: 12px;
}

.doc-table-actions {
  display: inline-flex;
  gap: 8px;
}

.doc-empty {
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 28px 16px;
  background: #fff;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.doc-card {
  max-width: 760px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 24px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

.doc-type {
  display: inline-flex;
  align-items: center;
  height: 24px;
  border-radius: 999px;
  padding: 0 10px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
}

.doc-card h2 {
  margin: 14px 0 18px;
  font-size: 24px;
}

.doc-card dl {
  display: grid;
  gap: 12px;
  margin: 0;
}

.doc-card dl div {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.doc-card dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.doc-card dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 13px;
}

.doc-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  margin-top: 20px;
  text-decoration: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
}

.modal.open {
  display: block;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.42);
}

.modal-panel {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  transform: translate(-50%, -50%);
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.22);
}

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

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

.modal-header p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.icon-button {
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-size: 20px;
  line-height: 28px;
  cursor: pointer;
}

.icon-button:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.modal-body {
  padding: 16px 18px 18px;
}

.field {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.field.first {
  margin-top: 0;
}

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

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}

.modal-actions .button,
.modal-actions .primary {
  width: auto;
  min-width: 96px;
  margin-top: 0;
}

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

.version-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  background: #fff;
}

.version-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 14px;
  font-weight: 800;
}

.version-badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  border-radius: 999px;
  padding: 0 8px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 12px;
}

.version-current {
  display: inline-flex;
  align-items: center;
  height: 22px;
  border-radius: 999px;
  padding: 0 8px;
  background: #f0fdf4;
  color: #166534;
  font-size: 12px;
  font-weight: 800;
}

.version-meta {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.version-view {
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 10px;
  background: #fff;
  color: var(--text);
  font-size: 12px;
  cursor: pointer;
}

.version-view:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.stats-panel {
  width: min(720px, calc(100vw - 32px));
}

.stats-content {
  display: grid;
  gap: 14px;
}

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

.stat-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  background: #fff;
}

.stat-card span,
.stats-recent span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.stat-card strong {
  display: block;
  margin-top: 8px;
  color: var(--text);
  font-size: 26px;
  line-height: 1;
}

.stats-recent {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  background: #fbfcfe;
}

.stats-recent strong {
  display: block;
  margin-top: 6px;
  font-size: 15px;
}

.stats-recent small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.stats-detail-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #eef2f7;
}

.stats-detail-tab {
  height: 32px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.stats-detail-tab.active {
  background: #fff;
  color: var(--brand);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}

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

.stats-section-title h3 {
  margin: 0;
  font-size: 14px;
}

.stats-section-title span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.stats-list {
  display: grid;
  gap: 8px;
}

.stats-list-scroll {
  max-height: min(34vh, 360px);
  overflow: auto;
  padding-right: 4px;
}

.stats-list-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  background: #fff;
}

.stats-rank {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
}

.stats-item-copy {
  min-width: 0;
}

.stats-item-copy strong,
.stats-item-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stats-item-copy strong {
  font-size: 13px;
}

.stats-item-copy small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.stats-views {
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.stats-empty {
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 18px 12px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

@media (max-width: 900px) {
  body {
    overflow: hidden;
  }

  .app {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(160px, 34vh) minmax(0, 1fr);
    min-height: 0;
  }

  body.sidebar-collapsed .app {
    grid-template-columns: 1fr;
    grid-template-rows: 52px minmax(0, 1fr);
  }

  .sidebar {
    min-height: 0;
    overflow: hidden;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .groups {
    max-height: none;
  }

  .toolbar {
    flex-wrap: wrap;
    height: auto;
    min-height: 58px;
    padding: 10px 14px;
  }

  .doc-detail {
    padding: 18px;
  }

  .doc-workspace-header {
    display: grid;
  }

  .doc-view-switch {
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .doc-table-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }

  .doc-table-actions {
    justify-content: flex-start;
  }

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