input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none!important;margin:0!important;display:none!important}
input[type="number"]{-moz-appearance:textfield!important;appearance:textfield!important}

body.drill-master-mode .sidebar,
body.drill-master-mode #mainNav,
body.drill-master-mode .breadcrumbs,
body.drill-master-mode .hole-manager,
body.drill-master-mode .top-actions,
body.drill-master-mode .page-heading,
body.drill-master-mode .progress-strip,
body.drill-master-mode .right-rail,
body.drill-master-mode #descriptionDock {
  display: none !important;
}

body.drill-master-mode .app-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) !important;
  min-height: 100vh;
}

body.drill-master-mode .main-area { min-width: 0; }
body.drill-master-mode .topbar {
  min-height: 58px;
  justify-content: flex-end;
  padding-inline: clamp(14px, 4vw, 42px);
  background: #f8fafc;
  border-bottom-color: #e2e8f0;
}
body.drill-master-mode #rbacHeaderMount { margin-left: auto; }
body.drill-master-mode .content-wrap {
  max-width: 1080px;
  margin-inline: auto;
  padding: clamp(16px, 4vw, 42px);
}
body.drill-master-mode .work-grid { grid-template-columns: minmax(0, 1fr) !important; }
body.drill-master-mode .work-main { min-width: 0; }

.drill-master-page {
  --drill-ink: #1e293b;
  --drill-muted: #64748b;
  --drill-teal: #475569;
  --drill-line: #e2e8f0;
  max-width: 900px;
  margin: 0 auto;
  color: var(--drill-ink);
}
.drill-master-tabs {
  display: flex;
  width: max-content;
  max-width: 100%;
  margin-bottom: 18px;
  padding: 4px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #f1f5f9;
}
.drill-master-tab {
  min-height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 9px;
  background: #fff;
  color: var(--drill-teal);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .08);
}
.drill-master-welcome {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 18px;
  padding: clamp(18px, 3.5vw, 30px);
  border: 1px solid #cbd5e1;
  border-radius: 18px;
  background: linear-gradient(120deg, #f1f5f9 0%, #fff 68%);
}
.drill-summary-eyebrow {
  display: block;
  margin-bottom: 8px;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .11em;
}
.drill-master-welcome h1 {
  margin: 0;
  color: #1e293b;
  font-size: clamp(23px, 4vw, 32px);
  line-height: 1.18;
}
.drill-master-welcome p {
  margin: 10px 0 0;
  color: var(--drill-muted);
  font-size: 15px;
  line-height: 1.5;
}
.drill-summary-step,
.drill-summary-date {
  flex: none;
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #fff;
  color: #475569;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
}
.drill-summary-entry,
.drill-summary-review {
  margin-top: 16px;
  padding: clamp(17px, 3vw, 26px);
  border: 1px solid var(--drill-line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(30, 41, 59, .045);
}
.drill-summary-section-head,
.drill-summary-review-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 20px;
}
.drill-summary-section-head h2,
.drill-summary-review-head h2 {
  margin: 0;
  color: #1e293b;
  font-size: 20px;
  line-height: 1.25;
}
.drill-summary-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.drill-summary-field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 7px;
  color: #475569;
  font-size: 13px;
  font-weight: 700;
}
.drill-summary-field-hole { grid-column: 1 / -1; }
.drill-summary-field input,
.drill-summary-field select,
.drill-summary-field textarea {
  box-sizing: border-box;
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  outline: none;
  background: #fff;
  color: #1e293b;
  font: inherit;
  font-size: 16px;
  font-weight: 500;
}
.drill-summary-field input:focus,
.drill-summary-field select:focus,
.drill-summary-field textarea:focus {
  border-color: #475569;
  box-shadow: 0 0 0 3px rgba(71, 85, 105, .15);
}
.drill-summary-field .has-error,
.drill-summary-field input.has-error,
.drill-summary-field select.has-error,
.drill-summary-field textarea.has-error {
  border-color: #d2685e;
  background: #fff9f8;
}
.drill-summary-field textarea { min-height: 94px; resize: vertical; }
.drill-summary-field-note { grid-column: 1 / -1; }
.drill-summary-field-note small { color: #64748b; font-size: 11px; font-weight: 500; }
.drill-summary-create {
  margin-top: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 11px;
  background: #f8fafc;
}
.drill-summary-create > summary {
  padding: 13px 15px;
  color: #475569;
  font-size: 14px;
  font-weight: 750;
  cursor: pointer;
}
.drill-summary-create-body { padding: 0 14px 14px; }
.drill-summary-create-hint { margin: 0 0 12px; color: #64748b; font-size: 12px; line-height: 1.5; }
.drill-summary-create-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.drill-summary-create-card { display: flex; min-width: 0; flex-direction: column; gap: 10px; padding: 13px; border: 1px solid #e2e8f0; border-radius: 10px; background: #fff; }
.drill-summary-create-card h3 { margin: 0; color: #334155; font-size: 14px; }
.drill-summary-create-card .button { min-height: 42px; align-self: flex-start; }
.drill-summary-create-card .button:disabled { cursor: not-allowed; opacity: .5; }
.drill-summary-voice-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}
.drill-summary-voice-row .button {
  min-height: 46px;
  padding-inline: 18px;
  font-size: 14px;
}
.drill-summary-voice-label,
.drill-summary-sync-note {
  color: var(--drill-muted);
  font-size: 12px;
  line-height: 1.5;
}
.drill-summary-transcript {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 10px;
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
  color: #64748b;
  font-size: 13px;
  line-height: 1.5;
}
.drill-summary-transcript strong { color: #475569; }
.drill-summary-review { border-color: #cbd5e1; }
.drill-summary-review.has-errors { border-left: 4px solid #d39a44; }
.drill-summary-review.is-valid { border-left: 4px solid #64748b; }
.drill-summary-review-badge {
  flex: none;
  padding: 7px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
}
.drill-summary-review.is-valid .drill-summary-review-badge {
  background: #f1f5f9;
  color: #475569;
}
.drill-summary-review-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}
.drill-summary-review-grid > div {
  padding: 12px 13px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
}
.drill-summary-review-grid dt {
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
}
.drill-summary-review-grid dd {
  margin: 5px 0 0;
  color: #1e293b;
  font-size: 15px;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.drill-summary-review-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 18px;
  color: #64748b;
  font-size: 12px;
}
.drill-summary-review-foot strong { color: #334155; }
.drill-summary-review-foot .button { min-height: 44px; }
.drill-summary-review-foot .button:disabled { cursor: not-allowed; opacity: .5; }
.drill-summary-error {
  margin: 6px 0 0;
  color: #b3433b;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}
.drill-summary-error[hidden] { display: none !important; }
.drill-summary-note-preview { grid-column: 1 / -1; }
.drill-summary-status {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 9px;
  font-size: 13px;
  line-height: 1.45;
}
.drill-summary-status.info { background: #f1f5f9; color: #475569; }
.drill-summary-status.success { background: #f1f5f9; color: #475569; }
.drill-summary-status.error { background: #fff0ee; color: #a33d35; }
.drill-summary-empty {
  margin: 14px 0 0;
  padding: 11px 13px;
  border-radius: 9px;
  background: #fff7e9;
  color: #815f29;
  font-size: 13px;
}
.drill-summary-sync-note { margin: 12px 0 0; }

@media (max-width: 640px) {
  body.drill-master-mode .content-wrap { padding: 14px 12px calc(22px + env(safe-area-inset-bottom)); }
  body.drill-master-mode .topbar { min-height: 50px; padding-inline: 12px; }
  .drill-master-welcome { flex-direction: column; gap: 14px; }
  .drill-summary-fields { grid-template-columns: 1fr; gap: 12px; }
  .drill-summary-field-hole { grid-column: auto; }
  .drill-summary-field-note,
  .drill-summary-note-preview { grid-column: auto; }
  .drill-summary-create-grid { grid-template-columns: 1fr; }
  .drill-summary-review-grid { grid-template-columns: 1fr; }
  .drill-summary-review-head { flex-direction: column; }
  .drill-summary-review-foot { align-items: stretch; flex-direction: column; }
  .drill-summary-review-foot .button { width: 100%; }
  .drill-summary-create-card .button { width: 100%; }
  .drill-summary-transcript { grid-template-columns: 1fr; gap: 4px; }
}


/* Shift reports and the standalone Drill Master header */
.drill-summary-shifts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 16px;
}
.drill-summary-shift-tab {
  display: flex;
  min-width: 0;
  min-height: 62px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 13px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  color: #334155;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.drill-summary-shift-tab[aria-selected="true"] {
  border-color: #475569;
  background: #f1f5f9;
  box-shadow: 0 0 0 2px rgba(71, 85, 105, .1);
}
.drill-summary-shift-tab strong { display: block; font-size: 14px; }
.drill-summary-shift-state { color: #7a8987; font-size: 11px; font-weight: 700; text-align: right; }
.drill-summary-shift-state.is-synced { color: #475569; }
.drill-summary-shift-state.is-pending { color: #9b6a24; }
.drill-summary-shift-status { margin: 0 0 14px; padding: 10px 12px; border-radius: 9px; background: #f1f5f9; color: #475569; font-size: 13px; line-height: 1.45; }
.drill-summary-shift-status.is-synced { background: #f1f5f9; color: #475569; }
.drill-summary-shift-status.is-pending { background: #fff7e9; color: #815f29; }
.drill-summary-readonly-field { opacity: .82; }
.drill-summary-edit-action { min-height: 44px; }
.drill-shift-report-windows { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 10px 0 20px; }
.drill-shift-report-window { min-width: 0; padding: 16px; border: 1px solid #e2e8f0; border-radius: 13px; background: #fff; box-shadow: 0 3px 14px rgba(30, 41, 59, .035); }
.drill-shift-report-window-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.drill-shift-report-window-head h3 { margin: 0; color: #1e293b; font-size: 17px; }
.drill-shift-report-count { display: grid; min-width: 28px; height: 28px; place-items: center; border-radius: 999px; background: #f1f5f9; color: #475569; font-size: 12px; font-weight: 800; }
.drill-shift-report-window-metrics { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.drill-shift-report-meterage { color: #475569; font-size: 12px; font-weight: 800; white-space: nowrap; }
.drill-shift-report-list { display: grid; gap: 9px; }
.drill-shift-report-card { min-width: 0; padding: 12px; border: 1px solid #e2e8f0; border-radius: 10px; background: #f8fafc; }
.drill-shift-report-card > header, .drill-shift-report-card > footer { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.drill-shift-report-card > header strong { color: #1e293b; font-size: 14px; overflow-wrap: anywhere; }
.drill-shift-report-card > header span, .drill-shift-report-card > footer { color: #64748b; font-size: 11px; }
.drill-shift-report-project { margin: 3px 0 8px; color: #64748b; font-size: 11px; }
.drill-shift-report-values { display: flex; flex-wrap: wrap; gap: 8px 14px; margin: 0; color: #334155; font-size: 13px; font-weight: 650; }
.drill-shift-report-note { margin: 8px 0 0; color: #475569; font-size: 12px; line-height: 1.45; overflow-wrap: anywhere; }
.drill-shift-report-card > footer { flex-wrap: wrap; margin-top: 9px; padding-top: 8px; border-top: 1px solid #e2e8f0; }
.drill-shift-report-card > footer .is-synced { color: #475569; }
.drill-shift-report-card > footer .is-pending { color: #9b6a24; }
.drill-shift-report-revision { color: #64748b; }
.drill-shift-report-empty, .drill-shift-report-loading { margin: 0; padding: 12px; border-radius: 9px; background: #f8fafc; color: #64748b; font-size: 12px; line-height: 1.45; }
.drill-shift-report-empty.is-error { color: #a33d35; background: #fff0ee; }
.drill-shift-reports-section { margin: 18px 0 20px; }
.drill-shift-reports-section > h2 { margin: 0 0 6px; color: #1e293b; font-size: 19px; }
.drill-shift-reports-section > p { margin: 0 0 10px; color: #64748b; font-size: 12px; }

body.drill-master-mode .topbar {
  position: sticky !important;
  top: 0 !important;
  z-index: 40 !important;
  height: auto !important;
  min-height: 54px !important;
  padding: 7px 14px !important;
  gap: 8px !important;
  flex-wrap: nowrap !important;
  justify-content: flex-end !important;
  overflow: visible !important;
}
body.drill-master-mode .topbar::after { display: none !important; }
body.drill-master-mode .breadcrumbs,
body.drill-master-mode .hole-manager,
body.drill-master-mode .top-actions { display: none !important; }
#drillMasterSyncMount { display: none; }
body.drill-master-mode #rbacHeaderMount {
  display: flex !important;
  min-width: 0 !important;
  max-width: 100% !important;
  margin-left: auto !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 7px !important;
}
body.drill-master-mode #drillMasterSyncMount {
  display: flex !important;
  min-width: 0 !important;
  flex: 0 0 auto !important;
  align-items: center !important;
  justify-content: flex-end !important;
}
body.drill-master-mode .rbac-topbar-widget {
  gap: 6px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}
body.drill-master-mode .rbac-user-trigger { max-width: min(48vw, 230px) !important; padding-inline: 3px !important; }
body.drill-master-mode .rbac-trigger-info strong { font-size: 12px !important; }
body.drill-master-mode .rbac-topbar-signout-btn { display: inline-flex !important; flex: 0 0 auto !important; }
body.drill-master-mode .rbac-topbar-keys-btn { display: none !important; }
body.drill-master-mode #geologSyncIndicator { display: inline-flex !important; flex: 0 0 auto !important; max-width: 112px !important; }

@media (max-width: 640px) {
  body.drill-master-mode .topbar {
    top: 0 !important;
    min-height: 52px !important;
    padding: 6px 10px !important;
    gap: 6px !important;
  }
  body.drill-master-mode .content-wrap { padding: 12px 10px calc(20px + env(safe-area-inset-bottom)) !important; }
  body.drill-master-mode .drill-master-page { width: 100%; max-width: 100%; }
  body.drill-master-mode .drill-master-welcome { gap: 10px; margin-bottom: 12px; padding: 15px; border-radius: 14px; }
  body.drill-master-mode .drill-master-welcome h1 { font-size: clamp(20px, 5.4vw, 24px); line-height: 1.2; overflow-wrap: anywhere; }
  body.drill-master-mode .drill-master-welcome p { margin-top: 7px; font-size: 13px; }
  body.drill-master-mode .drill-summary-entry, body.drill-master-mode .drill-summary-review { margin-top: 12px; padding: 13px; border-radius: 13px; }
  body.drill-master-mode .drill-summary-section-head, body.drill-master-mode .drill-summary-review-head { gap: 10px; margin-bottom: 13px; }
  body.drill-master-mode .drill-summary-section-head h2, body.drill-master-mode .drill-summary-review-head h2 { font-size: 18px; }
  body.drill-master-mode .drill-summary-shifts { gap: 7px; margin-bottom: 12px; }
  body.drill-master-mode .drill-summary-shift-tab { min-height: 58px; gap: 5px; padding: 9px; border-radius: 10px; }
  body.drill-master-mode .drill-summary-shift-tab strong { font-size: 12px; }
  body.drill-master-mode .drill-summary-shift-state { font-size: 10px; }
  body.drill-master-mode .drill-summary-fields { gap: 10px; }
  body.drill-master-mode .drill-summary-field input, body.drill-master-mode .drill-summary-field select, body.drill-master-mode .drill-summary-field textarea { min-height: 46px; font-size: 16px; }
  body.drill-master-mode .drill-summary-field textarea { min-height: 84px; }
  .drill-shift-report-windows { grid-template-columns: 1fr; gap: 10px; }
  .drill-shift-report-window { padding: 13px; }
  .drill-shift-report-window-head h3 { font-size: 16px; }
  .drill-shift-report-card > header { flex-wrap: wrap; }
  body.drill-master-mode .rbac-user-trigger { max-width: min(43vw, 190px) !important; min-width: 0 !important; }
  body.drill-master-mode .rbac-user-trigger { display: inline-flex !important; }
  body.drill-master-mode .rbac-trigger-info small { display: none !important; }
  body.drill-master-mode .rbac-topbar-signout-btn { min-height: 30px !important; padding: 0 8px !important; font-size: 10px !important; }
  body.drill-master-mode #geologSyncIndicator { min-height: 30px !important; height: 30px !important; max-width: 84px !important; padding: 0 7px !important; font-size: 10px !important; }
}
