:root {
  color-scheme: light;
  --bg: #f4f6f1;
  --panel: #fff;
  --ink: #172821;
  --muted: #53655b;
  --border: #dce4db;
  --accent: #1e5745;
  --accent-soft: #e9f2e9;
  --sidebar: #102a23;
  --lime: #e9fb70;
  --shadow: 0 2px 8px #17282108;
  font-family: "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-size: 14px; }
a { color: var(--accent); text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
button:disabled, select:disabled { cursor: default; opacity: .48; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid #709624; outline-offset: 3px; }
button svg, a svg { flex-shrink: 0; }
h1, h2, h3, p { margin: 0; }
h2 { font-size: 20px; letter-spacing: -.025em; }
p { color: var(--muted); line-height: 1.55; }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip:focus { position: fixed; z-index: 10; left: 12px; top: 12px; background: var(--panel); padding: 12px; }
.sidebar { width: 237px; position: fixed; inset: 0 auto 0 0; display: flex; flex-direction: column; z-index: 5; background: var(--sidebar); color: #edf4ed; }
.brand { display: flex; align-items: center; gap: 10px; min-height: 77px; padding: 16px 17px; color: #fff; border-bottom: 1px solid #ffffff17; }
.brand strong { display: block; font-size: 15px; letter-spacing: -.02em; }
.brand small { display: block; margin-top: 4px; color: #bbd1c6; font-size: 9px; font-weight: 700; letter-spacing: .11em; }
.sidebar nav { overflow: auto; padding: 11px 12px; scrollbar-width: thin; scrollbar-color: #486c5c transparent; }
.sidebar nav a { display: flex; align-items: center; gap: 10px; min-height: 34px; padding: 7px 9px; margin-bottom: 2px; border-radius: 7px; color: #deebe3; font-size: 13px; line-height: 1.3; }
.sidebar nav a svg { color: #9fc3b3; }
.sidebar nav a:hover, .sidebar nav a[aria-current], .sidebar nav .module-active a { background: #285446; color: #fff; }
.sidebar nav a[aria-current] svg, .sidebar nav .module-active svg { color: var(--lime); }
.nav-group { margin: 15px 0; }
.nav-group h2 { margin: 0 9px 5px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .13em; color: #a5c5b5; }
.side-footer { margin-top: auto; border-top: 1px solid #ffffff17; padding: 16px 21px; font-size: 11px; color: #d5e5da; display: flex; align-items: center; gap: 7px; }
.dot, .hero-eyebrow span { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--lime); }
.workspace { margin-left: 237px; min-height: 100vh; display: flex; flex-direction: column; min-width: 0; }
.topbar { height: 69px; padding: 0 29px; background: var(--panel); border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.breadcrumb, .top-actions, .list-actions, .heading-actions { display: flex; align-items: center; gap: 9px; }
.breadcrumb span { color: var(--muted); }
.breadcrumb svg { color: var(--muted); }
.global-search, .icon-button, .avatar { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 37px; border-radius: 8px; border: 1px solid var(--border); background: var(--panel); color: var(--ink); padding: 0 10px; }
.global-search { color: var(--muted); }
.global-search:hover, .icon-button:hover { background: var(--accent-soft); }
kbd { font: 10px system-ui, sans-serif; border: 1px solid var(--border); border-radius: 4px; padding: 2px 4px; color: var(--muted); white-space: nowrap; }
.avatar { background: var(--accent-soft); color: var(--accent); font-weight: 800; min-width: 38px; }
.mobile-menu { display: none; }
.workspace-tabs { display: flex; gap: 4px; padding: 7px 28px 0; background: var(--panel); border-bottom: 1px solid var(--border); overflow-x: auto; }
.workspace-tab { display: flex; align-items: center; flex-shrink: 0; gap: 4px; border: 1px solid transparent; border-radius: 7px 7px 0 0; }
.workspace-tab.current { border-color: var(--border); background: var(--bg); }
.workspace-tab a { color: var(--ink); padding: 7px 0 7px 9px; font-size: 12px; }
.workspace-tab button, th button { border: 0; background: transparent; color: var(--muted); padding: 5px; display: flex; align-items: center; }
#content { width: 100%; max-width: 1510px; margin: 0 auto; flex: 1; padding: 26px 29px 28px; min-width: 0; outline: none; }
.welcome-hero { min-height: 250px; position: relative; display: flex; align-items: center; overflow: hidden; background: #18392d; border-radius: 16px; color: white; padding: 33px 36px; }
.hero-content { position: relative; z-index: 1; max-width: 550px; }
.hero-eyebrow, .eyebrow { display: inline-flex; align-items: center; gap: 7px; font-size: 10px; letter-spacing: .14em; font-weight: 800; text-transform: uppercase; color: var(--accent); }
.hero-eyebrow { color: var(--lime); }
.welcome-hero h1 { font-size: clamp(31px, 4vw, 54px); letter-spacing: -.058em; line-height: 1.02; margin-top: 9px; }
.welcome-hero p { color: #d8e8dd; margin: 12px 0 21px; font-size: 15px; max-width: 405px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.hero-art { position: absolute; right: 2%; width: 30%; height: 100%; display: grid; place-items: center; color: var(--lime); }
.hero-mark { width: 151px; height: 151px; display: grid; place-items: center; border-radius: 26px; border: 1px solid #e9fb7055; background: #234637; transform: rotate(-8deg); }
.hero-mark svg { transform: rotate(8deg); stroke-width: 1.15; }
.orbit { position: absolute; width: 324px; height: 324px; border-radius: 50%; border: 1px dashed #d4ee8b55; }
.orbit-small { width: 229px; height: 229px; border-style: solid; border-color: #d4ee8b27; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 7px; min-height: 37px; border-radius: 8px; border: 1px solid var(--border); background: var(--panel); padding: 7px 11px; color: var(--ink); font-size: 13px; font-weight: 650; line-height: 1.25; white-space: nowrap; }
.button:hover:not(:disabled) { background: var(--accent-soft); }
.primary, .heading-actions > .button:first-child { background: #1e5745; border-color: #1e5745; color: #fff; }
.primary:hover:not(:disabled), .heading-actions > .button:first-child:hover { background: #153e31; }
.welcome-hero .primary { background: var(--lime); color: #172821; border-color: var(--lime); }
.welcome-hero .primary:hover { background: #f5ffab; }
.hero-secondary { background: #ffffff0d; color: #fff; border-color: #e7f9ec55; }
.hero-secondary:hover:not(:disabled) { background: #ffffff23; }
.home-section { margin-top: 26px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.section-head h2 { font-size: 23px; margin-top: 2px; }
.stat-grid, .quick-grid, .help-grid { display: grid; gap: 12px; }
.stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.help-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat, .quick-card, .panel, .help-strip { background: var(--panel); border: 1px solid var(--border); border-radius: 11px; color: var(--ink); box-shadow: var(--shadow); }
.stat { min-height: 121px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 5px; padding: 13px; }
.stat:hover, .quick-card:hover { border-color: #86a996; }
.stat-icon, .empty-icon { background: var(--accent-soft); border-radius: 9px; display: inline-grid; place-items: center; width: 35px; height: 35px; color: var(--accent); }
.stat-label { grid-column: 1 / -1; font-size: 12px; color: var(--muted); }
.stat strong { font-size: 28px; line-height: 1; }
.stat-arrow { color: var(--muted); }
.quick-card, .help-strip { display: flex; align-items: center; gap: 11px; padding: 12px; }
.quick-card > span:nth-child(2), .help-strip > div { flex: 1; min-width: 0; }
.quick-card strong, .quick-card small { display: block; }
.quick-card small { color: var(--muted); margin-top: 3px; font-size: 11px; }
.quick-card > svg { color: var(--accent); }
.help-strip { margin-top: 15px; }
.help-strip p { font-size: 12px; margin-top: 2px; }
.footer { padding: 14px 29px; border-top: 1px solid var(--border); color: var(--muted); display: flex; justify-content: space-between; gap: 12px; font-size: 11px; }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 14px; margin: 7px 0 18px; }
.page-heading h1 { margin: 4px 0 7px; font-size: clamp(28px, 4vw, 39px); line-height: 1.04; letter-spacing: -.05em; }
.heading-actions { flex-wrap: wrap; }
.module-nav { display: flex; flex-wrap: wrap; gap: 5px; margin: 0 0 13px; border-bottom: 1px solid var(--border); }
.module-nav a, .module-nav > span { color: var(--muted); padding: 8px 10px; font-size: 13px; font-weight: 650; border-bottom: 2px solid transparent; }
.module-nav a:hover, .module-nav a[aria-current] { color: var(--accent); border-color: var(--accent); }
.module-nav > span { opacity: .54; }
.list-panel { overflow: hidden; }
.list-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 15px; }
.list-header h2 { display: inline-block; margin-right: 6px; }
.record-count, .pill { display: inline-flex; padding: 3px 8px; border-radius: 25px; background: var(--accent-soft); color: var(--accent); font-weight: 650; font-size: 11px; white-space: nowrap; }
.filter-row { padding: 0 15px 12px; display: flex; align-items: end; gap: 8px; flex-wrap: wrap; }
.extra-filters { align-items: center; }
.search-field { min-width: 185px; display: flex; align-items: center; gap: 7px; background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding-left: 9px; color: var(--muted); }
.search-field input { flex: 1; min-width: 0; border: 0; background: transparent; }
input:not([type=checkbox]), select, textarea { min-height: 37px; border: 1px solid var(--border); border-radius: 7px; padding: 7px 8px; background: var(--panel); color: var(--ink); }
.search-field input { border: 0; }
input[type=checkbox] { accent-color: var(--accent); }
.filter-field, .form-field { display: grid; gap: 4px; }
.filter-field span, .inline-label { color: var(--muted); font-size: 11px; font-weight: 650; }
.inline-label { display: inline-flex; align-items: center; gap: 6px; }
.inline-label input { width: 66px; }
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; min-width: 100%; white-space: nowrap; }
th, td { padding: 8px 12px; text-align: left; border-block: 1px solid var(--border); }
th { color: var(--muted); background: var(--bg); font-size: 11px; }
th button { padding: 0; font-weight: 700; }
td { max-width: 270px; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }
td a { font-weight: 700; }
.row-link { display: flex; align-items: center; }
.empty { padding: 40px 16px; display: grid; justify-items: center; gap: 7px; text-align: center; }
.empty h3 { font-size: 16px; }
.empty p { max-width: 410px; font-size: 13px; }
.empty-icon { width: 49px; height: 49px; margin-bottom: 5px; }
.empty .button { margin-top: 6px; }
.pagination { border-top: 1px solid var(--border); display: flex; gap: 9px; align-items: center; justify-content: space-between; padding: 10px 15px; color: var(--muted); font-size: 12px; }
.pagination > div, .pagination label { display: flex; align-items: center; gap: 6px; }
.detail-panel { padding: 17px; margin-top: 12px; }
.detail-panel h2 { margin-bottom: 7px; }
.detail-panel p { margin-bottom: 10px; }
.detail-panel dl { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin: 12px 0 0; }
dt { font-size: 11px; font-weight: 650; color: var(--muted); }
dd { margin: 3px 0 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.related { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.related a:not(.button), .search-results a { padding: 7px; background: var(--accent-soft); border-radius: 6px; }
.form-context { margin: 0 0 10px; max-width: 220px; }
.create-panel { max-width: 780px; }
.fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.form-field span { font-size: 12px; font-weight: 700; }
.form-field small { font-weight: 400; margin-left: 3px; color: var(--muted); }
.form-field.full { grid-column: 1 / -1; }
.form-error { min-height: 20px; color: #b63b34; margin: 8px 0 1px; font-size: 13px; }
.form-actions { display: flex; gap: 8px; }
.notice { display: flex; align-items: center; gap: 8px; padding: 10px; margin-bottom: 10px; background: var(--accent-soft); color: var(--ink); border-radius: 7px; }
.notice a { font-weight: 700; }
.report .list-header, .report .filter-row { padding-left: 0; padding-right: 0; }
.step-number { display: inline-block; padding: 4px 6px; background: var(--accent-soft); color: var(--accent); border-radius: 5px; margin-bottom: 8px; }
.login { max-width: 420px; margin: 12vh auto; padding: 25px; }
.login h1 { margin: 12px 0 5px; }
.login form { margin-top: 12px; }
.boot { padding: 24px; }
dialog { width: min(620px, calc(100% - 28px)); max-height: 88vh; border: 1px solid var(--border); border-radius: 14px; background: var(--panel); color: var(--ink); padding: 0; box-shadow: 0 16px 70px #081c1466; }
dialog::backdrop { background: #10271db3; }
.dialog-head { padding: 12px 16px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.dialog-body { padding: 15px 16px; }
.search-results, .account-menu { display: grid; gap: 5px; margin-top: 8px; }
.search-results h3 { color: var(--muted); font-size: 11px; margin: 4px 0; }
.account-menu a, .account-menu button { display: inline-flex; align-items: center; justify-content: flex-start; gap: 8px; padding: 7px; text-align: left; }
#toast { display: none; position: fixed; z-index: 8; right: 14px; bottom: 14px; max-width: min(420px, 92vw); padding: 10px 15px; border-radius: 8px; background: var(--sidebar); color: white; box-shadow: 0 3px 12px #0004; }
#toast.show { display: block; }
.dark { color-scheme: dark; --bg: #10201b; --panel: #172b24; --ink: #ebf2ec; --muted: #bbcec2; --border: #344b40; --accent: #bfe690; --accent-soft: #263d31; }
.dark .form-error { color: #ffab9d; }
@media (max-width: 1040px) {
  .sidebar { width: 203px; }
  .workspace { margin-left: 203px; }
  #content, .topbar { padding-inline: 18px; }
  .hero-art { opacity: .55; right: 0; }
  .stat-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 760px) {
  .sidebar { transform: translateX(-100%); transition: transform .18s; }
  .sidebar.open { transform: translateX(0); box-shadow: 0 0 0 100vmax #132e2566; }
  .workspace { margin-left: 0; }
  .mobile-menu { display: inline-flex; }
  .topbar { justify-content: flex-start; height: 59px; padding-inline: 10px; }
  .top-actions { margin-left: auto; }
  .breadcrumb span, .breadcrumb svg, .global-search span, .global-search kbd { display: none; }
  #content { padding: 14px 11px; }
  .workspace-tabs, .footer { padding-inline: 10px; }
  .welcome-hero { padding: 24px 17px; min-height: 220px; }
  .hero-art { display: none; }
  .quick-grid, .help-grid { grid-template-columns: 1fr; }
  .section-head h2 { font-size: 19px; }
  .page-heading, .list-header { align-items: flex-start; flex-direction: column; }
  .list-actions { flex-wrap: wrap; }
  .detail-panel dl { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .help-strip { flex-wrap: wrap; }
}
@media (max-width: 420px) {
  .fields { grid-template-columns: 1fr; }
  .pagination { align-items: flex-start; flex-direction: column; }
  .hero-actions .button { white-space: normal; }
}
