/* MARKER: PUBLIC-STYLES 2026-01-11 */
/* styles.css build: 2026-01-11-01 */
:root {
  --ops-navy: #0a1a2f;
  --tactical-teal: #1f7a7a;
  --command-green: #5faf6f;
  --field-grey: #394045;
  --mission-black: #0b0b0c;
  --sandstone: #c9b28f;
  --radar-red: #e45c5c;
  --drone-silver: #d6e0e5;
  --nav-bg: var(--ops-navy);
  --nav-bg-2: var(--nav-bg);
  --nav-text: #ffffff;
  --accent: var(--tactical-teal);
  --accent-2: var(--sandstone);
  --bg: #eef2f6;
  --surface: #ffffff;
  --surface-2: #f6f8fb;
  --border: #d7dde3;
  --border-strong: rgba(10, 26, 47, 0.18);
  --shadow: 0 8px 24px rgba(10, 26, 47, 0.08);
  --shadow-sm: 0 4px 14px rgba(10, 26, 47, 0.06);
  --radius: 12px;
  --radius-sm: 10px;
  --text: var(--mission-black);
  --muted: #475569;
  --muted-2: #64748b;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, Arial, sans-serif;
  font-size: clamp(15px, 1vw + 12px, 17px);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
}

body.booting main {
  visibility: hidden;
}

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

.content {
  padding: 18px 20px 28px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: min(1280px, 100%);
  margin: 0 auto;
}
.content > * {
  min-width: 0;
}

.page {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  width: 100%;
  max-width: none;
  align-self: center;
}

.page-header {
  padding: 18px 18px 12px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.title {
  background: transparent !important;
  color: var(--ops-navy) !important;
  padding: 0 !important;
  border-radius: 0 !important;
  font-size: 1.25rem;
  font-weight: 900;
  text-transform: none;
  letter-spacing: 0.02em;
  text-align: left;
}
.title a,
.title svg {
  color: currentColor;
  fill: currentColor;
}

.page-title {
  background: transparent !important;
  color: var(--ops-navy);
  padding: 0 !important;
  border-radius: 0 !important;
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-align: left;
}

.page-subtitle {
  margin-top: 6px;
  color: var(--muted-2);
  font-size: 0.95rem;
}

.page-back {
  text-decoration: none;
  background: var(--ops-navy);
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 600;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 8px 16px 10px;
  align-items: center;
  font-size: 0.95rem;
  color: var(--muted);
}

.controls label {
  font-weight: 600;
  margin-right: 4px;
}

.controls input,
.controls select {
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  font: inherit;
  min-height: 42px;
}
.controls input:focus,
.controls select:focus {
  outline: 2px solid rgba(31, 122, 122, 0.25);
  outline-offset: 1px;
  border-color: rgba(31, 122, 122, 0.35);
}

.table-wrap {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.table-wrap.table-container {
  padding: 0;
}
.section > .table-wrap {
  margin-top: 8px;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: auto;
  min-width: 720px;
}
.table-fullwidth {
  width: 100%;
  table-layout: auto;
  min-width: 720px;
}
.table-wrap table {
  width: 100%;
}

.ov-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
}
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
}

.ov-table {
  table-layout: auto;
  width: max-content;
  min-width: 100%;
}
.table-standard {
  min-width: 900px;
}
.ov-table.table-fullwidth {
  width: 100%;
  table-layout: auto;
  min-width: 100%;
}
.assign-table-wrap {
  width: 100%;
}
.assign-lists > * {
  min-width: 0;
}

.ov-table th,
.ov-table td {
  padding: 10px 12px;
  white-space: nowrap;
}

th,
td {
  border-bottom: 1px solid var(--border);
  padding: 10px 12px;
  text-align: left;
  font-size: 0.92rem;
  color: var(--text);
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

thead th {
  background: var(--ops-navy);
  color: #fff;
  font-weight: 900;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border-strong);
}

tbody tr:nth-child(even) td {
  background: var(--surface-2);
}

tbody tr:hover td {
  background: rgba(31, 122, 122, 0.08);
}

.table-sticky thead th {
  position: sticky;
  top: 0;
  z-index: 2;
}

.table-autofit {
  table-layout: auto;
  width: max-content;
  min-width: 100%;
}

.table-autofit th,
.table-autofit td {
  white-space: nowrap;
}

.sticky-col {
  position: sticky;
  left: 0;
  z-index: 3;
  background: var(--surface);
}

.status {
  text-align: center;
  color: var(--muted);
  margin: 6px 0 14px;
  font-size: 0.95rem;
}

.status.error {
  color: var(--radar-red);
}

.topnav {
  background: linear-gradient(
    to bottom,
    var(--nav-bg) 0%,
    var(--nav-bg) 50%,
    var(--nav-bg-2) 50%,
    var(--nav-bg-2) 100%
  );
  color: var(--nav-text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 2px solid var(--border-strong);
  flex-wrap: wrap;
  row-gap: 6px;
}

.brand {
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.9rem;
  color: var(--nav-text);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}
.brand:hover,
.brand:focus-visible {
  color: var(--nav-text);
}

.brand-unit {
  display: inline-flex;
  align-items: center;
  color: var(--nav-text);
  font-weight: 700;
  font-size: 0.85rem;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-links,
.topnav-right {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-start; /* keep items left-aligned on narrow nav */
}

.nav-link {
  color: var(--nav-text);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 0.92rem;
  font-weight: 600;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  position: relative;
}
button.nav-link {
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
}
.nav-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.nav-icon-wrap svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}
.nav-link:hover {
  background: rgba(201, 178, 143, 0.22);
}

.nav-link-active {
  background: rgba(31, 122, 122, 0.85);
  color: var(--nav-text);
  border-color: transparent;
}

.nav-toggle {
  display: none;
  border: 1px solid #cbd5e1;
  background: #0f172a;
  color: #fff;
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
}
.nav-toggle .hamburger {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
}
.nav-toggle .hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}

.logout {
  background: var(--radar-red);
  color: #fff;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 2px 6px;
  background: var(--radar-red);
  color: #fff;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  line-height: 1.2;
  min-height: 42px;
  box-shadow: none;
  transition: filter 0.12s ease, background 0.12s ease;
}

.btn-return {
  color: #ffffff;
}

.btn-return:hover,
.btn-return:focus,
.btn-return:visited {
  color: #ffffff;
}

.btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.btn-primary {
  background: var(--tactical-teal);
  border-color: var(--tactical-teal);
  color: #fff;
}

.btn-secondary {
  background: var(--field-grey);
  border-color: var(--field-grey);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  border-color: var(--tactical-teal);
  color: var(--tactical-teal);
}

.btn-danger {
  background: var(--radar-red);
  border-color: var(--radar-red);
  color: #fff;
}

.btn-attending {
  background: var(--success, #198754);
  border-color: var(--success, #198754);
  color: #fff;
}

.btn-not-attending {
  background: var(--danger, #dc3545);
  border-color: var(--danger, #dc3545);
  color: #fff;
}

.btn-attending.is-muted,
.btn-not-attending.is-muted {
  opacity: 0.78;
}

.btn:hover {
  filter: brightness(1.04);
  transform: none;
  box-shadow: none;
}

.btn:focus-visible {
  outline: 2px solid rgba(31, 122, 122, 0.35);
  outline-offset: 2px;
}

.btn:disabled,
.btn[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.6;
  box-shadow: none;
  transform: none;
  filter: none;
}

.muted {
  color: var(--muted);
  font-size: 0.95rem;
}

.on-dark {
  color: #fff !important;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid transparent;
  white-space: nowrap;
  line-height: 1.2;
}
.chip--success {
  background: rgba(95, 175, 111, 0.18);
  color: var(--mission-black);
  border-color: rgba(95, 175, 111, 0.35);
}
.chip--danger {
  background: rgba(228, 92, 92, 0.16);
  color: var(--mission-black);
  border-color: rgba(228, 92, 92, 0.35);
}
.chip--warn {
  background: rgba(201, 178, 143, 0.22);
  color: var(--mission-black);
  border-color: rgba(201, 178, 143, 0.45);
}
.chip--info {
  background: rgba(31, 122, 122, 0.16);
  color: var(--mission-black);
  border-color: rgba(31, 122, 122, 0.35);
}
.chip--neutral {
  background: rgba(214, 224, 229, 0.65);
  color: var(--mission-black);
  border-color: rgba(10, 26, 47, 0.18);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow: auto;
  z-index: 999;
}

.modal {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  width: min(960px, 100%);
  max-width: 92vw;
  max-height: min(85vh, 780px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal header,
.modal-footer {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.modal-body {
  padding: 12px 16px 18px;
  overflow: auto;
  max-height: calc(92vh - 160px);
}
.modal-note {
  color: var(--muted);
  font-size: 0.95rem;
}
.modal-note.error {
  color: var(--radar-red);
}

.modal-close {
  margin-left: auto;
  border: none;
  background: transparent;
  color: #0f172a;
  cursor: pointer;
  font-size: 1.2rem;
}

.hidden {
  display: none !important;
}

.support-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px 14px;
}
.support-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.support-field label {
  font-weight: 700;
  color: var(--text);
  font-size: 0.9rem;
}
.support-field input,
.support-field select,
.support-field textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font: inherit;
  background: var(--surface);
}
.support-field textarea {
  min-height: 90px;
  resize: vertical;
}
.support-field input:focus,
.support-field select:focus,
.support-field textarea:focus {
  outline: 2px solid rgba(31, 122, 122, 0.25);
  outline-offset: 1px;
  border-color: rgba(31, 122, 122, 0.35);
}

.section,
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.section {
  padding: 14px;
  margin: 12px 18px;
}

.card {
  padding: 14px;
}

.page > .card {
  margin: 12px 18px;
}

.audit-summary-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 28px;
}

.audit-summary-item {
  min-width: 180px;
}

.audit-summary-label {
  font-size: 0.78rem;
  color: var(--muted-2);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.audit-summary-value {
  font-weight: 600;
  color: var(--ops-navy);
  margin-top: 4px;
}

.label-with-tip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.help-tip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.78rem;
  cursor: pointer;
  padding: 0;
}

.help-tip::after,
.help-tip::before {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.help-tip::after {
  content: attr(data-tooltip);
  bottom: 130%;
  left: 50%;
  transform: translate(-50%, 6px);
  background: var(--ops-navy);
  color: #fff;
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 0.78rem;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
  z-index: 20;
}

.help-tip::before {
  content: "";
  bottom: 118%;
  left: 50%;
  transform: translate(-50%, 6px);
  border-width: 6px 6px 0;
  border-style: solid;
  border-color: var(--ops-navy) transparent transparent;
  z-index: 19;
}

.help-tip:hover::after,
.help-tip:hover::before,
.help-tip:focus-visible::after,
.help-tip:focus-visible::before,
.help-tip.is-open::after,
.help-tip.is-open::before {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Help dropdown */
.help-dropdown {
  position: relative;
  display: inline-flex;
}
.help-dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  min-width: 180px;
  z-index: 1100;
  padding: 4px 0;
  margin-top: 4px;
}
.help-dropdown-item {
  display: block;
  width: 100%;
  padding: 10px 16px;
  background: none;
  border: none;
  text-align: left;
  font: inherit;
  color: var(--text);
  cursor: pointer;
  font-size: 0.95rem;
  white-space: nowrap;
}
.help-dropdown-item:hover,
.help-dropdown-item:focus-visible {
  background: rgba(31, 122, 122, 0.10);
  color: var(--tactical-teal);
}

/* Training Videos modal */
.training-videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}
.training-video-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.training-video-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
}
.training-video-desc {
  font-size: 0.9rem;
  color: var(--muted);
}
.training-video-embed {
  width: 100%;
}
.training-videos-empty {
  color: var(--muted);
  font-size: 0.95rem;
  text-align: center;
  padding: 40px 20px;
  grid-column: 1 / -1;
}

.support-footer {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 1400;
}

.support-footer-link {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--tactical-teal);
  font-weight: 600;
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.support-footer-link:hover,
.support-footer-link:focus-visible {
  color: var(--ops-navy);
  border-color: rgba(15, 46, 46, 0.4);
}

.page > .panel {
  margin: 12px 18px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 14px;
}

.panel .section {
  margin: 12px 0;
}

.section h2,
.card h3 {
  color: var(--ops-navy);
  font-weight: 900;
  letter-spacing: 0.02em;
}

.card h3 {
  text-transform: uppercase;
  font-size: 0.92rem;
  margin: 0 0 8px;
}

.metric {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--tactical-teal);
}

@media (max-width: 768px) {
  .content {
    padding: 12px 12px 18px;
    gap: 12px;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .title,
  .page-title {
    width: 100%;
  }

  .topnav {
    align-items: flex-start; /* keep nav items anchored left on iPhone widths */
  }

  .nav-toggle {
    display: inline-flex;
  }

  .brand-unit {
    max-width: 140px;
  }

  .nav-links,
  .topnav-right {
    width: 100%;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .topnav.nav-open .nav-links,
  .topnav.nav-open .topnav-right {
    display: flex;
  }

  .topnav.nav-open .nav-links .nav-link,
  .topnav.nav-open .topnav-right .nav-link,
  .topnav.nav-open .logout {
    width: 100%;
    justify-content: flex-start;
  }

  .help-dropdown {
    width: 100%;
  }
  .help-dropdown-menu {
    position: static;
    border: none;
    box-shadow: none;
    padding: 0;
    margin: 0;
    min-width: unset;
  }
  .help-dropdown-item {
    padding-left: 24px;
  }
  .training-videos-grid {
    grid-template-columns: 1fr;
  }

  table {
    min-width: 720px;
  }
  .table-standard {
    min-width: 720px;
  }

  .controls {
    gap: 8px;
    flex-direction: column;
    align-items: stretch;
  }

  .controls label,
  .filters label {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  .controls input,
  .controls select,
  .filters input,
  .filters select {
    width: 100%;
  }

  .controls .btn,
  .filters .btn {
    width: 100%;
    justify-content: center;
  }
}

@media (min-width: 992px) {
  table {
    min-width: 720px;
  }
  .table-wrap {
    overflow-x: auto;
  }
  .table-wrap.table-scroll {
    overflow-x: auto;
  }
}

@media (max-width: 520px) {
  body {
    font-size: clamp(14px, 3vw, 16px);
  }

  .page-header {
    gap: 10px;
  }

  .btn {
    min-height: 40px;
    padding: 9px 12px;
  }

  table {
    min-width: 720px;
    font-size: 0.92rem;
  }

  .modal {
    width: 100%;
    max-width: 92vw;
    max-height: 85vh;
  }
  .modal-body {
    max-height: calc(85vh - 150px);
  }
}

@media (max-width: 520px) {
  .support-grid {
    grid-template-columns: 1fr;
  }
}
