:root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #1b3029;
  background: #f4f6f5;
  font-synthesis: none;
  --green: #17634b;
  --green-dark: #0f4d39;
  --muted: #64746d;
  --border: #dfe7e2;
}
* { box-sizing: border-box; }
body { margin: 0; font-size: 14px; line-height: 1.6; }
[hidden] { display: none !important; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled, button[aria-disabled="true"] { cursor: not-allowed; opacity: .55; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible { outline: 3px solid #428b70; outline-offset: 3px; }
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 5; padding: 10px 16px; background: white; }
.skip-link:focus { top: 8px; }
.demo-banner { padding: 10px 24px; background: #fff4d9; color: #745015; border-bottom: 1px solid #ead8ab; text-align: center; font-size: 13px; }
.site-header { min-height: 76px; padding: 16px 32px; display: flex; align-items: center; justify-content: space-between; gap: 16px; background: white; border-bottom: 1px solid var(--border); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font-size: 22px; font-weight: 750; letter-spacing: -.3px; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px 12px 12px 2px; background: var(--green); color: white; font-size: 24px; }
.brand small { margin-left: 10px; font-size: 14px; font-weight: 500; color: var(--muted); }
.environment { padding: 4px 12px; border: 1px solid var(--border); border-radius: 5px; color: var(--muted); font-size: 12px; }
.workspace { display: grid; grid-template-columns: 230px minmax(0, 1fr); min-height: calc(100vh - 118px); }
.sidebar { padding: 28px 18px; border-right: 1px solid var(--border); background: #fbfcfb; }
.nav-label { margin: 0 12px 16px; color: #758079; font-size: 11px; letter-spacing: 2px; }
.nav-current, .nav-unavailable { padding: 12px; margin-bottom: 8px; display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; border-radius: 6px; }
.nav-current { background: #e5f0e9; color: var(--green-dark); font-weight: 650; }
.nav-current span, .nav-unavailable span { font-size: 10px; white-space: nowrap; font-weight: 400; }
.nav-unavailable { color: #758079; }
.scope-note { border-top: 1px solid var(--border); margin: 40px 12px 0; padding-top: 20px; color: var(--muted); font-size: 12px; }
.scope-note strong { color: #42594e; }
.scope-note p { margin: 8px 0 12px; }
main { min-width: 0; max-width: 1600px; width: 100%; padding: 34px 36px 24px; margin: 0 auto; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 24px; }
.eyebrow { margin: 0 0 4px; color: var(--green); font-size: 11px; letter-spacing: 2px; font-weight: 700; }
h1 { font-size: 27px; letter-spacing: -.5px; line-height: 1.35; margin: 0; }
.subtitle { color: var(--muted); margin: 8px 0 0; }
.button { min-height: 38px; padding: 8px 15px; border: 1px solid #cfdad3; border-radius: 5px; background: white; color: #344b40; white-space: nowrap; font-weight: 550; line-height: 1.4; }
.button:hover:not(:disabled):not([aria-disabled="true"]) { background: #f1f6f2; border-color: #8ea99b; }
.button.primary { background: var(--green); border-color: var(--green); color: white; }
.button.primary:hover:not(:disabled):not([aria-disabled="true"]) { background: var(--green-dark); }
.button.quiet { background: transparent; }
.button.danger { background: #a73535; border-color: #a73535; color: white; }
.button.danger:hover:not(:disabled):not([aria-disabled="true"]) { background: #8d2929; }
.notice { padding: 16px 20px; border: 1px solid #d5e5da; border-left: 3px solid #76a08a; border-radius: 4px; background: #eff6f1; color: #3c5b49; font-size: 13px; }
.notice p { margin: 3px 0 0; }
.feedback { margin: 16px 0; padding: 10px 13px; border-radius: 4px; border: 1px solid #dce5df; background: #f9fbfa; color: #4c6256; overflow-wrap: anywhere; }
.feedback[data-kind="success"] { color: #1b5f41; background: #eaf5ed; border-color: #c9e0cf; }
.feedback[data-kind="error"] { color: #922e2e; background: #fff2f0; border-color: #edc5c0; }
.panel { background: white; border: 1px solid var(--border); border-radius: 7px; box-shadow: 0 2px 5px #1d3b2a04; overflow: hidden; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 24px 15px; }
h2 { margin: 0; font-size: 17px; font-weight: 650; }
.panel-heading p { margin: 3px 0 0; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.search-form { padding: 0 24px 20px; }
.search-form label { display: block; color: #4c6256; margin-bottom: 6px; font-size: 12px; }
.search-controls { display: flex; gap: 8px; }
.search-controls input { flex: 1; max-width: 460px; min-width: 100px; }
input, select, textarea { min-height: 39px; border: 1px solid #cfdad3; border-radius: 4px; padding: 8px 10px; background: white; color: #243e30; max-width: 100%; }
input::placeholder, textarea::placeholder { color: #849089; }
input[readonly], select:disabled { background: #f0f3f1; color: #5d6c64; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
caption { text-align: left; }
th { padding: 12px 20px; background: #f7f9f7; color: #617568; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); font-size: 12px; font-weight: 550; white-space: nowrap; }
td { padding: 17px 20px; border-bottom: 1px solid #edf1ee; vertical-align: top; font-size: 13px; }
tr:last-child td { border-bottom: 0; }
.variety-name { display: block; min-width: 100px; max-width: 250px; color: #243d2f; overflow-wrap: anywhere; }
.row-notes { color: var(--muted); font-size: 12px; max-width: 260px; margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.batch-no { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 10px; max-width: 240px; overflow-wrap: anywhere; color: #65796b; }
.synthetic-tag { display: inline-block; border-radius: 3px; padding: 1px 5px; margin-top: 5px; background: #eff5ef; color: #607964; font-family: inherit; font-size: 10px; }
.row-version { font-size: 10px; color: #7a887f; }
.number { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.row-actions { white-space: nowrap; }
.text-button { border: 0; padding: 0; min-height: 30px; background: transparent; color: var(--green); font-weight: 550; font-size: 13px; }
.text-button + .text-button { margin-left: 14px; }
.text-button:hover { text-decoration: underline; }
.text-danger { color: #a33a35; }
.list-state { padding: 64px 24px; text-align: center; color: var(--muted); border-top: 1px solid var(--border); }
.pagination { display: flex; justify-content: space-between; align-items: center; gap: 16px; border-top: 1px solid var(--border); padding: 14px 24px; }
.pagination p { font-size: 12px; margin: 0; color: var(--muted); }
.pagination > div { display: flex; gap: 8px; }
.footer-note { margin-top: 18px; font-size: 12px; color: #758279; }
dialog { width: min(600px, calc(100% - 32px)); padding: 24px; border: 1px solid #cfdad3; border-radius: 9px; color: #213c2c; box-shadow: 0 24px 80px #112c2730; max-height: calc(100dvh - 40px); overflow-y: auto; }
dialog::backdrop { background: #102b245c; }
#delete-dialog { max-width: 500px; }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.dialog-heading h2 { font-size: 20px; }
.icon-button { display: grid; place-items: center; width: 34px; height: 34px; font-size: 24px; border: 0; border-radius: 4px; color: #63776a; background: #f3f6f3; }
.form-help { color: var(--muted); font-size: 12px; margin: 12px 0 20px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 16px; }
.field { min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 550; }
.field label span { color: #77857d; font-size: 10px; margin-left: 5px; font-weight: 400; }
.field input, .field select, .field textarea { width: 100%; }
.field small { display: block; margin-top: 5px; font-size: 11px; color: var(--muted); }
textarea { resize: vertical; }
.record-meta { font-family: ui-monospace, monospace; color: #77857d; font-size: 11px; overflow-wrap: anywhere; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; border-top: 1px solid var(--border); margin-top: 24px; padding-top: 18px; }
.delete-target { background: #f6f8f6; border: 1px solid var(--border); padding: 12px; border-radius: 4px; overflow-wrap: anywhere; }
.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; }
@media (max-width: 1100px) {
  .workspace { grid-template-columns: 190px minmax(0, 1fr); }
  main { padding: 28px 22px; }
  .sidebar { padding: 28px 10px; }
  td, th { padding-left: 14px; padding-right: 14px; }
}
@media (max-width: 760px) {
  .site-header { padding: 14px 18px; min-height: 68px; }
  .brand { font-size: 20px; }
  .brand small { margin-left: 5px; font-size: 12px; }
  .environment { font-size: 10px; padding: 4px 6px; }
  .demo-banner { padding: 10px 16px; text-align: left; font-size: 12px; }
  .workspace { display: block; }
  .sidebar { display: none; }
  main { padding: 24px 16px; }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 16px; }
  h1 { font-size: 24px; }
  .subtitle { font-size: 13px; }
  .panel-heading { padding: 16px; }
  .panel-heading .button { padding: 8px; font-size: 12px; }
  .search-form { padding: 0 16px 16px; }
  .search-controls { gap: 6px; }
  .search-controls .button { padding: 8px 10px; }
  table { min-width: 780px; }
  .pagination { padding: 12px 16px; flex-wrap: wrap; }
  dialog { padding: 20px; }
  .form-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: no-preference) {
  .button { transition: background-color .12s ease, border-color .12s ease; }
}
