:root {
  --ink: #183b33;
  --ink-soft: #52665d;
  --muted: #7c8a82;
  --paper: #f6f3ea;
  --paper-raised: #fffdf7;
  --line: #dfe3d8;
  --line-strong: #c8d0c2;
  --green: #1f5748;
  --green-soft: #dfeae2;
  --red: #bf523d;
  --red-soft: #f7e6de;
  --ochre: #bd8b38;
  --shadow: 0 18px 50px rgba(25, 54, 45, 0.08);
  font-family: "MiSans", "PingFang SC", "Microsoft YaHei UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}


* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--paper);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, transparent 0 23px, rgba(31, 87, 72, 0.035) 23px 24px, transparent 24px),
    var(--paper);
  background-size: 24px 24px;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

a {
  color: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(31, 87, 72, 0.24);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 68px;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 247, 0.94);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 176px;
  text-decoration: none;
  font-weight: 760;
  letter-spacing: 0.04em;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px 10px 10px 3px;
  background: var(--green);
  color: #fffdf7;
  font-family: "STSong", "Songti SC", serif;
  font-size: 22px;
  font-weight: 700;
}

.brand small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.topnav a,
.topnav button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 7px 12px;
  border: 0;
  border-radius: 9px;
  color: var(--ink-soft);
  background: transparent;
  text-decoration: none;
  cursor: pointer;
}

.topnav a:hover,
.topnav button:hover,
.topnav .active {
  color: var(--ink);
  background: var(--green-soft);
}

.top-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--paper-raised);
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
}

.button:hover {
  border-color: #9eb3a5;
  background: #f1f5ee;
}

.button.primary {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.button.primary:hover {
  background: #164639;
}

.button.subtle {
  border-color: transparent;
  background: transparent;
  color: var(--ink-soft);
}

.button.danger {
  color: var(--red);
}

.button:disabled {
  opacity: 0.48;
  cursor: default;
}

.icon {
  width: 18px;
  height: 18px;
  flex: none;
}

.mobile-menu {
  display: none;
}

.landing {
  width: min(1040px, calc(100% - 36px));
  margin: 0 auto;
  padding: 72px 0 100px;
}

.landing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: 52px;
  align-items: center;
}

.landing h1 {
  max-width: 13ch;
  margin: 0;
  font-family: "STSong", "Songti SC", serif;
  font-size: clamp(42px, 6.2vw, 78px);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.065em;
}

.landing-lead {
  max-width: 46ch;
  margin: 26px 0 0;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.9;
}

.landing-actions {
  display: flex;
  gap: 10px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.entry-card {
  position: relative;
  overflow: hidden;
  min-height: 330px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 26px 8px 26px 26px;
  background: var(--paper-raised);
  box-shadow: var(--shadow);
}

.entry-card::before {
  content: "";
  position: absolute;
  inset: 16px 16px auto auto;
  width: 94px;
  height: 94px;
  border-radius: 50%;
  background: var(--red-soft);
}

.entry-card h2 {
  position: relative;
  margin: 102px 0 8px;
  font-size: 24px;
}

.entry-card p {
  position: relative;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.form-chooser {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 64px;
}

.form-choice {
  position: relative;
  min-height: 190px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 253, 247, 0.78);
  text-decoration: none;
}

.form-choice:hover {
  border-color: #9fb7aa;
  background: var(--paper-raised);
}

.form-choice h2 {
  margin: 38px 0 8px;
  font-size: 22px;
}

.form-choice p {
  max-width: 42ch;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.choice-index {
  position: absolute;
  top: 22px;
  right: 24px;
  color: var(--line-strong);
  font-family: "Georgia", serif;
  font-size: 42px;
  line-height: 1;
}

.choice-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 8px var(--green-soft);
}

.choice-dot.ochre {
  background: var(--ochre);
  box-shadow: 0 0 0 8px #f3ead8;
}

.pending {
  opacity: 0.62;
  cursor: default;
}

.status-line {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 24px;
  color: var(--muted);
  font-size: 12px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #aab5ae;
}

.status-dot.online {
  background: #3b936e;
}

.admin-layout {
  display: grid;
  grid-template-columns: 208px minmax(0, 1fr);
  min-height: calc(100vh - 68px);
}

.rail {
  padding: 26px 14px;
  border-right: 1px solid var(--line);
  background: rgba(240, 242, 233, 0.78);
}

.rail-label {
  padding: 0 11px;
  margin: 4px 0 10px;
  color: var(--muted);
  font-size: 11px;
}

.rail-nav {
  display: grid;
  gap: 3px;
}

.rail-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 8px 11px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ink-soft);
  text-decoration: none;
  cursor: pointer;
}

.rail-link:hover,
.rail-link.active {
  background: var(--green-soft);
  color: var(--green);
}

.rail-link.active {
  font-weight: 680;
}

.rail-table {
  margin-top: 28px;
}

.rail-table small {
  display: block;
  padding: 10px 11px;
  color: var(--muted);
}

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

.admin-toolbar {
  display: flex;
  min-height: 65px;
  align-items: center;
  gap: 16px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 247, 0.88);
}

.page-title {
  min-width: 0;
}

.page-title h1 {
  margin: 0;
  overflow: hidden;
  font-size: 18px;
  font-weight: 680;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-title p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.tab-list {
  display: flex;
  align-self: stretch;
  gap: 2px;
  margin-left: auto;
}

.tab-button {
  position: relative;
  padding: 0 15px;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
}

.tab-button.active {
  color: var(--green);
  font-weight: 650;
}

.tab-button.active::after {
  content: "";
  position: absolute;
  right: 12px;
  bottom: 0;
  left: 12px;
  height: 3px;
  border-radius: 2px 2px 0 0;
  background: var(--green);
}

.toolbar-actions {
  display: flex;
  gap: 8px;
}

.editor {
  display: grid;
  min-height: calc(100vh - 133px);
  grid-template-columns: 220px minmax(400px, 1fr) 280px;
}

.palette,
.inspector {
  padding: 22px 16px;
  background: rgba(251, 249, 242, 0.74);
}

.palette {
  border-right: 1px solid var(--line);
}

.inspector {
  border-left: 1px solid var(--line);
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 16px;
  font-size: 13px;
  font-weight: 720;
}

.panel-title small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
}

.palette-group + .palette-group {
  margin-top: 26px;
}

.palette-group h3 {
  margin: 0 0 9px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.palette-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.palette-field {
  display: grid;
  min-height: 58px;
  place-items: center;
  gap: 5px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper-raised);
  color: var(--ink-soft);
  font-size: 11px;
  cursor: grab;
}

.palette-field:hover {
  border-color: #9db5a7;
}

.palette-field.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.canvas-wrap {
  overflow: auto;
  padding: 34px clamp(18px, 4vw, 58px) 70px;
  background:
    linear-gradient(90deg, transparent 0 47px, rgba(31, 87, 72, 0.025) 47px 48px, transparent 48px),
    var(--paper);
  background-size: 48px 48px;
}

.canvas {
  width: min(700px, 100%);
  min-height: 670px;
  margin: 0 auto;
  padding: 38px clamp(22px, 5vw, 52px) 58px;
  border: 1px solid var(--line);
  border-radius: 16px 5px 16px 16px;
  background: var(--paper-raised);
  box-shadow: var(--shadow);
}

.canvas-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
}

.canvas-kicker span {
  width: 18px;
  height: 2px;
  background: var(--red);
}

.canvas h2 {
  margin: 18px 0 7px;
  font-family: "STSong", "Songti SC", serif;
  font-size: 30px;
  line-height: 1.25;
}

.canvas-subtitle {
  margin: 0 0 30px;
  color: var(--muted);
  line-height: 1.7;
}

.field-list {
  display: grid;
  gap: 9px;
}

.canvas-field {
  position: relative;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 64px;
  padding: 12px 11px 12px 8px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
}

.canvas-field:hover {
  border-color: var(--line);
  background: #fbfaf4;
}

.canvas-field.selected {
  border-color: #83a593;
  background: #f5faf6;
  box-shadow: inset 3px 0 0 var(--green);
}

.canvas-field.dragging {
  opacity: 0.45;
}

.drag-handle {
  display: grid;
  width: 22px;
  height: 34px;
  place-items: center;
  color: #a3afa8;
  cursor: grab;
  letter-spacing: -1px;
}

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

.field-copy strong {
  display: block;
  overflow: hidden;
  font-size: 13px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.field-copy span {
  display: block;
  overflow: hidden;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.field-badge {
  min-width: 58px;
  padding: 4px 7px;
  border-radius: 999px;
  background: #eef0e9;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}

.field-badge.required {
  background: var(--red-soft);
  color: var(--red);
}

.empty-canvas {
  display: grid;
  min-height: 360px;
  place-items: center;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  color: var(--muted);
  text-align: center;
}

.inspector-section {
  padding: 15px 0;
  border-top: 1px solid var(--line);
}

.inspector-section:first-of-type {
  border-top: 0;
}

.inspector label {
  display: grid;
  gap: 7px;
  margin: 13px 0;
  color: var(--ink-soft);
  font-size: 11px;
}

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

.inspector textarea {
  min-height: 72px;
  resize: vertical;
}

.switch-row {
  display: flex !important;
  grid-template-columns: 1fr auto;
  align-items: center;
  justify-content: space-between;
}

.switch {
  position: relative;
  display: inline-flex;
  width: 38px;
  height: 22px;
}

.switch input {
  width: 1px;
  height: 1px;
  opacity: 0;
}

.switch span {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #c9d0c8;
  transition: background 160ms ease;
}

.switch span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform 160ms ease;
}

.switch input:checked + span {
  background: var(--green);
}

.switch input:checked + span::after {
  transform: translateX(16px);
}

.records-panel {
  padding: 28px;
}

.records-panel[hidden],
.designer-panel[hidden] {
  display: none;
}

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

.record-card {
  min-width: 0;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--paper-raised);
}

.record-card h3 {
  display: -webkit-box;
  overflow: hidden;
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.record-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  color: var(--muted);
  font-size: 10px;
}

.record-meta span {
  padding: 3px 6px;
  border-radius: 5px;
  background: #eef1ea;
}

.toast-region {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 100;
  display: grid;
  gap: 8px;
}

.toast {
  min-width: 220px;
  max-width: min(380px, calc(100vw - 40px));
  padding: 12px 15px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
  box-shadow: var(--shadow);
  font-size: 12px;
}

.toast.error {
  background: #713728;
}

.login-layer {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(20, 45, 37, 0.56);
  backdrop-filter: blur(7px);
}

.login-layer[hidden] {
  display: none;
}

.login-card {
  width: min(420px, 100%);
  padding: 28px;
  border-radius: 22px 7px 22px 22px;
  background: var(--paper-raised);
  box-shadow: 0 30px 90px rgba(9, 28, 22, 0.25);
}

.login-card h1 {
  margin: 0 0 8px;
  font-family: "STSong", "Songti SC", serif;
  font-size: 30px;
}

.login-card p {
  margin: 0 0 22px;
  color: var(--muted);
  line-height: 1.7;
}

.login-card label {
  display: grid;
  gap: 7px;
  margin: 14px 0;
  color: var(--ink-soft);
  font-size: 12px;
}

.login-card input {
  min-height: 44px;
  padding: 9px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: #fff;
}

.login-card button {
  width: 100%;
  margin-top: 8px;
}

.login-reset-link {
  display: block;
  margin-top: 13px;
  color: var(--green);
  font-size: 12px;
  text-align: center;
  text-decoration: none;
}

.login-reset-link:hover {
  text-decoration: underline;
}

.error-text {
  min-height: 20px;
  margin: 10px 0 0;
  color: var(--red);
  font-size: 12px;
}

.reset-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 8%, rgba(229, 178, 95, 0.2), transparent 30%),
    radial-gradient(circle at 90% 88%, rgba(72, 123, 97, 0.17), transparent 34%),
    #f4f2e9;
}

.reset-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 28px 18px;
}

.reset-card {
  position: relative;
}

.reset-brand {
  position: absolute;
  top: -54px;
  left: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 720;
  text-decoration: none;
}

.reset-brand .brand-mark {
  width: 36px;
  height: 36px;
}

.reset-card .button {
  margin-top: 10px;
}

.reset-back {
  display: block;
  margin-top: 16px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  text-decoration: none;
}

.reset-state {
  display: grid;
  gap: 14px;
}

.reset-state[hidden],
.reset-card form[hidden] {
  display: none;
}

.reset-state .success-mark {
  width: 58px;
  height: 58px;
  margin: 0 0 4px;
}

.reset-state h2 {
  margin: 0;
  font-family: "STSong", "Songti SC", serif;
  font-size: 28px;
}

.reset-state p {
  margin-bottom: 6px;
}

.form-page {
  width: min(760px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 20px 16px 52px;
}

.form-page-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

.back-button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper-raised);
  text-decoration: none;
}

.form-sheet {
  padding: clamp(22px, 5vw, 46px);
  border: 1px solid var(--line);
  border-radius: 24px 7px 24px 24px;
  background: var(--paper-raised);
  box-shadow: var(--shadow);
}

.form-sheet h1 {
  margin: 0 0 10px;
  font-family: "STSong", "Songti SC", serif;
  font-size: clamp(28px, 7vw, 40px);
  line-height: 1.2;
}

.form-sheet .intro {
  margin: 0 0 30px;
  color: var(--muted);
  line-height: 1.8;
}

.field {
  display: grid;
  gap: 8px;
  margin: 22px 0;
}

.field > label,
.field > .label {
  font-size: 13px;
  font-weight: 650;
}

.field .required-mark {
  color: var(--red);
}

.field .help {
  margin: -2px 0 2px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.field input[type="text"],
.field input[type="date"],
.field input[type="number"],
.field textarea,
.field select {
  width: 100%;
  min-height: 46px;
  padding: 11px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
}

.field textarea {
  min-height: 104px;
  resize: vertical;
  line-height: 1.7;
}

.file-drop {
  display: grid;
  min-height: 112px;
  place-items: center;
  gap: 7px;
  padding: 16px;
  border: 1px dashed #9bb1a3;
  border-radius: 12px;
  background: #fbfaf4;
  color: var(--muted);
  text-align: center;
  cursor: pointer;
}

.file-drop:hover {
  border-color: var(--green);
  color: var(--green);
}

.file-drop input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.selected-files {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.selected-file {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #eef3ec;
  color: var(--ink-soft);
  font-size: 11px;
}

.selected-file span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.submit-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 32px;
}

.submit-row .button {
  min-width: 128px;
}

.progress {
  flex: 1;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e6e9e2;
}

.progress > span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
  transition: width 120ms linear;
}

.form-error {
  margin: 18px 0 0;
  padding: 12px;
  border-radius: 9px;
  background: var(--red-soft);
  color: #8f3928;
  font-size: 12px;
  line-height: 1.6;
}

.success-state {
  display: grid;
  min-height: 60vh;
  place-items: center;
  text-align: center;
}

.success-state > div {
  max-width: 420px;
}

.success-mark {
  display: grid;
  width: 76px;
  height: 76px;
  margin: 0 auto 24px;
  place-items: center;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green);
}

.success-state h1 {
  margin: 0;
  font-family: "STSong", "Songti SC", serif;
  font-size: 36px;
}

.success-state p {
  margin: 12px 0 25px;
  color: var(--muted);
}

.skeleton {
  overflow: hidden;
  border-radius: 8px;
  background: linear-gradient(90deg, #eef0e9 25%, #f8f7f1 50%, #eef0e9 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}

@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}

@media (max-width: 1080px) {
  .editor {
    grid-template-columns: 190px minmax(360px, 1fr);
  }

  .inspector {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 208px;
    z-index: 40;
    display: none;
    max-height: 54vh;
    overflow: auto;
    border-top: 1px solid var(--line);
    box-shadow: 0 -14px 40px rgba(20, 50, 40, 0.12);
  }

  .inspector.open {
    display: block;
  }
}

@media (max-width: 760px) {
  .topbar {
    height: 60px;
    padding: 0 14px;
  }

  .brand {
    min-width: 0;
  }

  .brand small,
  .topnav {
    display: none;
  }

  .top-actions {
    gap: 7px;
  }

  .desktop-only {
    display: none !important;
  }

  .mobile-menu {
    display: inline-flex;
  }

  .landing {
    padding: 44px 0 70px;
  }

  .landing-hero {
    display: block;
  }

  .landing h1 {
    font-size: clamp(44px, 15vw, 66px);
  }

  .entry-card {
    min-height: 260px;
    margin-top: 35px;
  }

  .entry-card h2 {
    margin-top: 64px;
  }

  .form-chooser {
    grid-template-columns: 1fr;
    margin-top: 34px;
  }

  .admin-layout {
    display: block;
  }

  .rail {
    position: fixed;
    inset: 60px auto 0 0;
    z-index: 50;
    width: min(280px, 82vw);
    display: none;
    border-right: 1px solid var(--line);
    background: var(--paper-raised);
    box-shadow: 18px 0 40px rgba(15, 41, 32, 0.16);
  }

  .rail.open {
    display: block;
  }

  .admin-toolbar {
    min-height: 60px;
    padding: 0 13px;
    gap: 10px;
  }

  .page-title p,
  .toolbar-actions .text-action {
    display: none;
  }

  .tab-list {
    margin-left: auto;
  }

  .tab-button {
    padding: 0 10px;
    font-size: 12px;
  }

  .toolbar-actions {
    margin-left: 0;
  }

  .toolbar-actions .button {
    min-height: 36px;
    padding: 6px 10px;
    font-size: 12px;
  }

  .editor {
    display: block;
    min-height: calc(100dvh - 120px);
  }

  .palette {
    padding: 14px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .palette .panel-title {
    margin-bottom: 10px;
  }

  .palette-group {
    display: inline-block;
    width: 100%;
    margin: 0 0 8px;
  }

  .palette-grid {
    display: flex;
    overflow-x: auto;
    padding-bottom: 5px;
  }

  .palette-field {
    min-width: 92px;
  }

  .canvas-wrap {
    padding: 18px 12px 70px;
  }

  .canvas {
    min-height: 0;
    padding: 24px 17px 34px;
    border-radius: 18px 6px 18px 18px;
  }

  .canvas h2 {
    font-size: 27px;
  }

  .inspector {
    right: 0;
    left: 0;
    max-height: 64vh;
    border-radius: 18px 18px 0 0;
  }

  .records-panel {
    padding: 18px 12px;
  }
}

@media (max-width: 430px) {
  .top-actions .button span {
    display: none;
  }

  .form-page {
    padding: 12px 10px 36px;
  }

  .form-sheet {
    border-radius: 18px 5px 18px 18px;
    padding: 23px 17px 28px;
  }

  .submit-row {
    align-items: stretch;
    flex-direction: column;
  }

  .progress {
    width: 100%;
    flex: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

/* Web data desk */
.demo-page {
  overflow-x: hidden;
  background: #f3f5f0;
}

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

.demo-sidebar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  height: 100vh;
  min-width: 0;
  flex-direction: column;
  padding: 22px 15px 18px;
  overflow-y: auto;
  color: #eaf1ed;
  background:
    radial-gradient(circle at 0 0, rgba(135, 189, 158, 0.16), transparent 34%),
    #173f35;
}

.demo-sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 7px 22px;
}

.demo-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: #fffdf7;
  text-decoration: none;
  font-size: 17px;
  font-weight: 720;
  letter-spacing: 0.04em;
}

.demo-brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px 12px 12px 3px;
  background: #e5b25f;
  color: #173f35;
  font-family: "STSong", "Songti SC", serif;
  font-size: 22px;
}

.demo-brand small {
  display: block;
  margin-top: 3px;
  color: rgba(234, 241, 237, 0.55);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.12em;
}

.demo-close-menu {
  display: none;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  font-size: 28px;
  cursor: pointer;
}

.demo-workspace {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 60px;
  margin-bottom: 25px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
}

.demo-workspace-icon {
  display: grid;
  width: 34px;
  height: 34px;
  flex: none;
  place-items: center;
  border-radius: 9px;
  background: rgba(229, 178, 95, 0.16);
  color: #f2c67f;
  font-family: "STSong", "Songti SC", serif;
  font-size: 17px;
}

.demo-workspace small,
.demo-workspace strong {
  display: block;
}

.demo-workspace small {
  margin-bottom: 3px;
  color: rgba(234, 241, 237, 0.52);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.demo-workspace strong {
  overflow: hidden;
  font-size: 13px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.demo-nav-label {
  padding: 0 11px;
  margin-bottom: 8px;
  color: rgba(234, 241, 237, 0.42);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.demo-table-nav {
  display: grid;
  gap: 3px;
}

.demo-table-link {
  position: relative;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) 7px;
  gap: 9px;
  align-items: center;
  min-height: 43px;
  padding: 8px 11px;
  border-radius: 9px;
  color: rgba(239, 246, 242, 0.72);
  text-decoration: none;
  transition: color 140ms ease, background 140ms ease;
}

.demo-table-link:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.demo-table-link.active {
  background: rgba(255, 255, 255, 0.11);
  color: #fff;
}

.demo-table-link.active::before {
  content: "";
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 0;
  width: 2px;
  border-radius: 2px;
  background: #e5b25f;
}

.demo-table-icon {
  display: grid;
  place-items: center;
}

.demo-table-icon .icon {
  width: 16px;
  height: 16px;
}

.demo-table-link > span:nth-child(2) {
  overflow: hidden;
  font-size: 12px;
  font-weight: 570;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.demo-table-link > i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: transparent;
}

.demo-table-link.active > i {
  background: #7ec49c;
}

.demo-nav-skeleton {
  width: 100%;
  height: 39px;
  margin-bottom: 4px;
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(255,255,255,.06), rgba(255,255,255,.12), rgba(255,255,255,.06));
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}

.demo-nav-skeleton.short {
  width: 76%;
}

.demo-sidebar-spacer {
  flex: 1;
  min-height: 40px;
}

.demo-secondary-nav {
  display: grid;
  gap: 2px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.demo-secondary-nav a {
  display: flex;
  min-height: 38px;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 8px;
  color: rgba(239, 246, 242, 0.65);
  text-decoration: none;
  font-size: 11px;
}

.demo-secondary-nav a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.demo-nav-symbol {
  display: grid;
  width: 19px;
  height: 19px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 5px;
  font-size: 12px;
}

.demo-sidebar-note {
  margin: 12px 9px 0;
  color: rgba(234, 241, 237, 0.36);
  font-size: 9px;
  line-height: 1.65;
}

.demo-sidebar-shade {
  display: none;
}

.demo-main {
  min-width: 0;
  min-height: 100vh;
}

.demo-topbar {
  position: sticky;
  top: 0;
  z-index: 25;
  display: flex;
  height: 64px;
  align-items: center;
  gap: 14px;
  padding: 0 28px;
  border-bottom: 1px solid #e0e5dc;
  background: rgba(255, 255, 252, 0.9);
  backdrop-filter: blur(18px);
}

.demo-menu-button {
  display: none;
}

.demo-breadcrumb {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
  color: #87928b;
  font-size: 11px;
}

.demo-breadcrumb b {
  color: #c5ccc6;
  font-weight: 400;
}

.demo-breadcrumb strong {
  overflow: hidden;
  color: #2b433a;
  font-size: 12px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.demo-topbar-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-left: auto;
}

.demo-connection {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-right: 5px;
  color: #8c9790;
  font-size: 10px;
}

.demo-connection i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #adb7af;
}

.demo-connection.online i {
  background: #39906d;
  box-shadow: 0 0 0 4px rgba(57, 144, 109, 0.1);
}

.demo-icon-button {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid #dce2d9;
  border-radius: 9px;
  background: #fffefa;
  color: #5f7168;
}

.demo-icon-button:hover {
  border-color: #a9baad;
  color: #244a3d;
}

.demo-icon-button .icon {
  width: 17px;
  height: 17px;
}

.demo-add-top {
  min-height: 38px;
  padding: 7px 14px;
  font-size: 12px;
}

.demo-content {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 42px clamp(22px, 4vw, 62px) 60px;
}

.demo-page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.demo-eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 10px;
  color: #829088;
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 0.13em;
}

.demo-eyebrow i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #b6c0b8;
}

.demo-page-heading h1 {
  margin: 0;
  color: #183a30;
  font-family: "STSong", "Songti SC", serif;
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 620;
  letter-spacing: -0.035em;
  line-height: 1.15;
}

.demo-page-heading p {
  margin: 9px 0 0;
  color: #7c8982;
  font-size: 14px;
  line-height: 1.55;
}

.demo-heading-meta {
  display: flex;
  gap: 15px;
  padding-bottom: 4px;
  color: #89958e;
  font-size: 12px;
  white-space: nowrap;
}

.demo-heading-meta span + span {
  position: relative;
}

.demo-heading-meta span + span::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -8px;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: #aeb8b1;
}

.demo-table-card {
  overflow: hidden;
  border: 1px solid #dfe4db;
  border-radius: 16px;
  background: #fffefa;
  box-shadow: 0 18px 55px rgba(35, 66, 53, 0.065);
}

.demo-table-toolbar {
  display: flex;
  min-height: 58px;
  align-items: center;
  gap: 16px;
  padding: 9px 13px;
  border-bottom: 1px solid #e5e9e1;
}

.demo-search {
  position: relative;
  display: flex;
  width: min(330px, 100%);
  align-items: center;
}

.demo-search > span {
  position: absolute;
  left: 12px;
  width: 12px;
  height: 12px;
  border: 1.6px solid #94a098;
  border-radius: 50%;
}

.demo-search > span::after {
  content: "";
  position: absolute;
  right: -5px;
  bottom: -3px;
  width: 6px;
  height: 1.6px;
  border-radius: 2px;
  background: #94a098;
  transform: rotate(45deg);
}

.demo-search input {
  width: 100%;
  min-height: 38px;
  padding: 8px 12px 8px 34px;
  border: 1px solid #dde3da;
  border-radius: 9px;
  background: #f9faf6;
  color: #29473c;
  font-size: 13px;
}

.demo-query-select {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #7c8982;
  font-size: 11px;
  white-space: nowrap;
}

.demo-query-select select {
  min-height: 38px;
  max-width: 190px;
  padding: 7px 9px;
  border: 1px solid #dde3da;
  border-radius: 9px;
  background: #f9faf6;
  color: #29473c;
  font: inherit;
  font-size: 13px;
}

.demo-column-picker {
  position: relative;
}

.demo-column-picker summary {
  display: flex;
  min-height: 38px;
  align-items: center;
  padding: 7px 11px;
  border: 1px solid #dde3da;
  border-radius: 9px;
  background: #f9faf6;
  color: #40594e;
  font-size: 13px;
  font-weight: 650;
  list-style: none;
  cursor: pointer;
}

.demo-column-picker summary::after {
  margin-left: 7px;
  color: #8b978f;
  content: "⌄";
}

.demo-column-picker[open] summary {
  border-color: #7fa48e;
}

.demo-column-picker > div {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  right: 0;
  display: grid;
  width: 230px;
  max-height: 320px;
  gap: 3px;
  padding: 9px;
  overflow-y: auto;
  border: 1px solid #d8ded8;
  border-radius: 10px;
  background: #fffefb;
  box-shadow: 0 14px 34px rgba(29, 57, 45, 0.16);
}

.demo-column-picker label {
  display: flex;
  min-height: 32px;
  align-items: center;
  gap: 8px;
  padding: 5px 7px;
  border-radius: 6px;
  color: #40584d;
  font-size: 13px;
}

.demo-column-picker label:hover {
  background: #f0f5ef;
}

.demo-column-picker input {
  accent-color: #216348;
}

.demo-toolbar-group {
  display: flex;
  gap: 7px;
  margin-left: auto;
}

.demo-tool-button {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  padding: 7px 11px;
  border: 1px solid #dce2da;
  border-radius: 8px;
  background: #fffefa;
  color: #65746c;
  text-decoration: none;
  font-size: 12px;
  cursor: pointer;
}

.demo-tool-button:hover {
  border-color: #adbaae;
  color: #244a3d;
}

.demo-table-viewport {
  position: relative;
  min-height: 420px;
  overflow: auto;
}

.demo-data-table {
  width: 100%;
  min-width: 720px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.demo-data-table th,
.demo-data-table td {
  height: 60px;
  padding: 10px 15px;
  overflow: hidden;
  border-right: 1px solid #e8ece5;
  border-bottom: 1px solid #e8ece5;
  color: #42584f;
  font-size: 14px;
  text-align: left;
  text-overflow: ellipsis;
}

.demo-data-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  height: 54px;
  background: #f7f9f4;
  color: #314c41;
  font-weight: 650;
}

.demo-data-table th small {
  display: block;
  margin-top: 3px;
  color: #9aa59e;
  font-size: 11px;
  font-weight: 500;
}

.demo-data-table th:last-child,
.demo-data-table td:last-child {
  border-right: 0;
}

.demo-data-table tbody tr:last-child td {
  border-bottom: 0;
}

.demo-data-table tbody tr:hover td {
  background: #fafbf7;
}

.demo-data-table .demo-row-number {
  width: 52px;
  color: #a4ada7;
  font-family: "Georgia", serif;
  text-align: center;
}

.demo-cell-empty {
  color: #c3cac4;
}

.demo-calculated-cell {
  color: #1f6652;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.demo-pills,
.demo-file-stack {
  display: flex;
  gap: 5px;
  overflow: hidden;
}

.demo-pill,
.demo-file-stack a,
.demo-file-stack span {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  padding: 3px 7px;
  border-radius: 999px;
  background: #e8f0e9;
  color: #31614e;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.demo-file-stack a {
  border: 1px solid #d7e1d8;
  background: #f3f7f2;
}

.demo-flag {
  display: inline-flex;
  padding: 3px 8px;
  border-radius: 999px;
  background: #f0f1ed;
  color: #7f8983;
}

.demo-flag-yes {
  background: #e2f1e7;
  color: #277152;
}

.demo-loading,
.demo-empty {
  min-height: 420px;
}

.demo-loading {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  color: #7f8d85;
  font-size: 11px;
}

.demo-loading > span {
  width: 24px;
  height: 24px;
  border: 2px solid #dce4dc;
  border-top-color: #316a55;
  border-radius: 50%;
  animation: demo-spin 720ms linear infinite;
}

@keyframes demo-spin {
  to { transform: rotate(360deg); }
}

.demo-empty {
  display: grid;
  place-items: center;
  align-content: center;
  padding: 32px;
  text-align: center;
}

.demo-empty[hidden],
.demo-loading[hidden],
.demo-data-table[hidden] {
  display: none;
}

.demo-empty-icon {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 18px 18px 18px 5px;
  background: #e7efe6;
  color: #35624f;
  font-family: "STSong", "Songti SC", serif;
  font-size: 26px;
}

.demo-empty h2 {
  margin: 19px 0 7px;
  color: #29483c;
  font-size: 18px;
}

.demo-empty p {
  max-width: 340px;
  margin: 0 0 20px;
  color: #89938d;
  font-size: 11px;
  line-height: 1.7;
}

.demo-table-footer {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 14px;
  border-top: 1px solid #e8ece5;
  color: #9aa49e;
  font-size: 9px;
}

.demo-record-dialog {
  width: min(620px, calc(100vw - 32px));
  max-height: min(760px, calc(100vh - 48px));
  padding: 0;
  overflow: hidden;
  border: 1px solid #dce2d9;
  border-radius: 18px;
  background: #fffefa;
  color: #213e33;
  box-shadow: 0 35px 100px rgba(14, 43, 32, 0.28);
}

.demo-record-dialog::backdrop {
  background: rgba(17, 42, 33, 0.48);
  backdrop-filter: blur(4px);
}

.demo-record-dialog form {
  display: flex;
  max-height: min(760px, calc(100vh - 48px));
  flex-direction: column;
}

.demo-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 26px 20px;
  border-bottom: 1px solid #e5e9e1;
  background:
    linear-gradient(110deg, rgba(230, 240, 231, 0.92), rgba(255, 254, 250, 0.9)),
    #fffefa;
}

.demo-dialog-head span {
  color: #7c9085;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.15em;
}

.demo-dialog-head h2 {
  margin: 6px 0 4px;
  font-family: "STSong", "Songti SC", serif;
  font-size: 27px;
  font-weight: 650;
}

.demo-dialog-head p {
  margin: 0;
  color: #829087;
  font-size: 10px;
}

.demo-dialog-close {
  display: grid;
  width: 34px;
  height: 34px;
  flex: none;
  place-items: center;
  border: 1px solid #d9e0d7;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  color: #69776f;
  font-size: 22px;
  cursor: pointer;
}

.demo-dynamic-fields {
  display: grid;
  gap: 17px;
  padding: 24px 26px;
  overflow-y: auto;
}

.demo-dynamic-field {
  display: grid;
  gap: 7px;
}

.demo-dynamic-field > label:not(.demo-checkbox):not(.demo-upload-zone) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #344d43;
  font-size: 11px;
  font-weight: 650;
}

.demo-dynamic-field label b {
  color: #be5b42;
}

.demo-dynamic-field label em,
.demo-checkbox em {
  color: #98a39c;
  font-size: 8px;
  font-style: normal;
  font-weight: 500;
}

.demo-dynamic-field input:not([type="checkbox"]):not([type="file"]),
.demo-dynamic-field textarea,
.demo-dynamic-field select {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid #d7ded5;
  border-radius: 9px;
  background: #fbfcf8;
  color: #284439;
  font-size: 12px;
}

.demo-dynamic-field textarea {
  resize: vertical;
  line-height: 1.65;
}

.demo-dynamic-field input:focus,
.demo-dynamic-field textarea:focus,
.demo-dynamic-field select:focus {
  border-color: #739987;
  outline: 3px solid rgba(54, 100, 80, 0.1);
}

.demo-field-help {
  color: #98a29c;
  font-size: 9px;
  line-height: 1.5;
}

.demo-checkbox-field {
  padding: 12px;
  border: 1px solid #dfe4dc;
  border-radius: 10px;
  background: #fafbf7;
}

.demo-checkbox {
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
}

.demo-checkbox input {
  width: 16px;
  height: 16px;
  accent-color: #28614d;
}

.demo-checkbox span {
  font-size: 11px;
  font-weight: 650;
}

.demo-checkbox em {
  margin-left: auto;
}

.demo-upload-zone {
  display: grid !important;
  min-height: 96px;
  place-items: center;
  align-content: center;
  gap: 5px;
  padding: 18px;
  border: 1px dashed #9eb5a6;
  border-radius: 10px;
  background: #fafbf7;
  color: #4f695e;
  text-align: center;
  cursor: pointer;
}

.demo-upload-zone:hover {
  border-color: #3e725c;
  background: #f5f9f4;
}

.demo-upload-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.demo-upload-zone span {
  font-size: 11px;
  font-weight: 650;
}

.demo-upload-zone small {
  color: #98a39c;
  font-size: 9px;
}

.demo-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 15px 26px;
  border-top: 1px solid #e5e9e1;
  background: #f8f9f5;
}

.demo-dialog-actions .button {
  min-height: 38px;
  font-size: 11px;
}

.demo-form-error {
  margin: 0 26px 14px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #f7e6df;
  color: #913b29;
  font-size: 10px;
}

@media (max-width: 860px) {
  .demo-shell {
    display: block;
  }

  .demo-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 70;
    width: min(270px, 84vw);
    display: none;
    box-shadow: 24px 0 70px rgba(10, 36, 27, 0.28);
  }

  .demo-sidebar.open {
    display: flex;
  }

  .demo-sidebar-shade {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: none;
    background: rgba(15, 41, 32, 0.4);
  }

  .demo-sidebar-shade.open {
    display: block;
  }

  .demo-close-menu,
  .demo-menu-button {
    display: grid;
  }

  .demo-menu-button {
    width: 36px;
    height: 36px;
    place-items: center;
    border: 1px solid #dce2d9;
    border-radius: 8px;
    background: #fffefa;
  }

  .demo-topbar {
    height: 58px;
    padding: 0 14px;
  }

  .demo-content {
    padding: 28px 14px 40px;
  }

  .demo-page-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 13px;
  }

  .demo-heading-meta {
    padding-bottom: 0;
  }

  .demo-table-toolbar {
    flex-wrap: wrap;
  }

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

@media (max-width: 560px) {
  .demo-connection,
  .demo-icon-button,
  .demo-breadcrumb span,
  .demo-breadcrumb b {
    display: none;
  }

  .demo-add-top span {
    display: none;
  }

  .demo-table-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .demo-page-heading h1 {
    font-size: 34px;
  }

  .demo-dialog-head,
  .demo-dynamic-fields,
  .demo-dialog-actions {
    padding-right: 18px;
    padding-left: 18px;
  }

  .demo-form-error {
    margin-right: 18px;
    margin-left: 18px;
  }
}

/* Family workbench admin */
.fw-admin {
  min-width: 320px;
  overflow: hidden;
  background: #eff2ed;
  color: #1c302a;
  font-family: "Segoe UI", "Microsoft YaHei UI", "PingFang SC", sans-serif;
  font-size: 14px;
}

.fw-admin *,
.fw-admin *::before,
.fw-admin *::after {
  box-sizing: border-box;
}

.fw-admin [hidden] {
  display: none !important;
}

.fw-admin button,
.fw-admin input,
.fw-admin select,
.fw-admin textarea {
  font: inherit;
}

.fw-admin-shell {
  min-height: 100vh;
  background: #eff2ed;
}

.fw-admin-topbar {
  position: relative;
  z-index: 20;
  display: grid;
  height: 64px;
  grid-template-columns: 236px minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  padding: 0 20px;
  border-bottom: 1px solid #d9dfda;
  background: rgba(255, 253, 248, 0.97);
  box-shadow: 0 1px 8px rgba(25, 51, 41, 0.04);
}

.fw-admin-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: #183d33;
  font-size: 18px;
  font-weight: 750;
  text-decoration: none;
}

.fw-admin-brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid #d0b071;
  border-radius: 12px 12px 12px 4px;
  background: #e4bc72;
  color: #183d33;
  font-family: "STSong", "Songti SC", serif;
  font-size: 23px;
}

.fw-admin-brand small {
  display: block;
  margin-top: 2px;
  color: #758078;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.fw-admin-topnav {
  display: flex;
  height: 100%;
  align-items: center;
  gap: 8px;
}

.fw-admin-topnav a {
  display: flex;
  height: 100%;
  align-items: center;
  padding: 0 12px;
  color: #67736c;
  text-decoration: none;
  font-size: 14px;
}

.fw-admin-topnav a.active {
  position: relative;
  color: #1f5e4d;
  font-weight: 700;
}

.fw-admin-topnav a.active::after {
  position: absolute;
  right: 12px;
  bottom: 0;
  left: 12px;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: #1f6a54;
  content: "";
}

.fw-admin-topactions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.fw-admin-layout {
  display: grid;
  height: calc(100vh - 64px);
  grid-template-columns: 236px minmax(520px, 1fr) 360px;
  overflow: hidden;
}

.fw-admin-sidebar {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 22px 14px 18px;
  overflow-y: auto;
  background:
    radial-gradient(circle at 0 0, rgba(133, 187, 157, 0.16), transparent 36%),
    #173f35;
  color: #edf4ef;
}

.fw-workspace-card {
  display: flex;
  min-height: 65px;
  align-items: center;
  gap: 11px;
  margin: 0 5px 26px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.07);
}

.fw-workspace-icon {
  display: grid;
  width: 37px;
  height: 37px;
  flex: none;
  place-items: center;
  border-radius: 10px;
  background: rgba(229, 178, 95, 0.17);
  color: #f0c378;
  font-family: "STSong", "Songti SC", serif;
  font-size: 18px;
}

.fw-workspace-card small,
.fw-workspace-card strong {
  display: block;
}

.fw-workspace-card small {
  margin-bottom: 3px;
  color: rgba(237, 244, 239, 0.54);
  font-size: 10px;
}

.fw-workspace-card strong {
  font-size: 14px;
  font-weight: 700;
}

.fw-sidebar-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  margin-bottom: 9px;
  color: rgba(237, 244, 239, 0.52);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.fw-sidebar-heading button {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border: 0;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 19px;
  cursor: pointer;
}

.fw-table-nav {
  display: grid;
  gap: 4px;
}

.fw-table-link {
  display: grid;
  width: 100%;
  min-height: 45px;
  grid-template-columns: 20px minmax(0, 1fr) 7px;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: rgba(239, 246, 242, 0.72);
  text-align: left;
  cursor: pointer;
}

.fw-table-link:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

.fw-table-link.active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  box-shadow: inset 3px 0 0 #e5b25f;
}

.fw-table-link > span:nth-child(2) {
  overflow: hidden;
  font-size: 13px;
  font-weight: 620;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fw-table-link i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: transparent;
}

.fw-table-link.active i {
  background: #77c397;
}

.fw-table-symbol {
  font-size: 16px;
  text-align: center;
}

.fw-new-table {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: 9px;
  background: transparent;
  color: rgba(239, 246, 242, 0.68);
  cursor: pointer;
}

.fw-new-table:hover {
  border-color: rgba(255, 255, 255, 0.34);
  color: #fff;
}

.fw-sidebar-spacer {
  flex: 1;
  min-height: 34px;
}

.fw-sidebar-note {
  margin: 18px 8px 0;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(237, 244, 239, 0.45);
  font-size: 11px;
  line-height: 1.7;
}

.fw-skeleton {
  height: 42px;
  border-radius: 9px;
  background: linear-gradient(90deg, rgba(255,255,255,.05), rgba(255,255,255,.11), rgba(255,255,255,.05));
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}

.fw-skeleton.short {
  width: 76%;
}

.fw-admin-main {
  min-width: 0;
  overflow: auto;
  background:
    linear-gradient(90deg, rgba(34, 83, 66, 0.025) 1px, transparent 1px),
    linear-gradient(rgba(34, 83, 66, 0.025) 1px, transparent 1px),
    #f4f6f1;
  background-size: 32px 32px;
}

.fw-main-header {
  display: flex;
  min-height: 62px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 26px;
  border-bottom: 1px solid #dce2dc;
  background: rgba(255, 253, 248, 0.88);
}

.fw-breadcrumb {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
  color: #818b84;
  font-size: 13px;
}

.fw-breadcrumb strong {
  overflow: hidden;
  color: #263b34;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fw-breadcrumb i {
  color: #b2bab4;
  font-style: normal;
}

.fw-main-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 11px;
}

.fw-connection {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #8a938d;
  font-size: 12px;
}

.fw-connection i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #c8a958;
}

.fw-connection.online {
  color: #47715f;
}

.fw-connection.online i {
  background: #46a274;
  box-shadow: 0 0 0 3px rgba(70, 162, 116, 0.12);
}

.fw-table-workspace {
  width: min(1120px, calc(100% - 42px));
  margin: 0 auto;
  padding: 30px 0 50px;
}

.fw-no-table {
  display: grid;
  width: min(720px, calc(100% - 42px));
  min-height: calc(100vh - 64px);
  align-content: center;
  justify-items: start;
  margin: 0 auto;
  padding: 50px 0;
}

.fw-no-table[hidden] {
  display: none;
}

.fw-no-table > span {
  color: #a08348;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.16em;
}

.fw-no-table h1 {
  margin: 10px 0 0;
  color: #173b31;
  font-family: "STSong", "Songti SC", serif;
  font-size: clamp(34px, 5vw, 54px);
  font-weight: 600;
}

.fw-no-table p {
  max-width: 560px;
  margin: 12px 0 24px;
  color: #738078;
  font-size: 15px;
  line-height: 1.75;
}

.fw-table-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.fw-eyebrow {
  display: block;
  margin-bottom: 8px;
  color: #8b978f;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.15em;
}

.fw-table-heading h1 {
  margin: 0;
  color: #173b31;
  font-family: "STSong", "Songti SC", serif;
  font-size: clamp(30px, 3vw, 42px);
  font-weight: 600;
  line-height: 1.15;
}

.fw-table-heading p {
  max-width: 700px;
  margin: 8px 0 0;
  color: #77827b;
  font-size: 13px;
  line-height: 1.6;
}

.fw-heading-meta {
  display: flex;
  flex: none;
  align-items: center;
  gap: 14px;
  color: #879087;
  font-size: 12px;
}

.fw-heading-meta strong {
  color: #466255;
  font-weight: 650;
}

.fw-view-tabs {
  display: flex;
  gap: 4px;
  padding: 5px;
  border: 1px solid #dde2dc;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.64);
}

.fw-view-tabs button {
  min-height: 34px;
  padding: 6px 15px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #6d7771;
  font-size: 13px;
  cursor: pointer;
}

.fw-view-tabs button.active {
  background: #fffdf8;
  color: #1e5b49;
  font-weight: 700;
  box-shadow: 0 1px 5px rgba(26, 59, 46, 0.09);
}

.fw-view-panel {
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid #d9dfd9;
  border-radius: 14px;
  background: rgba(255, 254, 250, 0.94);
  box-shadow: 0 10px 35px rgba(35, 65, 51, 0.055);
}

.fw-panel-toolbar {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 18px;
  border-bottom: 1px solid #e2e6e1;
}

.fw-panel-toolbar h2 {
  margin: 0;
  color: #223831;
  font-size: 15px;
  font-weight: 730;
}

.fw-panel-toolbar p {
  margin: 4px 0 0;
  color: #89928c;
  font-size: 13px;
  line-height: 1.55;
}

.fw-button {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 13px;
  border: 1px solid #d4dbd5;
  border-radius: 9px;
  background: #fff;
  color: #40584d;
  text-decoration: none;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.2;
  cursor: pointer;
}

.fw-button:hover {
  border-color: #9db4a7;
}

.fw-button.primary {
  border-color: #1f6652;
  background: #1f6652;
  color: #fff;
}

.fw-button.primary:hover {
  background: #185441;
}

.fw-button.subtle {
  background: #fffdf8;
}

.fw-button.danger-text {
  margin-right: auto;
  border-color: transparent;
  background: transparent;
  color: #a94d48;
}

.fw-button.danger {
  border-color: #ddc8c2;
  background: #fff9f6;
  color: #a74942;
}

.fw-button.danger:hover {
  border-color: #c7988e;
  background: #f9ece7;
}

.fw-button.compact {
  min-height: 30px;
  padding: 5px 9px;
}

.fw-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.fw-field-table-wrap,
.fw-record-table-wrap {
  overflow: auto;
}

.fw-field-table,
.fw-record-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.fw-field-table {
  min-width: 680px;
}

.fw-field-table th,
.fw-field-table td,
.fw-record-table th,
.fw-record-table td {
  padding: 14px 17px;
  border-bottom: 1px solid #e7eae6;
  text-align: left;
  vertical-align: middle;
}

.fw-field-table th,
.fw-record-table th {
  background: #f8f8f4;
  color: #7d8881;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.035em;
}

.fw-field-table th:nth-child(1) {
  width: 47%;
}

.fw-field-table th:nth-child(2) {
  width: 19%;
}

.fw-field-table th:nth-child(3) {
  width: 20%;
}

.fw-field-table th:nth-child(4) {
  width: 14%;
}

.fw-field-row {
  cursor: pointer;
}

.fw-field-row:hover,
.fw-field-row:focus {
  outline: none;
  background: #f7faf6;
}

.fw-field-row.active {
  background: #f1f8f3;
  box-shadow: inset 3px 0 0 #26735c;
}

.fw-field-name {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 11px;
}

.fw-field-icon {
  display: grid;
  width: 34px;
  height: 34px;
  flex: none;
  place-items: center;
  border: 1px solid #dfe4de;
  border-radius: 9px;
  background: #fbfaf5;
  color: #5b6e65;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 13px;
  font-weight: 700;
}

.fw-field-name > span:last-child {
  min-width: 0;
}

.fw-field-name strong,
.fw-field-name small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fw-field-name strong {
  color: #273b34;
  font-size: 16px;
  font-weight: 680;
}

.fw-field-name small {
  max-width: 100%;
  margin-top: 3px;
  color: #929b95;
  font-size: 13px;
  line-height: 1.45;
}

.fw-type-chip,
.fw-required-chip,
.fw-optional-chip,
.fw-calculated-chip {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 620;
  white-space: nowrap;
}

.fw-type-chip {
  background: #edf2ed;
  color: #4e655a;
}

.fw-required-chip {
  background: #fae8e4;
  color: #a44e45;
}

.fw-optional-chip {
  color: #919b95;
}

.fw-calculated-chip {
  background: #e4f1e9;
  color: #21664f;
}

.fw-default-value {
  display: block;
  overflow: hidden;
  color: #66736c;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fw-table-loading,
.fw-field-empty,
.fw-record-empty {
  padding: 46px 20px;
  color: #89938d;
  text-align: center;
}

.fw-field-empty strong,
.fw-field-empty span {
  display: block;
}

.fw-field-empty strong {
  color: #425a50;
}

.fw-field-empty span {
  margin-top: 6px;
  font-size: 12px;
}

.fw-record-table {
  min-width: 760px;
}

.fw-record-table th,
.fw-record-table td {
  min-width: 140px;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fw-record-table th {
  position: sticky;
  top: 0;
  z-index: 1;
}

.fw-record-table td {
  color: #4f5e56;
  font-size: 14px;
}

.fw-record-table .fw-row-index {
  width: 46px;
  min-width: 46px;
  color: #9aa29d;
  font-variant-numeric: tabular-nums;
}

.fw-query-controls {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 190px auto auto;
  align-items: end;
  gap: 10px;
  padding: 13px 18px;
  border-bottom: 1px solid #e2e6e1;
  background: #fafbf7;
}

.fw-query-controls label {
  display: grid;
  gap: 5px;
  color: #728078;
  font-size: 11px;
  font-weight: 680;
}

.fw-query-controls input[type="search"],
.fw-query-controls select {
  min-height: 38px;
  padding: 7px 10px;
  border: 1px solid #d6ddd7;
  border-radius: 8px;
  background: #fff;
  color: #263f35;
  font: inherit;
  font-size: 13px;
}

.fw-column-picker {
  position: relative;
}

.fw-column-picker summary {
  display: flex;
  min-height: 38px;
  align-items: center;
  padding: 7px 12px;
  border: 1px solid #d6ddd7;
  border-radius: 8px;
  background: #fff;
  color: #40584d;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  list-style: none;
}

.fw-column-picker summary::after {
  margin-left: 10px;
  color: #8a968f;
  content: "⌄";
}

.fw-column-picker[open] summary {
  border-color: #8eb19e;
}

.fw-column-picker > div {
  position: absolute;
  z-index: 8;
  top: calc(100% + 6px);
  right: 0;
  display: grid;
  width: 230px;
  max-height: 320px;
  gap: 3px;
  padding: 9px;
  overflow-y: auto;
  border: 1px solid #d8ded8;
  border-radius: 10px;
  background: #fffefb;
  box-shadow: 0 14px 34px rgba(29, 57, 45, 0.16);
}

.fw-column-picker label {
  display: flex;
  min-height: 32px;
  align-items: center;
  gap: 8px;
  padding: 5px 7px;
  border-radius: 6px;
  color: #40584d;
  font-size: 13px;
  font-weight: 550;
}

.fw-column-picker label:hover {
  background: #f0f5ef;
}

.fw-column-picker input {
  accent-color: #216348;
}

.fw-query-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 1px;
  color: #718078;
  font-size: 12px;
  white-space: nowrap;
}

.fw-admin-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin: 0 0 14px;
  padding: 17px 20px;
  border: 1px solid #dfe5dc;
  border-radius: 12px;
  background: #fbfcf8;
}

.fw-admin-section-heading h2 {
  margin: 4px 0 0;
  color: #28483c;
  font-size: 18px;
}

.fw-admin-section-heading .fw-button {
  flex: none;
}

.fw-inspector {
  min-width: 0;
  overflow-y: auto;
  border-left: 1px solid #d9dfd9;
  background: #fffdf8;
}

.fw-inspector-head {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  min-height: 69px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid #e1e5df;
  background: rgba(255, 253, 248, 0.97);
}

.fw-inspector-head span,
.fw-inspector-head strong {
  display: block;
}

.fw-inspector-head > div > span {
  margin-bottom: 3px;
  color: #8b958e;
  font-size: 12px;
  letter-spacing: 0.06em;
}

.fw-inspector-head strong {
  max-width: 220px;
  overflow: hidden;
  color: #263c34;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fw-inspector-empty {
  display: flex;
  min-height: 430px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px;
  text-align: center;
}

.fw-inspector-empty > span {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 1px solid #dfe5df;
  border-radius: 15px;
  background: #f5f7f3;
  color: #718078;
  font-size: 12px;
}

.fw-inspector-empty h2 {
  margin: 16px 0 7px;
  color: #385047;
  font-size: 16px;
}

.fw-inspector-empty p {
  max-width: 260px;
  margin: 0;
  color: #8c958f;
  font-size: 13px;
  line-height: 1.7;
}

.fw-inspector-form {
  padding: 18px;
}

.fw-form-group,
.fw-setting-field {
  display: grid;
  gap: 7px;
  margin-bottom: 17px;
}

.fw-form-group > label,
.fw-setting-field {
  color: #52665d;
  font-size: 13px;
  font-weight: 680;
}

.fw-admin input:not([type="checkbox"]):not([type="color"]),
.fw-admin select,
.fw-admin textarea {
  width: 100%;
  min-height: 39px;
  padding: 8px 10px;
  border: 1px solid #d6ddd7;
  border-radius: 8px;
  outline: none;
  background: #fff;
  color: #283d35;
  font-size: 13px;
}

.fw-admin textarea {
  resize: vertical;
  line-height: 1.55;
}

.fw-admin input:focus,
.fw-admin select:focus,
.fw-admin textarea:focus {
  border-color: #4c8b74;
  box-shadow: 0 0 0 3px rgba(54, 122, 97, 0.1);
}

.fw-admin input[type="color"] {
  width: 38px;
  min-width: 38px;
  height: 34px;
  padding: 2px;
  border: 1px solid #d7ddd8;
  border-radius: 7px;
  background: #fff;
}

.fw-field-hint {
  margin: -1px 0 0;
  color: #939d97;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
}

.fw-type-settings {
  margin: 21px 0;
  padding: 17px 0;
  border-top: 1px solid #e4e7e3;
  border-bottom: 1px solid #e4e7e3;
}

.fw-settings-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 13px;
  color: #42594f;
  font-size: 13px;
  font-weight: 720;
}

.fw-settings-heading small {
  color: #929b95;
  font-size: 12px;
  font-weight: 500;
}

.fw-setting-check {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 10px 0;
  color: #53665e;
  font-size: 13px;
  cursor: pointer;
}

.fw-setting-check input,
.fw-required-toggle input,
.fw-default-check input {
  width: 17px;
  height: 17px;
  flex: none;
  margin: 0;
  accent-color: #247158;
}

.fw-setting-check span,
.fw-setting-check strong,
.fw-setting-check small {
  display: block;
}

.fw-setting-check strong {
  font-weight: 650;
}

.fw-setting-check small {
  margin-top: 3px;
  color: #929b95;
  font-size: 12px;
  line-height: 1.5;
}

.fw-setting-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.fw-choice-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 9px;
  color: #52665d;
  font-size: 13px;
  font-weight: 680;
}

.fw-choice-list {
  display: grid;
  gap: 7px;
}

.fw-choice-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 6px;
}

.fw-choice-row input[type="text"] {
  min-width: 0;
}

.fw-choice-row button {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #a66a63;
  font-size: 18px;
  cursor: pointer;
}

.fw-empty-setting {
  margin: 8px 0 0;
  color: #929c96;
  font-size: 12px;
  line-height: 1.6;
}

.fw-default-check {
  display: flex;
  min-height: 39px;
  align-items: center;
  gap: 8px;
  color: #52665d;
  font-size: 12px;
}

.fw-required-toggle {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 6px 0 20px;
  padding: 12px;
  border: 1px solid #e1e5e0;
  border-radius: 9px;
  background: #f7f8f4;
  cursor: pointer;
}

.fw-required-toggle strong,
.fw-required-toggle small {
  display: block;
}

.fw-required-toggle strong {
  color: #4e635a;
  font-size: 13px;
}

.fw-required-toggle small {
  margin-top: 3px;
  color: #909a94;
  font-size: 12px;
  line-height: 1.5;
}

.fw-inspector-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 17px;
  border-top: 1px solid #e3e6e2;
}

.fw-dialog {
  width: min(520px, calc(100vw - 28px));
  padding: 0;
  overflow: hidden;
  border: 1px solid #d6ddd6;
  border-radius: 16px;
  background: #fffdf8;
  color: #213a31;
  box-shadow: 0 30px 90px rgba(13, 38, 29, 0.25);
}

.fw-dialog::backdrop {
  background: rgba(19, 42, 34, 0.48);
  backdrop-filter: blur(3px);
}

.fw-dialog form {
  margin: 0;
}

.fw-dialog header {
  padding: 23px 24px 18px;
  border-bottom: 1px solid #e4e7e3;
  background: #f8f7f1;
}

.fw-dialog header > span {
  color: #a08348;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.16em;
}

.fw-dialog h2 {
  margin: 7px 0 5px;
  color: #183d32;
  font-family: "STSong", "Songti SC", serif;
  font-size: 27px;
  font-weight: 600;
}

.fw-dialog header p {
  margin: 0;
  color: #818c85;
  font-size: 13px;
  line-height: 1.6;
}

.fw-dialog-body {
  display: grid;
  gap: 15px;
  padding: 20px 24px;
}

.fw-dialog-body label {
  display: grid;
  gap: 7px;
  color: #52665d;
  font-size: 13px;
  font-weight: 680;
}

.fw-type-preview {
  padding: 12px;
  border: 1px solid #e0e5df;
  border-radius: 9px;
  background: #f7f8f4;
}

.fw-type-preview span,
.fw-type-preview small {
  display: block;
}

.fw-type-preview span {
  color: #3d574c;
  font-size: 12px;
  font-weight: 680;
}

.fw-type-preview small {
  margin-top: 4px;
  color: #89938d;
  font-size: 12px;
  line-height: 1.5;
}

.fw-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.fw-import-dialog {
  width: min(1120px, calc(100vw - 32px));
  max-height: calc(100vh - 34px);
}

.fw-import-dialog form {
  display: flex;
  max-height: calc(100vh - 36px);
  flex-direction: column;
}

.fw-import-dialog header,
.fw-import-dialog footer {
  flex: none;
}

.fw-import-body {
  min-height: 0;
  overflow-y: auto;
}

.fw-file-picker {
  padding: 15px;
  border: 1px dashed #bfcbc2;
  border-radius: 11px;
  background: #f7f9f5;
}

.fw-file-picker small {
  color: #7e8a83;
  font-size: 12px;
  font-weight: 450;
  line-height: 1.55;
}

.fw-admin .fw-file-picker input[type="file"] {
  padding: 10px;
  background: #fffdf8;
}

.fw-admin .fw-file-picker input[type="file"]::file-selector-button {
  margin-right: 12px;
  padding: 7px 11px;
  border: 1px solid #b9c8be;
  border-radius: 7px;
  background: #edf3ed;
  color: #315448;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}

.fw-import-meta {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) minmax(170px, .8fr) auto;
  align-items: end;
  gap: 14px;
}

.fw-import-check {
  min-height: 39px;
  grid-template-columns: 18px auto !important;
  align-items: center;
  align-self: end;
  padding: 8px 10px;
  border: 1px solid #d6ddd7;
  border-radius: 8px;
  background: #fff;
  white-space: nowrap;
}

.fw-import-check input {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: #247158;
}

.fw-import-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border: 1px solid #d8e3da;
  border-radius: 9px;
  background: #edf5ef;
  color: #436054;
  font-size: 13px;
}

.fw-import-summary strong {
  color: #1f5543;
}

.fw-import-config,
.fw-import-preview {
  overflow: hidden;
  border: 1px solid #dfe4df;
  border-radius: 11px;
  background: #fff;
}

.fw-import-config-head,
.fw-import-preview-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border-bottom: 1px solid #e3e7e2;
  background: #f9f9f5;
}

.fw-import-config-head > div {
  display: grid;
  gap: 3px;
}

.fw-import-config-head strong,
.fw-import-preview-title strong {
  color: #2c493e;
  font-size: 14px;
}

.fw-import-config-head span,
.fw-import-preview-title span {
  color: #78867e;
  font-size: 12px;
  line-height: 1.45;
}

.fw-import-columns {
  display: grid;
  max-height: 310px;
  overflow: auto;
}

.fw-import-column-row {
  display: grid;
  grid-template-columns: 32px minmax(180px, 1.2fr) minmax(160px, .7fr);
  align-items: end;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid #edf0ec;
  background: #fff;
}

.fw-import-column-row:last-child {
  border-bottom: 0;
}

.fw-import-column-row label {
  color: #5e7067;
  font-size: 12px;
}

.fw-import-column-index {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  align-self: center;
  border-radius: 8px;
  background: #eef3ee;
  color: #62756b;
  font-size: 12px;
  font-weight: 700;
}

.fw-import-preview-scroll {
  max-height: 250px;
  overflow: auto;
}

.fw-import-preview table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  table-layout: auto;
}

.fw-import-preview th,
.fw-import-preview td {
  max-width: 240px;
  padding: 10px 12px;
  overflow: hidden;
  border-right: 1px solid #ecefeb;
  border-bottom: 1px solid #ecefeb;
  color: #4c5d54;
  font-size: 12px;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fw-import-preview th {
  position: sticky;
  z-index: 1;
  top: 0;
  background: #f5f7f3;
  color: #344b41;
  font-size: 13px;
}

.fw-import-preview th small {
  display: block;
  margin-top: 3px;
  color: #89958e;
  font-size: 11px;
  font-weight: 550;
}

.fw-import-empty {
  padding: 24px !important;
  color: #8b958f !important;
  text-align: center !important;
}

.fw-import-table {
  margin-top: 7px;
}

.fw-dialog footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 24px 20px;
}

.fw-dialog-error {
  margin: 0 24px 4px;
  color: #a34640;
  font-size: 12px;
  line-height: 1.55;
}

.fw-login-layer {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background:
    radial-gradient(circle at 20% 10%, rgba(229, 178, 95, 0.15), transparent 34%),
    rgba(18, 52, 42, 0.84);
  backdrop-filter: blur(8px);
}

.fw-login-layer[hidden] {
  display: none;
}

.fw-login-card {
  width: min(430px, 100%);
  padding: 34px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 22px 7px 22px 22px;
  background: #fffdf7;
  box-shadow: 0 30px 100px rgba(6, 26, 20, 0.32);
}

.fw-login-mark {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 13px 13px 13px 4px;
  background: #e4bc72;
  color: #173d32;
  font-family: "STSong", "Songti SC", serif;
  font-size: 27px;
}

.fw-login-card h1 {
  margin: 21px 0 8px;
  color: #173d32;
  font-family: "STSong", "Songti SC", serif;
  font-size: 30px;
  font-weight: 600;
}

.fw-login-card > p {
  margin: 0 0 22px;
  color: #78847c;
  font-size: 13px;
  line-height: 1.65;
}

.fw-login-card label {
  display: grid;
  gap: 7px;
  margin-top: 14px;
  color: #52665c;
  font-size: 11px;
  font-weight: 680;
}

.fw-login-card .fw-button {
  width: 100%;
  min-height: 43px;
  margin-top: 19px;
}

.fw-login-card input[readonly] {
  background: #f2f4ef;
  color: #78827b;
}

.fw-login-reset {
  display: block;
  margin-top: 12px;
  color: #4a806c;
  font-size: 11px;
  text-align: center;
  text-decoration: none;
}

.fw-login-error {
  min-height: 18px;
  margin: 11px 0 0;
  color: #a54d45;
  font-size: 11px;
  text-align: center;
}

.fw-toast-region {
  position: fixed;
  z-index: 200;
  right: 22px;
  bottom: 22px;
  display: grid;
  gap: 8px;
}

.fw-toast {
  min-width: 230px;
  max-width: 420px;
  padding: 12px 15px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  background: #214c3f;
  color: #fff;
  font-size: 12px;
  box-shadow: 0 12px 35px rgba(15, 42, 32, 0.2);
}

.fw-toast.error {
  background: #8f4742;
}

.multi-choice-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.multi-choice {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 11px;
  border: 1px solid #dce2dc;
  border-radius: 9px;
  background: #fff;
  color: #445a50;
  font-size: 12px;
  cursor: pointer;
}

.multi-choice input {
  accent-color: #1f6a54;
}

@media (max-width: 1180px) {
  .fw-admin-layout {
    grid-template-columns: 210px minmax(480px, 1fr) 320px;
  }

  .fw-admin-topbar {
    grid-template-columns: 210px minmax(0, 1fr) auto;
  }

  .fw-form-group,
  .fw-setting-field {
    margin-bottom: 14px;
  }

  .fw-inspector-form {
    padding: 15px;
  }
}

@media (max-width: 920px) {
  .fw-admin {
    overflow: auto;
  }

  .fw-admin-topbar {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .fw-admin-topnav {
    display: none;
  }

  .fw-admin-layout {
    height: auto;
    grid-template-columns: 190px minmax(0, 1fr);
    overflow: visible;
  }

  .fw-admin-sidebar {
    min-height: calc(100vh - 64px);
  }

  .fw-admin-main {
    min-height: calc(100vh - 64px);
  }

  .fw-inspector {
    grid-column: 1 / -1;
    border-top: 1px solid #d9dfd9;
    border-left: 0;
  }

  .fw-inspector-empty {
    min-height: 230px;
  }

  .fw-import-meta {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .fw-import-check {
    grid-column: 1 / -1;
  }
}

@media (max-width: 680px) {
  .fw-admin-topbar {
    height: 58px;
    padding: 0 12px;
  }

  .fw-admin-brand {
    font-size: 16px;
  }

  .fw-admin-brand-mark {
    width: 34px;
    height: 34px;
  }

  .fw-admin-topactions .subtle:first-child {
    display: none;
  }

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

  .fw-admin-sidebar {
    min-height: 0;
    max-height: none;
    padding: 12px;
    overflow: visible;
  }

  .fw-workspace-card,
  .fw-sidebar-note,
  .fw-sidebar-spacer {
    display: none;
  }

  .fw-sidebar-heading {
    padding: 0 4px;
  }

  .fw-table-nav {
    display: flex;
    overflow-x: auto;
  }

  .fw-table-link {
    width: auto;
    min-width: 150px;
  }

  .fw-new-table {
    display: none;
  }

  .fw-import-table {
    display: flex;
  }

  .fw-main-header {
    min-height: 54px;
    padding: 0 14px;
  }

  .fw-connection,
  .fw-main-actions .subtle {
    display: none;
  }

  .fw-table-workspace {
    width: calc(100% - 20px);
    padding-top: 20px;
  }

  .fw-table-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 11px;
  }

  .fw-table-heading h1 {
    font-size: 32px;
  }

  .fw-view-tabs {
    width: 100%;
  }

  .fw-view-tabs button {
    flex: 1;
  }

  .fw-panel-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .fw-panel-toolbar .fw-button {
    width: 100%;
  }

  .fw-toolbar-actions {
    width: 100%;
  }

  .fw-inspector-form {
    padding: 15px;
  }

  .fw-import-dialog {
    width: calc(100vw - 14px);
    max-height: calc(100vh - 14px);
  }

  .fw-import-dialog form {
    max-height: calc(100vh - 16px);
  }

  .fw-import-dialog header,
  .fw-import-dialog .fw-dialog-body,
  .fw-import-dialog footer {
    padding-right: 14px;
    padding-left: 14px;
  }

  .fw-import-meta,
  .fw-import-column-row {
    grid-template-columns: 1fr;
  }

  .fw-import-column-index {
    display: none;
  }

  .fw-login-card {
    padding: 26px 20px;
  }

  .fw-toast-region {
    right: 10px;
    bottom: 10px;
    left: 10px;
  }

  .fw-toast {
    min-width: 0;
    max-width: none;
  }
}

/* Mobile-first 家当 app and native NocoDB relations */
.demo-install-button[hidden],
.demo-mobile-records[hidden] {
  display: none !important;
}

.demo-install-button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #bdd2c4;
  border-radius: 8px;
  background: #eff7f0;
  color: #245b48;
  font-size: 11px;
  font-weight: 650;
  cursor: pointer;
}

.demo-record-row {
  cursor: pointer;
}

.demo-record-row:focus-visible {
  outline: 2px solid #2d7458;
  outline-offset: -2px;
}

.demo-relation-count {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #e5f0e8;
  color: #285b48;
  font-size: 10px;
  font-weight: 650;
}

.demo-relation-picker {
  display: grid;
  gap: 9px;
  padding: 11px;
  border: 1px solid #d8e1d8;
  border-radius: 11px;
  background: #f7faf6;
}

.demo-relation-search {
  min-height: 38px !important;
  padding: 8px 11px !important;
  border: 1px solid #d7ded7 !important;
  border-radius: 8px !important;
  background: #fff !important;
}

.demo-relation-options,
.mobile-relation-options {
  display: grid;
  max-height: 210px;
  gap: 5px;
  overflow: auto;
}

.demo-relation-options label,
.mobile-relation-options label {
  display: flex;
  min-height: 38px;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid #e0e5df;
  border-radius: 8px;
  background: #fff;
  color: #344b41;
  font-size: 12px;
  cursor: pointer;
}

.demo-relation-options label:has(input:checked),
.mobile-relation-options label:has(input:checked) {
  border-color: #78a88d;
  background: #e8f2e9;
  color: #1e513e;
}

.demo-relation-options input,
.mobile-relation-options input {
  width: 17px;
  height: 17px;
  accent-color: #216348;
}

.demo-relation-options p,
.mobile-relation-options p {
  margin: 0;
  padding: 12px;
  color: #7d8982;
  font-size: 11px;
}

.demo-mobile-records {
  display: none;
  padding: 10px;
}

.demo-mobile-record {
  display: grid;
  width: 100%;
  min-height: 88px;
  grid-template-columns: 32px minmax(0, 1fr) 20px;
  gap: 12px;
  align-items: start;
  padding: 15px 12px;
  border: 0;
  border-bottom: 1px solid #e7ebe4;
  background: transparent;
  color: #243d33;
  text-align: left;
  cursor: pointer;
}

.demo-mobile-record:last-child {
  border-bottom: 0;
}

.demo-mobile-record:active {
  background: #f2f6f0;
}

.demo-mobile-record-number {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 8px;
  background: #e7eee5;
  color: #677a70;
  font-size: 9px;
}

.demo-mobile-record-copy {
  min-width: 0;
}

.demo-mobile-record-copy strong,
.demo-mobile-record-copy small {
  display: block;
}

.demo-mobile-record-copy strong {
  overflow: hidden;
  margin: 1px 0 6px;
  font-size: 15px;
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.demo-mobile-record-copy small {
  color: #849087;
  font-size: 13px;
  line-height: 1.55;
}

.demo-mobile-record-arrow {
  color: #9aa59e;
  font-family: Georgia, serif;
  font-size: 26px;
  line-height: 24px;
}

/* Table query workspace */
.demo-table-toolbar {
  flex-wrap: wrap;
}

.demo-tool-button:disabled,
.demo-pagination button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.demo-tool-button.danger {
  border-color: #efd4cc;
  color: #a84f3d;
}

.demo-filter-picker {
  position: relative;
}

.demo-filter-picker summary {
  display: flex;
  min-height: 38px;
  align-items: center;
  padding: 7px 11px;
  border: 1px solid #dde3da;
  border-radius: 9px;
  background: #f9faf6;
  color: #40594e;
  font-size: 13px;
  font-weight: 650;
  list-style: none;
  cursor: pointer;
}

.demo-filter-picker summary::after {
  margin-left: 7px;
  color: #8b978f;
  content: "⌄";
}

.demo-filter-picker[open] summary {
  border-color: #7fa48e;
}

.demo-filter-picker form {
  position: absolute;
  z-index: 25;
  top: calc(100% + 6px);
  left: 0;
  display: grid;
  width: 300px;
  gap: 10px;
  padding: 13px;
  border: 1px solid #d8ded8;
  border-radius: 11px;
  background: #fffefb;
  box-shadow: 0 14px 34px rgba(29, 57, 45, 0.16);
}

.demo-filter-picker form label {
  display: grid;
  gap: 5px;
  color: #66786f;
  font-size: 11px;
  font-weight: 650;
}

.demo-filter-picker form input,
.demo-filter-picker form select {
  min-height: 38px;
  width: 100%;
  padding: 7px 9px;
  border: 1px solid #d8ded7;
  border-radius: 8px;
  background: #fbfcf8;
  color: #284439;
  font: inherit;
  font-size: 13px;
}

.button.compact {
  min-height: 36px;
  padding: 7px 12px;
  font-size: 12px;
}

.demo-active-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  padding: 9px 14px;
  border-bottom: 1px solid #e5e9e1;
  background: #fbfcf8;
  color: #849087;
  font-size: 11px;
}

.demo-active-filters[hidden] {
  display: none;
}

.demo-filter-chip,
.demo-clear-filters {
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid #cfded3;
  border-radius: 999px;
  background: #edf5ee;
  color: #315f4d;
  font: inherit;
  cursor: pointer;
}

.demo-filter-chip b {
  margin-left: 5px;
  font-weight: 700;
}

.demo-clear-filters {
  border-color: transparent;
  background: transparent;
  color: #9b5b4a;
}

.demo-data-table {
  min-width: 920px;
}

.demo-data-table .demo-select-cell {
  width: 42px;
  padding-right: 8px;
  padding-left: 12px;
  text-align: center;
}

.demo-select-cell input {
  width: 16px;
  height: 16px;
  accent-color: #216348;
}

.demo-sort-header {
  display: grid;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.demo-sort-header > span {
  padding-right: 18px;
}

.demo-sort-header > b {
  position: absolute;
  top: 15px;
  right: 12px;
  color: #a2ada6;
  font-size: 12px;
  font-weight: 500;
}

.demo-sort-header small {
  display: block;
  margin-top: 3px;
  color: #9aa59e;
  font-size: 11px;
  font-weight: 500;
}

.demo-actions-cell {
  width: 116px;
  white-space: nowrap;
}

.demo-row-action {
  min-height: 28px;
  margin-right: 4px;
  padding: 4px 7px;
  border: 1px solid #d7e0d8;
  border-radius: 6px;
  background: #fff;
  color: #34634f;
  font-size: 11px;
  cursor: pointer;
}

.demo-row-action.danger {
  border-color: #eed8d3;
  color: #a45747;
}

.demo-table-footer {
  min-height: 54px;
  color: #687970;
  font-size: 11px;
}

.demo-page-size,
.demo-pagination {
  display: flex;
  align-items: center;
  gap: 9px;
}

.demo-page-size select {
  min-height: 32px;
  padding: 4px 8px;
  border: 1px solid #dce2da;
  border-radius: 7px;
  background: #fffefa;
  color: #40584e;
  font: inherit;
}

.demo-pagination strong {
  min-width: 76px;
  color: #40584e;
  font-size: 11px;
  font-weight: 650;
  text-align: center;
}

.demo-existing-files {
  display: grid;
  gap: 6px;
}

.demo-existing-files label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid #dfe5dd;
  border-radius: 8px;
  background: #fbfcf8;
  color: #40564c;
  font-size: 12px;
}

.demo-existing-files label span {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.demo-existing-files label small {
  color: #89958e;
  font-size: 10px;
}

@media (max-width: 760px) {
  .demo-table-toolbar {
    align-items: stretch;
  }

  .demo-search {
    width: 100%;
  }

  .demo-query-select {
    flex: 1;
  }

  .demo-query-select select {
    width: 100%;
    max-width: none;
  }

  .demo-filter-picker form {
    position: fixed;
    top: 76px;
    right: 12px;
    left: 12px;
    width: auto;
  }

  .demo-table-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .demo-pagination {
    width: 100%;
    justify-content: space-between;
  }

  .demo-dialog-actions {
    flex-wrap: wrap;
  }
}

.demo-detail-dialog {
  width: min(680px, calc(100vw - 28px));
}

.demo-detail-dialog > article {
  display: flex;
  max-height: min(800px, calc(100vh - 38px));
  flex-direction: column;
}

.demo-record-detail {
  display: grid;
  gap: 0;
  overflow-y: auto;
}

.demo-detail-field {
  display: grid;
  gap: 8px;
  padding: 16px 24px;
  border-bottom: 1px solid #e8ece5;
}

.demo-detail-field header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.demo-detail-field header span {
  color: #6e7e75;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0;
}

.demo-detail-field header small {
  color: #a0aaa3;
  font-size: 11px;
}

.demo-detail-field > span,
.demo-detail-long {
  margin: 0;
  color: #243f34;
  font-size: 14px;
  line-height: 1.75;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.demo-detail-empty,
.demo-detail-loading,
.demo-detail-error {
  padding: 18px;
  color: #8a958f;
  font-size: 12px;
  text-align: center;
}

.demo-detail-error {
  display: grid;
  gap: 12px;
}

.demo-detail-links,
.demo-detail-attachments {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.demo-detail-links a,
.demo-detail-attachments a {
  display: grid;
  gap: 3px;
  padding: 10px 11px;
  border: 1px solid #dae3da;
  border-radius: 9px;
  background: #f6faf5;
  color: #245744;
  text-decoration: none;
  font-size: 12px;
  font-weight: 650;
}

.demo-detail-links small {
  color: #84938a;
  font-size: 9px;
  font-weight: 500;
}

.demo-detail-attachments a {
  overflow: hidden;
  padding: 0;
  background: #fff;
}

.demo-detail-attachments img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  background: #e9eee8;
}

.demo-detail-attachments a span {
  padding: 9px 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-relation-picker {
  display: grid;
  gap: 9px;
}

.mobile-relation-search {
  min-height: 42px !important;
  padding: 9px 12px !important;
  border: 1px solid #d7ded7 !important;
  border-radius: 9px !important;
}

.fw-relation-config,
.fw-relation-summary,
.fw-formula-config {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #d8e2da;
  border-radius: 10px;
  background: #f2f7f2;
}

.fw-panel-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.fw-button.formula {
  border-color: #b8d2c2;
  background: #edf6ef;
  color: #1f664d;
}

.fw-button.formula:hover {
  border-color: #79a78e;
  background: #e4f2e7;
}

.fw-relation-config[hidden] {
  display: none !important;
}

.fw-formula-config[hidden] {
  display: none !important;
}

.fw-relation-config p,
.fw-relation-summary p,
.fw-formula-config p {
  margin: 0;
  color: #728078;
  font-size: 13px;
  line-height: 1.55;
}

.fw-formula-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 13px;
}

.fw-field-dialog .fw-formula-workbench {
  grid-template-columns: minmax(0, 1fr) minmax(205px, 0.58fr);
}

.fw-formula-input {
  display: grid;
  min-width: 0;
  gap: 10px;
}

.fw-formula-input textarea {
  min-height: 126px !important;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 15px !important;
  line-height: 1.65;
}

.fw-formula-input p code,
.fw-formula-examples code {
  padding: 1px 4px;
  border-radius: 4px;
  background: #e4eee5;
  color: #1f5c47;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.fw-formula-operators {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.fw-formula-operators > span {
  width: 100%;
  color: #6f7f76;
  font-size: 12px;
  font-weight: 650;
}

.fw-formula-operators button {
  display: grid;
  width: 34px;
  height: 32px;
  place-items: center;
  border: 1px solid #cbded1;
  border-radius: 7px;
  background: #fffef9;
  color: #285f4c;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 16px;
  cursor: pointer;
}

.fw-formula-operators button:hover {
  border-color: #6e9e86;
  background: #edf6ef;
}

.fw-formula-references {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.fw-formula-references > span,
.fw-formula-references > small {
  width: 100%;
  color: #6f7f76;
  font-size: 12px;
  font-weight: 650;
}

.fw-formula-references button {
  min-height: 29px;
  padding: 4px 9px;
  border: 1px solid #cbded1;
  border-radius: 7px;
  background: #fffef9;
  color: #285f4c;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
  cursor: pointer;
}

.fw-formula-references button:hover {
  border-color: #6e9e86;
  background: #edf6ef;
}

.fw-formula-examples {
  display: grid;
  align-content: start;
  gap: 13px;
  padding: 12px;
  border: 1px solid #d3dfd6;
  border-radius: 10px;
  background: #fffef9;
}

.fw-formula-example-list {
  display: grid;
  gap: 7px;
}

.fw-formula-example-list > strong {
  margin-bottom: 2px;
  color: #244a3b;
  font-size: 13px;
}

.fw-formula-examples button {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 8px;
  border: 1px solid #e0e7df;
  border-radius: 8px;
  background: #f8faf5;
  color: #315c4b;
  text-align: left;
  cursor: pointer;
}

.fw-formula-examples button:hover {
  border-color: #9abaa7;
  background: #eef6ef;
}

.fw-formula-examples button code {
  justify-self: start;
  font-size: 12px;
}

.fw-formula-examples button span {
  color: #7b8981;
  font-size: 11px;
}

.fw-formula-example-list > small {
  color: #75847c;
  font-size: 11px;
  line-height: 1.55;
}

.fw-formula-examples .fw-formula-references {
  padding-bottom: 12px;
  border-bottom: 1px solid #e0e7df;
}

.fw-relation-summary {
  margin-top: 12px;
}

.fw-relation-summary > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.fw-relation-summary span {
  color: #75827a;
  font-size: 11px;
}

.fw-relation-summary strong {
  color: #244a3b;
  font-size: 12px;
}

@media (max-width: 860px) {
  .demo-data-table {
    display: none;
  }

  .demo-mobile-records {
    display: block;
  }

  .demo-topbar-actions {
    margin-left: auto;
  }

  .demo-install-button {
    min-height: 36px;
    padding: 0 10px;
  }
}

@media (max-width: 560px) {
  body.demo-page {
    background: #f4f5f1;
  }

  .demo-topbar {
    height: calc(58px + env(safe-area-inset-top));
    padding-top: env(safe-area-inset-top);
  }

  .demo-content {
    padding-top: 20px;
  }

  .demo-page-heading h1 {
    margin-top: 5px;
    font-size: 31px;
  }

  .demo-heading-meta {
    flex-direction: row;
    gap: 10px;
  }

  .demo-table-card {
    border-radius: 16px;
  }

  .demo-table-toolbar {
    gap: 8px;
    padding: 10px;
  }

  .demo-toolbar-group {
    width: 100%;
  }

  .demo-toolbar-group .demo-tool-button {
    flex: 1;
  }

  .demo-record-dialog {
    width: calc(100vw - 12px);
    max-height: calc(100vh - 12px);
    border-radius: 18px;
  }

  .demo-record-dialog form,
  .demo-detail-dialog > article {
    max-height: calc(100vh - 12px);
  }

  .demo-dialog-head {
    padding-top: 19px;
  }

  .demo-dynamic-fields {
    padding-top: 18px;
    padding-bottom: 18px;
  }

  .demo-detail-field {
    padding: 14px 17px;
  }

  .demo-detail-links,
  .demo-detail-attachments {
    grid-template-columns: 1fr;
  }

  .demo-dialog-actions {
    padding-bottom: calc(14px + env(safe-area-inset-bottom));
  }

  .demo-install-button {
    width: 36px;
    padding: 0;
    overflow: hidden;
    color: transparent;
    font-size: 0;
  }

  .demo-install-button::after {
    content: "↓";
    color: #245b48;
    font-size: 18px;
  }
}

@media (max-width: 1120px) {
  .fw-main-actions {
    gap: 7px;
  }

  .fw-query-controls {
    grid-template-columns: minmax(220px, 1fr) 180px;
  }

  .fw-query-actions {
    justify-content: flex-end;
  }
}

@media (max-width: 760px) {
  .fw-query-controls {
    grid-template-columns: 1fr;
  }

  .fw-column-picker > div {
    right: auto;
    left: 0;
  }

  .fw-query-actions {
    justify-content: space-between;
  }
}
