:root {
    /* --- Core background blues / space tones (darker, more navy) --- */
    --color-bg-main:    #020619; /* deepest space blue */
    --color-bg-alt:     #030a24; /* hero band / top strip */
    --color-bg-panel:   #0f1633; /* cards, panels */
    --color-bg-panel2:  #141c3f; /* secondary panel */

    /* --- Brand blues --- */
    --color-blue-primary:   #27407e;
    --color-blue-deep:      #1b275e;
    --color-blue-bright:    #3b61b1;

    /* --- Danger / red accent (for destructive actions) --- */
    --color-red-soft:  #f4b3c0;
    --color-red-mid:   #d76877;
    --color-red-deep:  #8a2235;

    /* --- Gold accent (for icons/text etc.) --- */
    --color-gold-soft:  #ebd1a1;
    --color-gold-mid:   #a78c69;
    --color-gold-deep:  #644e35;

    /* --- Light text & neutrals --- */
    --color-text-main:      #e7e6e8;
    --color-text-muted:     #9f9ea5;
    --color-text-soft:      #d1cfcb;
    --color-text-subtle:    #7a7383;

    /* --- Surfaces / borders --- */
    --color-bg-secondary: rgba(15, 22, 51, 0.6);
    --color-border:       rgba(255, 255, 255, 0.1);
    --color-bg-elevated:  var(--color-bg-panel2);

    /* Aliases consumed across the admin and deal-intake stylesheets. They used
       to be declared only inside page-level `:root` blocks that leaked
       app-wide; they live here now that those blocks are page-scoped. */
    --color-text-primary: var(--color-text-main);
    --color-danger:       #ef4444;

    /* --- Shell geometry ---
       Single source of truth for content width. Every layout's width container
       resolves from these, so admin and the role shells cannot drift apart. */
    --app-content-max: 1400px;
    --app-gutter:      6vw;

    /* --- Utility --- */
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 999px;
    --shadow-soft: 0 12px 30px rgba(0,0,0,0.55);
    --transition-fast: 0.18s ease-out;
}

/* Global layout / typography ------------------------------------------- */

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

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at bottom center, var(--color-blue-primary) 0, var(--color-bg-main) 55%)
        fixed;
    color: var(--color-text-main);
}

.app-shell {
    min-height: 100vh;
    background: radial-gradient(circle at top, #020922 0, #000000 70%);
    display: flex;
    flex-direction: column;
}

.main {
    padding: 3rem 6vw 4rem;
    max-width: 1100px;
    margin: 0 auto;
}

h1, h2, h3, .headline {
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-weight: 400;
}

h1 {
    font-size: 1.9rem;
}

h2 {
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
}

p {
    line-height: 1.6;
}

.muted {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

/* Hero ------------------------------------------------------------------ */

.hero {
    padding: 3.5rem 6vw 3rem;
    border-bottom: 1px solid rgba(235,209,161,0.18);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.hero-title {
    font-size: 2.3rem;
    letter-spacing: 0.28em;
}

.hero-sub {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.8rem;
    color: var(--color-text-soft);
}

.hero-tagline {
    max-width: 480px;
    color: var(--color-text-soft);
}

/* Cards / panels -------------------------------------------------------- */

.card {
    background: radial-gradient(circle at top, rgba(59,97,177,0.25), transparent 55%),
                var(--color-bg-panel);
    border-radius: 18px;
    padding: 1.75rem 2rem;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(255,255,255,0.06);
    margin-bottom: 1.75rem;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: 1rem;
}

.badge {
    padding: 0.2rem 0.7rem;
    border-radius: 999px;
    border: 1px solid rgba(235,209,161,0.5);
    font-size: 0.7rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--color-gold-soft);
}

/* Buttons --------------------------------------------------------------- */

.btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.1rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 1.6rem;
    border-radius: var(--radius-lg);
    border: 1px solid transparent;
    font-size: 0.9rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 500;
    cursor: pointer;
    transition:
        background-color var(--transition-fast),
        color var(--transition-fast),
        box-shadow var(--transition-fast),
        border-color var(--transition-fast),
        transform var(--transition-fast);
}

/* Button color variants normally sit on the base .btn (which supplies border-style + radius). Make them
   self-sufficient so a button written with only a variant class (e.g. class="btn-secondary") still renders a
   real border instead of looking like plain text — a regression that hit pages using the bare variant. */
.btn-primary,
.btn-secondary,
.btn-ghost,
.btn-danger {
    border-style: solid;
    border-radius: var(--radius-lg);
}

/* Primary: deep blue button, neutral border */
.btn-primary {
    background: radial-gradient(circle at top, var(--color-blue-bright), var(--color-blue-deep));
    color: var(--color-text-main);
    border-color: rgba(255,255,255,0.08);
    box-shadow: 0 10px 24px rgba(0,0,0,0.55);
    width: 125px;
    height: 36px;
    padding: 0 !important;
    margin: 0 !important;
    border-width: 1px !important;
    box-sizing: border-box !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    vertical-align: middle !important;
}

.btn-primary:hover {
    background: radial-gradient(circle at top, var(--color-blue-bright), #141c3f);
    border-color: rgba(255,255,255,0.18);
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(0,0,0,0.7);
}

/* Secondary: a solid blue a shade darker than primary, with a clearly visible border so it always reads
   as a button (not plain text) against dark panels. */
.btn-secondary {
    background: #16224d;
    color: var(--color-text-main);
    border-color: rgba(120,150,225,0.55);
    width: 125px;
    height: 36px;
    padding: 0 !important;
    margin: 0 !important;
    border-width: 1px !important;
    box-sizing: border-box !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    vertical-align: middle !important;
}

.btn-secondary:hover {
    background: #1d2c60;
    border-color: rgba(150,180,240,0.75);
    transform: translateY(-1px);
}

/* Ghost: transparent with subtle white border */
.btn-ghost {
    background: transparent;
    color: var(--color-text-soft);
    border-color: rgba(255,255,255,0.25);
}

.btn-ghost:hover {
    background: rgba(10,18,48,0.9);
    color: var(--color-text-main);
    border-color: rgba(255,255,255,0.4);
}

/* Danger: red gradient for destructive actions */
.btn-danger {
    background: radial-gradient(circle at top, var(--color-red-soft), var(--color-red-deep));
    color: #ffffff;
    border-color: rgba(255,255,255,0.18);
    box-shadow: 0 10px 24px rgba(0,0,0,0.6);
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    vertical-align: middle !important;
}

.btn-danger:hover {
    background: radial-gradient(circle at top, var(--color-red-mid), #691624);
    border-color: rgba(255,255,255,0.35);
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(0,0,0,0.8);
}

/* Color chart ----------------------------------------------------------- */

.color-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.color-swatch {
    border-radius: 14px;
    padding: 0.9rem 1rem;
    border: 1px solid rgba(255,255,255,0.06);
    background: #050816;
}

.color-chip {
    height: 40px;
    border-radius: 10px;
    margin-bottom: 0.45rem;
}

.color-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--color-text-soft);
}

.color-value {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

/* Utility --------------------------------------------------------------- */

.list-checks {
    list-style: none;
    padding: 0;
    margin: 0.25rem 0 0;
}

.list-checks li {
    margin-bottom: 0.4rem;
    font-size: 0.92rem;
}

.list-checks li::before {
    content: "✔";
    color: var(--color-gold-soft);
    margin-right: 0.4rem;
    font-size: 0.75rem;
}

/* Extended Styles for Next Edge UI Preview ----------------------------- */

@font-face {
    font-family: 'Bodoni72';
    src: url('../assets/Bodoni\ 72.ttc') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* Additional Color Variables */
:root {
    --color-success: #4ade80;
    --color-warning: #fbbf24;
    --color-info: #60a5fa;
}

/* Layout Extensions ----------------------------------------------------- */

.main-wide {
    padding: 1rem var(--app-gutter) 4rem;
    max-width: var(--app-content-max);
    margin: 0 auto;
    width: 100%;
}

/* 32 pages nest .main-wide inside the layout's own — 7 directly, 25 via the
   six *Shared components. That applies max-width and the 6vw gutter twice,
   pinching content well below the intended width. Neutralize the inner one.
   Correcting the markup (the nested <main> is also an a11y defect) is tracked
   separately.

   .nea-content-inner is listed too: Admin/Profile and Admin/Security put a
   .main-wide directly inside AdminLayout's content box with no outer
   .main-wide, so the descendant selector alone would miss them.

   !important is required, not stylistic: Collaborate/Terms.razor and the
   inline <style> blocks in EntrepreneurLayout/OriginatorLayout re-declare
   .main-wide padding with !important, and being unscoped they match the inner
   element as well as the outer one. */
.main-wide .main-wide,
.nea-content-inner .main-wide {
    max-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
}

h3 {
    font-size: 0.95rem;
    margin-bottom: 0.6rem;
}

.bodoni {
    font-family: 'Bodoni72', serif;
}

/* Header / Navigation --------------------------------------------------- */

.header {
    /* Full-bleed background, but the inner content lines up with the .main-wide
       column instead of running to the viewport edge — otherwise nav items and
       page content visibly disagree on wide monitors. Falls back to the plain
       gutter once the viewport is narrower than the content max.
       The trailing + gutter matters: .main-wide is border-box, so its own 6vw
       padding sits *inside* the 1400px cap. Without it the header lands one
       full gutter (~115px at 1920) outboard of the content. */
    padding: 1.5rem max(var(--app-gutter), calc((100% - var(--app-content-max)) / 2 + var(--app-gutter)));
    border-bottom: 1px solid rgba(235,209,161,0.12);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(2,6,25,0.8);
    backdrop-filter: blur(10px);
    position: relative;
    /* Must sit above in-page sticky bars (e.g. the Diligence "Nova command bar" at z-index 100)
       so the header's user/notification/role dropdowns overlay page content instead of hiding behind it. */
    z-index: 300;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-logo img {
    height: 40px;
}

.header-logo-text {
    font-family: 'Bodoni72', serif;
    font-size: 1.2rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-text-main);
}

.header-nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.header-nav a {
    color: var(--color-text-soft);
    text-decoration: none;
    font-size: 0.85rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    transition: color var(--transition-fast);
}

.header-nav a:hover {
    color: var(--color-gold-soft);
}

.header-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: radial-gradient(circle at top, var(--color-blue-bright), var(--color-blue-deep));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 600;
}

.header-user-name {
    font-size: 0.85rem;
    color: var(--color-text-soft);
}

/* Hero Extensions ------------------------------------------------------- */

.hero-full {
    min-height: 100vh;
    background-image: url('../assets/images/hero.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 4rem 6vw;
    position: relative;
}

.hero-full::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(2,6,25,0.3) 0%, rgba(0,0,0,0.7) 100%);
}

.hero-full-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
}

.hero-title-large {
    font-family: 'Bodoni72', serif;
    font-size: 4rem;
    letter-spacing: 0.28em;
    margin-bottom: 1rem;
    text-shadow: 0 4px 20px rgba(0,0,0,0.8);
}

.hero-tagline-large {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 2.5rem;
    color: var(--color-text-soft);
    line-height: 1.8;
}

/* Card Extensions ------------------------------------------------------- */

.card-compact {
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.75rem;
}

.card-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 1.75rem;
}

.card-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    margin-bottom: 1.75rem;
}

.badge-status {
    padding: 0.3rem 0.8rem;
    border-radius: 999px;
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 500;
}

.badge-status.draft { background: rgba(159,158,165,0.2); color: var(--color-text-muted); border: 1px solid rgba(159,158,165,0.3); }
.badge-status.submitted { background: rgba(96,165,250,0.2); color: var(--color-info); border: 1px solid rgba(96,165,250,0.3); }
.badge-status.qualified { background: rgba(74,222,128,0.2); color: var(--color-success); border: 1px solid rgba(74,222,128,0.3); }
.badge-status.pending { background: rgba(251,191,36,0.2); color: var(--color-warning); border: 1px solid rgba(251,191,36,0.3); }
.badge-status.active { background: rgba(74,222,128,0.2); color: var(--color-success); border: 1px solid rgba(74,222,128,0.3); }
.badge-status.phase2 { background: rgba(235,209,161,0.15); color: var(--color-gold-soft); border: 1px solid rgba(235,209,161,0.4); }

/* Shared "Nova AI Powered" section badge — Nova purple family. Standalone (not a
   .badge-status modifier) so it stays compact: no uppercase tracking, tight padding. */
.badge-nova {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    align-self: center;
    padding: 0.16rem 0.55rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: 0.02em;
    white-space: nowrap;
    background: rgba(139,92,246,0.16);
    border: 1px solid rgba(139,92,246,0.45);
    color: #c4b5fd;
}

/* Button Extensions ----------------------------------------------------- */

.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1rem;
}

.btn-text {
    color: white;
}

.btn {
    text-decoration: none;
}

/* Forms ----------------------------------------------------------------- */

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-text-soft);
    margin-bottom: 0.5rem;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(15,22,51,0.6);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: var(--radius-md);
    color: var(--color-text-main);
    font-size: 0.95rem;
    transition: border-color var(--transition-fast), background var(--transition-fast);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--color-blue-bright);
    background-color: rgba(15,22,51,0.9);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

.form-help {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-top: 0.4rem;
}

/* Tables ---------------------------------------------------------------- */

.table-container {
    overflow-x: auto;
    margin: 1.5rem 0;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    border-bottom: 1px solid rgba(235,209,161,0.2);
}

th {
    text-align: left;
    padding: 0.75rem 1rem;
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-gold-soft);
    font-weight: 500;
}

td {
    padding: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    color: var(--color-text-soft);
}

tr:hover {
    background: rgba(59,97,177,0.1);
}

/* Utility Extensions ---------------------------------------------------- */

.list-bullets {
    padding-left: 1.5rem;
    margin: 0.5rem 0;
}

.list-bullets li {
    margin-bottom: 0.5rem;
    color: var(--color-text-soft);
    line-height: 1.6;
}

.divider {
    height: 1px;
    background: rgba(235,209,161,0.15);
    margin: 2rem 0;
}

.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

/* Role Cards ------------------------------------------------------------ */

.role-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.role-card {
    background: radial-gradient(circle at top, rgba(59,97,177,0.3), transparent 60%),
                var(--color-bg-panel);
    border-radius: 20px;
    padding: 2.5rem 2rem;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(255,255,255,0.08);
    text-align: center;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
    cursor: pointer;
}

.role-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(0,0,0,0.7);
    border-color: rgba(235,209,161,0.3);
}

.role-card-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.role-card-title {
    font-size: 1.3rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 1rem;
    color: var(--color-text-main);
}

.role-card-description {
    color: var(--color-text-soft);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

/* Modal ----------------------------------------------------------------- */

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(8px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: radial-gradient(circle at top, rgba(59,97,177,0.25), transparent 55%),
                var(--color-bg-panel);
    border-radius: 20px;
    padding: 2.5rem;
    max-width: 600px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.9);
    border: 1px solid rgba(255,255,255,0.1);
    position: relative;
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: transparent;
    border: none;
    color: var(--color-text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color var(--transition-fast);
}

.modal-close:hover {
    color: var(--color-text-main);
}

.modal-title {
    font-size: 1.5rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

/* Themed content card for .modal-content-style modals (e.g. "Continue Your Draft?").
   Mirrors .modal so these read as a proper bordered, panel-backed dialog. */
.modal-content {
    background: radial-gradient(circle at top, rgba(59,97,177,0.25), transparent 55%),
                var(--color-bg-panel);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 18px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.9);
    width: 90%;
    max-width: 480px;
    overflow: hidden;
}

.modal-content .modal-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.75rem 1.5rem 0.25rem;
    text-align: center;
}

.modal-content .modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-text-main, #e5e7eb);
}

.modal-content .modal-icon {
    font-size: 2rem;
    line-height: 1;
}

.modal-content .modal-body {
    padding: 0.5rem 1.5rem 1rem;
}

.modal-content .modal-footer {
    padding: 1.25rem 1.5rem 1.75rem;
    border-top: 1px solid rgba(255,255,255,0.07);
}

/* Collapsible ----------------------------------------------------------- */

.collapsible-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    transition: border-color var(--transition-fast);
}

.collapsible-header:hover {
    border-color: rgba(235,209,161,0.3);
}

.collapsible-icon {
    transition: transform var(--transition-fast);
}

.collapsible-header.active .collapsible-icon {
    transform: rotate(180deg);
}

.collapsible-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.collapsible-content.active {
    max-height: 2000px;
    transition: max-height 0.5s ease-in;
}

/* Progress Steps -------------------------------------------------------- */

.progress-steps {
    display: flex;
    justify-content: space-between;
    margin: 2rem 0;
    position: relative;
}

.progress-steps::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 2px;
    background: rgba(255,255,255,0.1);
    z-index: 0;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
    flex: 1;
}

.progress-step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--color-bg-panel2);
    border: 2px solid rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.progress-step.active .progress-step-circle {
    background: radial-gradient(circle at top, var(--color-blue-bright), var(--color-blue-deep));
    border-color: var(--color-gold-soft);
}

.progress-step.completed .progress-step-circle {
    background: var(--color-success);
    border-color: var(--color-success);
}

.progress-step-label {
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    text-align: center;
}

.progress-step.active .progress-step-label {
    color: var(--color-gold-soft);
}

/* Stats / KPI Cards ----------------------------------------------------- */

.stat-card {
    background: radial-gradient(circle at top, rgba(59,97,177,0.2), transparent 50%),
                var(--color-bg-panel);
    border-radius: 14px;
    padding: 1.5rem;
    border: 1px solid rgba(255,255,255,0.06);
}

.stat-label {
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 600;
    color: var(--color-text-main);
    margin-bottom: 0.25rem;
}

.stat-change {
    font-size: 0.8rem;
    color: var(--color-success);
}

.stat-change.negative {
    color: var(--color-red-mid);
}

/* Footer ---------------------------------------------------------------- */

.footer {
    margin-top: auto;
    /* Matches .header — see the note there. */
    padding: 2rem max(var(--app-gutter), calc((100% - var(--app-content-max)) / 2 + var(--app-gutter)));
    border-top: 1px solid rgba(235,209,161,0.12);
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.8rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1rem;
}

.footer-links a {
    color: var(--color-text-muted);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--color-gold-soft);
}

/* ========================================
   USER DROPDOWN MENU
   ======================================== */

.header-user {
    position: relative;
    cursor: pointer;
}

.header-user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: var(--color-bg-panel);
    border: 1px solid rgba(96, 165, 250, 0.3);
    border-radius: 8px;
    min-width: 200px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1000;
}

.header-user.active .header-user-dropdown,
.header-user:hover .header-user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.header-user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--color-text);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.header-user-dropdown-item:last-child {
    border-bottom: none;
}

.header-user-dropdown-item:hover {
    background: rgba(96, 165, 250, 0.1);
    color: var(--color-blue-bright);
}

.header-user-dropdown-item.logout {
    color: var(--color-red-soft);
}

.header-user-dropdown-item.logout:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--color-red-soft);
}

.header-user-dropdown-icon {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

/* ========================================
   MOBILE RESPONSIVE IMPROVEMENTS
   ======================================== */

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem 4vw;
    }

    .header-nav {
        gap: 1rem;
        font-size: 0.75rem;
    }

    .main, .main-wide {
        padding: 2rem 4vw;
    }

    .hero-title-large {
        font-size: 2.5rem;
    }

    .hero-tagline-large {
        font-size: 1rem;
    }

    .card-grid, .card-grid-3, .card-grid-4 {
        grid-template-columns: 1fr;
    }

    .role-cards {
        grid-template-columns: 1fr;
    }

    .stat-card-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .pipeline-columns {
        flex-direction: column;
        gap: 1.5rem;
    }

    .pipeline-column {
        min-width: 100%;
    }

    .table-container {
        overflow-x: scroll;
    }

    table {
        min-width: 600px;
    }
}

@media (max-width: 480px) {
    .hero-title-large {
        font-size: 2rem;
        letter-spacing: 0.15em;
    }

    .btn-large {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }

    .stat-card-grid {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 768px) {
    /* ... existing mobile styles ... */

        .hero-full {
        background-image: url('../assets/images/hero-mobile.jpg');
        background-size: cover;
        background-position: top center;
    }

    .hero-full .btn-row {
        margin-top: 320px;
        flex-direction: column;
        align-items: center;
        width: 100%;
        padding: 0 2rem;
    }

    .hero-full .btn-row .btn {
        width: 100%;
        max-width: 280px;
    }

    .hero-tagline-large {
        font-size: 0.95rem;
        padding: 0 1rem;
        margin-top: 30px !important;
    }
}

@media (max-width: 480px) {
    .hero-full .btn-row {
        margin-top: 280px;
    }
}
/* Mobile adjustments */
@media (max-width: 480px) {
    .nova-widget {
        bottom: 16px;
        right: 16px;
    }

    .nova-chat {
        width: calc(100vw - 32px);
        height: calc(100vh - 100px);
        bottom: 68px;
        right: -8px;
        border-radius: 12px;
    }

    .nova-fab {
        width: 54px;
        height: 54px;
    }
}

/* ========================================
           NOVA AI ASSISTANT WIDGET
======================================== */

/* Override main.css nova-widget */
.nova-widget {
    position: fixed !important;
    bottom: 24px !important;
    right: 24px !important;
    z-index: 9999 !important;
    font-family: inherit !important;
    display: block !important;
    width: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}



/* Floating Action Button */
.nova-fab {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1e3a5f 0%, #0f172a 100%);
    border: 2px solid rgba(235, 209, 161, 0.4);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 30px rgba(235, 209, 161, 0.1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

    .nova-fab::before {
        content: '';
        position: absolute;
        inset: -2px;
        border-radius: 50%;
        background: linear-gradient(135deg, rgba(235, 209, 161, 0.3), transparent, rgba(96, 165, 250, 0.3));
        z-index: -1;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .nova-fab:hover {
        transform: scale(1.08);
        border-color: rgba(235, 209, 161, 0.7);
        box-shadow: 0 6px 30px rgba(0, 0, 0, 0.5), 0 0 40px rgba(235, 209, 161, 0.2);
    }

        .nova-fab:hover::before {
            opacity: 1;
        }

.nova-fab-icon {
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.nova-fab:hover .nova-fab-icon {
    transform: rotate(15deg) scale(1.1);
}

.nova-fab-close {
    display: none;
}

.nova-widget.open .nova-fab-open {
    display: none;
}

.nova-widget.open .nova-fab-close {
    display: block;
}

/* Notification Pulse */
.nova-fab-pulse {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 16px;
    height: 16px;
    background: #22c55e;
    border-radius: 50%;
    border: 2px solid #0a0f1e;
    animation: novaPulse 2s infinite;
}

@keyframes novaPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }
}

/* Chat Window */
.nova-chat {
    position: absolute;
    bottom: 72px;
    right: 0;
    width: 380px;
    max-width: calc(100vw - 48px);
    height: 520px;
    max-height: calc(100vh - 140px);
    background: linear-gradient(180deg, #0f172a 0%, #0a0f1e 100%);
    border-radius: 16px;
    border: 1px solid rgba(235, 209, 161, 0.2);
    box-shadow: 0 12px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(235, 209, 161, 0.05);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nova-widget.open .nova-chat {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Chat Header */
.nova-header {
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, rgba(235, 209, 161, 0.1) 0%, transparent 100%);
    border-bottom: 1px solid rgba(235, 209, 161, 0.15);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nova-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1e3a5f, #3b61b1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    border: 2px solid rgba(235, 209, 161, 0.3);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.nova-info {
    flex: 1;
}

.nova-name {
    font-size: 1rem;
    font-weight: 600;
    color: #ebd1a1;
    letter-spacing: 0.03em;
}

.nova-status {
    font-size: 0.75rem;
    color: #22c55e;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.nova-status-dot {
    width: 6px;
    height: 6px;
    background: #22c55e;
    border-radius: 50%;
    animation: novaPulse 2s infinite;
}

.nova-minimize {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #9ca3af;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

    .nova-minimize:hover {
        background: rgba(255, 255, 255, 0.1);
        color: #e5e7eb;
    }

/* Chat Messages */
.nova-messages {
    flex: 1;
    padding: 1.25rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

    .nova-messages::-webkit-scrollbar {
        width: 4px;
    }

    .nova-messages::-webkit-scrollbar-track {
        background: transparent;
    }

    .nova-messages::-webkit-scrollbar-thumb {
        background: rgba(235, 209, 161, 0.2);
        border-radius: 4px;
    }

.nova-message {
    display: flex;
    gap: 0.75rem;
    animation: novaMessageIn 0.3s ease;
}

@keyframes novaMessageIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nova-message-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1e3a5f, #3b61b1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.nova-message-content {
    flex: 1;
}

.nova-message-bubble {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    border-top-left-radius: 4px;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #e5e7eb;
}

.nova-message-time {
    font-size: 0.7rem;
    color: #6b7280;
    margin-top: 0.35rem;
    padding-left: 0.25rem;
}

.nova-message.user {
    flex-direction: row-reverse;
}

    .nova-message.user .nova-message-avatar {
        background: linear-gradient(135deg, #22c55e, #16a34a);
    }

    .nova-message.user .nova-message-bubble {
        background: rgba(59, 130, 246, 0.15);
        border-color: rgba(59, 130, 246, 0.25);
        border-radius: 12px;
        border-top-right-radius: 4px;
    }

    .nova-message.user .nova-message-time {
        text-align: right;
        padding-right: 0.25rem;
        padding-left: 0;
    }

/* Quick Actions */
.nova-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.nova-quick-btn {
    padding: 0.4rem 0.75rem;
    background: rgba(235, 209, 161, 0.1);
    border: 1px solid rgba(235, 209, 161, 0.25);
    border-radius: 20px;
    color: #ebd1a1;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .nova-quick-btn:hover {
        background: rgba(235, 209, 161, 0.2);
        border-color: rgba(235, 209, 161, 0.4);
    }

/* Chat Input */
.nova-input-area {
    padding: 1rem 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.2);
}

.nova-input-wrapper {
    display: flex;
    gap: 0.75rem;
    align-items: flex-end;
}

.nova-input {
    flex: 1;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #e5e7eb;
    font-size: 0.9rem;
    resize: none;
    min-height: 44px;
    max-height: 120px;
    font-family: inherit;
    transition: border-color 0.2s ease;
}

    .nova-input::placeholder {
        color: #6b7280;
    }

    .nova-input:focus {
        outline: none;
        border-color: rgba(235, 209, 161, 0.4);
    }

.nova-send {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #3b61b1, #1e3a5f);
    border: 1px solid rgba(96, 165, 250, 0.3);
    color: #e5e7eb;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.2s ease;
}

    .nova-send:hover {
        background: linear-gradient(135deg, #4a72c4, #2a4a7a);
        transform: scale(1.05);
    }

    .nova-send:active {
        transform: scale(0.98);
    }

/* Powered By */
.nova-footer {
    padding: 0.5rem 1.25rem 0.75rem;
    text-align: center;
}

.nova-powered {
    font-size: 0.65rem;
    color: #4b5563;
    letter-spacing: 0.05em;
}

    .nova-powered a {
        color: #60a5fa;
        text-decoration: none;
    }

        .nova-powered a:hover {
            text-decoration: underline;
        }

/* ── Shared pill action button ──────────────────────────────────────────────────────────────────
   Matches the investor dashboard's "Provide times" button (.dash-action-btn.primary). Self-contained
   — hardcoded colors and font, NO --dash-* tokens — so it renders identically on every page (those
   tokens are scoped to .investor-dashboard-v3 and don't resolve elsewhere). Used for secondary /
   navigation actions; the green "add an outside investment" CTAs keep their own larger styling. */
.nea-pill-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 6px;
    font-family: 'Outfit', system-ui, -apple-system, sans-serif;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
    border: 1px solid transparent;
    text-decoration: none;
    transition: all 0.2s;
}
.nea-pill-btn--blue { background: #2563eb; border-color: #2563eb; color: #fff; }
.nea-pill-btn--blue:hover { background: #1d4ed8; border-color: #1d4ed8; color: #fff; text-decoration: none; }
.nea-pill-btn:disabled { opacity: 0.5; cursor: default; }



/* FocusOnNavigate (App.razor) focuses each page's h1 so screen readers announce the new page; the heading isn't
   interactive, so it gets no focus ring. (app.css has the template's copy of this rule but isn't loaded.) */
h1:focus {
    outline: none;
}
