:root {
  --bs-primary: #176a59;
  --bs-primary-rgb: 23, 106, 89;
  --ink: #172b35;
  --muted: #647681;
  --line: #e1e7e9;
  --paper: #f4f7f8;
}
body {
  background: var(--paper);
  color: var(--ink);
  font-family:
    system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
  font-size: 14px;
}
.topbar {
  min-height: 68px;
  background: #172e38;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px 32px;
}
.brand {
  color: #fff;
  text-decoration: none;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.6px;
}
.brand:hover {
  color: white;
}
.brand-dot {
  color: #70d8b4;
  font-size: 14px;
  margin-right: 10px;
}
.user-name {
  margin-left: auto;
  color: #d7e4e8;
}
.app-nav {
  display: flex;
  gap: 6px;
  padding: 10px 28px;
  background: white;
  border-bottom: 1px solid var(--line);
  overflow: auto;
  white-space: nowrap;
}
.app-nav a {
  padding: 9px 14px;
  border-radius: 8px;
  color: #506570;
  text-decoration: none;
  font-weight: 500;
}
.app-nav a:hover,
.app-nav a.active {
  background: #e4f2ec;
  color: #116b52;
}
.content {
  max-width: 1440px;
  padding: 30px 32px;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 6px 0 24px;
}
.eyebrow {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 1.7px;
  font-weight: 700;
  margin-bottom: 8px;
}
h1 {
  font-size: 29px;
  font-weight: 680;
  letter-spacing: -0.8px;
  margin-bottom: 8px;
}
h2 {
  font-size: 19px;
  font-weight: 650;
  margin: 0 0 20px;
}
h3 {
  font-size: 16px;
}
small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 5px;
}
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 22px;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 24px;
}
.metric {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px;
}
.metric span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}
.metric strong {
  font-size: 34px;
  font-weight: 650;
  display: block;
  margin-top: 7px;
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}
.section-heading h2 {
  margin: 0;
}
.table {
  --bs-table-bg: transparent;
  font-size: 13px;
  margin-bottom: 0;
}
.table th {
  font-weight: 550;
  color: var(--muted);
  font-size: 12px;
  background: #f8fafb;
  white-space: nowrap;
}
.table > :not(caption) > * > * {
  padding: 14px 12px;
  border-bottom-color: #ecf0f2;
}
.table a,
a {
  color: #167260;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
.status {
  display: inline-block;
  padding: 5px 9px;
  background: #edf3f6;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
}
.empty {
  padding: 28px !important;
  color: var(--muted);
  text-align: center;
}
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
.feed {
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.feed:last-child {
  border: 0;
}
.feed strong {
  font-size: 13px;
}
.btn-primary {
  --bs-btn-bg: #176a59;
  --bs-btn-border-color: #176a59;
  --bs-btn-hover-bg: #115545;
  --bs-btn-hover-border-color: #115545;
  --bs-btn-active-bg: #115545;
}
.btn-outline-primary {
  --bs-btn-color: #176a59;
  --bs-btn-border-color: #176a59;
  --bs-btn-hover-bg: #176a59;
  --bs-btn-hover-border-color: #176a59;
}
.btn {
  font-size: 13px;
  padding: 10px 16px;
  border-radius: 8px;
}
.btn-sm {
  padding: 5px 10px;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: end;
  margin-top: 18px;
}
.form-grid .btn {
  justify-self: start;
  align-self: end;
}
.field {
  display: block;
  width: 100%;
  margin-bottom: 8px;
}
.field > span {
  display: block;
  font-size: 12px;
  font-weight: 550;
  color: #526976;
  margin-bottom: 8px;
}
.form-control,
.form-select {
  font-size: 14px;
  border-color: #d7e0e4;
  min-height: 42px;
}
.form-control:focus,
.form-select:focus {
  border-color: #6ba894;
  box-shadow: 0 0 0 0.15rem #176a591c;
}
.wide {
  grid-column: 1/-1;
}
.check {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  color: #445d68;
  font-size: 13px;
}
.check input {
  accent-color: #176a59;
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}
.permission-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px 22px;
  margin: 18px 0;
}
legend {
  font-size: 14px;
  font-weight: 600;
}
.hint {
  font-size: 12px;
  color: var(--muted);
  margin: 16px 0 0;
  line-height: 1.6;
}
.search {
  display: flex;
  gap: 12px;
  align-items: end;
  margin-bottom: 20px;
  max-width: 600px;
}
.search .field {
  margin: 0;
}
summary {
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}
details[open] > summary {
  margin-bottom: 20px;
}
.divider {
  border-top: 1px solid var(--line);
  padding-top: 20px;
  margin-top: 24px;
}
.anchor-nav {
  display: flex;
  gap: 20px;
  margin: 18px 0 24px;
}
.price {
  font-size: 25px;
  font-weight: 600;
  text-align: right;
}
.preserve {
  white-space: pre-wrap;
}
.login-card {
  max-width: 460px;
  margin: 8vh auto;
}
.login-card h1 {
  font-size: 27px;
}
.login-card .field {
  margin-top: 18px;
}
footer {
  padding: 12px 32px 26px;
  color: #899aa3;
  font-size: 11px;
}
code {
  color: #325e61;
  overflow-wrap: anywhere;
}
.alert {
  font-size: 13px;
  border-radius: 9px;
  line-height: 1.6;
}
@media (max-width: 900px) {
  .metrics {
    grid-template-columns: repeat(2, 1fr);
  }
  .form-grid,
  .permission-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .two-col {
    grid-template-columns: 1fr;
  }
  .content {
    padding: 22px 18px;
  }
  .topbar {
    padding: 16px 18px;
  }
  .app-nav {
    padding: 8px 10px;
  }
  .page-heading {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .panel {
    padding: 18px;
  }
}
@media (max-width: 520px) {
  .form-grid,
  .permission-grid {
    grid-template-columns: 1fr;
  }
  .topbar {
    gap: 12px;
  }
  .brand {
    font-size: 17px;
  }
  .user-name {
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .metrics {
    gap: 10px;
  }
  .metric {
    padding: 16px;
  }
  .metric strong {
    font-size: 28px;
  }
  h1 {
    font-size: 25px;
  }
  .price {
    text-align: left;
  }
  .table {
    min-width: 560px;
  }
  .content {
    padding: 18px 12px;
  }
  .panel {
    padding: 15px;
    border-radius: 10px;
  }
  .page-heading {
    gap: 10px;
  }
  .section-heading {
    align-items: flex-start;
  }
  .section-heading > a {
    white-space: nowrap;
  }
  .anchor-nav {
    gap: 14px;
    font-size: 12px;
  }
}
@media print {
  .topbar,
  .app-nav,
  footer,
  .no-print {
    display: none !important;
  }
  .content {
    padding: 0;
  }
  .panel {
    border: 0;
    padding: 0;
  }
  body {
    background: #fff;
  }
  .page-heading {
    margin-bottom: 24px;
  }
}
.site-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 20px;
}
.site-card {
  background: #fff;
  border: 1px solid var(--border, #dce3ed);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.site-card-main {
  display: block;
  color: inherit;
  text-decoration: none;
  flex: 1;
}
.site-card-main:hover h2 {
  color: #2459b7;
  text-decoration: underline;
}
.site-card-main img,
.photo-placeholder {
  width: 100%;
  height: 190px;
  object-fit: cover;
}
.photo-placeholder {
  display: grid;
  place-items: center;
  background: #edf2f8;
  color: #617086;
  font-size: 14px;
}
.site-card-body,
.site-card-actions {
  padding: 18px;
}
.site-card-body h2 {
  font-size: 20px;
}
.site-card-actions {
  display: flex;
  gap: 10px;
  padding-top: 0;
  flex-wrap: wrap;
}
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
  gap: 18px;
}
.media-item {
  min-width: 0;
  margin: 0;
}
.media-item img,
.media-item video {
  width: 100%;
  height: 210px;
  object-fit: cover;
  border-radius: 10px;
  background: #e9eef5;
}
.media-item figcaption {
  overflow-wrap: anywhere;
  padding: 8px 0;
  color: #56637a;
}
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
}
.section-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin: 18px 0;
}
.access-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr));
  gap: 16px;
}
.access-record {
  border: 1px solid #dfe5ee;
  border-radius: 12px;
  padding: 16px;
  overflow-wrap: anywhere;
}
.access-record h3 {
  font-size: 17px;
}
.access-record small {
  display: block;
  color: #607086;
}
.access-fields {
  margin-top: 12px;
}
.access-fields dd {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.preserve {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
@media print {
  .section-nav,
  .site-card-actions,
  form,
  button,
  .app-nav,
  .topbar {
    display: none !important;
  }
  .panel {
    break-inside: avoid;
  }
}
.kit-option {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  padding: 14px 8px;
  border-bottom: 1px solid #e0e6ef;
}
.kit-option small {
  display: block;
  color: #69768b;
}
.kit-inactive {
  opacity: 0.45;
}
/* Workspace v0.3 */
:root {
  --ink: #20332d;
  --muted: #718078;
  --line: #e3e8e3;
  --paper: #f5f7f4;
  --green: #267053;
  --sidebar: 244px;
}
body {
  font-size: 14px;
  line-height: 1.55;
  letter-spacing: 0.005em;
}
h1 {
  font-size: 30px;
  letter-spacing: -1px;
  font-weight: 650;
}
h2 {
  font-size: 18px;
  margin-bottom: 16px;
}
h3 {
  font-size: 15px;
}
h4 {
  font-size: 13px;
  color: var(--muted);
}
p {
  margin-bottom: 12px;
}
a {
  color: #276c51;
}
a:hover {
  color: #174831;
}
.text-secondary {
  color: var(--muted) !important;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar);
  background: #fff;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  z-index: 50;
  padding: 28px 16px 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 22px;
  color: #22382d;
  letter-spacing: -0.6px;
  padding: 0 9px 24px;
}
.brand:hover {
  color: #22382d;
  text-decoration: none;
}
.brand-light {
  font-weight: 400;
}
.brand small {
  font-size: 8px;
  letter-spacing: 1.8px;
  font-weight: 600;
  margin: 4px 0 0;
  color: #86978b;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 37px;
  height: 42px;
  border-radius: 11px;
  background: #2b7254;
  color: white;
  font-size: 25px;
  flex-shrink: 0;
}
.app-nav {
  display: block;
  padding: 0;
  overflow-y: auto;
  border: 0;
  white-space: normal;
  flex: 1;
}
.nav-group {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: #8a978f;
  font-weight: 600;
  margin: 21px 13px 8px;
}
.app-nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 12px;
  border-radius: 8px;
  margin-bottom: 3px;
  font-size: 12.5px;
  font-weight: 500;
  color: #59685e;
}
.app-nav a:hover {
  text-decoration: none;
  background: #f5f7f4;
}
.app-nav a.active {
  background: #e9f2eb;
  color: #256244;
  font-weight: 650;
}
.nav-icon {
  font-size: 19px;
  width: 23px;
  text-align: center;
  font-weight: 400;
  line-height: 1;
}
.sidebar-user {
  display: flex;
  gap: 10px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding: 20px 7px 0;
  margin-top: 20px;
  font-size: 12px;
  min-width: 0;
}
.sidebar-user > div {
  min-width: 0;
  flex: 1;
}
.sidebar-user strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sidebar-user small {
  font-size: 10px;
  margin: 0;
}
.avatar {
  display: grid;
  place-items: center;
  background: #edf1e9;
  color: #617650;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-weight: 700;
  flex-shrink: 0;
}
.logout-button {
  border: 0;
  background: none;
  color: #76867a;
  font-size: 22px;
}
.workspace-bar {
  margin-left: var(--sidebar);
  padding: 18px 36px;
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  min-height: 79px;
}
.global-search {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  max-width: 530px;
  color: #88938b;
}
.global-search > span {
  font-size: 25px;
}
.global-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 12px;
  padding: 8px 0;
  min-width: 0;
}
.global-search button {
  font-size: 11px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--muted);
}
.workspace-date {
  margin-left: auto;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}
.content {
  max-width: 1600px;
  padding: 30px 36px 40px;
}
.authenticated .content {
  margin-left: var(--sidebar);
  width: calc(100% - var(--sidebar));
}
.authenticated footer {
  margin-left: var(--sidebar);
}
footer {
  padding: 0 36px 24px;
  font-size: 10px;
  color: #99a39c;
}
footer span {
  margin: 0 6px;
}
.guest-bar {
  padding: 22px 28px;
}
.guest-bar .brand {
  padding: 0;
}
.menu-button {
  display: none;
}
.page-heading {
  margin: 0 0 25px;
  gap: 18px;
}
.page-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 1.5px;
  color: #819184;
}
.panel {
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 22px;
  box-shadow: 0 2px 3px #183b2010;
}
.panel h2:last-child {
  margin: 0;
}
.btn {
  font-size: 12px;
  border-radius: 8px;
  padding: 10px 15px;
  font-weight: 550;
  min-height: 40px;
}
.btn-primary {
  --bs-btn-bg: #2b7051;
  --bs-btn-border-color: #2b7051;
  --bs-btn-hover-bg: #215b40;
  --bs-btn-hover-border-color: #215b40;
}
.btn-outline-primary {
  --bs-btn-color: #2b7051;
  --bs-btn-border-color: #b9cfbf;
  --bs-btn-hover-bg: #2b7051;
  --bs-btn-hover-border-color: #2b7051;
}
.btn-outline-secondary {
  --bs-btn-border-color: #dfe5df;
  --bs-btn-color: #657167;
  background: #fff;
}
.btn-sm {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 11px;
}
.button-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
}
.button-row.end {
  justify-content: flex-end;
}
.metric {
  text-decoration: none;
  color: var(--ink);
  padding: 20px;
  border-radius: 11px;
  position: relative;
}
.metric:hover {
  text-decoration: none;
  border-color: #b2c8b8;
  box-shadow: 0 3px 10px #183b200a;
}
.metric strong {
  font-size: 32px;
  font-weight: 600;
}
.metric em {
  display: block;
  font-size: 11px;
  color: #78877c;
  font-style: normal;
  margin-top: 9px;
}
.metric .metric-arrow {
  position: absolute;
  right: 17px;
  top: 18px;
  font-size: 18px;
  color: #87978b;
}
.metrics {
  gap: 16px;
}
.metric.attention {
  background: #fffaf0;
  border-color: #ede5ce;
}
.status {
  font-size: 10px;
  line-height: 1.5;
  border-radius: 5px;
  background: #f0f3ef;
  color: #6e7b70;
  padding: 4px 8px;
  white-space: normal;
}
.status[data-status="operating"],
.status[data-status="done"],
.status[data-status="managed"] {
  background: #e8f3e9;
  color: #39704a;
}
.status[data-status="construction"],
.status[data-status="active"],
.status[data-status="commissioning"] {
  background: #e9eefb;
  color: #5a72a8;
}
.status[data-status="unknown"],
.status[data-status="paused"],
.status[data-status="blocked"] {
  background: #faf0de;
  color: #a07a36;
}
.status[data-status="planned"],
.status[data-status="prospect"],
.status[data-status="survey"] {
  background: #f0ecf7;
  color: #82709b;
}
.status[data-status="overdue"] {
  background: #fae9e3;
  color: #af6047;
}
.status[data-status="archived"] {
  background: #ecefee;
  color: #7c8981;
}
.filters {
  padding: 15px 18px;
  display: flex;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  box-shadow: none;
}
.filters .field {
  flex: 1;
  min-width: 135px;
  margin: 0;
}
.filters .field:first-child {
  flex: 1.6;
}
.field > span {
  font-size: 11px;
  color: #6d7b71;
  margin-bottom: 6px;
}
.form-control,
.form-select {
  border-color: #dfe5df;
  border-radius: 7px;
  font-size: 13px;
  min-height: 42px;
}
.search {
  max-width: none;
}
.section-heading p {
  margin: 0;
}
.segmented {
  display: flex;
  gap: 3px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 3px;
  border-radius: 8px;
}
.segmented a {
  font-size: 11px;
  padding: 5px 11px;
  color: #7a857b;
  border-radius: 5px;
}
.segmented a.active {
  background: #eef3ed;
  color: #3f6948;
}
.segmented a:hover {
  text-decoration: none;
}
.site-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.site-card {
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
}
.site-card-main img,
.photo-placeholder {
  height: 162px;
}
.photo-placeholder {
  background: linear-gradient(150deg, #e7ece5, #f5f7f3);
  color: #b3bfae;
  position: relative;
  overflow: hidden;
}
.photo-placeholder::before {
  content: "P";
  font-size: 57px;
  font-weight: 600;
  line-height: 1;
  border: 2px solid #c6d0bf;
  border-radius: 13px;
  padding: 3px 18px;
  opacity: 0.5;
}
.photo-placeholder span {
  position: absolute;
  bottom: 12px;
  font-size: 10px;
  color: #96a38f;
}
.site-card-body {
  padding: 17px 18px 13px;
}
.site-card-body h2 {
  font-size: 16px;
  line-height: 1.4;
  margin: 10px 0 6px;
  overflow-wrap: anywhere;
}
.site-card-body p {
  font-size: 11px;
  color: #849080;
  margin-bottom: 11px;
}
.site-card-main:hover {
  text-decoration: none;
  color: inherit;
}
.site-card-main:hover h2 {
  color: #28704c;
  text-decoration: none;
}
.site-card-actions {
  border-top: 1px solid #eef1ec;
  padding: 11px 18px;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  margin-top: auto;
}
.site-card-actions a:first-child {
  font-weight: 600;
}
.site-owners {
  font-size: 11px;
  color: #859080;
  padding: 0 18px 14px;
}
.site-owners div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
}
.site-owners strong {
  font-weight: 500;
  color: #647063;
  text-align: right;
}
.site-owners .deadline {
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid #eef1ec;
}
.table th {
  font-size: 10px;
  background: #f8faf6;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 550;
}
.table {
  font-size: 12px;
}
.table td {
  vertical-align: middle;
  overflow-wrap: anywhere;
  max-width: 380px;
}
.table > tbody > tr:last-child > td {
  border-bottom: 0;
}
.table small {
  font-size: 10px;
}
.table a {
  font-weight: 550;
}
.table-wrap {
  padding: 0;
  overflow: hidden;
}
.table-responsive {
  border-radius: 8px;
}
.table-thumb {
  width: 50px;
  height: 44px;
  object-fit: cover;
  border-radius: 7px;
}
.empty {
  padding: 36px !important;
  font-size: 13px;
  line-height: 1.7;
}
.empty h3 {
  font-size: 16px;
  color: #536a56;
}
.record-header {
  display: flex;
  gap: 22px;
  align-items: center;
  padding: 23px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin: 16px 0 22px;
}
.record-cover {
  width: 132px;
  height: 106px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}
.record-cover.photo-placeholder::before {
  font-size: 32px;
  padding: 3px 10px;
}
.record-header .record-title {
  flex: 1;
  min-width: 0;
}
.record-title h1 {
  overflow-wrap: anywhere;
  margin: 9px 0 4px;
}
.record-title p {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}
.breadcrumb-line {
  font-size: 11px;
  display: flex;
  gap: 8px;
  align-items: center;
  color: #98a18f;
  margin-bottom: 16px;
}
.tabs {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  padding: 0 0 1px;
  margin-bottom: 24px;
  scrollbar-width: thin;
  white-space: nowrap;
}
.tabs a {
  padding: 12px 14px;
  font-size: 12px;
  color: #818b7d;
  border-bottom: 2px solid transparent;
}
.tabs a:hover {
  text-decoration: none;
  color: #2b7051;
}
.tabs a[aria-selected="true"],
.tabs a.active {
  color: #2b7051;
  border-bottom-color: #2b7051;
  font-weight: 600;
}
.tab-pane[hidden] {
  display: none !important;
}
.info-grid {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 16px;
}
.info-grid dt {
  font-size: 11px;
  color: #869081;
  font-weight: 400;
}
.info-grid dd {
  font-size: 13px;
  margin-top: 5px;
}
.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(250px, 1fr);
  gap: 22px;
  align-items: start;
}
.overview-panel .preserve {
  max-height: 220px;
  overflow: auto;
}
.feed {
  font-size: 12px;
  display: block;
  padding: 15px 0;
}
.feed strong {
  font-size: 12px;
}
.feed p {
  margin: 7px 0 0;
}
.feed small {
  font-size: 11px;
}
.feed a {
  font-weight: 550;
}
.section-heading > a {
  font-size: 11px;
}
.contact-card {
  background: #f9faf7;
  border: 1px solid #e9ede4;
  border-radius: 9px;
  padding: 16px;
  margin: 0 0 14px;
}
.contact-card p {
  font-size: 12px;
  margin-bottom: 8px;
}
.contact-card h3 {
  margin-bottom: 3px;
}
.contact-card details {
  margin-top: 10px;
}
.contact-actions {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}
.action-card {
  display: block;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px;
  background: white;
  color: var(--ink);
  height: 100%;
}
.action-card:hover {
  text-decoration: none;
  border-color: #9abd9f;
}
.action-card small {
  font-size: 12px;
  line-height: 1.6;
}
.action-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.action-card h2 {
  font-size: 16px;
  margin: 8px 0;
}
.stepper {
  display: flex;
  gap: 0;
  overflow: auto;
  padding: 3px 0 18px;
  margin: 0 0 15px;
  white-space: nowrap;
}
.stepper a {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 8px 14px 8px 0;
  font-size: 11px;
  color: #8c9588;
}
.stepper a span {
  width: 25px;
  height: 25px;
  border: 1px solid #dfe6d9;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #859581;
  font-size: 10px;
}
.stepper a.active,
.stepper a[aria-selected="true"] {
  color: #2b7051;
  font-weight: 600;
}
.stepper a.active span,
.stepper a[aria-selected="true"] span {
  background: #2b7051;
  color: white;
  border-color: #2b7051;
}
.quote-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 282px;
  gap: 22px;
  align-items: start;
}
.quote-summary {
  position: sticky;
  top: 24px;
  padding: 22px;
  background: #fdfefa;
}
.quote-summary dl > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  margin-bottom: 13px;
}
.quote-summary dt {
  font-weight: 400;
  color: #7a8977;
}
.quote-summary dd {
  margin: 0;
  white-space: nowrap;
}
.quote-summary .quote-total {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  margin-top: 18px;
  display: block;
}
.quote-total dd {
  font-size: 26px;
  font-weight: 600;
  margin-top: 7px;
  letter-spacing: -0.6px;
}
.quote-summary .monthly {
  border-top: 1px dashed var(--line);
  padding-top: 14px;
  display: block;
  color: #73936f;
}
.quote-summary .monthly dd {
  font-size: 17px;
  margin-top: 5px;
}
.kit-option {
  padding: 15px;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  margin: 10px 0;
  flex-wrap: nowrap;
}
.kit-option label {
  flex: 1;
  min-width: 0;
  margin: 0;
}
.kit-option label span {
  overflow-wrap: anywhere;
}
.kit-option small {
  font-size: 10px;
}
.kit-option img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
}
.kit-option .kit-price {
  font-size: 12px;
  white-space: nowrap;
}
.kit-option:has(input:checked) {
  border-color: #b0c8ad;
  background: #fafcf8;
}
.kit-option[data-optional="true"] {
  border-style: dashed;
}
.kit-option.kit-inactive {
  opacity: 0.5;
}
.kit-nested {
  margin-left: 18px;
  border-left: 2px solid #dae4d5;
}
.kit-nested summary {
  font-size: 12px;
  margin: 12px;
}
.stage-list {
  counter-reset: stage;
}
.stage-card {
  position: relative;
  margin-left: 14px;
  padding: 0 0 25px 32px;
  border-left: 1px solid #d9e3d4;
}
.stage-card:before {
  counter-increment: stage;
  content: counter(stage);
  position: absolute;
  left: -14px;
  top: 0;
  background: #ecf3e8;
  border: 4px solid white;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  text-align: center;
  font-size: 11px;
  color: #5a7b52;
}
.stage-card h3 {
  margin-bottom: 7px;
}
.stage-card p {
  font-size: 11px;
  color: #7c8875;
}
.stage-card:last-child {
  padding-bottom: 0;
}
.stage-card summary {
  font-size: 11px;
}
.report-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.report-summary time {
  font-size: 11px;
  color: #829079;
}
.report-card h4 {
  margin: 18px 0 6px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.report-card p {
  font-size: 13px;
}
.upload-zone {
  padding: 18px;
  background: #f8faf5;
  border: 1px dashed #c4d2bb;
  border-radius: 9px;
}
.upload-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
}
.upload-item {
  max-width: 120px;
  font-size: 10px;
  overflow-wrap: anywhere;
}
.upload-item img,
.upload-item video {
  width: 106px;
  height: 80px;
  object-fit: cover;
  border-radius: 7px;
  display: block;
  margin-bottom: 5px;
}
.upload-item button {
  padding: 3px 7px;
  border: 1px solid var(--line);
  background: white;
  border-radius: 5px;
  font-size: 10px;
}
.upload-progress {
  width: 100%;
  accent-color: #2b7051;
  height: 10px;
}
.form-feedback {
  grid-column: 1/-1;
  margin: 14px 0;
  white-space: pre-wrap;
}
.form-feedback:focus {
  outline: 0;
}
.invalid-feedback {
  font-size: 11px;
}
.confirm-dialog {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 28px;
  max-width: min(480px, calc(100% - 32px));
  color: var(--ink);
}
.confirm-dialog::backdrop {
  background: #152a2166;
}
.confirm-dialog p {
  white-space: pre-wrap;
  font-size: 13px;
}
.permission-group {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 15px;
  margin-bottom: 15px;
}
.permission-group legend {
  float: none;
  width: auto;
  padding: 0 7px;
  font-size: 12px;
}
.permission-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
}
.permission-grid .check {
  font-size: 11px;
}
.pagination-bar {
  display: flex;
  gap: 15px;
  justify-content: center;
  align-items: center;
  font-size: 12px;
  margin: 25px 0 0;
}
.new-tab-icon {
  font-size: 10px;
  color: #9aa48f;
  margin-left: 4px;
  display: inline-block;
  font-weight: 400;
}
.skip-link {
  position: fixed;
  top: -60px;
  left: 270px;
  background: white;
  padding: 12px;
  z-index: 99;
}
.skip-link:focus {
  top: 8px;
}
summary {
  font-size: 13px;
  font-weight: 550;
}
details[open] > summary {
  margin-bottom: 16px;
}
.hint {
  font-size: 11px;
}
.form-grid {
  gap: 14px;
}
.form-grid .wide {
  min-width: 0;
}
.toolbar-note {
  font-size: 10px;
  color: #8b9785;
}
.stock-operation-picker {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin: 20px 0;
}
.stock-operation-picker label {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  font-size: 12px;
  cursor: pointer;
}
.stock-operation-picker label:has(input:checked) {
  background: #edf5e9;
  border-color: #a5c295;
  color: #456b34;
}
.stock-operation-picker input {
  accent-color: #2b7051;
  margin-right: 6px;
}
.operation-summary {
  border-left: 3px solid #b3cc9c;
  background: #f3f7ee;
  padding: 14px;
  font-size: 12px;
  white-space: pre-wrap;
}
.mobile-only {
  display: none;
}
.login-card {
  margin: 5vh auto;
}
.nav-backdrop {
  display: none;
}
.search-section {
  margin-bottom: 22px;
}
.search-section h2 {
  font-size: 15px;
}
.table td .button-row {
  flex-wrap: nowrap;
}
.media-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr));
}
.media-item img,
.media-item video {
  height: 175px;
}
.panel,
section,
article,
.two-col > * {
  min-width: 0;
}
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}
.toolbar p {
  margin: 0;
  font-size: 11px;
  color: var(--muted);
}
button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 2px solid #548642;
  outline-offset: 3px;
}
.table-responsive:focus-visible {
  outline: 2px solid #548642;
}
@media (min-width: 1800px) {
  .authenticated .content {
    max-width: none;
  }
  .site-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (max-width: 1199px) {
  :root {
    --sidebar: 220px;
  }
  .content {
    padding: 26px;
  }
  .workspace-bar {
    padding: 18px 26px;
  }
  .site-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .quote-layout {
    grid-template-columns: minmax(0, 1fr) 240px;
  }
  .content-grid {
    grid-template-columns: 1fr;
  }
  .action-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .sidebar {
    padding-left: 12px;
    padding-right: 12px;
  }
  .app-nav a {
    font-size: 11.5px;
  }
}
@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.15s;
  }
  .nav-open .sidebar {
    transform: translateX(0);
  }
  .nav-backdrop:not([hidden]) {
    display: block;
    position: fixed;
    inset: 0;
    background: #14281b66;
    border: 0;
    z-index: 40;
  }
  .authenticated .content {
    margin-left: 0;
    width: 100%;
  }
  .authenticated footer,
  .workspace-bar {
    margin-left: 0;
  }
  .workspace-bar {
    padding: 12px 20px;
    min-height: 67px;
  }
  .menu-button {
    display: block;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 7px;
    padding: 7px 11px;
    color: #5d7656;
    font-size: 18px;
  }
  .quote-layout {
    grid-template-columns: minmax(0, 1fr) 260px;
  }
  .mobile-only {
    display: block;
  }
  .record-header {
    flex-wrap: wrap;
  }
  .record-header .button-row {
    margin-left: auto;
  }
}
@media (max-width: 650px) {
  h1 {
    font-size: 26px;
  }
  .content {
    padding: 24px 16px;
  }
  .page-heading {
    align-items: flex-start;
    gap: 15px;
  }
  .page-heading .btn-primary {
    width: auto;
  }
  .workspace-date {
    display: none;
  }
  .workspace-bar {
    padding: 10px 16px;
    gap: 12px;
  }
  .global-search input {
    font-size: 11px;
  }
  .global-search > span {
    display: none;
  }
  .site-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .site-card-main img,
  .photo-placeholder {
    height: 185px;
  }
  .site-card-body h2 {
    font-size: 18px;
  }
  .site-card-body p {
    font-size: 12px;
  }
  .site-owners {
    font-size: 12px;
  }
  .site-card-actions {
    padding: 13px 18px;
    font-size: 12px;
  }
  .filters {
    padding: 15px;
    gap: 12px;
  }
  .filters .field {
    flex-basis: calc(50% - 12px);
    min-width: 0;
  }
  .filters .field:first-child {
    flex-basis: 100%;
  }
  .filters .field > span {
    font-size: 10px;
  }
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .metric {
    padding: 17px 14px;
  }
  .metric span {
    font-size: 10px;
  }
  .metric strong {
    font-size: 28px;
  }
  .metric em {
    font-size: 10px;
  }
  .panel {
    padding: 19px;
  }
  .table-wrap {
    padding: 0;
  }
  .quote-layout {
    grid-template-columns: 1fr;
  }
  .quote-summary {
    position: static;
  }
  .action-grid {
    grid-template-columns: 1fr;
  }
  .record-header {
    padding: 18px;
    gap: 15px;
  }
  .record-cover {
    width: 77px;
    height: 77px;
  }
  .record-title h1 {
    font-size: 23px;
  }
  .record-title p {
    font-size: 11px;
  }
  .record-header .button-row {
    margin-left: 0;
    width: 100%;
  }
  .tabs a {
    padding: 11px 13px;
    font-size: 11px;
  }
  .tabs {
    margin-bottom: 20px;
  }
  .record-title .button-row {
    gap: 5px;
  }
  .content-grid {
    gap: 0;
  }
  .stepper a {
    font-size: 11px;
    padding-right: 12px;
  }
  .form-grid,
  .permission-grid {
    grid-template-columns: 1fr;
  }
  .kit-option {
    flex-wrap: wrap;
    padding: 12px;
  }
  .kit-option img {
    width: 48px;
    height: 48px;
  }
  .kit-option .kit-price {
    margin-left: auto;
  }
  .kit-nested {
    margin-left: 9px;
  }
  .stock-operation-picker {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .stock-operation-picker label {
    font-size: 11px;
    padding: 12px 9px;
  }
  .btn {
    min-height: 43px;
    font-size: 12px;
  }
  .btn-sm {
    min-height: 36px;
    font-size: 11px;
  }
  .table {
    min-width: 590px;
  }
  .table td {
    max-width: 260px;
  }
  .search {
    flex-wrap: wrap;
  }
  .info-grid {
    grid-template-columns: 1fr 1fr;
    gap: 15px;
  }
  .sidebar-user .logout-button {
    min-width: 40px;
    min-height: 40px;
  }
  .sidebar {
    width: 260px;
  }
  .media-item img,
  .media-item video {
    height: 185px;
  }
  .toolbar {
    align-items: flex-start;
    gap: 12px;
  }
  .toolbar-note {
    font-size: 9px;
  }
  .breadcrumb-line {
    flex-wrap: wrap;
    font-size: 10px;
  }
  .skip-link {
    left: 16px;
  }
  .global-search button {
    min-height: 36px;
  }
  footer {
    padding-left: 16px;
  }
  .guest-bar {
    padding: 20px;
  }
  .report-summary {
    flex-wrap: wrap;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
@media print {
  .sidebar,
  .workspace-bar,
  .tabs,
  .stepper,
  .guest-bar,
  .breadcrumb-line,
  .skip-link,
  .quote-summary .btn {
    display: none !important;
  }
  .authenticated .content {
    margin: 0;
    width: 100%;
    padding: 0;
  }
  .tab-pane[hidden] {
    display: block !important;
  }
  .quote-layout {
    display: block;
  }
  .authenticated footer {
    margin: 0;
  }
  .panel {
    box-shadow: none;
  }
  .table {
    min-width: 0;
  }
  .record-header {
    border: 0;
  }
}

/* Site locations and reversible record management. */
.site-map {
  display: block;
  width: 100%;
  height: 280px;
  border: 0;
  border-radius: 12px;
  margin: 12px 0;
  background: #eef2f6;
}
.location-panel {
  min-width: 0;
}
.region-label {
  color: var(--muted, #596778);
  font-size: 0.8rem;
  margin-top: 12px;
}
.danger-zone {
  border-color: #e7b9b9;
}
.danger-zone summary {
  color: #a92929;
}
.danger-zone form {
  display: grid;
  gap: 14px;
  max-width: 640px;
}
@media (max-width: 600px) {
  .site-map {
    height: 230px;
  }
}

/* Intake, site evidence and task feedback. */
.survey-question { padding: 20px 0; border-bottom: 1px solid #dce3ec; }
.survey-question:last-child { border-bottom: 0; }
.survey-question h3 { max-width: 70ch; line-height: 1.5; }
.survey-question textarea { min-height: 120px; }
.survey-savebar { position: sticky; bottom: 12px; z-index: 8; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; box-shadow: 0 5px 25px #213b5720; }
.document-file { display: grid; place-items: center; min-height: 120px; padding: 20px; overflow-wrap: anywhere; background: #eef3f9; }
.media-item figcaption small { display: block; overflow-wrap: anywhere; }
.notification-bell { white-space: nowrap; text-decoration: none; font-size: .85rem; }
.notification-bell [data-notification-count] { background: #a32839; color: white; border-radius: 20px; padding: 2px 6px; }
@media (max-width: 600px) {
  .survey-savebar { bottom: 0; padding: 12px; gap: 10px; }
  .survey-savebar [data-survey-progress] { flex-basis: 100%; }
  .notification-bell { font-size: .75rem; }
  .workspace-date { display: none; }
  .global-search { min-width: 0; }
}

.site-card-map iframe { width:100%; height:190px; border:0; display:block; }
pre { white-space:pre-wrap; overflow-wrap:anywhere; }

.bonus-preview-amount { display:block; font-size:1.65rem; margin-bottom:.65rem; }

.stock-photo {
  width: min(240px, 100%);
  max-height: 200px;
  object-fit: contain;
}

.stock-batch-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(110px, 150px) auto;
  align-items: end;
  gap: 12px;
  padding-block: 10px;
  border-bottom: 1px solid var(--bs-border-color);
}

@media (max-width: 640px) {
  .stock-batch-line {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .stock-batch-line .field:first-child {
    grid-column: 1 / -1;
  }
}
