/* ─────────────────────────────────────────────────────────────────
   Vincit RFP Portal — global stylesheet
   Atmospheric layout. Navy/Copper palette.
   ───────────────────────────────────────────────────────────────── */

:root {
    /* Palette */
    --navy:        #0B1E36;
    --navy-2:      #122844;
    --navy-3:      #1B3553;
    --navy-edge:   #050D1A;
    --copper:      #C26A2C;
    --copper-d:    #A05420;
    --copper-l:    #F4E5D4;
    --steel:       #4B5A6B;
    --steel-l:     #8995A4;
    --steel-line:  #D8DBE0;
    --ink:         #0E1620;
    --ink-2:       #2A323E;
    --ink-3:       #5C6573;
    --paper:       #F5F1E8;
    --paper-2:     #EAE4D5;
    --surface:     #FFFFFF;
    --rule:        #E1DCCF;
    --rule-soft:   #EFEADB;
    --error:       #C04A2C;

    /* Typography */
    --font-sans:   'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-serif:  'Instrument Serif', 'Iowan Old Style', Georgia, serif;
    --font-mono:   'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}

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

html, body {
    height: 100%;
    font-family: var(--font-sans);
    background: var(--navy);
    color: var(--ink);
    font-size: 14px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.sr-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ─── ATMOSPHERIC SHELL ─────────────────────────────────────────── */
.portal-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 28px;
    background: var(--navy);
    background-image:
        radial-gradient(ellipse 1200px 700px at 50% 30%, rgba(194,106,44,.10), transparent 60%),
        linear-gradient(180deg, var(--navy) 0%, var(--navy-edge) 100%);
    color: #fff;
    position: relative;
    overflow: hidden;
}
.portal-wrapper::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.02) 1px, transparent 1px);
    background-size: 64px 64px;
    pointer-events: none;
    mask-image: radial-gradient(ellipse 60% 60% at 50% 50%, #000 20%, transparent 80%);
}

/* ─── FORM CARD ────────────────────────────────────────────────── */
.form-card {
    width: 100%;
    max-width: 440px;
    position: relative;
    z-index: 1;
}

.fc-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 36px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(255,255,255,.12);
}
.vlogo {
    width: 32px; height: 32px;
    background: var(--copper);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 22px;
    color: #fff;
    line-height: 1;
}
.fc-brand-name {
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 14px;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: #fff;
}
.fc-brand-sub {
    margin-left: auto;
    font-family: var(--font-mono);
    font-size: 9.5px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: rgba(255,255,255,.5);
}

/* ─── BACK LINK ─────────────────────────────────────────────────── */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: rgba(255,255,255,.5);
    text-decoration: none;
    margin-bottom: 36px;
    transition: color .15s;
}
.back-link:hover { color: #fff; }
.back-link svg { width: 10px; height: 10px; }

/* ─── TITLE BLOCK ───────────────────────────────────────────────── */
.fc-eyebrow {
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--copper);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.fc-eyebrow::before {
    content: ""; width: 20px; height: 1px; background: var(--copper);
}

.fc-title {
    font-family: var(--font-serif);
    font-size: 38px;
    font-weight: 400;
    line-height: 1.22;
    letter-spacing: -0.015em;
    color: #fff;
    margin-bottom: 20px;
    text-wrap: pretty;
}
.fc-title em { font-style: italic; color: var(--copper-l); }

.fc-sub {
    font-size: 14px;
    line-height: 1.6;
    color: rgba(255,255,255,.65);
    margin-bottom: 32px;
    max-width: 380px;
}

/* ─── PROPOSAL CONTEXT CARD ─────────────────────────────────────── */
.fc-proposal {
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.10);
    padding: 14px 16px;
    margin-bottom: 28px;
}
.fc-prop-l {
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: rgba(255,255,255,.5);
    margin-bottom: 6px;
}
.fc-prop-t {
    font-family: var(--font-serif);
    font-size: 18px;
    line-height: 1.25;
    color: #fff;
    margin-bottom: 8px;
}
.fc-prop-meta {
    display: flex; gap: 18px;
    font-family: var(--font-mono);
    font-size: 10px;
    color: rgba(255,255,255,.5);
    letter-spacing: .05em;
}
.fc-prop-meta strong { color: rgba(255,255,255,.85); font-weight: 500; }

/* ─── ERROR BANNER ─────────────────────────────────────────────── */
.error-banner {
    background: rgba(192,74,44,.12);
    border: 1px solid rgba(192,74,44,.4);
    border-left: 3px solid var(--copper);
    padding: 10px 14px;
    margin-bottom: 18px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.error-banner svg {
    width: 16px; height: 16px;
    color: var(--copper);
    flex-shrink: 0;
    margin-top: 1px;
}
.error-banner-t {
    font-size: 13px;
    color: #fff;
    line-height: 1.45;
}
.error-banner-t strong { font-weight: 600; }

/* ─── FORM ─────────────────────────────────────────────────────── */
.key-form { display: flex; flex-direction: column; gap: 12px; }

.field-label {
    font-family: var(--font-mono);
    font-size: 9.5px;
    font-weight: 500;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: rgba(255,255,255,.5);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.field-label svg { width: 11px; height: 11px; }

.input-wrap { position: relative; }

.key-input {
    width: 100%;
    height: 52px;
    padding: 0 56px 0 16px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.18);
    color: #fff;
    font-size: 15px;
    font-family: var(--font-mono);
    font-weight: 500;
    letter-spacing: 0.1em;
    outline: none;
    transition: border-color .15s, box-shadow .15s, background-color .15s;
}
.key-input::placeholder {
    color: rgba(255,255,255,.4);
    letter-spacing: 0;
    font-family: var(--font-sans);
    font-weight: 400;
}
.key-input:focus {
    background: rgba(255,255,255,.10);
    border-color: var(--copper);
    box-shadow: 0 0 0 3px rgba(194,106,44,.14);
}
.key-input.has-error {
    border-color: var(--error);
    box-shadow: 0 0 0 3px rgba(192,74,44,.20);
}

.show-toggle {
    position: absolute;
    right: 10px; top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: rgba(255,255,255,.5);
    font-family: var(--font-mono);
    font-size: 9.5px;
    letter-spacing: .12em;
    text-transform: uppercase;
    transition: color .15s;
}
.show-toggle:hover { color: #fff; }

/* ─── PRIMARY BUTTON ───────────────────────────────────────────── */
.btn-primary {
    width: 100%;
    height: 52px;
    padding: 0 20px;
    background: var(--copper);
    color: #fff;
    border: none;
    font-size: 12px;
    font-family: var(--font-sans);
    font-weight: 500;
    letter-spacing: .14em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color .15s, transform .05s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 8px;
}
.btn-primary:hover { background: var(--copper-d); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary svg { width: 14px; height: 14px; transition: transform .2s; }
.btn-primary:hover svg { transform: translateX(3px); }
.btn-primary[disabled] { background: var(--steel); cursor: not-allowed; }

/* ─── HELP ROW ─────────────────────────────────────────────────── */
.help-row {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,.12);
}
.help-text {
    font-size: 12px;
    color: rgba(255,255,255,.55);
    line-height: 1.5;
}
.help-text a {
    color: var(--copper-l);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color .15s;
}
.help-text a:hover { border-bottom-color: var(--copper-l); }

/* ─── NOT FOUND ────────────────────────────────────────────────── */
.fc-eyebrow .eyebrow-key {
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: .08em;
    text-transform: none;
    color: rgba(255,255,255,.85);
    margin-left: 10px;
    padding: 3px 8px;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.15);
}

.nf-key {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 12px;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.15);
    padding: 4px 10px;
    letter-spacing: .08em;
    color: #fff;
    margin: 0 4px;
}

/* ─── BLAZOR INFRASTRUCTURE (preserved) ────────────────────────── */
.blazor-error-boundary {
    background: #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}
.blazor-error-boundary::after {
    content: "An error has occurred.";
}

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    color: #000;
    padding: 0.75rem 1.25rem;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    font-size: 0.875rem;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
}
#blazor-error-ui .reload {
    color: #000;
    margin-left: 0.5rem;
}
#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}
