/* Light navbar with each company's logo; a coloured bar tells you where you are. */
.brand-bar { background: #fff; border-bottom: 4px solid #343a40; box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.theme-logic .brand-bar { border-bottom-color: #C8202F; }
.theme-alpha .brand-bar { border-bottom-color: #F26522; }
.brand-logo { height: 40px; width: auto; }
.brand-logo-alpha { height: 52px; margin: -6px 0; }
.brand-tag { font-size: .8rem; color: #6c757d; text-transform: uppercase; letter-spacing: .06em; }
.brand-bar .nav-link { color: #343a40; font-weight: 500; }
.brand-bar .nav-link.active { color: #000; border-bottom: 2px solid currentColor; }
.theme-logic .brand-bar .nav-link.active { color: #C8202F; }
.theme-alpha .brand-bar .nav-link.active { color: #D8541A; }
/* Laptop widths: a label never breaks in two ("Log / out") and the longest menu, the owner's Alpha one with the
   Logic / Alpha switch, still fits on one line from 1200 px, scrollbar included. Below 1600 px the words beside the logo give
   way, and below 1440 px the links sit a little closer. If a menu is ever longer than the
   window anyway, whole items move to a second row rather than off the edge of the screen. */
@media (min-width: 1200px) {
  .brand-bar .nav-link { white-space: nowrap; }
  #mainNav > .navbar-nav.me-auto { flex-wrap: wrap; }
}
@media (min-width: 1200px) and (max-width: 1599.98px) {
  .brand-bar .navbar-brand { margin-right: .5rem; }
  .brand-bar .brand-tag { display: none; }
}
@media (min-width: 1200px) and (max-width: 1439.98px) {
  .brand-bar { --bs-navbar-nav-link-padding-x: .35rem; }
  /* Beside the Logic / Alpha switch the name gives way to the initials (it heads the menu under them), which leaves
     the owner's Alpha menu a safe margin rather than a few pixels. */
  .company-switch ~ .nav-item .user-name { display: none; }
  .company-switch ~ .nav-item .user-initials { display: inline; }
}
/* Just above the switch to the hamburger, once the scrollbar has taken its 15 px, the owner's Alpha menu is a few
   pixels too long for one line; the links close up a little more there. */
@media (min-width: 1200px) and (max-width: 1279.98px) {
  .brand-bar { --bs-navbar-nav-link-padding-x: .25rem; }
}

/* Logic / Alpha switch for whoever can open both: the company you are in is filled with its own colour. */
.company-switch { align-self: flex-start; }
.company-switch .btn { --bs-btn-color: #495057; --bs-btn-border-color: #ced4da; --bs-btn-hover-bg: #f8f9fa; --bs-btn-active-color: #fff; font-weight: 600; }
.company-switch .switch-logic { --bs-btn-hover-color: #C8202F; --bs-btn-active-bg: #C8202F; --bs-btn-active-border-color: #C8202F; }
.company-switch .switch-alpha { --bs-btn-hover-color: #C2410C; --bs-btn-active-bg: #C2410C; --bs-btn-active-border-color: #C2410C; }  /* Alpha's own orange is too pale behind white text */
@media (min-width: 1200px) { .company-switch { align-self: center; } }

.user-initials { display: none; font-weight: 600; }

body { background: #f5f6f8; }

.company-card { transition: box-shadow .15s ease-in-out; border-width: 2px; }
.company-card-logic:hover { border-color: #C8202F; box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .1); }
.company-card-alpha:hover { border-color: #F26522; box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .1); }

.stat-card { transition: box-shadow .15s ease-in-out; }
.stat-card:hover { box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .1); }
.stat-card .display-6 { font-weight: 600; line-height: 1.1; }

.tool-picker { max-height: 460px; overflow-y: auto; }
.tool-option { cursor: pointer; }
.tool-option:hover { background: #f8f9fa; }

/* QF1071 report form: one step at a time, big buttons, optional parts folded away */
.report-form .card-header { font-weight: 600; }
.report-form .form-check-inline { margin-right: .75rem; }
.report-form .form-label { font-weight: 500; margin-bottom: .25rem; }
.report-form .form-text { margin-top: .15rem; }
.wizard-step[hidden] { display: none !important; }
.wizard-pills .btn { min-height: 38px; }
.wizard-footer { position: sticky; bottom: 0; z-index: 10; background: #f5f6f8; padding: .75rem 0 calc(.75rem + env(safe-area-inset-bottom)); border-top: 1px solid #dee2e6; }
.btn-group-wrap { flex-wrap: wrap; }
.btn-group-wrap > .btn { flex: 0 0 auto; }
.btn-group .btn-check:checked + .btn { box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .15); }
.more-details > summary { cursor: pointer; color: #6c757d; font-size: .9rem; list-style: none; }
.more-details > summary::before { content: '\25B8'; display: inline-block; width: 1rem; }
.more-details[open] > summary::before { content: '\25BE'; }
.photo-thumb img { width: 120px; height: 90px; object-fit: cover; }
@media (max-width: 575.98px) {
  main.container-fluid { padding-left: .75rem !important; padding-right: .75rem !important; }
  .report-form .card-body { padding: 1rem .85rem; }
  .report-form .form-control, .report-form .form-select { font-size: 16px; min-height: 44px; }
  .report-form .btn-group-sm > .btn { padding: .45rem .7rem; font-size: .95rem; }
  .report-form .btn-group-lg > .btn, .report-form .btn-lg { padding: .6rem .9rem; font-size: 1.05rem; }
  .report-form .btn-group-wrap > .btn { flex: 1 1 auto; }
  .wizard-pills { display: none !important; }
  .wizard-footer .btn { flex: 1 1 auto; min-height: 48px; }
  .wizard-footer > div { flex-wrap: wrap; }
  .wizard-footer > div > div { flex: 1 1 100%; display: flex; gap: .5rem; }
  .wizard-footer > div > div:first-child:empty { display: none; }
  .photo-thumb img { width: 96px; height: 72px; }
}
.pdf-frame { width: 100%; height: 82vh; border: 1px solid #dee2e6; background: #fff; }

/* Weekly report: presentation layout */
.report-sheet { background: #fff; border: 1px solid #e5e7eb; border-radius: .5rem; padding: 1.5rem; }
.report-band { border-bottom: 4px solid #F26522; padding-bottom: 1rem; }
.report-logo { height: 84px; width: auto; }
.report-kicker { font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: #12335E; font-weight: 600; }
.report-period { font-size: 1.05rem; color: #495057; }
.kpi-card { border-top: 3px solid #12335E; }
.kpi-value { font-size: 2rem; font-weight: 700; color: #12335E; line-height: 1.1; }
.kpi-label { letter-spacing: .06em; font-weight: 600; }
.report-table thead th { background: #12335E; color: #fff; font-weight: 600; font-size: .8rem; }
.report-table tbody tr:nth-child(even) { background: #f8f9fa; }

@media print {
  .no-print { display: none !important; }
  body { background: #fff; }
  main { padding: 0 !important; }
  .report-sheet { border: 0; padding: 0; }
  .card { break-inside: avoid; border: 1px solid #999; box-shadow: none; }
  .table { font-size: 11px; }
  .report-table thead th { background: #12335E !important; color: #fff !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  a { color: inherit; text-decoration: none; }
}

.equipment-needed label { font-weight: 600; }

/* Hard band codes: white = good, Y = yellow (Bootstrap warning), P = purple, R = red (danger). */
.text-bg-purple { background-color: #6f42c1 !important; color: #fff !important; }
.text-bg-white { background-color: #fff !important; color: #212529 !important; }
