/* ─────────────────────────────────────────────────────────────────
   Vincit Educational Portal — global stylesheet
   Vincit Group brand palette.
   ───────────────────────────────────────────────────────────────── */

:root {
    /* Vincit Group brand palette */
    --raven:       #133156;
    --raven-d:     #0C2340;
    --raven-edge:  #071629;
    --vector:      #005D83;
    --vincit-blue: #008F9A;
    --vincit-blue-d: #006E77;
    --vincit-blue-l: #D0F0F2;
    --steel:       #4B5A6B;
    --steel-l:     #8995A4;
    --steel-line:  #D8DBE0;
    --ink:         #0E1620;
    --ink-2:       #2A323E;
    --ink-3:       #5C6573;
    --surface:     #FFFFFF;
    --error:       #C04A2C;

    /* Typography — Vincit Group brand: Arial / Calibri */
    --font-sans:   Arial, Calibri, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-serif:  Calibri, Arial, ui-sans-serif, system-ui, sans-serif;
    --font-mono:   'SF Mono', ui-monospace, Menlo, monospace;
}

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

html, body {
    height: 100%;
    font-family: var(--font-sans);
    background: var(--raven);
    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(--raven);
    background-image:
        radial-gradient(ellipse 1200px 700px at 50% 30%, rgba(0,143,154,.12), transparent 60%),
        linear-gradient(180deg, var(--raven) 0%, var(--raven-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 {
    height: 28px;
    width: auto;
    display: block;
}
.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(--vincit-blue);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.fc-eyebrow::before {
    content: ""; width: 20px; height: 1px; background: var(--vincit-blue);
}

.fc-title {
    font-family: var(--font-sans);
    font-size: 36px;
    font-weight: 700;
    line-height: 1.22;
    letter-spacing: -0.015em;
    color: #fff;
    margin-bottom: 20px;
    text-wrap: pretty;
}
.fc-title em { font-style: italic; font-weight: 400; color: var(--vincit-blue-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(--error);
    padding: 10px 14px;
    margin-bottom: 18px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.error-banner svg {
    width: 16px; height: 16px;
    color: var(--error);
    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(--vincit-blue);
    box-shadow: 0 0 0 3px rgba(0,143,154,.18);
}
.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(--vincit-blue);
    color: #fff;
    border: none;
    font-size: 12px;
    font-family: var(--font-sans);
    font-weight: 700;
    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(--vincit-blue-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(--vincit-blue-l);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color .15s;
}
.help-text a:hover { border-bottom-color: var(--vincit-blue-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;
}
