@charset "UTF-8";
:root {
  --text-xs: 12px;
  --text-sm: 14px;
  --text-base: 16px;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
  --ink: #25342c;
  --muted: #60705f;
  --line: #e6eae3;
  --green: #284d39;
  --accent: #e9b33b;
  --bg: #f5f6f2;
  font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', 'Noto Sans CJK SC', sans-serif;
  font-size: var(--text-sm);
  color: var(--ink);
  line-height: 1.6;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
}
a {
  text-decoration: none;
  color: inherit;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.6;
}
input,
select,
textarea {
  display: block;
  width: 100%;
  border: 1px solid #dce2d7;
  background: #fff;
  border-radius: 6px;
  padding: 10px 12px;
  min-height: 42px;
  color: var(--ink);
  margin-top: 7px;
}
input[type='checkbox'] {
  width: 16px;
  min-height: 16px;
  height: 16px;
  accent-color: var(--green);
  margin: 0;
}
input[type='color'] {
  width: 60px;
  padding: 4px;
}
input:disabled {
  background: #f5f6f2;
  color: #8b9588;
}
textarea {
  resize: vertical;
  line-height: 1.8;
}
input::placeholder,
textarea::placeholder {
  color: #a8afa2;
}
label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid #719c81;
  outline-offset: 2px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3 {
  line-height: 1.4;
}
h1 {
  font-size: 27px;
  font-weight: 650;
  letter-spacing: -0.04em;
}
h2 {
  font-size: 19px;
  font-weight: 600;
}
h3 {
  font-size: var(--text-base);
  font-weight: 600;
}
p {
  color: var(--muted);
}
.admin-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  letter-spacing: 0.015em;
  font-weight: 800;
}
.admin-brand img {
  width: 30px;
  height: 30px;
}
.brand-light {
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.04em;
  color: #9aa490;
}
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 236px;
  background: #fff;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 28px 17px 20px;
  z-index: 30;
  overflow-y: auto;
}
.sidebar > .admin-brand {
  padding-inline: 11px;
}
.workspace-label {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 11px 10px;
  margin: 30px 3px 22px;
}
.workspace-icon {
  display: grid;
  place-items: center;
  background: #edf0e7;
  border: 1px solid #e2e7d8;
  color: #6e7d60;
  width: 30px;
  height: 32px;
  border-radius: 5px;
  font-weight: 700;
}
.workspace-label strong {
  display: block;
  font-size: var(--text-sm);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.workspace-label small {
  display: block;
  font-size: var(--text-xs);
  color: var(--muted);
}
.online-dot {
  margin-left: auto;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #6a916e;
}
.nav-group {
  display: block;
  margin: 18px 14px 10px;
  font-size: var(--text-xs);
  color: var(--muted);
}
.sidebar nav > a {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-block: 4px;
  padding: 11px 14px;
  color: #697263;
  border-radius: 6px;
  font-size: var(--text-sm);
  transition: background 0.15s;
}
.sidebar nav > a:hover {
  background: #f3f5ef;
}
.sidebar nav > a.active {
  background: #edf2e8;
  color: #32583e;
  font-weight: 600;
}
.sidebar nav > a > span {
  font-size: 18px;
  line-height: 1;
  width: 18px;
  color: #8d9a83;
}
.sidebar nav > a.active > span {
  color: #527748;
}
.sidebar nav b {
  font-size: var(--text-xs);
  margin-left: auto;
  background: #e0e9d5;
  color: #557443;
  border-radius: 4px;
  padding: 1px 6px;
  min-width: 18px;
  text-align: center;
}
.sidebar nav b:empty {
  display: none;
}
.sidebar-bottom {
  margin-top: auto;
  padding: 30px 14px 0;
}
.sidebar-bottom > span {
  display: block;
  font-size: var(--text-xs);
  color: var(--muted);
}
.sidebar-bottom small {
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  color: var(--muted);
}
.admin-shell {
  margin-left: 236px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.admin-topbar {
  height: 74px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-inline: 40px;
}
.breadcrumb-root {
  color: var(--muted);
  font-size: var(--text-sm);
}
.separator {
  margin: 0 14px;
  color: #c2c8ba;
}
.admin-topbar strong {
  font-size: var(--text-sm);
  font-weight: 500;
}
.topbar-actions {
  display: flex;
  gap: 18px;
  align-items: center;
}
.visit-site {
  font-size: var(--text-sm);
  color: #657558;
  border-right: 1px solid var(--line);
  padding-right: 22px;
}
.avatar {
  width: 29px;
  height: 29px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #e5eadd;
  color: #657552;
  font-size: var(--text-sm);
  font-weight: 700;
}
.logout {
  padding: 5px;
  background: none;
  border: 0;
  color: var(--muted);
  font-size: var(--text-xs);
}
.icon-button {
  border: 0;
  background: none;
  font-size: 19px;
  color: var(--ink);
}
#sidebar-toggle {
  display: none;
}
.admin-main {
  padding: 36px 40px 40px;
  max-width: 1600px;
  width: 100%;
  margin: 0 auto;
  flex: 1;
}
.admin-footer {
  border-top: 1px solid var(--line);
  padding: 20px 40px;
  color: var(--muted);
  font-size: var(--text-xs);
  display: flex;
  justify-content: space-between;
  letter-spacing: 0.07em;
}
.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 27px;
}
.page-head p {
  font-size: var(--text-sm);
  margin-top: 9px;
  color: var(--muted);
}
.page-head .actions {
  display: flex;
  gap: 10px;
}
.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border: 1px solid #dce3d5;
  border-radius: 6px;
  background: #fff;
  color: #56684a;
  font-size: var(--text-sm);
  font-weight: 500;
  min-height: 39px;
}
.btn:hover {
  background: #f4f6f0;
}
.btn.primary {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}
.btn.primary:hover {
  background: #365d43;
}
.btn.danger {
  color: #a44736;
  border-color: #e8d6ce;
}
.btn.small {
  padding: 6px 10px;
  min-height: 30px;
  font-size: var(--text-xs);
}
.icon-btn {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 5px;
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 25px;
}
.metric {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 22px;
}
.metric-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: var(--text-sm);
}
.metric-symbol {
  display: grid;
  place-items: center;
  background: #f1f4eb;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  color: #879a70;
  font-size: 18px;
}
.metric strong {
  display: block;
  font-size: 34px;
  line-height: 1.4;
  font-weight: 600;
  color: #334b37;
  margin-block: 8px;
}
.metric small {
  font-size: var(--text-xs);
  color: var(--muted);
}
.metric small b {
  font-weight: 500;
  color: #689052;
}
.dashboard-grid {
  display: grid;
  grid-template-columns: 1.8fr 1fr;
  gap: 24px;
  align-items: start;
}
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.panel-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
}
.panel-header h2 {
  font-size: 14px;
}
.panel-header a {
  font-size: var(--text-xs);
  color: #849375;
}
.panel-body {
  padding: 22px 24px;
}
.quick-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.quick-link {
  background: #f8f9f5;
  border: 1px solid #edf0e7;
  border-radius: 7px;
  padding: 16px 10px;
  text-align: center;
}
.quick-link > span {
  font-size: 23px;
  color: #7c9366;
  display: block;
  margin-bottom: 8px;
}
.quick-link strong {
  font-weight: 500;
  font-size: var(--text-xs);
}
.dashboard-stack {
  display: grid;
  gap: 24px;
}
.setup-list {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: setup;
}
.setup-list li {
  display: flex;
  gap: 12px;
  padding-block: 13px;
  border-bottom: 1px solid #eff1e9;
  font-size: var(--text-sm);
  align-items: flex-start;
}
.setup-list li:last-child {
  border: 0;
}
.setup-list li:before {
  counter-increment: setup;
  content: counter(setup);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #edf2e5;
  color: #6c8354;
  font-size: var(--text-xs);
}
.setup-list small {
  display: block;
  color: var(--muted);
  font-size: var(--text-xs);
  margin-top: 4px;
}
.template-note {
  padding: 24px;
  border-radius: 8px;
  background: #e9eedf;
  color: #6d7f58;
  border: 1px solid #dde6d0;
}
.template-note h3 {
  font-size: var(--text-sm);
  margin-bottom: 10px;
  color: #526b3b;
}
.template-note p {
  font-size: var(--text-sm);
  color: #849574;
  line-height: 1.9;
}
.toolbar {
  padding: 18px 22px;
  display: flex;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  align-items: center;
  flex-wrap: wrap;
}
.toolbar input {
  max-width: 280px;
  margin: 0;
  min-height: 36px;
  font-size: var(--text-sm);
  background: #fafbf7;
}
.toolbar select {
  width: 140px;
  margin: 0;
  min-height: 36px;
  font-size: var(--text-sm);
}
.toolbar .count {
  margin-left: auto;
  font-size: var(--text-sm);
  color: var(--muted);
}
.table-scroll {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  white-space: nowrap;
  font-size: var(--text-sm);
}
thead {
  background: #fafbf8;
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 400;
}
th {
  padding: 13px 22px;
  font-weight: 500;
}
td {
  padding: 17px 22px;
  border-top: 1px solid #edf0e7;
  color: #727f66;
}
tbody tr:hover {
  background: #fdfefa;
}
td:first-child {
  color: #415137;
}
td .row-title {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 240px;
  max-width: 420px;
}
td .row-title img {
  width: 49px;
  height: 40px;
  background: #f0f2e9;
  object-fit: contain;
  border: 1px solid #e8eddf;
  border-radius: 4px;
}
.row-title strong {
  display: block;
  font-weight: 500;
  max-width: 310px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.row-title small {
  font-size: var(--text-xs);
  color: var(--muted);
  display: block;
  margin-top: 3px;
}
.status {
  display: inline-block;
  font-size: var(--text-xs);
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
  background: #f0f1ed;
  color: #929985;
}
.status.live {
  background: #eaf2e3;
  color: #456634;
}
.status.draft {
  background: #f9f1de;
  color: #7a6024;
}
.status.changed {
  background: #eef0fa;
  color: #506397;
}
.table-actions {
  display: flex;
  gap: 14px;
}
.table-actions button,
.table-actions a {
  font-size: var(--text-xs);
  color: #738763;
  border: 0;
  background: none;
  padding: 4px 0;
  white-space: nowrap;
}
.table-actions .danger {
  color: #ae8271;
}
.table-foot {
  padding: 16px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: var(--text-xs);
  border-top: 1px solid var(--line);
}
.table-pagination {
  display: flex;
  gap: 7px;
  align-items: center;
}
.empty {
  padding: 60px 24px;
  text-align: center;
  color: var(--muted);
}
.empty h3 {
  color: #6c7c5e;
  margin-bottom: 10px;
}
.empty .btn {
  margin-top: 18px;
}
.loading {
  padding: 90px;
  text-align: center;
  color: var(--muted);
}
.editor-dialog {
  padding: 0;
  border: 0;
  border-radius: 12px;
  width: 860px;
  max-width: calc(100vw - 36px);
  max-height: calc(100dvh - 48px);
  box-shadow: 0 25px 100px #17261c40;
  color: var(--ink);
}
.editor-dialog::backdrop {
  background: #1d2b2466;
  backdrop-filter: blur(2px);
}
.editor-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  padding: 24px 30px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 2;
}
.editor-header p {
  font-size: var(--text-sm);
  margin-top: 5px;
}
.editor-body {
  padding: 26px 30px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
.form-grid .full {
  grid-column: 1/-1;
}
.field-help {
  font-size: var(--text-xs);
  font-weight: 400;
  color: var(--muted);
  margin-top: 6px;
}
.form-section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  border-top: 1px solid var(--line);
  padding-top: 25px;
  margin-block: 25px 18px;
}
.form-section-title h3 {
  font-size: var(--text-sm);
}
.checkbox-label {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: var(--text-sm);
  font-weight: 500;
}
.editor-actions {
  padding: 18px 30px;
  background: #f9faf7;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 10px;
  align-items: center;
  position: sticky;
  bottom: 0;
  z-index: 2;
}
.editor-actions .spacer {
  flex: 1;
}
.editor-actions .hint {
  color: var(--muted);
  font-size: var(--text-xs);
}
.upload-field {
  display: flex;
  align-items: center;
  gap: 10px;
}
.upload-field input {
  flex: 1;
  min-width: 0;
}
.upload-field .btn {
  margin-top: 7px;
  white-space: nowrap;
}
.upload-preview {
  width: 120px;
  height: 80px;
  border-radius: 6px;
  border: 1px solid var(--line);
  object-fit: contain;
  background: #f4f6ee;
  margin-top: 12px;
}
.spec-row,
.nav-row {
  display: grid;
  grid-template-columns: 1fr 1fr 30px;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}
.spec-row input,
.nav-row input {
  margin-top: 0;
  min-height: 37px;
  font-size: var(--text-sm);
}
.array-empty {
  font-size: var(--text-sm);
  padding: 16px;
  background: #f8faf3;
  border: 1px dashed #dce4d1;
  border-radius: 5px;
  color: #98a78a;
}
.gallery-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 15px;
}
.gallery-item {
  position: relative;
  background: #f4f6ee;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 8px;
}
.gallery-item img {
  width: 100%;
  height: 90px;
  object-fit: contain;
}
.gallery-item button {
  position: absolute;
  right: 3px;
  top: 3px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 50%;
  width: 21px;
  height: 21px;
  font-size: var(--text-sm);
}
.settings-form > .panel {
  margin-bottom: 22px;
}
.settings-form .panel-body {
  padding: 28px;
}
.settings-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  position: sticky;
  bottom: 16px;
  padding: 15px;
  background: #fffffff2;
  border: 1px solid var(--line);
  box-shadow: 0 5px 20px #17261c0a;
  border-radius: 8px;
  margin-top: 20px;
  align-items: center;
  z-index: 5;
}
.settings-footer .hint {
  margin-right: auto;
  font-size: var(--text-sm);
  color: var(--muted);
}
.block-row {
  display: grid;
  grid-template-columns: 30px 1fr 75px;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  background: #fafbf8;
  padding: 16px;
  border-radius: 7px;
  margin-block: 12px;
}
.block-row > div input {
  margin-top: 5px;
  font-size: var(--text-sm);
}
.block-row small {
  font-size: var(--text-xs);
  color: var(--muted);
}
.block-move {
  display: flex;
  gap: 5px;
  justify-content: flex-end;
}
.media-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}
.media-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
}
.media-card img {
  width: 100%;
  height: 170px;
  object-fit: contain;
  background: #f0f3e9;
}
.media-card > div {
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.media-card small {
  color: var(--muted);
  font-size: var(--text-xs);
}
.inquiry-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 25px;
}
.inquiry-detail dt {
  font-size: var(--text-xs);
  color: var(--muted);
  margin-bottom: 5px;
}
.inquiry-detail dd {
  margin: 0;
  font-size: var(--text-sm);
  overflow-wrap: anywhere;
}
.inquiry-message {
  padding: 20px;
  background: #f7f9f2;
  border: 1px solid var(--line);
  border-radius: 6px;
  white-space: pre-wrap;
  font-size: var(--text-sm);
  color: #65745a;
  margin-bottom: 25px;
  overflow-wrap: anywhere;
}
.notice {
  padding: 12px 16px;
  border-radius: 6px;
  background: #eff5e9;
  border: 1px solid #dae7ce;
  color: #7e966a;
  font-size: var(--text-sm);
  margin-block: 15px;
}
.notice.error {
  color: #a35541;
  background: #fff3ed;
  border-color: #f1d7c9;
}
.toast {
  position: fixed;
  bottom: 30px;
  left: calc(50% + 100px);
  transform: translateX(-50%);
  padding: 13px 24px;
  background: #294a36;
  color: #fff;
  border-radius: 7px;
  box-shadow: 0 6px 30px #243b2526;
  font-size: var(--text-sm);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
  max-width: 80vw;
}
.toast.visible {
  opacity: 1;
}
.toast.error {
  background: #954d37;
}
.toast-in-dialog {
  position: sticky;
  bottom: 80px;
  margin: 0 30px 15px;
  color: #9e4f36;
  font-size: var(--text-sm);
}
.hidden {
  display: none !important;
}
.login-page {
  background: #fff;
}
.login-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}
.login-intro {
  position: relative;
  background: #263d2c;
  color: #fff;
  padding: 55px 12%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.login-intro .admin-brand {
  color: #fff;
}
.login-intro .brand-light {
  color: #a5b69a;
}
.login-kicker {
  font-size: var(--text-sm);
  letter-spacing: 0.2em;
  color: #c0cbae;
  margin-top: 100px;
  margin-bottom: 30px;
}
.login-intro h1 {
  font-size: clamp(34px, 4vw, 62px);
  letter-spacing: -0.04em;
  line-height: 1.4;
  font-weight: 500;
}
.login-intro > p {
  color: #a0b393;
  line-height: 2;
  font-size: var(--text-sm);
  margin-top: 25px;
}
.login-intro > a:not(.admin-brand) {
  margin-top: 35px;
  font-size: var(--text-sm);
  border-bottom: 1px solid #5e7851;
  padding-bottom: 7px;
}
.login-foot {
  font-size: var(--text-xs);
  letter-spacing: 0.15em;
  color: #80996e;
  margin-top: auto;
  padding-top: 55px;
}
.login-panel {
  display: grid;
  place-items: center;
  padding: 50px;
}
.login-panel > div {
  max-width: 340px;
  width: 100%;
}
.section-label {
  font-size: var(--text-xs);
  letter-spacing: 0.2em;
  color: var(--muted);
}
.login-panel h2 {
  font-size: 28px;
  margin-block: 18px 10px;
  font-weight: 600;
}
.login-panel > div > p {
  font-size: var(--text-sm);
}
.login-panel form {
  margin-top: 35px;
}
.login-panel label {
  margin-bottom: 22px;
}
.login-panel input {
  min-height: 47px;
}
.login-panel .btn {
  width: 100%;
  justify-content: space-between;
  min-height: 46px;
  margin-top: 5px;
}
.login-help {
  margin-top: 28px;
  font-size: var(--text-xs) !important;
  line-height: 1.9;
  color: var(--muted);
}

/* Readable content and predictable control sizes. */
body {
  line-height: 1.65;
}
body.drawer-open,
body.editor-open {
  overflow: hidden;
}
h1,
h2,
h3 {
  letter-spacing: 0;
  overflow-wrap: anywhere;
}
h1 {
  font-size: 28px;
}
input,
select,
textarea {
  min-width: 0;
  font-size: 15px;
  line-height: 1.6;
}
label {
  line-height: 1.65;
}
.form-grid > *,
.dashboard-grid > *,
.dashboard-stack > *,
.metrics > *,
.inquiry-detail > *,
.block-row > * {
  min-width: 0;
}
.btn,
.btn.small {
  min-height: 44px;
  font-size: var(--text-sm);
}
.icon-btn,
.icon-button {
  display: inline-grid;
  place-items: center;
  min-width: 44px;
  min-height: 44px;
  flex-shrink: 0;
}
.icon-button {
  border-radius: 6px;
}
.sidebar {
  width: 248px;
}
.admin-shell {
  margin-left: 248px;
  min-width: 0;
}
.admin-brand {
  white-space: nowrap;
}
.sidebar .admin-brand {
  gap: 7px;
  padding-inline: 4px;
}
.brand-light {
  font-size: 11px;
}
.sidebar nav > a {
  min-height: 46px;
  font-size: var(--text-sm);
}
.workspace-label strong {
  max-width: 140px;
}
.workspace-icon {
  flex-shrink: 0;
}
.nav-group,
.workspace-label small {
  font-size: var(--text-xs);
}
.sidebar-bottom {
  padding-top: 24px;
}
.sidebar-bottom small {
  font-size: 11px;
}
.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 15;
  padding-inline: 32px;
}
.admin-topbar strong,
.breadcrumb-root,
.visit-site,
.logout {
  font-size: var(--text-sm);
}
.visit-site,
.logout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
}
.logout {
  min-width: 44px;
}
.admin-main {
  padding: 32px;
}
.admin-main:focus {
  outline: none;
}
.admin-footer {
  padding-inline: 32px;
  font-size: var(--text-xs);
}
.page-head p {
  max-width: 65ch;
  font-size: var(--text-sm);
  line-height: 1.8;
}
.page-head .actions,
.panel-header {
  flex-wrap: wrap;
}
.metric {
  padding: 20px;
}
.metric-top {
  font-size: var(--text-sm);
  gap: 8px;
}
.metric strong {
  font-variant-numeric: tabular-nums;
}
.metric small {
  font-size: var(--text-xs);
}
.dashboard-grid {
  grid-template-columns: minmax(0, 1.8fr) minmax(280px, 1fr);
}
.panel-header {
  padding: 20px 22px;
  gap: 12px;
}
.panel-header h2 {
  font-size: 17px;
}
.panel-header a {
  font-size: var(--text-sm);
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.panel-body {
  padding: 22px;
}
.quick-link {
  min-width: 0;
}
.quick-link strong,
.setup-list li {
  font-size: var(--text-sm);
}
.setup-list small,
.template-note p {
  font-size: var(--text-xs);
  color: var(--muted);
}
.template-note h3 {
  font-size: var(--text-sm);
}
.toolbar {
  gap: 12px;
}
.toolbar input,
.toolbar select {
  min-height: 44px;
  font-size: var(--text-sm);
}
.toolbar select {
  width: 170px;
}
table {
  font-size: var(--text-sm);
}
thead {
  font-size: var(--text-xs);
}
th,
td {
  padding: 16px;
}
td .row-title {
  min-width: 210px;
  gap: 12px;
}
.row-title img {
  flex-shrink: 0;
}
.row-title strong {
  font-weight: 600;
  max-width: 280px;
}
.row-title small {
  font-size: var(--text-xs);
}
.status {
  font-size: var(--text-xs);
  padding: 4px 9px;
}
.table-actions {
  align-items: center;
  gap: 8px;
}
.table-actions button,
.table-actions a {
  min-width: 44px;
  min-height: 44px;
  padding: 10px 6px;
  font-size: var(--text-sm);
}
.table-actions .danger {
  color: #954532;
}
.table-foot {
  font-size: var(--text-xs);
  gap: 16px;
  flex-wrap: wrap;
}
.table-pagination {
  margin-left: auto;
  gap: 12px;
}
.table-pagination .icon-btn {
  font-size: 20px;
}
.editor-dialog {
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
.editor-header {
  padding: 20px 28px;
  align-items: flex-start;
}
.editor-header h2 {
  font-size: 21px;
}
.editor-header p {
  font-size: var(--text-sm);
  line-height: 1.6;
}
.editor-body {
  padding: 26px 28px;
}
.editor-actions {
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px 28px;
}
.editor-actions .hint {
  font-size: var(--text-xs);
}
.field-help {
  font-size: var(--text-xs);
  line-height: 1.75;
}
.form-section-title {
  flex-wrap: wrap;
  gap: 12px;
}
.form-section-title > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.form-section-title h3 {
  font-size: 16px;
}
.checkbox-label {
  min-height: 44px;
  font-size: var(--text-sm);
}
.checkbox-label input {
  flex-shrink: 0;
}
.spec-row,
.nav-row {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 44px;
}
.spec-row input,
.nav-row input {
  font-size: var(--text-sm);
  min-height: 44px;
}
.block-row {
  grid-template-columns: 44px minmax(0, 1fr) 96px;
  gap: 12px;
}
.block-row input:not([type='checkbox']) {
  font-size: var(--text-sm);
}
.block-toggle {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
}
.block-move {
  gap: 8px;
}
.settings-footer {
  position: static;
  padding: 18px 22px;
}
.settings-footer .hint {
  font-size: var(--text-xs);
}
.gallery-item {
  padding: 12px;
}
.gallery-item button {
  width: 44px;
  height: 44px;
  font-size: 20px;
  border-radius: 6px;
}
.inquiry-message {
  font-size: var(--text-sm);
  line-height: 1.85;
}
.inquiry-detail dd {
  font-size: var(--text-sm);
}
.toast {
  font-size: var(--text-sm);
  left: calc(50% + 124px);
}
.login-panel input {
  font-size: var(--text-base);
}
.login-panel > div > p {
  font-size: var(--text-sm);
}
.login-help {
  font-size: var(--text-xs) !important;
}
.sidebar-close,
.sidebar-backdrop {
  display: none;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (max-width: 1200px) {
  .sidebar {
    width: 228px;
    padding-inline: 14px;
  }
  .admin-shell {
    margin-left: 228px;
  }
  .admin-main,
  .admin-topbar {
    padding-inline: 24px;
  }
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
  .dashboard-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }
  .dashboard-stack {
    grid-template-columns: 1fr;
  }
  .media-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .page-head {
    align-items: flex-start;
  }
  .toast {
    left: calc(50% + 114px);
  }
}
@media (max-width: 900px) {
  input,
  select,
  textarea,
  .toolbar input,
  .toolbar select,
  .spec-row input,
  .nav-row input,
  .block-row input:not([type='checkbox']) {
    font-size: 16px;
    min-height: 48px;
  }
  .sidebar {
    width: min(304px, calc(100vw - 44px));
    transform: translateX(-100%);
    visibility: hidden;
    transition:
      transform 0.2s,
      visibility 0.2s;
    z-index: 50;
    padding: 24px 18px;
    padding-top: max(24px, env(safe-area-inset-top));
    overscroll-behavior: contain;
  }
  .sidebar.open {
    transform: translateX(0);
    visibility: visible;
    box-shadow: 12px 0 40px #18281c33;
  }
  .sidebar .admin-brand {
    padding-right: 38px;
  }
  .sidebar-close {
    display: grid;
    position: absolute;
    right: 12px;
    top: 16px;
  }
  .sidebar-backdrop:not([hidden]) {
    display: block;
    position: fixed;
    inset: 0;
    border: 0;
    background: #17271c66;
    z-index: 45;
  }
  .sidebar nav > a {
    min-height: 48px;
  }
  .admin-shell {
    margin-left: 0;
  }
  .admin-topbar {
    height: 68px;
    padding-inline: 16px;
    gap: 10px;
  }
  #sidebar-toggle {
    display: inline-grid;
  }
  .admin-topbar > div:first-of-type {
    margin-right: auto;
  }
  .breadcrumb-root,
  .separator {
    display: none;
  }
  .topbar-actions {
    gap: 10px;
  }
  .visit-site {
    padding-right: 12px;
  }
  .avatar {
    display: none;
  }
  .admin-main {
    padding: 28px 20px;
  }
  .admin-footer {
    padding-inline: 20px;
  }
  .page-head {
    gap: 20px;
    flex-wrap: wrap;
  }
  .page-head h1 {
    font-size: 26px;
  }
  .page-head .actions {
    gap: 10px;
  }
  .metrics {
    gap: 14px;
  }
  .metric strong {
    font-size: 32px;
  }
  .toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 18px;
  }
  .toolbar input {
    max-width: none;
    min-width: 0;
  }
  .toolbar select {
    width: 165px;
  }
  .toolbar .count {
    grid-column: 1/-1;
    margin-left: 0;
  }
  .table-scroll {
    overflow: visible;
  }
  .table-scroll table,
  .table-scroll tbody {
    display: block;
    width: 100%;
    white-space: normal;
  }
  .table-scroll thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .table-scroll tbody {
    padding: 16px;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }
  .table-scroll tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    padding: 16px;
    background: #fff;
  }
  .table-scroll td {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 16px;
    min-width: 0;
    padding: 9px 0;
    border: 0;
    overflow-wrap: anywhere;
    font-size: 14px;
  }
  .table-scroll td::before {
    content: attr(data-label);
    min-width: 72px;
    font-size: 12px;
    color: var(--muted);
  }
  .table-scroll td:first-child {
    display: block;
    padding-top: 0;
    padding-bottom: 14px;
    margin-bottom: 6px;
    border-bottom: 1px solid var(--line);
  }
  .table-scroll td:first-child::before,
  .table-scroll td:last-child::before {
    display: none;
  }
  .table-scroll td:first-child > strong {
    font-size: 16px;
  }
  .table-scroll td:first-child > small {
    font-size: 13px;
  }
  .table-scroll td .row-title {
    min-width: 0;
    max-width: none;
    align-items: flex-start;
  }
  .row-title > div {
    min-width: 0;
  }
  .row-title strong {
    max-width: none;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    line-height: 1.6;
    font-size: 16px;
  }
  .row-title small {
    font-size: 12px;
  }
  td .row-title img {
    width: 64px;
    height: 56px;
  }
  .table-scroll td:last-child {
    padding: 14px 0 0;
    border-top: 1px solid var(--line);
    margin-top: 8px;
  }
  .table-actions {
    flex-wrap: wrap;
    gap: 10px;
  }
  .table-actions button,
  .table-actions a {
    border: 1px solid var(--line);
    border-radius: 5px;
    min-width: 64px;
    padding-inline: 16px;
  }
  .form-grid {
    gap: 20px;
  }
  .form-section-title {
    align-items: flex-start;
  }
  .media-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .toast {
    left: 50%;
    bottom: max(20px, env(safe-area-inset-bottom));
    width: max-content;
    max-width: calc(100vw - 32px);
  }
}
@media (max-width: 600px) {
  .admin-topbar {
    padding-inline: 10px;
    gap: 4px;
  }
  .admin-topbar strong {
    font-size: 13px;
  }
  .topbar-actions {
    gap: 4px;
  }
  .visit-site {
    font-size: 12px;
    padding-inline: 6px;
    border: 0;
  }
  .logout {
    font-size: 13px;
  }
  .admin-main {
    padding: 24px 16px;
  }
  .page-head {
    flex-direction: column;
    align-items: stretch;
    margin-bottom: 24px;
    gap: 16px;
  }
  .page-head h1 {
    font-size: 25px;
    line-height: 1.4;
  }
  .page-head p {
    line-height: 1.75;
  }
  .page-head .actions {
    width: 100%;
  }
  .page-head .actions > * {
    flex: 1;
  }
  .metric {
    padding: 16px 14px;
  }
  .metric-top {
    font-size: 13px;
  }
  .metric-symbol {
    display: none;
  }
  .metric strong {
    font-size: 30px;
  }
  .metrics {
    gap: 12px;
  }
  .panel-header,
  .panel-body {
    padding: 18px;
  }
  .panel-header h2 {
    font-size: 16px;
  }
  .panel-header a {
    font-size: 13px;
  }
  .quick-links {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .quick-link {
    display: flex;
    text-align: left;
    align-items: center;
    gap: 16px;
    padding: 16px;
    min-height: 56px;
  }
  .quick-link > span {
    margin: 0;
  }
  .toolbar {
    grid-template-columns: minmax(0, 1fr);
    padding: 16px;
  }
  .toolbar select {
    width: 100%;
  }
  .table-scroll tbody {
    padding: 12px;
    gap: 12px;
  }
  .table-scroll tr {
    padding: 16px 14px;
  }
  .table-foot {
    padding: 16px;
  }
  .editor-dialog {
    width: 100%;
    max-width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    border-radius: 0;
    scrollbar-gutter: auto;
  }
  .editor-header {
    padding: 16px;
    padding-top: max(16px, env(safe-area-inset-top));
    gap: 12px;
  }
  .editor-header h2 {
    font-size: 20px;
  }
  .editor-header p {
    font-size: 13px;
  }
  .editor-body {
    padding: 22px 16px;
  }
  .editor-actions {
    padding: 12px 16px;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .editor-actions .hint,
  .editor-actions .spacer {
    display: none;
  }
  .editor-actions > * {
    min-width: 0;
  }
  .editor-actions .btn {
    min-height: 48px;
    padding: 10px 8px;
  }
  .editor-actions a {
    font-size: 13px;
  }
  .editor-actions button[type='submit']:only-of-type {
    grid-column: 1/-1;
  }
  .form-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .form-grid .full {
    grid-column: auto;
  }
  .upload-field {
    flex-wrap: wrap;
    gap: 8px;
  }
  .upload-field input {
    flex-basis: 100%;
  }
  .upload-field .btn {
    margin: 0;
  }
  .spec-row,
  .nav-row {
    grid-template-columns: minmax(0, 1fr) 44px;
    gap: 8px;
    padding: 12px;
    background: #f7f9f2;
    border: 1px solid var(--line);
    border-radius: 6px;
  }
  .spec-row input,
  .nav-row input {
    grid-column: 1;
  }
  .spec-row .icon-btn,
  .nav-row .icon-btn {
    grid-column: 2;
    grid-row: 1 / span 2;
  }
  .gallery-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .gallery-item img {
    height: 108px;
  }
  .settings-form .panel-body {
    padding: 18px 16px;
  }
  .settings-footer {
    padding: 16px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .settings-footer .hint {
    grid-column: 1/-1;
  }
  .settings-footer .btn {
    padding-inline: 10px;
  }
  .block-row {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 8px;
    padding: 12px;
  }
  .block-row > div:not(.block-move) {
    grid-column: 1/-1;
  }
  .block-move {
    grid-column: 2;
    grid-row: 1;
  }
  .block-row > label {
    grid-column: 1;
    grid-row: 1;
  }
  .inquiry-detail {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }
  .media-grid {
    gap: 12px;
  }
  .media-card img {
    height: 140px;
  }
  .media-card > div {
    padding: 12px;
    flex-wrap: wrap;
  }
  .admin-footer {
    padding: 18px 16px;
    gap: 12px;
  }
  .empty,
  .loading {
    padding: 44px 20px;
  }
  .login-layout {
    display: block;
    min-height: 100dvh;
  }
  .login-intro {
    padding: 24px;
  }
  .login-kicker,
  .login-intro h1,
  .login-intro > p,
  .login-intro > a:not(.admin-brand),
  .login-foot {
    display: none;
  }
  .login-panel {
    padding: 40px 24px;
  }
  .login-panel > div {
    max-width: 420px;
  }
  .toast-in-dialog {
    position: static;
    margin: 12px 16px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}
/* Content workflow controls */
.workflow-note {
  padding: 18px 22px;
  background: #edf3ef;
  border: 1px solid #d7e2da;
  border-radius: 12px;
  line-height: 1.8;
  margin-bottom: 20px;
  overflow-wrap: anywhere;
}
.workflow-note a {
  text-decoration: underline;
}
.workflow-note .actions {
  margin-top: 12px;
}
.settings-jumps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}
.settings-form section {
  scroll-margin-top: 90px;
}
.upload-field {
  flex-wrap: wrap;
}
.upload-field input {
  min-width: 150px;
  flex: 1 1 220px;
}
.nav-row {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr) 44px 88px;
}
.nav-move {
  display: flex;
}
.gallery-item {
  padding-bottom: 44px;
}
.gallery-tools {
  display: flex;
  position: absolute;
  inset: auto 0 0;
  background: white;
}
.gallery-tools button {
  position: static;
  width: auto;
  height: 44px;
  color: #253a30;
  background: white;
  border-radius: 0;
  flex: 1;
  font-size: 12px;
}
.gallery-tools button:last-child {
  flex: 2;
}
.media-picker {
  border: 0;
  border-radius: 16px;
  width: min(760px, calc(100% - 24px));
  max-height: 85dvh;
  padding: 0;
  color: #253a30;
}
.media-picker::backdrop {
  background: rgb(17 30 23 / 55%);
}
.picker-content {
  padding: 20px;
}
.picker-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.picker-item {
  border: 1px solid #d7e2da;
  border-radius: 8px;
  padding: 8px;
  background: white;
  text-align: center;
  cursor: pointer;
}
.picker-item:hover,
.picker-item:focus-visible {
  outline: 2px solid #476a55;
}
.picker-item img {
  display: block;
  width: 100%;
  height: 130px;
  object-fit: contain;
}
.picker-item span {
  display: block;
  padding-top: 8px;
}
.help-link {
  font-size: 14px;
  white-space: nowrap;
}
@media (max-width: 900px) {
  .nav-row {
    grid-template-columns: minmax(0, 1fr) 44px 88px;
  }
  .nav-row input[data-key='label'] {
    grid-column: 1 / -1;
  }
  .picker-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .gallery-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .settings-footer {
    flex-wrap: wrap;
  }
}
@media (max-width: 600px) {
  .editor-actions .spacer {
    display: none;
  }
  .gallery-tools button {
    min-width: 0;
  }
  .help-link {
    font-size: 12px;
  }
  .workflow-note {
    padding: 14px;
  }
  .nav-row {
    grid-template-columns: minmax(0, 1fr) 44px;
  }
  .nav-row input[data-key='label'] {
    grid-column: 1;
  }
  .nav-row .nav-move {
    grid-column: 1 / -1;
    grid-row: 3;
    justify-content: flex-end;
  }
  .nav-move .icon-btn {
    flex: 0 0 44px;
  }
}
