:root {
  color-scheme: light;
  --bg: #f6f8fb;
  --surface: #ffffff;
  --surface-soft: #f9fbfd;
  --ink: #17202c;
  --muted: #657385;
  --line: #dde5ee;
  --accent: #16745f;
  --accent-2: #2f6fba;
  --shadow: 0 16px 40px rgba(31, 45, 61, .08);
}

.brand-lockup {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

.brand-logo-header {
  height: 48px;
  filter: drop-shadow(0 12px 24px rgba(16, 185, 129, .14));
  transition: transform .18s ease, filter .18s ease;
}

.brand-lockup-public:hover .brand-logo-header {
  transform: translateY(-1px);
  filter: drop-shadow(0 16px 30px rgba(16, 185, 129, .22));
}

.brand-logo-mobile-symbol {
  height: 38px;
  width: 38px;
  filter: drop-shadow(0 10px 20px rgba(16, 185, 129, .18));
}

.brand-lockup-sidebar {
  display: grid;
  gap: 3px;
}

.brand-logo-sidebar {
  height: 52px;
  width: 218px;
  max-width: 100%;
}

.brand-subtitle {
  margin-left: 77px;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  line-height: 1;
  text-transform: uppercase;
}

.landing-brand-card {
  display: inline-flex;
  align-items: center;
  width: min(100%, 360px);
  padding: 10px 14px 10px 10px;
  border: 1px solid rgba(52, 211, 153, .16);
  border-radius: 18px;
  background: rgba(2, 6, 23, .44);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .24), inset 0 1px 0 rgba(255, 255, 255, .04);
  backdrop-filter: blur(18px);
}

.landing-brand-card img {
  height: 60px;
}

.landing-brand-panel {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(30, 41, 59, .9);
  background:
    linear-gradient(145deg, rgba(15, 23, 42, .94), rgba(2, 6, 23, .86)),
    radial-gradient(circle at 74% 18%, rgba(20, 184, 166, .22), transparent 34%);
  box-shadow: 0 26px 80px rgba(0, 0, 0, .38);
}

.landing-brand-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(148, 163, 184, .08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, .08) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(140deg, black, transparent 78%);
}

.landing-brand-panel > * {
  position: relative;
}

.landing-brand-panel-logo {
  width: min(100%, 286px);
}

@media (max-width: 760px) {
  .brand-logo-header {
    height: 42px;
    max-width: 210px;
  }

  .brand-logo-sidebar {
    height: 48px;
    width: 202px;
  }

  .brand-subtitle {
    margin-left: 70px;
  }
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at top left, #eef7f3 0, transparent 310px), var(--bg);
}
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: none; color: var(--accent); }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: 30px; letter-spacing: 0; margin-bottom: 6px; }
h2 { font-size: 18px; letter-spacing: 0; }
input, select, button, textarea {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
  background: #fff;
}
input[type="file"] {
  padding: 6px;
  color: var(--muted);
  background: #f9fbfd;
  cursor: pointer;
}
input[type="file"]::file-selector-button {
  min-height: 32px;
  margin-right: 10px;
  padding: 6px 12px 6px 34px;
  border: 1px solid #16745f;
  border-radius: 9px;
  background-color: #16745f;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 16V4'/%3E%3Cpath d='m7 9 5-5 5 5'/%3E%3Cpath d='M20 16v3a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-3'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 12px center;
  color: #fff;
  font-weight: 850;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(22, 116, 95, .14);
  transition: background-color .14s ease, border-color .14s ease, box-shadow .14s ease;
}
input[type="file"]::file-selector-button:hover {
  border-color: #115345;
  background-color: #115345;
  box-shadow: 0 12px 24px rgba(22, 116, 95, .22);
}
button { cursor: pointer; }

sgq-shell, sgq-user, sgq-menu-head, sgq-nav-section, sgq-nav-title, sgq-nav-panel,
sgq-panel, sgq-list, sgq-row, sgq-cell, sgq-chip, sgq-record, sgq-field,
sgq-label, sgq-value, sgq-stat, sgq-form-actions, sgq-auth, sgq-auth-copy,
sgq-auth-box, sgq-company-strip, sgq-company-option, sgq-input-group,
sgq-hero, sgq-hero-copy, sgq-hero-board, sgq-hero-actions, sgq-eyebrow,
sgq-board-row, sgq-feature-grid, sgq-feature, sgq-doc-table,
sgq-doc-table-head, sgq-doc-line, sgq-doc-identity, sgq-doc-cell,
sgq-doc-code, sgq-doc-actions, sgq-empty-state, sgq-modal-head,
sgq-revision-list, sgq-revision-card, sgq-revision-main, sgq-revision-meta,
sgq-attachment-list, sgq-attachment-row, doc-workspace, doc-command,
doc-command-main, doc-command-actions, doc-metrics, doc-filter-strip,
doc-filter-copy, doc-filter-pills, doc-board, doc-board-head,
doc-board-title, doc-subline, doc-row-menu, record-compose-main,
record-compose-side, template-builder-core, template-builder-text,
record-guidance-grid, record-guidance-card, template-guidance-grid,
template-guidance-card, template-lifecycle, template-lifecycle-step,
revision-control-panel, revision-control-card, revision-workflow,
revision-workflow-step, revision-action-row, document-guidance-grid,
document-guidance-card {
  display: block;
}

.page { min-width: 0; max-width: 1280px; padding: 22px 24px 42px; }
.menu-toggle:checked ~ .side-rail ~ .page {
  width: 100%;
  max-width: none;
}
.public-page { max-width: 1180px; margin: 0 auto; }
.muted, .page-title p { color: var(--muted); }
.error { color: #b42318; background: #fff2f1; border: 1px solid #ffcbc5; padding: 10px; border-radius: 8px; }

sgq-shell {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  min-height: 100vh;
  isolation: isolate;
}
sgq-shell:has(.menu-toggle:checked) {
  grid-template-columns: 78px minmax(0, 1fr);
}
.menu-toggle { position: absolute; opacity: 0; pointer-events: none; }
.side-rail {
  position: sticky;
  z-index: 300;
  top: 0;
  height: 100vh;
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 14px;
  padding: 18px 12px;
  background: rgba(255, 255, 255, .86);
  border-right: 1px solid var(--line);
  backdrop-filter: blur(16px);
  overflow-y: auto;
}
.page {
  position: relative;
  z-index: 1;
}
sgq-menu-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--ink);
  font-weight: 800;
}
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), #1d8b83);
  color: #fff;
  flex: 0 0 auto;
}
.brand-mark::before {
  content: "";
  width: 20px;
  height: 20px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 8a3 3 0 1 0 0 .01'/%3E%3Cpath d='M18 16a3 3 0 1 0 0 .01'/%3E%3Cpath d='M15 6h3v3'/%3E%3Cpath d='M6 11v2a5 5 0 0 0 5 5h2'/%3E%3Cpath d='M18 13v-2a5 5 0 0 0-5-5h-2'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 8a3 3 0 1 0 0 .01'/%3E%3Cpath d='M18 16a3 3 0 1 0 0 .01'/%3E%3Cpath d='M15 6h3v3'/%3E%3Cpath d='M6 11v2a5 5 0 0 0 5 5h2'/%3E%3Cpath d='M18 13v-2a5 5 0 0 0-5-5h-2'/%3E%3C/svg%3E") center / contain no-repeat;
}
.collapse-button {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  color: var(--muted);
  background: #fff;
}
.collapse-icon {
  grid-area: 1 / 1;
  width: 18px;
  height: 18px;
  background: currentColor;
  transition: transform .14s ease, opacity .14s ease;
}
.collapse-icon-open {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h16'/%3E%3Cpath d='M4 12h16'/%3E%3Cpath d='M4 17h16'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h16'/%3E%3Cpath d='M4 12h16'/%3E%3Cpath d='M4 17h16'/%3E%3C/svg%3E") center / contain no-repeat;
}
.collapse-icon-closed {
  opacity: 0;
  transform: rotate(180deg);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 18 6-6-6-6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 18 6-6-6-6'/%3E%3C/svg%3E") center / contain no-repeat;
}
.collapse-button:hover {
  border-color: #cfe0eb;
  color: var(--accent);
  background: #f3faf7;
}
.sgq-user,
sgq-user {
  display: grid;
  gap: 3px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
  color: var(--ink);
  transition: border-color .14s ease, background .14s ease, box-shadow .14s ease;
}
.sgq-user:hover {
  border-color: #cfe0eb;
  background: #fff;
  box-shadow: 0 10px 22px rgba(31, 45, 61, .055);
}
.sgq-user span,
sgq-user span { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.user-menu-icon {
  display: none;
}
.side-menu {
  display: grid;
  gap: 10px;
  align-content: start;
}
.side-link,
.side-group summary {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 22px;
  gap: 9px;
  align-items: center;
  min-height: 40px;
  padding: 5px 7px;
  border-radius: 12px;
  color: var(--ink);
  font-weight: 760;
  cursor: pointer;
  list-style: none;
  transition: background .14s ease, color .14s ease, box-shadow .14s ease;
}
.side-group summary::-webkit-details-marker { display: none; }
.side-link span,
.side-group summary span {
  display: inline-grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 9px;
  background: #edf5f3;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
}
.nav-icon {
  font-size: 0;
}
.nav-icon::before {
  content: "";
  width: 16px;
  height: 16px;
  background: currentColor;
  -webkit-mask: var(--nav-icon) center / contain no-repeat;
  mask: var(--nav-icon) center / contain no-repeat;
}
.icon-dashboard {
  --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='8' rx='1.5'/%3E%3Crect x='14' y='3' width='7' height='5' rx='1.5'/%3E%3Crect x='14' y='12' width='7' height='9' rx='1.5'/%3E%3Crect x='3' y='15' width='7' height='6' rx='1.5'/%3E%3C/svg%3E");
}
.icon-modules {
  --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 7 9-4 9 4-9 4-9-4Z'/%3E%3Cpath d='m3 12 9 4 9-4'/%3E%3Cpath d='m3 17 9 4 9-4'/%3E%3C/svg%3E");
}
.icon-management {
  --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 19V5'/%3E%3Cpath d='M8 17V9'/%3E%3Cpath d='M12 19v-6'/%3E%3Cpath d='M16 15V7'/%3E%3Cpath d='M20 19V4'/%3E%3C/svg%3E");
}
.icon-settings {
  --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 15.5a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7Z'/%3E%3Cpath d='M19.4 15a1.8 1.8 0 0 0 .36 1.98l.04.04a2.1 2.1 0 1 1-2.97 2.97l-.04-.04a1.8 1.8 0 0 0-1.98-.36 1.8 1.8 0 0 0-1.09 1.65V21a2.1 2.1 0 1 1-4.2 0v-.06a1.8 1.8 0 0 0-1.09-1.65 1.8 1.8 0 0 0-1.98.36l-.04.04a2.1 2.1 0 1 1-2.97-2.97l.04-.04A1.8 1.8 0 0 0 3.6 15a1.8 1.8 0 0 0-1.65-1.09H2a2.1 2.1 0 1 1 0-4.2h.06A1.8 1.8 0 0 0 3.7 8.62a1.8 1.8 0 0 0-.36-1.98l-.04-.04a2.1 2.1 0 1 1 2.97-2.97l.04.04a1.8 1.8 0 0 0 1.98.36A1.8 1.8 0 0 0 9.38 2.4V2a2.1 2.1 0 1 1 4.2 0v.06a1.8 1.8 0 0 0 1.09 1.65 1.8 1.8 0 0 0 1.98-.36l.04-.04a2.1 2.1 0 1 1 2.97 2.97l-.04.04a1.8 1.8 0 0 0-.36 1.98 1.8 1.8 0 0 0 1.65 1.09H21a2.1 2.1 0 1 1 0 4.2h-.06A1.8 1.8 0 0 0 19.4 15Z'/%3E%3C/svg%3E");
}
.icon-account {
  --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21a8 8 0 0 1 16 0'/%3E%3C/svg%3E");
}
.side-link:hover,
.side-group summary:hover {
  background: #eef7f4;
}
.primary-link {
  background: linear-gradient(135deg, #e9f6f1, #f8fbfd);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px #cfe6de;
}
.side-group {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .62);
  overflow: hidden;
  transition: border-color .14s ease, background .14s ease, box-shadow .14s ease;
}
.side-group[open] {
  background: #fff;
  border-color: #cfe0eb;
  box-shadow: 0 10px 22px rgba(31, 45, 61, .055);
}
.side-group[open] summary {
  color: var(--accent);
}
.side-group summary::after {
  content: "+";
  display: inline-grid;
  place-items: center;
  justify-self: center;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: #f2f6f8;
  color: var(--muted);
  font-weight: 900;
  line-height: 1;
}
.side-group[open] summary::after {
  content: "-";
  background: #e6f4ef;
  color: var(--accent);
}
sgq-nav-panel {
  display: grid;
  gap: 3px;
  padding: 0 8px 10px 48px;
}
sgq-nav-panel a {
  min-height: 30px;
  padding: 6px 8px;
  border-radius: 9px;
  color: #405064;
  font-size: 13px;
  font-weight: 650;
  transition: background .14s ease, color .14s ease, padding-left .14s ease;
}
sgq-nav-panel a:hover {
  background: #edf5f3;
  color: var(--accent);
  padding-left: 12px;
}
.account-group {
  margin-top: 4px;
}
.menu-toggle:checked ~ .side-rail {
  z-index: 400;
  width: 78px;
  padding: 16px 10px;
  justify-items: center;
  gap: 12px;
  overflow: visible;
}
.menu-toggle:checked ~ .side-rail .menu-text { display: none; }
.menu-toggle:checked ~ .side-rail sgq-menu-head {
  display: grid;
  justify-items: center;
}
.menu-toggle:checked ~ .side-rail .brand {
  justify-content: center;
}
.menu-toggle:checked ~ .side-rail .brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  box-shadow: 0 10px 22px rgba(22, 116, 95, .2);
}
.menu-toggle:checked ~ .side-rail .sgq-user,
.menu-toggle:checked ~ .side-rail .primary-link {
  display: none;
}
.menu-toggle:checked ~ .side-rail sgq-user {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  min-height: 42px;
  padding: 0;
  border: 1px solid #d7e7e2;
  border-radius: 14px;
  background: #f3faf7;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.7);
}
.menu-toggle:checked ~ .side-rail .sgq-user .user-menu-icon {
  display: inline-grid;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: transparent;
  color: var(--accent);
}
.menu-toggle:checked ~ .side-rail .sgq-user .user-menu-icon::before {
  width: 19px;
  height: 19px;
}
.menu-toggle:checked ~ .side-rail sgq-user:hover {
  border-color: #b8d9d0;
  background: #e9f6f1;
  box-shadow: 0 10px 22px rgba(22, 116, 95, .13);
}
.menu-toggle:checked ~ .side-rail .side-link,
.menu-toggle:checked ~ .side-rail .side-group summary {
  grid-template-columns: 40px;
  justify-content: center;
  width: 44px;
  min-height: 44px;
  padding: 2px;
  border-radius: 14px;
}
.menu-toggle:checked ~ .side-rail .side-link.primary-link {
  display: none;
}
.menu-toggle:checked ~ .side-rail .side-group {
  position: relative;
  width: 46px;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}
.menu-toggle:checked ~ .side-rail .side-group summary::after,
.menu-toggle:checked ~ .side-rail sgq-nav-panel {
  display: none;
}
.menu-toggle:checked ~ .side-rail .side-group:hover sgq-nav-panel,
.menu-toggle:checked ~ .side-rail .side-group:focus-within sgq-nav-panel,
.menu-toggle:checked ~ .side-rail .side-group.flyout-open sgq-nav-panel {
  position: absolute;
  z-index: 450;
  top: 0;
  left: 56px;
  display: grid;
  min-width: 220px;
  max-width: 260px;
  gap: 4px;
  padding: 10px;
  border: 1px solid #d7e2ea;
  border-radius: 14px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 18px 44px rgba(31, 45, 61, .16);
}
.menu-toggle:checked ~ .side-rail .side-group:hover sgq-nav-panel a,
.menu-toggle:checked ~ .side-rail .side-group:focus-within sgq-nav-panel a,
.menu-toggle:checked ~ .side-rail .side-group.flyout-open sgq-nav-panel a {
  min-height: 32px;
  padding: 7px 9px;
  white-space: nowrap;
}
.menu-toggle:checked ~ .side-rail .side-link span,
.menu-toggle:checked ~ .side-rail .side-group summary span {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: #f0f7f4;
  transition: transform .14s ease, background .14s ease, color .14s ease;
}
.menu-toggle:checked ~ .side-rail .side-link:hover span,
.menu-toggle:checked ~ .side-rail .side-group summary:hover span {
  transform: translateY(-1px);
  background: var(--accent);
  color: #fff;
}
.menu-toggle:checked ~ .side-rail .primary-link span {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 18px rgba(22, 116, 95, .2);
}
.menu-toggle:checked ~ .side-rail .collapse-button {
  display: inline-grid;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: #fff;
  color: var(--accent);
}
.menu-toggle:checked ~ .side-rail .collapse-icon-open {
  opacity: 0;
  transform: rotate(-90deg);
}
.menu-toggle:checked ~ .side-rail .collapse-icon-closed {
  opacity: 1;
  transform: none;
}

.primary-action, .secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 7px 12px;
  border-radius: 9px;
  border: 1px solid var(--line);
  font-weight: 750;
}
.primary-action, button {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.secondary-action {
  background: #fff;
  color: var(--ink);
}
.secondary-action:hover { border-color: #b8c7d6; color: var(--accent); }
sgq-form-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
sgq-form-actions form { margin: 0; }
.page-title {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin-bottom: 14px;
  padding: 18px;
  border: 1px solid #dce6ee;
  border-radius: 16px;
  background: linear-gradient(135deg, #ffffff 0%, #f7fbfa 55%, #eef7f3 100%);
  box-shadow: 0 16px 36px rgba(31, 45, 61, .07);
  animation: rise .24s ease-out both;
}
.page-title h1 {
  margin: 0 0 5px;
  font-size: 30px;
  letter-spacing: 0;
}
.page-title p {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
}
.page-title sgq-form-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  min-width: 190px;
  margin-top: 0;
}
.page-title sgq-form-actions .primary-action,
.page-title sgq-form-actions .secondary-action {
  justify-content: flex-start;
  width: 100%;
}

sgq-panel, sgq-auth-box {
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 16px 36px rgba(31, 45, 61, .055);
}
sgq-panel h2 {
  margin-bottom: 10px;
  font-size: 18px;
  font-weight: 880;
}
.form-grid { display: grid; gap: 14px; margin-top: 14px; }
.document-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 0;
}
.document-form-grid .span-full {
  grid-column: 1 / -1;
}
.record-compose-form,
.template-builder-form {
  display: grid;
  gap: 14px;
  margin-top: 0;
}
.record-compose-form {
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, .75fr);
}
record-compose-main,
record-compose-side,
template-builder-core,
template-builder-text {
  display: grid;
  gap: 12px;
}
.record-compose-form .span-full {
  grid-column: 1 / -1;
}
.template-builder-form {
  grid-template-columns: minmax(240px, .75fr) minmax(0, 1.25fr);
}
.template-builder-form sgq-form-actions {
  grid-column: 1 / -1;
}
record-guidance-grid,
template-guidance-grid,
document-guidance-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
record-guidance-card,
template-guidance-card,
document-guidance-card {
  display: grid;
  gap: 5px;
  padding: 13px;
  border: 1px solid #dce6ee;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(31, 45, 61, .045);
}
record-guidance-card strong,
template-guidance-card strong,
document-guidance-card strong {
  color: var(--ink);
  font-size: 14px;
}
record-guidance-card span,
template-guidance-card span,
document-guidance-card span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.42;
}
template-lifecycle {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
template-lifecycle-step {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 11px;
  border: 1px solid #dce6ee;
  border-radius: 14px;
  background: #f7fbfa;
}
template-lifecycle-step strong {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: #16745f;
  color: #fff;
}
template-lifecycle-step span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}
revision-control-panel {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 9px;
  margin-bottom: 12px;
}
revision-control-card {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid #dce6ee;
  border-radius: 14px;
  background: linear-gradient(135deg, #ffffff, #f7fbfa);
}
revision-control-card span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
revision-control-card strong {
  color: var(--ink);
  font-size: 14px;
  overflow-wrap: anywhere;
}
revision-workflow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
revision-workflow-step {
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 12px;
  border: 1px solid #dce6ee;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(31, 45, 61, .045);
}
revision-workflow-step strong { font-size: 14px; }
revision-workflow-step span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.42;
}
.revision-upload-form,
revision-action-row {
  display: grid;
  gap: 8px;
}
revision-action-row form,
revision-workflow-step form {
  margin: 0;
}
sgq-input-group { display: grid; gap: 6px; font-weight: 700; }
.inline-check { display: flex; gap: 7px; align-items: center; color: var(--muted); font-weight: 600; }

sgq-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 34px;
  align-items: center;
  min-height: 72vh;
}
sgq-eyebrow {
  width: fit-content;
  padding: 5px 8px;
  border: 1px solid #b9d6ce;
  border-radius: 999px;
  color: var(--accent);
  background: #ecf7f4;
  font-size: 12px;
  font-weight: 800;
}
sgq-hero h1 { font-size: 58px; line-height: 1; margin: 16px 0 14px; }
sgq-hero p { color: #46515f; font-size: 18px; max-width: 620px; }
sgq-hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
sgq-hero-board, sgq-board-row, sgq-feature {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}
sgq-hero-board { display: grid; gap: 10px; padding: 16px; box-shadow: var(--shadow); }
sgq-board-row, sgq-feature { display: grid; gap: 5px; padding: 13px; background: var(--surface-soft); }
.landing-band { padding: 28px 0 60px; }
sgq-feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }

sgq-auth {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 30px;
  align-items: start;
  max-width: 980px;
  margin: 70px auto;
}
sgq-auth-copy { padding: 22px 0; }
sgq-auth-copy h1 { font-size: 34px; }
sgq-company-strip { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
sgq-company-option {
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
}

.metrics, .document-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 9px;
}
.metric, sgq-stat {
  display: grid;
  gap: 3px;
  min-height: 86px;
  padding: 12px 13px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(31, 45, 61, .045);
  transition: transform .14s ease, border-color .14s ease, box-shadow .14s ease;
}
.metric:hover {
  transform: translateY(-1px);
  border-color: #b8cbd8;
  box-shadow: 0 13px 26px rgba(31, 45, 61, .07);
}
.metrics .metric:first-child,
.document-summary sgq-stat:first-child {
  border-color: #b9dcd2;
  background: linear-gradient(135deg, #ffffff, #eff9f5);
}
.metric strong, sgq-stat strong { font-size: 24px; }
sgq-stat span { color: var(--muted); font-size: 12px; font-weight: 750; }

.document-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin-bottom: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(135deg, #ffffff, #f4faf7);
  box-shadow: 0 10px 30px rgba(31, 45, 61, .05);
  animation: rise .24s ease-out both;
}
.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  margin-bottom: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(135deg, #ffffff, #f4faf7);
  box-shadow: 0 12px 34px rgba(31, 45, 61, .06);
  animation: rise .24s ease-out both;
}
.detail-hero h1 {
  margin: 8px 0 4px;
  font-size: 28px;
}
.detail-hero p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 12px;
  margin-bottom: 16px;
}
.detail-actions-panel h2,
.detail-grid h2 {
  margin-bottom: 10px;
}
.detail-action-stack {
  display: grid;
  gap: 8px;
}
.detail-action-stack .secondary-action {
  justify-content: flex-start;
}
.detail-section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin: 16px 0 8px;
}
.detail-section-head h2 {
  margin: 0 0 2px;
  font-size: 20px;
  font-weight: 850;
}
.detail-section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
sgq-revision-list,
sgq-attachment-list {
  display: grid;
  gap: 7px;
}
sgq-revision-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, .8fr);
  gap: 12px;
  align-items: center;
  min-height: 58px;
  padding: 11px 14px;
  background: rgba(255, 255, 255, .94);
  border: 1px solid var(--line);
  border-radius: 14px;
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
  animation: fadeList .22s ease-out both;
}
sgq-revision-card:hover {
  transform: translateY(-1px);
  border-color: #b9c8d7;
  box-shadow: 0 12px 24px rgba(31,45,61,.07);
}
sgq-revision-main {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
}
sgq-revision-main span {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
sgq-revision-meta {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
}
sgq-attachment-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 180px 90px;
  gap: 10px;
  align-items: center;
  padding: 10px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.document-hero h1 { font-size: 28px; margin: 8px 0 4px; }
.document-hero p { max-width: 720px; margin: 0; color: var(--muted); line-height: 1.42; font-size: 14px; }
.document-summary { margin-bottom: 12px; }
.document-list-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin: 16px 0 8px;
}
.document-list-head h2 { margin: 0 0 2px; font-size: 22px; font-weight: 850; color: var(--ink); }
.document-list-head p { margin: 0; color: var(--muted); font-size: 13px; }
sgq-doc-table { display: grid; gap: 5px; }
sgq-doc-table-head {
  display: grid;
  grid-template-columns: minmax(320px, 1.8fr) 118px minmax(130px, .7fr) 126px;
  gap: 10px;
  padding: 0 14px 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}
sgq-doc-line {
  display: grid;
  grid-template-columns: minmax(320px, 1.8fr) 118px minmax(130px, .7fr) 126px;
  gap: 10px;
  align-items: center;
  min-height: 56px;
  padding: 9px 14px;
  background: rgba(255, 255, 255, .92);
  border: 1px solid var(--line);
  border-radius: 13px;
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
  animation: fadeList .22s ease-out both;
}
sgq-doc-line:hover { transform: translateY(-1px); border-color: #b9c8d7; box-shadow: 0 12px 24px rgba(31,45,61,.07); }
sgq-doc-identity { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; align-items: center; min-width: 0; }
sgq-doc-code {
  width: fit-content;
  padding: 3px 7px;
  border-radius: 7px;
  background: #edf5f3;
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}
.doc-title {
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
sgq-doc-cell { min-width: 0; color: #344456; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
sgq-doc-actions {
  display: flex;
  gap: 6px;
  justify-content: end;
}
sgq-doc-actions .secondary-action,
sgq-doc-actions button {
  min-height: 32px;
  padding: 5px 9px;
  font-size: 12px;
}
.document-hero sgq-form-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  min-width: 178px;
  margin-top: 0;
}
.document-hero sgq-form-actions .primary-action,
.document-hero sgq-form-actions .secondary-action,
.document-hero sgq-form-actions button {
  display: inline-grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  justify-content: stretch;
  width: 100%;
  min-height: 38px;
  padding: 6px 12px 6px 7px;
  border: 1px solid #16745f;
  border-radius: 11px;
  background: #16745f;
  color: #fff;
  font-size: 13px;
  font-weight: 850;
  text-align: left;
  box-shadow: 0 8px 18px rgba(22, 116, 95, .16);
  transition: transform .14s ease, box-shadow .14s ease, background .14s ease;
}
.document-hero sgq-form-actions .primary-action:hover,
.document-hero sgq-form-actions .secondary-action:hover,
.document-hero sgq-form-actions button:hover {
  transform: translateY(-1px);
  border-color: #115345;
  background: #115345;
  color: #fff;
  box-shadow: 0 12px 24px rgba(22, 116, 95, .22);
}
.document-hero sgq-form-actions .primary-action::before,
.document-hero sgq-form-actions .secondary-action::before,
.document-hero sgq-form-actions button::before {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 9px;
  background: rgba(255, 255, 255, .16);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}
.document-hero sgq-form-actions .secondary-action::before,
.document-hero sgq-form-actions button::before {
  content: "f";
}
.document-hero sgq-form-actions .primary-action::before {
  content: "+";
}
doc-workspace {
  display: grid;
  gap: 14px;
  width: min(100%, 1280px);
  margin-inline: auto;
}
doc-command {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 18px;
  align-items: center;
  padding: 18px;
  border: 1px solid #dce6ee;
  border-radius: 16px;
  background: linear-gradient(135deg, #ffffff 0%, #f7fbfa 55%, #eef7f3 100%);
  box-shadow: 0 16px 36px rgba(31, 45, 61, .07);
  animation: rise .24s ease-out both;
}
doc-command-main h1 {
  margin: 8px 0 5px;
  font-size: 30px;
}
doc-command-main p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
  font-size: 14px;
}
doc-command-actions {
  display: grid;
  gap: 8px;
}

doc-command.doc-command-dual-actions {
  display: flex !important;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

doc-command.doc-command-dual-actions doc-command-main {
  min-width: 0;
}

doc-command.doc-command-dual-actions doc-command-actions {
  display: flex !important;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 12px;
  width: auto;
  flex: 0 0 auto;
}

doc-command.doc-command-dual-actions doc-command-actions > * {
  display: flex !important;
  width: auto !important;
  min-width: 0;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  padding: 8px 16px !important;
}

doc-command:has(doc-command-actions > :nth-child(4)) {
  grid-template-columns: minmax(0, 1fr) minmax(360px, 420px);
}

doc-command:has(doc-command-actions > :nth-child(4)) doc-command-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}
doc-command-actions .primary-action,
doc-command-actions .secondary-action,
doc-command-actions button,
doc-board-head .secondary-action {
  display: inline-grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  justify-content: stretch;
  width: 100%;
  min-height: 38px;
  padding: 6px 12px 6px 7px;
  border: 1px solid #16745f;
  border-radius: 10px;
  background: #16745f;
  color: #fff;
  font-size: 13px;
  font-weight: 850;
  text-align: left;
  box-shadow: 0 10px 20px rgba(22, 116, 95, .16);
  transition: transform .14s ease, box-shadow .14s ease, background .14s ease;
}
doc-command-actions .primary-action:hover,
doc-command-actions .secondary-action:hover,
doc-command-actions button:hover,
doc-board-head .secondary-action:hover {
  transform: translateY(-1px);
  border-color: #115345;
  background: #115345;
  color: #fff;
  box-shadow: 0 14px 26px rgba(22, 116, 95, .22);
}
.button-icon {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .17);
  color: #fff;
}
.button-icon::before {
  content: "";
  width: 15px;
  height: 15px;
  background: currentColor;
  -webkit-mask: var(--button-icon) center / contain no-repeat;
  mask: var(--button-icon) center / contain no-repeat;
}
.button-icon.icon-filter {
  --button-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M3 6h18v2H3zM7 11h10v2H7zM10 16h4v2h-4z'/%3E%3C/svg%3E");
}
.button-icon.icon-plus {
  --button-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M11 4h2v17h-2z'/%3E%3Cpath d='M4 11h17v2H4z'/%3E%3C/svg%3E");
}
.button-icon.icon-print {
  --button-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M7 3h10v5h-2V5H9v3H7z'/%3E%3Cpath d='M5 9h14a3 3 0 0 1 3 3v5h-4v-2h2v-3a1 1 0 0 0-1-1H5a1 1 0 0 0-1 1v3h2v2H2v-5a3 3 0 0 1 3-3z'/%3E%3Cpath d='M7 14h10v8H7zm2 2v4h6v-4z'/%3E%3C/svg%3E");
}
.button-icon.icon-edit {
  --button-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M4 17.3V21h3.7L18.8 9.9l-3.7-3.7L4 17.3zm17-11.1-2.2 2.2-3.7-3.7L17.3 2 21 6.2z'/%3E%3C/svg%3E");
}
.button-icon.icon-archive {
  --button-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M3 4h18v5H3zm2 2v1h14V6z'/%3E%3Cpath d='M5 10h14v11H5zm5 3v2h4v-2z'/%3E%3C/svg%3E");
}
.button-icon.icon-file {
  --button-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M5 2h9l5 5v19H5zm8 2H7v17h10V8h-4z'/%3E%3Cpath d='M9 12h6v2H9zm0 4h6v2H9z'/%3E%3C/svg%3E");
}
.button-icon.icon-upload {
  --button-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M11 17h2V8l3 3 1.4-1.4L12 4 6.6 9.6 8 11l3-3z'/%3E%3Cpath d='M5 19h14v2H5z'/%3E%3C/svg%3E");
}
.button-icon.icon-back {
  --button-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='m10 6 1.4 1.4L8.8 10H20v2H8.8l2.6 2.6L10 16l-5-5z'/%3E%3C/svg%3E");
}
.button-icon.icon-save {
  --button-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M5 3h14l2 2v18H3V3zm2 2v6h10V5zm0 16h14V7.8L18.2 5H19v8H7zm2-6h10v2H9z'/%3E%3C/svg%3E");
}
.button-icon.icon-check {
  --button-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='m9 16.2-3.5-3.5L4 14.2 9 19 20.5 7.5 19 6z'/%3E%3C/svg%3E");
}
.button-icon.icon-download {
  --button-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M11 3h2v10l3-3 1.4 1.4L12 17l-5.4-5.6L8 10l3 3z'/%3E%3Cpath d='M5 19h14v2H5z'/%3E%3C/svg%3E");
}
.button-icon.icon-refresh {
  --button-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M17.7 6.3A8 8 0 0 0 4.3 10H2l3.5 3.5L9 10H6.4a6 6 0 0 1 9.9-2.3zm-11.4 11.4A8 8 0 0 0 19.7 14H22l-3.5-3.5L15 14h2.6a6 6 0 0 1-9.9 2.3z'/%3E%3C/svg%3E");
}
.button-icon.icon-gap {
  --button-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M4 4h7v7H4zm9 0h7v7h-7zM4 13h7v7H4zm12 1h2v2h2v2h-2v2h-2v-2h-2v-2h2z'/%3E%3C/svg%3E");
}
.button-icon.icon-activity {
  --button-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M3 12h4l2-6 4 12 2-6h6v2h-4.6L13 24 9 12l-.6 2H3z'/%3E%3C/svg%3E");
}
.button-icon.icon-terminal {
  --button-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M3 5h18v14H3zm2 2v10h14V7z'/%3E%3Cpath d='m7 9 3 3-3 3-1.4-1.4L7.2 12 5.6 10.4zM11 14h5v2h-5z'/%3E%3C/svg%3E");
}
.button-icon.icon-chart {
  --button-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M5 19h15v2H3V3h2z'/%3E%3Cpath d='M7 15h2v3H7zm4-5h2v8h-2zm4 2h2v6h-2z'/%3E%3C/svg%3E");
}
.secondary-action .button-icon,
.detail-action-stack .button-icon {
  background: #edf7f3;
  color: var(--accent);
}
.primary-action .button-icon,
button .button-icon {
  background: rgba(255, 255, 255, .17);
  color: #fff;
}
doc-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 9px;
}
doc-metrics sgq-stat {
  min-height: 86px;
  padding: 12px 13px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(31, 45, 61, .045);
}
doc-metrics sgq-stat strong {
  font-size: 25px;
  line-height: 1;
}
doc-metrics sgq-stat small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}
doc-metrics sgq-stat:first-child {
  border-color: #b9dcd2;
  background: linear-gradient(135deg, #ffffff, #eff9f5);
}
doc-filter-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid #dce6ee;
  border-radius: 14px;
  background: rgba(255, 255, 255, .82);
}
doc-filter-strip strong {
  display: block;
  margin-bottom: 2px;
  font-size: 14px;
}
doc-filter-strip span {
  color: var(--muted);
  font-size: 12px;
}
doc-filter-pills {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}
doc-filter-pills span {
  padding: 5px 8px;
  border: 1px solid #dbe7e3;
  border-radius: 999px;
  background: #f4faf7;
  color: #345247;
  font-weight: 750;
}
doc-board {
  padding: 14px;
  border: 1px solid #dce6ee;
  border-radius: 16px;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 16px 36px rgba(31, 45, 61, .06);
}
doc-board-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
  padding-bottom: 10px;
}
doc-board-head h2 {
  margin: 0 0 3px;
  font-size: 20px;
  font-weight: 880;
}
doc-board-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
doc-board-head .compact-action {
  width: auto;
  min-width: 108px;
}
.documents-table {
  display: grid;
  gap: 6px;
}
.documents-table sgq-doc-table-head {
  display: grid;
  grid-template-columns: minmax(260px, 1.7fr) minmax(110px, .7fr) 78px minmax(124px, .75fr) 132px minmax(126px, .75fr) 58px;
  gap: 10px;
  padding: 8px 12px 6px;
  border-bottom: 1px solid #edf2f6;
  color: #6a7686;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.records-table sgq-doc-table-head,
.records-table sgq-doc-line {
  grid-template-columns: minmax(250px, 1.55fr) minmax(92px, .55fr) minmax(110px, .65fr) 132px minmax(126px, .75fr) minmax(122px, .75fr) 72px;
}
.records-table sgq-doc-line {
  cursor: pointer;
}
.records-table sgq-doc-actions .compact-action {
  min-height: 32px;
  padding: 5px 10px;
  font-size: 12px;
}
.record-template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
}
.record-template-card {
  display: grid;
  gap: 10px;
  padding: 13px;
  border: 1px solid #e0e8f0;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(31, 45, 61, .045);
  transition: transform .14s ease, border-color .14s ease, box-shadow .14s ease;
}
.record-template-card:hover {
  transform: translateY(-1px);
  border-color: #b8cbd8;
  box-shadow: 0 13px 26px rgba(31, 45, 61, .07);
}
.record-template-card header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.record-template-card h3 {
  margin: 0;
  font-size: 17px;
}
.documents-table sgq-doc-line {
  position: relative;
  display: grid;
  grid-template-columns: minmax(260px, 1.7fr) minmax(110px, .7fr) 78px minmax(124px, .75fr) 132px minmax(126px, .75fr) 58px;
  gap: 10px;
  align-items: center;
  min-height: 64px;
  padding: 10px 12px;
  border: 1px solid #e0e8f0;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: transform .14s ease, border-color .14s ease, box-shadow .14s ease, background .14s ease;
  animation: fadeList .22s ease-out both;
}
.documents-table sgq-doc-line:hover {
  transform: translateY(-1px);
  border-color: #b8cbd8;
  background: #fbfefd;
  box-shadow: 0 13px 26px rgba(31, 45, 61, .07);
}
.documents-table sgq-doc-line.row-menu-open,
.documents-table sgq-doc-line:has(.document-row-menu.is-open) {
  z-index: 60;
  transform: none;
}
.documents-table sgq-doc-identity {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 5px 9px;
  align-items: center;
}
doc-subline {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.documents-table sgq-doc-cell {
  color: #344456;
  font-size: 13px;
}
.documents-table sgq-doc-actions {
  position: relative;
  justify-content: end;
}
.icon-only {
  display: inline-grid;
  place-items: center;
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid #d8e3eb;
  background: #fff;
  color: #475569;
  font-size: 20px;
  font-weight: 900;
}
.icon-only:hover {
  border-color: #b9d8d0;
  background: #edf7f3;
  color: var(--accent);
}
.document-row-menu {
  position: absolute;
  z-index: 200;
  top: 40px;
  right: 0;
  display: none;
  min-width: 154px;
  padding: 6px;
  border: 1px solid #d8e3eb;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(31, 45, 61, .16);
}
.document-row-menu.is-open {
  display: grid;
  gap: 2px;
}
.document-row-menu a,
.document-row-menu button {
  display: block;
  width: 100%;
  min-height: 32px;
  padding: 7px 9px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #243244;
  text-align: left;
  font-size: 13px;
  font-weight: 760;
}
.document-row-menu a:hover,
.document-row-menu button:hover {
  background: #edf7f3;
  color: var(--accent);
}
.document-summary-modal sgq-record {
  margin-bottom: 12px;
}
sgq-chip {
  width: fit-content;
  max-width: 100%;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef5f2;
  color: #115345;
  font-size: 12px;
  font-weight: 800;
}
sgq-chip.status-effective { background: #e7f6ef; color: #0d6b45; }
sgq-chip.status-in_review, sgq-chip.status-awaiting_approval { background: #fff4df; color: #8a5400; }
sgq-chip.status-obsolete { background: #f1f3f5; color: #5d6874; }
sgq-empty-state {
  display: grid;
  gap: 4px;
  padding: 22px;
  border: 1px dashed #b8cbd8;
  border-radius: 14px;
  background: #fff;
  color: var(--muted);
}
sgq-empty-state strong { color: var(--ink); }

sgq-list { display: grid; gap: 8px; }
sgq-row {
  display: grid;
  grid-template-columns: 130px minmax(220px, 1fr) repeat(5, minmax(90px, auto));
  gap: 10px;
  align-items: center;
  min-height: 56px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid #e0e8f0;
  border-radius: 12px;
  transition: transform .14s ease, border-color .14s ease, box-shadow .14s ease, background .14s ease;
  animation: fadeList .22s ease-out both;
}
sgq-row:hover {
  transform: translateY(-1px);
  border-color: #b8cbd8;
  background: #fbfefd;
  box-shadow: 0 13px 26px rgba(31, 45, 61, .07);
}
sgq-cell, sgq-value { min-width: 0; overflow-wrap: anywhere; font-size: 14px; }
sgq-cell.wide { font-weight: 800; }
sgq-record {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  padding: 14px;
  background: #fff;
  border: 1px solid #e0e8f0;
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(31, 45, 61, .04);
}
sgq-field { display: grid; gap: 4px; min-width: 0; }
sgq-label { color: var(--muted); font-size: 11px; font-weight: 850; text-transform: uppercase; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 14px; margin-top: 14px; }
.actions { display: grid; gap: 10px; }
.actions a {
  padding: 12px;
  background: #fff;
  border: 1px solid #e0e8f0;
  border-radius: 12px;
  color: #243244;
  font-weight: 760;
  transition: background .14s ease, border-color .14s ease, color .14s ease;
}
.actions a:hover {
  background: #edf7f3;
  border-color: #b9d8d0;
  color: var(--accent);
}
.text-block { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px; white-space: pre-wrap; }
.actions-cell { display: flex; gap: 6px; flex-wrap: wrap; }
.modal-form { display: grid; gap: 12px; }
.sgq-modal {
  width: min(620px, calc(100vw - 28px));
  border: 0;
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 28px 80px rgba(18, 27, 38, .24);
}
.sgq-modal::backdrop { background: rgba(20, 30, 42, .42); backdrop-filter: blur(4px); }
sgq-modal-head { display: flex; justify-content: space-between; gap: 14px; align-items: start; margin-bottom: 14px; }
sgq-modal-head h2 { margin: 4px 0 2px; }
sgq-modal-head p { margin: 0; color: var(--muted); }

@keyframes rise { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeList { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) {
  .document-hero, sgq-doc-line { animation: none; transition: none; }
}

@media (max-width: 760px) {
  sgq-shell { grid-template-columns: 1fr; }
  sgq-shell:has(.menu-toggle:checked) { grid-template-columns: 1fr; }
  .side-rail { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); order: -1; }
  .menu-toggle:checked ~ .side-rail { width: auto; }
  .menu-toggle:checked ~ .side-rail .menu-text { display: inline; }
  .menu-toggle:checked ~ .side-rail sgq-menu-head {
    display: flex;
    justify-items: initial;
  }
  .menu-toggle:checked ~ .side-rail .sgq-user,
  .menu-toggle:checked ~ .side-rail sgq-user {
    display: grid;
    width: auto;
    min-height: auto;
    padding: 11px;
  }
  .menu-toggle:checked ~ .side-rail .sgq-user::before,
  .menu-toggle:checked ~ .side-rail sgq-user::before {
    display: none;
  }
  .menu-toggle:checked ~ .side-rail .side-link,
  .menu-toggle:checked ~ .side-rail .side-group summary {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr) 22px;
    justify-content: stretch;
    width: auto;
    min-height: 40px;
    padding: 5px 8px;
  }
  .menu-toggle:checked ~ .side-rail .side-group {
    width: auto;
    overflow: hidden;
  }
  .menu-toggle:checked ~ .side-rail .side-link span,
  .menu-toggle:checked ~ .side-rail .side-group summary span {
    width: 27px;
    height: 27px;
  }
  .menu-toggle:checked ~ .side-rail .side-group summary::after {
    display: block;
  }
  .menu-toggle:checked ~ .side-rail sgq-nav-panel {
    display: grid;
  }
  .menu-toggle:checked ~ .side-rail .side-group:hover sgq-nav-panel,
  .menu-toggle:checked ~ .side-rail .side-group:focus-within sgq-nav-panel,
  .menu-toggle:checked ~ .side-rail .side-group.flyout-open sgq-nav-panel {
    position: static;
    min-width: 0;
    max-width: none;
    padding: 0 8px 10px 48px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }
  .menu-toggle:checked ~ .side-rail .collapse-button { display: inline-grid; }
  .page-title {
    grid-template-columns: 1fr;
    padding: 15px;
  }
  .page-title sgq-form-actions {
    min-width: 0;
  }
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .document-form-grid {
    grid-template-columns: 1fr;
  }
  .record-compose-form,
  .template-builder-form {
    grid-template-columns: 1fr;
  }
  record-guidance-grid,
  template-guidance-grid,
  document-guidance-grid,
  template-lifecycle,
  revision-control-panel,
  revision-workflow {
    grid-template-columns: 1fr;
  }
  sgq-row {
    grid-template-columns: 1fr;
    gap: 7px;
  }
  .split, sgq-hero, sgq-auth, .document-hero, .detail-hero, .detail-grid,
  sgq-doc-table-head, sgq-doc-line, sgq-revision-card, sgq-revision-main,
  sgq-attachment-row { grid-template-columns: 1fr; }
  sgq-doc-table-head { display: none; }
  doc-command,
  doc-filter-strip,
  doc-board-head {
    grid-template-columns: 1fr;
    display: grid;
  }
  doc-command-actions {
    grid-template-columns: 1fr;
  }
  doc-command.doc-command-dual-actions {
    flex-direction: column;
    align-items: flex-start;
  }
  doc-command.doc-command-dual-actions doc-command-actions {
    flex-direction: column;
    align-items: stretch;
  }
  doc-command:has(doc-command-actions > :nth-child(4)) {
    grid-template-columns: 1fr;
  }
  doc-command:has(doc-command-actions > :nth-child(4)) doc-command-actions {
    grid-template-columns: 1fr;
  }
  doc-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  doc-filter-pills {
    justify-content: flex-start;
  }
  doc-board {
    padding: 11px;
  }
  doc-board-head .compact-action {
    width: 100%;
  }
  .documents-table sgq-doc-line {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 12px;
  }
  .records-table sgq-doc-line {
    grid-template-columns: 1fr;
  }
  .documents-table sgq-doc-cell {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding-top: 7px;
    border-top: 1px solid #eef2f5;
    white-space: normal;
  }
  .documents-table sgq-doc-cell::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
  }
  .documents-table sgq-doc-actions {
    justify-content: stretch;
  }
  .documents-table .action-menu-button {
    width: 100%;
  }
  .document-row-menu {
    position: static;
    margin-top: 6px;
    box-shadow: none;
  }
  sgq-doc-identity { grid-template-columns: 1fr; }
  .doc-title { white-space: normal; }
  sgq-doc-actions { justify-content: start; }
  sgq-revision-meta { justify-content: flex-start; }
}
