: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;
}

.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;
}

.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;
}

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-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;
}

.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: 620px;
}

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

.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 {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  padding: 0;
}

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

.map-filter-list 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 {
  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);
}

.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,
.soft-select {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  color: #29384a;
  font-size: 13px;
  font-weight: 700;
  padding: 0 16px;
}

.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 {
  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;
}

.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-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-line {
  position: absolute;
  left: 0;
  right: 0;
  bottom: var(--expected);
  z-index: 2;
  border-top: 2px solid rgba(179, 104, 34, 0.78);
}

.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;
}

.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) auto;
  align-items: center;
  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 p,
.activity-list time {
  color: #667488;
  font-size: 12px;
  margin: 0;
}

.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;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }

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

  .sidebar-nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .nav-item {
    min-height: 42px;
    justify-content: center;
  }

  .nav-item .nav-icon {
    display: none;
  }

  .workspace-topbar {
    position: static;
    align-items: start;
    flex-direction: column;
    padding: 16px;
  }

  .workspace-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .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,
  .record-summary-grid,
  .hole-layout,
  .progress-body,
  .quick-links {
    grid-template-columns: 1fr;
  }

  .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: 1fr;
  }

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

  .when-picker {
    justify-self: start;
  }

  .when-popover {
    position: static;
    width: min(100%, 260px);
    margin-top: 8px;
  }

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

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

  .map-marker span,
  .map-legend {
    display: none;
  }
}
