html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.field-validation-error {
    font-size: smaller;
    margin-left: 1em;
}

.form-control.grouped {
    height: auto;
    border-top-left-radius: .25em!important;
    border-bottom-left-radius: .25em!important;
}

@media (min-width: 992px) {
    /* Legacy float, kept for pages that still render the nav inline (not via
       the LeftNav section). New/converted pages use the .app-shell column. */
    .side-context {
        float: left;
        margin-right: 1.5rem;
    }
}

/* ── Two-column app shell (nav column + content column) ──────
   Pages opt in by defining the "LeftNav" Razor section; the layout then
   renders that section as its own column so page content can never wrap
   around or beneath the navigation. */
.app-shell {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    align-items: stretch;
}
.app-shell-main { min-width: 0; }   /* let wide content shrink, not overflow */

@media (min-width: 992px) {
    .app-shell { flex-direction: row; align-items: flex-start; }
    .app-shell-nav {
        flex: 0 0 auto;
        align-self: flex-start;
        position: sticky;
        top: 1rem;
    }
    .app-shell-main { flex: 1 1 auto; }
    /* Inside the shell the nav is a real column, not a float. */
    .app-shell-nav .side-context { float: none; margin: 0; width: 240px; }
}

/* ── Navbar brand always on white ───────────────────────── */
.navbar {
    padding-top: 0;
    padding-bottom: 0;
    padding-left: 0;
}

.navbar > .container-fluid {
    padding-left: 0;
}

.navbar .navbar-brand {
    background-color: #fff;
    padding: 0 0.6rem;
    margin: 0 1rem 0 0;
    align-self: stretch;
    display: flex;
    align-items: center;
    border-radius: 0;
    width: fit-content;
    flex-shrink: 0;
}

/* ── Context Bar ─────────────────────────────────────────── */
.context-bar {
    font-size: 0.8rem;
    padding: 0.2rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    color: #fff;
}

.context-bar-sysadmin {
    background-color: #6f1010; /* deep red — distinct from the danger navbar */
}

.context-bar-orgadmin {
    background-color: #0a3d7a; /* deep blue — distinct from primary navbar */
}

.context-bar-unitadmin {
    background-color: #135e30; /* deep green — distinct from success navbar */
}

.context-bar-member {
    background-color: #495057; /* neutral dark */
}

.context-bar-role {
    font-size: 0.8rem;
    letter-spacing: 0.03em;
}

.context-bar-org {
    font-size: 0.8rem;
}

.context-bar-separator {
    opacity: 0.4;
    margin: 0 0.25rem;
}

/* ── Active Organization Banner ─────────────────────────── */
.active-org-banner {
    background-color: #1a3a5c;
    color: #e8f0fe;
    font-size: 0.85rem;
    border-bottom: 2px solid #3b6ea5;
}

.active-org-banner a.btn-outline-light {
    border-color: rgba(255,255,255,0.4);
    color: rgba(255,255,255,0.9);
    font-size: 0.75rem;
}

.active-org-banner a.btn-outline-light:hover {
    background-color: rgba(255,255,255,0.15);
}
