:root{
  --nh-blue:#003A70;
  --nh-teal:#00A6B2;
  --nh-light:#F3F6F9;
  --nh-border:#D6DEE6;
  --nh-text:#0B1F2A;
  --nh-muted:#4B5B67;
  --nh-danger:#B00020;
  --nh-success:#0A7A3D;

  --nh-warn-bg:#FFF7E6;
  --nh-warn-border:#FFD8A8;
  --nh-warn-text:#7A4A00;

  --shadow: 0 1px 2px rgba(0,0,0,.04);
}

*{ box-sizing:border-box; }

body{
  font-family: Arial, sans-serif;
  margin: 0;
  background: var(--nh-light);
  color: var(--nh-text);
}

.container{
  max-width: 980px;
  margin: 0 auto;
  padding: 18px;
}

.header{
  background: linear-gradient(90deg, var(--nh-blue), #022B52);
  color: #fff;
  padding: 18px;
  border-bottom: 4px solid var(--nh-teal);
}

.header h1{
  margin:0;
  font-size: 22px;
  letter-spacing: .2px;
}

.header .sub{
  margin-top:6px;
  color: rgba(255,255,255,.85);
  font-size: 13px;
}

/* Section headings (Result, Map, etc.) */
h2{
  margin: 0 0 10px 0;
  font-size: 18px;
  color: var(--nh-blue);
}

/* Form layout */
.row{
  display:flex;
  gap:16px;
  flex-wrap: wrap;
}

.card{
  background:#fff;
  border: 1px solid var(--nh-border);
  border-radius: 12px;
  padding: 16px;
  margin-top: 16px;
  box-shadow: var(--shadow);
}

/* NORMAL form labels */
label{
  display:block;
  margin-top: 10px;
  font-weight: 700;
  color: var(--nh-blue);
  font-size: 14px;
}

/* PROMOTED labels: Mode / ERT */
label.section-label{
  font-size: 18px;
  margin-bottom: 6px;
}

/* Helper text */
.small{
  color: var(--nh-muted);
  font-size: 0.9em;
}

/* Inputs */
input[type=text], textarea, select, input[type=date]{
  width: 100%;
  padding: 10px;
  border: 1px solid #b7c4d0;
  border-radius: 10px;
  font-size: 14px;
  background:#fff;
}

input[type=text]:focus,
textarea:focus,
select:focus,
input[type=date]:focus{
  outline: 2px solid rgba(0,166,178,.25);
  border-color: var(--nh-teal);
}

/* Buttons – unified sizing */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:42px;
  padding: 0 16px;
  border-radius: 10px;
  cursor:pointer;
  font-weight: 700;
  font-size: 14px;
  line-height: 1;
  text-decoration:none;
  user-select:none;
  white-space: nowrap;
  border: 1px solid transparent;
}

/* Primary submit button */
.btn.primary,
button.btn{
  background: var(--nh-teal);
  color: #ffffff;            /* INVERTED TEXT */
  border-color: var(--nh-teal);
}

/* Secondary buttons */
.btn.secondary{
  background:#E7F7F8;
  color: var(--nh-blue);
  border:1px solid rgba(0,166,178,.35);
}

.btn:hover{
  filter: brightness(0.98);
}

.btn:focus{
  outline: 2px solid rgba(0,166,178,.35);
  outline-offset: 2px;
}

/* Messages */
.success{
  background: #E9F8EF;
  border: 1px solid #BFE6CD;
  color: var(--nh-success);
  padding: 12px;
  border-radius: 12px;
  margin-top: 16px;
}

.error{
  background: #FDECEC;
  border: 1px solid #F2B8B5;
  color: var(--nh-danger);
  padding: 12px;
  border-radius: 12px;
  margin-top: 16px;
}

/* Suggestions dropdown */
.suggestions{
  border: 1px solid var(--nh-border);
  border-radius: 10px;
  overflow:hidden;
  margin-top: 6px;
  display:none;
  background:#fff;
}

.suggestions div{
  padding: 10px;
  cursor:pointer;
  border-top: 1px solid #EEF2F6;
}

.suggestions div:first-child{ border-top:0; }

.suggestions div:hover,
.suggestions div.active{
  background: #E7F7F8;
}

/* Map */
.mapWrap{
  border: 1px solid var(--nh-border);
  border-radius: 12px;
  overflow:hidden;
}

.mapWrap iframe{
  width:100%;
  height:520px;
  border:0;
}

/* Footer */
.footer{
  margin-top: 18px;
  text-align:center;
  font-size: 14px;
  color: var(--nh-muted);
}

.footer a{
  color: var(--nh-blue);
  text-decoration: underline;
}

/* Distance warning */
.distanceWarn{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:6px 10px;
  border-radius:10px;
  background: var(--nh-warn-bg);
  border: 1px solid var(--nh-warn-border);
  color: var(--nh-warn-text);
  font-weight:700;
}

.distanceWarn .icon{
  font-size: 16px;
  line-height: 1;
}

/* Top navigation tabs (Marker / ERT) */
.tabs{
  display:flex;
  gap:8px;
  margin-top:16px;
  margin-bottom:0;
  align-items:flex-end;
}

.tabs a{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:42px;
  padding:10px 14px;
  border:1px solid var(--nh-border);
  border-bottom:none;
  border-radius:12px 12px 0 0;
  background:var(--nh-light);
  color:var(--nh-blue);
  text-decoration:none;
  font-weight:700;
  user-select:none;
  white-space:nowrap;
  position:relative;
}

.tabs a.active{
  background:var(--nh-blue);
  border-color:var(--nh-blue);
  color:#fff;
}

/* Hide the 1px seam between active tab and the card below */
.tabs a.active::after{
  content:"";
  position:absolute;
  left:-1px;
  right:-1px;
  bottom:-1px;
  height:2px;
  background:#fff;
}

/* Connect tabs visually to the card below */
.card.first-card{
  margin-top:0;
  border-top-left-radius:0;
  border-top-right-radius:0;
}

/* ----------------------------- */
/* Shared admin/dashboard styles */
/* ----------------------------- */

/* Small pill */
.pill{
  display:inline-block;
  padding:4px 10px;
  border-radius:999px;
  background:#E7F7F8;
  border:1px solid rgba(0,166,178,.35);
  color: var(--nh-blue);
  font-weight:700;
  font-size:12px;
}

/* Inline filter layouts */
.dashRow{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  align-items:flex-end;
  justify-content:space-between;
}

.dashFilters{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:flex-end;
}

/* Tables */
.tableWrap{
  overflow:auto;
}

table{
  width:100%;
  border-collapse:collapse;
  background:#fff;
}

th, td{
  padding:10px;
  border-bottom:1px solid rgba(0,0,0,.06);
  text-align:left;
  vertical-align:top;
  font-size:14px;
}

th{
  color: var(--nh-blue);
  font-weight:800;
  background:#fff;
}

/* Links inside table rows */
.linkRow a{
  color: var(--nh-text);
  text-decoration:none;
  display:block;
}

.linkRow a:hover{
  text-decoration: underline;
}

/* Status pill */
.statusPill{
  display:inline-block;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(0,0,0,.12);
  font-weight:800;
  font-size:13px;
  background:#fff;
  cursor:pointer;
  user-select:none;
  white-space:nowrap;
}

.statusPill.actioned{
  background:#E9F8EF;
  border-color:#BFE6CD;
  color: var(--nh-success);
}

.statusPill.unactioned{
  background:#FDECEC;
  border-color:#F2B8B5;
  color: var(--nh-danger);
}

/* Status dropdown (details/summary) */
details.statusMenu{
  position:relative;
  display:inline-block;
}

details.statusMenu summary{
  list-style:none;
  cursor:pointer;
}

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

.statusMenuBox{
  position:absolute;
  right:0;
  margin-top:8px;
  min-width:200px;
  background:#fff;
  border:1px solid rgba(0,0,0,.12);
  border-radius:12px;
  padding:12px;
  box-shadow: 0 10px 20px rgba(0,0,0,.08);
  z-index:50;
}

/* Feedback view page blocks */
.metaGrid{
  display:grid;
  grid-template-columns:170px 1fr;
  gap:8px 12px;
}

.metaGrid .k{
  font-weight:800;
  color: var(--nh-blue);
}

.boxNote{
  background:#FFF7E6;
  border:1px solid #FFD8A8;
  border-radius:12px;
  padding:12px;
  white-space:pre-wrap;
  word-break:break-word;
}

/* Raw JSON dropdown */
details.raw{
  margin-top:12px;
  border:1px solid var(--nh-border);
  border-radius:12px;
  padding:12px;
  background:#fff;
}

details.raw summary{
  cursor:pointer;
  font-weight:800;
  color: var(--nh-blue);
}

pre.rawBox{
  margin-top:10px;
  padding:12px;
  border-radius:12px;
  background:#0b1020;
  color:#e8ecff;
  overflow:auto;
  max-height:420px;
  font-size:12px;
  white-space:pre-wrap;
  word-break:break-word;
}
