:root {
  --ink: #172c2b;
  --text: #223633;
  --muted: #5c706b;
  --line: #d6e0db;
  --paper: #f6f8f5;
  --green: #11614f;
  --mint: #d3eedf;
  --gold: #965b13;
  --red: #a43d32;
  --side: 204px;
  --radius: 12px;
  font-family:
    "Inter", "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--paper);
  font-size: 14px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}
button,
a,
input,
select,
textarea {
  outline-offset: 3px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid #38a68c;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}
a {
  color: var(--green);
}
h1,
h2,
h3,
h4,
p {
  margin: 0;
}
svg {
  vertical-align: middle;
  flex-shrink: 0;
}
.skip {
  position: fixed;
  left: 10px;
  top: -52px;
  z-index: 500;
  background: white;
  padding: 10px;
}
.skip:focus {
  top: 5px;
}
.shell {
  display: grid;
  grid-template-columns: var(--side) minmax(0, 1fr);
  min-height: 100vh;
}
#sidebar {
  background: #122c29;
  color: #e9f1ec;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 30px 15px 18px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0 8px 39px;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 39px;
  height: 39px;
  flex: none;
  border: 1px solid #79b09c;
  border-radius: 11px;
  background: #c9edcf;
  color: #153d32;
}
.brand-name {
  font-size: 21px;
  font-weight: 750;
  letter-spacing: 0.07em;
  line-height: 1.2;
}
.brand small {
  font-family: Consolas, monospace;
  display: block;
  color: #acbeb5;
  letter-spacing: 1.35px;
  font-size: 9px;
  margin-top: 5px;
}
.nav-label {
  font-size: 10px;
  color: #a2b9b0;
  letter-spacing: 0.11em;
  font-weight: 650;
  margin: 0 14px 8px;
}
.nav-group {
  display: grid;
  gap: 4px;
  margin-bottom: 29px;
}
.nav-link {
  background: transparent;
  border: 0;
  color: #cedbd5;
  padding: 11px 14px;
  border-radius: 7px;
  text-align: left;
  display: flex;
  gap: 12px;
  align-items: center;
  font-weight: 550;
  font-size: 13px;
  min-height: 41px;
}
.nav-link:hover {
  background: #22423c;
}
.nav-link[aria-current="page"] {
  background: #d0ead7;
  color: #153d30;
}
.nav-link[aria-current="page"] svg {
  stroke: #195f48;
}
.side-bottom {
  margin-top: auto;
  border-top: 1px solid #38524b;
  padding-top: 16px;
}
.side-bottom .persona {
  display: flex;
  gap: 11px;
  align-items: center;
  padding: 11px 9px 0;
}
.avatar {
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  background: #e5ecd2;
  color: #385341;
  font-size: 12px;
  font-weight: 650;
}
.persona b,
.persona small {
  display: block;
}
.persona b {
  font-size: 12px;
}
.persona small {
  font-size: 10px;
  color: #aabdb4;
  margin-top: 3px;
}
.work-area {
  min-width: 0;
}
.topbar {
  height: 59px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 clamp(16px, 2.6vw, 42px);
  background: #fff;
  border-bottom: 1px solid var(--line);
  gap: 12px;
}
.crumb,
.head-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}
.crumb {
  color: var(--muted);
  font-size: 12px;
}
.crumb strong {
  color: #263d38;
  font-weight: 620;
}
.head-actions {
  gap: 16px;
}
.online {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #486058;
}
.online i,
.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #37a27d;
  display: inline-block;
}
.online.off i {
  background: #c8994c;
}
#content {
  min-height: calc(100vh - 59px);
  outline: none;
}
.page {
  max-width: 1600px;
  margin: auto;
  padding: clamp(22px, 2.5vw, 39px) clamp(18px, 2.6vw, 42px) 34px;
}
.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 23px;
}
.eyebrow,
.kicker {
  font-family: Consolas, "Courier New", monospace;
  font-weight: 650;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 10px;
  color: #447365;
}
.page-title,
h1 {
  font-size: clamp(25px, 2vw, 34px);
  color: var(--ink);
  line-height: 1.3;
  letter-spacing: -0.04em;
}
.page-head .eyebrow {
  margin-bottom: 5px;
}
.muted {
  color: var(--muted);
}
.sub {
  color: var(--muted);
  font-size: 12px;
  margin-top: 7px;
  line-height: 1.6;
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.btn {
  border: 1px solid #cbd8d0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 7px;
  background: #fff;
  padding: 8px 13px;
  min-height: 35px;
  line-height: 1.3;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.btn:hover:not(:disabled) {
  filter: brightness(0.96);
}
.btn.primary,
.btn-primary {
  background: var(--green);
  color: white;
  border-color: var(--green);
}
.btn.secondary {
  background: white;
  color: var(--ink);
}
.btn.danger {
  background: #a34036;
  color: white;
  border-color: #a34036;
}
.btn.ghost {
  border-color: transparent;
  background: transparent;
}
.btn.compact {
  min-height: 29px;
  padding: 5px 9px;
  font-size: 11px;
}
.icon-button {
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #547064;
  padding: 6px;
  display: inline-grid;
  place-items: center;
}
.icon-button:hover {
  background: #e8f2e9;
}
.field {
  display: grid;
  gap: 6px;
}
.input,
input[type="text"],
input[type="number"],
input[type="search"],
input[type="password"],
select,
textarea {
  border: 1px solid #c9d6ce;
  border-radius: 6px;
  background: #fff;
  padding: 8px 10px;
  min-width: 0;
}
.badge {
  font-size: 11px;
  line-height: 1.25;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 20px;
  background: #ecf0ed;
  color: #496155;
  padding: 4px 8px;
  white-space: nowrap;
}
.badge.draft {
  color: #8a561a;
  background: #fbefd8;
}
.badge.completed {
  color: #215e48;
  background: #dff1e5;
}
.badge.error {
  color: #954a38;
  background: #fbe9e1;
}
.badge.unstarted {
  color: #5b6963;
  background: #eef1ee;
}
.badge i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}
.toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-h {
  font-size: 17px;
  font-weight: 720;
  color: var(--ink);
  letter-spacing: -0.025em;
}
.mono {
  font-family: Consolas, "Courier New", monospace;
  font-variant-numeric: tabular-nums;
}
.lib-overview {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(235px, 1fr);
  gap: 16px;
  margin-bottom: 22px;
}
.continue {
  position: relative;
  min-height: 172px;
  background: #18372e;
  overflow: hidden;
  border: 1px solid #284d3d;
  color: white;
  border-radius: 12px;
  isolation: isolate;
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}
.continue:before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      90deg,
      rgba(13, 38, 31, 0.99) 2%,
      rgba(13, 38, 31, 0.9) 32%,
      rgba(13, 38, 31, 0.42) 65%,
      rgba(12, 31, 24, 0.04) 100%
    ),
    url("assets/stereo-left.jpg") 82% 52% / cover;
  z-index: -1;
}
.continue .kicker {
  color: #c6e5c9;
  display: flex;
  gap: 7px;
  align-items: center;
}
.continue h2 {
  font-size: 23px;
  margin: 8px 0 3px;
  letter-spacing: -0.035em;
}
.continue p {
  font-size: 11px;
  color: #e1ece4;
}
.continue .btn {
  background: #d9efd0;
  border-color: #d9efd0;
  color: #173a2c;
  margin-top: 15px;
  min-height: 29px;
}
.progress-card {
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.progress-card .barhead,
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.progress-card .stat {
  display: flex;
  align-items: baseline;
  gap: 9px;
  margin: 8px 0;
}
.stat strong {
  font-size: 32px;
  font-weight: 650;
  line-height: 1.1;
  letter-spacing: -0.05em;
}
.stat span {
  color: var(--muted);
  font-size: 12px;
}
.stackbar {
  height: 7px;
  display: flex;
  gap: 2px;
  border-radius: 4px;
  overflow: hidden;
  background: #e9eeea;
}
.stackbar i {
  display: block;
}
.legend {
  display: flex;
  gap: 11px;
  margin-top: 9px;
  font-size: 10px;
  color: var(--muted);
  flex-wrap: wrap;
}
.legend span {
  display: flex;
  gap: 4px;
  align-items: center;
}
.legend i {
  width: 7px;
  height: 7px;
  border-radius: 2px;
}
.source-line {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: Consolas, "Microsoft YaHei UI", monospace;
  font-size: 11px;
}
.lib-panel {
  overflow: hidden;
}
.panel-head {
  padding: 18px 20px 12px;
}
.panel-head small {
  color: var(--muted);
  font-size: 11px;
}
.library-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 18px 13px;
  flex-wrap: wrap;
}
.tabs {
  display: flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid #e0e7df;
  border-radius: 7px;
  background: #f4f6f2;
}
.tab {
  background: transparent;
  color: #5c6c62;
  border: 0;
  border-radius: 4px;
  padding: 5px 9px;
  font-size: 12px;
  white-space: nowrap;
}
.tab.on {
  background: white;
  box-shadow: 0 1px 4px #233b2622;
  color: #144836;
  font-weight: 650;
}
.tab .count {
  font-size: 10px;
  margin-left: 4px;
  opacity: 0.67;
}
.filter-tools {
  display: flex;
  gap: 7px;
}
.search {
  display: flex;
  align-items: center;
  padding: 0 8px;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
}
.search input[type="search"] {
  border: 0;
  background: transparent;
  width: 134px;
  outline-offset: 0;
  font-size: 12px;
}
.filter-tools select {
  font-size: 12px;
  padding: 5px 6px;
}
.table-scroll {
  overflow: auto;
}
.table,
.lib-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 12px;
  text-align: left;
}
.lib-table td,
.lib-table th {
  border-top: 1px solid #e3e9e3;
  padding: 10px 13px;
  white-space: nowrap;
}
.lib-table th {
  font-size: 10px;
  color: #5d6e62;
  background: #f4f7f2;
  font-weight: 600;
}
.lib-table td:first-child,
.lib-table th:first-child {
  padding-left: 20px;
}
.lib-table td:last-child,
.lib-table th:last-child {
  text-align: right;
  padding-right: 19px;
}
.lib-table tr:hover td {
  background: #f7faf6;
}
.rec-cell {
  display: flex;
  align-items: center;
  gap: 11px;
}
.rec-img {
  width: 48px;
  height: 34px;
  border-radius: 5px;
  object-fit: cover;
  background: #324b40;
}
.rec-cell b {
  display: block;
  font-size: 12px;
}
.rec-cell small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 3px;
}
.lib-foot {
  border-top: 1px solid var(--line);
  padding: 10px 20px;
  color: #66776d;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.empty {
  min-height: 180px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  padding: 25px;
  color: var(--muted);
}
.empty strong {
  color: var(--ink);
  font-size: 16px;
}
.media-ico {
  background: #e2eee5;
  border-radius: 10px;
  padding: 10px;
  color: #316550;
}
.notice {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 15px;
  background: #fff3df;
  color: #754d20;
  border: 1px solid #efd8ac;
  border-radius: 8px;
  font-size: 12px;
  margin-bottom: 13px;
}
#overlay:empty {
  display: none;
}
#overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: #071a166e;
  display: grid;
  place-items: center;
  padding: 15px;
  backdrop-filter: blur(2px);
}
.proto-modal {
  width: min(470px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: #fff;
  border: 1px solid #d2ddd4;
  border-radius: 14px;
  box-shadow: 0 20px 80px #0c211846;
  color: var(--ink);
}
.proto-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 21px 23px 0;
}
.proto-dialog-head h2 {
  font-size: 20px;
  line-height: 1.45;
}
.proto-dialog-head p,
.proto-body {
  color: #4c6258;
  font-size: 13px;
  line-height: 1.7;
}
.proto-dialog-head p {
  margin-top: 3px;
}
.proto-body {
  padding: 15px 23px 20px;
  overflow-wrap: anywhere;
}
.proto-body p + p {
  margin-top: 7px;
}
.proto-body pre {
  white-space: pre-wrap;
  max-height: 47vh;
  overflow: auto;
  background: #f2f5f0;
  padding: 12px;
  border-radius: 7px;
  font-size: 11px;
}
.proto-actions {
  border-top: 1px solid #dfe6df;
  padding: 13px 23px;
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}
.proto-modal .detail-line {
  padding: 8px 0;
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid #e4eae4;
}
.proto-modal [data-dismiss] {
  flex: none;
}
#toasts {
  position: fixed;
  right: 24px;
  bottom: 22px;
  z-index: 105;
  display: grid;
  gap: 7px;
}
.toast {
  background: #193f34;
  color: #fff;
  border: 1px solid #406554;
  padding: 11px 15px;
  border-radius: 8px;
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  box-shadow: 0 5px 20px #16312330;
}
@media (min-width: 1550px) {
  :root {
    --side: 224px;
  }
  .lib-table td {
    padding-top: 13px;
    padding-bottom: 13px;
  }
  .continue {
    min-height: 192px;
  }
}
@media (max-width: 1150px) {
  :root {
    --side: 175px;
  }
  #sidebar {
    padding-left: 10px;
    padding-right: 10px;
  }
  .lib-table td,
  .lib-table th {
    padding-left: 9px;
    padding-right: 9px;
  }
  .page {
    padding-left: 20px;
    padding-right: 20px;
  }
  .lib-overview {
    grid-template-columns: 1.3fr 1fr;
  }
}
@media (max-width: 860px) {
  :root {
    --side: 62px;
  }
  #sidebar {
    padding: 20px 7px 10px;
  }
  .brand {
    margin: 0 auto 28px;
  }
  .brand > div:last-child,
  .nav-label,
  .nav-link span,
  .persona > div:last-child,
  .side-bottom .persona,
  .head-actions .online {
    display: none;
  }
  .nav-link {
    padding: 11px;
    justify-content: center;
  }
  .nav-link svg {
    width: 19px;
    height: 19px;
  }
  .nav-group {
    margin-bottom: 18px;
  }
  .side-bottom .nav-link {
    margin: auto;
  }
  .lib-overview {
    grid-template-columns: 1.35fr 1fr;
  }
  .lib-table th:nth-child(2),
  .lib-table td:nth-child(2) {
    display: none;
  }
}
@media (max-width: 620px) {
  :root {
    --side: 0px;
  }
  .shell {
    display: block;
  }
  #sidebar {
    display: none;
  }
  .head-actions {
    gap: 5px;
  }
  .topbar {
    height: 49px;
    padding: 0 10px;
  }
  .page {
    padding: 17px 12px;
  }
  .lib-overview {
    grid-template-columns: 1fr;
  }
  .continue {
    min-height: 146px;
  }
  .progress-card {
    padding: 15px;
  }
  .page-head {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .panel-head {
    padding: 12px;
  }
  .library-tools {
    padding: 0 10px 10px;
  }
  .lib-foot {
    padding: 10px;
  }
  .lib-table th:nth-child(4),
  .lib-table td:nth-child(4) {
    display: none;
  }
  .lib-table td:first-child,
  .lib-table th:first-child {
    padding-left: 9px;
  }
  .lib-table td:last-child,
  .lib-table th:last-child {
    padding-right: 8px;
  }
  .topbar .crumb > span:first-of-type {
    display: none;
  }
}
.nav-shade {
  display: none;
}
.nav-toggle {
  border: 1px solid var(--line);
  background: #fff;
  min-height: 30px;
  min-width: 31px;
  margin-right: 5px;
  color: #344e43;
}
.nav-compact {
  --side: 62px;
}
.nav-compact #sidebar {
  padding: 22px 7px 12px;
}
.nav-compact .brand {
  margin: 0 auto 28px;
}
.nav-compact .brand > div:last-child,
.nav-compact .nav-label,
.nav-compact .nav-link span,
.nav-compact .side-bottom .persona {
  display: none;
}
.nav-compact .nav-link {
  justify-content: center;
  padding: 11px;
}
.nav-compact .nav-group {
  margin-bottom: 16px;
}
.nav-compact .side-bottom .nav-link {
  margin: auto;
}
@media (min-width: 621px) and (max-width: 860px) {
  .nav-expanded {
    --side: 165px;
  }
  .nav-expanded #sidebar {
    padding: 22px 10px 14px;
  }
  .nav-expanded .brand {
    margin: 0 5px 27px;
  }
  .nav-expanded .brand > div:last-child,
  .nav-expanded .nav-label,
  .nav-expanded .nav-link span {
    display: block;
  }
  .nav-expanded .nav-link {
    justify-content: flex-start;
  }
}
@media (max-width: 620px) {
  .nav-drawer #sidebar {
    z-index: 79;
    display: flex;
    position: fixed;
    inset: 0 auto 0 0;
    width: 194px;
    height: 100dvh;
    padding: 22px 12px 14px;
    overflow-y: auto;
  }
  .nav-drawer .brand {
    margin: 0 6px 25px;
  }
  .nav-drawer .brand > div:last-child,
  .nav-drawer .nav-label,
  .nav-drawer .nav-link span {
    display: block;
  }
  .nav-drawer .nav-link {
    justify-content: flex-start;
  }
  .nav-drawer .nav-shade {
    z-index: 78;
    display: block;
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: #0c262354;
  }
  .nav-toggle {
    margin-right: 0;
  }
}
@media (max-height: 680px) {
  #sidebar {
    padding-top: 15px;
    overflow-y: auto;
  }
  .brand {
    margin-bottom: 18px;
  }
  .nav-group {
    margin-bottom: 11px;
  }
  .side-bottom {
    padding-top: 6px;
  }
}
.lib-record-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 46px;
  height: 36px;
  background: #e8f0e9;
  color: #577360;
  border: 1px solid #d4e1d6;
  border-radius: 6px;
}
.loading {
  color: #607969;
}
.dir-choices {
  display: grid;
  gap: 6px;
  max-height: 43vh;
  overflow: auto;
}
.dir-choices > button {
  justify-content: flex-start;
}
.login-card {
  padding: 30px;
  width: min(100%, 400px);
}
.login-card h1 {
  font-size: 24px;
}
.login-card form {
  margin-top: 18px;
}
.login-card form .primary {
  margin-top: 12px;
  width: 100%;
}
.signed-out .shell {
  display: block;
}
.signed-out #sidebar,
.signed-out #topbar,
.signed-out .nav-shade {
  display: none;
}
.login-page {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.login-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 26px;
}
.account-form {
  display: grid;
  gap: 14px;
}
.account-form .field,
.template-form .field {
  font-size: 13px;
  font-weight: 600;
}
.account-form .svc-error:empty,
.template-form .svc-error:empty,
.proto-actions:empty {
  display: none;
}
.persona > div:last-child {
  min-width: 0;
  overflow-wrap: anywhere;
}
