* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--nh-page-bg, #050b14);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--nh-text);
  background: var(--nh-page-gradient);
  background-attachment: fixed;
}

body.nh-dark {
  --nh-dark-bar-gradient: linear-gradient(90deg, #006d8f 0%, #008cb4 28%, #0061ff 55%, #8b6dff 78%, #ff62bc 100%);
  --nh-bar-gradient: var(--nh-dark-bar-gradient);
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a.admin-link,
a.inline-action {
  position: relative;
  isolation: isolate;
  min-height: 42px;
  border: 1px solid var(--nh-button-border-current);
  border-radius: var(--nh-radius);
  background: var(--nh-button-gradient-current);
  color: var(--nh-button-text-current);
  box-shadow: var(--nh-control-shadow), var(--nh-button-bevel-current);
  cursor: pointer;
  font-weight: var(--nh-button-weight, 800);
  text-decoration: none;
  text-shadow: 0 1px 0 rgba(0, 0, 0, .34);
  transition: transform var(--nh-motion-speed) ease, border-color var(--nh-motion-speed) ease, box-shadow var(--nh-motion-speed) ease, filter var(--nh-motion-speed) ease;
}

button::before,
a.admin-link::before,
a.inline-action::before {
  content: "";
  position: absolute;
  inset: 1px 1px 50%;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,.42), rgba(255,255,255,.08) 62%, transparent);
  opacity: var(--nh-button-gloss-opacity-current);
  pointer-events: none;
}

button:hover,
button:focus-visible,
a.admin-link:hover,
a.admin-link:focus-visible,
a.inline-action:hover,
a.inline-action:focus-visible {
  border-color: var(--nh-stroke-strong);
  box-shadow: var(--nh-control-shadow), var(--nh-ring), var(--nh-hover-glow);
  outline: none;
}

button:hover,
a.admin-link:hover,
a.inline-action:hover {
  transform: translateY(var(--nh-hover-lift));
  filter: saturate(1.08);
}

.shell {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  padding: 20px 0 42px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--nh-text);
  font-size: 21px;
  font-weight: var(--nh-heading-weight, 900);
  text-decoration: none;
  text-shadow: 0 0 18px rgba(88, 230, 255, .16);
}

.brand::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: var(--nh-radius-pill);
  background: var(--nh-cyan);
  box-shadow: 0 0 14px var(--nh-cyan), 0 0 24px rgba(255, 79, 216, .22);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.login-simulator {
  position: relative;
}

.simulator-toggle {
  min-width: 48px;
  font-size: 20px;
}

.login-simulator.is-simulating .simulator-toggle {
  border-color: #ffde59;
  box-shadow: var(--nh-control-shadow), 0 0 0 2px rgba(255, 222, 89, .34), 0 0 20px rgba(255, 222, 89, .22);
}

.login-simulator-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 1400;
  display: grid;
  gap: 6px;
  min-width: 180px;
  padding: 8px;
  border: 1px solid var(--nh-border-strong);
  border-radius: var(--nh-radius);
  background: #06111d;
  box-shadow: var(--nh-surface-shadow-strong);
}

.login-simulator-menu button {
  justify-content: flex-start;
  min-height: 38px;
  box-shadow: none;
}

.login-simulator-menu button.is-active {
  border-color: #ffde59;
  color: var(--nh-text);
}

.nav-pill,
.admin-link,
.inline-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
}

.auth-status {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  max-width: 260px;
  color: var(--nh-muted);
  font-size: 12px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-pill.is-active {
  border-color: var(--nh-cyan);
  color: var(--nh-text);
  box-shadow: var(--nh-control-shadow), var(--nh-ring), 0 0 20px rgba(88, 230, 255, .16);
}

.open-ticket-alert.is-flashing {
  animation: ticketPulse 1.15s ease-in-out infinite;
  border-color: rgba(255, 176, 32, .86);
}

@keyframes ticketPulse {
  0%, 100% {
    box-shadow: var(--nh-control-shadow), 0 0 0 rgba(255, 176, 32, 0);
  }
  50% {
    box-shadow: var(--nh-control-shadow), 0 0 18px rgba(255, 176, 32, .55), 0 0 0 4px rgba(255, 176, 32, .12);
  }
}

.search-hero {
  position: relative;
  min-height: 360px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
  overflow: hidden;
  padding: 44px clamp(16px, 4vw, 52px);
  border: 1px solid var(--nh-stroke);
  border-radius: var(--nh-radius);
  background:
    radial-gradient(circle at 14% 12%, rgba(88, 230, 255, .18), transparent 30%),
    radial-gradient(circle at 86% 8%, rgba(255, 79, 216, .13), transparent 30%),
    radial-gradient(circle at 76% 82%, rgba(178, 109, 255, .13), transparent 34%),
    linear-gradient(145deg, rgba(255,255,255,.07), rgba(255,255,255,.018)),
    var(--nh-panel-gradient);
  box-shadow: var(--nh-surface-shadow-strong);
  backdrop-filter: blur(16px);
}

.search-hero::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: var(--nh-bar-gradient);
  opacity: var(--nh-card-accent-opacity-current, .82);
}

.search-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(88, 230, 255, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(178, 109, 255, .055) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(115deg, rgba(0, 0, 0, .28), transparent 72%);
  pointer-events: none;
}

.hero-copy,
.search-box,
.quick-tags {
  position: relative;
  z-index: 1;
}

.hero-copy {
  max-width: 860px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--nh-cyan);
  font-size: 12px;
  font-weight: var(--nh-label-weight, 800);
  letter-spacing: .08em;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 0;
  color: var(--nh-text);
  font-size: clamp(36px, 5vw, 56px);
  font-weight: var(--nh-heading-weight, 900);
  line-height: 1.04;
  white-space: nowrap;
  text-shadow: 0 0 26px rgba(88, 230, 255, .14);
}

.search-box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  max-width: 920px;
  padding: 8px;
  border: 1px solid var(--nh-border-strong);
  border-radius: var(--nh-radius);
  background: linear-gradient(145deg, rgba(255,255,255,.07), rgba(255,255,255,.024)), rgba(4, 10, 18, .46);
  box-shadow: var(--nh-control-shadow);
}

.search-box input {
  min-width: 0;
  height: 56px;
  border: 1px solid transparent;
  border-radius: var(--nh-radius);
  outline: 0;
  background: var(--nh-input);
  color: var(--nh-text);
  font-size: 18px;
  padding: 0 14px;
}

.search-box input::placeholder,
.admin-form input::placeholder,
.admin-form textarea::placeholder,
.filter-input::placeholder {
  color: color-mix(in srgb, var(--nh-muted) 72%, transparent);
}

.search-box input:focus,
.admin-form input:focus,
.admin-form select:focus,
.admin-form textarea:focus,
.filter-input:focus {
  border-color: var(--nh-cyan);
  box-shadow: var(--nh-ring);
}

.search-box button,
.primary {
  min-width: 116px;
  border-color: rgba(88, 230, 255, .46);
  background: linear-gradient(180deg, rgba(88, 230, 255, .30), rgba(47, 128, 255, .22)), var(--nh-button-gradient-current);
}

.quick-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.quick-tags button {
  min-height: 36px;
  padding: 0 12px;
  border-radius: var(--nh-radius-pill);
  background: rgba(88, 230, 255, .10);
}

.results-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 28px 2px 8px;
}

.results-head h2,
.section-title h2,
.panel h2 {
  margin-bottom: 4px;
  color: var(--nh-text);
  font-size: 22px;
  font-weight: var(--nh-heading-weight, 900);
}

.results-head p,
.panel p,
.form-note {
  margin-bottom: 0;
  color: var(--nh-muted);
}

.section-block {
  margin-top: 18px;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.section-title span,
.tag {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--nh-border);
  border-radius: var(--nh-radius-pill);
  background: rgba(88, 230, 255, .12);
  color: var(--nh-muted);
  font-weight: 800;
}

.section-title span {
  min-width: 36px;
  justify-content: center;
  padding: 5px 10px;
}

.video-grid,
.image-grid,
.note-grid,
.document-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.result-card,
.panel,
.ticket-admin-panel {
  overflow: visible;
}

.result-card {
  display: grid;
  grid-template-rows: auto 1fr;
  align-content: start;
  gap: 10px;
  min-width: 0;
  min-height: 100%;
  padding: 0;
}

.result-card > a:first-child {
  display: block;
  min-width: 0;
}

.result-card .thumb,
.result-card .missing-thumb,
.result-card .image-frame {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--nh-border);
  border-radius: var(--nh-radius);
  background: var(--nh-panel-strong);
}

.result-card img.thumb,
.result-card .image-frame .thumb {
  height: 100%;
  object-fit: cover;
}

.result-card .image-frame .thumb {
  display: block;
  aspect-ratio: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.result-card .missing-thumb,
.result-card .heic-placeholder {
  color: var(--nh-muted);
  font-size: 13px;
  font-weight: 900;
  text-align: center;
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.card-kicker {
  color: var(--nh-muted);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.25;
}

.card-title {
  margin: 0;
  color: var(--nh-text);
  font-size: 17px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.card-title a {
  color: #c7b7ff;
}

.card-body p {
  margin: 0;
  color: var(--nh-text);
  font-size: 14px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.tag {
  max-width: 100%;
  min-height: 24px;
  padding: 3px 8px;
  font-size: 12px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.result-card .button-row.compact-actions {
  gap: 8px;
  margin-top: auto;
  padding-top: 2px;
}

.result-card .button-row.compact-actions button,
.result-card .add-tag-btn {
  min-height: 36px;
  padding: 0 12px;
  font-size: 13px;
  line-height: 1;
}

.ticket-admin-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.ticket-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin: 0 16px 16px;
}

.ticket-stat {
  min-height: 72px;
  padding: 12px;
  border: 1px solid var(--nh-border);
  border-radius: var(--nh-radius);
  background: rgba(88, 230, 255, .055);
  box-shadow: var(--nh-control-shadow);
}

.ticket-stat span {
  display: block;
  color: var(--nh-muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.ticket-stat strong {
  display: block;
  margin-top: 6px;
  color: var(--nh-text);
  font-size: 28px;
  line-height: 1;
}

.ticket-editor {
  margin: 0 16px 16px;
  padding: 14px;
  border: 1px solid var(--nh-border);
  border-radius: var(--nh-radius);
  background: #06111d;
}

.ticket-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: start center;
  padding: 34px 16px;
  overflow: auto;
  background: rgba(2, 8, 16, .72);
  backdrop-filter: blur(10px);
}

.ticket-modal-panel {
  width: min(980px, 100%);
  padding: 18px;
  border: 1px solid var(--nh-border);
  border-radius: var(--nh-radius);
  background: #06111d;
  box-shadow: var(--nh-surface-shadow-strong);
}

.ticket-modal .section-title {
  margin-bottom: 12px;
}

.open-ticket-panel {
  width: min(1060px, 100%);
}

.open-ticket-list {
  display: grid;
  gap: 12px;
}

.open-ticket-tools {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 12px;
}

.open-ticket-tools select {
  min-height: 40px;
  width: min(280px, 100%);
}

.share-panel,
.recommendation-panel {
  width: min(860px, 100%);
}

.share-levels {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.share-levels label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--nh-border);
  border-radius: var(--nh-radius-pill);
  background: rgba(88, 230, 255, .08);
}

.ticket-recipient-admin {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 8px 0 12px;
  color: var(--nh-muted);
  font-size: 13px;
  font-weight: 800;
}

.ticket-recipient-admin label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid var(--nh-border);
  border-radius: var(--nh-radius-pill);
  background: rgba(88, 230, 255, .07);
}

.recommendation-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.recommendation-card {
  min-height: 100%;
}

.open-ticket-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(88, 230, 255, .16);
  border-left-width: 8px;
  border-radius: var(--nh-radius);
  background: var(--nh-row-odd-gradient);
}

.priority-ticket-header {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 34px;
  margin: -14px -14px 2px;
  padding: 8px 12px;
  border-radius: calc(var(--nh-radius) - 1px) calc(var(--nh-radius) - 1px) 0 0;
  color: #fff !important;
  background: var(--ticket-priority-color, var(--nh-cyan)) !important;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .16) inset, 0 8px 20px rgba(0, 0, 0, .28);
  font-size: 12px;
  font-weight: 1000;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.priority-ticket-header small {
  color: currentColor !important;
  font-size: 11px;
  font-weight: 1000;
  opacity: .92;
}

.ticket-priority-medium .priority-ticket-header {
  color: #111827 !important;
}

.ticket-status-closed .priority-ticket-header {
  color: #f8fafc !important;
  background: #475569 !important;
}

.open-ticket-card h3 {
  margin-bottom: 8px;
  color: var(--nh-text);
  font-size: 17px;
}

.open-ticket-card p {
  margin-bottom: 6px;
  color: var(--nh-muted);
  font-size: 13px;
}

.ticket-followup-form {
  display: grid;
  gap: 10px;
}

.open-ticket-actions {
  display: grid;
  align-content: center;
}

.open-ticket-update-panel {
  width: min(1040px, calc(100vw - 24px));
  min-height: calc(100vh - 24px);
  max-height: calc(100vh - 24px);
  overflow: auto;
}

.open-ticket-update-detail {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.open-ticket-update-summary {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid rgba(88, 230, 255, .16);
  border-left-width: 8px;
  border-radius: var(--nh-radius);
  background: rgba(255, 255, 255, .035);
}

.open-ticket-update-summary strong {
  color: var(--nh-text);
}

.open-ticket-update-summary span,
.open-ticket-update-summary p {
  color: var(--nh-muted);
}

.ticket-priority-p1,
.ticket-priority-urgent {
  --ticket-priority-color: #ef4444;
  --ticket-priority-bg: rgba(239, 68, 68, .13);
  border-left-color: #ef4444;
}

.ticket-priority-p2,
.ticket-priority-high {
  --ticket-priority-color: #f97316;
  --ticket-priority-bg: rgba(249, 115, 22, .14);
  border-left-color: #f97316;
}

.ticket-priority-special_trip {
  --ticket-priority-color: #a855f7;
  --ticket-priority-bg: rgba(168, 85, 247, .15);
  border-left-color: #a855f7;
}

.ticket-priority-p3,
.ticket-priority-medium {
  --ticket-priority-color: #facc15;
  --ticket-priority-bg: rgba(250, 204, 21, .12);
  border-left-color: #facc15;
}

.ticket-priority-p4,
.ticket-priority-low {
  --ticket-priority-color: #3b82f6;
  --ticket-priority-bg: rgba(59, 130, 246, .14);
  border-left-color: #3b82f6;
}

.ticket-priority-p1,
.ticket-priority-urgent,
.ticket-priority-p2,
.ticket-priority-high,
.ticket-priority-special_trip,
.ticket-priority-p3,
.ticket-priority-medium,
.ticket-priority-p4,
.ticket-priority-low {
  border-left-style: solid;
}

.ticket-item,
.open-ticket-card,
.open-ticket-update-panel,
.open-ticket-update-summary,
.report-ticket-row,
.today-ticket,
.planner-ticket,
.ticket-editor,
.ticket-editor.is-fullscreen {
  border-left-width: 8px;
  border-left-color: var(--ticket-priority-color, var(--nh-cyan));
  background:
    linear-gradient(90deg, var(--ticket-priority-bg, rgba(88, 230, 255, .08)), transparent 38%),
    #071421;
}

.ticket-editor.is-fullscreen {
  box-shadow: 0 0 0 1px rgba(88, 230, 255, .12), 0 0 32px var(--ticket-priority-bg, rgba(88, 230, 255, .12));
}

.open-ticket-tech-group,
.ticket-assignee-group {
  display: grid;
  gap: 10px;
}

.ticket-assignee-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(88, 230, 255, .16);
  border-radius: var(--nh-radius);
  background: rgba(88, 230, 255, .06);
}

button.ticket-assignee-head {
  width: 100%;
  min-height: 54px;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

button.ticket-assignee-head[aria-expanded="true"] {
  border-color: rgba(88, 230, 255, .42);
  background: rgba(88, 230, 255, .11);
}

.ticket-assignee-title {
  color: var(--nh-text);
  font-weight: 900;
}

.ticket-assignee-meta {
  color: var(--nh-muted);
  font-size: 12px;
}

.ticket-assignee-head span {
  display: grid;
  place-items: center;
  min-width: 30px;
  height: 26px;
  border-radius: var(--nh-radius-pill);
  color: var(--nh-text);
  background: rgba(88, 230, 255, .16);
  font-weight: 900;
}

.ticket-group-summary {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
}

.ticket-group-summary .priority-chip {
  min-width: 26px;
  height: 24px;
  border: 0;
  color: #fff;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .12) inset;
}

.priority-chip.ticket-priority-medium {
  color: #111827;
}

.priority-chip.ticket-priority-urgent {
  background: #ef4444;
}

.priority-chip.ticket-priority-high {
  background: #f97316;
}

.priority-chip.ticket-priority-special_trip {
  background: #a855f7;
}

.priority-chip.ticket-priority-medium {
  background: #facc15;
}

.priority-chip.ticket-priority-low {
  background: #3b82f6;
}

.ticket-assignee-items {
  display: grid;
  gap: 10px;
}

.ticket-detail.is-hidden {
  display: none;
}

.ticket-compact-meta {
  margin-left: 8px;
  color: var(--nh-muted);
}

.ticket-editor.is-fullscreen {
  position: fixed;
  inset: 12px;
  z-index: 900;
  max-width: none;
  overflow: auto;
  padding: 18px;
  border: 1px solid rgba(88, 230, 255, .42);
  border-radius: var(--nh-radius);
  background: #06111d;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .58);
}

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

.ticket-editor-main,
.ticket-editor-side {
  display: grid;
  gap: 14px;
}

.ticket-editor-section {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(88, 230, 255, .16);
  border-radius: var(--nh-radius);
  background: #0a1724;
}

.ticket-editor-section h3 {
  margin: 0;
  color: var(--nh-text);
  font-size: 18px;
}

.onsite-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 26px;
  padding: 4px 9px;
  border: 1px solid rgba(110, 231, 183, .45);
  border-radius: var(--nh-radius-pill);
  color: #d7fff0;
  background: rgba(27, 185, 125, .16);
  font-size: 12px;
  font-weight: 900;
}

.onsite-pill span {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #36e28f;
  box-shadow: 0 0 0 4px rgba(54, 226, 143, .14);
}

.onsite-pill.none {
  border-color: var(--nh-border);
  color: var(--nh-muted);
  background: rgba(255, 255, 255, .04);
}

.onsite-pill.none span {
  background: #667085;
  box-shadow: none;
}

.ticket-map {
  position: relative;
  z-index: 0;
  isolation: isolate;
  min-height: 260px;
  margin: 0;
  border: 1px solid var(--nh-border);
  border-radius: var(--nh-radius);
  overflow: hidden;
  background:
    linear-gradient(rgba(88, 230, 255, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(88, 230, 255, .06) 1px, transparent 1px),
    radial-gradient(circle at 30% 25%, rgba(88, 230, 255, .18), transparent 28%),
    var(--nh-panel-gradient);
  background-size: 44px 44px, 44px 44px, auto, auto;
}

.ticket-map-shell {
  position: relative;
  z-index: 0;
  isolation: isolate;
  margin: 0 16px 14px;
}

.ticket-map-fullscreen-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 20;
}

.ticket-map-shell.is-fullscreen {
  position: fixed;
  inset: 12px;
  z-index: 1200;
  display: grid;
  margin: 0;
  border: 1px solid rgba(88, 230, 255, .42);
  border-radius: var(--nh-radius);
  background: #06111d;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .62);
}

.ticket-map-shell.is-fullscreen .ticket-map {
  min-height: calc(100vh - 24px);
  border: 0;
}

.ticket-map-title {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 1;
  color: var(--nh-muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.ticket-map-dot {
  position: absolute;
  transform: translate(-50%, -50%);
  z-index: 2;
  min-width: 38px;
  height: 30px;
  padding: 0 8px;
  border-radius: var(--nh-radius-pill);
  font-size: 12px;
  font-weight: 900;
}

.ticket-map-dot.priority-p1 {
  border-color: rgba(255, 79, 146, .8);
  background: linear-gradient(180deg, rgba(255,79,146,.95), rgba(90,11,55,.92));
}

.ticket-map-dot.priority-p2 {
  border-color: rgba(255,176,32,.8);
  background: linear-gradient(180deg, rgba(255,176,32,.9), rgba(97,60,3,.92));
}

.ticket-map-dot.priority-p3,
.ticket-map-dot.priority-p4 {
  border-color: rgba(88,230,255,.75);
}

.ticket-leaflet-dot {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 2px solid #fff;
  border-radius: 999px;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .35);
}

.ticket-leaflet-dot.priority-p1,
.ticket-leaflet-dot.priority-urgent {
  background: #ef4444;
}

.ticket-leaflet-dot.priority-p2,
.ticket-leaflet-dot.priority-high {
  background: #f97316;
}

.ticket-leaflet-dot.priority-special_trip {
  background: #a855f7;
}

.ticket-leaflet-dot.priority-p3,
.ticket-leaflet-dot.priority-medium {
  color: #111827;
  background: #facc15;
}

.ticket-leaflet-dot.priority-p4,
.ticket-leaflet-dot.priority-low {
  background: #3b82f6;
}

.quick-ticket-actions,
.ticket-attachments,
.unit-ticket-timeline,
.ticket-timeline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.quick-ticket-actions button {
  min-height: 34px;
  padding: 0 10px;
  font-size: 12px;
}

.ticket-timeline,
.unit-ticket-timeline {
  display: grid;
  width: 100%;
}

.ticket-timeline-row,
.unit-ticket-timeline div {
  padding: 8px 10px;
  border: 1px solid rgba(88, 230, 255, .14);
  border-radius: var(--nh-radius);
  background: rgba(255, 255, 255, .035);
}

.ticket-timeline-row.internal {
  border-color: rgba(255, 176, 32, .24);
  background: rgba(255, 176, 32, .06);
}

.ticket-timeline-row strong,
.unit-ticket-timeline strong {
  display: block;
  color: var(--nh-text);
  font-size: 12px;
}

.ticket-timeline-row span,
.unit-ticket-timeline span,
.ticket-timeline-row p {
  display: block;
  margin: 2px 0 0;
  color: var(--nh-muted);
  font-size: 12px;
  line-height: 1.35;
}

.speech-btn {
  width: fit-content;
  min-height: 32px;
  margin-top: 6px;
  padding: 0 10px;
  font-size: 12px;
}

.speech-btn.is-listening {
  border-color: #ff4f92;
  box-shadow: var(--nh-control-shadow), 0 0 18px rgba(255, 79, 146, .42);
}

.report-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  padding: 0 16px 16px;
}

.report-chart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  padding: 0 16px 16px;
}

.report-card {
  padding: 14px;
  border: 1px solid var(--nh-border);
  border-radius: var(--nh-radius);
  background: rgba(88, 230, 255, .055);
}

.report-card h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

.chart-card svg {
  width: 100%;
  min-height: 150px;
  border: 1px solid rgba(88, 230, 255, .12);
  border-radius: var(--nh-radius);
  background: #06111d;
}

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

.report-controls label {
  min-width: 150px;
}

.report-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border-top: 1px solid rgba(88, 230, 255, .1);
  color: var(--nh-muted);
  font-size: 13px;
}

.report-row-button {
  width: 100%;
  min-height: 0;
  border: 0;
  border-top: 1px solid rgba(88, 230, 255, .1);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  text-align: left;
  text-shadow: none;
}

.report-row-button::before {
  display: none;
}

.report-row-button:hover,
.report-row-button:focus-visible {
  transform: none;
  background: rgba(88, 230, 255, .08);
  box-shadow: none;
}

.report-row strong {
  color: var(--nh-text);
}

.report-drilldown {
  padding: 0 16px 16px;
}

.report-ticket-review .section-title {
  margin-bottom: 12px;
}

.report-ticket-review .section-title p {
  color: var(--nh-muted);
  margin: 4px 0 0;
}

.report-ticket-list {
  display: grid;
  gap: 10px;
  max-height: 620px;
  overflow: auto;
}

.report-ticket-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  border: 1px solid rgba(88, 230, 255, .18);
  border-left-width: 6px;
  border-radius: var(--nh-radius);
  background: rgba(0, 9, 18, .5);
  padding: 12px;
}

.report-ticket-row strong,
.report-ticket-row span,
.report-ticket-row p {
  display: block;
}

.report-ticket-row strong {
  color: var(--nh-text);
  margin-bottom: 4px;
}

.report-ticket-row span,
.report-ticket-row p {
  color: var(--nh-muted);
  font-size: 13px;
  line-height: 1.35;
  margin: 2px 0 0;
}

.pie-layout {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.pie-card svg {
  width: 130px;
  height: 130px;
  transform: rotate(-90deg);
  overflow: visible;
}

.pie-segment {
  cursor: pointer;
  transition: stroke-width var(--nh-motion-speed) ease, filter var(--nh-motion-speed) ease;
}

.pie-segment:hover {
  stroke-width: 8.5;
  filter: drop-shadow(0 0 5px rgba(88, 230, 255, .45));
}

.pie-legend {
  display: grid;
  gap: 6px;
}

.pie-legend-row {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  width: 100%;
  min-height: 30px;
  border: 1px solid rgba(88, 230, 255, .12);
  border-radius: var(--nh-radius);
  background: rgba(255, 255, 255, .035);
  box-shadow: none;
  color: var(--nh-muted);
  text-align: left;
  text-shadow: none;
  padding: 4px 8px;
}

.pie-legend-row::before {
  display: none;
}

.pie-legend-row span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--pie-color);
}

.pie-legend-row em {
  overflow: hidden;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pie-legend-row strong {
  color: var(--nh-text);
}

.report-review-panel {
  max-width: 900px;
}

.planner-ticket-list {
  display: grid;
  gap: 10px;
  padding: 0 16px 16px;
}

.planner-ticket {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--nh-border);
  border-radius: var(--nh-radius);
  background: rgba(255, 255, 255, .035);
}

.planner-ticket.selected {
  border-color: var(--nh-cyan);
  background: rgba(88, 230, 255, .09);
}

.planner-ticket span {
  display: grid;
  gap: 4px;
}

.planner-ticket strong {
  color: var(--nh-text);
  font-size: 14px;
}

.planner-ticket em {
  color: var(--nh-muted);
  font-size: 12px;
  font-style: normal;
}

.today-grid {
  display: grid;
  gap: 12px;
}

.tech-work-pad {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 14px;
  border-left: 8px solid var(--nh-cyan);
  border-radius: var(--nh-radius);
  background:
    linear-gradient(90deg, rgba(88, 230, 255, .12), transparent 42%),
    #071421;
}

.tech-action-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 10px;
}

.tech-action-grid button {
  min-height: 54px;
  font-size: 15px;
  font-weight: 900;
}

.tech-closeout-details {
  padding: 10px;
  border: 1px solid rgba(88, 230, 255, .16);
  border-radius: var(--nh-radius);
  background: rgba(255, 255, 255, .035);
}

.tech-closeout-details summary {
  cursor: pointer;
  color: var(--nh-text);
  font-weight: 900;
}

.today-guidance {
  display: grid;
  gap: 8px;
}

.today-guidance-note {
  padding: 10px 12px;
  border: 1px solid rgba(255, 222, 89, .28);
  border-left: 6px solid #ffde59;
  border-radius: var(--nh-radius);
  color: var(--nh-text);
  background: rgba(255, 222, 89, .08);
  font-weight: 800;
}

.today-guidance-note.good {
  border-color: rgba(54, 226, 143, .28);
  border-left-color: #36e28f;
  background: rgba(54, 226, 143, .08);
}

.today-priority-group {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(88, 230, 255, .14);
  border-radius: var(--nh-radius);
  background: rgba(0, 9, 18, .24);
}

.today-priority-group h3 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0;
  color: var(--nh-text);
  font-size: 16px;
}

.today-priority-group h3 span {
  min-width: 28px;
  padding: 3px 8px;
  border-radius: var(--nh-radius-pill);
  color: var(--nh-text);
  background: rgba(88, 230, 255, .16);
  text-align: center;
}

.today-ticket {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 13px;
  border: 1px solid var(--nh-border);
  border-left-width: 8px;
  border-radius: var(--nh-radius);
  background: #071421;
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.today-ticket:hover {
  border-color: rgba(88, 230, 255, .48);
  box-shadow: 0 0 0 1px rgba(88, 230, 255, .12), 0 14px 28px rgba(0, 0, 0, .22);
}

.today-ticket button,
.today-ticket a,
.today-ticket input,
.today-ticket label {
  cursor: pointer;
}

.today-ticket select,
.today-ticket textarea {
  cursor: text;
}

.today-ticket .priority-ticket-header {
  margin: -13px -13px 0;
}

.today-ticket.is-selected {
  border-color: rgba(54, 226, 143, .55);
  box-shadow: 0 0 0 1px rgba(54, 226, 143, .18), 0 0 22px rgba(54, 226, 143, .08);
}

.today-ticket-select {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 6px 9px;
  border: 1px solid rgba(88, 230, 255, .22);
  border-radius: var(--nh-radius-pill);
  color: var(--nh-text);
  background: rgba(255, 255, 255, .05);
  font-weight: 900;
  cursor: pointer;
}

.today-ticket-select input {
  width: 16px;
  height: 16px;
}

.today-ticket-body {
  min-width: 0;
}

.today-ticket-body strong,
.today-ticket-subject,
.today-ticket-distance {
  display: block;
}

.today-ticket-subject,
.today-ticket-distance {
  margin-top: 4px;
  color: var(--nh-muted);
  font-size: 13px;
  font-style: normal;
}

.today-ticket-status {
  margin-top: 8px;
}

.today-plan-detail {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(88, 230, 255, .16);
  border-radius: var(--nh-radius);
  background: rgba(0, 9, 18, .32);
}

.today-plan-mode {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.today-plan-mode label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid rgba(88, 230, 255, .18);
  border-radius: var(--nh-radius-pill);
  color: var(--nh-text);
  background: rgba(255, 255, 255, .05);
  font-weight: 900;
}

.today-plan-mode label:has(input:checked) {
  border-color: rgba(54, 226, 143, .62);
  background: rgba(54, 226, 143, .14);
  box-shadow: 0 0 0 1px rgba(54, 226, 143, .18);
}

.today-plan-mode input {
  width: 16px;
  height: 16px;
}

.today-onsite-window {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 180px));
  gap: 10px;
}

.today-onsite-window label {
  color: var(--nh-muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.today-onsite-window input {
  margin-top: 4px;
}

.today-ticket .button-row {
  grid-column: 1 / -1;
}

.compact-inventory-alert {
  background: #071421;
}

.inventory-item-form,
.inventory-use-form {
  margin: 0 16px 14px;
}

.inventory-list {
  padding: 0 16px 16px;
}

.inventory-row {
  border-left-width: 8px;
  background: #071421;
}

.inventory-row.inventory-low {
  border-left-color: #ef4444;
}

.inventory-row.inventory-excess {
  border-left-color: #a855f7;
}

.inventory-row.inventory-ok {
  border-left-color: #36b37e;
}

.inventory-row .admin-item-title span {
  color: var(--nh-muted);
  font-size: 12px;
}

.leaflet-popup-content .inline-action {
  margin-top: 8px;
  min-height: 32px;
  padding: 0 10px;
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  color: var(--nh-text);
  border: 1px solid rgba(88, 230, 255, .26);
  background: #06111d;
  box-shadow: 0 18px 34px rgba(0, 0, 0, .42);
}

.leaflet-popup-content {
  margin: 10px 12px;
}

.map-ticket-summary {
  display: grid;
  gap: 5px;
  min-width: 230px;
  max-width: 330px;
  color: var(--nh-text);
  font-family: var(--nh-font);
}

.map-ticket-summary strong {
  color: #fff;
  font-size: 14px;
  line-height: 1.2;
}

.map-ticket-summary span {
  color: var(--nh-muted);
  font-size: 12px;
  line-height: 1.25;
}

.map-ticket-summary p {
  margin: 3px 0 0;
  color: #dbeafe;
  font-size: 12px;
  line-height: 1.35;
}

.map-ticket-summary .onsite-pill {
  width: fit-content;
  margin-top: 3px;
}

.map-ticket-summary .ticket-map-edit {
  width: 100%;
  margin-top: 8px;
}

.login-panel {
  max-width: 460px;
  margin: 42px auto 0;
  padding: 24px;
}

.login-panel h1 {
  margin-bottom: 20px;
  font-size: 32px;
}

.admin-workspace {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.content-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px;
  border: 1px solid var(--nh-border);
  border-radius: var(--nh-radius);
  background: rgba(88, 230, 255, .055);
}

.tab-group {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  padding: 5px;
  border: 1px solid rgba(88, 230, 255, .12);
  border-radius: var(--nh-radius);
  background: rgba(2, 15, 28, .34);
}

.tab-group .nav-pill {
  min-height: 44px;
}

.tab-group-morning {
  border-color: rgba(255, 222, 89, .35);
  background: linear-gradient(90deg, rgba(255, 222, 89, .11), rgba(88, 230, 255, .04));
}

.tab-group-knowledge {
  border-color: rgba(88, 230, 255, .28);
  background: linear-gradient(90deg, rgba(88, 230, 255, .10), rgba(88, 230, 255, .035));
}

.tab-group-field {
  border-color: rgba(54, 226, 143, .28);
  background: linear-gradient(90deg, rgba(54, 226, 143, .10), rgba(88, 230, 255, .035));
}

.tab-group-admin {
  border-color: rgba(255, 98, 188, .28);
  background: linear-gradient(90deg, rgba(255, 98, 188, .10), rgba(139, 109, 255, .04));
}

.tab-group-morning .nav-pill.is-active {
  border-color: #ffde59;
  box-shadow: var(--nh-control-shadow), 0 0 0 2px rgba(255, 222, 89, .22), 0 0 20px rgba(255, 222, 89, .18);
}

.tab-group-knowledge .nav-pill.is-active {
  border-color: var(--nh-cyan);
}

.tab-group-field .nav-pill.is-active {
  border-color: #36e28f;
  box-shadow: var(--nh-control-shadow), 0 0 0 2px rgba(54, 226, 143, .18), 0 0 18px rgba(54, 226, 143, .14);
}

.tab-group-admin .nav-pill.is-active {
  border-color: #ff62bc;
  box-shadow: var(--nh-control-shadow), 0 0 0 2px rgba(255, 98, 188, .18), 0 0 18px rgba(255, 98, 188, .14);
}

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

.unit-quick-card {
  min-height: 100%;
}

.unit-quick-card input[type="file"] {
  min-height: 56px;
}

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

.panel {
  padding: 16px;
}

.panel-head {
  position: relative;
  margin-bottom: 14px;
}

.panel-head.inline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.admin-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-form.compact {
  gap: 14px;
}

.admin-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--nh-muted);
  font-size: 11px;
  font-weight: var(--nh-label-weight, 800);
  letter-spacing: .06em;
  text-transform: uppercase;
}

.admin-form label.check-row {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  color: var(--nh-muted);
}

.admin-form label.check-row input {
  width: 18px;
  min-height: 18px;
  box-shadow: none;
}

.admin-form input,
.admin-form select,
.admin-form textarea,
.filter-input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--nh-border-strong);
  border-radius: var(--nh-radius);
  background: var(--nh-input);
  color: var(--nh-text);
  padding: 9px 11px;
  outline: 0;
  box-shadow: var(--nh-control-shadow);
  letter-spacing: 0;
  text-transform: none;
}

.admin-form textarea {
  resize: vertical;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.button-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.button-row.compact-actions {
  align-items: center;
  margin-top: 10px;
}

.button-row button {
  padding: 0 14px;
}

.admin-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}


.bulk-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 12px;
  padding: 10px;
  border: 1px solid var(--nh-border);
  border-radius: var(--nh-radius);
  background: rgba(88, 230, 255, .055);
}

.bulk-check,
.document-select {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--nh-muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: none;
}

.bulk-check input,
.document-select input {
  width: 18px;
  height: 18px;
  accent-color: var(--nh-cyan);
}

.bulk-actions span {
  color: var(--nh-muted);
  font-size: 12px;
  font-weight: 900;
}

.bulk-actions button:disabled {
  cursor: not-allowed;
  opacity: .45;
}

.document-admin-item {
  grid-template-columns: auto 1fr auto;
}

.document-select {
  align-self: start;
  min-width: 74px;
  padding-top: 8px;
}


.image-location-group {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--nh-border);
  border-radius: var(--nh-radius);
  background: rgba(88, 230, 255, .055);
}

.image-location-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 2px 2px 8px;
  border-bottom: 1px solid rgba(88, 230, 255, .14);
}

.image-location-toggle {
  min-height: 44px;
  padding: 8px 10px;
  text-align: left;
}

.image-location-toggle[aria-expanded="true"] {
  border-color: var(--nh-cyan);
}

.image-location-title {
  color: var(--nh-text);
  font-weight: 900;
}

.image-location-meta {
  margin-top: 3px;
  color: var(--nh-muted);
  font-size: 12px;
}

.image-location-head span {
  display: inline-flex;
  min-width: 30px;
  min-height: 24px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--nh-border);
  border-radius: var(--nh-radius-pill);
  background: rgba(88, 230, 255, .12);
  color: var(--nh-muted);
  font-size: 12px;
  font-weight: 900;
}

.image-location-toggle span::before {
  content: "+";
  margin-right: 6px;
}

.image-location-toggle[aria-expanded="true"] span::before {
  content: "-";
}

.image-location-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(88, 230, 255, .16);
  border-radius: var(--nh-radius);
  background: var(--nh-row-odd-gradient);
  box-shadow: var(--nh-control-shadow);
}

.admin-item:nth-child(even) {
  background: var(--nh-row-even-gradient);
}

.admin-item.ticket-item {
  border-left-width: 8px;
  border-left-color: var(--ticket-priority-color, var(--nh-cyan));
  background:
    linear-gradient(90deg, var(--ticket-priority-bg, rgba(88, 230, 255, .08)), transparent 40%),
    #071421;
}

.admin-item.ticket-item .priority-ticket-header {
  margin: -14px -14px 8px;
}

.ticket-field-with-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.field-mini-action {
  width: 42px;
  min-height: 38px;
  padding: 0;
  font-size: 18px;
  font-weight: 1000;
}

.boss-week-calendar {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 10px;
  border: 1px solid rgba(88, 230, 255, .18);
  border-radius: var(--nh-radius);
  background: rgba(0, 9, 18, .35);
  overflow-x: auto;
}

.boss-week-calendar-row {
  display: grid;
  grid-template-columns: minmax(130px, .8fr) repeat(7, minmax(96px, 1fr));
  gap: 6px;
}

.boss-week-calendar-cell {
  min-height: 46px;
  padding: 8px;
  border: 1px solid rgba(88, 230, 255, .14);
  border-radius: var(--nh-radius);
  color: var(--nh-muted);
  background: rgba(255, 255, 255, .035);
  font-size: 12px;
}

.boss-week-calendar-cell.header,
.boss-week-calendar-cell.tech {
  min-height: auto;
  color: var(--nh-text);
  background: rgba(88, 230, 255, .10);
  font-weight: 1000;
}

.boss-week-calendar-entry {
  display: block;
  margin-top: 5px;
  padding: 5px 6px;
  border-left: 4px solid var(--nh-cyan);
  border-radius: 5px;
  color: var(--nh-text);
  background: rgba(88, 230, 255, .10);
}

.admin-item.is-archived {
  opacity: .62;
}

.admin-item-title {
  color: var(--nh-text);
  font-weight: 900;
}

.admin-item-meta {
  margin-top: 4px;
  color: var(--nh-muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.admin-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.admin-actions button {
  min-height: 36px;
  padding: 0 10px;
}

.admin-actions select {
  min-height: 36px;
  max-width: 240px;
}

.ticket-assignee-group,
.user-admin-form {
  margin: 0 16px 14px;
}

.ticket-assignee-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--nh-border);
  border-radius: var(--nh-radius);
  background: rgba(88, 230, 255, .08);
}

.ticket-assignee-title {
  color: var(--nh-text);
  font-weight: 900;
}

.ticket-assignee-meta {
  margin-top: 3px;
  color: var(--nh-muted);
  font-size: 12px;
}

.ticket-assignee-head span {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 28px;
  border: 1px solid rgba(88, 230, 255, .28);
  border-radius: var(--nh-radius-pill);
  color: var(--nh-cyan);
  font-weight: 900;
  background: rgba(88, 230, 255, .08);
}

.ticket-assignee-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.user-admin-list {
  margin: 0 16px 16px;
}

.user-admin-item .admin-actions {
  min-width: 90px;
}

.user-status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  margin-left: 8px;
  padding: 2px 8px;
  border: 1px solid var(--nh-border);
  border-radius: var(--nh-radius-pill);
  color: var(--nh-muted);
  font-size: 11px;
  font-weight: 900;
  vertical-align: middle;
}

.user-status-pill.signed-in {
  border-color: rgba(54, 226, 143, .42);
  color: #d7fff0;
  background: rgba(27, 185, 125, .16);
}

.user-status-pill.pending {
  border-color: rgba(255, 176, 32, .45);
  color: #ffe3a5;
  background: rgba(255, 176, 32, .12);
}

.danger {
  border-color: rgba(255, 79, 216, .45);
  color: #fff;
  background: linear-gradient(180deg, rgba(255, 79, 216, .24), rgba(105, 16, 68, .34)), var(--nh-button-gradient-current);
}

.image-admin-list .admin-item {
  grid-template-columns: 82px 1fr auto;
}

.admin-thumb-frame {
  display: grid;
  place-items: center;
  width: 82px;
  height: 58px;
  border: 1px solid var(--nh-border);
  border-radius: var(--nh-radius);
  overflow: hidden;
  background: var(--nh-panel-strong);
}

.admin-thumb-button {
  min-width: 82px;
  min-height: 58px;
  padding: 0;
}

.admin-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.is-hidden {
  display: none !important;
}

.cache-bust-btn {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 60;
  display: inline-grid;
  place-items: center;
  width: 38px;
  min-width: 38px;
  height: 38px;
  min-height: 38px;
  padding: 0;
  border-radius: var(--nh-radius-pill);
  font-size: 18px;
  line-height: 1;
}

.viewer {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(0, 0, 0, .86);
  backdrop-filter: blur(10px);
}

.viewer-panel {
  position: relative;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 52px;
  align-items: center;
  width: min(1180px, 100%);
  height: min(820px, calc(100vh - 32px));
}

.viewer-content {
  min-width: 0;
  max-height: 100%;
  overflow: auto;
}

.viewer-media {
  display: grid;
  place-items: center;
  height: min(680px, calc(100vh - 148px));
}

.viewer-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: var(--nh-radius);
  box-shadow: var(--nh-surface-shadow-strong);
}

.viewer-caption {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  color: var(--nh-muted);
  font-size: 13px;
}

.viewer-caption strong,
.viewer-caption span {
  display: block;
}

.viewer-caption strong {
  color: var(--nh-text);
  font-size: 16px;
}

.viewer-close,
.viewer-nav {
  z-index: 2;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  border-radius: var(--nh-radius-pill);
  font-size: 28px;
}

.viewer-close {
  position: absolute;
  top: 0;
  right: 0;
}

.viewer-prev {
  justify-self: start;
}

.viewer-next {
  justify-self: end;
}

.viewer-note {
  max-width: 820px;
  margin: 54px auto 0;
  padding: 20px;
  border: 1px solid var(--nh-stroke);
  border-radius: var(--nh-radius);
  background: var(--nh-panel-gradient);
  box-shadow: var(--nh-surface-shadow-strong);
}

.viewer-note h2 {
  font-size: 28px;
}

.viewer-heic {
  display: grid;
  place-items: center;
  min-width: 240px;
  min-height: 180px;
  border: 1px solid var(--nh-border);
  border-radius: var(--nh-radius);
  color: var(--nh-text);
  background: var(--nh-panel-gradient);
  font-weight: 900;
  text-align: center;
  text-decoration: none;
}

.viewer-heic span {
  color: var(--nh-muted);
  font-size: 13px;
}

.urgent-call-modal {
  position: fixed;
  inset: 0;
  z-index: 140;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, .82);
  backdrop-filter: blur(10px);
}

.urgent-call-panel {
  width: min(680px, 100%);
  padding: 22px;
  border: 1px solid rgba(255, 176, 32, .55);
  border-radius: var(--nh-radius);
  background: var(--nh-panel-gradient);
  box-shadow: var(--nh-surface-shadow-strong);
}

.urgent-call-panel h2 {
  margin: 4px 0 10px;
  font-size: clamp(26px, 4vw, 40px);
}

.urgent-call-warning {
  margin: 0 0 16px;
  color: var(--nh-text);
  font-size: 16px;
  line-height: 1.45;
}

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

.urgent-call-person {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--nh-border);
  border-radius: var(--nh-radius);
  background: rgba(255, 176, 32, .08);
}

.urgent-call-person span {
  color: var(--nh-muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.urgent-call-person strong {
  color: var(--nh-text);
  font-size: 20px;
}

.urgent-call-person a {
  color: var(--nh-cyan);
  font-size: 18px;
  font-weight: 900;
}

.command-center-card,
.inventory-transfer-section,
.ticket-media-section {
  border: 1px solid rgba(86, 222, 255, 0.24);
  border-radius: 10px;
  background: rgba(2, 15, 28, 0.68);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  padding: 16px;
  margin: 0 0 16px;
}

.command-center-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
}

.today-panel {
  grid-column: 1 / -1;
}

.today-command-card {
  grid-template-columns: minmax(0, 1fr);
  margin-bottom: 14px;
}

.today-command-heading h2 {
  margin: 0 0 5px;
  font-size: clamp(28px, 4vw, 42px);
}

.today-command-heading .eyebrow {
  margin-bottom: 5px;
}

.today-command-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.today-command-actions button {
  min-height: 58px;
  font-size: 15px;
  font-weight: 900;
}

.today-section-card {
  margin: 0 0 14px;
  border: 1px solid rgba(86, 222, 255, .2);
  border-radius: var(--nh-radius);
  background: rgba(2, 15, 28, .58);
  overflow: hidden;
}

.today-section-card summary {
  display: flex;
  align-items: center;
  min-height: 54px;
  padding: 14px 16px;
  cursor: pointer;
  color: var(--nh-text);
  font-size: 18px;
  font-weight: 900;
}

.today-section-card[open] summary {
  border-bottom: 1px solid rgba(86, 222, 255, .16);
}

.today-section-card > :not(summary) {
  margin: 14px;
}

.today-section-card .ticket-stats {
  margin: 14px;
}

.today-section-note {
  color: var(--nh-muted);
}

.command-center-card h3,
.inventory-transfer-section h3,
.ticket-media-section h3 {
  margin: 0 0 5px;
  font-size: 18px;
}

.command-center-card p,
.inventory-transfer-section p {
  color: var(--nh-muted);
  margin: 0;
}

.command-center-output {
  grid-column: 1 / -1;
}

.command-response {
  border: 1px solid rgba(86, 222, 255, 0.2);
  border-radius: 8px;
  background: rgba(0, 9, 18, 0.74);
  padding: 12px;
}

.command-response pre {
  white-space: pre-wrap;
  margin: 0 0 10px;
  color: var(--nh-text);
  font: inherit;
  line-height: 1.45;
}

.ai-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 10px;
  margin: 0 0 10px;
  color: #06111e;
  background: #58e6ff;
  font-weight: 900;
  font-size: 12px;
}

.ai-pill.muted {
  color: var(--nh-text);
  background: rgba(147, 163, 184, 0.18);
}

.command-mini-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.command-mini-list span {
  border: 1px solid rgba(86, 222, 255, 0.18);
  border-radius: 999px;
  background: rgba(86, 222, 255, 0.08);
  color: var(--nh-muted);
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 800;
}

.ticket-attachment-list,
.ticket-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 8px 0 12px;
}

.ticket-media-thumb {
  display: grid;
  width: 150px;
  min-height: 124px;
  grid-template-rows: 92px auto;
  overflow: hidden;
  border: 1px solid rgba(86, 222, 255, 0.25);
  border-radius: 8px;
  background: rgba(0, 7, 14, 0.85);
  color: var(--nh-text);
  text-decoration: none;
}

.ticket-media-thumb img {
  width: 100%;
  height: 92px;
  object-fit: cover;
  background: #020712;
}

.ticket-media-thumb span {
  padding: 7px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}

.ticket-media-thumb.video {
  align-items: center;
  text-align: center;
}

.video-glyph {
  display: grid;
  place-items: center;
  height: 92px;
  color: #06111e;
  background: linear-gradient(180deg, #58e6ff, #8b5cf6);
  text-transform: uppercase;
  letter-spacing: 0;
}

.inventory-transfer-section {
  margin-top: 16px;
}

.inventory-transfer-row .admin-item-title span {
  color: var(--nh-cyan);
  font-size: 12px;
  margin-left: 6px;
}

@media (max-width: 620px) {
  .urgent-call-grid {
    grid-template-columns: 1fr;
  }

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

  .ticket-stats {
    grid-template-columns: 1fr;
  }

  .today-onsite-window {
    grid-template-columns: 1fr;
  }

  .command-center-card {
    grid-template-columns: 1fr;
  }

  .ticket-media-thumb {
    width: calc(50% - 5px);
  }
}

@media (max-width: 760px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    justify-content: flex-start;
  }

  .search-hero {
    min-height: 300px;
    padding: 28px 16px;
  }

  .search-box {
    grid-template-columns: 1fr;
  }

  .nav-pill,
  .admin-link,
  .inline-action {
    min-height: 38px;
    padding: 0 11px;
  }

  .search-box button {
    min-height: 48px;
  }

  .admin-grid,
  .unit-quick-upload,
  .form-row {
    grid-template-columns: 1fr;
  }

  .panel-head.inline,
  .admin-item,
  .document-admin-item,
  .image-admin-list .admin-item,
  .open-ticket-card {
    grid-template-columns: 1fr;
  }

  .ticket-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0 0 14px;
  }

  .ticket-editor,
  .ticket-map {
    margin-left: 0;
    margin-right: 0;
  }

  .panel-head.inline {
    display: block;
  }

  .filter-input {
    margin-top: 10px;
  }

  .admin-actions {
    justify-content: flex-start;
  }

  .admin-actions button,
  .admin-actions select,
  .ticket-admin-tools button,
  .ticket-admin-tools input {
    width: 100%;
  }

  h1 {
    white-space: normal;
  }

  .cache-bust-btn {
    top: 8px;
    right: 8px;
    width: 34px;
    min-width: 34px;
    height: 34px;
    min-height: 34px;
    font-size: 16px;
  }

  .viewer-panel {
    grid-template-columns: 44px minmax(0, 1fr) 44px;
  }

  .viewer {
    padding: 8px;
  }

  .viewer-media {
    height: calc(100vh - 140px);
  }
}
