body{margin:0;font-family:Arial,sans-serif;background:#f4f6f8;color:#1f2933}
.app{display:flex;min-height:100vh}
.sidebar{width:240px;background:#12324a;color:#fff;padding:20px;box-sizing:border-box}
.sidebar .brand{font-size:24px;font-weight:bold;margin-bottom:20px}
.sidebar nav a{display:block;color:#fff;text-decoration:none;padding:10px 0;border-bottom:1px solid rgba(255,255,255,.1)}
.content{flex:1;padding:24px;box-sizing:border-box}
.topbar{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:24px}
.muted{color:#52606d;font-size:14px}
.userbox{background:#fff;padding:10px 12px;border-radius:4px;border:1px solid #d9e2ec}
.card{background:#fff;border:1px solid #d9e2ec;border-radius:6px;padding:20px;margin-bottom:20px}
.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:16px}
label{display:block;font-weight:bold;margin-top:12px}
input,select,textarea{width:100%;padding:10px;margin-top:6px;box-sizing:border-box;border:1px solid #bcccdc;border-radius:4px}
button,.btn{display:inline-block;background:#0b69a3;color:#fff;padding:10px 14px;border:0;border-radius:4px;text-decoration:none;cursor:pointer}
.btn-secondary{background:#486581}
table{width:100%;border-collapse:collapse;background:#fff}
th,td{padding:10px;border:1px solid #d9e2ec;text-align:left;vertical-align:top}
.flash{padding:12px 14px;border-radius:4px;margin-bottom:16px}
.flash.success{background:#e3f9e5;border:1px solid #7bd88f}
.flash.error{background:#ffe3e3;border:1px solid #ff9b9b}
.flash.warning{background:#fff7e6;border:1px solid #f0c36d}
.small{font-size:12px;color:#52606d}

.checkbox-row{display:flex;align-items:center;gap:8px;font-weight:bold}
.checkbox-row input{width:auto;margin:0}
.checkbox-cell{display:flex;flex-direction:column;justify-content:flex-end}
.actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.actions form{margin:0}
.danger-link{color:#ffd5d5!important}

textarea{min-height:120px}
.print-sheet{max-width:1100px;margin:0 auto}
.print-card{border-color:#000}
.print-form-header{display:flex;justify-content:space-between;gap:24px;align-items:flex-start}
.print-section{margin-top:20px}
.print-section h3{margin:0 0 8px 0}
.print-box{border:1px solid #222;min-height:60px;padding:12px;white-space:pre-wrap}
.attachment-print-block{border:1px solid #222;padding:12px;margin-bottom:16px;page-break-inside:avoid}
.attachment-meta{display:flex;gap:16px;align-items:center;flex-wrap:wrap;margin-bottom:12px}
.attachment-image{max-width:100%;max-height:900px;display:block;margin:0 auto}
.attachment-pdf{width:100%;height:900px;border:1px solid #bcccdc}
.attachment-text{white-space:pre-wrap;background:#fff;border:1px solid #bcccdc;padding:12px;max-height:none;overflow:visible}
@media print{
  .sidebar,.topbar,.flash,.no-print{display:none!important}
  .content{padding:0}
  body{background:#fff}
  .card{border:0;margin:0 0 12px 0;padding:0}
  .print-card{padding:0}
  a[href]:after{content:''}
}

.repeatable-table input,.repeatable-table textarea{margin-top:0}
.repeatable-table textarea{min-height:70px}
.repeatable-table .btn{padding:8px 10px}
@media print{
  .repeatable-table .btn{display:none!important}
}


.topbar-main{display:flex;flex-direction:column;gap:10px}
.incident-banner-label{font-size:12px;font-weight:bold;color:#52606d;text-transform:uppercase;letter-spacing:.04em}
.incident-banner-name{font-size:28px;font-weight:bold;line-height:1.2}
.incident-banner-number{font-size:20px;font-weight:normal;color:#52606d}
.page-context{font-size:13px;color:#52606d}
.op-period-switcher{display:flex;flex-direction:column;gap:6px;max-width:560px}
.op-period-switcher label{margin-top:0;font-size:13px}
.op-period-switcher select{margin-top:0}
.dashboard-row{display:flex;gap:16px;align-items:flex-start;margin-bottom:20px}
.dashboard-main-card{flex:1 1 75%}
.dashboard-side-card{flex:0 0 25%;min-width:280px}
.meeting-list{display:flex;flex-direction:column;gap:12px}
.meeting-list-item{padding-bottom:12px;border-bottom:1px solid #d9e2ec}
.meeting-list-item:last-child{padding-bottom:0;border-bottom:0}
.meeting-time{font-size:12px;color:#52606d}
.meeting-title{font-weight:bold;margin-top:2px}
.meeting-meta{font-size:13px;color:#52606d;margin-top:2px}
.inline-form{display:flex;gap:12px;align-items:flex-end;flex-wrap:wrap}
.inline-form label{margin-top:0}
.form-grid{display:grid;grid-template-columns:repeat(2,minmax(240px,1fr));gap:16px}
.form-grid .full-width{grid-column:1/-1}
.table-actions{display:flex;gap:8px;flex-wrap:wrap}
.status-pill{display:inline-block;padding:4px 8px;border-radius:999px;background:#e8f1f8;color:#12324a;font-size:12px;font-weight:bold}
@media (max-width: 1024px){
  .dashboard-row{flex-direction:column}
  .dashboard-side-card{flex:1 1 auto;min-width:0}
}
@media (max-width: 640px){
  .topbar{flex-direction:column;gap:12px}
  .userbox{align-self:flex-start}
  .form-grid{grid-template-columns:1fr}
}


.dashboard-current-time{font-size:14px;font-weight:bold;color:#12324a;margin-bottom:8px}
.next-meeting{background:#f0f7ff;border:1px solid #9ec5fe;border-radius:6px;padding:12px}
.next-meeting-badge{display:inline-block;margin-bottom:6px;padding:3px 8px;border-radius:999px;background:#0b5ed7;color:#fff;font-size:11px;font-weight:bold;text-transform:uppercase;letter-spacing:.03em}

.notification-toast-container{position:fixed;right:18px;bottom:18px;z-index:9999;display:flex;flex-direction:column;gap:10px;max-width:380px}
.notification-toast{background:#12324a;color:#fff;border-radius:8px;box-shadow:0 8px 24px rgba(0,0,0,.25);padding:14px}
.notification-toast-title{font-weight:bold;margin-bottom:4px}
.notification-toast-body{font-size:14px;margin-bottom:10px}
.notification-toast-actions{display:flex;gap:8px}
.notification-toast .btn{background:#fff;color:#12324a;text-decoration:none;padding:6px 10px;border-radius:4px;border:0}
.notification-toast .btn-secondary{background:#d9e2ec}
.btn-small{font-size:12px}
.priority-urgent{color:#b42318;font-weight:bold}.priority-routine{color:#12324a}.priority-low{color:#52606d}
.timeline{border-left:3px solid #d9e2ec;margin-left:8px;padding-left:14px}.timeline-item{margin-bottom:10px}

/* ICS 213RR workflow/fulfillment UI fixes */
.form-actions.rr-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.form-actions .btn{min-height:38px;display:inline-flex;align-items:center;justify-content:center}.card-header .btn.primary, table .btn.small, table .btn-small{color:#fff}.span-2{grid-column:1/-1}

/* ICS 213RR action button sizing consistency */
.form-actions.rr-actions{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
}
.form-actions.rr-actions .btn,
.form-actions.rr-actions button,
.form-actions.rr-actions a.btn{
  min-height:38px;
  height:auto;
  box-sizing:border-box;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:9px 14px;
  line-height:18px;
  font-size:14px;
  white-space:nowrap;
  flex:0 0 auto;
  vertical-align:middle;
}
.form-actions.rr-actions .btn.primary{
  color:#fff;
}


/* ICS 213RR fulfillment page button sizing */
.form-actions.rr-actions.fulfillment-actions{
  display:flex;
  gap:10px;
  align-items:center;
  justify-content:flex-start;
  flex-wrap:wrap;
}
.form-actions.rr-actions.fulfillment-actions .btn,
.form-actions.rr-actions.fulfillment-actions button,
.form-actions.rr-actions.fulfillment-actions a.btn{
  width:auto;
  max-width:max-content;
  min-height:38px;
  height:38px;
  padding:9px 14px;
  line-height:18px;
  font-size:14px;
  box-sizing:border-box;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
  align-self:flex-start;
}


/* ICS 213RR new/edit form button sizing */
.form-grid .form-actions{
  display:flex;
  gap:10px;
  align-items:center;
  justify-content:flex-start;
  flex-wrap:wrap;
}
.form-grid .form-actions .btn,
.form-grid .form-actions button,
.form-grid .form-actions a.btn{
  width:auto;
  max-width:max-content;
  min-height:38px;
  height:38px;
  padding:9px 14px;
  line-height:18px;
  font-size:14px;
  box-sizing:border-box;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
  align-self:flex-start;
}

.info-panel {
  border: 1px solid #d9e2ec;
  background: #f8fafc;
  padding: 12px 14px;
  margin: 12px 0;
}
.info-panel h3 {
  margin-top: 0;
}


/* Keep action button text readable. */
.btn,
button,
input[type="submit"],
input[type="button"],
a.btn,
.btn:visited,
a.btn:visited {
  color: #ffffff !important;
}

.btn:hover,
button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
a.btn:hover,
.btn:focus,
button:focus,
input[type="submit"]:focus,
input[type="button"]:focus,
a.btn:focus {
  color: #ffffff !important;
}

/* Step 2: keep checkbox text on the same line as the control. */
.checkbox-inline {
  display: flex !important;
  align-items: center;
  gap: 0.5rem;
}
.checkbox-inline input[type="checkbox"] {
  width: auto;
  margin: 0;
}
.checkbox-inline span {
  display: inline;
}


/* Step 2a: left-justified checkbox row for Resources Unit tracking. */
.checkbox-row,
.tracking-checkbox {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 0.5rem !important;
  margin-top: 12px !important;
  text-align: left !important;
  width: 100% !important;
}
.checkbox-row input[type="checkbox"],
.tracking-checkbox input[type="checkbox"] {
  width: auto !important;
  margin: 0 !important;
  flex: 0 0 auto !important;
}
.checkbox-row label,
.tracking-checkbox label {
  display: inline !important;
  margin: 0 !important;
  font-weight: bold !important;
  width: auto !important;
}


/* Step 5 UI: keep the left navigation a fixed, readable width.
   Wide operational tables should scroll inside the content area instead
   of compressing the sidebar. */
.app{
  align-items:stretch;
}
.sidebar{
  width:260px;
  flex:0 0 260px;
  min-width:260px;
  max-width:260px;
  overflow-wrap:normal;
}
.sidebar .brand{
  font-size:22px;
  line-height:1.15;
}
.sidebar nav a{
  font-size:13.5px;
  line-height:1.25;
  padding:8px 0;
  white-space:normal;
}
.content{
  flex:1 1 auto;
  min-width:0;
  overflow-x:auto;
}

/* Finance/Admin queue: compact enough for the wider status table without
   dropping below a readable size. */
.finance-queue-card{
  font-size:13px;
}
.finance-table-wrap{
  width:100%;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
}
.finance-queue-table{
  min-width:1180px;
  font-size:12.5px;
}
.finance-queue-table th,
.finance-queue-table td{
  padding:7px 8px;
}
.finance-queue-table .finance-action-form{
  gap:6px !important;
  min-width:220px !important;
}
.finance-queue-table .finance-action-form select,
.finance-queue-table .finance-action-form input{
  padding:7px;
  font-size:12.5px;
}
.finance-queue-table .finance-action-form button{
  padding:7px 10px;
  font-size:12.5px;
}

/* ICS 211-CAN check-in form layout */
.ics211-card{
  font-size:13.5px;
}
.ics211-title-row{
  display:flex;
  gap:18px;
  align-items:flex-start;
  justify-content:space-between;
}
.ics211-status{
  min-width:280px;
  background:#f7f9fc;
  border:1px solid #d8e0ea;
  padding:10px 12px;
}
.ics211-section-title{
  margin:18px 0 10px;
  padding:6px 8px;
  background:#23374d;
  color:#fff;
  font-weight:700;
  letter-spacing:.02em;
  text-transform:uppercase;
  font-size:12px;
}
.ics211-radio-row{
  display:flex;
  flex-wrap:wrap;
  gap:10px 18px;
  margin:8px 0 12px;
}
.ics211-radio-row label{
  display:flex;
  align-items:center;
  gap:6px;
  width:auto;
  margin:0;
  font-weight:600;
}
.ics211-radio-row input[type="radio"]{
  width:auto;
  margin:0;
}
.inline-fields{
  display:flex;
  align-items:center;
  gap:8px;
}
.inline-fields input{
  max-width:90px;
}
.ics211-table-wrap{
  width:100%;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
}
.ics211-table{
  min-width:1550px;
  font-size:12px;
}
.ics211-table th,
.ics211-table td{
  padding:6px 7px;
  vertical-align:top;
}
.muted{
  color:#607086;
  font-size:.78em;
}
@media (max-width: 900px){
  .ics211-title-row{display:block}
  .ics211-status{min-width:0;margin-top:10px}
}

.nav-spacer{display:block;height:14px;border-bottom:0!important}
.userbox-link{color:#1f2933;text-decoration:none}
.userbox-link:hover{text-decoration:underline}


/* Branding */
.sidebar{width:260px;flex:0 0 260px;min-width:260px;max-width:260px}
.content{min-width:0;overflow-x:auto}
.brand-with-logos{display:grid;grid-template-columns:42px 1fr 42px;gap:10px;align-items:center;margin-bottom:20px}
.brand-logo{max-width:42px;max-height:42px;object-fit:contain;background:rgba(255,255,255,.95);border-radius:6px;padding:3px;box-sizing:border-box}
.brand-text{min-width:0}
.sidebar .brand .brand-title{font-size:18px;font-weight:700;line-height:1.15;white-space:normal}
.sidebar .brand .brand-subtitle{font-size:11px;font-weight:400;line-height:1.2;color:rgba(255,255,255,.82);margin-top:3px}
.userbox-link{text-decoration:none;color:inherit}
.userbox-link:hover{text-decoration:underline}


/* ICS 202 complete form layout fix */
.ics202-form label{
  display:block !important;
  width:auto !important;
  margin-top:12px !important;
  font-weight:bold !important;
  color:#1f2933 !important;
  text-transform:none !important;
  letter-spacing:normal !important;
  font-size:14px !important;
}
.ics202-form input,
.ics202-form select,
.ics202-form textarea{
  width:100% !important;
}
.ics202-form input[type="checkbox"]{
  width:auto !important;
  margin:0 8px 0 0 !important;
}
.ics202-form fieldset{
  margin-top:16px;
  border:1px solid #d9e2ec;
  border-radius:6px;
  padding:12px 14px;
}
.ics202-form legend{
  font-weight:bold;
  padding:0 6px;
}
.ics202-check-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:8px 16px;
  margin-top:8px;
}
.ics202-check-grid label,
.ics202-checkbox-label{
  display:flex !important;
  align-items:center !important;
  gap:8px !important;
  margin-top:6px !important;
}


/* Sidebar footer administration links */
.sidebar{
  min-height:100vh;
  display:flex;
  flex-direction:column;
}
.sidebar nav{
  flex:1;
  display:flex;
  flex-direction:column;
}
/* Menu groups: Your forms / Action plan / More forms (includes/layout.php) */
.nav-group{margin:6px 0 2px}
.nav-group > summary{cursor:pointer;list-style:none;color:rgba(255,255,255,.7);font-size:11.5px;font-weight:700;letter-spacing:.06em;
  text-transform:uppercase;padding:8px 0 4px;display:flex;align-items:center;gap:6px}
.nav-group > summary::-webkit-details-marker{display:none}
/* Chevron drawn with borders: points right when closed, down when open. */
.nav-group > summary::before{content:"";flex:0 0 auto;width:7px;height:7px;margin:0 4px 0 2px;border-right:2px solid currentColor;
  border-bottom:2px solid currentColor;transform:rotate(-45deg);transition:transform .15s}
.nav-group[open] > summary::before{transform:rotate(45deg) translate(-2px,-2px)}
.nav-group > summary:hover,.nav-group > summary:focus-visible{color:#fff}
.sidebar nav .nav-group a{padding-left:14px}
.sidebar nav a[aria-current="page"]{font-weight:700;box-shadow:inset 3px 0 0 #fff}
.nav-footer{
  margin-top:auto;
  padding-top:14px;
  border-top:1px solid rgba(255,255,255,.25);
}
.nav-footer a:first-child{
  margin-top:0;
}


/* Global button sizing consistency
   Keep action buttons visually aligned across all form pages, including mixed
   <button>, submit inputs, and <a class="btn"> controls. */
button,
.btn,
a.btn,
input[type="submit"],
input[type="button"],
input[type="reset"]{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  min-height:38px !important;
  height:38px !important;
  padding:9px 14px !important;
  line-height:18px !important;
  font-size:14px !important;
  font-family:Arial,sans-serif !important;
  font-weight:normal !important;
  box-sizing:border-box !important;
  border-radius:4px !important;
  border:0 !important;
  text-decoration:none !important;
  white-space:nowrap !important;
  vertical-align:middle !important;
  cursor:pointer !important;
}

button.small,
.btn.small,
.btn-small,
a.btn-small,
input[type="submit"].small,
input[type="button"].small{
  min-height:32px !important;
  height:32px !important;
  padding:6px 10px !important;
  line-height:16px !important;
  font-size:12px !important;
}

.actions,
.form-actions,
.card-actions,
.button-row{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
}

.actions form,
.form-actions form,
.card-actions form,
.button-row form{
  margin:0;
  display:inline-flex;
}

table button,
table .btn,
table a.btn,
table input[type="submit"],
table input[type="button"]{
  min-height:32px !important;
  height:32px !important;
  padding:6px 10px !important;
  line-height:16px !important;
  font-size:12px !important;
}

/* Do not stretch buttons inside grid/form layouts unless a page explicitly opts in. */
.grid button,
.grid .btn,
.grid input[type="submit"],
.form-grid button,
.form-grid .btn,
.form-grid input[type="submit"]{
  width:auto !important;
  max-width:max-content !important;
}

/* Settings release 1.0.1.1 */
.app-footer{padding:10px 22px;color:#4b5563;font-size:12px;text-align:center;background:#fff;border-top:1px solid #e5e7eb}


/* External check-in location access management */
.external-checkin-code-notice{
  border-color:#0b69a3;
  background:#f0f7ff;
}
.external-checkin-code-value{
  display:inline-block;
  margin:8px 0;
  padding:12px 16px;
  border:1px solid #0b69a3;
  border-radius:4px;
  background:#fff;
  color:#102a43;
  font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;
  font-size:24px;
  font-weight:700;
  letter-spacing:.12em;
}
.external-checkin-access-cell{
  min-width:300px;
}
.external-checkin-access-cell details{
  min-width:280px;
}
.external-checkin-access-cell summary{
  cursor:pointer;
  color:#0b69a3;
  font-weight:700;
}
.external-checkin-url-row{
  display:flex;
  align-items:center;
  gap:8px;
}
.external-checkin-url-row input{
  min-width:0;
  margin-top:0;
  font-size:12px;
}
.external-checkin-url-row button{
  flex:0 0 auto;
  white-space:nowrap;
}
.external-checkin-qr{
  display:block;
  width:220px;
  max-width:100%;
  height:auto;
  margin:12px 0 8px;
  border:1px solid #bcccdc;
  background:#fff;
  image-rendering:pixelated;
}
.external-checkin-qr-actions,
.external-checkin-code-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  align-items:center;
}
.external-checkin-code-actions{
  margin-top:14px;
  padding-top:12px;
  border-top:1px solid #d9e2ec;
}
.external-checkin-code-actions .small{
  flex-basis:100%;
  margin:0;
}
.external-checkin-code-actions .inline-form{
  margin:0;
}
@media (max-width:640px){
  .external-checkin-url-row{
    align-items:stretch;
    flex-direction:column;
  }
  .external-checkin-url-row button{
    align-self:flex-start;
  }
}


.external-checkin-qr {
    box-sizing: border-box;
    padding: 10px;
}

.external-checkin-qr canvas,
.external-checkin-qr img {
    display: block;
    width: 100% !important;
    height: auto !important;
}

/* Fixed left menu: the sidebar stays in view while long pages scroll on the right.
   If the menu itself is taller than the window it scrolls on its own. */
@media (min-width: 1024px){
  .app{align-items:flex-start}
  .sidebar{
    position:sticky;
    top:0;
    align-self:flex-start;
    height:100vh;
    height:100dvh;          /* the visible height on tablets, not counting the browser's toolbars */
    min-height:0;
    overflow-y:auto;
    overscroll-behavior:contain;
  }
  .content{align-self:stretch;min-height:100vh}
}
@media print{
  .sidebar{position:static;height:auto;overflow:visible}
}

/* ---------------------------------------------------------------- In-app help (includes/help.php, assets/js/help_panel.js) */
.topbar-side{display:flex;align-items:flex-start;gap:10px}
.btn.btn-help,a.btn.btn-help:visited{background:#1f5f99;color:#fff !important;font-weight:700 !important}
.btn.btn-help:hover,.btn.btn-help:focus{background:#174a78;color:#fff !important}
.btn.btn-help:focus-visible{outline:3px solid #9fb3c8;outline-offset:2px}
.help-panel{position:fixed;top:0;right:0;bottom:0;width:440px;max-width:100vw;background:#fff;border-left:1px solid #bcccdc;
  box-shadow:-6px 0 20px rgba(16,42,67,.15);z-index:2000;display:flex;flex-direction:column}
.help-panel[hidden]{display:none}
.help-panel-head{display:flex;align-items:center;gap:12px;padding:14px 16px;border-bottom:1px solid #d9e2ec;background:#f0f4f8}
.help-panel-head h2{flex:1;margin:0;font-size:18px}
.help-panel-newtab{font-size:13px;white-space:nowrap}
/* The global button rules force white text, a fixed height and 14px type; the close button needs its own look. */
.help-panel .help-panel-close{background:#fff;border:1px solid #bcccdc !important;color:#243b53 !important;
  font-size:24px !important;font-weight:700 !important;line-height:1 !important;width:36px;height:36px !important;
  min-height:36px !important;padding:0 !important;flex:none}
.help-panel .help-panel-close:hover,.help-panel .help-panel-close:focus{background:#d9e2ec;color:#102a43 !important}
.help-panel-body{flex:1;overflow-y:auto;padding:4px 18px 24px;outline:none}
body.help-open .content{margin-right:440px}
@media (max-width: 1100px){ body.help-open .content{margin-right:0} .help-panel{width:100vw} }
.help-doc{line-height:1.5}
.help-doc h1{font-size:22px;margin:16px 0 8px}
.help-doc h2{font-size:18px;margin:22px 0 8px;padding-top:6px;border-top:1px solid #e4e7eb}
.help-doc h3{font-size:16px;margin:18px 0 6px}
.help-doc h4{font-size:14px;margin:14px 0 4px}
.help-doc code{background:#f0f4f8;border:1px solid #d9e2ec;border-radius:3px;padding:0 4px;font-size:.92em}
.help-doc pre{background:#102a43;color:#f0f4f8;border-radius:4px;padding:10px 12px;overflow-x:auto;font-size:13px}
.help-doc pre code{background:none;border:0;padding:0;color:inherit}
.help-doc ul,.help-doc ol{padding-left:22px}
.help-doc li{margin:3px 0}
.help-note{background:#eef6fc;border-left:4px solid #2680c2;padding:8px 12px;margin:12px 0;border-radius:3px}
.help-warning{background:#fffbea;border-left-color:#de911d}
.help-table-wrap{overflow-x:auto}
.help-table{border-collapse:collapse;margin:10px 0;font-size:14px}
.help-table th,.help-table td{border:1px solid #d9e2ec;padding:5px 8px;text-align:left;vertical-align:top}
.help-table th{background:#f0f4f8}
.help-highlight{background:#fff3c4;transition:background 1s}
.help-loading{color:#627d98}
.help-topic-list{columns:2 260px}
.help-page{max-width:900px}
.field-hint{display:block;font-size:13px;color:#52606d;font-weight:normal;margin-top:3px}
.help-inline-link{font-size:13px;margin-left:6px}

/* Sidebar logo block: lay out whichever logos are shown (ICS logo, organization logo, both or neither). */
.sidebar .brand.brand-with-logos{display:flex;align-items:center;gap:10px}
.brand-with-logos .brand-logo{flex:none;width:42px;height:42px}
.brand-with-logos .brand-text{flex:1;min-width:0}

/* Form status banner (includes/form_lock.php), same look as the ICS 213RR */
.cb-form-banner { margin-bottom: 1rem; }
.cb-form-hero { display:flex; gap:1rem; justify-content:space-between; align-items:flex-start; border-left:5px solid #006b5c; }
.cb-form-hero.is-locked { border-left-color:#374151; }
.cb-form-eyebrow { margin:0 0 .25rem; color:#4b5563; font-weight:700; font-size:.85rem; letter-spacing:.02em; text-transform:uppercase; }
.cb-form-title { margin:.1rem 0; }
.cb-form-subtitle { margin:.4rem 0 0; color:#4b5563; }
.cb-form-hero-side { text-align:right; }
.cb-form-hero-side .btn { margin-top:.4rem; }
.cb-form-status { display:inline-block; padding:.4rem .65rem; font-weight:700; background:#e7f4f1; color:#0a4d43; border:1px solid #9bcfc4; white-space:nowrap; }
.cb-form-status-draft, .cb-form-status-rejected { background:#fff7e6; color:#7a4b00; border-color:#f0c36d; }
.cb-form-status-submitted { background:#fff1e6; color:#8a3b00; border-color:#f2a66b; }
.cb-form-steps { display:grid; gap:.45rem; margin:1rem 0; }
.cb-form-step { border:1px solid #d1d5db; padding:.65rem; color:#4b5563; font-size:.9rem; background:#f9fafb; }
.cb-form-step.current { background:#e7f4f1; border-color:#006b5c; color:#073b34; font-weight:700; }
.cb-form-step.complete { background:#f2f7f6; color:#266158; }
.cb-form-next { border:2px solid #006b5c; background:#f5fbfa; padding:1.15rem; margin:1rem 0; }
.cb-form-next h2 { margin:0 0 .35rem; font-size:1.25rem; }
.cb-form-next p { margin:.35rem 0 .9rem; }
.cb-form-next .btn { margin-right:.4rem; }
.cb-form-waiting { font-size:1.05rem; }
.cb-form-reason, .cb-form-approver { display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin:.6rem 0; }
.cb-form-reason label, .cb-form-approver label { flex-basis:100%; font-weight:600; }
.cb-form-reason input[type=text] { flex:1 1 320px; max-width:560px; }
.cb-form-history { margin-top:1rem; }
.cb-form-history summary { cursor:pointer; font-weight:600; }
@media (max-width: 760px) {
  .cb-form-hero { display:block; }
  .cb-form-hero-side { text-align:left; margin-top:1rem; }
}


/* ======================================================================================== Phones and tablets
   Three layouts, picked by the width of the screen (a tablet switches when it is turned):
     desktop  1024 px and wider   tablets held sideways, laptops, monitors: menu always on the left
     tablet   600 - 1023 px       most tablets held upright: menu behind the Menu button, full-width page
     phone    under 600 px        one column, smaller headings, tighter cards
   The ECC display pages have their own style sheet and are not affected. Printing is not affected. */
.mobile-bar{display:none}
.nav-close{display:none !important}
.table-scroll{max-width:100%}
img,video{max-width:100%;height:auto}
.content{min-width:0}

@media (max-width: 1023px){
  .app{display:block}
  .mobile-bar{display:flex;align-items:center;gap:12px;position:sticky;top:0;z-index:1500;background:#12324a;color:#fff;
    padding:8px 12px;box-shadow:0 2px 6px rgba(0,0,0,.2)}
  .mobile-bar .nav-toggle{background:transparent;border:1px solid rgba(255,255,255,.5) !important;color:#fff !important;
    font-size:16px !important;font-weight:700 !important;min-height:44px !important;padding:0 14px !important;display:inline-flex;align-items:center;gap:8px}
  .mobile-bar-title{font-weight:700;font-size:17px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  /* The menu slides in from the left, over the page. */
  .sidebar{position:fixed;top:0;left:0;bottom:0;width:300px;max-width:85vw;z-index:1700;overflow-y:auto;overscroll-behavior:contain;
    transform:translateX(-105%);transition:transform .2s ease;visibility:hidden}
  body.nav-open .sidebar{transform:none;visibility:visible;box-shadow:6px 0 24px rgba(0,0,0,.35)}
  /* Phones and tablets: the menu is exactly the visible screen height and scrolls inside it, so the last links
     (Logout) can always be reached. 100vh counts the area behind the browser's toolbars and hid the bottom. */
  .sidebar{height:100vh;height:100dvh;min-height:0;padding-bottom:calc(32px + env(safe-area-inset-bottom, 0px));-webkit-overflow-scrolling:touch}
  .sidebar nav{flex:0 0 auto}
  body.nav-open{overflow:hidden}
  .nav-backdrop{position:fixed;inset:0;background:rgba(16,42,67,.45);z-index:1600}
  .nav-backdrop[hidden]{display:none}
  .sidebar .nav-close{display:flex !important;margin:0 0 8px auto;background:transparent;border:1px solid rgba(255,255,255,.4) !important;
    color:#fff !important;font-size:26px !important;line-height:1 !important;width:44px;height:44px !important;min-height:44px !important;padding:0 !important}
  .sidebar nav a{padding:12px 4px;font-size:16px}
  .content{padding:16px}
  .topbar{flex-direction:column;gap:12px;margin-bottom:16px}
  .topbar-main{width:100%}
  .topbar-side{width:100%;flex-wrap:wrap;align-items:center}
  .op-period-switcher{max-width:none}
  .incident-banner-name{font-size:22px}
  .incident-banner-number{font-size:16px}
  /* Bigger targets for fingers. 16 px text in fields also stops phones zooming in when a field is tapped. */
  input,select,textarea{font-size:16px}
  input[type=checkbox],input[type=radio]{width:22px;height:22px}
  /* The desktop button rules above fix the height at 38 px with !important; on touch screens buttons grow instead. */
  button,.btn,a.btn,input[type=submit],input[type=button],input[type=reset]{
    min-height:44px !important;height:auto !important;font-size:16px !important;line-height:20px !important;
    padding:10px 16px !important;white-space:normal !important;text-align:center}
  table button,table .btn,table a.btn,table input[type=submit],table input[type=button],
  button.small,.btn.small,.btn-small,a.btn-small{min-height:40px !important;height:auto !important;font-size:14px !important;padding:8px 12px !important}
  .ics202-form label{font-size:15px !important}
  .table-scroll{overflow-x:auto;-webkit-overflow-scrolling:touch;margin-bottom:12px}
  .table-scroll > table{margin-bottom:0}
  .dashboard-row{flex-direction:column}
  .dashboard-main-card,.dashboard-side-card{flex:1 1 auto;min-width:0;width:100%;box-sizing:border-box}
}

@media (max-width: 599px){
  .content{padding:10px}
  .card{padding:14px;margin-bottom:14px}
  h1{font-size:24px}
  h2{font-size:20px}
  .incident-banner-name{font-size:19px}
  .form-grid,.grid{grid-template-columns:1fr}
  th,td{padding:8px}
  .userbox{padding:8px 10px}
  /* Form status banner and its buttons */
  .cb-form-hero{display:block}
  .cb-form-hero-side{text-align:left;margin-top:.75rem}
  .cb-form-steps{grid-template-columns:1fr 1fr !important}
  .cb-form-next{padding:.85rem}
  .cb-form-reason input[type=text]{flex-basis:100%;max-width:none}
  .form-actions-card .d-flex{flex-direction:column;align-items:stretch !important;gap:8px}
  .form-actions-card .btn,.form-actions-card button{width:100%;text-align:center;justify-content:center}
}

@media (max-width: 599px){
  .notification-toast-container{left:10px;right:10px;bottom:10px;max-width:none}
}

/* Page-specific two- and four-column layouts drop to one column on phones; date pickers stay on screen. */
@media (max-width: 599px){
  .ics214-grid,.ics214-add,.ics215a-grid,.ics215a-sign,.catalogue-grid,.rc-grid,.s209-grid,.rr-v2-grid{grid-template-columns:1fr !important}
  .s209-cell{grid-column:1 / -1 !important}
  .ics201-dt-popover,.ics214-dt-popover,.ics215a-dt-popover,.govai-dt-popover{max-width:calc(100vw - 24px);box-sizing:border-box}
  .ics201-dt-wrap,.ics214-dt-wrap,.ics215a-dt-wrap,.govai-dt-wrap{flex-wrap:wrap !important}
  .rc-filter select{min-width:0}
  .inline-form > *{flex:1 1 100%}
  fieldset{min-width:0;margin-left:0;margin-right:0;padding-left:8px;padding-right:8px}
}

/* List tables (class cb-cards, labelled by assets/js/app_shell.js): one card per row on phones. */
@media (max-width: 599px){
  table.cb-cards-ready,table.cb-cards-ready tbody,table.cb-cards-ready tr,table.cb-cards-ready td{display:block;width:auto}
  table.cb-cards-ready{border:0;background:transparent;min-width:0 !important}
  table.cb-cards-ready thead,table.cb-cards-ready tr.cb-cards-head{display:none}
  table.cb-cards-ready tr{background:#fff;border:1px solid #d9e2ec;border-radius:6px;padding:8px 10px;margin:0 0 10px}
  table.cb-cards-ready td{border:0 !important;padding:5px 0 !important;min-height:0;white-space:normal !important;width:auto !important}
  table.cb-cards-ready td[data-label]::before{content:attr(data-label);display:block;font-size:12px;font-weight:700;color:#52606d;
    text-transform:uppercase;letter-spacing:.03em;margin-bottom:2px}
  table.cb-cards-ready td:empty{display:none}
  table.cb-cards-ready td .table-actions,table.cb-cards-ready td form{margin-top:4px}
  .table-scroll > table.cb-cards-ready{margin-bottom:0}
}

@media print{
  .mobile-bar,.nav-backdrop,.nav-close{display:none !important}
  .table-scroll{overflow:visible}
}

/* Dashboard panels (includes/dashboard_panels.php) */
.dashboard-panel{border-top:1px solid #d9e2ec;margin-top:16px;padding-top:4px}
.dashboard-panel:first-child{border-top:0;margin-top:0}
.dashboard-panel > h3{margin:12px 0 8px}
.dashboard-panel-matrix th{font-size:13px;white-space:normal;vertical-align:bottom;min-width:90px}
.dashboard-panel-matrix tbody th{vertical-align:middle;min-width:220px;font-weight:normal}
.dashboard-panel-matrix input[type=checkbox]{width:20px;height:20px;margin:0}
.dashboard-panel-matrix tr.dashboard-panel-everyone{background:#f0f7ff}
/* ICS 213 email options */
.checkbox-line{display:flex !important;align-items:center;gap:8px;font-weight:normal;margin:6px 0}
.checkbox-line input[type=checkbox]{width:auto;margin:0}
.ics213-contacts{border:1px solid #d9e2ec;border-radius:6px;padding:8px 12px;margin:8px 0}
.ics213-guidance{background:#f5fbfa;border:1px solid #9bcfc4;border-radius:6px;padding:10px 14px;margin:8px 0}
.ics213-guidance p{margin:.3rem 0}
.ics213-guidance ul{margin:.3rem 0 .3rem 1.2rem}
.ics213-status{border-left:6px solid #2563eb}
.ics213-status-awaiting_approval,.ics213-status-returned{border-left-color:#d97706;background:#fffbeb}
.ics213-status-cancelled{border-left-color:#9ca3af}
.ics213-status-sent{border-left-color:#059669}
.ics213-status h2{margin:.1rem 0 .4rem}

/* ICS 233 action tracker */
.ics233-table tr.ics233-overdue td{background:#fdecec}
.ics233-table tr.ics233-due td{background:#fff7e0}
.ics233-due-label{color:#92400e;font-weight:700}
.ics233-status-form{display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.ics233-status-form input[type=text]{flex:1 1 160px;min-width:0}

/* ICS 215 planning worksheet */
.ics215-cols{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:8px}
.ics215-cols label{margin:0}
fieldset.ics215-row{border:1px solid #cbd5e1}
fieldset.ics215-row legend{font-weight:700;padding:0 6px}
.ics215-res{border-collapse:collapse;margin:8px 0;max-width:100%}
.ics215-res th,.ics215-res td{border:1px solid #cbd5e1;padding:4px 6px;text-align:center;font-size:13px}
.ics215-res thead th{background:#f1f5f9}
.ics215-res input[type=number]{width:64px;text-align:center}
.ics215-res tr.ics215-need td{font-weight:700;background:#f8fafc}

/* Facilities and staging (forms/facilities, forms/staging) */
.facility-status,.staging-badge{display:inline-block;padding:2px 8px;border-radius:10px;font-size:12px;font-weight:700;background:#e5e7eb;color:#374151}
.facility-status-active,.staging-available{background:#dcfce7;color:#166534}
.facility-status-draft{background:#e0e7ff;color:#3730a3}
.facility-status-closed,.facility-status-archived,.staging-released{background:#f3f4f6;color:#6b7280}
.staging-assigned{background:#dbeafe;color:#1e40af}
.staging-out_of_service{background:#fee2e2;color:#991b1b}
.staging-counts{display:flex;flex-wrap:wrap;gap:10px;margin-top:10px}
.staging-count{padding:6px 12px;border-radius:8px;background:#f8fafc;border:1px solid #e2e8f0}
.staging-form{display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.staging-form input[name=assignment]{flex:1 1 140px;min-width:0}
.staging-form input[name=note]{flex:1 1 120px;min-width:0}
