:root {
  --font-sans: "Inter", "SF Pro Display", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "SF Mono", "JetBrains Mono", "Cascadia Code", Menlo, Monaco, Consolas, monospace;

  --bg: #f4f6fb;
  --surface: #ffffff;
  --surface-muted: #f8fbff;
  --glass: rgba(255, 255, 255, 0.72);

  --text: #0e1729;
  --text-muted: #5f6d87;

  --accent: #0a4b9a;
  --accent-strong: #003976;
  --accent-soft: #e7f0ff;
  --accent-2: #ffc82e;

  --success: #067647;
  --warning: #b54708;
  --danger: #b42318;

  --border: #d6deeb;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;

  --shadow-xs: 0 4px 12px rgba(15, 23, 42, 0.06);
  --shadow-sm: 0 12px 26px rgba(15, 23, 42, 0.1);
  --shadow-md: 0 20px 46px rgba(15, 23, 42, 0.16);

  --transition-fast: 160ms ease;
  --transition-base: 240ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  color: var(--text);
  line-height: 1.45;
  min-height: 100vh;
  background:
    radial-gradient(circle at 4% -8%, rgba(10, 75, 154, 0.11) 0%, rgba(10, 75, 154, 0) 34%),
    radial-gradient(circle at 102% 16%, rgba(255, 200, 46, 0.18) 0%, rgba(255, 200, 46, 0) 34%),
    linear-gradient(180deg, #f7f9fd 0%, #edf2fa 100%);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(11, 36, 77, 0.05) 0.6px, transparent 0.6px);
  background-size: 18px 18px;
  opacity: 0.35;
  z-index: -2;
}

::-webkit-scrollbar {
  width: 11px;
  height: 11px;
}

::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(10, 75, 154, 0.58) 0%, rgba(10, 75, 154, 0.34) 100%);
  background-clip: padding-box;
}

::-webkit-scrollbar-track {
  background: rgba(216, 226, 242, 0.42);
  border-radius: 999px;
}

.hidden {
  display: none !important;
}

:focus-visible {
  outline: 3px solid rgba(10, 75, 154, 0.35);
  outline-offset: 1px;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a.ghost {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 11px;
  background: var(--accent-strong);
  color: #fff;
  padding: 9px 13px;
  font-size: 0.85rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

button:hover,
a.ghost:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(10, 40, 87, 0.2);
}

button:active {
  transform: translateY(0);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

button.ghost,
a.ghost {
  background: #f1f6ff;
  border-color: #c8d6ee;
  color: #1f4273;
}

button.ghost:hover,
a.ghost:hover {
  background: #eaf2ff;
}

button.danger {
  background: #fff3f2;
  border-color: #f4c2c0;
  color: var(--danger);
}

button.danger:hover {
  background: #ffecea;
}

button.is-loading {
  position: relative;
  padding-left: 31px;
}

button.is-loading::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 50%;
  width: 12px;
  height: 12px;
  margin-top: -6px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.42);
  border-top-color: rgba(255, 255, 255, 0.96);
  animation: spin 700ms linear infinite;
}

button.ghost.is-loading::before,
button.danger.is-loading::before {
  border-color: rgba(10, 56, 121, 0.3);
  border-top-color: rgba(10, 56, 121, 0.9);
}

input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text);
  padding: 10px 11px;
  font-size: 0.86rem;
  font-weight: 500;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast);
}

input:not([type="checkbox"]):not([type="radio"]):focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(10, 75, 154, 0.62);
  box-shadow: 0 0 0 3px rgba(10, 75, 154, 0.17);
}

textarea {
  min-height: 96px;
  resize: vertical;
}

input[type="checkbox"] {
  appearance: none;
  width: 17px;
  height: 17px;
  border-radius: 5px;
  border: 1px solid #9fb3d8;
  background: #fff;
  display: inline-grid;
  place-items: center;
  margin: 0;
  cursor: pointer;
}

input[type="checkbox"]::before {
  content: "";
  width: 10px;
  height: 10px;
  transform: scale(0);
  transition: transform 110ms ease;
  clip-path: polygon(14% 44%, 0 64%, 50% 100%, 100% 17%, 79% 0%, 42% 61%);
  background: #fff;
}

input[type="checkbox"]:checked {
  border-color: var(--accent-strong);
  background: var(--accent-strong);
}

input[type="checkbox"]:checked::before {
  transform: scale(1);
}

.friend-login-gate {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background:
    radial-gradient(circle at 0% 0%, rgba(10, 75, 154, 0.45) 0%, rgba(10, 75, 154, 0) 34%),
    radial-gradient(circle at 100% 120%, rgba(255, 200, 46, 0.35) 0%, rgba(255, 200, 46, 0) 40%),
    rgba(4, 15, 35, 0.75);
  backdrop-filter: blur(12px);
}

.friend-login-card {
  width: min(456px, calc(100vw - 40px));
  border-radius: 18px;
  border: 1px solid rgba(187, 206, 236, 0.48);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.97) 0%, rgba(245, 250, 255, 0.96) 100%);
  box-shadow: 0 28px 60px rgba(3, 15, 34, 0.32);
  padding: 20px;
  animation: panelIn var(--transition-base);
}

.friend-login-logo {
  width: 74px;
  height: 74px;
  border-radius: 16px;
  object-fit: cover;
  display: block;
  margin: 0 auto 12px;
  box-shadow: 0 14px 30px rgba(5, 24, 56, 0.18);
}

.friend-login-card h2 {
  margin: 0;
  text-align: center;
  color: #12325d;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.friend-login-card p {
  margin: 8px 0 14px;
  text-align: center;
  color: #42608b;
  font-size: 0.86rem;
}

.friend-login-form {
  display: grid;
  gap: 10px;
}

.friend-login-form label {
  display: grid;
  gap: 5px;
  color: #32496f;
  font-size: 0.8rem;
  font-weight: 600;
}

.friend-login-secondary {
  margin-top: 12px;
  border-top: 1px solid #d6e2f5;
  padding-top: 10px;
  display: grid;
  gap: 8px;
  justify-items: center;
}

.friend-login-secondary p {
  margin: 0;
  color: #516e98;
  font-size: 0.78rem;
}

.auth-error {
  margin: 10px 0 0;
  border: 1px solid rgba(180, 35, 24, 0.25);
  border-radius: 10px;
  background: #fff1f0;
  color: #9f2d24;
  padding: 8px 10px;
  font-size: 0.8rem;
  font-weight: 600;
}

.portal-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(10, 53, 116, 0.2);
  background:
    linear-gradient(120deg, rgba(3, 35, 82, 0.9) 0%, rgba(0, 57, 118, 0.9) 64%, rgba(17, 95, 171, 0.82) 100%);
  backdrop-filter: blur(16px) saturate(130%);
  box-shadow: var(--shadow-sm);
}

.portal-topbar::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 2px;
  background: linear-gradient(90deg, rgba(255, 200, 46, 0), rgba(255, 200, 46, 0.85), rgba(255, 200, 46, 0));
}

.topbar-logo {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  object-fit: cover;
  filter: drop-shadow(0 6px 10px rgba(4, 16, 34, 0.28));
}

.portal-topbar h1 {
  margin: 0;
  color: #f8fbff;
  font-size: clamp(0.98rem, 1.1vw, 1.16rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.topbar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(194, 216, 247, 0.48);
  background: rgba(255, 255, 255, 0.16);
  color: #ecf4ff;
  font-size: 0.74rem;
  font-weight: 650;
  letter-spacing: 0.01em;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.13);
  color: #fff;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 0 9px;
}

.icon-btn span {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.portal-layout {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  min-height: calc(100vh - 63px);
  transition: grid-template-columns var(--transition-base);
}

body:not(.sidebar-open) .portal-layout {
  grid-template-columns: 0 minmax(0, 1fr);
}

.portal-sidebar {
  border-right: 1px solid rgba(172, 190, 220, 0.72);
  background: var(--glass);
  backdrop-filter: blur(10px) saturate(125%);
  padding: 16px 12px;
  display: grid;
  align-content: start;
  gap: 8px;
  transform: translateX(0);
  opacity: 1;
  transition: transform var(--transition-base), opacity var(--transition-base);
  overflow: hidden;
}

.sidebar-meta {
  margin-bottom: 4px;
  padding: 8px 10px;
  border: 1px solid rgba(10, 75, 154, 0.18);
  border-radius: 11px;
  background: linear-gradient(180deg, rgba(10, 75, 154, 0.08) 0%, rgba(10, 75, 154, 0.02) 100%);
  display: grid;
  gap: 2px;
}

.sidebar-meta small {
  color: #5f79a2;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.sidebar-meta strong {
  color: #133c73;
  font-size: 0.8rem;
  letter-spacing: 0.01em;
}

body:not(.sidebar-open) .portal-sidebar {
  transform: translateX(-100%);
  opacity: 0;
  pointer-events: none;
}

.portal-sidebar.hidden {
  display: none !important;
}

.sidebar-tab {
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  color: #224678;
  padding: 10px 12px;
  text-align: left;
  font-size: 0.84rem;
  font-weight: 650;
  cursor: pointer;
}

.sidebar-tab:hover {
  border-color: rgba(10, 75, 154, 0.25);
  background: rgba(10, 75, 154, 0.08);
}

.sidebar-tab.active {
  border-color: rgba(10, 75, 154, 0.35);
  background: linear-gradient(180deg, rgba(10, 75, 154, 0.18) 0%, rgba(10, 75, 154, 0.11) 100%);
  color: #133a71;
}

.portal-main {
  min-width: 0;
  padding: 18px;
}

.portal-shell {
  width: min(1280px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 14px;
}

.card {
  position: relative;
  border: 1px solid rgba(176, 192, 220, 0.72);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.97) 0%, rgba(249, 251, 255, 0.97) 100%);
  box-shadow: var(--shadow-sm);
  padding: 16px;
  overflow: hidden;
}

.card:hover {
  border-color: rgba(124, 154, 204, 0.74);
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.12);
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 100% 0%, rgba(10, 75, 154, 0.08), transparent 40%),
    radial-gradient(circle at 0% 100%, rgba(255, 200, 46, 0.13), transparent 35%);
  opacity: 0.72;
}

.card > * {
  position: relative;
  z-index: 1;
}

.card h2,
.card h3 {
  margin: 0;
  color: #102448;
  letter-spacing: -0.015em;
}

.card h2 {
  font-size: 1rem;
  font-weight: 700;
}

.card h3 {
  font-size: 0.92rem;
  font-weight: 700;
}

.hint {
  margin: 8px 0 12px;
  color: var(--text-muted);
  font-size: 0.83rem;
}

.portal-panel {
  display: none;
}

.portal-panel.active {
  display: block;
  animation: panelIn var(--transition-base);
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 11px;
}

.overview-item {
  border: 1px solid rgba(184, 198, 224, 0.72);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: var(--shadow-xs);
  padding: 12px;
}

.overview-item span {
  display: block;
  color: var(--text-muted);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-weight: 600;
}

.overview-item strong {
  display: block;
  margin-top: 8px;
  font-size: 1.12rem;
  color: #133f74;
  letter-spacing: -0.01em;
}

.stack {
  display: grid;
  gap: 10px;
}

.stack label {
  display: grid;
  gap: 5px;
  color: #32496f;
  font-size: 0.8rem;
  font-weight: 600;
}

.inline {
  display: inline-flex !important;
  align-items: center;
  gap: 9px;
  color: #223a5f;
}

.repeat-controls {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.repeat-days-field {
  display: inline-flex !important;
  align-items: center;
  gap: 7px;
  min-width: 145px;
}

.repeat-days-field.is-disabled {
  opacity: 0.58;
}

.repeat-days-field select:disabled {
  cursor: not-allowed;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.action-note {
  color: var(--text-muted);
  font-size: 0.73rem;
}


.submit-preview {
  border: 1px solid rgba(10, 75, 154, 0.26);
  border-radius: 12px;
  background: linear-gradient(180deg, #f7fbff 0%, #edf5ff 100%);
  padding: 11px;
  display: grid;
  gap: 4px;
}

.submit-preview span {
  color: #5c7090;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-weight: 700;
}

.submit-preview strong {
  color: #163f76;
  font-size: 0.86rem;
}

.submit-preview small,
.countdown {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: #1a4f99;
}

#credentialStatusText {
  display: block;
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 0.78rem;
}

.reservations-grid {
  display: grid;
  grid-template-columns: 1.08fr 1fr;
  gap: 14px;
}

.pane {
  border: 1px solid rgba(188, 203, 228, 0.75);
  border-radius: 13px;
  background: #fff;
  padding: 12px;
  min-width: 0;
  box-shadow: var(--shadow-xs);
  overflow: auto;
}

.pane h3 {
  margin: 0 0 10px;
}

table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
}

th,
td {
  padding: 9px;
  border-bottom: 1px solid #edf2fa;
  text-align: left;
  vertical-align: middle;
  font-size: 0.82rem;
}

th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: linear-gradient(180deg, #f6f9ff 0%, #edf3ff 100%);
  color: #47608a;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.045em;
  font-weight: 700;
}

tbody tr {
  transition: background-color var(--transition-fast);
}

tbody tr:nth-child(even) {
  background: rgba(242, 247, 255, 0.6);
}

tbody tr:hover {
  background: #f8fbff;
}

.status-cell {
  display: grid;
  gap: 4px;
}

.status-cell small {
  color: var(--text-muted);
  font-size: 0.73rem;
}

.job-label {
  display: grid;
  gap: 3px;
}

.job-label strong {
  color: #123f75;
  font-size: 0.82rem;
  letter-spacing: 0.01em;
}

.job-label small {
  color: var(--text-muted);
  font-size: 0.73rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid #c9d6eb;
  background: #f2f6fd;
  color: #2b4f85;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.045em;
}

.status-pill.status-submitted,
.status-pill.status-authenticated,
.status-pill.status-approved {
  border-color: rgba(6, 118, 71, 0.35);
  background: #edfcf4;
  color: #106e45;
}

.status-pill.status-failed,
.status-pill.status-blocked_reauth_required,
.status-pill.status-blocked_form_changed,
.status-pill.status-missed,
.status-pill.status-cancelled,
.status-pill.status-reauth_required {
  border-color: rgba(180, 35, 24, 0.3);
  background: #fff0ef;
  color: #9f2a22;
}

.status-pill.status-scheduled,
.status-pill.status-preparing,
.status-pill.status-ready,
.status-pill.status-submitting,
.status-pill.status-draft,
.status-pill.status-unknown,
.status-pill.status-paused {
  border-color: rgba(10, 75, 154, 0.32);
  background: #eaf2ff;
  color: #164581;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 120;
  max-width: min(360px, calc(100vw - 24px));
  border: 1px solid rgba(165, 184, 216, 0.62);
  border-radius: 12px;
  background: rgba(9, 25, 50, 0.94);
  color: #f1f6ff;
  padding: 11px 13px;
  box-shadow: var(--shadow-md);
  font-size: 0.82rem;
  animation: toastIn 220ms ease;
}

@keyframes panelIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 1180px) {
  .reservations-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 960px) {
  .portal-layout {
    grid-template-columns: 1fr;
  }

  .portal-sidebar {
    position: fixed;
    top: 64px;
    bottom: 0;
    left: 0;
    width: min(300px, 84vw);
    z-index: 30;
    border-right: 1px solid rgba(172, 190, 220, 0.9);
    box-shadow: var(--shadow-md);
    transform: translateX(-100%);
    opacity: 0;
    pointer-events: none;
  }

  body.sidebar-open .portal-sidebar {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
  }

  body.sidebar-open::after {
    content: "";
    position: fixed;
    inset: 64px 0 0 0;
    background: rgba(8, 20, 40, 0.38);
    backdrop-filter: blur(2px);
    z-index: 25;
  }

  .portal-main {
    padding: 14px;
  }

  .overview-grid {
    grid-template-columns: 1fr;
  }

  .topbar-logo {
    width: 38px;
    height: 38px;
  }

  .portal-topbar h1 {
    display: none;
  }
}

@media (max-width: 700px) {
  .portal-topbar {
    padding: 10px 12px;
  }

  .topbar-actions {
    gap: 6px;
  }

  .badge {
    max-width: 40vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .card {
    padding: 13px;
  }

  th,
  td {
    padding: 8px;
    font-size: 0.78rem;
  }

  .toast {
    right: 10px;
    left: 10px;
    max-width: none;
  }
}


/* --- ENTERPRISE RESPONSIVENESS & NOTAM STYLING --- */
/* Base responsive helpers */
@media (max-width: 768px) {
  body {
    -webkit-text-size-adjust: 100%;
  }
  
  .topbar, .portal-topbar {
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem;
    gap: 1rem;
  }
  
  .topbar .brand, .portal-topbar .brand {
    margin-bottom: 0.5rem;
  }

  header nav, .tabs {
    flex-wrap: wrap;
    width: 100%;
  }

  .tab, .btn {
    flex: 1 1 auto;
    text-align: center;
    justify-content: center;
  }

  /* Prevent overlapping in stats and cards */
  .stats-grid, .card-grid, .settings-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  /* Make forms stack cleanly */
  form label {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }
  
  form label.inline {
    flex-direction: row;
    align-items: center;
  }

  /* Tables must scroll */
  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    margin-bottom: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
  }
  
  table {
    min-width: 700px; /* Force table to maintain readability and scroll */
    border: none; /* Let the wrapper handle the border */
  }

  /* Fix modal overlaps */
  .modal-content, .panel, .card {
    padding: 1rem;
    width: 100%;
    box-sizing: border-box;
  }
}


/* --- NEW NOTAM BANNER RESPONSIVE CSS --- */
.notam-banner {
  background-color: #fff4e5;
  border-bottom: 1px solid #f5c070;
  color: #5c3b00;
  position: relative;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  font-family: var(--font-sans, "Inter", sans-serif);
}

.notam-content {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}

.warning-icon {
  margin-top: 2px;
}

.notam-content p {
  margin: 0;
  line-height: 1.5;
  font-size: 0.95rem;
  color: #5c3b00;
}

.notam-content strong {
  font-weight: 600;
  color: #4a2f00;
}

.notam-actions {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.notam-checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: #8c5a00;
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  font-weight: 500;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  transition: background-color 0.2s ease;
}

.notam-checkbox-label:hover {
  background-color: rgba(245, 192, 112, 0.2);
}

.notam-checkbox-label input[type="checkbox"] {
  margin: 0;
  cursor: pointer;
  width: 1.1rem;
  height: 1.1rem;
  accent-color: #ca7600; /* Styles native checkboxes elegantly in modern browsers */
}

.close-notam {
  background: transparent;
  border: none;
  font-size: 1.75rem;
  line-height: 1;
  color: #a36a00;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s ease;
  font-family: sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-notam:hover {
  background-color: rgba(245, 192, 112, 0.3);
  color: #5c3b00;
}

/* DESKTOP EXPLICIT */
@media (min-width: 769px) {
  .notam-banner {
    padding: 0.65rem 1.5rem 0.65rem 1.25rem;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
  
  .notam-content {
    align-items: center;
  }
  
  .warning-icon {
    margin-top: 0;
  }
  
  .notam-actions {
    gap: 0.75rem;
    margin-left: 2rem;
  }
  
  .close-notam {
    padding: 0.25rem 0.5rem;
    margin-left: 0.5rem;
  }
}

/* MOBILE EXPLICIT */
@media (max-width: 768px) {
  .notam-banner {
    padding: 1rem;
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }
  
  .notam-actions {
    justify-content: space-between; /* Spread checkbox and X to opposite ends */
    width: 100%;
    border-top: 1px solid rgba(245, 192, 112, 0.4);
    padding-top: 0.75rem;
  }
  
  .notam-checkbox-label {
    font-size: 0.95rem; /* Larger font for mobile readability */
    padding: 0.4rem 0; /* Align perfectly with left edge */
  }

  .notam-checkbox-label input[type="checkbox"] {
    width: 1.35rem; /* Fat finger friendly touch target */
    height: 1.35rem;
  }
  
  .close-notam {
    padding: 0.35rem 0.75rem;
    background-color: rgba(245, 192, 112, 0.15); /* More prominent as a button on mobile */
  }
}


  .close-notam {
    position: relative;
    z-index: 9999;
    pointer-events: auto;
    touch-action: manipulation;
  }

@media (max-width: 960px) {
  body:not(.sidebar-open) .portal-layout, .portal-layout {
    grid-template-columns: 1fr !important;
  }
}

.admin-login-logo, .friend-login-logo {
  filter: none;
}

.affiliation-note {
  display: block;
  width: min(900px, calc(100vw - 44px));
  margin: 8px auto 28px;
  color: var(--text-muted);
  font-size: 0.74rem;
  text-align: center;
}

.affiliation-note.compact {
  width: auto;
  margin: 12px auto 0;
  line-height: 1.35;
}


