:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --black: #050607;
  --panel: #111315;
  --panel-2: #181b1e;
  --gold: #f1b82d;
  --gold-2: #b9891f;
  --silver: #b8c0c7;
  --silver-2: #737d86;
  --white: #f7f8f8;
  --line: #343a40;
  background: var(--black);
  color: var(--white);
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--black); overflow: hidden; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
textarea { min-height: 92px; resize: vertical; }

.auth-screen {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: radial-gradient(circle at center top, rgba(241, 184, 45, 0.14), transparent 34%), #050607;
}
.auth-screen[hidden] { display: none; }
.auth-panel {
  width: min(390px, 100%);
  border: 1px solid #343a40;
  border-radius: 8px;
  background: #0b0d0f;
  padding: 26px;
  display: grid;
  gap: 14px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
}
.auth-logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  justify-self: center;
  filter: drop-shadow(0 4px 9px rgba(0, 0, 0, 0.65));
}
.auth-panel h1 {
  text-align: center;
  font-size: 24px;
}
.auth-panel button, #settingsChangePassword {
  border: 1px solid var(--gold-2);
  background: var(--gold);
  color: #111111;
  border-radius: 6px;
  min-height: 38px;
  font-weight: 800;
}
.auth-error {
  color: #ffb4b4;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

#app { min-height: 100vh; display: grid; grid-template-columns: 320px minmax(0, 1fr); }
#app.app-fullscreen { grid-template-columns: minmax(0, 1fr); }
.sidebar { border-right: 1px solid var(--line); background: #0b0d0f; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.brand { display: flex; align-items: center; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.app-brand { padding-bottom: 0; border-bottom: 0; flex: 0 0 auto; }
.brand-mark { width: 52px; height: 52px; display: grid; place-items: center; background: linear-gradient(145deg, #0b0d0f, #1b1e21); color: var(--gold); border: 1px solid var(--gold-2); border-radius: 6px; }
.brand-logo { width: 46px; height: 46px; object-fit: contain; display: block; border-radius: 7px; mix-blend-mode: screen; filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.55)); }
.brand-mark svg { width: 42px; height: 42px; overflow: visible; }
.logo-path { fill: none; stroke: var(--gold); stroke-width: 7; stroke-linecap: round; }
.logo-bit { fill: var(--silver); stroke: var(--white); stroke-width: 1.5; }
.brand-mark text { fill: var(--white); font-size: 24px; font-weight: 900; font-family: Inter, ui-sans-serif, system-ui, sans-serif; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3, h4,
.section-title h3,
.calc-panel h4,
.job-card h4,
.modal-panel h3,
.sheet-title h3 {
  color: var(--gold);
}
h1 { font-size: 20px; letter-spacing: 0; }
.brand p, .topbar p { color: var(--silver); margin-top: 2px; }
.primary, .section-title button, .topbar button, #saveProjectButton, #calculateBore, #openBoreSegments, #openJointBreakdown, #addHCurve, #apCalculate, #fetchFormations, #addFormation, #pullFormationsIfc, #pullFormationsMobile, #openFormationLibrary, #saveFormationLibraryItem, #addSteeringRow, #addSteeringPass, #viewSteeringPasses, #sideTrackPass, #showAllRadius, #addAbiaRow, #viewDataSheets, .csv-link-button, #parseRivCross, #seedDrillLogFromSurvey, #seedDrillLogFromRivCross, #previewDailyReport, #previewFinalReport, #printReportPreview, #refreshRocky, #askRocky, #trainRocky, #uploadRockyLibrary {
  border: 1px solid var(--gold-2);
  background: var(--gold);
  color: #111111;
  border-radius: 6px;
  min-height: 38px;
  font-weight: 800;
}
.filter-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }
label { display: grid; gap: 6px; color: var(--silver); font-size: 12px; font-weight: 700; }
.inline-check { display: flex; grid-auto-flow: column; align-items: center; gap: 8px; min-height: 38px; }
.inline-check input { width: auto; min-height: auto; }
.secondary-button { border: 1px solid #40464c; background: #0b0d0f; color: var(--white); border-radius: 6px; min-height: 38px; font-weight: 800; }
input, select, textarea {
  width: 100%;
  min-height: 38px;
  border: 1px solid #40464c;
  background: #070809;
  color: var(--white);
  border-radius: 6px;
  padding: 8px 10px;
}
.job-info-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(280px, 0.95fr) minmax(360px, 1.35fr);
  gap: 14px;
  align-items: start;
}
.job-workbook-layout {
  display: grid;
  grid-template-columns: minmax(360px, 0.9fr) minmax(640px, 1.4fr);
  gap: 14px;
  align-items: start;
}
.job-workbook-layout.workbook-reset {
  grid-template-columns: minmax(280px, 0.95fr) minmax(300px, 1fr) minmax(520px, 1.35fr);
}
.job-stack { display: grid; gap: 14px; }
.job-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #090b0c;
  margin-top: 0;
  padding: 14px;
}
.job-panel:first-of-type { border-top: 1px solid var(--line); padding-top: 14px; }
.compact-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 10px;
}
.compact-fields.two-col { margin-bottom: 12px; }
.compact-fields label { gap: 4px; font-size: 11px; }
.compact-fields input, .compact-fields select, .bha-part input {
  min-height: 31px;
  padding: 5px 8px;
  border-radius: 5px;
  font-size: 13px;
}
.readout-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.readout-grid div {
  min-height: 48px;
  border: 1px solid #2f363c;
  border-radius: 6px;
  background: #0d1012;
  padding: 8px 9px;
}
.readout-grid span {
  display: block;
  color: var(--silver);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}
.readout-grid strong {
  display: block;
  margin-top: 4px;
  color: var(--white);
  font-size: 15px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rig-panel { min-width: 0; }
.workbook-reset .rig-panel {
  position: sticky;
  top: 14px;
}
.rig-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
  margin-bottom: 14px;
}
.rig-field-grid label { gap: 5px; font-size: 12px; }
.rig-field-grid input, .rig-field-grid select {
  min-height: 36px;
  padding: 7px 9px;
}
.bha-board {
  border: 1px solid #2b3137;
  border-radius: 8px;
  background: #090b0c;
  padding: 12px;
}
.bha-board-clean {
  padding: 12px;
  background: #080a0b;
}
.bha-clean-diagram {
  border: 1px solid #2f363c;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(184, 192, 199, 0.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(184, 192, 199, 0.07) 1px, transparent 1px),
    #0b0d0f;
  background-size: 44px 44px;
  min-height: 190px;
  padding: 28px 22px 20px;
  overflow: hidden;
}
.bha-clean-track {
  width: 100%;
  min-height: 130px;
  display: grid;
  grid-template-columns: 1.4fr 0.72fr 1.1fr 0.55fr 1.2fr 0.62fr;
  align-items: center;
  gap: 0;
}
.bha-clean-part {
  position: relative;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f7f8f8;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  text-align: center;
}
.bha-clean-part span {
  position: absolute;
  left: 50%;
  top: 74px;
  transform: translateX(-50%);
  width: max-content;
  max-width: 112px;
  color: var(--silver);
  background: rgba(7, 8, 9, 0.94);
  border: 1px solid #343a40;
  border-radius: 5px;
  padding: 4px 6px;
  line-height: 1.1;
  white-space: normal;
}
.clean-monel {
  height: 34px;
  border-radius: 999px 0 0 999px;
  border: 1px solid #f0f3f4;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.32) 0 3px, transparent 3px 9px),
    linear-gradient(90deg, #dce1e3, #879098 48%, #f1f4f5);
}
.clean-monel::before {
  content: "";
  position: absolute;
  right: -13px;
  width: 26px;
  height: 44px;
  border-radius: 6px;
  background: linear-gradient(90deg, #aeb6bb, #f1f4f5, #8b949b);
  z-index: 2;
}
.clean-pressure {
  height: 38px;
  border: 1px solid #dce1e3;
  background: linear-gradient(90deg, #9ba3aa, #505960 52%, #d5dadd);
}
.clean-pressure::after {
  content: "";
  position: absolute;
  right: 24%;
  top: 9px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #111519;
  border: 2px solid #dce1e3;
}
.clean-paratrack {
  height: 30px;
  border-radius: 999px;
  border: 1px solid #dfb08d;
  background:
    linear-gradient(90deg, #3a2117 0 10%, #b77248 10% 78%, #2c3035 78% 100%);
}
.clean-paratrack::before,
.clean-paratrack::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #252a2e;
  border: 2px solid #cfd4d6;
  transform: translateY(-50%);
}
.clean-paratrack::before { left: -8px; }
.clean-paratrack::after { right: -8px; }
.clean-stinger {
  height: 18px;
  background: linear-gradient(90deg, #d8dddf, #9ba3aa);
  border-top: 1px solid #eef2f3;
  border-bottom: 1px solid #68717a;
}
.clean-motor {
  height: 48px;
  border-radius: 0 999px 999px 0;
  border: 1px solid #eef2f3;
  background: repeating-linear-gradient(90deg, #e4e0d7 0 24px, #0e78a9 24px 42px);
}
.clean-motor::after {
  content: "";
  position: absolute;
  right: -5px;
  top: 9px;
  width: 14px;
  height: 30px;
  border-radius: 0 999px 999px 0;
  background: #d8dddf;
  border: 1px solid #f4f6f6;
}
.clean-bit {
  height: 58px;
  margin-left: 2px;
  clip-path: polygon(0 24%, 58% 24%, 100% 50%, 58% 76%, 0 76%);
  background:
    radial-gradient(circle at 67% 33%, #f4f6f6 0 4px, #5d666e 5px 8px, transparent 9px),
    radial-gradient(circle at 78% 50%, #f4f6f6 0 4px, #5d666e 5px 8px, transparent 9px),
    radial-gradient(circle at 67% 67%, #f4f6f6 0 4px, #5d666e 5px 8px, transparent 9px),
    linear-gradient(90deg, #cfd4d6, #f1b82d);
}
.bha-workbook-fields {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.bha-workbook-fields label {
  gap: 4px;
  font-size: 11px;
}
.bha-workbook-fields input {
  min-height: 31px;
  padding: 5px 8px;
  font-size: 13px;
}
.bha-measurement {
  position: relative;
  min-height: 360px;
  border: 1px solid #2f363c;
  border-radius: 8px;
  overflow: hidden;
  background: #0b0d0f;
}
.bha-grid-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(184, 192, 199, 0.12) 1px, transparent 1px),
    linear-gradient(0deg, rgba(184, 192, 199, 0.10) 1px, transparent 1px);
  background-size: 56px 56px;
  opacity: 0.62;
}
.hole-envelope {
  position: absolute;
  left: 9%;
  right: 8%;
  top: 132px;
  height: 128px;
  border: 3px dashed rgba(241, 184, 45, 0.82);
  border-radius: 50%;
}
.hole-envelope .hole-label,
.hole-envelope strong {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  border: 1px solid var(--gold-2);
  border-radius: 7px;
  background: rgba(7, 8, 9, 0.92);
  padding: 5px 11px;
  color: var(--white);
  font-weight: 900;
}
.hole-envelope .hole-label { top: -38px; font-size: 12px; text-transform: uppercase; }
.hole-envelope strong { top: -10px; min-width: 72px; text-align: center; color: var(--silver); }
.tool-string {
  position: absolute;
  left: 8%;
  right: 6%;
  top: 178px;
  height: 54px;
  display: grid;
  grid-template-columns: 2.2fr 1fr 1.45fr 1.85fr 0.8fr;
  align-items: center;
  filter: drop-shadow(0 10px 12px rgba(0, 0, 0, 0.55));
}
.tool { height: 24px; position: relative; }
.tool.monel {
  height: 28px;
  border-radius: 999px 0 0 999px;
  background: repeating-linear-gradient(90deg, #d6dbdd 0 8px, #aeb7be 8px 11px, #e7eaeb 11px 18px);
}
.tool.pressure-sub {
  height: 34px;
  background: linear-gradient(90deg, #c9ced1, #707982, #cfd4d6);
}
.tool.pressure-sub::after {
  content: "";
  position: absolute;
  right: 15%;
  top: 8px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px #20252a;
}
.tool.paratrack {
  height: 24px;
  border-radius: 999px;
  background: linear-gradient(90deg, #7b3d24, #c98555 18% 78%, #2c3035 78%);
}
.tool.mud-motor {
  height: 40px;
  border-radius: 0 999px 999px 0;
  background: repeating-linear-gradient(90deg, #e0ddd5 0 26px, #0d6f9b 26px 48px);
}
.tool.bit {
  height: 42px;
  clip-path: polygon(0 24%, 68% 24%, 100% 50%, 68% 76%, 0 76%);
  background: radial-gradient(circle at 72% 36%, #ffffff 0 5px, #9ca5ab 6px 10px, transparent 11px),
    radial-gradient(circle at 72% 64%, #ffffff 0 5px, #9ca5ab 6px 10px, transparent 11px),
    linear-gradient(90deg, #d8dddf, var(--gold));
}
.measure-line {
  position: absolute;
  height: 2px;
  background: var(--gold);
}
.measure-line::before,
.measure-line::after {
  content: "";
  position: absolute;
  top: -10px;
  width: 2px;
  height: 22px;
  background: var(--gold);
}
.measure-line::before { left: 0; }
.measure-line::after { right: 0; }
.measure-line span {
  position: absolute;
  left: 50%;
  top: -24px;
  transform: translateX(-50%);
  color: var(--white);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}
.monel-line { left: 14%; width: 30%; top: 144px; }
.paratrack-line { left: 43%; width: 28%; top: 126px; }
.pressure-line { left: 37%; width: 22%; top: 282px; }
.motor-line { right: 11%; width: 22%; top: 298px; }
.bha-readout-card {
  position: absolute;
  width: 146px;
  min-height: 62px;
  border: 1px solid #485058;
  border-radius: 8px;
  background: rgba(7, 8, 9, 0.9);
  padding: 10px 12px;
}
.bha-readout-card span {
  display: block;
  color: var(--white);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}
.bha-readout-card strong {
  display: block;
  margin-top: 8px;
  color: var(--silver);
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.readout-monel { left: 5%; top: 68px; }
.readout-paratrack { left: 42%; top: 112px; border-color: var(--gold-2); }
.readout-pressure { left: 24%; bottom: 34px; }
.readout-motor { right: 24%; bottom: 32px; }
.readout-bit { right: 6%; top: 78px; border-color: var(--gold-2); }
.bha-card-grid { margin-top: 12px; }
.bha-entry {
  border: 1px solid #333a40;
  border-radius: 8px;
  background: #0d1012;
  padding: 9px;
  gap: 7px;
  font-size: 12px;
}
.bha-entry span {
  display: block;
  width: 100%;
  height: 28px;
  border-radius: 999px;
  background: #cfd4d6;
}
.bha-entry input { min-height: 32px; padding: 6px 8px; }
.monel-card span { background: repeating-linear-gradient(90deg, #e6e9ea 0 12px, #aeb7be 12px 16px); }
.pressure-card span { background: linear-gradient(90deg, #cbd1d4, #717a82, #d9dee0); }
.paratrack-card span { background: linear-gradient(90deg, #7d3f25, #c98555 72%, #262b2f 72%); }
.motor-card span { background: repeating-linear-gradient(90deg, #e0ddd5 0 18px, #0d6f9b 18px 34px); }
.bit-card span { border-radius: 0; clip-path: polygon(0 24%, 78% 24%, 100% 50%, 78% 76%, 0 76%); background: linear-gradient(90deg, #d8dddf, var(--gold)); }
.hole-card span { border: 2px dashed var(--gold-2); background: radial-gradient(circle at center, transparent 0 38%, rgba(241, 184, 45, 0.24) 40%); }

.bha-visual {
  border: 1px solid #2b3137;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(241, 184, 45, 0.06) 1px, transparent 1px),
    linear-gradient(180deg, #101315, #070809);
  background-size: 36px 100%, 100% 100%;
  padding: 10px;
  overflow: hidden;
}
.bha-schematic {
  position: absolute;
  position: relative;
  min-height: 280px;
  margin-bottom: 10px;
}
.bha-schematic svg {
  width: 100%;
  min-height: 230px;
  display: block;
}
.bha-bg { fill: #07090a; }
.bha-gridlines path {
  fill: none;
  stroke: #22282d;
  stroke-width: 1;
}
.bha-hole-ring {
  fill: rgba(241, 184, 45, 0.05);
  stroke: #8b6b21;
  stroke-width: 3;
  stroke-dasharray: 10 8;
}
.bha-monel path:first-child {
  fill: url(#monelSteel);
  stroke: #eef2f3;
  stroke-width: 1.5;
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.55));
}
.bha-thread {
  fill: none;
  stroke: rgba(255, 255, 255, 0.5);
  stroke-width: 1.2;
}
.bha-pressure-sub path { fill: #8a8f92; stroke: #e5e8ea; stroke-width: 1.4; }
.bha-pressure-sub circle:first-of-type { fill: #171a1d; stroke: #e5e8ea; stroke-width: 1.2; }
.bha-pressure-sub circle:last-of-type { fill: var(--gold); }
.bha-paratrack path:first-child { fill: url(#paratrackCopper); stroke: #e6b18b; stroke-width: 1.2; }
.bha-paratrack path:nth-child(2) { fill: #c07a4b; stroke: #f0c09f; stroke-width: 1.2; }
.bha-paratrack circle { fill: #24282c; stroke: #cfd6da; stroke-width: 1.2; }
.bha-mudmotor path:first-child { fill: url(#motorBlue); stroke: #f1f4f5; stroke-width: 1.5; }
.bha-mudmotor path:last-child { fill: none; stroke: rgba(7, 8, 9, 0.52); stroke-width: 5; }
.bha-bit-head { fill: url(#bitGold); stroke: #fff2be; stroke-width: 1.5; }
.bha-bit-head circle { fill: #d2d9dc; stroke: #5f6870; stroke-width: 1.4; }
.bha-cutter-dots {
  fill: none;
  stroke: #41484f;
  stroke-width: 5;
  stroke-linecap: round;
}
.bha-dimensions path {
  fill: none;
  stroke: var(--gold);
  stroke-width: 2;
  stroke-linecap: round;
}
.bha-dim-label {
  fill: var(--silver);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}
.bha-callout {
  position: absolute;
  min-width: 104px;
  border: 1px solid #3a4248;
  border-radius: 7px;
  background: rgba(7, 8, 9, 0.86);
  padding: 7px 8px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.36);
}
.bha-callout span {
  display: block;
  color: var(--silver);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}
.bha-callout strong {
  display: block;
  margin-top: 3px;
  color: var(--white);
  font-size: 14px;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.callout-pipe { left: 3%; top: 16%; }
.callout-hole { left: 42%; top: 6%; border-color: var(--gold-2); }
.callout-bend { left: 22%; bottom: 8%; }
.callout-probe { left: 39%; top: 26%; }
.callout-motor { right: 22%; bottom: 8%; }
.callout-bit { right: 3%; top: 18%; border-color: var(--gold-2); }
.bha-input-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  align-items: end;
}
.bha-part {
  position: relative;
  border: 1px solid #333a40;
  border-radius: 7px;
  background: #0d1012;
  padding: 9px 8px;
  gap: 6px;
  min-width: 0;
}
.bha-shape {
  display: block;
  width: 100%;
  height: 26px;
  border-radius: 999px;
  background: linear-gradient(90deg, #555f68, #d2d8dc);
  box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.14), inset 0 -3px 5px rgba(0, 0, 0, 0.45);
}
.bha-part.bend .bha-shape {
  background: linear-gradient(90deg, #747c83, #d4d8da);
}
.bha-part.probe .bha-shape {
  background: linear-gradient(90deg, #6e3922 0 18%, #c27a4d 18% 76%, #262b2f 76% 100%);
}
.bha-part.motor .bha-shape {
  background: repeating-linear-gradient(90deg, #d7d3cb 0 18px, #0b5f86 18px 34px);
}
.bha-part.bit .bha-shape {
  clip-path: polygon(0 24%, 78% 24%, 100% 50%, 78% 76%, 0 76%);
  background: linear-gradient(90deg, #8d969e, var(--gold));
}
.bha-part.hole .bha-shape {
  height: 34px;
  border: 2px dashed var(--gold-2);
  background: radial-gradient(circle at center, transparent 0 42%, rgba(241, 184, 45, 0.22) 43% 100%);
}
.bha-part::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -11px;
  width: 2px;
  height: 10px;
  background: #485058;
}
.bha-part::after {
  content: "";
  position: absolute;
  left: calc(50% - 5px);
  top: -16px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 2px #050607;
}
.bha-part.bit { border-color: var(--gold-2); }
.bha-part.hole { border-style: dashed; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.project-list { display: flex; flex-direction: column; gap: 8px; overflow: auto; }
.project-card {
  text-align: left;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--white);
  border-radius: 6px;
  padding: 10px;
}
.project-card.active { border-color: var(--gold); background: #1d1b13; }
.project-card strong { display: block; font-size: 15px; }
.project-card span { display: block; color: var(--silver); font-size: 12px; margin-top: 3px; }
.workspace { min-width: 0; height: calc(100vh - 34px); overflow: auto; padding: 8px 14px 42px; display: flex; flex-direction: column; gap: 7px; }
.app-fullscreen .workspace { width: 100%; max-width: none; }
.topbar { display: grid; grid-template-columns: minmax(220px, 0.72fr) auto minmax(560px, 1.45fr); gap: 12px; align-items: center; border-bottom: 1px solid #22272b; padding-bottom: 6px; min-height: 52px; }
.topbar-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.topbar h2 { font-size: 18px; line-height: 1.05; }
.quick-rocky-button {
  justify-self: center;
  min-height: 30px;
  padding: 6px 13px;
  font-size: 12px;
  white-space: nowrap;
}
.quick-joint {
  justify-self: end;
  width: min(900px, 100%);
  display: grid;
  grid-template-columns: 68px minmax(112px, 0.32fr) 76px minmax(360px, 1fr);
  gap: 8px;
  align-items: center;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.quick-units {
  min-height: 30px;
  display: grid;
  grid-template-columns: auto auto;
  align-items: baseline;
  column-gap: 5px;
  row-gap: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
}
.quick-units span {
  color: var(--silver);
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}
.quick-units .unit-title {
  color: var(--white);
}
.quick-units strong {
  margin-top: 0;
  color: var(--gold);
  font-size: 16px;
  line-height: 1;
  text-transform: uppercase;
}
.quick-units small {
  grid-column: 1 / -1;
  margin-top: 2px;
  color: var(--silver);
  font-size: 8px;
  font-weight: 900;
  line-height: 1.1;
  text-transform: uppercase;
  white-space: nowrap;
}
.quick-units b {
  color: var(--gold);
  font-weight: 900;
}
.quick-tfo {
  min-height: 30px;
  display: grid;
  grid-template-columns: minmax(58px, 1fr) auto;
  gap: 2px 5px;
  align-items: center;
  border: 1px solid #2d3339;
  border-radius: 5px;
  background: #101409;
  padding: 3px 5px;
}
.quick-tfo span {
  grid-column: 1 / -1;
  color: var(--silver);
  font-size: 8px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}
.quick-tfo strong {
  color: var(--gold);
  font-size: 13px;
  line-height: 1;
  max-width: none;
  min-width: 0;
  overflow: visible;
  white-space: nowrap;
}
.quick-tfo button {
  min-height: 18px;
  padding: 2px 5px;
  border-radius: 4px;
  font-size: 9px;
}
.quick-joint label {
  gap: 3px;
  color: var(--silver);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}
.quick-joint input {
  min-height: 28px;
  border-radius: 5px;
  padding: 5px 7px;
  font-size: 13px;
  text-align: center;
}
.quick-joint-readouts {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
}
.quick-joint-readouts div {
  min-width: 0;
  border: 1px solid #2d3339;
  border-radius: 5px;
  background: #101409;
  padding: 4px 6px;
}
.quick-joint-readouts span {
  display: block;
  color: var(--silver);
  font-size: 9px;
  line-height: 1;
  font-weight: 900;
  text-transform: uppercase;
}
.quick-joint-readouts strong {
  display: block;
  margin-top: 3px;
  color: var(--gold);
  font-size: 12px;
  line-height: 1.05;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.autosave-pill { display: flex; align-items: center; gap: 8px; color: var(--silver); font-size: 12px; font-weight: 900; border: 1px solid #333940; background: #090b0c; border-radius: 999px; padding: 6px 10px; white-space: nowrap; }

.trimble-import-panel { border-color: rgba(50, 205, 90, .42); }
.trimble-import-grid,
.trimble-alignment-controls { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; align-items: end; }
.trimble-import-grid label,
.trimble-alignment-controls label { display: grid; gap: 6px; color: var(--silver); font-weight: 800; }
.trimble-import-grid input,
.trimble-import-grid select,
.trimble-alignment-controls select,
.trimble-dimension-prompt input { width: 100%; }
.trimble-alignment-controls { margin-top: 14px; }
.trimble-import-status,
.trimble-dimension-prompt { margin-top: 14px; border: 1px solid #343b42; background: #090b0c; border-radius: 10px; padding: 12px 14px; color: var(--silver); }
.trimble-import-status.ok { border-color: rgba(50, 205, 90, .55); color: #7dec9a; }
.trimble-import-status.error { border-color: rgba(255, 82, 82, .6); color: #ff8d8d; }
.trimble-dimension-prompt { display: grid; gap: 8px; border-color: rgba(246, 184, 43, .45); }
.trimble-survey-preview { margin-top: 14px; max-height: 270px; overflow: auto; }
.cartman-save-badge { color: #69df89; font-size: 12px; }
.profile-tvd-line { stroke: #d7dce0; stroke-width: 1.35; stroke-dasharray: 5 4; }
.profile-tvd-label {
  fill: #f3f4f5;
  paint-order: stroke;
  stroke: #090b0c;
  stroke-width: 3px;
  font-size: 9px;
  font-weight: 850;
}
.profile-core-sample > line { stroke: #d7dce0; stroke-width: 1; }
.profile-core-layer rect { stroke: #090b0c; stroke-width: .8; opacity: .94; }
.profile-core-fill-0 { fill: #d7dce0; }
.profile-core-fill-1 { fill: #8f969b; }
.profile-core-fill-2 { fill: #b8bec2; }
.profile-core-fill-3 { fill: #686f74; }
.profile-core-layer text { fill: #f3f4f5; font-size: 8px; font-weight: 800; paint-order: stroke; stroke: #090b0c; stroke-width: 2px; }
.profile-core-title { fill: #f1b82d; font-size: 10px; font-weight: 900; paint-order: stroke; stroke: #090b0c; stroke-width: 2px; }
.profile-cad-dimension line { stroke: #aeb6bc; stroke-width: 1; opacity: .92; }
.profile-cad-dimension .dimension-line { fill: none; stroke: #d7dce0; stroke-width: 1.4; }
.profile-cad-dimension circle { fill: #d7dce0; }
.profile-cad-dimension text {
  fill: #f3f4f5;
  paint-order: stroke;
  stroke: #090b0c;
  stroke-width: 4px;
  font-size: 11px;
  font-weight: 900;
}
.bore-coordinate-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, .72fr);
  gap: 12px;
  padding: 10px;
  border: 1px solid rgba(246, 184, 43, .55);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(246, 184, 43, .08), rgba(8, 10, 11, .98) 46%);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .32);
}
.bore-coordinate-readouts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--gold-2);
  border-radius: 12px;
  background: var(--gold-2);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .28), inset 0 1px 0 rgba(255, 255, 255, .05);
}
.bore-coordinate-readouts > div {
  min-width: 0;
  padding: 11px 14px;
  background: linear-gradient(135deg, #171a1d, #090b0c);
}
.bore-coordinate-readouts span {
  display: block;
  margin-bottom: 5px;
  color: var(--gold);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.bore-coordinate-readouts strong {
  display: block;
  overflow: hidden;
  color: var(--white);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bore-coordinate-controls {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr auto;
  gap: 8px;
  align-content: center;
  align-items: end;
  min-width: 0;
}
.bore-coordinate-controls label {
  min-width: 0;
  color: var(--gold);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.bore-coordinate-controls select,
.bore-coordinate-controls button {
  width: 100%;
  min-height: 32px;
  margin-top: 4px;
  padding: 5px 8px;
  font-size: 10px;
}
.bore-coordinate-controls button { width: auto; white-space: nowrap; }
.bore-coordinate-status {
  grid-column: 1 / -1;
  overflow: hidden;
  color: var(--silver);
  font-size: 10px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (max-width: 760px) {
  .bore-coordinate-panel { grid-template-columns: 1fr; }
  .bore-coordinate-readouts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bore-coordinate-controls { grid-template-columns: 1fr 1fr; }
}
#saveDot { width: 10px; height: 10px; border-radius: 50%; background: #6f7c84; }
#saveDot.dirty { background: var(--gold); }
#saveDot.saved { background: #5abf7a; }
#saveDot.error { background: #cf5b5b; }
.page { border: 1px solid var(--line); border-radius: 8px; background: var(--panel); padding: 14px; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.page-header p { color: var(--silver); margin-top: 3px; }
.action-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.section-band { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 14px; }
.section-band:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.section-band h4 { margin: 0 0 10px; font-size: 13px; color: var(--white); letter-spacing: 0; }
.compact-title { margin-bottom: 6px; }
.compact-title input[type="file"] {
  width: auto;
  max-width: 260px;
  min-height: 34px;
  padding: 5px 7px;
}
.field-hint {
  color: var(--silver);
  font-size: 12px;
  margin: 0 0 8px;
}
.ap-import-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}
.ap-page { display: grid; gap: 12px; }
.ap-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}
.ap-title-row h3 { font-size: 22px; margin: 0 0 4px; }
.ap-title-row p { color: var(--silver); }
.annular-report-shell {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #0d1012, #060708);
  padding: 14px;
  min-width: 0;
}
.annular-report-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.annular-report-head h4 { margin: 0; font-size: 18px; }
.annular-report-head span { color: var(--silver); font-size: 12px; font-weight: 800; }
.annular-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 14px;
  max-width: 620px;
}
.annular-legend span { display: inline-flex; align-items: center; gap: 6px; color: var(--silver); }
.annular-legend i { width: 24px; height: 4px; border-radius: 999px; display: inline-block; }
.legend-actual { background: var(--white); }
.legend-static { background: #aeb5bb; }
.legend-plan { background: var(--gold); }
.legend-limit { background: #f4f5f6; border: 1px dashed #111; }
.legend-overburden { background: #d9dee3; }
.legend-zone { height: 10px !important; background: rgba(205, 211, 216, 0.25); border: 1px solid #b8bec4; }
.legend-path { background: repeating-linear-gradient(90deg, #aeb5bb 0 6px, transparent 6px 10px); }
.annular-report-visual {
  min-height: min(58vh, 580px);
  border: 1px solid #252b30;
  border-radius: 10px;
  background: radial-gradient(circle at 50% 0%, rgba(255, 184, 28, 0.05), transparent 42%), #030404;
  overflow: hidden;
}
.annular-report-visual svg { width: 100%; height: 100%; display: block; min-height: inherit; }
.annular-summary-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(115px, 1fr));
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: auto;
  background: #080a0b;
}
.annular-summary-strip div {
  min-height: 56px;
  padding: 9px 11px;
  border-right: 1px solid #252b30;
}
.annular-summary-strip div:last-child { border-right: 0; }
.annular-summary-strip span {
  display: block;
  color: var(--silver);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}
.annular-summary-strip strong {
  display: block;
  margin-top: 5px;
  color: var(--gold);
  font-size: 18px;
}
.ap-support-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.95fr 0.85fr;
  gap: 12px;
  align-items: stretch;
}
.ap-panel, .ap-chart-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #080a0b;
  padding: 12px;
  min-width: 0;
}
.ap-panel-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.ap-panel-title h4 { margin: 0; font-size: 15px; }
.ap-panel-title span { color: var(--silver); font-size: 11px; font-weight: 800; }
.ap-compact-imports, .ap-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 10px;
}
.ap-settings-grid label, .ap-compact-imports label { font-size: 11px; }
.ap-settings-grid input, .ap-settings-grid select, .ap-compact-imports input {
  min-height: 32px;
  padding: 5px 8px;
  border-radius: 5px;
}
.ap-raw-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}
.ap-import-box {
  min-height: 70px;
  max-height: 115px;
  font-size: 12px;
}
.ap-formation-list { display: grid; gap: 7px; max-height: 208px; overflow: auto; }
.ap-formation-chip {
  border: 1px solid #2b3238;
  border-radius: 6px;
  background: #0c0f11;
  padding: 8px 9px;
}
.ap-formation-chip strong { display: block; color: var(--white); font-size: 13px; }
.ap-formation-chip span, .ap-formation-chip em { display: block; color: var(--silver); font-size: 11px; font-style: normal; margin-top: 2px; }
.ap-chart-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.ap-visual { min-height: 260px; }
.ap-table { max-height: 310px; overflow: auto; }
.ap-workspace {
  display: grid;
  gap: 12px;
  min-width: 0;
}
.ap-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}
.ap-header-row h3 {
  font-size: 22px;
  margin: 0;
}
.ap-file-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 13px;
  min-width: 136px;
  min-height: 38px;
  border: 1px solid var(--gold-2);
  background: var(--gold);
  color: #111111;
  border-radius: 6px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}
.ap-chart-panel .visual-title button {
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid var(--gold-2);
  background: var(--gold);
  color: #111;
  border-radius: 6px;
  font-weight: 900;
}
.ap-file-button input {
  display: none;
}
.ap-status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-height: 0;
}
.ap-status-row div {
  border: 1px solid #684a28;
  background: #241a10;
  color: #f4d7aa;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 800;
}
.ap-status-row .ok {
  border-color: #2d6540;
  background: #102018;
  color: #bfe8cc;
}
.ap-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 450px;
  gap: 12px;
  align-items: stretch;
}
.annular-report-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #080a0b;
  padding: 12px;
  min-width: 0;
}
.ap-control-rail {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #080a0b;
  padding: 12px;
  min-width: 0;
}
.ap-input-grid {
  display: grid;
  grid-template-columns: repeat(2, max-content);
  gap: 8px 10px;
  align-items: end;
}
.ap-input-grid label {
  gap: 4px;
  font-size: 11px;
  width: min-content;
  color: var(--gold);
  font-weight: 900;
}
.ap-input-grid input,
.ap-input-grid select {
  min-height: 32px;
  width: 15ch;
  max-width: 15ch;
  padding: 5px 8px;
  border-radius: 5px;
}
.ap-input-note {
  margin: 9px 0 0;
  color: var(--silver);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
}
.ap-readout-stack {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}
.ap-readout-stack div {
  min-height: 54px;
  border: 1px solid #2f363c;
  border-radius: 6px;
  background: linear-gradient(145deg, #111508, #080a08);
  padding: 8px 9px;
}
.ap-readout-stack span {
  display: block;
  color: var(--silver);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}
.ap-readout-stack strong {
  display: block;
  margin-top: 4px;
  color: var(--gold);
  font-size: 17px;
  line-height: 1.1;
}
.legend-min { background: var(--silver); }
.ap-formation-title { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.ap-formation-table {
  max-height: 260px;
  overflow: auto;
  border: 1px solid #2f363c;
  border-radius: 6px;
}
.ap-formation-table table { width: 100%; border-collapse: collapse; font-size: 10px; }
.ap-formation-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: var(--gold);
  background: #111416;
  text-align: left;
  padding: 7px 6px;
  border-bottom: 1px solid #3a4147;
}
.ap-formation-table td { color: var(--silver); padding: 6px; border-bottom: 1px solid #252b30; }
.ap-formation-table td:first-child { color: var(--white); font-weight: 900; }
.ap-chart-gridline { stroke: #252b30; stroke-width: 1; }
.ap-chart-gridline.major { stroke: #394047; }
.ap-chart-axis { stroke: #8d959c; stroke-width: 1.2; }
.ap-chart-axis-label { fill: #c7cbd0; font-size: 12px; font-weight: 800; }
.ap-chart-tick { fill: #9fa6ac; font-size: 10px; font-weight: 700; }
.ap-chart-plan { fill: none; stroke: var(--gold); stroke-width: 4; }
.ap-chart-operating-zone { fill: rgba(194, 201, 207, 0.18); stroke: none; }
.ap-chart-soil-limit { fill: none; stroke: #d0c45f; stroke-width: 3; }
.ap-chart-minimum, .ap-chart-maximum { fill: none; stroke: #d8dde1; stroke-width: 1.8; }
.ap-chart-drill-path { fill: none; stroke: #aeb5bb; stroke-width: 2.2; stroke-dasharray: 9 5 2 5; }
.ap-chart-limit { fill: none; stroke: #f1f2f3; stroke-width: 2; stroke-dasharray: 9 6; }
.ap-chart-static { fill: none; stroke: #aeb5bb; stroke-width: 2.2; stroke-dasharray: 4 5; }
.ap-chart-actual { fill: none; stroke: #fff; stroke-width: 3; }
.ap-chart-actual-dot { fill: #fff; stroke: #090a0b; stroke-width: 2; }
.ap-chart-static-dot { fill: #aeb5bb; stroke: #090a0b; stroke-width: 1.5; }
.ap-chart-margin-safe { fill: rgba(255, 184, 28, 0.08); }
.ap-chart-formation-band { fill: #111518; stroke: #343b41; stroke-width: 1; }
.ap-chart-formation-band.alt { fill: #171b1e; }
.ap-chart-formation-label { fill: #d4d8dc; font-size: 10px; font-weight: 900; }
.ap-chart-callout { fill: #ffb81c; font-size: 11px; font-weight: 900; }
.ap-workspace .annular-report-visual {
  min-height: min(58vh, 560px);
}
.ap-workspace .annular-report-head {
  align-items: center;
  margin-bottom: 8px;
}
.ap-workspace .annular-legend {
  justify-content: flex-end;
}
.ap-workspace .ap-chart-panel {
  background: #080a0b;
}
.ap-table-panel {
  grid-column: 1 / -1;
}
.ap-table table {
  width: 100%;
  min-width: 1120px;
  border-collapse: collapse;
  font-size: 12px;
}
.ap-table th,
.ap-table td {
  border: 1px solid #252b30;
  padding: 7px 8px;
  white-space: nowrap;
  text-align: right;
}
.ap-table th {
  position: sticky;
  top: 0;
  background: #111518;
  color: var(--gold);
  text-transform: uppercase;
  font-size: 10px;
  font-weight: 900;
  z-index: 1;
}
.ap-table td {
  background: #070809;
  color: var(--white);
  font-weight: 750;
}
.ap-table tr:nth-child(even) td {
  background: #0a0d0e;
}
.ap-table td:nth-child(5) {
  color: var(--silver);
  text-align: left;
}
.abia-page-header {
  align-items: center;
  border-bottom: 1px solid #252b30;
  margin-bottom: 14px;
}
.abia-workspace {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.abia-chart-panel,
.abia-side,
.abia-table-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(18, 21, 23, 0.94), rgba(7, 9, 10, 0.96));
}
.abia-chart-panel {
  min-height: 410px;
  padding: 16px;
}
.abia-chart-head,
.abia-table-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.abia-chart-head h4,
.abia-table-title h4,
.abia-side h4 {
  margin: 0;
  font-size: 18px;
  color: var(--white);
}
.abia-chart-head span,
.abia-table-title span {
  color: var(--silver);
  font-size: 12px;
  font-weight: 800;
}
.abia-legend {
  display: flex;
  gap: 14px;
  align-items: center;
  color: var(--silver);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}
.abia-legend i {
  width: 24px;
  height: 4px;
  display: inline-block;
  margin-right: 6px;
  border-radius: 999px;
  vertical-align: middle;
}
.legend-abia { background: var(--gold); }
.legend-p2 { background: #d8dde2; }
.abia-chart {
  min-height: 330px;
  border: 1px solid #232a2f;
  border-radius: 6px;
  background: #080a0b;
  overflow: hidden;
}
.abia-chart svg {
  width: 100%;
  min-height: 330px;
  display: block;
}
.chart-grid {
  stroke: #20272c;
  stroke-width: 1;
}
.chart-axis {
  stroke: #5d6871;
  stroke-width: 1.5;
}
.chart-empty {
  fill: #7f8993;
  font-size: 17px;
  font-weight: 900;
}
.chart-label,
.chart-tick {
  fill: #9aa3ad;
  font-size: 12px;
  font-weight: 900;
}
.abia-line-abia,
.abia-line-p2 {
  fill: none;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.abia-line-abia { stroke: var(--gold); }
.abia-line-p2 { stroke: #d8dde2; }
.abia-error-line {
  stroke: #737d85;
  stroke-width: 2;
  stroke-dasharray: 5 5;
}
.abia-dot-abia { fill: var(--gold); stroke: #070809; stroke-width: 2; }
.abia-dot-p2 { fill: #d8dde2; stroke: #070809; stroke-width: 2; }
.abia-side {
  padding: 0;
  border: 0;
  background: transparent;
}
.abia-readouts {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}
.abia-readouts div {
  min-height: 68px;
  border: 1px solid #2f363c;
  border-radius: 8px;
  background: linear-gradient(180deg, #12160d, #090c08);
  padding: 11px;
  border-top-color: #8f721e;
}
.abia-readouts span {
  display: block;
  color: var(--silver);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}
.abia-readouts strong {
  display: block;
  margin-top: 5px;
  color: var(--gold);
  font-size: 18px;
  line-height: 1.1;
}
.abia-table-panel {
  padding: 14px;
}
.abia-table-wrap {
  height: clamp(320px, 46vh, 540px);
  max-height: none;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable both-edges;
  border-radius: 6px;
  border-color: #4a3b16;
  box-shadow: inset 0 0 0 1px rgba(246, 190, 0, 0.05);
}
.sheet-table.abia-table {
  min-width: 1180px;
}
.sheet-table.abia-table th {
  color: var(--gold);
}
.sheet-table.abia-table td.formula-cell {
  background: #101508;
  color: var(--gold);
}
.sheet-table.abia-table input:not(.wide-col) {
  max-width: 110px;
}
.rivcross-import-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}
.import-box {
  min-height: 180px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.4;
}
.rivcross-import { min-height: 220px; }
.sheet-table-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #090b0c;
  overflow: auto;
  max-height: 68vh;
}
#trimbleSurveyPreview {
  height: clamp(260px, 36vh, 380px);
  max-height: clamp(260px, 36vh, 380px);
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable both-edges;
}
#trimbleSurveyPreview > table {
  width: 100%;
  min-width: 880px;
  border-collapse: collapse;
  font-size: 12px;
}
#trimbleSurveyPreview th,
#trimbleSurveyPreview td {
  padding: 8px 9px;
  border-bottom: 1px solid #2a3035;
  text-align: right;
  white-space: nowrap;
}
#trimbleSurveyPreview th:first-child,
#trimbleSurveyPreview td:first-child {
  text-align: left;
}
#trimbleSurveyPreview th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #171a1d;
  color: var(--white);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  box-shadow: 0 1px 0 #3a4249;
}
.sheet-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  font-size: 12px;
}
.sheet-table th,
.sheet-table td {
  border: 1px solid #2a3035;
  padding: 0;
  white-space: nowrap;
}
.sheet-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #171a1d;
  color: var(--white);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
  padding: 8px;
}
.sheet-table td.formula-cell,
.sheet-table td.static-cell {
  min-width: 76px;
  padding: 7px 8px;
  background: #101315;
  color: var(--white);
  text-align: right;
  font-weight: 800;
}
.sheet-table td.static-cell {
  color: var(--silver);
  text-align: left;
  font-weight: 700;
}
.sheet-table input,
.sheet-table select {
  min-height: 32px;
  border: 0;
  border-radius: 0;
  background: #070809;
  padding: 6px 8px;
  font-size: 12px;
}
.sheet-table input:focus,
.sheet-table select:focus {
  outline: 2px solid var(--gold);
  outline-offset: -2px;
}
.sheet-table .wide-col { min-width: 190px; }
.drill-log-page-header {
  margin: 0;
  align-items: center;
  padding: 12px 0 10px;
  border-bottom: 1px solid #232a2f;
  flex-wrap: wrap;
  display: grid;
  grid-template-columns: minmax(210px, auto) minmax(360px, 760px) minmax(0, auto);
  justify-content: stretch;
}
.drill-log-heading {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.drill-log-heading h3 {
  flex: 0 0 auto;
  white-space: nowrap;
}
.active-pass-badge {
  min-width: 0;
  max-width: 230px;
  display: inline-grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border: 1px solid #6f5a1d;
  border-radius: 999px;
  background: linear-gradient(180deg, #17150e, #090a0a);
  box-shadow: inset 0 0 0 1px rgba(255, 190, 35, 0.06);
}
.active-pass-badge span {
  color: var(--silver);
  font-size: 9px;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.active-pass-badge strong {
  min-width: 0;
  overflow: hidden;
  color: var(--gold);
  font-size: 11px;
  font-weight: 950;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.page[data-page="steering"] {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0 clamp(14px, 1.4vw, 24px);
  min-width: 0;
  overflow: hidden;
}
.drill-log-header-readouts {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(118px, 1fr));
  gap: 1px;
  max-width: 760px;
  border: 1px solid #252c32;
  background: #252c32;
}
.drill-log-header-readouts div {
  min-height: 43px;
  display: grid;
  align-content: center;
  padding: 7px 10px;
  background: #080a0b;
}
.drill-log-header-readouts span {
  color: var(--silver);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}
.drill-log-header-readouts strong {
  color: var(--gold);
  font-size: 15px;
  line-height: 1.2;
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.drill-log-page-header .action-row {
  flex: 0 0 auto;
  min-width: 0;
}
.drill-log-workspace {
  display: grid;
  gap: 0;
  min-width: 0;
}
.drill-log-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(110px, 1fr)) minmax(190px, 1.4fr);
  gap: 8px;
}
.drill-log-summary {
  min-height: 54px;
  border: 1px solid #303840;
  border-radius: 7px;
  background: linear-gradient(180deg, #111516, #090b0c);
  padding: 9px 10px;
  display: grid;
  align-content: center;
}
.drill-log-summary span {
  color: var(--silver);
  font-size: 10px;
  line-height: 1;
  font-weight: 900;
  text-transform: uppercase;
}
.drill-log-summary strong {
  color: var(--gold);
  font-size: 18px;
  line-height: 1.1;
  margin-top: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.drill-log-summary-wide strong {
  color: var(--white);
  font-size: 14px;
}
.drill-log-table-shell {
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
  min-width: 0;
}
.drill-log-table-title {
  min-height: 42px;
  display: grid;
  grid-template-columns: minmax(140px, 1fr) auto auto auto;
  align-items: center;
  justify-content: stretch;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #252b30;
  background: transparent;
  min-width: 0;
}
.pump-rate-control {
  display: grid;
  grid-template-columns: auto 74px auto;
  align-items: center;
  gap: 6px;
  color: var(--silver);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.pump-rate-control input {
  min-height: 28px;
  width: 74px;
  padding: 3px 7px;
  border-radius: 5px;
  font-size: 12px;
}
.pump-rate-control button {
  min-height: 28px;
  padding: 4px 8px;
  border-radius: 5px;
  font-size: 11px;
}
.pump-rate-control .pump-rate-set {
  border-color: var(--gold-2);
  background: linear-gradient(180deg, #f8c84b, var(--gold));
  color: #111;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.35);
}
.radius-window-control {
  display: flex;
  grid-auto-flow: column;
  align-items: center;
  gap: 8px;
  color: var(--silver);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.radius-window-control select {
  width: 76px;
  min-height: 28px;
  padding: 3px 7px;
  font-size: 12px;
}
.drill-log-table-title h4 {
  margin: 0;
  font-size: 14px;
  min-width: 0;
}
.drill-log-table-title span {
  color: var(--silver);
  font-size: 12px;
  font-weight: 800;
}
.drill-log-table-wrap {
  border: 1px solid #252c32;
  border-radius: 0;
  max-height: calc(100vh - 245px);
  background: #050607;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: auto;
}
.drill-log-scrollbar {
  position: sticky;
  top: 0;
  z-index: 5;
  height: 15px;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid #343b41;
  border-bottom: 0;
  background: #090b0c;
  scrollbar-color: var(--gold) #15191c;
}
.drill-log-scrollbar > div {
  height: 1px;
  min-width: 100%;
}
.drill-log-table {
  width: max-content;
  min-width: 100%;
  font-size: 12px;
}
.drill-log-table th {
  background: #101417;
  color: var(--gold);
  height: 30px;
  padding: 6px 8px;
}
.drill-log-table td {
  border-color: #252b30;
}
.drill-log-table td.selected {
  background: rgba(241, 184, 45, 0.18);
  box-shadow: inset 0 0 0 1px rgba(241, 184, 45, 0.8);
}
.drill-log-table td.selected input {
  background: rgba(241, 184, 45, 0.09);
}
.drill-log-table td:focus {
  outline: none;
}
.drill-log-table td.selected:focus,
.drill-log-table td:focus-within {
  position: relative;
  z-index: 1;
  box-shadow: inset 0 0 0 2px var(--gold), 0 0 0 1px rgba(0, 0, 0, 0.75);
}
.drill-log-table {
  user-select: none;
}
.drill-log-table input {
  user-select: text;
}
.drill-log-table input {
  width: 100%;
  min-height: 28px;
  padding: 4px 7px;
  background: #050607;
  text-align: center;
}
.drill-log-table tr:nth-child(even) input {
  background: #080a0b;
}
.drill-log-table .wide-col {
  min-width: 300px;
  text-align: left;
}
.drill-log-table .time-col,
.drill-log-table input.time-col {
  width: 78px;
  min-width: 78px;
}
.drill-log-table .date-col,
.drill-log-table input.date-col {
  width: 118px;
  min-width: 118px;
}
.drill-log-table .steer-col,
.drill-log-table input.steer-col {
  width: 82px;
  min-width: 82px;
}
.drill-log-table th:not(.wide-col):not(.steer-col):not(.course-length-col):not(.md-bit-col):not(.incl-col):not(.az-col):not(.joint-col):not(.down-col):not(.date-col),
.drill-log-table td:not(.wide-col):not(.steer-col):not(.course-length-col):not(.md-bit-col):not(.incl-col):not(.az-col):not(.joint-col):not(.down-col):not(.date-col) {
  width: 68px;
  min-width: 68px;
}
.drill-log-table th.joint-col,
.drill-log-table td.joint-col {
  width: 46px;
  min-width: 46px;
}
.drill-log-table th.down-col,
.drill-log-table td.down-col {
  width: 96px;
  min-width: 96px;
}
.drill-log-table th.course-length-col,
.drill-log-table td.course-length-col {
  width: 72px;
  min-width: 72px;
}
.drill-log-table th.md-bit-col,
.drill-log-table td.md-bit-col {
  width: 90px;
  min-width: 90px;
}
.drill-log-table th.incl-col,
.drill-log-table td.incl-col {
  width: 74px;
  min-width: 74px;
}
.drill-log-table th.az-col,
.drill-log-table td.az-col {
  width: 86px;
  min-width: 86px;
}
.drill-log-table .static-cell,
.drill-log-table .formula-cell {
  background: #10140c;
  color: var(--gold);
  text-align: center;
}
.drill-log-table .radius-col {
  min-width: 76px;
}
.drill-log-table td.selected,
.drill-log-table tbody tr:nth-child(even) td.selected {
  background: rgba(241, 184, 45, 0.2) !important;
  box-shadow: inset 0 0 0 1px rgba(241, 184, 45, 0.9);
}
.drill-log-table td.selected input,
.drill-log-table tbody tr:nth-child(even) td.selected input {
  background: rgba(241, 184, 45, 0.12) !important;
}
.time-stamp-cell {
  position: relative;
}
.time-stamp-button {
  position: absolute;
  top: 50%;
  right: 5px;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  min-height: 18px;
  border: 1px solid var(--gold-2);
  border-radius: 50%;
  background: var(--gold);
  color: #111;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  padding: 0;
}
.time-stamp-cell {
  text-align: center;
}
.time-stamp-cell input {
  width: 100%;
  min-width: 0;
  padding-left: 7px;
  padding-right: 24px;
}
.downtime-cell {
  position: relative;
  text-align: center;
}
.downtime-cell input {
  width: 100%;
  min-width: 0;
  padding-right: 54px;
}
.downtime-button {
  position: absolute;
  top: 50%;
  right: 5px;
  transform: translateY(-50%);
  min-height: 24px;
  height: 24px;
  padding: 2px 8px;
  border: 1px solid var(--gold-2);
  border-radius: 5px;
  background: var(--gold);
  color: #111;
  font-size: 11px;
  font-weight: 900;
}
.downtime-button.stop {
  border-color: #7f2424;
  background: #cf3a3a;
  color: #fff;
}
.downtime-value {
  display: inline-block;
  color: var(--gold);
  font-weight: 900;
}
.modal-card {
  width: min(920px, calc(100vw - 44px));
  max-height: min(720px, calc(100vh - 64px));
  overflow: auto;
  border: 1px solid #3c454d;
  border-radius: 8px;
  background: #0b0d0f;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.72);
}
.radius-modal-card {
  width: min(1120px, calc(100vw - 44px));
}
.cad-points-modal-card {
  width: min(1080px, calc(100vw - 44px));
}
.new-project-modal {
  width: min(760px, 94vw);
}
.new-project-form,
.quick-rocky-body {
  display: grid;
  gap: 14px;
  padding: 14px;
}
.new-project-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.new-project-fields label:first-child,
.new-project-fields label:nth-child(3) {
  grid-column: span 2;
}
.desktop-shortcut-check {
  justify-self: start;
}
.folder-plan-preview {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #080a0b;
  padding: 12px;
}
.folder-plan-preview h4 {
  margin: 0 0 8px;
  font-size: 14px;
}
.folder-plan-preview strong {
  display: block;
  color: var(--gold);
  margin-bottom: 8px;
}
.folder-plan-preview ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 14px;
  margin: 0;
  padding-left: 18px;
  color: var(--silver);
  font-size: 12px;
  font-weight: 800;
}
.folder-plan-preview small {
  display: block;
  margin-top: 10px;
  color: var(--white);
  font-weight: 800;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.quick-rocky-modal {
  width: min(820px, 94vw);
}
.quick-rocky-body textarea {
  min-height: 160px;
}
.quick-rocky-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}
.quick-rocky-actions .inline-check {
  margin-right: auto;
}
.cad-points-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(110px, 150px)) auto auto;
  gap: 10px;
  align-items: end;
  padding: 14px 16px 0;
}
.cad-points-controls input {
  width: 100%;
}
.cad-points-output {
  display: grid;
  gap: 12px;
  padding: 14px 16px 16px;
}
.cad-copy-block {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #080a0b;
  overflow: hidden;
}
.cad-copy-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 11px;
  border-bottom: 1px solid #263037;
}
.cad-copy-head strong {
  color: var(--gold);
}
.cad-copy-head span {
  color: var(--silver);
  font-size: 12px;
  font-weight: 800;
}
.cad-copy-block textarea {
  min-height: 150px;
  border: 0;
  border-radius: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre;
  resize: vertical;
}
.drill-log-cad-panel {
  border-top: 1px solid #252c32;
  background: #070809;
  padding: 12px;
}
.cad-inline-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.drill-cad-scale-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}
.drill-cad-scale-controls label {
  display: grid;
  grid-template-columns: auto auto 66px;
  align-items: center;
  gap: 4px;
  color: var(--silver);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}
.drill-cad-scale-controls input {
  width: 66px;
  min-height: 28px;
  padding: 3px 6px;
  color: var(--gold);
  text-align: right;
}
.cad-inline-head h4 {
  margin: 0;
  color: var(--gold);
  font-size: 14px;
}
.cad-inline-head span {
  display: block;
  margin-top: 3px;
  color: var(--silver);
  font-size: 12px;
  font-weight: 800;
}
.cad-points-inline-output {
  grid-template-columns: repeat(3, minmax(240px, 1fr));
  padding: 0;
}
.cad-copy-inline-block {
  min-width: 0;
}
.cad-copy-inline-block .cad-copy-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
}
.cad-inline-table-scroll {
  max-height: clamp(220px, 28vh, 360px);
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
.cad-copy-one {
  min-height: 28px;
  padding: 4px 9px;
  border-radius: 5px;
  font-size: 11px;
}
.cad-inline-table {
  width: 100%;
  border-collapse: collapse;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
}
.cad-inline-table th,
.cad-inline-table td {
  border: 1px solid #252b30;
  padding: 5px 7px;
  text-align: right;
  white-space: nowrap;
}
.cad-inline-table .cad-jt-cell {
  width: 54px;
  color: var(--silver);
  background: #101417;
  text-align: center;
  font-weight: 900;
}
.cad-inline-table .cad-value-cell {
  font-weight: 900;
  color: var(--white);
  text-align: left;
  letter-spacing: 0;
}
.cad-inline-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: var(--silver);
  background: #101417;
  font-size: 10px;
  text-transform: uppercase;
}
.radius-all-table {
  padding: 0 16px 16px;
  overflow: auto;
}
.radius-matrix {
  min-width: 980px;
}
.modal-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  border-bottom: 1px solid #2b3238;
}
.modal-title-row p {
  color: var(--silver);
  margin-top: 3px;
}
.pass-manager-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}
.pass-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid #333b42;
  border-radius: 7px;
  background: #090b0c;
  padding: 10px;
}
.pass-row strong,
.pass-row span {
  display: block;
}
.pass-row span {
  color: var(--silver);
  font-size: 12px;
  margin-top: 3px;
}
.pass-row button {
  border: 1px solid var(--gold-2);
  background: var(--gold);
  color: #111;
  min-height: 34px;
  border-radius: 6px;
  font-weight: 900;
}
.pass-row-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}
.pass-row-actions button.danger {
  border-color: #7f2424;
  background: #2b1111;
  color: #ffb5b5;
}
.ap-results { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.grid { display: grid; gap: 12px; }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.page-nav { display: flex; gap: 4px; border-bottom: 1px solid #252b30; overflow-x: auto; min-height: 32px; scrollbar-width: thin; }
.page-nav button { border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--silver); padding: 6px 9px; font-size: 12px; font-weight: 900; white-space: nowrap; }
.page-nav button.active { color: var(--white); border-color: var(--gold); background: rgba(241, 184, 45, 0.07); }
.page-nav button.locked,
.page-nav button:disabled {
  color: #535b61;
  cursor: not-allowed;
  opacity: 0.62;
}
.page { display: none; }
.page.active { display: block; }
.status-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid #30363b;
  background: linear-gradient(180deg, #111417, #070809);
  color: var(--silver);
  padding: 0 14px;
  font-size: 12px;
  font-weight: 800;
}
.status-left #connection {
  font-weight: 900;
}
.cartman-indicator.connected + #connection { color: #61d66f; }
.cartman-indicator.reconnecting + #connection { color: var(--gold); }
.cartman-indicator.offline + #connection { color: #ff6868; }
.status-left, .status-right { display: flex; align-items: center; gap: 10px; min-width: 0; }
.status-right { justify-content: flex-end; }
.status-right span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cartman-indicator {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #030405;
  border: 1px solid #4d5359;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(241, 184, 45, 0.08), 0 0 12px rgba(241, 184, 45, 0.1);
}
.cartman-indicator img { width: 100%; height: 100%; object-fit: cover; transform-origin: center; }
.cartman-indicator.connected img { animation: cartmanBlink 3.6s infinite; }
.cartman-indicator.reconnecting { border-color: var(--gold-2); }
.cartman-indicator.offline { border-color: #cf5b5b; filter: grayscale(0.9); }
@keyframes cartmanBlink {
  0%, 88%, 92%, 100% { transform: scaleY(1); }
  90% { transform: scaleY(0.12); }
}
.job-info-page {
  padding: 0;
  overflow-x: auto;
  overflow-y: visible;
}
.job-sheet-toolbar {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  background: #090b0c;
}
.job-sheet-toolbar h3 {
  font-size: 16px;
  letter-spacing: 0;
}
.job-toolbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}
.coord-title-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.coord-title-tools .secondary-button {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 12px;
}
.job-sheet {
  display: grid;
  grid-template-columns: 1.08fr 1.12fr 1.1fr 1.35fr 1.18fr 1.18fr;
  gap: 0;
  min-width: 1220px;
  background: #101315;
}
.job-info-board {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(315px, 0.34fr);
  gap: 10px;
  padding: 10px;
  background: #0d1012;
}
.job-inputs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-content: start;
}
.job-card {
  min-width: 0;
  border: 1px solid #30363b;
  border-radius: 7px;
  background: linear-gradient(180deg, #101315, #080a0b);
  padding: 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}
.job-card-wide { grid-column: 1 / -1; }
.job-card h4 {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: 13px;
  line-height: 1.1;
  font-weight: 900;
}
.job-card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.job-card-title h4 { margin: 0; }
.job-card-kicker {
  margin-top: 4px;
  color: var(--silver);
  font-size: 10px;
  line-height: 1.25;
  font-weight: 750;
}
.job-setup-sections {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 10px;
}
.job-setup-group {
  border: 1px solid #293139;
  border-radius: 7px;
  background: linear-gradient(145deg, rgba(18, 22, 24, 0.96), rgba(7, 9, 10, 0.98));
  padding: 10px;
}
.job-group-heading,
.bha-group-title {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 9px;
}
.job-group-heading span,
.bha-group-title span {
  width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  border: 1px solid var(--gold-2);
  border-radius: 50%;
  background: #2a2108;
  color: var(--gold);
  font-size: 9px;
  font-weight: 950;
}
.job-group-heading strong,
.bha-group-title strong {
  color: var(--white);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.job-field-span-two { grid-column: span 2; }
.baseline-product-row {
  display: grid;
  grid-template-columns: minmax(150px, 0.55fr) minmax(230px, 1fr);
  gap: 10px;
}
.job-side-stack {
  display: grid;
  gap: 10px;
  align-content: start;
}
.baseline-product-row .job-card {
  min-height: 0;
}
.compact-two {
  grid-template-columns: repeat(2, minmax(72px, 1fr));
}
.product-grid {
  grid-template-columns: minmax(100px, 1fr) minmax(120px, 1fr);
  align-items: end;
}
.product-grid [data-product-steel] {
  grid-column: auto;
}
.product-card select {
  min-height: 32px;
}
[data-product-steel][hidden] {
  display: none !important;
}
.tooling-manager-card {
  display: grid;
  gap: 8px;
  align-content: start;
  min-height: 112px;
}
.tooling-manager-card p {
  color: var(--silver);
  font-size: 11px;
  line-height: 1.25;
  font-weight: 800;
}
.tooling-manager-card .secondary-button {
  min-height: 32px;
}
.mini-tooling-readouts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}
.mini-tooling-readouts div,
.bha-bottom-readouts div {
  min-width: 0;
  border: 1px solid #2b3238;
  border-radius: 5px;
  background: #111409;
  padding: 5px 6px;
}
.mini-tooling-readouts span,
.bha-bottom-readouts span {
  display: block;
  color: var(--silver);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}
.mini-tooling-readouts strong,
.bha-bottom-readouts strong {
  display: block;
  margin-top: 3px;
  color: var(--gold);
  font-size: 11px;
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.job-logo-tools {
  display: grid;
  grid-template-columns: minmax(160px, 220px) minmax(110px, 150px);
  gap: 8px;
  align-items: center;
}
.job-logo-tools input[type="file"] {
  min-height: 32px;
  border-radius: 5px;
  padding: 5px 7px;
  font-size: 11px;
}
.job-logo-preview {
  height: 42px;
  border: 1px dashed #4a5158;
  border-radius: 6px;
  background: #080a0b;
  display: grid;
  place-items: center;
  color: var(--silver);
  font-size: 10px;
  font-weight: 900;
  overflow: hidden;
  padding: 4px;
}
.job-logo-preview img {
  max-width: 100%;
  max-height: 34px;
  object-fit: contain;
}
.coordinate-dd-fields[hidden],
.coordinate-dms-fields[hidden] {
  display: none !important;
}
.coordinate-dms-fields {
  display: grid;
  gap: 8px;
}
.dms-point {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) repeat(3, minmax(64px, 0.65fr));
  gap: 4px 6px;
  align-items: end;
}
.dms-point strong {
  color: var(--silver);
  font-size: 11px;
  font-weight: 900;
}
.dms-point input {
  min-height: 32px;
  padding: 6px 8px;
}
.dms-inline-readouts {
  grid-column: 2 / -1;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 13px;
}
.dms-inline-readouts small {
  margin-top: 0;
  color: var(--silver);
  font-size: 9px;
  line-height: 1;
  font-weight: 900;
}
.dms-inline-readouts b {
  color: var(--gold);
}
.dms-converted-readouts,
.coord-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 8px;
}
.dms-converted-readouts div,
.coord-results div {
  border: 1px solid #2b3238;
  border-radius: 5px;
  background: #111409;
  padding: 6px 8px;
}
.dms-converted-readouts span,
.coord-results span {
  display: block;
  color: var(--silver);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}
.dms-converted-readouts strong,
.coord-results strong {
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
}
.segmented-control {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(92px, 1fr));
  border: 1px solid #3a4148;
  border-radius: 7px;
  overflow: hidden;
  background: #070809;
}
.segmented-control label {
  cursor: pointer;
  color: var(--silver);
  font-size: 11px;
  font-weight: 900;
}
.segmented-control input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.segmented-control span {
  min-height: 28px;
  display: grid;
  place-items: center;
  padding: 0 10px;
}
.segmented-control input:checked + span {
  background: linear-gradient(180deg, #ffd45f, var(--gold));
  color: #111111;
}
.bha-title-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}
.bha-workspace-card {
  border-color: #5c4815;
  background:
    linear-gradient(135deg, rgba(241, 184, 45, 0.055), transparent 34%),
    linear-gradient(180deg, #111416, #07090a);
}
.tooling-control-rail {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto minmax(220px, 0.72fr);
  gap: 10px;
  align-items: end;
  margin-bottom: 10px;
  border: 1px solid #343b41;
  border-left: 3px solid var(--gold);
  border-radius: 7px;
  background: #090c0d;
  padding: 9px;
}
.tooling-rail-label {
  display: block;
  margin-bottom: 4px;
  color: var(--silver);
  font-size: 9px;
  font-weight: 950;
  text-transform: uppercase;
}
.tooling-control-rail .active-tooling-summary {
  margin: 0;
}
.tooling-control-rail > button {
  min-height: 36px;
}
.bha-assembly-groups {
  display: grid;
  grid-template-columns: 1.25fr 1fr 0.9fr 0.9fr;
  gap: 9px;
  align-items: stretch;
}
.bha-field-group {
  min-width: 0;
  border: 1px solid #30373d;
  border-radius: 7px;
  background: linear-gradient(180deg, #111517, #080a0b);
  padding: 10px;
}
.bha-field-group-accent {
  border-color: #6a5217;
  box-shadow: inset 0 2px 0 rgba(241, 184, 45, 0.28);
}
.bha-field-group .job-field-grid input {
  width: 100%;
  max-width: none;
}
.bha-field-span-two { grid-column: 1 / -1; }
.bha-group-readouts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 8px;
}
.bha-group-readouts div {
  min-width: 0;
  border: 1px solid #2b3238;
  border-radius: 5px;
  background: #111409;
  padding: 5px 6px;
}
.bha-group-readouts span {
  display: block;
  color: var(--silver);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}
.bha-group-readouts strong {
  display: block;
  margin-top: 3px;
  color: var(--gold);
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.active-tooling-summary {
  min-height: 30px;
  display: flex;
  align-items: center;
  margin-bottom: 8px;
  border: 1px solid #2a3036;
  border-radius: 5px;
  background: #0b0e10;
  color: var(--silver);
  padding: 6px 8px;
  font-size: 11px;
  font-weight: 800;
}
.active-tooling-summary strong { color: var(--gold); }
.bha-bottom-readouts {
  display: grid;
  grid-template-columns: repeat(2, minmax(110px, 150px));
  gap: 6px;
  margin-top: 8px;
}
.job-field-grid.bha-tooling-grid {
  grid-template-columns: repeat(auto-fit, minmax(116px, 150px));
  justify-content: start;
}
.job-field-grid.bha-tooling-grid input {
  max-width: 16ch;
}
.job-info-page .secondary-button {
  border-color: #8c6a15;
  background: linear-gradient(180deg, #2a2109, #151105);
  color: var(--gold);
}
.job-info-page .secondary-button:hover {
  border-color: var(--gold);
  background: linear-gradient(180deg, #3b2d0a, #1d1706);
  color: #ffd86b;
}
.job-info-page label,
.job-info-page .job-field-grid label {
  color: var(--gold);
}
.job-info-page input,
.job-info-page select {
  border-color: #5d512f;
  background: linear-gradient(180deg, #090b0c, #040506);
  color: var(--white);
}
.job-info-page input::placeholder {
  color: #8f918f;
}
.job-info-page .job-readout-grid strong,
.job-info-page .mini-tooling-readouts strong,
.job-info-page .bha-group-readouts strong {
  color: var(--gold);
}
@media (max-width: 1380px) {
  .job-setup-sections { grid-template-columns: 1fr; }
  .bha-assembly-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tooling-control-rail { grid-template-columns: minmax(220px, 1fr) auto; }
  .tooling-control-rail .mini-tooling-readouts { grid-column: 1 / -1; }
}
@media (max-width: 1050px) {
  .tooling-control-rail { grid-template-columns: 1fr; align-items: stretch; }
  .tooling-control-rail .mini-tooling-readouts { grid-column: auto; }
}
[hidden] { display: none !important; }
.job-field-grid {
  display: grid;
  gap: 7px 8px;
}
.job-field-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.job-field-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.job-field-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.job-field-grid.six { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.job-field-grid.compact-stack {
  grid-template-columns: repeat(auto-fit, minmax(86px, 1fr));
}
.compact-job-card .job-field-grid input,
.compact-job-card .job-field-grid select,
.compact-inputs input,
.compact-inputs select {
  max-width: 12ch;
}
.job-field-grid label {
  gap: 3px;
  color: var(--silver);
  font-size: 11px;
  font-weight: 900;
}
.job-field-grid input,
.job-field-grid select {
  min-height: 30px;
  padding: 5px 7px;
  border-radius: 5px;
  font-size: 13px;
  box-shadow: inset 0 0 0 1px rgba(241, 184, 45, 0.12);
}
.job-field-grid label small {
  display: block;
  margin-top: 2px;
  color: #7f8a92;
  font-size: 9px;
  line-height: 1.05;
  font-weight: 900;
}
.job-field-grid label small b {
  color: var(--gold);
}
.coord-format-row {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 8px;
}
.coord-format-row label {
  width: min(220px, 100%);
  color: var(--silver);
  font-size: 11px;
  font-weight: 900;
}
.coord-format-row select {
  min-height: 30px;
  padding: 5px 7px;
  border-radius: 5px;
  font-size: 13px;
}
.state-plane-readout {
  min-width: 240px;
  max-width: 420px;
  border: 1px solid #2d3339;
  border-radius: 6px;
  background: #101409;
  padding: 6px 8px;
}
.state-plane-readout span {
  display: block;
  color: var(--silver);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}
.state-plane-readout strong {
  display: block;
  margin-top: 2px;
  color: var(--gold);
  font-size: 12px;
  line-height: 1.15;
}
.job-readouts {
  display: grid;
  gap: 10px;
  align-content: start;
}
.job-readout-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}
.job-readout-grid div,
.job-readout-pairs div:not(.readout-head) {
  min-width: 0;
  border: 1px solid #2b3238;
  border-radius: 5px;
  background: #111409;
  padding: 6px;
}
.job-readout-grid span,
.job-readout-pairs span {
  display: block;
  color: var(--silver);
  font-size: 10px;
  line-height: 1.1;
  font-weight: 900;
  text-transform: uppercase;
}
.job-readout-grid strong,
.job-readout-pairs strong {
  display: block;
  margin-top: 4px;
  color: var(--gold);
  font-size: 13px;
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.job-readout-pairs {
  display: grid;
  gap: 5px;
}
.job-readout-pairs div {
  display: grid;
  grid-template-columns: minmax(86px, 0.9fr) repeat(2, minmax(0, 1fr));
  gap: 6px;
  align-items: center;
}
.job-readout-pairs .readout-head {
  color: var(--gold);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  padding: 0 8px 2px;
}
.job-readout-pairs .readout-head strong {
  color: var(--gold);
  margin: 0;
  font-size: 10px;
}
.sheet-block {
  border-right: 1px solid #323941;
  padding: 8px;
  min-width: 0;
}
.sheet-block:last-child { border-right: 0; }
.sheet-block h4 {
  margin: 0;
  min-height: 30px;
  display: flex;
  align-items: center;
  padding: 6px 8px;
  background: #050607;
  border: 1px solid #474f57;
  color: var(--white);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
}
.sheet-row {
  min-height: 32px;
  display: grid;
  grid-template-columns: minmax(112px, 0.9fr) minmax(70px, 1fr);
  align-items: center;
  gap: 0;
  margin: 0;
  color: var(--white);
  font-size: 12px;
  font-weight: 800;
}
.sheet-row > span {
  min-height: 32px;
  display: flex;
  align-items: center;
  padding: 5px 7px;
  border: 1px solid #323941;
  border-top: 0;
  background: #15191d;
  color: var(--silver);
}
.sheet-row input,
.sheet-row select,
.sheet-row strong {
  width: 100%;
  min-height: 32px;
  display: flex;
  align-items: center;
  border: 1px solid #323941;
  border-top: 0;
  border-left: 0;
  border-radius: 0;
  padding: 5px 8px;
  font-size: 13px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sheet-row input,
.sheet-row select {
  background: #070809;
  color: var(--white);
}
.sheet-row strong {
  background: #1d2118;
  color: var(--gold);
}
.formula-cell > span,
.dual-readout > span,
.triple-readout > span {
  background: #1a1d20;
}
.formula-cell strong,
.dual-readout strong,
.triple-readout strong {
  background: #111409;
  color: var(--gold);
}
.input-cell input,
.input-cell select {
  box-shadow: inset 0 0 0 1px rgba(241, 184, 45, 0.18);
}
.sheet-subheads {
  min-height: 28px;
  display: grid;
  grid-template-columns: 112px 1fr 1fr;
}
.sheet-subheads.three { grid-template-columns: 112px 1fr 1fr 1fr; }
.sheet-subheads span {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #323941;
  border-top: 0;
  border-left: 0;
  background: #22261d;
  color: var(--gold);
  font-size: 11px;
  font-weight: 900;
}
.sheet-subheads span:first-child {
  grid-column: 2;
  border-left: 1px solid #323941;
}
.sheet-subheads.three span:first-child { grid-column: 2; }
.dual-readout { grid-template-columns: 112px 1fr 1fr; }
.triple-readout { grid-template-columns: 112px 1fr 1fr 1fr; }
.dual-readout strong,
.triple-readout strong { border-left: 0; }
.sheet-stationing h4,
.sheet-joint h4,
.sheet-pressure h4 { margin-top: 8px; }
.sheet-stationing h4:first-child,
.sheet-joint h4:first-child,
.sheet-pressure h4:first-child { margin-top: 0; }
.common-calcs {
  padding: 0;
  background: transparent;
}
.calcs-page .common-calcs {
  padding: 14px 16px 24px;
}
.calcs-page .section-title {
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
  margin-bottom: 12px;
  display: block;
}
.calcs-page .section-title h3 {
  color: var(--gold);
}
.calcs-page .section-title p {
  margin-top: 3px;
  color: var(--silver);
  font-size: 13px;
  font-weight: 800;
}
.common-calc-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-areas:
    "compound steering bundle"
    "mud pump bundle"
    "mud bend bundle"
    "mud hydraulics bundle";
  gap: 10px;
  align-items: start;
}
.calc-panel {
  --calc-accent: var(--gold);
  --calc-glow: rgba(241, 184, 45, 0.08);
  position: relative;
  display: block;
  width: 100%;
  border: 1px solid #323941;
  border-top: 2px solid var(--calc-accent);
  border-radius: 7px;
  background:
    radial-gradient(circle at 100% 0%, var(--calc-glow), transparent 42%),
    linear-gradient(155deg, #101416, #07090a 72%);
  padding: 10px;
  min-width: 0;
  margin: 0;
  overflow: hidden;
}
.calc-panel-compound { grid-area: compound; }
.calc-panel-mud { grid-area: mud; align-self: stretch; }
.calc-panel-steering { grid-area: steering; }
.calc-panel-pump { grid-area: pump; }
.calc-panel-bend { grid-area: bend; }
.calc-panel-hydraulics { grid-area: hydraulics; }
.calc-panel-bundle { grid-area: bundle; align-self: stretch; }
.calc-tone-gold {
  --calc-accent: var(--gold);
  --calc-glow: rgba(241, 184, 45, 0.13);
}
.calc-tone-silver {
  --calc-accent: #c9c9c7;
  --calc-glow: rgba(218, 218, 214, 0.1);
}
.calc-panel.wide { grid-column: auto; }
.calc-panel-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.calc-panel-title h4 { margin: 0; }
.calc-panel-title span {
  color: var(--silver);
  font-size: 11px;
  font-weight: 800;
}
.calc-panel h4 {
  margin: 0 0 10px;
  color: var(--calc-accent);
  font-size: 13px;
  font-weight: 900;
}
.bundle-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}
.bundle-input-card {
  border: 1px solid #242a30;
  border-radius: 8px;
  background: #0c0f10;
  padding: 10px;
}
.bundle-step {
  color: var(--gold);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  margin: 2px 0 8px;
}
.bundle-items {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}
.bundle-items label {
  display: grid;
  gap: 4px;
}
.bundle-items span {
  color: var(--silver);
  font-size: 10px;
  font-weight: 900;
}
.bundle-fields { margin-bottom: 10px; }
.calc-note {
  margin: 4px 0 0;
  color: var(--silver);
  font-size: 11px;
  line-height: 1.35;
  font-weight: 700;
}
.bundle-visual {
  min-height: 220px;
  max-height: 300px;
  border: 1px solid #2f363c;
  border-radius: 7px;
  background: #080a0b;
  overflow: hidden;
  margin-top: 0;
}
.bundle-visual svg { width: 100%; height: 100%; display: block; }
.bundle-hole { fill: #0d1114; stroke: var(--silver-2); stroke-width: 2; }
.bundle-pipe { fill: var(--gold); stroke: #111111; stroke-width: 2; }
.bundle-envelope { fill: none; stroke: var(--white); stroke-width: 2; stroke-dasharray: 8 7; opacity: 0.85; }
.bundle-required-envelope { fill: none; stroke: var(--gold); stroke-width: 2; opacity: 0.9; }
.bundle-label { fill: var(--silver); font-size: 12px; font-weight: 800; }
.calc-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}
.compound-fields { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.bend-radius-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.calc-fields label {
  gap: 4px;
  font-size: 11px;
}
.calcs-page .calc-fields label,
.calcs-page .bundle-items span {
  color: var(--gold);
}
.calc-fields input {
  min-height: 29px;
  padding: 5px 7px;
  border-color: #665628;
  background: linear-gradient(180deg, #090b0c, #040506);
  color: var(--white);
  border-radius: 5px;
  font-size: 13px;
}
.calc-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-top: 8px;
}
.compound-results { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.bend-radius-results { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.calc-results div {
  border: 1px solid #30383d;
  border-left: 2px solid var(--calc-accent);
  border-radius: 5px;
  background: rgba(7, 10, 11, 0.82);
  padding: 6px;
  min-height: 44px;
}
.calc-results span {
  display: block;
  color: var(--silver);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}
.calc-results strong {
  display: block;
  margin-top: 3px;
  color: var(--gold);
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.job-toolbar-actions .secondary-button,
.bha-title-actions .secondary-button {
  min-height: 30px;
  padding: 5px 9px;
  font-size: 11px;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.72);
}
.modal-panel {
  width: min(980px, 94vw);
  max-height: 88vh;
  overflow: auto;
  border: 1px solid #343b42;
  border-radius: 8px;
  background: #090b0c;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
}
.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}
.modal-header h3 {
  margin: 0;
  font-size: 18px;
}
.modal-header p {
  margin-top: 4px;
  color: var(--silver);
  font-size: 12px;
  font-weight: 700;
}
.icon-button {
  width: 34px;
  min-height: 34px;
  border: 1px solid #40464c;
  border-radius: 6px;
  background: #0d1012;
  color: var(--white);
  font-weight: 900;
}
.tooling-add-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(110px, 1fr)) auto;
  gap: 9px;
  align-items: end;
  padding: 14px;
  border-bottom: 1px solid #252b31;
}
.tooling-add-grid label {
  gap: 4px;
  color: var(--silver);
  font-size: 11px;
  font-weight: 900;
}
.tooling-add-grid input,
.tooling-add-grid select {
  min-height: 32px;
  padding: 6px 8px;
  border-radius: 5px;
}
.tooling-add-grid button,
.tooling-row button {
  min-height: 32px;
  padding: 6px 9px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 900;
}
.tooling-manager-rows {
  display: grid;
  gap: 8px;
  padding: 14px;
}
.tooling-row {
  display: grid;
  grid-template-columns: 0.8fr 0.9fr 0.75fr 1.25fr 1fr auto auto;
  gap: 8px;
  align-items: center;
  border: 1px solid #2d3339;
  border-radius: 7px;
  background: #0c0f10;
  padding: 8px;
}
.tooling-row.active {
  border-color: var(--gold);
  background: #18160e;
}
.tooling-row span {
  display: block;
  color: var(--silver);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}
.tooling-row strong {
  display: block;
  margin-top: 3px;
  color: var(--white);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tooling-row.active strong { color: var(--gold); }
.tooling-history {
  padding: 0 14px 14px;
}
.tooling-history h4 {
  margin: 0 0 8px;
  font-size: 13px;
}
.home-page { padding: 0; overflow: hidden; }
.home-layout {
  min-height: min(680px, calc(100vh - 175px));
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  gap: 16px;
  padding: 18px;
  align-items: stretch;
}
.home-recent-panel {
  border: 1px solid #252a2f;
  background: linear-gradient(180deg, rgba(14, 16, 18, 0.96), rgba(7, 8, 9, 0.98));
  border-radius: 8px;
  padding: 14px;
  min-height: 100%;
}
.home-recent-panel .section-title { margin-bottom: 14px; }
.home-start {
  min-height: 100%;
  display: grid;
  place-items: center;
  gap: 24px;
  align-content: center;
  border: 1px solid #252a2f;
  background: linear-gradient(180deg, #090a0b 0%, #050607 100%);
  border-radius: 8px;
  padding: clamp(28px, 5vw, 58px) 18px;
  overflow: hidden;
}
.home-hero { display: grid; justify-items: center; gap: 10px; width: min(880px, 92vw); }
.home-logo { width: clamp(128px, 18vw, 230px); aspect-ratio: 1; object-fit: contain; mix-blend-mode: screen; filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.45)); }
.home-name { width: min(760px, 64vw); max-height: 210px; object-fit: contain; mix-blend-mode: screen; filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.42)); }
.home-mark {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: linear-gradient(145deg, #0b0d0f, #1b1e21);
  border: 1px solid var(--gold-2);
  border-radius: 8px;
}
.home-mark svg { width: 58px; height: 58px; overflow: visible; }
.home-mark text { fill: var(--white); font-size: 24px; font-weight: 900; font-family: Inter, ui-sans-serif, system-ui, sans-serif; }
.home-hero h3 { font-size: 34px; line-height: 1.05; }
.home-hero p { color: var(--silver); margin-top: 6px; font-weight: 700; }
.home-actions { width: min(780px, calc(100vw - 136px)); max-width: 100%; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; justify-content: center; }
.home-action {
  min-height: 50px;
  border: 1px solid #474d53;
  border-radius: 6px;
  background: linear-gradient(180deg, #202327, #111315);
  color: var(--white);
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
}
.home-action.primary {
  border-color: var(--gold-2);
  background: linear-gradient(180deg, #ffd45f, var(--gold));
  color: #111111;
}
.home-mobile-card {
  width: min(620px, calc(100vw - 136px));
  max-width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid #2d3338;
  border-radius: 8px;
  background: #080a0b;
}
.home-mobile-card span {
  display: block;
  color: var(--silver);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.home-mobile-card strong {
  display: block;
  margin-top: 4px;
  color: var(--gold);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.home-mobile-card small {
  display: block;
  margin-top: 3px;
  color: var(--silver);
  font-size: 11px;
  line-height: 1.25;
}
.home-mobile-state {
  border: 1px solid #4b535a;
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--silver);
  font-size: 11px;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}
.home-mobile-state.paired {
  border-color: #277748;
  background: #0b2918;
  color: #63da8b;
}
.home-mobile-state.pairing {
  border-color: var(--gold-2);
  background: #2b2209;
  color: var(--gold);
}
.home-mobile-card button {
  min-height: 40px;
}
.home-project-list { display: grid; gap: 8px; }
.home-project {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  text-align: left;
  border: 1px solid var(--line);
  background: #090b0c;
  color: var(--white);
  border-radius: 6px;
  padding: 11px 12px;
}
.home-project.active { border-color: var(--gold); background: #1d1b13; }
.home-project strong, .home-project small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-project small { color: var(--silver); margin-top: 3px; }
.home-project em {
  color: var(--gold);
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
.home-project time { color: var(--silver); font-size: 12px; font-weight: 800; }
.metrics { margin-top: 14px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.metrics div { border: 1px solid var(--line); border-radius: 8px; padding: 12px; background: #090b0c; }
.metrics span { display: block; color: var(--silver); font-size: 12px; font-weight: 700; }
.metrics strong { display: block; margin-top: 5px; font-size: 22px; }
.table { display: grid; gap: 8px; }
.row { display: grid; gap: 8px; align-items: end; }
.formation-row { grid-template-columns: 1.2fr 0.65fr 0.65fr 0.7fr 0.9fr 0.55fr 0.7fr 0.85fr 0.7fr; }
.steering-row { grid-template-columns: 0.6fr 0.8fr 0.8fr 0.8fr 0.8fr 1.2fr 0.7fr; }
.daily-row { grid-template-columns: 0.9fr 0.8fr 0.8fr 1.8fr 1.2fr 0.7fr; }
.formations-page,
.just-data-page,
.reports-page {
  padding: 16px;
}
.formations-header,
.just-data-header,
.reports-header {
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}
.formations-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}
.formation-flow-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0 14px;
}
.formation-flow-strip > div {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  gap: 2px 9px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #3a4148;
  border-radius: 8px;
  background: linear-gradient(180deg, #111417, #090b0c);
}
.formation-flow-strip span {
  grid-row: 1 / 3;
  align-self: center;
  color: var(--gold);
  font-size: 11px;
  font-weight: 950;
}
.formation-flow-strip strong {
  color: var(--white);
  font-size: 12px;
  text-transform: uppercase;
}
.formation-flow-strip small {
  color: var(--silver-2);
  line-height: 1.35;
}
.formations-header .action-row {
  align-items: stretch;
}
.formations-header .action-row button {
  border-radius: 6px;
  min-height: 38px;
  font-weight: 850;
}
#syncFormationsToMobile {
  border-color: #6e7780;
  background: linear-gradient(180deg, #30363c, #171a1d);
  color: var(--white);
}
#syncFormationsToMobile:hover {
  border-color: var(--silver);
  background: linear-gradient(180deg, #3a4147, #202428);
}
.formation-workbench,
.formation-side-panel,
.data-links-panel,
.data-upload-panel,
.just-data-import-card,
.just-data-tables .section-band,
.report-settings,
.report-logo-panel {
  border: 1px solid #303841;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(17, 20, 22, 0.95), rgba(9, 11, 12, 0.98));
  padding: 12px;
}
.formation-stack-table {
  display: grid;
  gap: 12px;
}
.core-sample-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.core-sample-card {
  border: 1px solid #303841;
  border-radius: 8px;
  background: linear-gradient(180deg, #0f1315, #070909);
  padding: 10px;
  min-height: 0;
}
.core-sample-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.core-sample-head h4 {
  margin: 0;
  color: var(--white);
}
.small-action {
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid #9b7417;
  background: linear-gradient(180deg, #ffd35d, #f0af1d);
  color: #090909;
  font-weight: 950;
  cursor: pointer;
}
.small-action.danger,
.danger.small-action {
  border-color: #6c2d2d;
  background: linear-gradient(180deg, #5a2323, #321313);
  color: #fff2f2;
}
.formations-page [data-remove-formation],
.formations-page [data-remove-core-layer] {
  border: 1px solid #7d3434;
  background: linear-gradient(180deg, #652828, #351515);
  color: #fff4f4;
  font-weight: 900;
}
.core-sample-meta {
  display: grid;
  grid-template-columns: minmax(160px, 1.2fr) repeat(2, minmax(90px, 0.8fr));
  gap: 7px;
  margin-bottom: 8px;
}
.core-sample-meta input,
.core-layer-inputs input,
.core-layer-inputs select {
  min-height: 30px;
  padding: 5px 7px;
  font-size: 13px;
}
.core-layer-stack {
  display: grid;
  gap: 7px;
}
.core-layer-row {
  border: 1px solid #2e363f;
  border-radius: 7px;
  background: #090c0d;
  padding: 7px;
}
.core-layer-inputs {
  display: grid;
  grid-template-columns: minmax(170px, 1.4fr) repeat(2, minmax(74px, 0.65fr)) auto;
  gap: 7px;
  align-items: end;
}
.core-layer-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-top: 5px;
  color: var(--silver);
  font-size: 11px;
  line-height: 1.2;
}
.core-layer-summary span {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.core-layer-summary b {
  color: var(--gold);
  font-size: 10px;
  text-transform: uppercase;
  margin-right: 4px;
}
.core-layer-summary .formation-property-basis {
  flex-basis: 100%;
  max-width: none;
  color: #9da6ad;
  white-space: normal;
}
.formation-layer-card {
  border: 1px solid #2e363f;
  border-radius: 8px;
  background: linear-gradient(180deg, #101417, #070909);
  padding: 12px;
}
.formation-layer-main {
  display: grid;
  grid-template-columns: minmax(190px, 1.35fr) repeat(4, minmax(92px, 0.72fr));
  gap: 8px;
  align-items: end;
}
.formation-layer-main input,
.formation-layer-main select {
  min-height: 34px;
  padding: 6px 8px;
}
.formation-layer-properties {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr)) auto;
  gap: 8px;
  margin-top: 10px;
  align-items: stretch;
}
.formation-layer-properties div,
.formation-empty {
  border: 1px solid #2e363f;
  border-radius: 6px;
  background: #111409;
  padding: 9px;
}
.formation-layer-properties span {
  display: block;
  color: var(--silver);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}
.formation-layer-properties strong {
  display: block;
  margin-top: 4px;
  color: var(--gold);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.formation-layer-properties button {
  min-height: 100%;
}
.formation-empty {
  color: var(--silver);
  font-weight: 800;
}
.formation-library-modal-card {
  max-width: 860px;
}
.formation-library-modal-card .modal-close {
  display: inline-grid;
  place-items: center;
  width: 36px;
  min-width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid #6d747a;
  border-radius: 50%;
  background: linear-gradient(180deg, #282d31, #111416);
  color: var(--gold);
  font-size: 22px;
  font-weight: 850;
  line-height: 1;
}
.formation-library-modal-card .modal-close:hover {
  border-color: var(--gold);
  background: linear-gradient(180deg, #353b40, #171a1d);
}
.formation-library-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.formation-library-form input,
.formation-library-form select {
  min-height: 34px;
  padding: 6px 8px;
}
.formation-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.formation-panel-head h4,
.formation-side-panel h4 {
  margin: 0;
  color: var(--white);
}
.formation-samples {
  max-height: 420px;
  overflow: auto;
  scrollbar-gutter: stable;
}
.formation-samples th {
  position: sticky;
  top: 0;
  z-index: 2;
}
.formation-panel-head span {
  display: block;
  margin-top: 3px;
  color: var(--silver);
  font-size: 12px;
  font-weight: 800;
}
.formation-side,
.just-data-shell,
.just-data-tables {
  display: grid;
  gap: 12px;
}
.formation-side {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
}
.formation-library-notes {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}
.formation-library-notes div {
  border: 1px solid #2e363f;
  border-radius: 6px;
  background: #111409;
  padding: 9px;
}
.formation-library-notes span {
  display: block;
  color: var(--silver);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}
.formation-library-notes strong {
  display: block;
  margin-top: 4px;
  color: var(--gold);
  font-size: 13px;
}
.formation-property-guide dl {
  display: grid;
  gap: 8px;
  margin: 10px 0;
}
.formation-property-guide dl div {
  border-left: 3px solid var(--gold);
  background: #0d1012;
  padding: 8px 10px;
}
.formation-property-guide dt {
  color: var(--gold);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.formation-property-guide dd,
.formation-property-guide p {
  margin: 3px 0 0;
  color: var(--silver);
  font-size: 12px;
  line-height: 1.45;
}
.formation-property-guide dd strong,
.formation-property-guide p b {
  color: var(--white);
}
.formation-property-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.formation-property-links a {
  border: 1px solid #5e5127;
  border-radius: 999px;
  padding: 5px 8px;
  color: var(--gold);
  background: #111409;
  font-size: 10px;
  font-weight: 900;
  text-decoration: none;
}
.formation-property-links a:hover {
  border-color: var(--gold);
  color: var(--white);
}
.just-data-imports {
  align-items: stretch;
}
.data-authority-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid #6f5a20;
  border-radius: 12px;
  background: radial-gradient(circle at 90% 0%, rgba(241,184,45,.13), transparent 35%), linear-gradient(145deg, #121519, #080a0b);
}
.data-authority-heading { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(260px, .7fr); gap: 24px; align-items: start; }
.data-eyebrow { color: var(--gold); font-size: 10px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.data-authority-heading h4 { margin: 4px 0 6px; color: var(--white); font-size: 22px; }
.data-authority-heading p { max-width: 760px; margin: 0; color: var(--silver); line-height: 1.55; }
.data-mobile-coverage { display: grid; gap: 3px; padding: 12px 14px; border-left: 3px solid var(--gold); background: rgba(0,0,0,.24); }
.data-mobile-coverage span { color: var(--silver); font-size: 10px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.data-mobile-coverage strong { color: var(--gold); }
.data-mobile-coverage small { color: var(--silver-2); line-height: 1.4; }
.data-authority-flow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.authority-step { display: flex; gap: 10px; align-items: center; min-width: 0; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: #090b0d; }
.authority-step > span { display: grid; place-items: center; flex: 0 0 28px; height: 28px; border-radius: 50%; background: #24292e; color: var(--silver); font-weight: 900; }
.authority-step div { display: grid; min-width: 0; }
.authority-step strong { color: var(--white); font-size: 12px; }
.authority-step small { color: var(--silver-2); }
.authority-step.controlling { border-color: var(--gold-2); }
.authority-step.controlling > span { background: var(--gold); color: #111; }
.authority-step.reference { border-style: dashed; }
.data-links-panel,
.data-upload-panel {
  display: grid;
  gap: 12px;
}
.data-link-grid,
.project-upload-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.project-upload-grid input {
  min-height: 34px;
  padding: 6px 8px;
}
.project-upload-grid label { display: grid; align-content: start; gap: 4px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: linear-gradient(180deg, #111417, #090b0d); }
.project-upload-grid label > span { color: var(--gold); font-size: 12px; font-weight: 900; text-transform: uppercase; }
.project-upload-grid label > small { min-height: 30px; color: var(--silver-2); line-height: 1.35; }
.project-file-manifest { display: grid; gap: 7px; margin-top: 12px; }
.project-file-row { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(280px, 1.25fr) max-content; gap: 16px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 9px; background: linear-gradient(180deg, #111417, #090b0d); }
.project-file-name, .project-file-uses { display: grid; gap: 3px; min-width: 0; }
.project-file-name > span, .project-file-uses > span { color: var(--silver-2); font-size: 9px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.project-file-name strong { color: var(--white); overflow-wrap: anywhere; }
.project-file-name small, .project-file-row time { color: var(--silver); font-size: 11px; }
.project-file-uses > div, .project-file-manager-usage > div { display: flex; flex-wrap: wrap; gap: 5px; }
.project-file-uses b, .project-file-manager-usage b { padding: 3px 6px; border: 1px solid #47505a; border-radius: 999px; background: #171a1e; color: var(--silver); font-size: 10px; font-weight: 800; }
.project-file-uses .file-use-controlling, .project-file-manager-usage .file-use-controlling { border-color: var(--gold); background: rgba(241,184,45,.16); color: var(--gold); }
.project-file-uses .file-use-active, .project-file-manager-usage .file-use-active { border-color: #688b57; background: rgba(80,120,62,.16); color: #b8e49f; }
.project-file-row-actions { display: grid; justify-items: end; gap: 6px; }
.project-file-row-actions button { padding: 5px 9px; }
.project-files-modal-card { width: min(980px, calc(100vw - 32px)); }
.ifc-source-review { display: grid; gap: 14px; }
.ifc-status-warning { border: 1px solid #d99a16; border-radius: 10px; padding: 12px; color: #ffd166; background: rgba(217, 154, 22, .1); }
.ifc-source-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ifc-source-facts > div { min-width: 0; border: 1px solid var(--line); border-radius: 10px; padding: 10px; display: grid; gap: 5px; }
.ifc-source-facts span { overflow-wrap: anywhere; color: var(--muted); }
@media (max-width: 720px) { .ifc-source-facts { grid-template-columns: 1fr; } }
.project-file-pending { margin: 14px 16px 0; padding: 14px; border: 1px solid var(--gold-2); border-radius: 8px; background: rgba(241,184,45,.08); }
.project-file-pending[hidden] { display: none; }
.project-file-pending-head { display: flex; justify-content: space-between; gap: 14px; align-items: center; }
.project-file-pending-head strong { color: var(--gold); }
.project-file-pending-head span { color: var(--silver); font-size: 12px; }
.project-file-pending-files { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.project-file-pending-files span { padding: 5px 8px; border: 1px solid #4a5158; border-radius: 999px; background: #080a0b; color: var(--white); font-size: 12px; }
.project-file-pending-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.project-file-pending-actions button:last-child { border-color: var(--gold-2); background: var(--gold); color: #111; }
.project-file-manager-list { display: grid; gap: 8px; padding: 16px; }
.project-file-manager-row { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(180px, .8fr) auto; gap: 14px; align-items: center; padding: 11px 12px; border: 1px solid var(--line); border-radius: 8px; background: linear-gradient(180deg, #111417, #080a0b); }
.project-file-manager-row strong { display: block; overflow-wrap: anywhere; color: var(--white); }
.project-file-manager-row small { display: block; margin-top: 3px; color: var(--silver-2); }
.project-file-manager-row span { color: var(--silver); font-size: 12px; }
.project-file-manager-usage { display: grid; gap: 6px; min-width: 0; }
.project-file-manager-usage > span { color: var(--gold); font-size: 10px; font-weight: 900; text-transform: uppercase; }
.project-file-manager-row button { border: 1px solid #733b3b; background: #281414; color: #ffb8b8; }
.project-file-role-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.project-file-role-actions button[data-use-geodetic-file],
.project-file-role-actions button[data-use-local-grid-file] { border-color: var(--gold-2); background: #17130a; color: var(--gold); }
.project-coordinate-role { display: grid; gap: 10px; }
.project-coordinate-role label { display: grid; gap: 5px; }
.satellite-plan-label rect { fill: rgba(5, 7, 8, .88); stroke: #f1b82d; stroke-width: 1.5; }
.satellite-plan-label text { fill: #fff; font: 700 14px system-ui, sans-serif; paint-order: stroke; stroke: #050505; stroke-width: 2px; }
@media (max-width: 700px) {
  .data-authority-heading, .data-authority-flow { grid-template-columns: 1fr; }
  .project-file-pending-head { align-items: flex-start; flex-direction: column; }
  .project-file-manager-row { grid-template-columns: 1fr; }
  .project-file-manager-row button { justify-self: start; }
}
.dxf-approval { margin-top: 8px; padding: 10px 12px; border: 1px solid var(--yellow); border-radius: 7px; background: rgba(241,184,45,0.08); }
.csv-link-card {
  display: grid;
  grid-template-rows: 1fr auto auto;
  gap: 9px;
  min-height: 154px;
  padding: 12px;
  border: 1px solid #2e363f;
  border-radius: 6px;
  background: linear-gradient(180deg, #11161a, #070909);
}
.csv-link-card span {
  display: block;
  color: var(--silver);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}
.csv-link-card strong {
  display: block;
  margin-top: 7px;
  color: var(--white);
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.csv-link-card small {
  color: var(--silver);
  font-size: 11px;
  font-weight: 800;
}
.csv-link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 36px;
  cursor: pointer;
  text-align: center;
}
.visually-hidden-file {
  position: fixed;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  appearance: none;
  -webkit-appearance: none;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  border: 0;
  margin: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
}
.data-link-status,
.project-file-previews {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.data-link-status div,
.project-file-previews div {
  border: 1px solid #2e363f;
  border-radius: 6px;
  background: #111409;
  padding: 9px;
  min-height: 58px;
}
.data-link-status span,
.project-file-previews span {
  display: block;
  color: var(--silver);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}
.data-link-status strong,
.project-file-previews strong {
  display: block;
  margin-top: 4px;
  color: var(--gold);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.just-data-import-card {
  display: grid;
  grid-template-rows: auto auto minmax(120px, 1fr);
}
.just-data-import-card .section-title {
  margin-bottom: 8px;
}
.just-data-import-card .field-hint {
  min-height: 32px;
}
.just-data-tables {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.just-data-tables .sheet-table-wrap {
  max-height: 280px;
  overflow: auto;
}
.data-sheets-modal-card {
  width: min(1280px, calc(100vw - 44px));
  max-height: min(820px, calc(100vh - 64px));
}
.data-sheet-modal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 16px;
}
.data-sheet-modal-grid section {
  border: 1px solid #303841;
  border-radius: 7px;
  background: #080a0b;
  padding: 10px;
  min-width: 0;
}
.data-sheet-modal-grid h4 {
  margin: 0 0 8px;
  color: var(--white);
  font-size: 13px;
}
.data-sheet-modal-grid .sheet-table-wrap {
  max-height: 280px;
  overflow: auto;
}
.report-workbench {
  display: grid;
  grid-template-columns: minmax(300px, 0.32fr) minmax(0, 0.68fr);
  gap: 14px;
  align-items: start;
}
.report-control-stack,
.report-main-stack {
  display: grid;
  gap: 14px;
  min-width: 0;
}
.report-settings,
.report-contents-panel,
.report-logo-panel,
.report-export-panel,
.report-summary-panel,
.report-activity-panel,
.report-preview-panel {
  margin: 0;
}
.report-settings .band-title-row,
.report-contents-panel .band-title-row,
.report-logo-panel .band-title-row,
.report-summary-panel .band-title-row,
.report-activity-panel .band-title-row,
.report-preview-panel .band-title-row {
  margin-bottom: 10px;
}
.report-settings h4,
.report-contents-panel h4,
.report-logo-panel h4,
.report-export-panel h4,
.report-summary-panel h4,
.report-activity-panel h4,
.report-preview-panel h4 {
  margin: 0;
}
.report-settings small,
.report-contents-panel small,
.report-logo-panel small,
.report-summary-panel small,
.report-activity-panel small,
.report-preview-panel small {
  color: var(--silver-2);
}
.report-data-health {
  border: 1px solid #4c565e;
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--silver-2);
  background: #080a0b;
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}
.report-data-health.ready {
  border-color: #287a43;
  color: #71e393;
}
.report-content-grid {
  display: grid;
  gap: 7px;
}
.report-content-option {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 9px;
  min-height: 0;
  padding: 9px 10px;
  border: 1px solid #343b42;
  border-radius: 7px;
  background: #080a0b;
  cursor: pointer;
}
.report-content-option:has(input:checked) {
  border-color: #a87e18;
  background: linear-gradient(180deg, rgba(241, 184, 45, 0.11), rgba(8, 10, 11, 0.95));
}
.report-content-option input {
  margin-top: 3px;
}
.report-content-option span {
  display: grid;
  gap: 2px;
}
.report-content-option b {
  color: var(--white);
  font-size: 12px;
}
.report-content-option small {
  font-size: 10px;
  line-height: 1.25;
}
.report-logo-panel { display: grid; gap: 10px; }
.client-logo-preview { min-height: 140px; border: 1px dashed #4a5158; border-radius: 8px; background: #080a0b; display: grid; place-items: center; color: var(--silver); font-weight: 800; padding: 12px; }
.client-logo-preview img { max-width: 100%; max-height: 128px; object-fit: contain; }
.report-export-panel p {
  margin: 5px 0 10px;
  color: var(--silver-2);
  font-size: 12px;
  line-height: 1.4;
}
.report-export-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
}
.report-export-status {
  min-height: 18px;
  margin-top: 7px;
  color: var(--silver-2);
  font-size: 11px;
  font-weight: 800;
}
.report-export-status.ok { color: #71e393; }
.report-export-status.error { color: #ff7d72; }
.report-summary-panel textarea {
  width: 100%;
  min-height: 118px;
  resize: vertical;
}
.report-activity-composer {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
  padding: 11px;
  border: 1px solid #735a18;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(241, 184, 45, 0.08), rgba(5, 6, 7, 0.98));
}
.report-activity-composer-grid {
  display: grid;
  grid-template-columns: 142px 92px 92px 76px minmax(220px, 1fr) 92px;
  gap: 8px;
  align-items: end;
}
.report-activity-composer label {
  min-width: 0;
  color: var(--gold);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.report-activity-composer input {
  width: 100%;
  min-width: 0;
  margin-top: 4px;
  padding: 8px;
  border-color: #4b535a;
  background: #080a0b;
  color: var(--white);
}
.report-activity-composer input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(241, 184, 45, 0.14);
}
.report-activity-composer-actions,
.report-activity-row-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}
.report-activity-composer-actions button {
  min-width: 104px;
}
#reportActivityComposerStatus {
  color: var(--silver-2);
  font-size: 10px;
  font-weight: 800;
}
#reportActivityComposerStatus.ok { color: #71e393; }
#reportActivityComposerStatus.error { color: #ff8d84; }
#reportActivityComposerStatus.editing { color: var(--gold); }
.report-activity-table {
  overflow: auto;
  border: 1px solid #303841;
  border-radius: 7px;
  background: #050607;
}
.report-activity-table table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
}
.report-activity-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 8px;
  border-right: 1px solid #343b42;
  border-bottom: 1px solid #4a5158;
  background: #171b1e;
  color: var(--gold);
  font-size: 10px;
  text-align: left;
  text-transform: uppercase;
}
.report-activity-table td {
  padding: 8px;
  border-right: 1px solid #292f34;
  border-bottom: 1px solid #292f34;
  color: var(--silver-1);
  font-size: 11px;
  vertical-align: middle;
}
.report-activity-copy {
  min-width: 210px;
  color: var(--white) !important;
  font-weight: 750;
}
.report-activity-table tr.recorded-downtime {
  background: rgba(180, 35, 24, 0.08);
}
.report-activity-table tr.active-downtime {
  background: rgba(241, 184, 45, 0.11);
}
.report-source-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid #4c565e;
  border-radius: 999px;
  padding: 4px 7px;
  color: var(--silver-2);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}
.recorded-downtime .report-source-pill {
  border-color: #9c4b44;
  color: #ffaea7;
}
.report-activity-row-actions {
  white-space: nowrap;
}
.report-activity-row-actions .small-action {
  min-width: 58px;
}
.danger-button {
  border-color: #8e3c35 !important;
  background: linear-gradient(180deg, #3c1714, #21100f) !important;
  color: #ffb2ab !important;
}
.danger-button:hover:not(:disabled) {
  border-color: #d25d52 !important;
  background: linear-gradient(180deg, #57211d, #2c1210) !important;
}
.danger-button:disabled {
  cursor: not-allowed;
  opacity: .3;
}
.report-activity-row-actions button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.report-mode-button.active {
  border-color: var(--gold);
  background: linear-gradient(180deg, #ffd35d, #f0af1d);
  color: #090909;
}
.report-preview { min-height: 420px; border: 1px solid var(--line); border-radius: 8px; background: #f7f8f8; color: #111111; padding: 24px; overflow: auto; }
.report-paper { max-width: 900px; margin: 0 auto; color: #111111; font-family: Arial, sans-serif; }
.report-paper header { display: grid; grid-template-columns: 180px 1fr 150px; gap: 18px; align-items: center; border-bottom: 4px solid #f1b82d; padding: 12px; margin-bottom: 16px; background: #15191c; color: #ffffff; }
.report-paper .report-brand { color: #f1b82d; font-size: 21px; font-weight: 950; letter-spacing: 0.04em; }
.report-paper h2, .report-paper h3 { margin: 0; color: #111111; }
.report-paper header h2 { color: #ffffff; }
.report-paper header p { color: #d9dde1; }
.report-paper p { color: #333333; margin: 4px 0; white-space: pre-wrap; }
.report-paper img { max-width: 180px; max-height: 96px; object-fit: contain; justify-self: end; }
.report-paper table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 12px; }
.report-paper th, .report-paper td { border: 1px solid #c7cdd2; padding: 7px; text-align: left; }
.report-paper th { background: #111315; color: #ffffff; }
.report-paper .report-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 14px 0; }
.report-paper .report-kpis div { border: 1px solid #c7cdd2; padding: 10px; background: #ffffff; }
.report-paper .report-kpis span { display: block; color: #555555; font-size: 11px; font-weight: 700; }
.report-paper .report-kpis strong { display: block; margin-top: 4px; font-size: 18px; }
.report-paper .report-position {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin: 10px 0 14px;
}
.report-paper .report-position div {
  padding: 8px;
  border-left: 3px solid #f1b82d;
  background: #e9edf0;
}
.report-paper .report-position span {
  display: block;
  color: #5d6870;
  font-size: 10px;
  font-weight: 800;
}
.report-paper .report-position strong {
  display: block;
  margin-top: 3px;
  color: #15191c;
  font-size: 14px;
}
.report-visual-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 14px;
}
.report-visual {
  border: 1px solid #c7cdd2;
  padding: 8px;
  background: #080a0b;
}
.report-visual h3 {
  margin: 0 0 6px;
  color: #ffffff;
  font-size: 12px;
}
.report-visual svg {
  display: block;
  width: 100%;
  max-height: 330px;
}
.downtime-reason-modal {
  width: min(560px, calc(100vw - 32px));
}
.downtime-reason-modal form {
  display: grid;
  gap: 14px;
}
.downtime-reason-modal textarea {
  width: 100%;
  min-height: 110px;
}
.row button { min-height: 38px; border: 1px solid #5a3333; background: #2a1717; color: #f1d0d0; border-radius: 6px; }
.bore-planner-header .action-row {
  align-items: center;
  display: grid;
  grid-template-columns: repeat(5, 148px);
  gap: 8px;
}
.bore-planner-header .planner-action {
  border: 1px solid var(--gold-2);
  background: linear-gradient(180deg, #ffd45f, var(--gold));
  color: #111111;
  border-radius: 6px;
  min-height: 32px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 900;
}
.bore-planner-header .action-row > button {
  width: 148px;
  height: 34px;
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
}
.bore-planner-shell {
  display: grid;
  gap: 12px;
  padding: 14px;
}
.bore-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(320px, 0.85fr);
  gap: 12px;
  align-items: stretch;
}
.bore-setup-panel,
.bore-results-panel,
.bore-hcurve-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(12, 15, 17, 0.98), rgba(7, 9, 10, 0.99));
  padding: 12px;
  min-width: 0;
}
.bore-input-groups {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.45fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.bore-source-picker {
  display: grid;
  grid-template-columns: auto minmax(170px, 240px) auto;
  gap: 7px;
  align-items: center;
}
.bore-source-picker label {
  color: var(--gold);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.bore-source-picker select,
.bore-source-picker button {
  min-height: 32px;
  padding: 5px 9px;
  font-size: 11px;
}
.bore-source-status {
  margin: -3px 0 12px;
  border-left: 3px solid var(--gold);
  background: linear-gradient(90deg, rgba(246, 184, 43, .1), transparent 65%);
  color: var(--silver);
  padding: 7px 10px;
  font-size: 11px;
  font-weight: 800;
}

.bore-csv-control-picker {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  margin: 10px 0 14px;
  padding: 12px;
  border: 1px solid rgba(246, 190, 0, 0.52);
  border-radius: 10px;
  background: rgba(246, 190, 0, 0.055);
}

.bore-csv-control-picker[hidden] { display: none; }

.bore-csv-control-picker label {
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.bore-csv-control-picker select {
  width: 100%;
  margin-top: 5px;
  color: var(--silver-light);
}

.bore-source-error {
  grid-column: 1 / -1;
  color: #ffb5b5;
  font-weight: 700;
}
.satellite-control-card rect,
.satellite-orientation rect {
  fill: rgba(5, 5, 5, .9);
  stroke: #f6b82b;
  stroke-width: 1.5;
}
.satellite-control-card text {
  fill: #f3f4f5;
  font-size: 10px;
  font-weight: 800;
}
.satellite-control-card .control-title { fill: #f6b82b; font-size: 11px; font-weight: 900; }
.satellite-control-card .control-title { font-size: 9px; }
.satellite-control-card text { font-size: 8.5px; }
.satellite-orientation circle,
.satellite-baseline-az rect { fill: rgba(5, 5, 5, .88); stroke: #d7dce0; stroke-width: 1.5; }
.satellite-orientation text,
.satellite-baseline-az text { fill: #f3f4f5; font-size: 10px; font-weight: 900; }
.satellite-orientation path { fill: #f6b82b; stroke: #050505; stroke-width: 1; }
.satellite-orientation line { stroke: #f6b82b; stroke-width: 3; }
.satellite-callout-leader { stroke: #d7dce0; stroke-width: 1.5; stroke-dasharray: 4 3; }
.satellite-plan-dimension path,
.satellite-plan-dimension line { fill: none; stroke: #e2e6e9; stroke-width: 1.35; }
.satellite-plan-dimension text {
  fill: #f3f4f5;
  font-size: 10px;
  font-weight: 900;
  paint-order: stroke;
  stroke: #090b0c;
  stroke-width: 4px;
}
.bore-input-group {
  min-width: 0;
}
.bore-input-group h5 {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.bore-input-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 10px;
  align-items: end;
}
.bore-input-group-shared .bore-input-grid {
  grid-template-columns: repeat(2, minmax(145px, 1fr));
}
.bore-input-grid label {
  min-width: 0;
  gap: 4px;
  font-size: 12px;
}
.bore-input-grid label.wide {
  grid-column: span 2;
}
.bore-input-group-shared .bore-input-grid input,
.bore-input-group-shared .bore-input-grid select,
.bore-input-group-shared .bore-input-grid label:has(select) select {
  width: 100%;
  max-width: none;
}
.bore-input-grid input,
.bore-input-grid select,
.hcurve-fields input,
.hcurve-fields select {
  min-height: 33px;
  padding: 6px 8px;
}
.bore-input-grid input,
.bore-input-grid select,
.hcurve-add-strip input,
.hcurve-add-strip select {
  width: 100%;
  max-width: none;
}
.bore-input-grid label:has(select) select {
  width: 100%;
  max-width: none;
}
.bore-hcurve-builder {
  margin-top: 14px;
  border-top: 1px solid #252b31;
  padding-top: 12px;
  display: grid;
  gap: 10px;
}
.hcurve-help {
  margin-top: 3px;
  color: var(--silver-2);
  font-size: 11px;
  font-weight: 800;
}
.hcurve-add-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px 10px;
  align-items: end;
}
.hcurve-add-strip label {
  min-width: 0;
  gap: 4px;
  font-size: 11px;
}
.hcurve-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.hcurve-chip {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid #323941;
  background: #080a0b;
  border-radius: 6px;
  padding: 8px 9px;
}
.hcurve-chip strong,
.hcurve-chip span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hcurve-chip strong {
  color: var(--gold);
  font-size: 14px;
}
.hcurve-chip span {
  color: var(--silver);
  font-size: 11px;
  font-weight: 800;
}
.hcurve-chip button {
  border: 1px solid var(--gold-2);
  background: var(--gold);
  color: #111111;
  border-radius: 6px;
  min-height: 30px;
  font-size: 11px;
  font-weight: 900;
}
.hcurve-length-readouts {
  margin-top: 10px;
  border-top: 1px solid #252b31;
  padding-top: 10px;
}
.hcurve-length-readouts h5 {
  margin: 0 0 7px;
  color: var(--white);
  font-size: 12px;
}
.hcurve-length-readouts > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}
.hcurve-length-readouts span {
  display: block;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #0d1208;
  color: var(--silver);
  font-size: 11px;
  font-weight: 800;
  padding: 7px 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hcurve-length-readouts strong {
  color: var(--gold);
}
.bore-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}
.bore-main-grid .visual-panel { min-width: 0; overflow: hidden; }
.bore-profile-panel .bore-visual,
.bore-plan-panel .bore-visual {
  width: 100%;
  height: clamp(470px, 45vw, 680px);
  min-height: 470px;
  aspect-ratio: auto;
  overflow: hidden;
}
.bore-main-grid .bore-visual svg {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
}
.plan-view-tools {
  display: flex;
  align-items: center;
  gap: 14px;
}
.plan-view-tools label {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  color: var(--gold);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}
.plan-view-tools input { width: auto; accent-color: var(--gold); }
@media (max-width: 1100px) {
  .bore-coordinate-panel { grid-template-columns: 1fr; }
  .report-activity-composer-grid {
    grid-template-columns: 142px 92px 92px 76px minmax(190px, 1fr);
  }
  .report-activity-composer-grid > label:last-child {
    grid-column: 4 / 5;
  }
  .report-activity-description {
    grid-column: 5 / -1;
    grid-row: 1 / span 2;
    align-self: stretch;
  }
  .report-activity-description input {
    height: calc(100% - 16px);
  }
}
.bore-results-panel .planner-results {
  margin-top: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.bore-results-panel .metrics div {
  min-height: 54px;
  padding: 8px 9px;
  background: #0d1208;
}
.bore-results-panel .metrics strong {
  color: var(--gold);
  font-size: 17px;
}
.hcurve-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.hcurve-card {
  border: 1px solid #283038;
  border-radius: 8px;
  background: #080a0b;
  padding: 10px;
  display: grid;
  gap: 10px;
}
.hcurve-card.enabled {
  border-color: var(--gold);
  background: linear-gradient(180deg, rgba(31, 27, 16, 0.9), rgba(10, 11, 9, 0.98));
}
.hcurve-card-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}
.hcurve-card-head span {
  display: block;
  color: var(--silver);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}
.hcurve-card-head strong {
  display: block;
  color: var(--white);
  font-size: 18px;
  line-height: 1.1;
}
.toggle-label {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  color: var(--silver);
  font-size: 12px;
  font-weight: 900;
}
.toggle-label input {
  width: 16px;
  min-height: 16px;
  accent-color: var(--gold);
}
.hcurve-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.hcurve-fields label {
  gap: 4px;
  font-size: 11px;
}
.hcurve-row { grid-template-columns: 0.45fr 0.85fr 0.85fr 0.85fr 0.85fr 0.85fr 0.8fr 0.8fr; }
.hcurve-row input[type="checkbox"] { width: auto; min-height: auto; }
.planner-results { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.planner-tables { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.mini-table { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #090b0c; }
.mini-table table { width: 100%; border-collapse: collapse; font-size: 12px; }
.mini-table th, .mini-table td { padding: 8px 9px; border-bottom: 1px solid #2a3035; text-align: right; white-space: nowrap; }
.mini-table th:first-child, .mini-table td:first-child { text-align: left; }

@media (max-width: 920px) {
  .abia-readouts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .abia-chart-head { flex-direction: column; }
}

@media (max-width: 560px) {
  .abia-readouts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1280px) and (min-width: 921px) {
  .topbar {
    grid-template-columns: minmax(190px, 0.7fr) auto minmax(500px, 1.5fr);
    gap: 8px;
  }
  .quick-joint {
    grid-template-columns: 58px 100px 68px minmax(300px, 1fr);
    gap: 5px;
  }
  .quick-joint-readouts { gap: 4px; }
  .quick-joint-readouts div { padding-inline: 4px; }
}
.mini-table tr:last-child td { border-bottom: 0; }
.mini-table th { color: var(--white); background: #171a1d; font-size: 11px; text-transform: uppercase; letter-spacing: 0; }
.scroll-table { overflow: auto; max-height: 420px; }
.warning-list { display: grid; gap: 6px; margin-bottom: 10px; }
.warning-list div { border: 1px solid #684a28; background: #241a10; color: #f4d7aa; border-radius: 6px; padding: 8px 10px; font-size: 13px; overflow-wrap: anywhere; }
.warning-list .ok { border-color: #2d6540; background: #102018; color: #bfe8cc; }
.formation-samples { margin-bottom: 12px; overflow-x: auto; }
.visual-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 12px 0 14px; }
.visual-panel { border: 1px solid var(--line); border-radius: 8px; background: #090b0c; padding: 10px; min-width: 0; }
.visual-title { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.visual-title h4 { margin: 0; }
.visual-title span { color: var(--silver); font-size: 12px; font-weight: 700; }
.bore-visual { aspect-ratio: 16 / 9; min-height: 240px; }
.bore-visual svg { width: 100%; height: 100%; display: block; }
.bore-detail-modal {
  width: min(1180px, calc(100vw - 54px));
  max-height: min(820px, calc(100vh - 54px));
}
.bore-detail-section {
  padding: 14px;
  overflow: auto;
}
.bore-detail-section h4 {
  margin: 0 0 10px;
}
.bore-detail-section .planner-tables {
  grid-template-columns: minmax(720px, 2.2fr) minmax(360px, 1fr);
}
.bore-detail-section .mini-table table {
  font-variant-numeric: tabular-nums;
}
.bore-detail-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.bore-detail-section-title h4 { margin: 0; }
.bore-detail-section-title button {
  min-height: 32px;
  padding: 6px 14px;
}
.bore-detail-modal .scroll-table {
  max-height: min(610px, calc(100vh - 210px));
}
.bore-export-modal-card {
  width: min(1180px, calc(100vw - 32px));
  max-height: 92vh;
  overflow: auto;
  border: 1px solid #8b6c25;
  box-shadow: 0 24px 80px #000, 0 0 0 1px #20262a inset;
  background: linear-gradient(145deg, #111518 0%, #080a0b 58%, #111315 100%);
}
.bore-export-modal-card .modal-title-row {
  border-bottom-color: #7b6023;
  background: linear-gradient(90deg, rgba(241,184,45,.12), transparent 48%);
}
.bore-export-modal-card .modal-title-row h3 { color: var(--gold); letter-spacing: .02em; }
.bore-export-modal-card .icon-button { border-color: #7b6023; color: var(--gold); }
.bore-export-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(150px, 1fr)) repeat(2, minmax(180px, .85fr));
  gap: 12px;
  align-items: stretch;
  margin: 16px 0;
  padding: 14px;
  border: 1px solid #30383d;
  border-radius: 12px;
  background: #07090a;
}
.bore-export-controls label {
  display: grid;
  gap: 7px;
  align-content: center;
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .035em;
  text-transform: uppercase;
}
.bore-export-controls input { width: 100%; border-color: #667078; color: var(--white); background: #0d1113; }
.bore-export-action {
  display: grid;
  gap: 3px;
  align-content: center;
  min-height: 58px;
  padding: 9px 16px;
  border: 1px solid #d19b20;
  border-radius: 9px;
  background: linear-gradient(180deg, #f7c54d, #e7a91b);
  color: #080a0b;
  box-shadow: 0 2px 0 #77520c;
}
.bore-export-action span { font-size: 9px; font-weight: 950; letter-spacing: .11em; opacity: .72; }
.bore-export-action strong { font-size: 15px; }
.bore-export-report-action {
  background: linear-gradient(180deg, #252b2f, #111416);
  border-color: #d8dde0;
  color: var(--gold);
  box-shadow: 0 2px 0 #050607;
}
.bore-export-modal-card .cad-points-output { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.bore-export-block { border-color: #5f4b20; border-radius: 11px; box-shadow: 0 10px 24px rgba(0,0,0,.26); }
.bore-export-block .cad-copy-head {
  align-items: center;
  padding: 12px;
  border-bottom-color: #5f4b20;
  background: linear-gradient(135deg, rgba(241,184,45,.14), rgba(207,213,217,.04));
}
.bore-export-block-title { display: grid; grid-template-columns: auto 1fr; gap: 3px 8px; align-items: center; min-width: 0; }
.bore-export-block-title strong { font-size: 15px; }
.bore-export-block-title small { grid-column: 1 / -1; color: var(--silver); font-size: 10px; font-weight: 750; }
.bore-export-badge {
  padding: 3px 6px;
  border: 1px solid #8b6c25;
  border-radius: 4px;
  color: var(--gold) !important;
  background: #090b0c;
  font-size: 9px !important;
  letter-spacing: .07em;
}
.bore-copy-button {
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid #8b6c25;
  border-radius: 7px;
  background: #111518;
  color: var(--gold);
  font-size: 11px;
  font-weight: 900;
}
.bore-copy-button.is-copied { border-color: #b8bec2; color: #fff; background: #293036; }
.bore-export-code-meta {
  padding: 7px 12px;
  border-bottom: 1px solid #252c30;
  color: var(--silver);
  background: #0b0e10;
  font-size: 10px;
  font-weight: 800;
}
.bore-export-modal-card .cad-copy-block textarea {
  min-height: 330px;
  padding: 12px;
  color: #edf0f2;
  background: #050607;
  font-size: 12px;
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 900px) {
  .bore-export-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bore-export-modal-card .cad-points-output { grid-template-columns: 1fr; }
}
.visual-gridline { stroke: #30363b; stroke-width: 1; }
.visual-gridline.major { stroke: #414950; stroke-width: 1.05; }
.visual-gridline.minor { stroke: #242a2f; stroke-width: .75; }
.visual-grid-label {
  fill: #929ba2;
  paint-order: stroke;
  stroke: #090b0c;
  stroke-width: 2px;
  font-size: 8px;
  font-weight: 750;
}
.visual-axis { stroke: var(--silver-2); stroke-width: 1.4; }
.visual-path { fill: none; stroke: var(--gold); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.visual-path-silver { fill: none; stroke: var(--silver); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.visual-path-topo { fill: none; stroke: #55b86a; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.visual-path-blue { fill: none; stroke: #2ea8e6; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.visual-path-blue-shadow {
  fill: none;
  stroke: #050505;
  stroke-width: 3.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: .85;
}
.as-drilled-shot-marker {
  fill: #050607;
  stroke: #2ea8e6;
  stroke-width: 1.15;
}
.current-bit-marker circle {
  fill: #050607;
  stroke: #f6b82b;
  stroke-width: 1.6;
}
.current-bit-marker line,
.current-bit-marker path {
  fill: none;
  stroke: #f6b82b;
  stroke-width: 1.25;
  stroke-linecap: round;
}
.current-bit-marker text {
  fill: #fff;
  stroke: #050607;
  stroke-width: 2px;
  paint-order: stroke;
  font: 850 9px system-ui, sans-serif;
  letter-spacing: .04em;
}
.profile-angle-dimension line,
.profile-angle-dimension path { fill: none; stroke: #d9dde0; stroke-width: 1.35; }
.profile-angle-dimension text {
  fill: #edf0f2;
  paint-order: stroke;
  stroke: #090b0c;
  stroke-width: 4px;
  font-size: 10px;
  font-weight: 900;
}
.satellite-control-card-vertical text { font-size: 5.3px; }
.satellite-control-card-vertical .control-title { font-size: 5.8px; }
.plan-utilities-switch {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--silver-2);
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}
.plan-utilities-switch input { position: absolute; opacity: 0; pointer-events: none; }
.plan-utilities-track {
  position: relative;
  width: 34px;
  height: 18px;
  border: 1px solid #626a70;
  border-radius: 999px;
  background: #171b1e;
  transition: .18s ease;
}
.plan-utilities-track::after {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  left: 2px;
  top: 2px;
  border-radius: 50%;
  background: var(--silver-2);
  transition: .18s ease;
}
.plan-utilities-switch input:checked + .plan-utilities-track {
  border-color: var(--gold);
  background: #5d4815;
}
.plan-utilities-switch input:checked + .plan-utilities-track::after {
  transform: translateX(16px);
  background: var(--gold);
}
.plan-utilities-switch input:disabled + .plan-utilities-track { opacity: .42; }
.visual-path-danger { fill: none; stroke: #cf5b5b; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 9 7; }
.visual-path-limit { fill: none; stroke: #ff8b5d; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 4 6; }
.visual-path-actual { fill: none; stroke: #ffffff; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.visual-path-static { fill: none; stroke: #62a7ff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.visual-path-overburden { fill: none; stroke: #7f8a94; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 3 7; }
.visual-path-shadow { fill: none; stroke: #000000; stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; opacity: 0.75; }
.visual-marker { fill: var(--white); stroke: var(--black); stroke-width: 1.5; }
.visual-label { fill: var(--silver); font-size: 12px; font-weight: 700; }
.visual-note { fill: var(--silver-2); font-size: 13px; font-weight: 800; }
.rocky-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr); gap: 16px; align-items: stretch; }
.rocky-status { margin-bottom: 14px; }
.rocky-status-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.rocky-status-grid > div {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #101416 0%, #090b0c 100%);
  padding: 10px 12px;
}
.rocky-status strong { color: var(--white); }
.rocky-status span, .rocky-status small { color: var(--silver); }
.rocky-chat, .rocky-training { border-top: 0; padding-top: 0; margin-top: 0; }
.rocky-chat textarea { min-height: 150px; }
.rocky-training textarea { min-height: 128px; }
.rocky-ask-actions { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.rocky-voice-panel {
  color: var(--silver);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 13px;
  font-weight: 800;
}
.voice-controls { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: end; margin-top: 10px; }
.rocky-reply {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #090b0c;
  min-height: 180px;
  padding: 12px;
}
.rocky-reply pre {
  margin: 8px 0 0;
  white-space: pre-wrap;
  color: var(--white);
  font-family: inherit;
  line-height: 1.45;
}
.rocky-meta, .thinking, .empty-note { color: var(--silver); font-size: 13px; font-weight: 700; }
.rocky-error { color: #f1d0d0; font-weight: 700; }
.rocky-feedback-panel {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding-top: 10px;
}
.rocky-feedback-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.rocky-feedback-actions .secondary-button,
.rocky-save-correction {
  min-height: 34px;
  padding: 7px 12px;
}
.rocky-correction label {
  color: var(--silver);
  display: grid;
  font-size: 13px;
  font-weight: 800;
  gap: 6px;
}
.rocky-correction textarea {
  min-height: 84px;
  resize: vertical;
}
.rocky-feedback-status {
  color: var(--gold);
  font-size: 13px;
  font-weight: 900;
}
.rocky-library { margin-top: 18px; }
.rocky-memory-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr); gap: 16px; margin-top: 14px; }
.rocky-learning-summary {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #080a0b;
  padding: 12px;
  min-height: 126px;
}
.rocky-learned-card { display: grid; gap: 7px; color: var(--silver); }
.rocky-learned-card strong { color: var(--gold); }
.rocky-learned-card ul { margin: 0; padding-left: 18px; }
.rocky-learned-card small { color: var(--silver-2); font-weight: 800; }
#rockyLibraryFiles { padding: 7px; }
#rockyLibraryStatus { margin-top: 10px; }

.admin-page { max-width: 100%; }
.admin-header {
  background: linear-gradient(115deg, rgba(241, 183, 36, 0.09), transparent 45%);
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: 10px;
  padding: 16px 18px;
}
.admin-scope-badge,
.sync-mode-badge {
  align-items: center;
  border: 1px solid #6e5b17;
  border-radius: 999px;
  background: #171407;
  color: var(--gold);
  display: inline-flex;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .04em;
  min-height: 34px;
  padding: 6px 12px;
  text-transform: uppercase;
}
.sync-mode-badge.connected { border-color: #277a43; background: #09170e; color: #61d66f; }
.sync-mode-badge.offline { border-color: #8b3a3a; background: #190b0b; color: #ff8b8b; }
.admin-status { margin: 14px 0; }
.admin-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.admin-metric {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #15191b 0%, #090b0c 100%);
  padding: 13px;
}
.admin-metric span {
  color: var(--silver);
  display: block;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.admin-metric strong {
  color: var(--gold);
  display: block;
  font-size: 25px;
  margin-top: 5px;
}
.admin-grid {
  align-items: start;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.admin-grid .settings-panel.wide { grid-column: 1 / -1; }
.admin-license-form {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 12px 0;
}
.admin-license-form button { align-self: end; min-height: 38px; }
.admin-license-form label {
  color: var(--silver);
  display: grid;
  font-size: 11px;
  font-weight: 900;
  gap: 5px;
}
.admin-users-panel,
.admin-sessions-panel {
  background:
    linear-gradient(135deg, rgba(241, 183, 36, 0.055), transparent 38%),
    linear-gradient(180deg, #111517 0%, #080a0b 100%);
}
.admin-users-panel .band-title-row,
.admin-sessions-panel .band-title-row { margin-bottom: 12px; }
.admin-users-panel .band-title-row p,
.admin-sessions-panel .band-title-row p,
.admin-releases-panel .band-title-row p {
  color: var(--silver);
  font-size: 12px;
  margin: 3px 0 0;
}
.admin-release-files {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 12px 0;
}
.admin-release-card {
  align-items: center;
  background: linear-gradient(180deg, #14181a 0%, #090b0c 100%);
  border: 1px solid #394148;
  border-left: 3px solid var(--gold);
  border-radius: 8px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  min-height: 92px;
  padding: 12px;
}
.admin-release-card div { display: grid; gap: 4px; }
.admin-release-card strong { color: #fff; font-size: 15px; }
.admin-release-card small { color: var(--silver); font-size: 11px; }
.admin-release-card span { color: var(--gold); font-size: 10px; font-weight: 900; text-transform: uppercase; }
.admin-release-card button {
  background: linear-gradient(180deg, #f6c84e 0%, var(--gold) 100%);
  border-color: #f8d66f;
  color: #080808;
  flex: 0 0 auto;
  min-width: 150px;
}
.admin-release-card button:hover { background: #ffd761; }
.admin-download-history-title {
  border-top: 1px solid var(--line);
  margin-top: 14px;
  padding-top: 14px;
}
.admin-section-kicker {
  border: 1px solid #5a4a16;
  border-radius: 999px;
  color: var(--gold);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .08em;
  padding: 6px 9px;
  text-transform: uppercase;
}
.admin-table-wrap {
  border: 1px solid #2b3338;
  border-radius: 8px;
  max-height: 300px;
  overflow: auto;
}
.admin-table-wrap table { margin: 0; min-width: 620px; width: 100%; }
.admin-table-wrap th {
  background: #111618;
  color: var(--gold);
  position: sticky;
  top: 0;
  z-index: 2;
}
.admin-table-wrap td,
.admin-table-wrap th { padding: 8px 9px; }
.admin-table-wrap .empty-note { padding: 14px; }
.admin-table-wrap .compact-button {
  min-height: 30px;
  min-width: 74px;
  padding: 5px 9px;
}
.admin-users-table { min-width: 930px !important; }
.admin-users-table td { vertical-align: middle; }
.admin-users-table td > small,
.admin-user-identity small {
  color: var(--silver);
  display: block;
  font-size: 10px;
  margin-top: 3px;
}
.admin-user-identity {
  align-items: center;
  display: flex;
  gap: 9px;
}
.admin-user-avatar {
  align-items: center;
  background: linear-gradient(145deg, var(--gold), #9d6910);
  border: 1px solid #f5cf65;
  border-radius: 50%;
  color: #080808;
  display: inline-flex;
  flex: 0 0 32px;
  font-size: 13px;
  font-weight: 950;
  height: 32px;
  justify-content: center;
}
.admin-role-select {
  font-size: 12px;
  min-height: 34px;
  min-width: 160px;
  padding: 5px 28px 5px 8px;
}
.admin-role-select:disabled {
  border-color: #3f464b;
  color: var(--silver);
  opacity: .72;
}
.admin-rocky-heading { margin-top: 16px; }
.admin-rocky-heading h4 { color: var(--gold); }

.settings-page {
  max-width: 100%;
}
.settings-header {
  background: linear-gradient(115deg, rgba(184, 192, 199, 0.07), transparent 48%);
  border: 1px solid var(--line);
  border-left: 4px solid var(--silver);
  border-radius: 10px;
  margin-bottom: 14px;
  padding: 16px 18px;
}
.settings-grid {
  align-items: start;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.settings-panel {
  align-self: start;
  border: 1px solid #30383d;
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.025), transparent 42%),
    linear-gradient(180deg, #111517 0%, #080a0b 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.025);
  padding: 15px;
  min-width: 0;
}
.settings-panel.wide {
  grid-column: 1 / -1;
}
.settings-panel h4 {
  color: var(--gold);
  font-size: 15px;
  margin: 0 0 12px;
}
.settings-units-panel { grid-column: 1 / -1; }
.settings-sync-panel,
.mobile-pairing-panel {
  border-left: 3px solid var(--gold);
}
.settings-account-panel {
  border-left: 3px solid var(--silver);
}
.settings-recovery-panel {
  background:
    linear-gradient(135deg, rgba(87, 124, 79, 0.07), transparent 42%),
    linear-gradient(180deg, #111517 0%, #080a0b 100%);
}
.settings-cad-panel,
.settings-integrations-panel { min-height: 100%; }
.settings-field-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
}
.settings-field-grid.compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.settings-field-grid label,
.mobile-link-box label {
  color: var(--silver);
  font-size: 12px;
  font-weight: 900;
}
.settings-field-grid input,
.settings-field-grid select,
.mobile-link-box input {
  min-height: 38px;
}
.settings-subhead {
  margin-top: 12px;
  margin-bottom: 8px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
.settings-note {
  margin-top: 10px;
  color: var(--silver);
  font-size: 12px;
  font-weight: 750;
}
.settings-readouts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.settings-readouts div {
  border: 1px solid #2d363d;
  border-radius: 7px;
  background: #101507;
  padding: 9px 10px;
}
.settings-readouts span {
  display: block;
  color: var(--silver);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.settings-readouts strong {
  display: block;
  margin-top: 4px;
  color: var(--gold);
  font-size: 15px;
  font-weight: 950;
}
.settings-sync-readouts { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.mobile-pairing-layout {
  align-items: stretch;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 16px;
  margin-top: 12px;
}
.mobile-pairing-qr {
  align-items: center;
  aspect-ratio: 1;
  background: #fff;
  border: 4px solid var(--gold);
  border-radius: 10px;
  display: flex;
  justify-content: center;
  min-height: 210px;
  overflow: hidden;
  padding: 9px;
}
.mobile-pairing-qr svg { display: block; height: 100%; width: 100%; }
.mobile-pairing-qr .empty-note {
  color: #333;
  max-width: 160px;
  text-align: center;
}
.mobile-pairing-details { min-width: 0; }
.mobile-pairing-details .settings-readouts { margin-top: 0; }
#settingsPairingCode { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .18em; }
.mobile-link-box {
  display: grid;
  gap: 10px;
}
.readme-modal-card {
  width: min(720px, calc(100vw - 44px));
}
.readme-placeholder {
  padding: 16px;
  color: var(--silver);
}
.readme-placeholder h4 {
  color: var(--gold);
  margin-bottom: 8px;
}

@media (max-width: 920px) {
  #app { grid-template-columns: 1fr; }
  .sidebar { border-right: 0; border-bottom: 1px solid #2b3238; max-height: 46vh; }
  .project-file-row { grid-template-columns: 1fr; }
  .project-file-row-actions { justify-items: start; }
  .formation-flow-strip { grid-template-columns: 1fr; }
  .grid.four, .grid.two, .metrics, .planner-results, .planner-tables, .visual-grid, .formation-row, .formation-layer-main, .formation-layer-properties, .formation-library-form, .steering-row, .daily-row, .hcurve-row, .rocky-grid, .admin-grid, .job-info-layout, .job-workbook-layout, .job-info-board, .ap-import-grid, .rivcross-import-grid, .data-link-grid, .project-upload-grid, .data-link-status, .project-file-previews, .data-sheet-modal-grid, .ap-results, .reports-grid, .report-checks, .bend-radius-fields, .bend-radius-results, .bore-hero-grid, .bore-main-grid, .hcurve-cards, .settings-grid, .settings-field-grid { grid-template-columns: 1fr 1fr; }
  .settings-sync-readouts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .report-workbench { grid-template-columns: minmax(280px, 0.38fr) minmax(0, 0.62fr); }
  .topbar { grid-template-columns: 1fr; align-items: center; row-gap: 8px; min-height: 126px; }
  .topbar-left { align-items: center; flex-direction: row; gap: 12px; }
  .quick-rocky-button { justify-self: start; }
  .quick-joint { justify-self: stretch; grid-template-columns: 64px 70px 76px minmax(0, 1fr); }
  .home-layout { grid-template-columns: minmax(220px, 280px) minmax(0, 1fr); }
  .home-actions { grid-template-columns: repeat(4, minmax(0, 1fr)); width: min(780px, calc(100vw - 136px)); }
  .rig-panel { grid-column: 1 / -1; }
  .workbook-reset .rig-panel { position: static; }
  .bha-input-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bha-workbook-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .common-calc-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "compound steering"
      "compound pump"
      "mud bend"
      "mud hydraulics"
      "bundle bundle";
  }
  .calc-panel { grid-column: auto; }
  .job-inputs, .job-readouts, .job-card-wide, .job-field-grid.three, .job-field-grid.four, .job-field-grid.six { grid-column: 1 / -1; }
  .job-field-grid.three, .job-field-grid.four, .job-field-grid.six { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .calc-panel.wide { grid-column: auto; }
  .compound-fields, .compound-results { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bore-input-groups { grid-template-columns: 1fr; gap: 14px; }
  .bore-planner-header .action-row { grid-template-columns: repeat(3, 140px); }
  .bore-planner-header .action-row > button { width: 140px; }
  .bore-input-grid, .hcurve-add-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bore-input-group-shared .bore-input-grid { grid-template-columns: repeat(2, minmax(145px, 1fr)); }
  .hcurve-list { grid-template-columns: 1fr; }
  .ap-title-row { align-items: stretch; }
  .ap-title-row .action-row { justify-content: flex-start; }
  .annular-report-head { align-items: flex-start; }
  .annular-legend { justify-content: flex-start; max-width: 100%; }
  .ap-support-grid, .ap-chart-grid { grid-template-columns: 1fr; }
  .ap-main-grid, .ap-workspace .ap-chart-grid { grid-template-columns: 1fr; }
  .ap-control-rail { order: -1; }
  .annular-report-visual { min-height: 360px; }
  .rocky-status-grid, .rocky-memory-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .home-layout { grid-template-columns: 1fr; }
  .home-recent-panel { order: 2; min-height: 220px; }
  .home-start { order: 1; min-height: auto; }
  .home-name { width: min(560px, 82vw); }
}

@media (max-width: 560px) {
  .grid.four, .grid.two, .metrics, .planner-results, .planner-tables, .visual-grid, .formation-row, .formation-layer-main, .formation-layer-properties, .formation-library-form, .steering-row, .daily-row, .hcurve-row, .rocky-grid, .rocky-status-grid, .rocky-memory-grid, .admin-grid, .admin-metrics, .admin-release-files, .voice-controls, .home-layout, .home-project, .job-info-layout, .job-workbook-layout, .job-info-board, .job-inputs, .job-readouts, .job-field-grid.two, .job-field-grid.three, .job-field-grid.four, .job-readout-grid, .compact-fields, .compact-fields.two-col, .rig-field-grid, .readout-grid, .bha-input-grid, .bha-workbook-fields, .common-calc-grid, .calc-fields, .calc-results, .compound-fields, .compound-results, .ap-import-grid, .rivcross-import-grid, .data-link-grid, .project-upload-grid, .data-link-status, .project-file-previews, .data-sheet-modal-grid, .ap-results, .reports-grid, .report-checks, .report-workbench, .bundle-layout, .bore-hero-grid, .bore-main-grid, .hcurve-cards, .bore-input-groups, .bore-input-grid, .bore-input-group-shared .bore-input-grid, .hcurve-fields, .hcurve-add-strip, .hcurve-list, .hcurve-chip, .drill-log-strip, .settings-grid, .settings-field-grid, .settings-field-grid.compact, .settings-readouts, .cad-points-controls, .new-project-fields, .mobile-pairing-layout { grid-template-columns: 1fr; }
  .mobile-pairing-qr { justify-self: center; width: min(220px, 100%); }
  .core-sample-grid, .core-sample-meta, .core-layer-inputs, .formation-side { grid-template-columns: 1fr; }
  .report-activity-composer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-activity-composer-grid > label,
  .report-activity-composer-grid > label:last-child,
  .report-activity-description {
    grid-column: auto;
    grid-row: auto;
  }
  .report-activity-description { grid-column: 1 / -1; }
  .report-activity-description input { height: auto; }
  .report-activity-composer-actions { align-items: stretch; flex-direction: column; }
  .formations-header .action-row { justify-content: flex-start; }
  .new-project-fields label:first-child,
  .new-project-fields label:nth-child(3) { grid-column: auto; }
  .bore-source-picker { grid-template-columns: 1fr; width: 100%; }
  .bore-planner-header .action-row { grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .bore-planner-header .action-row > button { width: 100%; }
  .folder-plan-preview ul { grid-template-columns: 1fr; }
  .bore-input-grid input,
  .bore-input-grid select,
  .hcurve-add-strip input,
  .hcurve-add-strip select,
  .bore-input-grid label:has(select) select {
    width: 100%;
    max-width: none;
  }
  .common-calc-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "compound"
      "steering"
      "pump"
      "mud"
      "bend"
      "hydraulics"
      "bundle";
  }
  .tooling-add-grid, .tooling-row { grid-template-columns: 1fr; }
  .job-toolbar-actions, .bha-title-actions { align-items: stretch; flex-direction: column; }
  .workspace { padding: 10px 10px 46px; }
  .page-header { flex-direction: column; }
  .topbar-left { flex-direction: row; align-items: center; }
  .topbar h2, .topbar p { display: none; }
  .topbar { min-height: 152px; }
  .quick-joint { grid-template-columns: 1fr; }
  .quick-joint-readouts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ap-compact-imports, .ap-settings-grid, .ap-raw-grid { grid-template-columns: 1fr; }
  .ap-header-row { align-items: stretch; flex-direction: column; }
  .ap-header-row .action-row { justify-content: flex-start; }
  .ap-input-grid { display: grid; grid-template-columns: repeat(2, minmax(0, max-content)); }
  .ap-readout-stack { grid-template-columns: 1fr; }
  .annular-summary-strip { grid-template-columns: repeat(2, minmax(120px, 1fr)); }
  .annular-report-visual { min-height: 300px; }
  .job-card-title, .calc-panel-title { align-items: stretch; flex-direction: column; }
  .job-logo-tools { grid-template-columns: 1fr; }
  .segmented-control { grid-template-columns: 1fr 1fr; width: 100%; }
  .home-actions { grid-template-columns: 1fr; }
  .home-layout { padding: 10px; }
  .home-recent-panel { order: 2; }
  .home-start { order: 1; min-height: auto; }
  .home-logo { width: 112px; }
  .home-name { width: min(430px, 88vw); max-height: 125px; }
  .status-right { display: none; }
  .bha-clean-diagram { min-height: 360px; }
  .bha-clean-track {
    min-height: 310px;
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 22px;
  }
  .bha-clean-part { width: 100%; }
  .bha-clean-part span { top: 52px; }
  .bha-schematic { min-height: 360px; }
  .bha-schematic svg { min-height: 170px; }
  .bha-callout { position: static; margin-top: 6px; }
  .bha-part::before, .bha-part::after { display: none; }
}

@media print {
  .topbar, .page-nav, .status-bar { display: none !important; }
  body * { visibility: hidden; }
  #reportPreview, #reportPreview * { visibility: visible; }
  #reportPreview {
    position: absolute;
    inset: 0;
    border: 0;
    padding: 0;
    overflow: visible;
  }
  .report-paper { max-width: none; margin: 0; padding: 0.25in; }
}
