:root {
  --bg: #f6f8fb;
  --panel: #ffffff;
  --ink: #17201b;
  --muted: #637168;
  --line: #d9dfd7;
  --accent: #26745b;
  --accent-dark: #18523f;
  --blue: #1f6fe5;
  --blue-dark: #0b3b83;
  --navy: #071421;
  --navy-soft: #0d2032;
  --steel: #51616b;
  --sky: #d8e5ea;
  --gold: #c5963a;
  --warn: #b36822;
  --danger: #a33a3a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

.topbar {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 24px;
  background: #18231e;
  color: #fff;
}

.app-frame {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  background: var(--bg);
  transition: grid-template-columns 180ms ease;
}

.app-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 22px;
  background:
    linear-gradient(180deg, rgba(8, 22, 36, 0.98), rgba(5, 16, 28, 0.98)),
    radial-gradient(circle at top left, rgba(31, 111, 229, 0.18), transparent 38%);
  color: #f7fbff;
  padding: 22px 18px;
  transition: padding 180ms ease;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: start;
  gap: 10px;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  font-size: 24px;
  font-weight: 800;
  text-decoration: none;
  min-width: 0;
}

.sidebar-brand em {
  color: #3b8bff;
  font-style: normal;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 12px;
  letter-spacing: 0;
  flex: 0 0 auto;
}

.sidebar-toggle-mark {
  cursor: pointer;
}

.sidebar-toggle-mark::after {
  content: "";
  width: 7px;
  height: 7px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  margin-left: 2px;
  transform: rotate(45deg);
}

.brand-label,
.nav-label {
  overflow: hidden;
  white-space: nowrap;
  transition:
    opacity 160ms ease,
    width 160ms ease;
}

.app-frame.sidebar-collapsed {
  grid-template-columns: 88px minmax(0, 1fr);
}

.app-frame.sidebar-collapsed .app-sidebar {
  padding: 18px 12px;
}

.app-frame.sidebar-collapsed .brand-label,
.app-frame.sidebar-collapsed .nav-label,
.app-frame.sidebar-collapsed .sidebar-project-card,
.app-frame.sidebar-collapsed .sidebar-user div {
  display: none;
}

.app-frame.sidebar-collapsed .sidebar-brand,
.app-frame.sidebar-collapsed .nav-item,
.app-frame.sidebar-collapsed .sidebar-user {
  justify-content: center;
}

.app-frame.sidebar-collapsed .nav-item {
  padding: 0;
}

.app-frame.sidebar-collapsed .sidebar-toggle-mark::after {
  transform: rotate(225deg);
}

.sidebar-nav {
  display: grid;
  gap: 7px;
}

.nav-item {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 8px;
  color: #d8e4ef;
  font-weight: 700;
  text-decoration: none;
  padding: 0 12px;
}

.nav-item:hover,
.nav-item.active {
  background: linear-gradient(135deg, #1575ff, #075bd5);
  color: #fff;
}

.nav-icon {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 15px;
  font-weight: 800;
}

.sidebar-project-card {
  margin-top: auto;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.sidebar-project-card > div:first-child {
  display: grid;
  gap: 5px;
  padding: 14px;
}

.sidebar-project-card strong {
  font-size: 14px;
}

.sidebar-project-card span {
  color: #c7d5df;
  font-size: 13px;
}

.project-landscape {
  position: relative;
  height: 128px;
  background:
    linear-gradient(180deg, rgba(210, 232, 247, 0.35) 0 36%, transparent 36%),
    linear-gradient(135deg, transparent 0 34%, #385469 34% 48%, transparent 48%),
    linear-gradient(45deg, transparent 0 42%, #566d7a 42% 60%, transparent 60%),
    linear-gradient(180deg, #8fb0bd 0%, #314b42 58%, #173326 100%);
}

.project-landscape span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 42px;
  background: repeating-linear-gradient(90deg, #12291e 0 8px, #1f432f 8px 12px);
}

.online-dot {
  position: relative;
  color: #c7d5df;
  font-size: 13px;
  margin: 10px 14px 12px;
  padding-left: 18px;
}

.online-dot::before {
  content: "";
  position: absolute;
  left: 0;
  top: 5px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #34c96b;
}

.sidebar-user {
  display: flex;
  gap: 12px;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 16px;
}

.avatar {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #526071;
  color: #fff;
  font-weight: 800;
}

.sidebar-user strong {
  display: block;
  font-size: 14px;
}

.app-main {
  min-width: 0;
}

.workspace-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid #e3e8ef;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  padding: 0 28px;
}

.workspace-topbar strong {
  font-size: 20px;
}

.workspace-topbar span {
  color: #687789;
  margin-left: 12px;
}

.topbar-hole-select {
  max-width: 220px;
  min-height: 34px;
  border: 1px solid #d7e0ea;
  border-radius: 6px;
  background: #fff;
  color: #263340;
  font-weight: 700;
  padding: 5px 8px;
}

.workspace-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.context-chip {
  min-height: 48px;
  display: grid;
  align-content: center;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  padding: 6px 14px;
}

.context-chip strong {
  font-size: 14px;
}

.context-chip span {
  margin: 0;
  font-size: 12px;
}

.notification-pill {
  min-width: 72px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #0e63dc;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  padding: 0 12px;
}

.add-menu {
  position: relative;
}

.add-menu summary {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
  background: var(--blue);
  color: #fff;
  cursor: pointer;
  font-weight: 800;
  list-style: none;
  padding: 0 14px;
}

.add-menu summary::-webkit-details-marker {
  display: none;
}

.add-menu div {
  position: absolute;
  right: 0;
  top: 48px;
  min-width: 160px;
  display: grid;
  overflow: hidden;
  border: 1px solid #dbe3ec;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(8, 20, 35, 0.16);
}

.add-menu a {
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  padding: 10px 12px;
}

.add-menu a:hover {
  background: #f3f7fb;
}

.brand {
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 14px;
}

.user-label {
  color: #dce6df;
  font-size: 14px;
}

.link-button {
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  padding: 4px 0;
}

.sidebar-user-links {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-link {
  color: #aebcca;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.admin-link:hover {
  color: #fff;
}

.button,
.button:visited,
.data-form button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  padding: 9px 14px;
}

.button:hover,
.data-form button:hover {
  background: var(--accent-dark);
}

.button.secondary {
  background: #e7ece8;
  color: var(--ink);
}

.button.secondary:hover {
  background: #d7dfd9;
}

.button-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.page-shell {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0;
}

.app-main .page-shell {
  width: auto;
  max-width: 1500px;
  padding: 18px 24px 28px;
}

.auth-shell {
  width: min(1160px, calc(100% - 32px));
}

.back-link {
  color: #446156;
  display: inline-flex;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 14px;
  text-decoration: none;
}

.page-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 36px;
  line-height: 1.1;
}

h2 {
  font-size: 20px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.metric-card,
.empty-panel,
.auth-form {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.metric-card {
  min-height: 96px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.metric-card span {
  color: var(--muted);
  font-size: 14px;
}

.metric-card strong {
  font-size: 32px;
}

.summary-card {
  min-height: 86px;
  padding: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
}

.summary-card.muted-summary {
  background: #f2f4f6;
  color: #7b8792;
}

.summary-card.muted-summary span,
.summary-card.muted-summary strong,
.summary-card.muted-summary small {
  color: #8b96a1;
}

.depth-summary span {
  color: #0d63de;
}

.planned-summary span {
  color: #526071;
}

.target-summary span {
  color: #9a5a0b;
}

.eoh-summary span {
  color: #16543e;
}

.rate-summary span {
  color: #6d3bad;
}

.directional-summary span {
  color: #9a3412;
}

.summary-card span {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 700;
}

.summary-card strong {
  font-size: 18px;
  overflow-wrap: anywhere;
}

.eta-card small,
.rate-summary small,
.directional-summary small {
  font-weight: 400;
}

.depth-summary strong,
.planned-summary strong {
  font-size: 25px;
}

.depth-icon {
  position: relative;
  width: 12px;
  height: 18px;
  display: inline-block;
  flex: 0 0 auto;
}

.depth-icon::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 1px;
  bottom: 4px;
  border-left: 2px solid currentColor;
}

.depth-current-icon::after {
  content: "";
  position: absolute;
  left: 2px;
  bottom: 1px;
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}

.depth-planned-icon::after {
  content: "";
  position: absolute;
  left: 1px;
  right: 1px;
  bottom: 1px;
  border-bottom: 2px solid currentColor;
}

.empty-panel {
  padding: 20px;
}

.empty-panel p,
.empty-copy,
.help-text {
  color: var(--muted);
  margin-bottom: 0;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -8px 0 20px;
}

.project-meta span,
.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  background: #e6ece8;
  color: #24352d;
  font-size: 13px;
  font-weight: 700;
  padding: 4px 10px;
}

.status-drilling,
.status-preparing {
  background: #d8efe4;
  color: #16543e;
}

.status-undrilled,
.status-planned {
  background: #e9edf2;
  color: #3f4c59;
}

.status-completed {
  background: #dfe6e2;
  color: #17201b;
}

.status-suspended,
.status-stopped {
  background: #f5e4cc;
  color: #70410e;
}

.status-abandoned,
.status-cancelled {
  background: #f4d7d7;
  color: #7c2525;
}

.status-active,
.status-ready {
  background: #d8efe4;
  color: #16543e;
}

.status-standby,
.status-proposed,
.status-permitted {
  background: #e9edf2;
  color: #3f4c59;
}

.status-maintenance,
.status-building {
  background: #f5e4cc;
  color: #70410e;
}

.status-demobilized,
.status-reclaimed {
  background: #dfe6e2;
  color: #17201b;
}

.table-panel,
.data-form,
.record-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.table-panel {
  overflow-x: auto;
}

.panel-heading {
  padding: 16px;
  border-bottom: 1px solid var(--line);
  background: #c8dfd0;
}

.queue-section .panel-heading {
  background: #d8e6f4;
}

.completed-section .panel-heading {
  background: #e2e5e8;
}

.panel-heading h2 {
  margin-bottom: 0;
}

.panel-heading-split,
.collapsible-panel > summary.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}


.record-value-link {
  color: var(--blue);
  font-weight: 800;
  text-decoration: none;
}

.record-value-link:hover {
  text-decoration: underline;
}

.panel-action-link {
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.collapsible-panel > summary.panel-heading {
  cursor: pointer;
  list-style: none;
}

.collapsible-panel > summary.panel-heading::-webkit-details-marker {
  display: none;
}

.collapsible-panel:not([open]) > summary.panel-heading {
  border-bottom: 0;
}

.twistie {
  width: 9px;
  height: 9px;
  border-right: 2px solid #687789;
  border-bottom: 2px solid #687789;
  transform: rotate(45deg);
  transition: transform 140ms ease;
}

.collapsible-panel[open] .twistie {
  transform: rotate(225deg);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  text-align: left;
  border-bottom: 1px solid var(--line);
  padding: 11px 16px;
  vertical-align: middle;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.dashboard-table thead,
.dashboard-table thead tr,
.dashboard-table thead th {
  background: #f3f7fb;
}

.nowrap-measure {
  white-space: nowrap;
}

.recent-card .panel-heading {
  background: #e2e5e8;
}

.queued-drilling-card .panel-heading {
  background: #f6edcf;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  gap: 16px;
}

.dashboard-grid .table-panel:first-child {
  grid-row: span 2;
}

.empty-copy {
  padding: 16px;
}

.data-form {
  padding: 20px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.field-row {
  display: grid;
  gap: 6px;
}

.field-row.wide {
  grid-column: 1 / -1;
}

.field-row label {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.form-control {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 8px 10px;
}

textarea.form-control {
  resize: vertical;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 20px;
}

.hole-hero-record-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(390px, 0.55fr);
  gap: 16px;
  align-items: stretch;
  margin-bottom: 18px;
}

.hole-hero-record-grid .record-hero {
  min-height: 100%;
  margin-bottom: 0;
}

.record-hero {
  min-height: 260px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  align-items: stretch;
  margin-bottom: 18px;
  overflow: hidden;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.78)),
    repeating-linear-gradient(135deg, rgba(38, 116, 91, 0.08) 0 2px, transparent 2px 24px);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.photo-hero {
  position: relative;
  min-height: 360px;
  display: flex;
  align-items: end;
  isolation: isolate;
}

.photo-hero.hero-status-drilling {
  border: 5px solid #16a34a;
}

.photo-hero.hero-status-stopped {
  border: 5px solid #b4232a;
}

.photo-hero.hero-status-completed {
  border: 5px solid #5f6872;
}

.photo-hero.hero-status-preparing {
  border: 5px solid #d4a017;
}

.photo-hero.hero-status-cancelled {
  border: 5px dashed #5f6872;
}

.photo-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 58%;
  z-index: -2;
}

.photo-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 16, 28, 0.88), rgba(5, 16, 28, 0.42) 52%, rgba(5, 16, 28, 0.12)),
    linear-gradient(0deg, rgba(5, 16, 28, 0.72), transparent 46%);
  z-index: -1;
}

.photo-hero .record-hero-main {
  max-width: 780px;
  color: #fff;
}

.photo-hero .back-link,
.photo-hero .eyebrow,
.photo-hero .record-hero-main p:last-child {
  color: rgba(255, 255, 255, 0.86);
}

.photo-hero .status-pill {
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
}

.record-hero-main {
  padding: 24px;
  align-self: center;
}

.record-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.record-title-row h1 {
  font-size: 46px;
}

.record-hero-main p:last-child {
  color: var(--muted);
  font-size: 17px;
  margin-bottom: 0;
}

.drill-graphic {
  position: relative;
  min-height: 260px;
  background:
    linear-gradient(#d7e5e4 0 42%, #efe8d3 42% 100%);
  border-left: 1px solid var(--line);
  overflow: hidden;
}

.pad-line {
  position: absolute;
  left: 0;
  right: 0;
  top: 42%;
  border-top: 5px solid #6d5f48;
}

.drill-rig-shape {
  position: absolute;
  left: 48px;
  top: 36px;
  width: 140px;
  height: 94px;
  border-left: 12px solid var(--steel);
  border-bottom: 10px solid var(--steel);
  transform: skewX(-12deg);
}

.drill-rig-shape::before,
.drill-rig-shape::after {
  content: "";
  position: absolute;
  background: var(--steel);
}

.drill-rig-shape::before {
  width: 10px;
  height: 120px;
  left: 62px;
  top: -18px;
  transform: rotate(35deg);
}

.drill-rig-shape::after {
  width: 70px;
  height: 10px;
  left: 28px;
  top: 72px;
}

.drill-rig-shape span {
  position: absolute;
  left: -26px;
  bottom: -24px;
  width: 38px;
  height: 38px;
  border: 7px solid var(--steel);
  border-radius: 50%;
  background: #f9faf7;
  box-shadow: 104px 0 0 -7px #f9faf7, 104px 0 0 0 var(--steel);
}

.borehole-line {
  position: absolute;
  left: 214px;
  top: 42%;
  width: 8px;
  max-height: 54%;
  min-height: 20px;
  background: linear-gradient(var(--gold), #8f6422);
  border-radius: 0 0 999px 999px;
}

.depth-readout {
  position: absolute;
  right: 22px;
  bottom: 22px;
  min-width: 116px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.depth-readout strong {
  display: block;
  font-size: 28px;
}

.depth-readout span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.record-summary-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.eta-summary-grid small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.05;
}

.hole-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 16px;
  align-items: start;
  margin-bottom: 16px;
}

.hole-ops-layout {
  grid-template-columns: minmax(0, 1.45fr) minmax(340px, 0.75fr);
}

.updates-column,
.details-column {
  display: grid;
  gap: 16px;
  align-content: start;
}

.primary-update-panel {
  border-color: #c9d9ee;
  box-shadow: 0 14px 34px rgba(31, 111, 229, 0.08);
}

.primary-update-panel .panel-heading {
  padding: 13px 16px;
}

.record-panel {
  overflow: hidden;
}

.record-dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  margin: 0;
}

.record-dl div {
  background: #fff;
  padding: 14px 16px;
}

.record-dl dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.record-dl dd {
  margin: 5px 0 0;
  font-weight: 700;
}

.record-dl dd small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  margin-top: 3px;
}

.hero-record-panel {
  min-height: 360px;
  display: grid;
  grid-template-rows: auto 1fr;
}

.hero-record-dl {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  height: 100%;
}

.hero-record-dl div {
  display: grid;
  align-content: center;
  min-height: 44px;
  padding: 9px 14px;
}

.hero-record-dl dt {
  font-size: 11px;
}

.hero-record-dl dd {
  margin-top: 3px;
  overflow-wrap: anywhere;
}

.drill-order-readout strong,
.drill-order-readout small {
  display: block;
}

.drill-order-readout small {
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.drill-order-readout.next-order strong {
  color: #168a4a;
}

.note-block {
  border-top: 1px solid var(--line);
  padding: 16px;
}

.note-block h3 {
  font-size: 15px;
  margin: 0 0 8px;
}

.note-block p {
  color: #35433b;
  margin-bottom: 0;
}

.compact-form {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.compact-form button {
  width: 100%;
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.compact-update-form {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 12px;
  padding: 12px 14px 14px;
}

.update-action-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(142px, 0.42fr) 42px;
  gap: 10px;
  align-items: end;
}

.compact-update-form .field-row {
  gap: 4px;
}

.compact-update-form .field-row label {
  font-size: 12px;
}

.compact-update-form .form-control {
  min-height: 38px;
}

.compact-update-form textarea.form-control {
  min-height: 68px;
}

.compact-update-form .wide {
  grid-column: 1;
}

.attachment-field {
  grid-column: 1;
}

.attachment-field input[type="file"] {
  min-height: auto;
  padding: 8px;
}

.compact-update-form button {
  width: auto;
  min-width: 136px;
  grid-column: 2;
  grid-row: 2 / span 2;
  justify-self: end;
  align-self: stretch;
  min-height: 126px;
  padding: 0 18px;
}

.when-picker {
  position: relative;
  align-self: end;
}

.when-picker summary {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  list-style: none;
}

.when-picker summary::-webkit-details-marker {
  display: none;
}

.when-picker[open] summary {
  border-color: #9fbbe3;
  box-shadow: 0 0 0 3px rgba(31, 111, 229, 0.12);
}

.calendar-glyph {
  position: relative;
  width: 18px;
  height: 18px;
  border: 2px solid #506071;
  border-radius: 4px;
}

.calendar-glyph::before,
.calendar-glyph::after {
  content: "";
  position: absolute;
  left: 3px;
  right: 3px;
}

.calendar-glyph::before {
  top: 4px;
  border-top: 2px solid #506071;
}

.calendar-glyph::after {
  top: -5px;
  height: 5px;
  border-left: 2px solid #506071;
  border-right: 2px solid #506071;
}

.when-popover {
  position: absolute;
  right: 0;
  top: 44px;
  z-index: 6;
  width: 244px;
  border: 1px solid #dbe3ec;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(8, 20, 35, 0.16);
  padding: 12px;
}

.timeline-panel {
  margin-bottom: 24px;
}

.target-list {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 14px;
}

.target-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #e4ebf3;
  border-radius: 8px;
  background: #f8fbff;
  padding: 12px;
}

.target-list li.reached {
  background: #f1f8f3;
}

.target-list strong {
  display: block;
}

.target-list span,
.target-list small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.target-form {
  border-top: 1px solid var(--line);
}

.inline-add-panel {
  border-top: 1px solid var(--line);
}

.inline-add-panel summary {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--blue);
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
  list-style: none;
  padding: 0 14px;
}

.inline-add-panel summary::-webkit-details-marker {
  display: none;
}

.inline-add-panel summary span {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #e7f0ff;
}

.dtc-panel .panel-heading small {
  color: #2c4d3d;
  font-size: 12px;
  font-weight: 600;
}

.dtc-chart-wrap {
  padding: 12px 12px 4px;
}

.dtc-chart {
  width: 100%;
  min-height: 238px;
  display: block;
}

.dtc-plot-bg {
  fill: #fbfcfd;
  stroke: #dfe7ef;
}

.dtc-grid-line {
  stroke: #e7edf3;
  stroke-width: 1;
}

.dtc-axis,
.dtc-tick {
  stroke: #53616d;
  stroke-width: 1.4;
}

.dtc-today-line {
  stroke: #a7b2bd;
  stroke-dasharray: 4 4;
  stroke-width: 1;
}

.dtc-depth-line {
  stroke-width: 1.5;
  stroke-dasharray: 6 5;
}

.dtc-end-line {
  stroke: #35433b;
}

.dtc-target-line {
  stroke: #d98b8b;
}

.dtc-line {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.75;
}

.dtc-actual-line {
  stroke: #167a45;
}

.dtc-planned-line {
  stroke: #1f6fe5;
}

.dtc-actual-hit {
  fill: transparent;
  stroke: transparent;
  pointer-events: all;
}

.dtc-actual-point {
  fill: #167a45;
  stroke: #167a45;
  stroke-width: 1;
  pointer-events: none;
}

.dtc-point-hit:hover .dtc-actual-point {
  fill: #0f5b33;
  stroke: #0f5b33;
}


.dtc-tooltip {
  opacity: 0;
  pointer-events: none;
  transition: none;
}

.dtc-tooltip rect {
  fill: rgba(8, 20, 24, 0.92);
  stroke: rgba(255, 255, 255, 0.28);
  stroke-width: 0.7;
}

.dtc-tooltip text {
  fill: #fff;
  font-size: 10.8px;
  font-weight: 850;
}

.dtc-tooltip-note {
  fill: #dbe7ee;
  font-size: 10px;
  font-weight: 750;
}

.dtc-point-hit:hover .dtc-tooltip,
.dtc-point-hit:focus .dtc-tooltip {
  opacity: 1;
}

.dtc-y-label,
.dtc-x-label,
.dtc-axis-title,
.dtc-line-label {
  fill: #5d6a75;
  font-size: 10px;
  font-weight: 500;
}

.dtc-y-label {
  text-anchor: end;
  dominant-baseline: middle;
}

.dtc-x-label,
.dtc-axis-title {
  text-anchor: middle;
}

.dtc-line-label {
  text-anchor: start;
  dominant-baseline: central;
}

.dtc-end-label {
  fill: #27352f;
  font-weight: 600;
}

.dtc-depth-label {
  font-weight: 600;
}

.dtc-target-name {
  font-weight: 400;
}

.dtc-target-label {
  fill: #6f4b4b;
}

.dtc-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  padding: 10px 14px 12px;
}

.dtc-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dtc-legend i {
  width: 18px;
  height: 3px;
  border-radius: 999px;
}

.actual-key {
  background: #167a45;
}

.planned-key {
  background: #1f6fe5;
}

.image-source {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  margin: 0;
  padding: 14px 16px 0;
}

.image-form {
  padding-top: 12px;
}

.image-form input[type="file"],
.data-form input[type="file"] {
  min-height: auto;
  padding: 9px;
}

.edit-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
  gap: 16px;
  align-items: start;
}

.edit-side-panel {
  display: grid;
  gap: 16px;
}

.image-preview {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.image-preview img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
}

.image-preview p {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  margin: 0;
}


.mobile-filter-panel {
  margin-bottom: 12px;
}

.mobile-filter-panel > summary {
  display: none;
}

.filter-form {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) repeat(5, minmax(124px, 0.85fr)) auto;
  gap: 10px;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  margin-bottom: 12px;
  padding: 14px;
}

.filter-form button {
  min-height: 40px;
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-weight: 800;
  padding: 0 16px;
}

.sort-link {
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
}

.sort-link:hover {
  color: var(--blue);
}

.summary-strip {
  min-height: 48px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  border: 1px solid #dbe3ec;
  border-radius: 8px;
  background: #f8fbff;
  color: #51616b;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 14px;
  padding: 12px 14px;
}

.summary-strip strong {
  color: var(--ink);
}

.resource-stack {
  display: grid;
  gap: 14px;
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.resource-card {
  align-self: start;
}

.resource-photo-heading {
  position: relative;
  min-height: 198px;
  display: flex;
  align-items: end;
  background-size: cover;
  background-position: center;
  padding: 14px;
}

.photo-heading-action {
  position: absolute;
  right: 12px;
  top: 12px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--blue);
  font-size: 15px;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
}

.resource-photo-heading h2 {
  color: #fff;
  margin: 0 0 8px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.42);
}

.resource-photo-heading .status-pill {
  box-shadow: 0 7px 20px rgba(0, 0, 0, 0.28);
}

.pad-map-panel {
  margin-bottom: 14px;
}

.pad-map-surface {
  min-height: 360px;
}

.resource-dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  margin: 0;
}

.resource-dl div {
  background: #fff;
  padding: 12px 14px;
}

.resource-dl dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.resource-dl dd {
  margin: 4px 0 0;
  font-weight: 800;
}

.resource-note {
  color: #35433b;
  font-size: 13px;
  margin: 0;
  padding: 14px;
}

.list-panel .panel-heading small {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin-top: 4px;
}

.resource-table small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.resource-table th,
.resource-table td {
  padding: 8px 11px;
}

.resource-table .hole-id-link,
.recent-card tbody td:first-child a {
  white-space: nowrap;
}

.queue-actions form {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.queue-actions {
  display: grid;
  gap: 5px;
}

.rig-assign-form {
  display: grid;
  grid-template-columns: minmax(82px, 1fr) auto;
  align-items: center;
}

.rig-assign-form select {
  min-height: 30px;
  min-width: 0;
  border: 1px solid #dbe3ec;
  border-radius: 6px;
  background: #fff;
  color: #334155;
  font-size: 11px;
  font-weight: 800;
  padding: 0 6px;
}

.queue-actions button {
  min-width: 30px;
  min-height: 30px;
  border: 1px solid #dbe3ec;
  border-radius: 6px;
  background: #fff;
  color: #334155;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  padding: 0 8px;
}

.queue-actions .icon-button {
  padding: 0;
}

.queue-actions .danger {
  color: var(--danger);
}

.queue-actions .queue-last {
  min-width: 42px;
}

.hole-id-link {
  font-size: 15px;
  font-weight: 900;
  text-decoration: none;
}

.queue-actions button:hover {
  border-color: #a8bdd7;
  background: #f5f8fc;
}

.section-total {
  border-top: 1px solid var(--line);
  background: #f8faf9;
  color: #51616b;
  font-size: 13px;
  font-weight: 800;
  padding: 11px 16px;
}

.next-order-label {
  color: #168a4a;
}

.map-page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  gap: 16px;
}

.settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
  gap: 16px;
  align-items: start;
}

.settings-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.map-page-card {
  min-height: 780px;
}

.map-page-layout .map-page-card {
  display: flex;
  flex-direction: column;
}

.map-page-layout .map-page-card .map-surface-large {
  flex: 1;
  min-height: 720px;
}

.map-surface-large {
  min-height: 640px;
}

.map-toolbar {
  display: grid;
  grid-template-columns: auto minmax(180px, 260px);
  gap: 10px;
  align-items: center;
  border-bottom: 1px solid #e5ebf2;
  padding: 10px 14px;
}

.map-toolbar label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.stat-list {
  display: grid;
  gap: 8px;
  padding: 14px;
}

.stat-list div,
.stat-list button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.stat-list button,
.map-filter-list button,
.map-legend button {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  padding: 0;
}

.stat-list button {
  width: 100%;
}

.map-filter-list button,
.map-legend button {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-size: 13px;
  text-align: left;
}

.muted-filter {
  opacity: 0.38;
}

.compact-resource-list {
  display: grid;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 10px;
}

.compact-resource-list li {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: 6px;
  padding: 6px;
}

.compact-resource-list li:hover {
  background: #f7fafc;
}

.compact-resource-list a {
  font-weight: 800;
  text-decoration: none;
}

.compact-resource-list span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.delete-panel {
  max-width: 720px;
}

.delete-panel p {
  color: #2a362f;
  padding: 18px;
}

.delete-panel form {
  border-top: 1px solid var(--line);
  padding: 16px;
}

.danger-button {
  min-height: 40px;
  border: 0;
  border-radius: 6px;
  background: var(--danger);
  color: #fff;
  cursor: pointer;
  font-weight: 800;
  padding: 9px 14px;
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 12px 14px;
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 8px;
}

.timeline-item + .timeline-item {
  margin-top: 8px;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 20px;
  bottom: -9px;
  border-left: 2px solid var(--line);
}

.timeline-item:last-child::before {
  display: none;
}

.timeline-marker {
  width: 18px;
  height: 18px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 1px var(--line);
  z-index: 1;
  margin-top: 4px;
}

.event-depth .timeline-marker {
  background: var(--gold);
}

.event-status .timeline-marker {
  background: var(--accent-dark);
}

.event-delay .timeline-marker {
  background: var(--warn);
}

.status-marker-drilling {
  background: #16a34a;
}

.status-marker-stopped {
  background: #b4232a;
}

.status-marker-completed {
  background: #5f6872;
}

.status-marker-preparing {
  background: #d4a017;
}

.status-marker-cancelled {
  background: #5f6872;
  border-style: dashed;
}

.timeline-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 9px 11px;
}

.timeline-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 8px;
  font-size: 13px;
}

.timeline-line strong {
  font-size: 13px;
}

.timeline-line time {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.timeline-line span {
  min-height: 20px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #edf1ee;
  color: #41534a;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
}

.timeline-line span small {
  color: #34704b;
  font-size: 11px;
  font-weight: 800;
  margin-left: 5px;
}

.timeline-action {
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
}

.timeline-action.danger {
  color: var(--danger);
}

.timeline-action.icon-action {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: #edf5ff;
  font-size: 14px;
  line-height: 1;
}

.timeline-action.icon-action.danger {
  background: #fff0f0;
}

.timeline-card p {
  margin: 6px 0 0;
  color: #2a362f;
  font-size: 13px;
  line-height: 1.35;
}

.attachment-list {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.attachment-preview,
.attachment-file {
  border: 1px solid #dbe3ec;
  border-radius: 8px;
  background: #f8fbff;
  color: var(--ink);
  overflow: hidden;
  text-decoration: none;
}

.attachment-preview {
  display: grid;
  grid-template-columns: 124px minmax(0, 1fr);
  grid-template-rows: 1fr 1fr;
  align-items: center;
  width: 100%;
}

.attachment-preview img {
  width: 100%;
  height: 100%;
  grid-row: 1 / span 2;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #e9eff6;
}

.attachment-preview span,
.attachment-preview small {
  overflow-wrap: anywhere;
  padding: 0 10px;
}

.attachment-preview span,
.attachment-file strong {
  font-size: 12px;
  font-weight: 900;
}

.attachment-preview small,
.attachment-file small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.attachment-file {
  min-height: 46px;
  width: 100%;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  column-gap: 8px;
  padding: 7px 10px;
}

.attachment-file .file-icon {
  grid-row: span 2;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: #e7f0ff;
  color: var(--blue);
}

.dashboard-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.dashboard-card,
.dashboard-panel {
  background: var(--panel);
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(12, 29, 50, 0.06);
}

.dashboard-card {
  min-height: 74px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  padding: 12px;
}

.dashboard-card span {
  color: #667488;
  display: block;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  white-space: nowrap;
}

.dashboard-card strong {
  display: block;
  font-size: 22px;
  line-height: 1.1;
  margin-top: 4px;
  white-space: nowrap;
}

.dashboard-card small {
  color: #0b8c3b;
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-top: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 900;
}

.recent-card tbody td:first-child a,
.current-drilling-card tbody td:first-child a,
.queued-drilling-card tbody td:first-child a {
  font-size: 15px;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.hole-id-link,
.dashboard-table th:first-child,
.dashboard-table td:first-child {
  white-space: nowrap;
}

.activity-list a {
  color: var(--ink);
  text-decoration: none;
}

.activity-list a:hover {
  color: var(--blue);
}

.activity-content {
  min-width: 0;
}

.activity-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.activity-detail {
  color: var(--ink);
  display: block;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.35;
  margin-top: 3px;
  overflow-wrap: anywhere;
}

.metric-blue .metric-icon,
.quick-icon.blue {
  background: #dbeafe;
  color: #0d63de;
}

.metric-green .metric-icon,
.quick-icon.green {
  background: #d9f8e5;
  color: #11984a;
}

.metric-violet .metric-icon {
  background: #e5edff;
  color: #245fce;
}

.metric-orange .metric-icon,
.quick-icon.orange {
  background: #ffe9cf;
  color: #c76a0a;
}

.metric-purple .metric-icon,
.quick-icon.purple {
  background: #eedcff;
  color: #7d2bc0;
}

.dashboard-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(330px, 0.95fr);
  gap: 12px;
}

.dashboard-panel {
  overflow: hidden;
}

.dashboard-heading {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom-color: #e5ebf2;
}

.dashboard-heading h2 {
  font-size: 18px;
}

.dashboard-heading a {
  color: var(--blue);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.segmented-control {
  display: inline-flex;
  border: 1px solid #d9e2ee;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.segmented-control span,
.segmented-control button,
.soft-select {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  color: #29384a;
  font-size: 13px;
  font-weight: 700;
  padding: 0 16px;
}

.segmented-control button {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.segmented-control .active {
  background: #e7f0ff;
  color: var(--blue);
}

.soft-select {
  border: 1px solid #d9e2ee;
  border-radius: 8px;
  background: #fff;
}

.map-card,
.recent-card {
  grid-column: 1;
}

.current-drilling-card,
.queued-drilling-card {
  grid-column: 1 / -1;
}

.progress-card,
.activity-card {
  grid-column: 2;
}

.map-surface {
  position: relative;
  min-height: 430px;
  overflow: hidden;
  background:
    radial-gradient(circle at 22% 28%, rgba(240, 242, 196, 0.32) 0 2%, transparent 14%),
    radial-gradient(circle at 68% 36%, rgba(190, 214, 158, 0.35) 0 2%, transparent 16%),
    repeating-linear-gradient(28deg, rgba(218, 187, 79, 0.28) 0 1px, transparent 1px 28px),
    linear-gradient(135deg, #283f34 0%, #49654b 36%, #293b2f 62%, #718060 100%);
}

.map-surface::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(45deg, transparent 0 46%, rgba(210, 185, 142, 0.42) 47% 49%, transparent 50%),
    linear-gradient(120deg, transparent 0 58%, rgba(222, 203, 161, 0.38) 59% 61%, transparent 62%);
  opacity: 0.9;
}

.map-surface::after {
  content: "200 m";
  position: absolute;
  left: 18px;
  bottom: 18px;
  width: 72px;
  border-bottom: 3px solid #fff;
  color: #fff;
  font-size: 12px;
  padding-bottom: 5px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.map-empty {
  position: absolute;
  left: 24px;
  bottom: 24px;
  color: #fff;
  font-weight: 800;
  z-index: 1;
}

.map-marker {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
  transform: translate(-8px, -8px);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.65);
}

.map-marker::before {
  content: "";
  width: 13px;
  height: 13px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #8b98a7;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.34);
}

.marker-drilling::before {
  background: #32c86e;
}

.marker-active::before,
.marker-ready::before {
  background: #32c86e;
}

.marker-preparing::before {
  background: #f2ca4c;
}

.marker-building::before,
.marker-maintenance::before {
  background: #f2ca4c;
}

.marker-stopped::before {
  background: #ef5350;
}

.marker-completed::before {
  background: #1f6fe5;
}

.marker-undrilled::before,
.marker-proposed::before,
.marker-permitted::before,
.marker-planned::before {
  background: #b8c1cc;
}

.marker-suspended::before {
  background: #f2aa32;
}

.marker-abandoned::before,
.marker-reclaimed::before,
.marker-demobilized::before,
.marker-cancelled::before {
  background: #ef5350;
}

.map-legend {
  position: absolute;
  right: 16px;
  top: 16px;
  z-index: 3;
  min-width: 156px;
  display: grid;
  gap: 10px;
  border-radius: 8px;
  background: rgba(12, 20, 26, 0.78);
  color: #fff;
  font-size: 13px;
  padding: 12px;
}

.map-legend span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.status-drilling-dot {
  background: #32c86e;
}

.status-completed-dot {
  background: #1f6fe5;
}

.status-planned-dot {
  background: #b8c1cc;
}

.status-alert-dot {
  background: #f2aa32;
}

.status-unqueued-dot {
  background: #8b98a7;
  transform: scale(0.72);
}

.progress-body {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  padding: 20px 22px 12px;
}

.progress-ring {
  position: relative;
  width: 142px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--blue) calc(var(--progress) * 1%), #edf1f5 0);
}

.progress-ring::after {
  content: "";
  position: absolute;
  inset: 16px;
  border-radius: 50%;
  background: #fff;
}

.progress-ring span {
  position: relative;
  z-index: 1;
  font-size: 30px;
  font-weight: 900;
}

.progress-stats {
  display: grid;
  gap: 14px;
  margin: 0;
}

.progress-stats div {
  display: grid;
  gap: 3px;
}

.progress-stats dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}


.progress-note {
  display: block;
  color: #7a8796;
  font-size: 10px;
  font-weight: 800;
  margin-top: 2px;
}

.status-duration {
  display: block;
  color: #7a8796;
  font-size: 10px;
  font-weight: 800;
  margin-top: 4px;
  white-space: nowrap;
}

.progress-stats dd {
  margin: 0;
  font-size: 19px;
  font-weight: 900;
}

.daily-progress-chart {
  border-top: 1px solid #e5ebf2;
  margin: 10px 18px 18px;
  padding-top: 10px;
}

.daily-axis-label {
  color: #697789;
  font-size: 11px;
  font-weight: 800;
  margin-bottom: 3px;
}

.daily-bars {
  position: relative;
  height: 132px;
  display: grid;
  grid-template-columns: repeat(15, minmax(0, 1fr));
  align-items: end;
  gap: 5px;
  border-left: 1px solid #dce4ed;
  border-bottom: 1px solid #dce4ed;
  padding: 0 4px;
}

.daily-bar {
  position: relative;
  min-height: 3px;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, #4bd883, #16a34a);
}

.daily-bar i {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 3px);
  color: #5c6a75;
  font-size: 9px;
  font-style: normal;
  font-weight: 700;
  transform: translateX(-50%);
}

.expected-trend {
  position: absolute;
  inset: 0 4px 0 4px;
  z-index: 2;
  display: block;
  width: calc(100% - 8px);
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.expected-trend polyline {
  fill: none;
  stroke: rgba(179, 104, 34, 0.82);
  stroke-width: 1.8;
  vector-effect: non-scaling-stroke;
}

.daily-x-axis,
.daily-date-axis {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: #667488;
  font-size: 11px;
  font-weight: 700;
  margin-top: 5px;
}

.daily-date-axis span:nth-child(2) {
  color: #a15b17;
}

.expected-summary {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.25;
}

.expected-summary strong,
.expected-summary i {
  font-style: normal;
}

.dashboard-table th,
.dashboard-table td {
  padding: 12px 16px;
}

.resource-table th,
.resource-table td {
  padding: 8px 11px;
}

.activity-list {
  display: grid;
  gap: 3px;
  list-style: none;
  margin: 0;
  padding: 12px;
}

.activity-list li {
  min-height: 58px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  border-radius: 8px;
  padding: 8px 6px;
}

.activity-list li:hover {
  background: #f7fafc;
}

.activity-icon {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #e7f0ff;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.activity-depth {
  background: #e8f8ee;
  color: #159447;
}

.activity-delay {
  background: #ffe8d2;
  color: #b85f0c;
}

.activity-list strong {
  display: block;
  font-size: 13px;
}

.activity-list time {
  color: #667488;
  flex: 0 0 auto;
  font-size: 12px;
  margin: 0;
  text-align: right;
  white-space: nowrap;
}

.empty-activity {
  color: var(--muted);
  display: block;
}

.quick-links {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 18px;
}

.quick-links a {
  display: grid;
  justify-items: center;
  gap: 9px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}

.quick-icon {
  width: 58px;
  height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-weight: 900;
}

.auth-panel {
  min-height: calc(100vh - 120px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  align-items: center;
  gap: 48px;
}

.auth-copy h1 {
  font-size: 44px;
}

.auth-form {
  padding: 24px;
  display: grid;
  gap: 10px;
}

.auth-form label {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.auth-form input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
}

.auth-form button {
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  margin-top: 8px;
}

.auth-form button:hover {
  background: var(--accent-dark);
}

.form-error {
  color: var(--danger);
  margin-bottom: 4px;
}

@media (max-width: 1180px) {
  .app-frame {
    grid-template-columns: 88px minmax(0, 1fr);
  }

  .app-sidebar {
    padding: 18px 12px;
  }

  .nav-label,
  .brand-label,
  .sidebar-project-card,
  .sidebar-user div {
    display: none;
  }

  .sidebar-brand,
  .nav-item,
  .sidebar-user {
    justify-content: center;
  }

  .sidebar-header {
    justify-content: center;
  }

  .nav-item {
    padding: 0;
  }

  .nav-icon {
    font-size: 11px;
  }

  .dashboard-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-main-grid {
    grid-template-columns: 1fr;
  }

  .filter-form,
  .map-page-grid,
  .settings-grid,
  .edit-layout {
    grid-template-columns: 1fr;
  }

  .map-card,
  .current-drilling-card,
  .recent-card,
  .progress-card,
  .activity-card,
  .quick-card {
    grid-column: 1;
  }
}

@media (max-width: 760px) {
  .app-frame {
    display: block;
  }

  .app-sidebar {
    position: static;
    height: auto;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    padding: 14px 16px;
  }

  .sidebar-header {
    justify-content: space-between;
  }

  .sidebar-toggle-mark {
    width: 42px;
    height: 42px;
    display: inline-flex;
    order: 2;
  }

  .sidebar-toggle-mark .toggle-dw {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }

  .sidebar-toggle-mark::before {
    content: "";
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    box-shadow: 0 -6px 0 currentColor, 0 6px 0 currentColor;
  }

  .sidebar-toggle-mark::after {
    display: none;
  }

  .sidebar-brand span:not(.brand-mark),
  .nav-item:not(.active),
  .nav-item.active,
  .sidebar-user div {
    font-size: inherit;
  }

  .app-frame.sidebar-collapsed .brand-label,
  .app-frame.sidebar-collapsed .nav-label,
  .brand-label,
  .nav-label {
    display: inline;
  }

  .sidebar-brand {
    justify-content: flex-start;
  }

  .sidebar-nav,
  .sidebar-project-card {
    display: none;
  }

  .app-frame.mobile-menu-open .sidebar-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .app-frame.mobile-menu-open .sidebar-project-card {
    display: block;
  }

  .sidebar-user {
    display: none;
  }

  .nav-item,
  .app-frame.sidebar-collapsed .nav-item {
    min-height: 42px;
    justify-content: flex-start;
    padding: 0 10px;
  }

  .nav-item .nav-icon {
    display: inline-flex;
  }

  .workspace-topbar {
    position: static;
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
  }

  .workspace-topbar > div:first-child {
    display: grid;
    gap: 6px;
    min-width: 0;
  }

  .workspace-topbar strong {
    font-size: 18px;
  }

  .workspace-topbar > div:first-child > span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .workspace-topbar span {
    margin-left: 0;
  }

  .workspace-actions {
    width: auto;
    justify-content: end;
    flex-wrap: nowrap;
  }

  .context-chip {
    min-height: 38px;
    padding: 4px 8px;
  }

  .context-chip strong {
    font-size: 12px;
  }

  .context-chip span {
    font-size: 10px;
  }

  .add-menu summary {
    min-height: 38px;
    white-space: nowrap;
    padding: 0 10px;
  }

  .app-main .page-shell {
    padding: 16px;
  }

  .topbar {
    padding: 0 16px;
  }

  .metric-grid,
  .dashboard-metrics,
  .auth-panel,
  .dashboard-grid,
  .dashboard-main-grid,
  .form-grid,
  .filter-form,
  .resource-grid,
  .map-page-grid,
  .settings-grid,
  .hole-hero-record-grid,
  .record-hero,
  .hole-layout,
  .progress-body,
  .quick-links,
  .files-two-column-grid,
  .sync-grid,
  .file-hole-grid {
    grid-template-columns: 1fr;
  }

  .mobile-filter-panel > summary {
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    font-weight: 900;
    list-style: none;
    margin-bottom: 12px;
    padding: 0 14px;
  }

  .mobile-filter-panel > summary::-webkit-details-marker {
    display: none;
  }

  .mobile-filter-panel > summary::after {
    content: "";
    width: 8px;
    height: 8px;
    border-right: 2px solid #687789;
    border-bottom: 2px solid #687789;
    transform: rotate(45deg);
  }

  .mobile-filter-panel[open] > summary::after {
    transform: rotate(225deg);
  }

  .mobile-filter-panel:not([open]) .filter-form {
    display: none;
  }

  .dashboard-metrics,
  .record-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .progress-body {
    grid-template-columns: 132px minmax(0, 1fr);
    gap: 14px;
    padding: 16px;
  }

  .progress-ring {
    width: 124px;
  }

  .progress-ring span {
    font-size: 25px;
  }

  .progress-stats {
    gap: 10px;
  }

  .current-drilling-card,
  .queued-drilling-card,
  .recent-card,
  .list-panel {
    overflow-x: auto;
  }

  .dashboard-table {
    min-width: 760px;
  }

  .list-panel .dashboard-table {
    min-width: 900px;
  }

  .current-drilling-card .panel-heading,
  .queued-drilling-card .panel-heading {
    min-width: 760px;
  }

  .list-panel .panel-heading,
  .list-panel .section-total {
    min-width: 900px;
  }

  .recent-card .dashboard-table,
  .recent-card .panel-heading {
    min-width: 680px;
  }

  .auth-panel {
    align-items: start;
    gap: 24px;
  }

  h1,
  .auth-copy h1 {
    font-size: 32px;
  }

  .page-heading {
    align-items: start;
    flex-direction: column;
  }

  .button-group,
  .button {
    width: 100%;
  }

  .drill-graphic {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .record-title-row h1 {
    font-size: 34px;
  }

  .record-dl {
    grid-template-columns: 1fr;
  }

  .photo-hero,
  .hero-record-panel {
    min-height: auto;
  }

  .hero-record-dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .compact-update-form {
    grid-template-columns: 1fr;
  }

  .update-action-row {
    grid-template-columns: minmax(0, 1fr) 42px;
  }

  .update-action-row .action-field {
    grid-column: 1;
  }

  .update-action-row .depth-field {
    grid-column: 1 / -1;
  }

  .when-picker {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }

  .when-popover {
    right: 0;
    width: min(76vw, 260px);
  }

  .timeline-line time {
    width: 100%;
    margin-left: 0;
  }

  .compact-update-form .wide,
  .compact-update-form button {
    grid-column: 1;
    grid-row: auto;
    width: 100%;
  }

  .map-surface {
    min-height: 340px;
  }

  .map-marker span,
  .leaflet-drillwatch-marker > span {
    display: none;
  }
}

.current-files-panel,
.files-two-column-grid,
.sync-overview-panel,
.sync-grid {
  margin-bottom: 18px;
}

.files-two-column-grid,
.sync-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.file-hole-grid,
.file-hole-list {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.file-hole-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.file-hole-card {
  border: 1px solid #e1e7ef;
  border-radius: 8px;
  background: #fbfcfd;
  padding: 12px;
}

.file-hole-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.file-hole-header strong a {
  color: var(--ink);
  text-decoration: none;
}

.file-hole-header span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin-top: 3px;
}

.file-count {
  min-width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #e7f0ff;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.file-mini-list {
  display: grid;
  gap: 7px;
  margin-top: 12px;
}

.file-mini-list a {
  min-width: 0;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.file-mini-list a span:nth-child(2) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-mini-list small {
  color: var(--muted);
  font-size: 12px;
}


.sync-notice {
  margin: -4px 0 14px;
  border: 1px solid #bfe4cc;
  border-radius: 6px;
  background: #effaf2;
  color: #116033;
  font-size: 13px;
  font-weight: 800;
  padding: 10px 12px;
}

.sync-notice-warning {
  border-color: #f0d09a;
  background: #fff8ed;
  color: #8a4f0b;
}

.sync-overview-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  padding: 16px;
}

.sync-overview-body p,
.sync-card-body p {
  color: var(--muted);
  margin-bottom: 0;
}

.sync-card-body {
  display: grid;
  gap: 16px;
  padding: 16px;
}

.sync-card-body:not(.sync-generate-form) {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.sync-action-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.sync-overview-body button,
.sync-card button {
  min-height: 40px;
  border: 0;
  border-radius: 6px;
  background: var(--blue);
  color: #fff;
  cursor: pointer;
  font-weight: 800;
  padding: 0 14px;
}


.sync-card button.danger-action {
  background: var(--danger);
}

.sync-card button.danger-action:hover {
  background: #842c2c;
}

.sync-card button.secondary-action {
  border: 1px solid #d9e2ee;
  background: #fff;
  color: #29384a;
}

@media (max-width: 1180px) {
  .file-hole-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .files-two-column-grid,
  .sync-grid,
  .file-hole-grid,
  
.sync-notice {
  margin: -4px 0 14px;
  border: 1px solid #bfe4cc;
  border-radius: 6px;
  background: #effaf2;
  color: #116033;
  font-size: 13px;
  font-weight: 800;
  padding: 10px 12px;
}

.sync-notice-warning {
  border-color: #f0d09a;
  background: #fff8ed;
  color: #8a4f0b;
}

.sync-overview-body {
    grid-template-columns: 1fr;
  }

  .file-hole-grid,
  .file-hole-list,
  .sync-card-body,
  
.sync-notice {
  margin: -4px 0 14px;
  border: 1px solid #bfe4cc;
  border-radius: 6px;
  background: #effaf2;
  color: #116033;
  font-size: 13px;
  font-weight: 800;
  padding: 10px 12px;
}

.sync-notice-warning {
  border-color: #f0d09a;
  background: #fff8ed;
  color: #8a4f0b;
}

.sync-overview-body {
    padding: 12px;
  }

  .sync-card-body:not(.sync-generate-form) {
    grid-template-columns: 1fr;
  }

  .sync-action-row {
    justify-content: flex-start;
  }
}



.leaflet-map-host {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: #26392f;
}

.leaflet-ready .map-marker-source-layer {
  display: none;
}

.leaflet-drillwatch-marker {
  box-sizing: border-box;
  display: block;
  width: 13px !important;
  height: 13px !important;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #8b98a7;
  box-shadow: 0 2px 7px rgba(0, 0, 0, 0.32);
  pointer-events: auto;
}

.leaflet-drillwatch-marker::before {
  content: none;
}

.leaflet-drillwatch-marker > span {
  position: absolute;
  left: 13px;
  top: -9px;
  z-index: var(--label-z, 1);
  transform: translate(var(--label-x, 0px), var(--label-y, 0px));
  white-space: nowrap;
  border-radius: 999px;
  background: rgba(8, 20, 24, 0.82);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  padding: 4px 6px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}

.leaflet-drillwatch-marker.marker-drilling { background: #16a34a; }
.leaflet-drillwatch-marker.marker-completed { background: #2563eb; }
.leaflet-drillwatch-marker.marker-planned,
.leaflet-drillwatch-marker.marker-undrilled,
.leaflet-drillwatch-marker.marker-queued-undrilled { background: #8b98a7; }
.leaflet-drillwatch-marker.marker-unqueued-undrilled {
  width: 9px !important;
  height: 9px !important;
  border-width: 1.5px;
  background: #8b98a7;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.28);
}
.leaflet-drillwatch-marker.marker-stopped,
.leaflet-drillwatch-marker.marker-suspended,
.leaflet-drillwatch-marker.marker-preparing { background: #f59e0b; }
.leaflet-drillwatch-marker.marker-abandoned { background: #991b1b; }

.leaflet-control-scale {
  margin: 0 16px 16px 0 !important;
}

.leaflet-control-scale-line {
  border-color: #fff !important;
  border-top: 0 !important;
  background: rgba(8, 20, 24, 0.74) !important;
  color: #fff !important;
  font-weight: 900;
  text-shadow: none !important;
}

.leaflet-control-zoom {
  border: 1px solid rgba(255,255,255,0.55) !important;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}

.leaflet-control-zoom a {
  color: #12202a !important;
}

.map-tile-surface::before {
  display: none;
}

.map-tile-surface::after {
  z-index: 35;
}

.map-tile-layer,
.map-raster-layer {
  position: absolute;
  inset: 0;
}

.map-tile-layer {
  z-index: 0;
  background: #26392f;
}

.map-raster-layer img {
  position: absolute;
  display: block;
  object-fit: fill;
  user-select: none;
  -webkit-user-drag: none;
}

.map-raster-layer[hidden] {
  display: none;
}

.map-tile-surface .map-marker {
  z-index: 12;
}

.list-panel .queue-actions button {
  min-width: 26px;
  min-height: 26px;
  border-radius: 5px;
  font-size: 10px;
  padding: 0 6px;
}

.list-panel .queue-actions .icon-button {
  width: 26px;
  padding: 0;
}

.list-panel .queue-actions .queue-last {
  min-width: 36px;
}

.list-panel .rig-assign-form select {
  min-height: 26px;
  font-size: 10px;
}

/* Rig, pad, and map refinements */
.dashboard-table tbody tr:hover,
.resource-table tbody tr:hover {
  background: #f6faf8;
}

.topbar-hole-select option.status-completed { color: #137a42; }
.topbar-hole-select option.status-abandoned { color: #a33a3a; }
.topbar-hole-select option.status-stopped,
.topbar-hole-select option.status-suspended { color: #b36822; }

.dtc-benchmark-line {
  stroke-width: 1.35;
  stroke-dasharray: 4 5;
  opacity: 0.88;
}

.dtc-benchmark-rig { stroke: #b36822; }
.dtc-benchmark-project { stroke: #6f62cc; }
.rig-average-key { background: #b36822; }
.project-average-key { background: #6f62cc; }

.target-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.target-actions form,
.attachment-item form {
  margin: 0;
}

.timeline-action.icon-action {
  border: 0;
  cursor: pointer;
  font-family: inherit;
}

.attachment-item {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
}

.attachment-item .timeline-action {
  margin-top: 2px;
}

.rig-resource-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.rig-card .resource-photo-heading {
  border-bottom: 4px solid #8b98a7;
}

.rig-status-active .resource-photo-heading { border-color: #16a34a; }
.rig-status-standby .resource-photo-heading { border-color: #b4232a; }
.rig-status-maintenance .resource-photo-heading { border-color: #d97706; }
.rig-status-demobilized .resource-photo-heading { border-color: #747e8a; }

.rig-subgrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  border-top: 1px solid var(--line);
  padding: 12px;
}

.rig-subgrid h3,
.assigned-hole-panel h3,
.rig-curve-panel h3 {
  font-size: 13px;
  margin: 0 0 6px;
}

.rig-hole-list,
.assigned-hole-list {
  padding: 0;
}

.rig-curve-panel,
.assigned-hole-panel {
  border-top: 1px solid var(--line);
  padding: 12px;
}

.mini-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.mini-heading span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.rig-curve-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.rig-mini-curve {
  display: grid;
  gap: 5px;
  border: 1px solid #e0e7ef;
  border-radius: 8px;
  background: #fbfcfd;
  color: var(--ink);
  padding: 8px;
  text-decoration: none;
}

.rig-mini-curve span {
  font-size: 12px;
  font-weight: 900;
}

.rig-mini-curve svg {
  width: 100%;
  height: 96px;
}

.map-surface {
  cursor: grab;
  touch-action: none;
}

.map-surface:active {
  cursor: grabbing;
}

.map-pan-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  transform-origin: 0 0;
  will-change: transform;
}


.map-zoom-controls {
  position: absolute;
  right: 14px;
  top: 14px;
  z-index: 45;
  display: inline-flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.map-zoom-controls button {
  width: 34px;
  height: 32px;
  border: 0;
  border-bottom: 1px solid rgba(7, 18, 25, 0.16);
  background: rgba(255, 255, 255, 0.92);
  color: #12202a;
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.map-zoom-controls button:last-child {
  border-bottom: 0;
}

.map-zoom-controls button:disabled {
  color: #9aa5ad;
  cursor: default;
}

.map-tile-surface .map-marker::before,
.map-tile-surface .map-marker > span {
  transform: scale(calc(1 / var(--map-scale, 1)));
}

.map-tile-surface .map-marker::before {
  transform-origin: center;
}

.map-tile-surface .map-marker > span {
  display: inline-block;
  transform-origin: left center;
}

.map-legend,
.map-legend-bottom {
  z-index: 40;
}

.map-legend-bottom {
  left: 14px;
  right: auto;
  top: auto;
  bottom: 14px;
  min-width: 0;
  max-width: calc(80% - 14px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  width: max-content;
}

.map-legend-bottom strong {
  margin-right: 2px;
}

.map-filter-list.map-legend-bottom button {
  white-space: nowrap;
}

.file-thumbnail {
  display: block;
  overflow: hidden;
  border-radius: 6px;
  margin-top: 10px;
}

.file-thumbnail img {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  object-fit: cover;
  background: #e9eff6;
}

.file-row-thumb {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  object-fit: cover;
  background: #e9eff6;
}

@media (max-width: 1180px) {
  .rig-resource-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .map-marker span,
  .leaflet-drillwatch-marker > span {
    display: none;
  }

  .map-legend-bottom,
  .map-legend {
    display: flex;
    left: 10px;
    right: auto;
    bottom: 10px;
    top: auto;
    max-width: calc(80% - 10px);
    gap: 7px 10px;
    padding: 9px 10px;
    font-size: 11px;
  }

  .map-filter-list button {
    font-size: 11px;
  }

  .rig-subgrid,
  .rig-curve-list {
    grid-template-columns: 1fr;
  }

  .attachment-item {
    grid-template-columns: minmax(0, 1fr) 28px;
  }
}

.connected-status {
  color: #147a3d;
  font-weight: 900;
}

.sync-picker-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.sync-picker-row button,
.sync-action-row .button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 6px;
  background: var(--blue);
  color: #fff;
  cursor: pointer;
  font-weight: 800;
  padding: 0 14px;
  text-decoration: none;
}

.sync-picker-row button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.map-heading-controls {
  display: flex;
  align-items: center;
  justify-content: end;
  gap: 10px;
  min-width: 0;
}

.map-heading-controls .form-control {
  width: min(220px, 32vw);
  min-height: 34px;
}

.map-tile-surface::after {
  display: none;
}

.resource-dl dd small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

@media (max-width: 760px) {
  .map-heading-controls {
    width: 100%;
    justify-content: stretch;
  }

  .map-heading-controls .form-control {
    width: 100%;
  }

  .sync-picker-row {
    grid-template-columns: 1fr;
  }
}


.map-page-layout {
  display: grid;
  gap: 16px;
}

.map-page-layout .map-page-card {
  width: 100%;
}

.map-page-secondary {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 16px;
}

.pad-card .resource-photo-heading {
  border-bottom: 4px solid #8b98a7;
}

.pad-status-active .resource-photo-heading,
.pad-status-ready .resource-photo-heading { border-color: #16a34a; }
.pad-status-building .resource-photo-heading,
.pad-status-permitted .resource-photo-heading { border-color: #d97706; }
.pad-status-proposed .resource-photo-heading { border-color: #4f7fc8; }
.pad-status-cancelled .resource-photo-heading { border-color: #b4232a; }
.pad-status-reclaimed .resource-photo-heading { border-color: #747e8a; }

.utm-pair {
  display: inline-grid;
  grid-template-columns: repeat(2, max-content);
  gap: 8px;
  align-items: center;
}

.utm-pair span {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border-radius: 5px;
  background: #eef4fb;
  color: #213448;
  font-size: 12px;
  font-weight: 900;
  padding: 2px 7px;
}

.rig-curve-panel > summary {
  cursor: pointer;
  list-style: none;
}

.rig-curve-panel > summary::-webkit-details-marker {
  display: none;
}

.rig-curve-panel .twistie {
  margin-left: auto;
}

.file-row-meta {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.file-row-meta strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-row-meta em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}

.sync-section {
  display: grid;
  gap: 10px;
  margin-bottom: 22px;
}

.section-heading-row h2 {
  margin: 0;
  font-size: 15px;
}

@media (max-width: 900px) {
  .map-page-secondary {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .utm-pair {
    grid-template-columns: 1fr;
  }
}


.hole-properties-panel > summary {
  list-style: none;
  cursor: default;
}

.hole-properties-panel > summary::-webkit-details-marker {
  display: none;
}

.hole-properties-panel .twistie {
  display: none;
}

.pad-prospect-stack {
  display: grid;
  gap: 18px;
}

.pad-prospect-section {
  display: grid;
  gap: 10px;
}

@media (max-width: 760px) {
  .hole-properties-panel > summary {
    cursor: pointer;
  }

  .hole-properties-panel .twistie {
    display: inline-block;
  }
}

.site-author-credit {
  margin: 6px 0 0;
  color: rgba(255, 255, 255, 0.22);
  font-size: 9px;
  font-weight: 500;
}

.site-author-credit a {
  color: rgba(255, 255, 255, 0.3);
  text-decoration: none;
}

.site-author-credit a:hover {
  color: rgba(255, 255, 255, 0.55);
  text-decoration: underline;
}

.timeline-item {
  scroll-margin-top: 88px;
}

.timeline-item:target .timeline-card {
  border-color: #f3c969;
  box-shadow: 0 0 0 3px rgba(243, 201, 105, 0.22);
}
