:root {
  --ink: #182230;
  --text: #243246;
  --muted: #66768a;
  --faint: #8a98aa;
  --line: #dbe3ed;
  --line-strong: #c7d1de;
  --canvas: #f3f6fa;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --nav: #111923;
  --nav-2: #172333;
  --nav-line: rgba(255, 255, 255, 0.08);
  --blue: #2563eb;
  --blue-2: #1d4ed8;
  --cyan: #0891b2;
  --green: #16845b;
  --amber: #b7791f;
  --red: #c2413f;
  --shadow-sm: 0 1px 2px rgba(22, 34, 51, 0.06);
  --shadow-md: 0 14px 34px rgba(22, 34, 51, 0.10);
  --shadow-lg: 0 24px 70px rgba(9, 18, 30, 0.22);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
}

body {
  margin: 0;
  color: var(--text);
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", Arial, sans-serif;
  background:
    linear-gradient(180deg, #eef4fa 0, var(--canvas) 360px),
    var(--canvas);
}

button,
input,
select {
  font: inherit;
}

button {
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
  box-shadow: none;
  transform: none;
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.18);
  outline-offset: 2px;
}

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

.sidebar {
  color: #dbe7f4;
  background:
    linear-gradient(180deg, rgba(37, 99, 235, 0.12), transparent 260px),
    var(--nav);
  padding: 18px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar::-webkit-scrollbar,
.table-wrap::-webkit-scrollbar,
.tabs::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.sidebar::-webkit-scrollbar-thumb,
.table-wrap::-webkit-scrollbar-thumb,
.tabs::-webkit-scrollbar-thumb {
  background: #c4cfdb;
  border: 3px solid transparent;
  border-radius: 999px;
  background-clip: padding-box;
}

.sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.24);
  border: 3px solid transparent;
  background-clip: padding-box;
}

.brand {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  align-items: center;
  padding: 8px 8px 22px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #ffffff;
  font-weight: 900;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.32);
}

.brand strong,
.brand span {
  display: block;
}

.brand strong {
  color: #ffffff;
  font-size: 15px;
  line-height: 1.35;
}

.brand span {
  margin-top: 4px;
  color: #95a8bd;
  font-size: 12px;
}

.module-nav {
  display: grid;
  gap: 8px;
}

.nav-group {
  border: 1px solid var(--nav-line);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.025);
}

.nav-main,
.nav-sub {
  width: 100%;
  border: 0;
  color: inherit;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.nav-main {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  color: #dce8f5;
  font-weight: 700;
}

.nav-main i {
  width: 18px;
  height: 18px;
  color: #86a5ca;
}

.nav-main:hover,
.nav-sub:hover {
  background: rgba(255, 255, 255, 0.055);
  color: #ffffff;
}

.nav-sub {
  min-height: 35px;
  display: block;
  padding: 8px 12px 8px 42px;
  color: #aebdcc;
  font-size: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.035);
}

.nav-sub.active,
.nav-main.active {
  background: var(--nav-2);
  color: #ffffff;
}

.nav-sub.active {
  position: relative;
  font-weight: 700;
}

.nav-sub.active::before {
  content: "";
  position: absolute;
  left: 24px;
  top: 11px;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #22d3ee;
}

.workspace {
  min-width: 0;
  padding: 26px 28px 34px;
}

.topbar {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

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

h1 {
  margin-bottom: 0;
  color: var(--ink);
  font-size: 28px;
  line-height: 1.2;
  font-weight: 850;
}

h2 {
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.25;
}

h3 {
  color: var(--ink);
}

.topbar-actions,
.view-actions,
.dialog-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sync-status {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid #b7e4cf;
  border-radius: 8px;
  color: #087a4b;
  background: #effbf5;
  font-size: 13px;
  white-space: nowrap;
}

.sync-status[hidden] {
  display: none !important;
}

.sync-status[data-state="syncing"] {
  border-color: #f3cf83;
  color: #9a6400;
  background: #fff8e8;
}

.search-box {
  width: min(390px, 38vw);
  height: 42px;
  display: grid;
  grid-template-columns: 38px 1fr;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-sm);
}

.search-box:focus-within {
  border-color: rgba(37, 99, 235, 0.55);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.10);
}

.search-box i {
  width: 18px;
  margin-left: 13px;
  color: var(--faint);
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
}

.search-box input::placeholder {
  color: #98a6b8;
}

.dashboard {
  display: grid;
  grid-template-columns: repeat(5, minmax(148px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.metric {
  min-height: 118px;
  padding: 17px 18px;
  border: 1px solid rgba(219, 227, 237, 0.9);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.78)),
    var(--surface);
  box-shadow: var(--shadow-sm);
}

.metric:first-child {
  color: #ffffff;
  border-color: transparent;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.96), rgba(8, 145, 178, 0.94));
  box-shadow: 0 16px 36px rgba(37, 99, 235, 0.22);
}

.metric-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.metric-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 8px;
  color: var(--blue);
  background: #eaf1ff;
}

.metric-icon i {
  width: 18px;
  height: 18px;
}

.metric:first-child .metric-icon {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
}

.metric-warn .metric-icon {
  color: var(--amber);
  background: #fff5dc;
}

.metric-bad .metric-icon {
  color: var(--red);
  background: #ffecec;
}

.metric-ok .metric-icon {
  color: var(--green);
  background: #e7f6ef;
}

.metric-info .metric-icon {
  color: var(--cyan);
  background: #e6f7fb;
}

.metric:first-child .label,
.metric:first-child .hint,
.metric:first-child .value {
  color: #ffffff;
}

.metric .label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.metric .value {
  margin: 12px 0 8px;
  color: var(--ink);
  font-size: 30px;
  line-height: 1;
  font-weight: 900;
}

.metric .hint {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.content-band {
  min-height: 560px;
  border: 1px solid rgba(219, 227, 237, 0.95);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff, #fbfcfe);
}

.section-head p {
  color: var(--muted);
  margin-bottom: 0;
  line-height: 1.5;
}

.tabs {
  display: flex;
  gap: 8px;
  padding: 12px 18px 0;
  overflow-x: auto;
  background: #fbfcfe;
}

.tab-button {
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: 8px 8px 0 0;
  color: var(--muted);
  background: transparent;
  white-space: nowrap;
  cursor: pointer;
}

.tab-button:hover {
  color: var(--ink);
  background: #eef4fb;
}

.tab-button.active {
  color: var(--blue);
  border-color: var(--line);
  border-bottom-color: var(--surface);
  background: var(--surface);
  font-weight: 800;
}

.view-body {
  padding: 18px 22px 24px;
}

.guide-panel,
.relation-panel {
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.guide-panel {
  padding: 15px;
  background:
    linear-gradient(180deg, #ffffff, #f9fbfd);
}

.guide-title,
.relation-panel.compact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.guide-title {
  margin-bottom: 12px;
}

.guide-title strong,
.relation-panel strong {
  display: block;
  color: var(--ink);
  font-size: 15px;
}

.guide-title span,
.relation-panel span,
.relation-main span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

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

.guide-step {
  min-height: 74px;
  display: grid;
  grid-template-columns: 28px 24px 1fr;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  color: var(--text);
  background: #ffffff;
  text-align: left;
  cursor: pointer;
}

.guide-step:hover {
  border-color: rgba(37, 99, 235, 0.36);
  background: #f3f7ff;
}

.guide-step i {
  width: 20px;
  height: 20px;
  color: var(--blue);
}

.guide-step b,
.guide-step small {
  display: block;
}

.guide-step b {
  color: var(--ink);
  font-size: 13px;
}

.guide-step small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.step-no {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.relation-panel {
  padding: 14px 15px;
}

.relation-mini-list,
.relation-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.relation-chip {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #ffd5a3;
  border-radius: 999px;
  padding: 0 10px;
  color: #844a00;
  background: #fff6e8;
  cursor: pointer;
}

.relation-chip em {
  color: var(--red);
  font-style: normal;
  font-weight: 800;
}

.relation-panel.selected {
  display: grid;
  gap: 14px;
  border-color: rgba(37, 99, 235, 0.28);
  background: linear-gradient(180deg, #ffffff, #f7fbff);
}

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

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

.relation-grid div {
  min-height: 68px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #ffffff;
}

.relation-grid small,
.muted-text {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.relation-grid b {
  display: block;
  margin-top: 7px;
  color: var(--ink);
  font-size: 19px;
}

.danger-text {
  color: var(--red) !important;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.link-button {
  border: 0;
  padding: 0;
  color: var(--blue);
  background: transparent;
  font-weight: 800;
  cursor: pointer;
}

.link-button:hover {
  color: var(--blue-2);
  text-decoration: underline;
}

.toolbar select,
.toolbar input,
.form-grid input,
.form-grid select {
  height: 40px;
  min-width: 0;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 0 11px;
  color: var(--ink);
  background: var(--surface);
}

.toolbar select,
.toolbar input {
  min-width: 180px;
}

.toolbar input {
  width: min(320px, 42vw);
}

.toolbar input:focus,
.toolbar select:focus,
.form-grid input:focus,
.form-grid select:focus {
  border-color: rgba(37, 99, 235, 0.62);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.10);
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 980px;
  font-size: 14px;
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid #e7edf4;
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: #41516a;
  background: #f4f7fb;
  font-size: 13px;
  font-weight: 800;
}

tbody tr {
  background: var(--surface);
}

tbody tr:nth-child(even) {
  background: #fbfdff;
}

tbody tr:hover {
  background: #eef6ff;
}

tr:last-child td {
  border-bottom: 0;
}

.ocr-panel {
  display: grid;
  gap: 14px;
}

.ocr-runtime-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid #f2c772;
  border-radius: 8px;
  padding: 12px 14px;
  color: #7c4a03;
  background: #fff8e9;
}

.ocr-runtime-notice i {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  color: #c77a07;
}

.ocr-runtime-notice strong,
.ocr-runtime-notice span {
  display: block;
}

.ocr-runtime-notice span {
  margin-top: 3px;
  color: #8b641f;
  font-size: 13px;
  line-height: 1.55;
}

.ocr-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(320px, 1.05fr);
  gap: 14px;
}

.ocr-drop,
.ocr-textbox,
.ocr-result {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  padding: 14px;
}

.ocr-file-control {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  margin-bottom: 10px;
}

.file-input-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.file-picker {
  flex: 0 0 auto;
}

.ocr-file-name {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ocr-preview {
  min-height: 260px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: var(--surface-soft);
}

.ocr-preview img {
  max-width: 100%;
  max-height: 460px;
  transform-origin: center;
  transition: transform 0.18s ease;
}

.ocr-empty {
  min-height: 240px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  color: var(--muted);
  text-align: center;
}

.ocr-empty i {
  width: 34px;
  height: 34px;
  color: var(--blue);
}

.ocr-empty strong {
  color: var(--ink);
}

.ocr-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.ocr-status {
  min-height: 22px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.ocr-status.bad {
  color: var(--red);
  font-weight: 700;
}

.ocr-textbox label {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-weight: 800;
}

.ocr-textbox textarea {
  width: 100%;
  min-height: 300px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  color: var(--text);
  background: var(--surface-soft);
}

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

.ocr-result-head strong,
.ocr-result-head span {
  display: block;
}

.ocr-result-head strong {
  color: var(--ink);
  font-size: 16px;
}

.ocr-result-head span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

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

.compact-field label {
  font-size: 12px;
}

.ocr-table-wrap input.table-input {
  width: 140px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 8px;
  background: #fff;
}

.ocr-table-wrap input.table-input.wide {
  width: 240px;
}

.ocr-table-wrap input.table-input.small {
  width: 84px;
}

.panel.subtle {
  background: var(--surface-soft);
  box-shadow: none;
}

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

.status.ok {
  color: var(--green);
  background: #e7f6ef;
}

.status.warn {
  color: var(--amber);
  background: #fff4dc;
}

.status.bad {
  color: var(--red);
  background: #ffe8e8;
}

.status.info {
  color: var(--blue);
  background: #e8efff;
}

.primary-button,
.ghost-button,
.icon-button {
  min-height: 40px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
}

.primary-button {
  padding: 0 15px;
  color: #ffffff;
  border-color: var(--blue);
  background: var(--blue);
  box-shadow: 0 10px 18px rgba(37, 99, 235, 0.18);
}

.primary-button:hover {
  background: var(--blue-2);
  border-color: var(--blue-2);
  transform: translateY(-1px);
}

.danger-button {
  border-color: var(--red);
  background: var(--red);
  box-shadow: 0 10px 18px rgba(194, 65, 63, 0.16);
}

.danger-button:hover {
  border-color: #a83432;
  background: #a83432;
}

.ghost-button {
  padding: 0 15px;
  color: var(--text);
  background: #ffffff;
}

.ghost-button:hover,
.icon-button:hover {
  border-color: #b7c3d2;
  background: #f5f8fb;
}

.icon-button {
  width: 42px;
  color: var(--text);
  background: #ffffff;
}

button i {
  width: 17px;
  height: 17px;
}

.split-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 360px;
  gap: 16px;
  align-items: start;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.panel h3 {
  margin-bottom: 13px;
  font-size: 16px;
}

.panel p {
  color: var(--muted);
  line-height: 1.55;
}

.progress-line {
  display: grid;
  grid-template-columns: 116px 1fr 58px;
  gap: 10px;
  align-items: center;
  margin: 12px 0;
  color: var(--muted);
  font-size: 13px;
}

.progress-line strong {
  color: var(--ink);
  text-align: right;
}

.bar {
  height: 9px;
  border-radius: 999px;
  background: #e5ebf3;
  overflow: hidden;
}

.bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2563eb, #0ea5a8);
}

.entry-dialog {
  width: min(760px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  border: 0;
  border-radius: 8px;
  padding: 0;
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  overflow: auto;
}

.entry-dialog::backdrop {
  background: rgba(13, 23, 36, 0.48);
  backdrop-filter: blur(2px);
}

.dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.dialog-head h3 {
  margin-bottom: 0;
  font-size: 22px;
  line-height: 1.25;
}

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

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

.field label {
  color: #3d4e66;
  font-size: 13px;
  font-weight: 800;
}

.field input {
  width: 100%;
}

.field-hint {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.form-error {
  min-height: 20px;
  margin: -8px 22px 14px;
  color: var(--red);
  font-size: 13px;
  font-weight: 800;
}

.dialog-actions {
  justify-content: flex-end;
  padding: 0 22px 22px;
}

@media (max-width: 1100px) {
  .dashboard {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }

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

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

  .ocr-layout,
  .ocr-meta-grid {
    grid-template-columns: 1fr;
  }
}

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

  .sidebar {
    position: static;
    height: auto;
  }

  .topbar,
  .section-head,
  .guide-title,
  .relation-panel.compact {
    align-items: stretch;
    flex-direction: column;
  }

  .search-box {
    width: 100%;
  }
}

@media (max-width: 680px) {
  .sidebar {
    padding: 10px 12px 8px;
    overflow: hidden;
  }

  .brand {
    grid-template-columns: 34px 1fr;
    gap: 8px;
    padding: 0 0 10px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
    font-size: 14px;
  }

  .brand strong {
    font-size: 14px;
  }

  .brand span {
    display: none;
  }

  .module-nav {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: thin;
  }

  .nav-group {
    display: contents;
  }

  .nav-main {
    display: none;
  }

  .nav-sub {
    width: auto;
    min-height: 34px;
    flex: 0 0 auto;
    padding: 8px 10px;
    border: 1px solid var(--nav-line);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.035);
    color: #b9c8d8;
    font-size: 12px;
    white-space: nowrap;
  }

  .nav-sub.active::before {
    display: none;
  }

  .workspace {
    padding: 14px;
  }

  .dashboard,
  .form-grid,
  .guide-steps,
  .relation-grid {
    grid-template-columns: 1fr;
  }

  .topbar-actions,
  .view-actions,
  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .toolbar input,
  .toolbar select,
  .primary-button,
  .ghost-button {
    width: 100%;
  }

  h1 {
    font-size: 24px;
  }
}
