/* CED responsive full-width shell - 2026-09-28
   Loaded after per-page CSS so legacy Bootstrap/container max-width rules do
   not force the application back into the old ~1100px desktop layout. */

html,
body.tundra {
    box-sizing: border-box;
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

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

body.tundra > header,
body.tundra > footer {
    width: 100% !important;
    max-width: none !important;
}

/* The shared base.html uses a top-level Bootstrap .container around all page
   content. Override only that top-level container so nested Bootstrap layouts
   can keep their normal behavior. */
body.tundra > .container {
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: clamp(14px, 1.6vw, 30px) !important;
    padding-right: clamp(14px, 1.6vw, 30px) !important;
}

body.tundra > .container > form,
body.tundra > .container > form > section {
    width: 100%;
    max-width: none;
    min-width: 0;
}

/* Newer consolidated pages had conservative desktop caps while they were
   being prototyped. Let them use the common full-width shell now. */
.ced-project-list-page,
.ced-admin-page,
.ced-approver-page,
.ced-user-page,
.batch-v2-page,
.query-v2-page {
    width: 100% !important;
    max-width: none !important;
}

/* "narrow" pages are intentionally form/detail oriented. Keep them readable,
   but allow substantially more room than the legacy site did. */
.ced-admin-page.narrow,
.ced-approver-page.narrow,
.ced-user-page.narrow {
    max-width: 1400px !important;
}

/* Header/navigation: remove the old negative-margin positioning hacks. */
#topbanner,
nav.navbar.ced-navbar,
#fullnavbar {
    width: 100%;
    max-width: none;
}

nav.navbar.ced-navbar {
    height: auto;
    min-height: 50px;
    padding-left: clamp(10px, 1.4vw, 24px);
    padding-right: clamp(10px, 1.4vw, 24px);
}

#cedNavbarCollapse {
    min-width: 0;
}

#oldnavbar,
#masternavbar {
    min-width: 0;
    width: auto;
    flex: 1 1 auto;
}

#loginbarmaster {
    margin-left: auto;
    margin-right: 0;
    flex: 0 0 auto;
}

#loginbarmaster .navbar-nav {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: nowrap;
}

#loginbarmaster .nav-link {
    white-space: nowrap;
}

#navcenter,
#navend1,
#navend2,
#navend3 {
    margin-left: 0 !important;
}

/* The legacy footer line was fixed at 1100px. */
#footline {
    width: 100% !important;
    max-width: none !important;
}

#footlinks {
    width: 100%;
    max-width: none;
    padding-left: clamp(10px, 1.6vw, 28px);
    padding-right: clamp(10px, 1.6vw, 28px);
}

/* Prevent large tables/maps from forcing the whole browser page wider than the
   viewport; individual table/map wrappers can scroll when needed. */
section,
.table-container,
.table-scroll,
.project-list-table-wrap,
.query-table-wrap {
    min-width: 0;
}

@media (max-width: 991.98px) {
    body.tundra > .container {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    #loginbarmaster {
        width: 100%;
        margin-left: 0;
    }

    #loginbarmaster .navbar-nav {
        flex-direction: column;
        align-items: stretch;
    }

    #loginbarmaster .nav-link {
        white-space: normal;
    }
}

@media (max-width: 575.98px) {
    body.tundra > .container {
        padding-left: 8px !important;
        padding-right: 8px !important;
    }
}

/* -------------------------------------------------------------------------
   Readability + compact navigation refinement - 2026-09-28b
   Keep the application shell wide, but do not make normal prose run across
   the entire monitor. Also keep page content clearly below the shared nav.
   ------------------------------------------------------------------------- */

:root {
    --ced-nav-min-height: 44px;
    --ced-reading-width: 1220px;
    --ced-notice-width: 1460px;
}

/* Give every page a small, consistent breathing space below the header/nav.
   This also protects legacy pages that used negative top margins. */
body.tundra > .container {
    padding-top: clamp(14px, 1.15vw, 22px) !important;
}

body.tundra > .container > section {
    position: relative;
    z-index: 0;
    min-width: 0;
}

/* Compact the shared dark navigation bar. Legacy CSS gave several pieces
   their own heights/padding, so normalize the navbar and its descendants. */
nav.navbar.ced-navbar,
#fullnavbar,
#oldnavbar,
#masternavbar,
#loginbarmaster,
nav.navbar.ced-navbar .navbar-nav,
nav.navbar.ced-navbar .navbar-nav > li {
    min-height: 0 !important;
    height: auto !important;
}

nav.navbar.ced-navbar {
    min-height: var(--ced-nav-min-height) !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

nav.navbar.ced-navbar .navbar-nav {
    align-items: center;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

nav.navbar.ced-navbar .navbar-nav > li {
    display: flex;
    align-items: stretch;
}

nav.navbar.ced-navbar .nav-link,
#loginbarmaster .nav-link {
    display: flex;
    align-items: center;
    min-height: var(--ced-nav-min-height);
    padding-top: 0.48rem !important;
    padding-bottom: 0.48rem !important;
    line-height: 1.15 !important;
}

/* Keep ordinary home/landing-page prose readable. Wide application pages
   below are explicitly exempted so tables, query grids, maps, and dashboards
   can continue to use the available screen width. */
body.tundra > .container > section > p,
body.tundra > .container > section > div:not(.ced-project-list-page):not(.ced-admin-page):not(.ced-approver-page):not(.ced-user-page):not(.batch-v2-page):not(.query-v2-page):not([class*="map" i]):not([id*="map" i]) > p {
    width: min(100%, var(--ced-reading-width));
    margin-left: auto;
    margin-right: auto;
}

/* Legacy landing-page blocks can still be wider than prose, just not nearly
   edge-to-edge on a large monitor. This is deliberately applied only to
   direct section children and excludes the known wide application shells. */
body.tundra > .container > section > div:not(.ced-project-list-page):not(.ced-admin-page):not(.ced-approver-page):not(.ced-user-page):not(.batch-v2-page):not(.query-v2-page):not(.table-container):not(.table-scroll):not(.project-list-table-wrap):not(.query-table-wrap):not([class*="map" i]):not([id*="map" i]) {
    width: min(100%, var(--ced-notice-width));
    margin-left: auto;
    margin-right: auto;
}

/* Explicit utility hooks for pages we modernize later. */
.ced-readable,
.ced-prose {
    width: min(100%, var(--ced-reading-width));
    margin-left: auto !important;
    margin-right: auto !important;
}

.ced-wide-notice {
    width: min(100%, var(--ced-notice-width));
    margin-left: auto !important;
    margin-right: auto !important;
}

@media (max-width: 991.98px) {
    body.tundra > .container {
        padding-top: 12px !important;
    }

    nav.navbar.ced-navbar .navbar-nav {
        align-items: stretch;
    }

    nav.navbar.ced-navbar .nav-link,
    #loginbarmaster .nav-link {
        min-height: 40px;
    }
}

@media (max-width: 575.98px) {
    body.tundra > .container {
        padding-top: 10px !important;
    }
}

/* -------------------------------------------------------------------------
   Compact shared footer - 2026-09-28c
   The legacy footer reserved substantially more vertical space than its
   content needs. Keep the legal links and version visible while reducing the
   footer band height.
   ------------------------------------------------------------------------- */
body.tundra > footer {
    min-height: 0 !important;
    height: auto !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

#footline {
    min-height: 0 !important;
    height: 1px !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

#footlinks {
    min-height: 32px !important;
    height: auto !important;
    padding-top: 5px !important;
    padding-bottom: 5px !important;
}

#footlinks ul,
#footlinks ol,
#footlinks p {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

#footlinks li,
#footlinks a,
#footlinks span,
#footlinks p,
#footlinks div {
    line-height: 1.15 !important;
}

@media (max-width: 575.98px) {
    #footlinks {
        min-height: 30px !important;
        padding-top: 4px !important;
        padding-bottom: 4px !important;
    }
}

/* -------------------------------------------------------------------------
   Footer hard reset + alignment - 2026-09-28e
   Some legacy footer descendants still carry fixed heights/floats from the
   original layout. Normalize the entire shared footer tree, not just the
   outer wrapper, so the gray band hugs its actual content.
   ------------------------------------------------------------------------- */
body.tundra > footer {
    position: static !important;
    inset: auto !important;
    min-height: 0 !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
}

body.tundra > footer > div,
body.tundra > footer #footlinks > div,
body.tundra > footer #footlinks > nav,
body.tundra > footer #footlinks > span,
body.tundra > footer #footlinks > p {
    min-height: 0 !important;
    height: auto !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    top: auto !important;
    bottom: auto !important;
}

#footline {
    display: block !important;
    width: 100% !important;
    min-height: 0 !important;
    height: 1px !important;
    margin: 0 !important;
    padding: 0 !important;
}

#footlinks {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    flex-wrap: wrap !important;
    gap: 0.25rem 0.65rem !important;
    width: 100% !important;
    min-height: 30px !important;
    height: auto !important;
    margin: 0 !important;
    padding: 4px clamp(12px, 1.6vw, 28px) !important;
    line-height: 1.1 !important;
}

#footlinks > * {
    position: static !important;
    float: none !important;
    min-height: 0 !important;
    height: auto !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

#footlinks > :last-child {
    margin-left: auto !important;
}

#footlinks ul,
#footlinks ol {
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 0 !important;
    list-style: none !important;
    min-height: 0 !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
}

#footlinks li {
    min-height: 0 !important;
    height: auto !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    line-height: 1.1 !important;
}

#footlinks a,
#footlinks span,
#footlinks p {
    line-height: 1.1 !important;
}

@media (max-width: 700px) {
    #footlinks {
        align-items: flex-start !important;
        min-height: 0 !important;
        padding-top: 5px !important;
        padding-bottom: 5px !important;
    }

    #footlinks > :last-child {
        margin-left: 0 !important;
        width: 100% !important;
    }
}

/* ==========================================================================
   CED direct layout fix - 2026-09-28f
   Shared fallback for center-page filter grids + definitive legacy footer reset.
   This intentionally lives in the shared shell stylesheet so it still works
   even if a stale app-specific stylesheet is encountered.
   ========================================================================== */

/* User/Admin/Approver filter panels: padded, aligned, two-column desktop grid. */
body.tundra .filter-box > form.filter-grid,
body.tundra .filter-box > form.filter-grid.records-filter {
    box-sizing: border-box !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    column-gap: 1.5rem !important;
    row-gap: 1rem !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 1.25rem 1.5rem 1.4rem !important;
    background: #fff !important;
}

body.tundra .filter-box[open] > summary {
    border-bottom: 1px solid #c8d1d8 !important;
}

body.tundra .filter-box > form.filter-grid > label,
body.tundra .filter-box > form.filter-grid.records-filter > label {
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    gap: .4rem !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: .7rem .75rem .75rem !important;
    border: 1px solid #e0e5e9 !important;
    border-radius: 4px !important;
    background: #fafbfc !important;
    font-weight: 700 !important;
}

body.tundra .filter-box > form.filter-grid > label > input,
body.tundra .filter-box > form.filter-grid > label > select,
body.tundra .filter-box > form.filter-grid.records-filter > label > input,
body.tundra .filter-box > form.filter-grid.records-filter > label > select {
    box-sizing: border-box !important;
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
}

body.tundra .filter-box > form.filter-grid > label > select[multiple],
body.tundra .filter-box > form.filter-grid.records-filter > label > select[multiple] {
    min-height: 112px !important;
}

body.tundra .filter-box > form.filter-grid > .filter-actions,
body.tundra .filter-box > form.filter-grid.records-filter > .filter-actions {
    grid-column: 1 / -1 !important;
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    gap: .6rem !important;
    width: 100% !important;
    margin: .15rem 0 0 !important;
    padding: 1rem 0 0 !important;
    border-top: 1px solid #dfe4e8 !important;
}

/* Remove oversized lower whitespace introduced by the old center-page margins. */
body.tundra .ced-user-page,
body.tundra .ced-admin-page,
body.tundra .ced-approver-page {
    margin-bottom: 1.25rem !important;
}

body.tundra .ced-user-page .pagination,
body.tundra .ced-admin-page .pagination,
body.tundra .ced-approver-page .pagination {
    margin-bottom: .5rem !important;
}

/* Definitive footer normalization. The legacy base.css sets footer li elements
   to position:relative; top:-10px; float:left. Reset those exact rules. */
body.tundra > footer,
body.tundra footer {
    box-sizing: border-box !important;
    position: static !important;
    inset: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    height: auto !important;
    margin: .75rem 0 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    background-color: #ecf0f1 !important;
}

body.tundra footer #footline {
    box-sizing: border-box !important;
    display: block !important;
    position: static !important;
    width: 100% !important;
    max-width: none !important;
    min-height: 2px !important;
    max-height: 2px !important;
    height: 2px !important;
    margin: 0 !important;
    padding: 0 !important;
    background-color: #2C3E50 !important;
}

body.tundra footer #footlinks {
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: wrap !important;
    gap: .35rem 1rem !important;
    width: 100% !important;
    min-height: 0 !important;
    height: auto !important;
    margin: 0 !important;
    padding: 5px clamp(14px, 1.6vw, 28px) !important;
    line-height: 1.15 !important;
}

body.tundra footer #footlinks ul {
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 0 !important;
    list-style: none !important;
    min-height: 0 !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.tundra footer #footlinks ul li {
    box-sizing: border-box !important;
    position: static !important;
    float: none !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    display: block !important;
    min-height: 0 !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 10px !important;
    border-right: 1px solid #2C3E50 !important;
    line-height: 1.15 !important;
    text-align: left !important;
}

body.tundra footer #footlinks ul li:first-child {
    padding-left: 0 !important;
}

body.tundra footer #footlinks ul li:last-child {
    border-right: 0 !important;
}

body.tundra footer #footlinks ul li a,
body.tundra footer #footlinks span {
    position: static !important;
    top: auto !important;
    float: none !important;
    display: inline-block !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.15 !important;
    vertical-align: middle !important;
}

body.tundra footer #footlinks > span {
    margin-left: auto !important;
    white-space: nowrap !important;
}

@media (max-width: 800px) {
    body.tundra .filter-box > form.filter-grid,
    body.tundra .filter-box > form.filter-grid.records-filter {
        grid-template-columns: minmax(0, 1fr) !important;
        padding: 1rem !important;
    }

    body.tundra .filter-box > form.filter-grid > .filter-actions,
    body.tundra .filter-box > form.filter-grid.records-filter > .filter-actions {
        grid-column: 1 !important;
    }
}

@media (max-width: 700px) {
    body.tundra footer #footlinks {
        align-items: flex-start !important;
        padding-top: 6px !important;
        padding-bottom: 6px !important;
    }

    body.tundra footer #footlinks > span {
        width: 100% !important;
        margin-left: 0 !important;
    }
}

/* -------------------------------------------------------------------------
   Balanced application widths - 2026-09-28j

   The V2 center pages can render either inside the legacy outer page form or
   directly under the shared .container.  Once the nested-form fix disabled
   that outer form on filter pages, the legacy global section { max-width:
   1100px } rule could cap those pages unexpectedly.  At the same time, the
   earlier full-width override made dashboard pages too wide on large screens.

   Give direct top-level sections the full shell, then center the actual V2
   application page inside a comfortable desktop maximum.  Wide/table-heavy
   pages get a little more room without running edge-to-edge.
   ------------------------------------------------------------------------- */
:root {
    --ced-app-max-width: 1500px;
    --ced-app-wide-max-width: 1640px;
}

/* Support pages whose templates intentionally suppress the legacy outer form. */
body.tundra > .container > section {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
}

/* Middle-ground desktop width for the modern Center pages. */
body.tundra .ced-admin-page,
body.tundra .ced-approver-page,
body.tundra .ced-user-page {
    box-sizing: border-box !important;
    width: min(100%, var(--ced-app-max-width)) !important;
    max-width: var(--ced-app-max-width) !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Record/table pages can use a little more horizontal room. */
body.tundra .ced-admin-page.wide,
body.tundra .ced-approver-page.wide,
body.tundra .ced-user-page.wide {
    width: min(100%, var(--ced-app-wide-max-width)) !important;
    max-width: var(--ced-app-wide-max-width) !important;
}

/* Preserve the intentionally narrower detail/form pages. */
body.tundra .ced-admin-page.narrow,
body.tundra .ced-approver-page.narrow,
body.tundra .ced-user-page.narrow {
    width: min(100%, 1200px) !important;
    max-width: 1200px !important;
}

/* global.css applies max-width:1100px to every <section>.  The Admin Center
   uses semantic nested <section class="admin-section"> blocks, so neutralize
   that legacy cap inside the modern page shell. */
body.tundra .ced-admin-page > section.admin-section,
body.tundra .ced-approver-page > section.admin-section,
body.tundra .ced-user-page > section.admin-section {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

@media (max-width: 991.98px) {
    body.tundra .ced-admin-page,
    body.tundra .ced-approver-page,
    body.tundra .ced-user-page,
    body.tundra .ced-admin-page.wide,
    body.tundra .ced-approver-page.wide,
    body.tundra .ced-user-page.wide,
    body.tundra .ced-admin-page.narrow,
    body.tundra .ced-approver-page.narrow,
    body.tundra .ced-user-page.narrow {
        width: 100% !important;
        max-width: none !important;
    }
}

/* -------------------------------------------------------------------------
   Persistent shared chrome + centered modern forms - 2026-09-29g
   Keep the CED header visible while scrolling and pin the compact legal/version
   footer to the bottom edge on desktop.  Body padding prevents the fixed footer
   from covering page content.  Small screens fall back to a normal footer so
   wrapped legal links never obscure content.
   ------------------------------------------------------------------------- */
html,
body.tundra {
    min-height: 100%;
}

body.tundra {
    min-height: 100vh;
    padding-bottom: 42px !important;
}

body.tundra > header {
    position: sticky !important;
    top: 0 !important;
    z-index: 5000 !important;
    background: #fff !important;
    box-shadow: 0 1px 3px rgba(23, 50, 77, .16);
}

body.tundra > footer,
body.tundra footer {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 4800 !important;
    width: 100% !important;
    margin: 0 !important;
    box-shadow: 0 -1px 3px rgba(23, 50, 77, .12);
}

/* The create-effort pages share this hook across Sage, GUSG, CUTR and
   Grasslands.  Center it even when a module-specific stylesheet is stale. */
body.tundra .new-effort-page {
    box-sizing: border-box !important;
    width: min(100%, 1380px) !important;
    max-width: 1380px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Keep the consolidated record workspace centered when opened from a module
   user page, while retaining enough width for the table. */
body.tundra .ced-user-page.wide,
body.tundra .ced-project-list-page {
    margin-left: auto !important;
    margin-right: auto !important;
}

@media (max-width: 700px) {
    body.tundra {
        padding-bottom: 0 !important;
    }

    body.tundra > footer,
    body.tundra footer {
        position: static !important;
        box-shadow: none;
    }
}


/* ==========================================================================
   Conservation-effort edit workflow shell - 2026-09-29o

   The four module edit pages own their POST form. They suppress the legacy
   outer form from base.html so the HTML contains one valid form and Save and
   Exit submits reliably. Keep every workflow step in one centered column and
   neutralize the old global section max-width/float rules inside this shell.
   ========================================================================== */
body.tundra .ced-edit-workflow {
    box-sizing: border-box !important;
    width: min(100%, 1500px) !important;
    max-width: 1500px !important;
    min-width: 0 !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

body.tundra .ced-edit-workflow #editplan_Form,
body.tundra .ced-edit-workflow #editmain,
body.tundra .ced-edit-workflow #dismaps,
body.tundra .ced-edit-workflow #Locationinfo,
body.tundra .ced-edit-workflow #activityinfo,
body.tundra .ced-edit-workflow #implementation,
body.tundra .ced-edit-workflow #errorcheckdiv,
body.tundra .ced-edit-workflow #ReviewDir,
body.tundra .ced-edit-workflow #Reviewfield,
body.tundra .ced-edit-workflow .step2-layout,
body.tundra .ced-edit-workflow .step3-layout,
body.tundra .ced-edit-workflow .step4-layout,
body.tundra .ced-edit-workflow .workflow-instructions {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    float: none !important;
    clear: both !important;
}

/* global.css caps all semantic sections at 1100px. That is useful on old
   content pages, but it made the refreshed edit workflow look like several
   unrelated columns. Inside the edit shell, sections follow the shell width. */
body.tundra .ced-edit-workflow section,
body.tundra .ced-edit-workflow .workflow-section,
body.tundra .ced-edit-workflow .step3-section {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    float: none !important;
    clear: both !important;
}

body.tundra .ced-edit-workflow #TN {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

body.tundra .ced-edit-workflow .button-row.flex-right {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    float: none !important;
    clear: both !important;
    align-self: stretch !important;
    justify-content: flex-end !important;
}

@media (max-width: 991.98px) {
    body.tundra .ced-edit-workflow {
        width: 100% !important;
        max-width: none !important;
    }
}


/* ==========================================================================
   Conservation-effort save confirmation - 2026-09-29p
   Keep the post-save page aligned with the centered module workspace.
   ========================================================================== */
body.tundra .ced-save-success {
    box-sizing: border-box !important;
    width: min(calc(100% - 2rem), 900px) !important;
    max-width: 900px !important;
    margin: 3rem auto 5rem auto !important;
    padding: 2rem 2.25rem !important;
    border: 1px solid #d5dde5;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(44, 62, 80, 0.08);
    text-align: center;
}

body.tundra .ced-save-success h3 {
    margin: 0 0 1rem 0;
    color: #2c3e50;
}

body.tundra .ced-save-success h4 {
    margin: 0.65rem 0;
    font-size: 1rem;
    font-weight: 600;
}

body.tundra .ced-save-success p {
    margin: 0.75rem auto 1.25rem auto;
    max-width: 720px;
}

@media (max-width: 767.98px) {
    body.tundra .ced-save-success {
        width: calc(100% - 1rem) !important;
        margin-top: 1.5rem !important;
        padding: 1.25rem !important;
    }
}


/* ==========================================================================
   Conservation-effort workflow refinements - 2026-09-30q
   Shared by Sagebrush, GUSG, CUTR and Grasslands.
   ========================================================================== */

/* Keep lower step navigation independent of collapsible content and centered. */
body.tundra .ced-edit-workflow #step2-button-row,
body.tundra .ced-edit-workflow #step3-button-row,
body.tundra .ced-edit-workflow #step4-button-row {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.55rem !important;
    width: 100% !important;
    margin: 1.1rem 0 0.35rem !important;
    padding: 0 !important;
    float: none !important;
    clear: both !important;
}

/* Spatial Boundaries should read as a single, padded workspace rather than a
   collection of legacy floats.  Keep the edit button above the map, then the
   explanatory note and reporting-unit information below it. */
body.tundra .ced-edit-workflow .step2-spatial-section,
body.tundra .ced-edit-workflow #step2-spatial-section {
    box-sizing: border-box !important;
    width: 100% !important;
    padding: 1.25rem !important;
    overflow: hidden !important;
}

body.tundra .ced-edit-workflow .step2-spatial-section > .workflow-section-header,
body.tundra .ced-edit-workflow #step2-spatial-section > .workflow-section-header {
    margin: -1.25rem -1.25rem 1.15rem -1.25rem !important;
}

body.tundra .ced-edit-workflow .step2-spatial-section > input[type="submit"],
body.tundra .ced-edit-workflow #step2-spatial-section > input[type="submit"] {
    position: static !important;
    display: block !important;
    float: none !important;
    width: auto !important;
    max-width: 100% !important;
    margin: 0 0 0.9rem auto !important;
}

body.tundra .ced-edit-workflow .step2-spatial-section #mapDivPrj,
body.tundra .ced-edit-workflow #step2-spatial-section #mapDivPrj {
    position: relative !important;
    float: none !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    height: 420px !important;
    margin: 0 0 1rem 0 !important;
    border: 1px solid #d2dae2;
    border-radius: 4px;
    overflow: hidden;
}

body.tundra .ced-edit-workflow .step2-spatial-section #prvtlandnote,
body.tundra .ced-edit-workflow #step2-spatial-section #prvtlandnote {
    position: static !important;
    float: none !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 0 1rem 0 !important;
    padding: 0.8rem 0.95rem !important;
    border: 1px solid #d8e0e7;
    border-radius: 4px;
    background: #f7f9fa;
    line-height: 1.45;
}

body.tundra .ced-edit-workflow .step2-spatial-section #sruinfo,
body.tundra .ced-edit-workflow .step2-spatial-section #pruinfo,
body.tundra .ced-edit-workflow .step2-spatial-section #SRUflds,
body.tundra .ced-edit-workflow #step2-spatial-section #sruinfo,
body.tundra .ced-edit-workflow #step2-spatial-section #pruinfo,
body.tundra .ced-edit-workflow #step2-spatial-section #SRUflds {
    position: static !important;
    float: none !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: none !important;
    margin: 1rem 0 0 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

body.tundra .ced-edit-workflow .step2-spatial-section #srunote,
body.tundra .ced-edit-workflow .step2-spatial-section #prunote,
body.tundra .ced-edit-workflow #step2-spatial-section #srunote,
body.tundra .ced-edit-workflow #step2-spatial-section #prunote {
    margin: 0.45rem 0 0.9rem 0 !important;
    line-height: 1.45;
}

/* The record-information box is metadata, not a legacy float layout. */
body.tundra .ced-edit-workflow .step3-record-section #contactdiv,
body.tundra .ced-edit-workflow .step3-record-section .actdivcontact {
    float: none !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

@media (max-width: 767.98px) {
    body.tundra .ced-edit-workflow .step2-spatial-section,
    body.tundra .ced-edit-workflow #step2-spatial-section {
        padding: 1rem !important;
    }

    body.tundra .ced-edit-workflow .step2-spatial-section > .workflow-section-header,
    body.tundra .ced-edit-workflow #step2-spatial-section > .workflow-section-header {
        margin: -1rem -1rem 0.9rem -1rem !important;
    }

    body.tundra .ced-edit-workflow .step2-spatial-section #mapDivPrj,
    body.tundra .ced-edit-workflow #step2-spatial-section #mapDivPrj {
        height: 320px !important;
    }
}

/* Avoid repeating the legacy BIL heading inside the new FWS BIL section. */
body.tundra .ced-edit-workflow .step3-bil-section #bilheader {
    display: none !important;
}

/* Legacy Step 4 markup uses pt1fields as an ID rather than a class in several
   modules. Normalize it once it is inside the modern status box. */
body.tundra .ced-edit-workflow .step4-status-section #pt1fields,
body.tundra .ced-edit-workflow .step4-implementation-effectiveness-section #pt1fields {
    float: none !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* ==========================================================================
   Spatial section collapsed-state correction - 2026-09-30r
   The shared spatial layout makes the edit button display:block for expanded
   sections. Re-assert the collapsed-section rule so the button collapses with
   the rest of Spatial Boundaries instead of making the section look empty.
   ========================================================================== */
body.tundra .ced-edit-workflow .step2-spatial-section.collapsible-section.is-collapsed > input[type="submit"],
body.tundra .ced-edit-workflow #step2-spatial-section.collapsible-section.is-collapsed > input[type="submit"] {
    display: none !important;
}


/* ==========================================================================
   Collapsed Spatial Boundaries spacing correction - 2026-09-30s
   Remove the expanded-state body padding when the section is collapsed so the
   closed card is only the header row, matching the other workflow sections.
   ========================================================================== */
body.tundra .ced-edit-workflow .step2-spatial-section.collapsible-section.is-collapsed,
body.tundra .ced-edit-workflow #step2-spatial-section.collapsible-section.is-collapsed {
    padding: 0 !important;
    min-height: 0 !important;
}

body.tundra .ced-edit-workflow .step2-spatial-section.collapsible-section.is-collapsed > .workflow-section-header,
body.tundra .ced-edit-workflow #step2-spatial-section.collapsible-section.is-collapsed > .workflow-section-header {
    margin: 0 !important;
}


/* ==========================================================================
   CED Center pages: cards and headings - 2026-10-18a

   global.css caps every <section> at 1100px and centers h1-h5 (h3 = 23px).
   The user center cards are <section class="user-section">, so they were
   narrower than the page shell and misaligned with the page heading, and h3
   headings rendered larger than h2.  Neutralize those legacy rules inside
   the modern Center page shells only.
   ========================================================================== */
body.tundra .ced-user-page section.user-section,
body.tundra .ced-admin-page section.admin-section,
body.tundra .ced-approver-page section.admin-section {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

body.tundra .ced-user-page h1,
body.tundra .ced-user-page h2,
body.tundra .ced-user-page h3,
body.tundra .ced-admin-page h1,
body.tundra .ced-admin-page h2,
body.tundra .ced-admin-page h3,
body.tundra .ced-approver-page h1,
body.tundra .ced-approver-page h2,
body.tundra .ced-approver-page h3 {
    text-align: left;
}

body.tundra .ced-user-page h1,
body.tundra .ced-admin-page h1,
body.tundra .ced-approver-page h1 {
    margin-top: .4rem;
}

body.tundra .ced-user-page h3,
body.tundra .ced-admin-page h3,
body.tundra .ced-approver-page h3 {
    font-size: 1.15rem;
}

/* Keep long values (emails, usernames) inside their cards. */
body.tundra .ced-user-page .summary-grid > div,
body.tundra .ced-user-page .stat-grid > a,
body.tundra .ced-admin-page .stat-grid > div,
body.tundra .ced-approver-page .stat-grid > div,
body.tundra .ced-user-page .module-stat,
body.tundra .ced-admin-page .module-stat,
body.tundra .ced-approver-page .module-stat {
    min-width: 0;
    overflow-wrap: anywhere;
}
