/* ============================================================
   Oktedi Design System -tokens + Materialize overrides
   Dense data-dashboard theme (Grafana/Linear-inspired)
   ============================================================ */
:root {
  --ok-bg: #f5f6f8;
  --ok-surface: #ffffff;
  --ok-surface-2: #fafbfc;
  --ok-border: #e3e5ea;
  --ok-border-strong: #cdd1d9;
  --ok-text: #1a1f29;
  --ok-text-muted: #6b7280;
  --ok-text-subtle: #9aa1ab;
  --ok-primary: #f57b20;
  --ok-primary-hover: #e46a10;
  --ok-accent: #4e5a9e;
  --ok-success: #3f9353;
  --ok-warn: #d9a531;
  --ok-danger: #c23b3b;

  --ok-sidebar-bg: #1b1e27;
  --ok-sidebar-bg-hover: #262a36;
  --ok-sidebar-active: #2f3648;
  --ok-sidebar-text: #c8ccd4;
  --ok-sidebar-text-muted: #7b8190;
  --ok-sidebar-heading: #5b6270;

  --ok-s1: 4px;
  --ok-s2: 8px;
  --ok-s3: 12px;
  --ok-s4: 16px;
  --ok-s5: 20px;
  --ok-s6: 24px;

  --ok-r-sm: 4px;
  --ok-r: 6px;
  --ok-r-lg: 10px;

  --ok-shadow-1: 0 1px 2px rgba(20, 25, 35, 0.05);
  --ok-shadow-2: 0 2px 6px rgba(20, 25, 35, 0.08);

  --ok-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --ok-font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --ok-fs-xs: 12px;
  --ok-fs-sm: 13px;
  --ok-fs: 15px;
  --ok-fs-md: 16px;
  --ok-fs-lg: 18px;
  --ok-fs-xl: 22px;
  --ok-fs-2xl: 26px;
  --ok-lh: 1.4;

  --ok-sb-w: 232px;
  --ok-sb-w-collapsed: 56px;
  --ok-header-h: 44px;
}

html, body {
  background: var(--ok-bg);
  color: var(--ok-text);
  font-family: var(--ok-font);
  font-size: var(--ok-fs);
  line-height: var(--ok-lh);
}

h1 { font-size: var(--ok-fs-2xl); font-weight: 600; margin: 0 0 var(--ok-s3); }
h2 { font-size: var(--ok-fs-xl); font-weight: 600; margin: 0 0 var(--ok-s3); }
h3 { font-size: var(--ok-fs-lg); font-weight: 600; margin: 0 0 var(--ok-s2); }
h4, h5 { font-weight: 600; margin: 0 0 var(--ok-s2); }

/* Tighten Materialize grid gutters for dense layout */
#indexbody.row,
#indexbody .row { margin-bottom: var(--ok-s3); }
#indexbody .row .col { padding: 0 var(--ok-s2); }

/* ---------- Cards ---------- */
.card {
  background: var(--ok-surface);
  border: 1px solid var(--ok-border);
  border-radius: var(--ok-r);
  box-shadow: var(--ok-shadow-1);
  margin: var(--ok-s2) 0 var(--ok-s3);
  transition: border-color .12s ease, box-shadow .12s ease;
}
.card.hoverable:hover {
  box-shadow: var(--ok-shadow-2);
  border-color: var(--ok-border-strong);
  transform: none;
}
.card .card-content {
  padding: var(--ok-s3) var(--ok-s4);
  border-radius: 0;
}
.card .card-content .card-title {
  font-size: var(--ok-fs-md);
  font-weight: 600;
  line-height: 1.3;
  margin: 0 0 var(--ok-s1);
  display: block;
}
.card .card-content p {
  font-size: var(--ok-fs-sm);
  color: var(--ok-text-muted);
  margin: 0;
}
.card .card-image { padding: var(--ok-s2) 0; }
.card .card-image i.material-icons.large,
.card .card-image i.material-icons.medium {
  font-size: 28px !important;
  color: var(--ok-text-muted);
  height: auto;
  line-height: 1;
}
.card .card-action {
  padding: var(--ok-s2) var(--ok-s3);
  border-top: 1px solid var(--ok-border);
}
.card .card-action a.btn-small,
.card .card-action a.btn {
  background: var(--ok-surface-2);
  color: var(--ok-text);
  box-shadow: none;
  border: 1px solid var(--ok-border);
  font-size: var(--ok-fs-sm);
  font-weight: 500;
  height: 28px;
  line-height: 28px;
  padding: 0 var(--ok-s3);
  text-transform: none;
  letter-spacing: 0;
  margin: 0;
}
.card .card-action a.btn-small:hover,
.card .card-action a.btn:hover {
  background: var(--ok-primary);
  color: #fff;
  border-color: var(--ok-primary);
}

/* Dense card modifier for KPI tiles and feature cards */
.card.card-dense { margin: var(--ok-s1) 0; }
.card.card-dense .card-content { padding: var(--ok-s3); }

/* Clickable feature card (replaces verbose card-action pattern) */
.ok-feature-card {
  display: block;
  color: var(--ok-text);
  text-decoration: none;
  cursor: pointer;
}
.ok-feature-card .card-content { min-height: 92px; }
.ok-feature-card__head {
  display: flex;
  align-items: center;
  gap: var(--ok-s2);
  margin-bottom: var(--ok-s1);
}
.ok-feature-card__head i.material-icons {
  font-size: 20px;
  color: var(--ok-primary);
}
.ok-feature-card:hover .card-title { color: var(--ok-primary); }

/* KPI tile */
.ok-kpi { display: flex; flex-direction: column; gap: var(--ok-s1); }
.ok-kpi__label {
  font-size: var(--ok-fs-xs);
  color: var(--ok-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}
.ok-kpi__value {
  font-size: 28px;
  font-weight: 600;
  color: var(--ok-text);
  line-height: 1.1;
}
.ok-kpi__value .ok-kpi__icon {
  font-size: 22px;
  vertical-align: middle;
  color: var(--ok-primary);
  margin-right: var(--ok-s1);
}
.ok-kpi--warn .ok-kpi__value { color: var(--ok-warn); }
.ok-kpi--danger .ok-kpi__value { color: var(--ok-danger); }

/* ---------- Buttons ---------- */
.btn, .btn-small, .btn-large {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
  box-shadow: none;
  border-radius: var(--ok-r-sm);
  background-color: #1f2430;
  color: #fff;
}
.btn:hover, .btn-small:hover, .btn-large:hover {
  background-color: #2d3445;
}
.btn-small { height: 32px; line-height: 32px; font-size: var(--ok-fs-sm); padding: 0 var(--ok-s3); }
.btn { height: 36px; line-height: 36px; padding: 0 var(--ok-s4); }
/* Brand-coded buttons keep their semantic intent but use the new palette */
.btn.green, .btn-small.green, .btn-large.green { background-color: #1f2430 !important; color: #fff !important; }
.btn.green:hover, .btn-small.green:hover { background-color: #2d3445 !important; }
.btn-flat { color: var(--ok-text); text-transform: none; letter-spacing: 0; background-color: transparent; }
.btn-flat:hover { background-color: rgba(0, 0, 0, 0.04); }
/* File field Browse button (Materialize wraps .btn inside .file-field) */
.file-field .btn { background-color: #1f2430; color: #fff; }
.file-field .btn:hover { background-color: #2d3445; }

/* ---------- Checkboxes / radios: retire Materialize teal ---------- */
/* Outline-style checkbox: the check itself is the colored border */
[type="checkbox"]:not(.filled-in):checked + span:not(.lever):before {
  border-right: 2px solid var(--ok-primary) !important;
  border-bottom: 2px solid var(--ok-primary) !important;
}
[type="checkbox"]:indeterminate + span:not(.lever):before {
  border-right: 2px solid var(--ok-primary) !important;
}
/* Filled-in checkbox: square is colored, check stays white */
[type="checkbox"].filled-in:checked + span:not(.lever):after {
  border: 2px solid var(--ok-primary) !important;
  background-color: var(--ok-primary) !important;
}
[type="checkbox"].filled-in:checked + span:not(.lever):before {
  border-right: 2px solid #fff !important;
  border-bottom: 2px solid #fff !important;
}
[type="checkbox"].filled-in.tabbed:checked:focus + span:not(.lever):after {
  background-color: var(--ok-primary) !important;
  border-color: var(--ok-primary) !important;
}
[type="radio"]:checked + span:after,
[type="radio"].with-gap:checked + span:before,
[type="radio"].with-gap:checked + span:after {
  border-color: var(--ok-primary) !important;
}
[type="radio"]:checked + span:after,
[type="radio"].with-gap:checked + span:after {
  background-color: var(--ok-primary) !important;
}

/* ---------- Materialize text/background color helpers retargeted ---------- */
.green-text, .light-green-text, .teal-text {
  color: var(--ok-primary) !important;
}
.green, .light-green, .teal {
  background-color: var(--ok-primary) !important;
}

/* ---------- Collection items: replace teal links + active row ---------- */
.collection a.collection-item:not(.leftbar-collection-item):not(.leftbar-item) {
  color: var(--ok-text) !important;
  font-weight: 500;
}
.collection a.collection-item:not(.leftbar-collection-item):not(.leftbar-item):hover {
  color: var(--ok-primary) !important;
}
.collection .collection-item.active:not(.leftbar-collection-item):not(.leftbar-item) {
  background-color: var(--ok-primary) !important;
  color: #fff !important;
}

/* Legacy dark left rail (data_entry.html etc.):keep text readable on dark bg */
.leftbar-collection-item,
a.leftbar-collection-item {
  color: var(--ok-sidebar-text) !important;
  font-weight: 500;
}
.leftbar-collection-item:hover,
a.leftbar-collection-item:hover {
  color: #fff !important;
  background-color: var(--ok-sidebar-bg-hover) !important;
}
.leftbar-item.active,
.leftbar-collection-item.active {
  background-color: var(--ok-primary) !important;
  color: #fff !important;
}

/* ---------- Tables ---------- */
#indexbody table {
  font-size: var(--ok-fs-sm);
  border-collapse: separate;
  border-spacing: 0;
  background: var(--ok-surface);
}
#indexbody table th {
  font-weight: 600;
  color: var(--ok-text-muted);
  text-transform: none;
  border-bottom: 1px solid var(--ok-border-strong);
  padding: var(--ok-s2) var(--ok-s3);
  text-align: left;
}
#indexbody table td {
  padding: var(--ok-s2) var(--ok-s3);
  border-bottom: 1px solid var(--ok-border);
}
#indexbody table.striped > tbody > tr:nth-child(odd) { background: var(--ok-surface-2); }
#indexbody table.highlight > tbody > tr:hover { background: #eef1f8; }

/* ---------- Forms ---------- */
.input-field input:not([type]),
.input-field input[type=text],
.input-field input[type=number],
.input-field input[type=email],
.input-field input[type=password],
.input-field input[type=date],
.input-field textarea.materialize-textarea {
  border-bottom: 1px solid var(--ok-border);
  height: 36px;
  font-size: var(--ok-fs);
}
.input-field input:focus:not([readonly]) {
  border-bottom: 2px solid var(--ok-primary) !important;
  box-shadow: 0 1px 0 0 var(--ok-primary) !important;
}
.input-field label { color: var(--ok-text-muted); font-size: var(--ok-fs); }
.input-field label.active { color: var(--ok-primary); }
.select-wrapper input.select-dropdown { font-size: var(--ok-fs); height: 36px; }

/* Select / dropdown items -retire Materialize teal */
.dropdown-content li > a,
.dropdown-content li > span {
  color: var(--ok-text) !important;
  font-size: var(--ok-fs-md);
  font-weight: 500;
}
.dropdown-content li:hover,
.dropdown-content li.active,
.dropdown-content li.selected {
  background-color: rgba(245, 123, 32, 0.08) !important;
}
.dropdown-content li:hover > a,
.dropdown-content li:hover > span,
.dropdown-content li.active > a,
.dropdown-content li.active > span,
.dropdown-content li.selected > a,
.dropdown-content li.selected > span {
  color: var(--ok-primary) !important;
}

/* ---------- Shell: sidebar + topbar ---------- */
.ok-shell { display: flex; min-height: 100vh; }

.ok-sidebar {
  width: var(--ok-sb-w);
  background: var(--ok-sidebar-bg);
  color: var(--ok-sidebar-text);
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  z-index: 100;
  font-size: var(--ok-fs);
}
.ok-sidebar__brand {
    display: flex;
    align-items: center;
    gap: var(--ok-s2);
    height: 52px;
    padding: 0 var(--ok-s4);
    border-bottom: 1px solid #000;
    flex-shrink: 0;
    justify-content: space-around;
}
.ok-sidebar__brand img {
    height: 54px;
    width: auto;
    margin-top: 16px;
}
.ok-sidebar__scroll {
  flex: 1;
  overflow-y: auto;
  padding: var(--ok-s2) 0 var(--ok-s4);
}
.ok-sidebar__scroll::-webkit-scrollbar { width: 8px; }
.ok-sidebar__scroll::-webkit-scrollbar-thumb {
  background: var( --ok-primary-hover);
  border-radius: 4px;
}
.ok-sidebar__group { padding: var(--ok-s3) 0 var(--ok-s1); }
.ok-sidebar__group-label {
  color: #f57b20;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.08em;
  font-weight: 700;
  padding: 0 var(--ok-s4) var(--ok-s1);
}



/* Collapsible group label (button) */
.ok-sidebar__group--collapsible > .ok-sidebar__group-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
}
.ok-sidebar__group--collapsible > .ok-sidebar__group-label:hover {
  color: var(--ok-sidebar-text);
}
.ok-sidebar__group-chevron {
  font-size: 16px !important;
  color: var(--ok-sidebar-heading);
  transition: transform .15s ease;
}
.ok-sidebar__group--collapsible.is-collapsed .ok-sidebar__group-chevron {
  transform: rotate(-90deg);
}
.ok-sidebar__group--collapsible.is-collapsed .ok-sidebar__group-items {
  display: none;
}
.ok-sidebar__item {
  display: flex;
  align-items: center;
  gap: var(--ok-s3);
  padding: 6px var(--ok-s3);
  margin: 1px var(--ok-s2);
  border-radius: var(--ok-r-sm);
  color: var(--ok-sidebar-text);
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  font-size: var(--ok-fs);
}
.ok-sidebar__item i.material-icons {
  font-size: 18px;
  color: var(--ok-sidebar-text-muted);
}
.ok-sidebar__item:hover {
  background: var(--ok-sidebar-bg-hover);
  color: #fff;
}
.ok-sidebar__item:hover i.material-icons { color: var(--ok-sidebar-text); }
.ok-sidebar__item.is-active {
  background: var(--ok-sidebar-active);
  color: #fff;
}
.ok-sidebar__item.is-active i.material-icons { color: var(--ok-primary); }
.ok-sidebar__footer {
  border-top: 1px solid #000;
  padding: var(--ok-s2) var(--ok-s3);
  color: var(--ok-sidebar-text-muted);
  font-size: var(--ok-fs-xs);
  flex-shrink: 0;
}

/* Role-hidden sidebar items collapse entirely (not faded) */
.ok-sidebar__item.transparent,
.ok-sidebar__group.transparent { display: none !important; }

.ok-main {
  margin-left: var(--ok-sb-w);
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.ok-topbar {
  height: var(--ok-header-h);
  background: var(--ok-surface);
  border-bottom: 1px solid var(--ok-border);
  display: flex;
  align-items: center;
  padding: 0 var(--ok-s4);
  gap: var(--ok-s3);
  position: sticky;
  top: 0;
  z-index: 50;
}
.ok-topbar__crumbs {
  font-size: var(--ok-fs-sm);
  color: var(--ok-text-muted);
  font-weight: 500;
}
.ok-topbar__crumbs .ok-crumb-sep { margin: 0 var(--ok-s1); color: var(--ok-text-subtle); }
.ok-topbar__crumbs .ok-crumb-current { color: var(--ok-text); }
.ok-topbar__spacer { flex: 1; }
.ok-topbar .btn-flat {
  height: 32px;
  line-height: 32px;
  padding: 0 var(--ok-s3);
  font-size: var(--ok-fs-sm);
}
.ok-mobile-toggle { display: none; background: transparent; border: 0; cursor: pointer; padding: 0 var(--ok-s2); }
.ok-mobile-toggle i.material-icons { font-size: 22px; color: var(--ok-text); }

#indexbody {
  padding: var(--ok-s4);
  flex: 1;
  margin: 0;
}

/* Section header macro */
.ok-section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--ok-s3);
  padding: var(--ok-s3) 0 var(--ok-s2);
  border-bottom: 1px solid var(--ok-border);
  margin-bottom: var(--ok-s3);
}
.ok-section-header h2, .ok-section-header h3 { margin: 0; }
.ok-section-header__subtitle {
  color: var(--ok-text-muted);
  font-size: var(--ok-fs-sm);
  margin-top: 2px;
}
.ok-page-header {
  margin: 0 0 var(--ok-s4);
}
.ok-page-header h1 { margin: 0; font-size: var(--ok-fs-xl); }
.ok-page-header__crumbs {
  font-size: var(--ok-fs-sm);
  color: var(--ok-text-muted);
  margin-bottom: var(--ok-s1);
}

@media (max-width: 992px) {
  .ok-sidebar {
    transform: translateX(-100%);
    transition: transform .18s ease;
  }
  .ok-sidebar.is-open { transform: translateX(0); box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.4); }
  .ok-main { margin-left: 0; }
  .ok-mobile-toggle { display: inline-flex; align-items: center; }
}

/* ---------- Legacy overrides still in effect below ---------- */

.photo_wait{
  display: none;

    margin-top: 36px;
    text-align: center;
}
.photo_wait_gif{

  width: 100px;

}
canvas{
  margin: 0 auto;
  }
.observer_overflow{
  height: 85%;
  overflow: auto;
}

.transect_overflow{
  height: 90%;
  overflow: auto;
}
.site_overflow{
  height: 25%;
  overflow: auto;
}
.delete_photo{
  background-color: #d03333;
}
div.col.s2.leftbar, div.col.s10.content {
  min-height: 100vh; /* use "vh" instead of % */
}
.graynav{
  background-color: #efefef;

}

.tlf-td{
  border-style: solid;
  border-width: thin;
  border-color: #e0e0e0;
}

#toast-container {
  min-width: 10%;
  top: 50%;
  right: 50%;
  transform: translateX(50%) translateY(50%);
}

.margin-left-right-10 {
  margin-left: 10px;
  margin-right: 10px;
}
.settings_button{
  margin-top: 16px;
    text-align: center;
}
.margin-left-right-20 {
  margin-left: 20px;
  margin-right: 20px;
}

.margin-top-100px {
  margin-top: 100px;
}

.margin-top-20 {
  margin-top: 20%;
}
.margin-top-15{
  margin-top: 15%;
}
.oktedi-logo {
  width: 169px;
  margin-top: 3px;
}
.event-card{
  margin-top: 0;
}
.sample-event{
  cursor: pointer;
}
.events {
    height: 79vh;
    text-align: center;
  
}

.leftbar{
  background-color: #212228;
}

.leftbar-collection {
  border: 0px !important;
  background-color: #212228 !important;
}
.leftbar-collection-item{
  border-bottom: 0px !important;
  background-color: #212228 !important;
  cursor: pointer;
}


.leftbar-collection-item:hover{
  border-bottom: 0px !important;
  background-color: #4e5a9e !important;
}

.leftbar-item.active{
  border-bottom: 0px !important;
  background-color: #4e5a9e !important;
}
.error{
	display: none;
	margin-left: 10px;
}		

.show_red{
color:red !important;
}

.error_show{
	color: red;
	margin-left: 10px;
}

input.invalid, textarea.invalid{
	border: 2px solid red;
}

input.valid, textarea.valid{
	border: 2px solid green;
}

.table-card{
  border-style: solid;
  border-width: 1px;
}

.table-card-data{
  border-style: dotted;
  border-width: 1px;
}

.material-tooltip > .backdrop{
  background-color: #4e5a9e !important;
}

.table-text{
  color: black;
}

.ssa-tool{
  max-width: 500px;
  /* text-align: left; */
}

.ssa-tool-heading{
  text-align: center;
}

.transparent{
  display: none;
}

.edit_rehab{
  position: absolute;
  bottom: -16px;
  display: block;
  margin-left: auto;
  margin-right: auto;
  width: 24%;
}

#multi-select{

  width: 50%;
  display: block;
  margin-left: auto;
  margin-right: auto;
}
.rehab-display{
  height: 88%;
  border-radius: 13px;
  border-style: dashed;
  border-color: #adadad6b;
  font-family: monospace;
  color: #514d4d;
  display: none;
  text-align: left;
  font-size: medium;
}
.sample-event-id{
  margin: 15px;
  font-size: x-large;
  color: #797979;
  min-height: 82px;
}

.sample-id-warning{
  color: red;
  font-size: small;
}

.preloader-background {
	display: flex;
	align-items: center;
	justify-content: center;
	background-color: #eee;
	
	position: fixed;
	z-index: 100;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;	
}

.modal-wide{
  width: 93%;
}

.button-green{
  background-color:#4CAF50;
  color: rgb(255, 255, 255);
}


.button-red{
  background-color:#973f3f;
  color: rgb(255, 255, 255);
}

.overlay {
  display: block;
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  background: rgb(255 255 255 / 89%);
  z-index: 99;
  border-radius: 10px;
}


.edit_planting_block{
  overflow: auto;
}

.field-groupings{
  position: relative;
  /* border-style: solid; */
  border-width: thin;
  /* border-color: gainsboro; */
  border-radius: 10px;
  margin-top: 37px;
}

.map {
  height: 400px;
  width: 100%;
}

.image-resize{
  max-width: 100%;
  height: auto;
  object-fit: cover;}

.photo_row{
  border-style: solid;
  border-color: #f57b20;
  border-width: thin;
}
/* .card .card-content {
  padding: 24px;
  border-radius: 0 0 2px 2px;
  height: 125px;
}


@media screen and (max-width: 1300px) {
  .card-img {
    visibility: hidden;

    display: none;
  }
} */
/* legacy .card .card-content override removed -handled by design system */

.spp_subtext{
  color:black
}

.card_title_tables{
  min-height: 40px;
}

.ss-content .ss-list {
  max-height: 700 !important;

}

.no_bottom{

    margin-bottom: 0rem !important;
}

.lds-spinner {
  color: official;
  display: inline-block;
  position: relative;
  width: 80px;
  height: 80px;
}
.lds-spinner div {
  transform-origin: 40px 40px;
  animation: lds-spinner 1.2s linear infinite;
}
.lds-spinner div:after {
  content: " ";
  display: block;
  position: absolute;
  top: 3px;
  left: 37px;
  width: 6px;
  height: 18px;
  border-radius: 20%;
  background: #f58229;
}
.lds-spinner div:nth-child(1) {
  transform: rotate(0deg);
  animation-delay: -1.1s;
}
.lds-spinner div:nth-child(2) {
  transform: rotate(30deg);
  animation-delay: -1s;
}
.lds-spinner div:nth-child(3) {
  transform: rotate(60deg);
  animation-delay: -0.9s;
}
.lds-spinner div:nth-child(4) {
  transform: rotate(90deg);
  animation-delay: -0.8s;
}
.lds-spinner div:nth-child(5) {
  transform: rotate(120deg);
  animation-delay: -0.7s;
}
.lds-spinner div:nth-child(6) {
  transform: rotate(150deg);
  animation-delay: -0.6s;
}
.lds-spinner div:nth-child(7) {
  transform: rotate(180deg);
  animation-delay: -0.5s;
}
.lds-spinner div:nth-child(8) {
  transform: rotate(210deg);
  animation-delay: -0.4s;
}
.lds-spinner div:nth-child(9) {
  transform: rotate(240deg);
  animation-delay: -0.3s;
}
.lds-spinner div:nth-child(10) {
  transform: rotate(270deg);
  animation-delay: -0.2s;
}
.lds-spinner div:nth-child(11) {
  transform: rotate(300deg);
  animation-delay: -0.1s;
}
.lds-spinner div:nth-child(12) {
  transform: rotate(330deg);
  animation-delay: 0s;
}
@keyframes lds-spinner {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}


.card-text {
  min-height: 52px;
}



@media only screen and (max-width: 1146px) {
  .sublabel {
      display: none;
  }
}

.alias_modal{
  top: 10%;
  height: 70%;
}

.alias_modal_footer{

  bottom: 53px;
  position: absolute;
}

.delete-alias-button-outer{
  padding-top: 17px !important;
}

.delete-alias-button{
  background-color: #db6d6d;
}

.add-alias-button-right{
  margin-right: 12px;
}

.seeding_qc_row{
  margin-top: 10px;
}


.seeding_qc_div_inner{
  background-color: #fa7c33;
  padding: 10px;
  border-radius: 10px;
  font-family: sans-serif;
  font-size: 14px;
  color: white;
  font-weight: 600;
  cursor: pointer;
}

.icon_40{
  padding-top: 4px !important;
}

.seed_qaqc_field{
  /* width removed: was forcing 185px on every cell incl. headers, which
     stretched detail tables off-screen. Width is now governed by the
     .ok-qc-detail-table wrapper below. */
}


.qc_edit_button,
.qc_save_button,
.qc_cancel_button,
.qc_delete_button {
  border: 1px solid var(--ok-border-strong);
  background: var(--ok-surface);
  color: var(--ok-text);
  font-size: var(--ok-fs-xs);
  font-weight: 500;
  padding: 4px 10px;
  border-radius: var(--ok-r-sm);
  cursor: pointer;
  line-height: 18px;
  margin: 0 2px;
}
.qc_edit_button:hover,
.qc_save_button:hover {
  background: var(--ok-surface-2);
  border-color: var(--ok-primary);
  color: var(--ok-primary);
}
.qc_delete_button { color: var(--ok-danger); border-color: #f3a5a5; }
.qc_delete_button:hover { background: #fde7e7; color: #9a2222; border-color: #c23b3b; }
.qc_save_button { color: var(--ok-success); border-color: #a9d6b6; }
.qc_save_button:hover { background: #e6f4ea; color: #1e6b34; border-color: var(--ok-success); }

.water_quality_ingest_table_header{
  background-color: #fa7c33;
  text-align: center;
}

.water_quality_ingest_table_cell{
  border-color: #afafaf;
  border-style: solid;
  border-width: 1px;
  text-align: center;
}


.qc_header{
  border-style: solid;
  border-width: 1px;
  border-color: #a1a1a1;
}

.water_quality_ingest_table_row{
  font-size: 12px;
}

.floating_save_button{
  position: fixed;
  top: 5px;
  right: 137px;
}


.floating_accept_button{
  position: fixed;
  top: 5px;
  right: 62px;
}

.sticky_top{
  position: sticky;
  top: 0px;
}

.table-head{
  font-size: 12px;
  position: sticky;
  top: var(--ok-header-h);
}

.water_quality_ingest_table_row_exists{
  background-color: #ffdfcc;
  
 
}

.floating_legend{
left: 435px;
position: fixed;
bottom: 75px;
max-width: 332px;
}

.legend_span{
  font-size: 18px;
  /* line-height: 9px; */
  margin-left: 7px;
}

.legend_icon{
  vertical-align: sub;
    border-style: solid;
    border-color: #8f8f8f;
    border-width: 1px;
}

.water_quality_disabled{
  background-color:#cbcbcb !important;
  
}

.water_quality_editable_row{
  font-size: 12px;
}
/* ---------- QA/QC landing page ---------- */
.ok-qaqc-denied {
  background: var(--ok-surface);
  border: 1px solid var(--ok-border);
  border-radius: var(--ok-r);
  padding: var(--ok-s6);
  margin-top: var(--ok-s5);
  color: var(--ok-text-muted);
}
.ok-qaqc-subtitle {
  color: var(--ok-text-muted);
  margin: -8px 0 var(--ok-s5);
}
.ok-qaqc-kpis { margin-top: var(--ok-s3); }
.ok-qaqc-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--ok-s4);
  margin: var(--ok-s4) 0 var(--ok-s3);
  flex-wrap: wrap;
}
.ok-qaqc-toolbar__filter { display: flex; flex-direction: column; gap: 4px; }
.ok-qaqc-toolbar__label {
  font-size: var(--ok-fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ok-text-muted);
  font-weight: 600;
}
.ok-qaqc-select {
  height: 38px;
  border: 1px solid var(--ok-border-strong);
  border-radius: var(--ok-r-sm);
  padding: 0 var(--ok-s3);
  background: var(--ok-surface);
  min-width: 220px;
  font-size: var(--ok-fs-sm);
}
.ok-qaqc-refresh { height: 38px; }

/* Status pills */
.ok-status-pill {
  display: inline-block;
  padding: 2px 10px;
  font-size: var(--ok-fs-xs);
  font-weight: 600;
  border-radius: 999px;
  line-height: 18px;
  white-space: nowrap;
}
.ok-status-pill--pending  { background: #fff3df; color: #8a5a00; border: 1px solid #f6d290; }
.ok-status-pill--flagged  { background: #fde7e7; color: #9a2222; border: 1px solid #f3a5a5; }
.ok-status-pill--approved { background: #e6f4ea; color: #1e6b34; border: 1px solid #a9d6b6; }

/* Blocks table */
.ok-qaqc-blocks {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--ok-surface);
  border: 1px solid var(--ok-border);
  border-radius: var(--ok-r);
  overflow: hidden;
  font-size: var(--ok-fs-sm);
}
.ok-qaqc-blocks thead th {
  text-align: left;
  font-weight: 600;
  color: var(--ok-text-muted);
  background: var(--ok-surface-2);
  padding: var(--ok-s3) var(--ok-s4);
  border-bottom: 1px solid var(--ok-border);
  font-size: var(--ok-fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.ok-qaqc-blocks tbody td {
  padding: var(--ok-s3) var(--ok-s4);
  border-bottom: 1px solid var(--ok-border);
  vertical-align: middle;
}
.ok-qaqc-blocks tbody tr:last-child td { border-bottom: 0; }
.ok-qaqc-block-row { cursor: pointer; }
.ok-qaqc-block-row:hover td { background: var(--ok-surface-2); }
.ok-qaqc-block-row.is-expanded td { background: #f0f3f8; }
.ok-qaqc-blocks__chev { width: 36px; text-align: center; }
.ok-qaqc-blocks__name { font-weight: 600; color: var(--ok-text); }
.ok-qaqc-blocks__action { width: 140px; text-align: right; }
.ok-qaqc-chevron {
  transition: transform 0.15s ease;
  color: var(--ok-text-muted);
  vertical-align: middle;
}
.ok-qaqc-block-row.is-expanded .ok-qaqc-chevron { transform: rotate(90deg); }
.ok-qaqc-of { color: var(--ok-text-subtle); font-size: var(--ok-fs-xs); }

.ok-qaqc-review-btn,
.ok-qaqc-event-btn {
  border: 1px solid var(--ok-border-strong);
  border-radius: var(--ok-r-sm);
  padding: 4px 12px;
  background: var(--ok-surface);
  color: var(--ok-text);
  font-weight: 500;
  font-size: var(--ok-fs-xs);
  text-transform: none;
  height: auto;
  line-height: 22px;
}
.ok-qaqc-review-btn:hover,
.ok-qaqc-event-btn:hover {
  background: var(--ok-surface-2);
  border-color: var(--ok-primary);
  color: var(--ok-primary);
}

/* Nested events table */
.ok-qaqc-events-row td { background: #fafbfc; padding: 0 !important; }
.ok-qaqc-events-wrap { padding: var(--ok-s3) var(--ok-s4) var(--ok-s4); }
.ok-qaqc-events-header {
  font-weight: 600;
  color: var(--ok-text-muted);
  padding: var(--ok-s2) 0;
}
.ok-qaqc-events-empty {
  color: var(--ok-text-subtle);
  font-style: italic;
  margin: 0;
}
.ok-qaqc-events {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--ok-surface);
  border: 1px solid var(--ok-border);
  border-radius: var(--ok-r);
  font-size: var(--ok-fs-sm);
}
.ok-qaqc-events thead th {
  text-align: left;
  font-weight: 600;
  color: var(--ok-text-muted);
  background: var(--ok-surface-2);
  padding: var(--ok-s2) var(--ok-s3);
  border-bottom: 1px solid var(--ok-border);
  font-size: var(--ok-fs-xs);
  text-transform: uppercase;
}
.ok-qaqc-events tbody td {
  padding: var(--ok-s2) var(--ok-s3);
  border-bottom: 1px solid var(--ok-border);
}
.ok-qaqc-events tbody tr:last-child td { border-bottom: 0; }
.ok-qaqc-events__type { display: flex; align-items: center; gap: var(--ok-s2); }
.ok-qaqc-event-icon {
  display: inline-block; width: 10px; height: 10px; border-radius: 50%;
}
.ok-qaqc-event-icon--seeding { background: #ceb35c; }
.ok-qaqc-event-icon--palm    { background: #a4c969; }
.ok-qaqc-event-icon--fern    { background: #50701d; }

.ok-qaqc-flag-notes {
  color: var(--ok-text-muted);
  font-size: var(--ok-fs-xs);
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.ok-qaqc-flag-notes i { font-size: 14px; }

/* Pagination */
.ok-qaqc-pagination {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: var(--ok-s4);
  padding: var(--ok-s3) var(--ok-s4);
  background: var(--ok-surface);
  border: 1px solid var(--ok-border);
  border-radius: var(--ok-r);
  font-size: var(--ok-fs-sm);
  color: var(--ok-text-muted);
}
.ok-qaqc-pagination__controls { display: flex; gap: 4px; }
.ok-qaqc-page-btn {
  min-width: 32px; height: 32px; padding: 0 8px;
  border: 1px solid var(--ok-border-strong);
  border-radius: var(--ok-r-sm);
  background: var(--ok-surface);
  color: var(--ok-text);
  font-weight: 500;
  text-transform: none;
}
.ok-qaqc-page-btn:hover:not([disabled]) {
  background: var(--ok-surface-2);
  border-color: var(--ok-primary);
  color: var(--ok-primary);
}
.ok-qaqc-page-btn.is-active {
  background: var(--ok-primary);
  border-color: var(--ok-primary);
  color: #fff;
}
.ok-qaqc-page-btn[disabled] { opacity: 0.4; cursor: not-allowed; }

/* Empty state */
.ok-qaqc-empty {
  text-align: center;
  padding: var(--ok-s6) var(--ok-s4);
  background: var(--ok-surface);
  border: 1px dashed var(--ok-border-strong);
  border-radius: var(--ok-r);
  color: var(--ok-text-muted);
}
.ok-qaqc-empty i { font-size: 40px; color: var(--ok-success); }
.ok-qaqc-empty h4 { margin: var(--ok-s2) 0; color: var(--ok-text); }

/* Flag-for-Review form (in detail templates) */
.ok-qaqc-detail-actions { display: flex; gap: var(--ok-s3); align-items: flex-start; justify-content: center; flex-wrap: wrap; margin-top: var(--ok-s4); }
.ok-flag-event { display: inline-block; }
.ok-flag-toggle { color: var(--ok-danger); }
.ok-flag-panel {
  background: var(--ok-surface);
  border: 1px solid var(--ok-border);
  border-radius: var(--ok-r);
  padding: var(--ok-s4);
  margin-top: var(--ok-s3);
  text-align: left;
  max-width: 480px;
}
.ok-flag-panel label {
  display: block;
  font-weight: 600;
  margin-bottom: var(--ok-s2);
  color: var(--ok-text);
}
.ok-flag-notes {
  width: 100%;
  border: 1px solid var(--ok-border-strong);
  border-radius: var(--ok-r-sm);
  padding: var(--ok-s2);
  font-family: var(--ok-font);
  font-size: var(--ok-fs-sm);
  resize: vertical;
}
.ok-flag-actions {
  display: flex; justify-content: flex-end; gap: var(--ok-s2);
  margin-top: var(--ok-s3);
}
.ok-flag-submit { background: var(--ok-danger); }
.ok-flag-submit:hover { background: #a32c2c; }

/* ---------- QA/QC event detail pages (seed / palm / fern) ---------- */
.ok-qc-detail {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--ok-s4);
}
.ok-qc-detail__subtitle {
  color: var(--ok-text-muted);
  margin: -8px 0 var(--ok-s5);
}
.ok-qc-detail__table-wrap {
  background: var(--ok-surface);
  border: 1px solid var(--ok-border);
  border-radius: var(--ok-r);
  overflow: auto;
  max-height: 60vh;
  margin-bottom: var(--ok-s4);
}
.ok-qc-detail__table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: var(--ok-fs-sm);
}
.ok-qc-detail__table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--ok-surface-2);
  text-align: left;
  font-weight: 600;
  color: var(--ok-text-muted);
  font-size: var(--ok-fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: var(--ok-s2) var(--ok-s3);
  border-bottom: 1px solid var(--ok-border);
  white-space: nowrap;
}
.ok-qc-detail__table tbody td {
  padding: var(--ok-s2) var(--ok-s3);
  border-bottom: 1px solid var(--ok-border);
  vertical-align: middle;
}
.ok-qc-detail__table tbody tr:last-child td { border-bottom: 0; }
.ok-qc-detail__table tbody tr:hover td { background: var(--ok-surface-2); }
.ok-qc-detail__actions-col {
  text-align: right;
  white-space: nowrap;
  width: 1%;
}
/* A species column or free-text name from ArcGIS that matched nothing in spp.
   Before the 2026-07 work these were dropped silently on ingest; now the row is
   highlighted and the Accept button refuses until a reviewer resolves it. */
.ok-qc-detail__row--unmatched td { background: var(--ok-warn-bg, #fff8e1); }
.ok-unmatched {
  color: #b26a00;
  font-style: italic;
  text-decoration: underline dotted;
}
.ok-suggest {
  margin-left: var(--ok-s2);
  border: 1px solid var(--ok-border-strong);
  border-radius: var(--ok-r-sm);
  background: var(--ok-surface);
  padding: 1px 6px;
  font-size: var(--ok-fs-xs);
  cursor: pointer;
  white-space: nowrap;
}
.ok-suggest:hover { background: var(--ok-surface-2); }

/* ---------- QA/QC event-level panels (2026-07 event normalization) ----------
   The event used to be an attribute repeated on every species row; it is one
   object now, so it gets its own panel instead of N identical table columns. */
.ok-qc-event {
  background: var(--ok-surface);
  border: 1px solid var(--ok-border);
  border-radius: var(--ok-r);
  margin-bottom: var(--ok-s4);
  overflow: hidden;
}
.ok-qc-event__header {
  background: var(--ok-surface-2);
  border-bottom: 1px solid var(--ok-border);
  padding: var(--ok-s2) var(--ok-s3);
  font-weight: 600;
  font-size: var(--ok-fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ok-text-muted);
}
.ok-qc-event__hint {
  display: block;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
  margin-top: 2px;
}
.ok-qc-event__body {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: var(--ok-s3);
  padding: var(--ok-s3);
}
.ok-qc-event__static {
  padding: 6px 0;
  font-size: var(--ok-fs-sm);
  min-height: 1.6em;
}
.ok-field__hint {
  font-size: var(--ok-fs-xs);
  color: var(--ok-text-muted);
}
/* ---------- Edit Species search ---------- */
.ok-species-search {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: var(--ok-s2);
}
.ok-species-search__icon {
  position: absolute;
  left: var(--ok-s2);
  font-size: 18px;
  color: var(--ok-text-muted);
  pointer-events: none;
}
.ok-species-search__input {
  width: 100%;
  height: 36px;
  padding: 0 30px 0 32px;
  border: 1px solid var(--ok-border-strong);
  border-radius: var(--ok-r-sm);
  font-size: var(--ok-fs-sm);
  background: var(--ok-surface);
}
.ok-species-search__input:focus {
  outline: none;
  border-color: var(--ok-primary);
}
.ok-species-search__clear {
  position: absolute;
  right: var(--ok-s2);
  border: 0;
  background: none;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  color: var(--ok-text-muted);
}
.ok-species-search__clear:hover { color: var(--ok-text); }
.ok-species-listbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ok-s2);
  margin-bottom: var(--ok-s1);
}
.ok-species-count {
  font-size: var(--ok-fs-xs);
  color: var(--ok-text-muted);
}
.ok-species-add {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: var(--ok-fs-xs);
  color: var(--ok-accent);
  white-space: nowrap;
}
.ok-species-add i.material-icons { font-size: 16px; }
.ok-species-add:hover { color: var(--ok-primary); }
.ok-species-aliases {
  font-size: var(--ok-fs-xs);
  color: var(--ok-text-muted);
  font-style: italic;
}
.ok-species-empty {
  font-size: var(--ok-fs-sm);
  color: var(--ok-text-muted);
  padding: var(--ok-s3);
}

/* Species-mismatch summary on the QA/QC landing page. */
.ok-qaqc-species-alert {
  background: #fdecea;
  border: 1px solid #d93025;
  border-left-width: 4px;
  border-radius: var(--ok-r);
  padding: var(--ok-s3);
  margin-bottom: var(--ok-s4);
  font-size: var(--ok-fs-sm);
}
.ok-qaqc-species-alert__head { display: flex; gap: var(--ok-s3); align-items: flex-start; }
.ok-qaqc-species-alert__head > i { color: #d93025; flex: none; }
.ok-qaqc-species-alert__sub { color: var(--ok-text-muted); margin-top: 2px; }
.ok-qaqc-species-alert__table {
  width: 100%;
  margin: var(--ok-s3) 0;
  border-collapse: collapse;
  background: var(--ok-surface);
  border-radius: var(--ok-r-sm);
  overflow: hidden;
  display: block;
  overflow-x: auto;
}
.ok-qaqc-species-alert__table th,
.ok-qaqc-species-alert__table td {
  text-align: left;
  padding: 6px var(--ok-s3);
  border-bottom: 1px solid var(--ok-border);
  white-space: nowrap;
}
.ok-qaqc-species-alert__table thead th {
  font-size: var(--ok-fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ok-text-muted);
  background: var(--ok-surface-2);
}
.ok-qaqc-species-alert__table tbody tr:last-child td { border-bottom: 0; }
.ok-qaqc-species-alert__muted { color: var(--ok-text-muted); }
.ok-qaqc-species-alert__actions {
  display: flex;
  gap: var(--ok-s3);
  align-items: center;
  flex-wrap: wrap;
}
.ok-qaqc-species-alert__cta { background: #d93025; }
.ok-qaqc-species-alert__cta:hover { background: #a52318; }
.ok-qaqc-species-alert__hint { color: var(--ok-text-muted); flex: 1 1 320px; min-width: 0; }

/* Pre-flight checks panel at the top of the PE review page. */
.ok-qc-checks { margin-bottom: var(--ok-s4); display: grid; gap: var(--ok-s2); }
.ok-qc-check {
  display: flex;
  gap: var(--ok-s3);
  align-items: flex-start;
  border: 1px solid var(--ok-border);
  border-left-width: 4px;
  border-radius: var(--ok-r);
  padding: var(--ok-s3);
  font-size: var(--ok-fs-sm);
}
.ok-qc-check__icon { font-size: 20px; line-height: 1.3; flex: none; }
.ok-qc-check__text { min-width: 0; }
.ok-qc-check__detail { color: var(--ok-text-muted); margin-top: 2px; }
.ok-qc-check--danger {
  background: #fdecea;
  border-color: #d93025;
}
.ok-qc-check--danger .ok-qc-check__icon { color: #d93025; }
.ok-qc-check--warn {
  background: var(--ok-warn-bg, #fff8e1);
  border-color: var(--ok-warn, #f0ad4e);
}
.ok-qc-check--warn .ok-qc-check__icon { color: #b26a00; }
.ok-qc-check--ok {
  background: #e9f7ef;
  border-color: #1e8e3e;
}
.ok-qc-check--ok .ok-qc-check__icon { color: #1e8e3e; }

/* The amendment grid mirrors the layout of the paper datasheet. */
.ok-amendment-grid th[scope="row"] {
  text-align: left;
  font-weight: 600;
  white-space: nowrap;
  padding: var(--ok-s2) var(--ok-s3);
  border-bottom: 1px solid var(--ok-border);
}
.ok-amendment-grid__row--fertilizer th[scope="row"] { font-style: italic; }
.ok-amendment-grid__na { color: var(--ok-text-muted); }
.ok-amendment-grid__note {
  font-size: var(--ok-fs-xs);
  font-weight: 400;
  color: var(--ok-text-muted);
  border: 1px solid var(--ok-border);
  border-radius: var(--ok-r-sm);
  padding: 0 4px;
  margin-left: 4px;
}
.ok-qc-detail__table input[type="text"],
.ok-qc-detail__table input[type="number"],
.ok-qc-detail__table input[type="datetime-local"],
.ok-qc-detail__table select {
  border: 1px solid var(--ok-border-strong);
  border-radius: var(--ok-r-sm);
  padding: 4px 6px;
  font-size: var(--ok-fs-sm);
  min-width: 100px;
  max-width: 220px;
}

/* Make "Accept and Ingest" use the design system instead of legacy .add styles */
.ok-qc-detail-actions #accept,
.ok-qc-detail-actions button.add {
  background: var(--ok-success);
  color: #fff;
  border: 0;
  border-radius: var(--ok-r-sm);
  padding: 0 var(--ok-s4);
  height: 36px;
  font-weight: 600;
  cursor: pointer;
  text-transform: none;
}
.ok-qc-detail-actions #accept:hover,
.ok-qc-detail-actions button.add:hover {
  background: #2f7a42;
}

/* ---------- Modal (edit row) ---------- */
body.ok-modal-open { overflow: hidden; }
.ok-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ok-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 25, 35, 0.45);
}
.ok-modal__dialog {
  position: relative;
  background: var(--ok-surface);
  border-radius: var(--ok-r);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  width: min(900px, 92vw);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}
.ok-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--ok-s4) var(--ok-s5);
  border-bottom: 1px solid var(--ok-border);
}
.ok-modal__header h3 { margin: 0; font-size: var(--ok-fs-lg); }
.ok-modal__close {
  background: none; border: 0; font-size: 28px;
  line-height: 1; cursor: pointer; color: var(--ok-text-muted);
  padding: 0 4px;
}
.ok-modal__close:hover { color: var(--ok-text); }
.ok-modal__body {
  padding: var(--ok-s4) var(--ok-s5);
  overflow-y: auto;
  flex: 1 1 auto;
}
.ok-modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: var(--ok-s3);
  padding: var(--ok-s3) var(--ok-s5);
  border-top: 1px solid var(--ok-border);
  background: var(--ok-surface-2);
}
.ok-modal__save {
  background: var(--ok-success) !important;
  color: #fff !important;
}
.ok-modal__save:hover { background: #2f7a42 !important; }

/* Edit form sections */
.ok-edit-section {
  border: 1px solid var(--ok-border);
  border-radius: var(--ok-r);
  margin-bottom: var(--ok-s3);
  background: var(--ok-surface);
}
.ok-edit-section__header {
  padding: var(--ok-s2) var(--ok-s3);
  font-weight: 600;
  font-size: var(--ok-fs-sm);
  color: var(--ok-text);
  background: var(--ok-surface-2);
  border-bottom: 1px solid var(--ok-border);
  border-radius: var(--ok-r) var(--ok-r) 0 0;
}
.ok-edit-section__body {
  padding: var(--ok-s3);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--ok-s3);
}
.ok-edit-section[data-collapsible="true"] .ok-edit-section__header {
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 0;
  border-radius: var(--ok-r);
}
.ok-edit-section[data-collapsible="true"] .ok-edit-section__body { display: none; }
.ok-edit-section[data-collapsible="true"].is-open .ok-edit-section__header {
  border-bottom: 1px solid var(--ok-border);
  border-radius: var(--ok-r) var(--ok-r) 0 0;
}
.ok-edit-section[data-collapsible="true"].is-open .ok-edit-section__body {
  display: grid;
}
.ok-edit-section__chev {
  font-size: var(--ok-fs-md);
  color: var(--ok-text-muted);
  transition: transform 0.15s ease;
}
.ok-edit-section.is-open .ok-edit-section__chev { transform: rotate(90deg); }

/* Sub-groups inside a section (e.g. "Silt Sediment" inside "Soil Amendments") */
.ok-edit-subgroup {
  grid-column: 1 / -1;
  border-top: 1px dashed var(--ok-border);
  padding-top: var(--ok-s3);
  margin-top: var(--ok-s2);
}
.ok-edit-subgroup:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.ok-edit-subgroup__label {
  font-weight: 600;
  font-size: var(--ok-fs-xs);
  color: var(--ok-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: var(--ok-s2);
}
.ok-edit-subgroup__fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--ok-s3);
}

/* Field wrapper */
.ok-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ok-field__label {
  font-size: var(--ok-fs-xs);
  color: var(--ok-text-muted);
  font-weight: 600;
}
.ok-field input,
.ok-field select,
.ok-field textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--ok-border-strong);
  border-radius: var(--ok-r-sm);
  padding: 6px 8px;
  font-size: var(--ok-fs-sm);
  font-family: var(--ok-font);
  background: var(--ok-surface);
}
.ok-field textarea { min-height: 60px; resize: vertical; }
.ok-field input:focus,
.ok-field select:focus,
.ok-field textarea:focus {
  outline: none;
  border-color: var(--ok-primary);
}

/* The alias a species suggestion travelled through. Shown because the
   suggested name can share no text with the name the crew actually typed. */
.ok-suggest__via {
  color: var(--ok-text-muted);
  font-style: italic;
}

/* Fallback action on an unresolved review row that has no suggestion. */
.ok-suggest--new { text-decoration: none; color: var(--ok-accent); }

/* ---------- Duplicate side-by-side on the PE review page ---------- */
.ok-dupe {
  border: 1px solid #d93025;
  border-left-width: 4px;
  border-radius: var(--ok-r);
  background: var(--ok-surface);
  margin-bottom: var(--ok-s4);
  overflow: hidden;
}
.ok-dupe__header {
  background: #fdecea;
  border-bottom: 1px solid var(--ok-border);
  padding: var(--ok-s2) var(--ok-s3);
  font-weight: 600;
  font-size: var(--ok-fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #a52318;
}
.ok-dupe__case { padding: var(--ok-s3); border-bottom: 1px solid var(--ok-border); }
.ok-dupe__case:last-child { border-bottom: 0; }
.ok-dupe__summary { margin-bottom: var(--ok-s3); font-size: var(--ok-fs-sm); }
.ok-dupe__verdict { margin-top: 2px; }
.ok-dupe__muted { color: var(--ok-text-muted); font-weight: 400; }
.ok-dupe__badge {
  display: inline-block;
  font-size: var(--ok-fs-xs);
  border: 1px solid var(--ok-border-strong);
  border-radius: var(--ok-r-sm);
  padding: 0 5px;
  margin: 0 4px;
}
.ok-dupe__badge--exact { border-color: #d93025; color: #a52318; background: #fdecea; }
.ok-dupe__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--ok-s3);
}
.ok-dupe__col { min-width: 0; }
.ok-dupe__colhead {
  font-size: var(--ok-fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ok-text-muted);
  font-weight: 600;
  margin-bottom: var(--ok-s1);
}
.ok-dupe__table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--ok-fs-sm);
  display: block;
  overflow-x: auto;
  max-height: 340px;
  overflow-y: auto;
}
.ok-dupe__table th, .ok-dupe__table td {
  text-align: left;
  padding: 3px var(--ok-s2);
  border-bottom: 1px solid var(--ok-border);
  vertical-align: top;
}
.ok-dupe__table thead th {
  position: sticky; top: 0;
  background: var(--ok-surface-2);
  font-size: var(--ok-fs-xs);
  color: var(--ok-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.ok-dupe__table tbody th { font-weight: 500; white-space: nowrap; }
.ok-dupe__row--fill td { background: #e9f7ef; }
.ok-dupe__row--conflict td, .ok-dupe__row--differs td { background: var(--ok-warn-bg, #fff8e1); }
.ok-dupe__row--agol_only td, .ok-dupe__row--db_only td { background: var(--ok-surface-2); }
.ok-dupe__tag {
  font-size: var(--ok-fs-xs);
  color: var(--ok-text-muted);
  border: 1px solid var(--ok-border);
  border-radius: var(--ok-r-sm);
  padding: 0 4px;
  white-space: nowrap;
}
.ok-dupe__tag--fill { color: #1e8e3e; border-color: #1e8e3e; }
.ok-dupe__tag--conflict { color: #b26a00; border-color: var(--ok-warn, #f0ad4e); }
.ok-dupe__actions {
  display: flex;
  align-items: center;
  gap: var(--ok-s3);
  flex-wrap: wrap;
  margin-top: var(--ok-s3);
  padding-top: var(--ok-s3);
  border-top: 1px solid var(--ok-border);
}
.ok-dupe__actions .ok-dupe__muted { flex: 1 1 300px; font-size: var(--ok-fs-xs); }
.ok-dupe__link-fill { background: #1e8e3e; }
.ok-dupe__link-fill:hover { background: #17702f; }
.ok-dupe__link-fill[disabled] { background: var(--ok-border-strong); cursor: not-allowed; }

/* Duplicate indicators on the QA/QC landing page. */
.ok-qaqc-dupe-note {
  display: flex;
  gap: var(--ok-s3);
  align-items: flex-start;
  background: #fdecea;
  border: 1px solid #d93025;
  border-left-width: 4px;
  border-radius: var(--ok-r);
  padding: var(--ok-s3);
  margin-bottom: var(--ok-s4);
  font-size: var(--ok-fs-sm);
}
.ok-qaqc-dupe-note > i { color: #d93025; flex: none; }
.ok-qaqc-dupe-note__sub { color: var(--ok-text-muted); margin-top: 2px; }
.ok-dupe-badge {
  display: inline-block;
  font-size: var(--ok-fs-xs);
  border-radius: var(--ok-r-sm);
  padding: 1px 6px;
  border: 1px solid;
  white-space: nowrap;
}
.ok-dupe-badge--exact {
  color: #a52318;
  border-color: #d93025;
  background: #fdecea;
}
.ok-dupe-badge--partial {
  color: #b26a00;
  border-color: var(--ok-warn, #f0ad4e);
  background: var(--ok-warn-bg, #fff8e1);
}
td .ok-dupe-badge { margin-top: 4px; }
