/* ---------------------------------------------------------------------------
   AVIACO Customer Portal stylesheet.

   Ported from the archive portal's portal.css: the same brand ramp, neutrals,
   semantic colours, radii and shadows, re-expressed on the portal-* classes the
   Razor pages use (the archive file dressed MudBlazor components). The CSP is
   style-src 'self', so nothing here relies on inline style attributes: accents
   that the archive passed as inline custom properties are modifier classes.

   No web fonts: a system-first stack, so there is no network dependency and no
   flash of unstyled text.
   --------------------------------------------------------------------------- */

:root {
    /* Brand ramp: deep burgundy, sampled from the GSE logo. */
    --portal-burgundy-50: #f4ecee;
    --portal-burgundy-100: #e3d0d4;
    --portal-burgundy-200: #c6a0aa;
    --portal-burgundy-300: #aa717f;
    --portal-burgundy-400: #8d4155;
    --portal-burgundy-500: #71122a;
    --portal-burgundy-600: #661026;
    --portal-burgundy-700: #580e21;
    --portal-burgundy-800: #4b0c1c;
    --portal-burgundy-900: #380915;

    --portal-amber: #ffab00;

    /* Neutrals */
    --portal-ink: #1f2933;
    --portal-ink-muted: #52606d;
    --portal-ink-faint: #7b8794;
    --portal-surface: #ffffff;
    --portal-surface-2: #f7f4f5;
    --portal-surface-3: #efe9eb;
    --portal-line: #e7e0e2;
    --portal-line-strong: #c9c0c3;

    /* Semantic */
    --portal-info: #1565c0;
    --portal-success: #2e7d32;
    --portal-warning: #ef6c00;
    --portal-error: #b42318;

    --portal-radius: 10px;
    --portal-radius-lg: 14px;
    --portal-radius-pill: 999px;

    --portal-shadow-1: 0 1px 2px rgba(31, 41, 51, .05), 0 1px 3px rgba(31, 41, 51, .08);
    --portal-shadow-2: 0 2px 4px rgba(31, 41, 51, .06), 0 6px 16px rgba(31, 41, 51, .10);
    --portal-shadow-3: 0 10px 32px rgba(31, 41, 51, .16);

    --portal-focus-ring: 0 0 0 3px rgba(113, 18, 42, .18);

    --portal-font: "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---------------------------------------------------------------- document */

* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--portal-font);
    font-size: .9375rem;
    line-height: 1.5;
    color: var(--portal-ink);
    background: var(--portal-surface-2);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background: var(--portal-burgundy-100);
    color: var(--portal-burgundy-900);
}

h1 {
    margin: 0;
    font-size: 1.625rem;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -.015em;
}

h2 {
    margin: 0;
    font-size: 1.0625rem;
    font-weight: 600;
    line-height: 1.35;
}

a {
    color: var(--portal-burgundy-500);
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

a:hover {
    color: var(--portal-burgundy-700);
}

code {
    font-size: .875em;
    background: var(--portal-surface-3);
    border-radius: 4px;
    padding: .05rem .35rem;
}

/* ---------------------------------------------------------------- app shell */

/* A faint burgundy wash at the top of the page so the app bar does not sit on
   flat grey. Fixed, so it does not repeat while scrolling. */
.portal-app {
    display: flex;
    flex-direction: column;
}

.portal-app::before {
    content: "";
    position: fixed;
    inset: 0 0 auto 0;
    height: 340px;
    background: radial-gradient(120% 100% at 50% 0%, rgba(113, 18, 42, .07), rgba(113, 18, 42, 0) 70%);
    pointer-events: none;
    z-index: 0;
}

.portal-header {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: .25rem;
    min-height: 64px;
    padding: .5rem 1.5rem;
    color: #fff;
    background: linear-gradient(100deg, var(--portal-burgundy-700) 0%, var(--portal-burgundy-500) 45%, var(--portal-burgundy-600) 100%);
    /* Amber hairline: the accent shows up as a detail rather than as a surface. */
    box-shadow: inset 0 -1px 0 rgba(255, 171, 0, .38), 0 1px 3px rgba(31, 41, 51, .18);
}

.portal-brand {
    display: flex;
    align-items: center;
    gap: .75rem;
    min-width: 0;
    color: #fff;
    text-decoration: none;
}

.portal-brand:hover {
    color: #fff;
}

.portal-brand-logo {
    display: block;
    flex: none;
    height: 34px;
    width: auto;
}

.portal-brand-rule {
    flex: none;
    width: 1px;
    height: 26px;
    background: rgba(255, 255, 255, .28);
}

.portal-wordmark {
    font-size: 1.0625rem;
    font-weight: 600;
    letter-spacing: .015em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.portal-nav {
    display: flex;
    align-items: center;
    gap: .25rem;
    margin-left: 1.5rem;
}

.portal-navlink {
    position: relative;
    display: inline-block;
    padding: .375rem .875rem;
    border-radius: var(--portal-radius-pill);
    color: rgba(255, 255, 255, .82);
    font-size: .875rem;
    font-weight: 600;
    text-decoration: none;
}

.portal-navlink:hover {
    background: rgba(255, 255, 255, .12);
    color: #fff;
}

.portal-navlink-active {
    background: rgba(255, 255, 255, .16);
    color: #fff;
}

.portal-navlink-active::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -.55rem;
    width: 22px;
    height: 2px;
    border-radius: 2px;
    background: var(--portal-amber);
    transform: translateX(-50%);
}

.portal-account {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-left: auto;
    min-width: 0;
}

.portal-user {
    max-width: 15rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: rgba(255, 255, 255, .82);
    font-size: .875rem;
}

.portal-signout {
    margin: 0;
}

.portal-signout button {
    margin: 0;
    height: 36px;
    padding: 0 .875rem;
    border: 1px solid rgba(255, 255, 255, .45);
    border-radius: var(--portal-radius-pill);
    background: transparent;
    color: #fff;
    font-size: .875rem;
}

.portal-signout button:hover {
    background: rgba(255, 255, 255, .12);
    border-color: #fff;
}

.portal-main {
    position: relative;
    z-index: 1;
    flex: 1 0 auto;
    width: 100%;
    max-width: 72rem;
    margin: 0 auto;
    padding: 1.75rem 1.5rem 2rem;
}

.portal-footer {
    position: relative;
    z-index: 1;
    margin-top: 1rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--portal-line);
    background: rgba(255, 255, 255, .6);
}

.portal-footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    max-width: 72rem;
    margin: 0 auto;
    font-size: .8rem;
    color: var(--portal-ink-faint);
}

/* Narrow screens: the bar cannot hold brand, nav and account on one line. */
@media (max-width: 839px) {
    .portal-nav {
        margin-left: .5rem;
    }

    .portal-navlink {
        padding: .375rem .625rem;
    }

    .portal-user {
        display: none;
    }
}

@media (max-width: 599px) {
    .portal-header {
        flex-wrap: wrap;
        row-gap: .5rem;
        padding: .625rem 1rem;
    }

    .portal-brand {
        gap: .5rem;
    }

    .portal-brand-logo {
        height: 28px;
    }

    .portal-brand-rule {
        display: none;
    }

    .portal-wordmark {
        font-size: .875rem;
    }

    .portal-nav {
        order: 3;
        width: 100%;
        margin-left: 0;
    }

    .portal-navlink-active::after {
        display: none;
    }

    .portal-main {
        padding: 1.25rem 1rem 1.5rem;
    }
}

/* ------------------------------------------------------------- page header */

.portal-page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--portal-line);
}

.portal-page-header p {
    margin: .25rem 0 0;
}

.portal-eyebrow {
    margin-bottom: .25rem;
    color: var(--portal-burgundy-500);
    font-size: .6875rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.portal-muted {
    color: var(--portal-ink-muted);
}

/* Tabular figures for anything a customer compares down a column. */
.portal-date,
.portal-request-number,
.portal-tile-value,
.portal-count {
    font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------------ buttons */

button,
.portal-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    margin: 0;
    padding: 0 1.25rem;
    border: none;
    border-radius: 8px;
    background: var(--portal-burgundy-500);
    color: #fff;
    font-family: inherit;
    font-size: .9375rem;
    font-weight: 600;
    letter-spacing: .01em;
    text-decoration: none;
    cursor: pointer;
    transition: background .15s ease, box-shadow .15s ease, transform .05s ease;
}

button:hover,
.portal-button:hover {
    background: var(--portal-burgundy-700);
    color: #fff;
}

button:focus-visible,
.portal-button:focus-visible {
    outline: none;
    box-shadow: var(--portal-focus-ring);
}

button:active,
.portal-button:active {
    transform: translateY(1px);
}

/* ---------------------------------------------------------------- messages */

.portal-status {
    margin: 0 0 1.25rem;
    padding: .75rem .875rem;
    border: 1px solid #b7dfb9;
    border-left: 3px solid var(--portal-success);
    border-radius: 8px;
    background: #eef7ee;
    color: #1f4d22;
    font-size: .9rem;
}

/* The validation summary tag helper emits an empty container when the model is
   valid; it must not reserve space. */
.validation-summary-valid {
    display: none;
}

.portal-errors.validation-summary-errors {
    margin: 0 0 1.25rem;
    padding: .75rem .875rem;
    border: 1px solid #f3c7c3;
    border-left: 3px solid var(--portal-error);
    border-radius: 8px;
    background: #fdf3f2;
    color: #7f1a12;
    font-size: .9rem;
}

.portal-errors ul {
    margin: 0;
    padding-left: 1.1rem;
}

.portal-errors ul li:only-child {
    list-style: none;
    margin-left: -1.1rem;
}

.portal-error {
    display: block;
    margin-top: .35rem;
    color: var(--portal-error);
    font-size: .82rem;
}

.portal-error:empty {
    display: none;
}

.portal-hint {
    margin: .35rem 0 0;
    color: var(--portal-ink-muted);
    font-size: .85rem;
}

/* ------------------------------------------------------------------ tiles */

/* 158px min so two tiles still fit side by side on a 400px-wide phone. */
.portal-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(158px, 1fr));
    gap: 1rem;
    margin: 0 0 2rem;
}

.portal-tile {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column-reverse;
    gap: .35rem;
    padding: 1.125rem 1.125rem 1.05rem 1.25rem;
    background: var(--portal-surface);
    border: 1px solid var(--portal-line);
    border-radius: var(--portal-radius-lg);
    box-shadow: var(--portal-shadow-1);
    transition: box-shadow .15s ease, border-color .15s ease;
}

.portal-tile:hover {
    box-shadow: var(--portal-shadow-2);
    border-color: var(--portal-burgundy-100);
}

/* The coloured rail carries the semantics, so the number itself stays ink. */
.portal-tile::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--portal-burgundy-500);
}

.portal-tile-unserviceable::before {
    background: var(--portal-warning);
}

.portal-tile-equipment::before {
    background: var(--portal-info);
}

.portal-tile-available::before {
    background: var(--portal-success);
}

.portal-tile-value {
    font-size: 2.125rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: -.02em;
}

.portal-tile-label {
    color: var(--portal-ink-muted);
    font-size: .8125rem;
    line-height: 1.3;
}

/* --------------------------------------------------------------- sections */

.portal-section {
    margin-top: 2rem;
}

.portal-section h2 {
    display: flex;
    align-items: center;
    gap: .625rem;
    margin: 0 0 .875rem;
    white-space: nowrap;
}

.portal-section h2::after {
    content: "";
    flex: 1 1 auto;
    min-width: 1rem;
    height: 1px;
    background: var(--portal-line);
}

.portal-section > .portal-muted {
    margin: -.5rem 0 1rem;
    font-size: .9rem;
}

.portal-count {
    padding: .1rem .5rem;
    border-radius: var(--portal-radius-pill);
    background: var(--portal-surface-3);
    color: var(--portal-ink-muted);
    font-size: .75rem;
    font-weight: 600;
}

/* --------------------------------------------------------------- requests */

.portal-requests {
    list-style: none;
    margin: 0 0 2rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: .625rem;
}

.portal-request {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
    min-width: 0;
    padding: .875rem 1.25rem;
    background: var(--portal-surface);
    border: 1px solid var(--portal-line);
    border-radius: var(--portal-radius-lg);
    box-shadow: var(--portal-shadow-1);
    color: inherit;
    text-decoration: none;
    transition: box-shadow .15s ease, border-color .15s ease;
}

.portal-request:hover {
    color: inherit;
    border-color: var(--portal-burgundy-200);
    box-shadow: var(--portal-shadow-2);
}

.portal-request-number {
    font-weight: 600;
}

.portal-request-asset {
    color: var(--portal-ink-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.portal-request-meta {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-left: auto;
    flex: none;
    color: var(--portal-ink-muted);
}

.portal-request-meta .portal-date {
    font-size: .8125rem;
    white-space: nowrap;
}

@media (max-width: 640px) {
    .portal-request-meta .portal-date {
        display: none;
    }
}

/* ------------------------------------------------------------------ chips */

/* Title case, not the archive's small caps: the e2e suite reads the chips' rendered text
   ("New"), and innerText follows text-transform. */
.portal-chip {
    display: inline-flex;
    align-items: center;
    height: 22px;
    padding: 0 .65rem;
    border-radius: var(--portal-radius-pill);
    background: var(--portal-surface-3);
    color: var(--portal-ink-muted);
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .01em;
    white-space: nowrap;
}

.portal-chip-new {
    background: #e3eefa;
    color: var(--portal-info);
}

.portal-chip-progress {
    background: #fdebd9;
    color: var(--portal-warning);
}

.portal-chip-done {
    background: #e6f2e6;
    color: var(--portal-success);
}

.portal-chip-cancelled {
    background: var(--portal-surface-3);
    color: var(--portal-ink-faint);
}

.portal-chip-warning {
    background: #fbe9e7;
    color: var(--portal-error);
}

/* ---------------------------------------------------------------- filters */

.portal-filters {
    display: flex;
    align-items: flex-end;
    gap: .75rem;
    flex-wrap: wrap;
    margin-bottom: .875rem;
}

.portal-filters > div {
    flex: 1 1 12rem;
    max-width: 16rem;
}

.portal-filters label {
    display: block;
    margin-bottom: .4rem;
    color: var(--portal-ink-muted);
    font-size: .82rem;
    font-weight: 600;
}

.portal-filters input {
    width: 100%;
    height: 40px;
    padding: 0 .75rem;
    border: 1px solid var(--portal-line-strong);
    border-radius: 8px;
    background: var(--portal-surface);
    font: inherit;
    color: var(--portal-ink);
}

.portal-filters input:focus {
    outline: none;
    border-color: var(--portal-burgundy-500);
    box-shadow: var(--portal-focus-ring);
}

.portal-filters button {
    height: 40px;
    padding: 0 1rem;
    font-size: .875rem;
}

.portal-filters a {
    align-self: center;
    font-size: .875rem;
}

/* ----------------------------------------------------------------- tables */

/* The card chrome lives on the wrapper so the table can scroll sideways inside a
   border that stays put. */
.portal-table-wrap {
    overflow-x: auto;
    margin-bottom: 2rem;
    background: var(--portal-surface);
    border: 1px solid var(--portal-line);
    border-radius: var(--portal-radius-lg);
    box-shadow: var(--portal-shadow-1);
}

.portal-table {
    width: 100%;
    border-collapse: collapse;
}

.portal-table th,
.portal-table td {
    padding: .625rem .875rem;
    text-align: left;
    border-bottom: 1px solid var(--portal-line);
}

.portal-table th {
    background: var(--portal-surface-2);
    color: var(--portal-ink-muted);
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.portal-table tbody tr:last-child td {
    border-bottom: none;
}

.portal-table tbody tr:hover td {
    background: var(--portal-surface-2);
}

.portal-table td:last-child {
    text-align: right;
    white-space: nowrap;
}

/* ---------------------------------------------------------- definition list */

.portal-dl {
    display: grid;
    grid-template-columns: minmax(120px, 168px) 1fr;
    column-gap: 1.25rem;
    row-gap: .5rem;
    margin: 0;
    padding: 1.25rem 1.5rem;
    background: var(--portal-surface);
    border: 1px solid var(--portal-line);
    border-radius: var(--portal-radius-lg);
    box-shadow: var(--portal-shadow-1);
    font-size: .9rem;
}

.portal-dl dt {
    color: var(--portal-ink-muted);
    font-size: .82rem;
    line-height: 1.5;
}

.portal-dl dd {
    margin: 0;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

@media (max-width: 599px) {
    .portal-dl {
        grid-template-columns: 1fr;
        row-gap: .1rem;
    }

    .portal-dl dd {
        margin-bottom: .5rem;
    }
}

/* ------------------------------------------------------------- empty state */

.portal-empty {
    margin-bottom: 2rem;
    padding: 2.25rem 1.5rem;
    border: 1px dashed var(--portal-line-strong);
    border-radius: var(--portal-radius-lg);
    background: rgba(255, 255, 255, .55);
    color: var(--portal-ink-muted);
    text-align: center;
}

/* ------------------------------------------------------------------ forms */

.portal-form {
    max-width: 46rem;
    padding: 1.5rem;
    background: var(--portal-surface);
    border: 1px solid var(--portal-line);
    border-radius: var(--portal-radius-lg);
    box-shadow: var(--portal-shadow-1);
}

.portal-form label {
    display: block;
    margin: 1.125rem 0 .4rem;
    color: var(--portal-ink-muted);
    font-size: .82rem;
    font-weight: 600;
}

.portal-form > label:first-child,
.portal-form > .validation-summary-valid + label {
    margin-top: 0;
}

.portal-form input,
.portal-form select,
.portal-form textarea {
    display: block;
    width: 100%;
    padding: 0 .875rem;
    border: 1px solid var(--portal-line-strong);
    border-radius: 8px;
    background: #fff;
    color: var(--portal-ink);
    font: inherit;
    font-size: .95rem;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.portal-form input,
.portal-form select {
    height: 44px;
}

.portal-form textarea {
    min-height: 7rem;
    padding: .625rem .875rem;
    line-height: 1.5;
    resize: vertical;
}

.portal-form input:hover,
.portal-form select:hover,
.portal-form textarea:hover {
    border-color: var(--portal-burgundy-300);
}

.portal-form input:focus,
.portal-form select:focus,
.portal-form textarea:focus {
    outline: none;
    border-color: var(--portal-burgundy-500);
    box-shadow: var(--portal-focus-ring);
}

.portal-form input.input-validation-error,
.portal-form select.input-validation-error,
.portal-form textarea.input-validation-error {
    border-color: var(--portal-error);
}

.portal-fieldset {
    margin: 1.125rem 0 0;
    padding: 0;
    border: 0;
}

.portal-fieldset legend {
    padding: 0;
    margin-bottom: .5rem;
    color: var(--portal-ink-muted);
    font-size: .82rem;
    font-weight: 600;
}

/* Priority radios as a pill row. The input itself is untouched (the e2e suite
   checks it directly); only the label around it is dressed. */
.portal-radios {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.portal-radios label {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    margin: 0;
    padding: .4rem .875rem .4rem .625rem;
    border: 1px solid var(--portal-line-strong);
    border-radius: var(--portal-radius-pill);
    background: var(--portal-surface);
    color: var(--portal-ink);
    font-size: .875rem;
    font-weight: 500;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease;
}

.portal-radios label:hover {
    border-color: var(--portal-burgundy-300);
    background: var(--portal-burgundy-50);
}

.portal-radios label:has(input:checked) {
    border-color: var(--portal-burgundy-500);
    background: var(--portal-burgundy-50);
}

.portal-radios input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--portal-burgundy-500);
    cursor: pointer;
}

/* Qualified with .portal-form: the generic label rule above would otherwise outrank it
   and stack the box above its text. */
.portal-form .portal-check {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin: 1.125rem 0 0;
    color: var(--portal-ink);
    font-size: .9rem;
    font-weight: 400;
    cursor: pointer;
    user-select: none;
}

.portal-form .portal-check input {
    width: 17px;
    height: 17px;
    margin: 0;
    accent-color: var(--portal-burgundy-500);
    cursor: pointer;
}

.portal-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--portal-line);
}

.portal-actions a {
    font-size: .9rem;
    font-weight: 600;
}

/* ------------------------------------------------------------ status card */

/* Error and not-found pages: one centred card. */
.portal-card {
    max-width: 32rem;
    margin: 3.5rem auto;
    padding: 2.25rem 2rem;
    background: var(--portal-surface);
    border: 1px solid var(--portal-line);
    border-radius: var(--portal-radius-lg);
    box-shadow: var(--portal-shadow-2);
    text-align: center;
}

.portal-card p {
    margin: .75rem 0 0;
    color: var(--portal-ink-muted);
}

/* ===========================================================================
   Sign-in pages (login, access denied): the card with the brand panel, on the
   burgundy backdrop. Ported from the archive's Identity layout.
   =========================================================================== */

.identity-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1.5rem;
    background:
        radial-gradient(80% 60% at 15% 10%, rgba(255, 171, 0, .10), rgba(255, 171, 0, 0) 60%),
        radial-gradient(90% 70% at 85% 95%, rgba(255, 255, 255, .10), rgba(255, 255, 255, 0) 60%),
        linear-gradient(135deg, var(--portal-burgundy-800) 0%, var(--portal-burgundy-500) 55%, var(--portal-burgundy-700) 100%);
}

.identity-card {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    max-width: 56rem;
    overflow: hidden;
    background: var(--portal-surface);
    border-radius: 18px;
    box-shadow: 0 24px 64px rgba(28, 5, 12, .38);
}

/* The brand panel. Hidden on narrow screens so the form gets the full card. */
.identity-aside {
    display: none;
}

.identity-main {
    min-width: 0;
    padding: 2.75rem 2.5rem;
}

@media (min-width: 900px) {
    .identity-card {
        grid-template-columns: 21rem 1fr;
    }

    .identity-aside {
        position: relative;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        gap: 2rem;
        overflow: hidden;
        padding: 2.75rem 2.25rem;
        color: #fff;
        background:
            radial-gradient(120% 90% at 100% 0%, rgba(255, 171, 0, .16), rgba(255, 171, 0, 0) 62%),
            linear-gradient(160deg, var(--portal-burgundy-600) 0%, var(--portal-burgundy-800) 100%);
    }

    /* Faint runway lines: an ornament, kept low contrast on purpose. */
    .identity-aside::after {
        content: "";
        position: absolute;
        inset: auto -30% -35% -30%;
        height: 70%;
        background: repeating-linear-gradient(115deg, rgba(255, 255, 255, .05) 0 2px, rgba(255, 255, 255, 0) 2px 26px);
        pointer-events: none;
    }
}

.identity-aside-logo {
    display: block;
    width: 132px;
    height: auto;
}

.identity-aside-lede {
    position: relative;
    margin: 0;
    font-size: 1.05rem;
    font-weight: 500;
    line-height: 1.5;
}

.identity-aside-foot {
    position: relative;
    font-size: .8rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, .72);
}

/* Small-screen brand block, inside the form column. */
.identity-brand {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: 1.75rem;
}

.identity-brand-logo {
    display: block;
    height: 42px;
    width: auto;
}

.identity-brand-text {
    padding-left: .75rem;
    border-left: 1px solid var(--portal-line);
    color: var(--portal-ink-muted);
    font-size: .8rem;
    line-height: 1.35;
}

@media (min-width: 900px) {
    .identity-brand {
        display: none;
    }
}

.identity-main h1 {
    margin: 0 0 .5rem;
    font-size: 1.5rem;
}

.identity-main p {
    margin: 0 0 .75rem;
    color: var(--portal-ink-muted);
    font-size: .9rem;
    line-height: 1.55;
}

/* The form inside the card is plain: the card is the chrome. */
.identity-main .portal-form {
    max-width: none;
    margin-top: 1.5rem;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.identity-main .portal-form button {
    width: 100%;
    height: 46px;
    margin-top: 1.5rem;
}

/* Outbids .identity-main p, which would otherwise mute the banner's text. */
.identity-main .portal-status {
    margin: 1rem 0 0;
    color: #1f4d22;
}

.identity-foot {
    margin: 1.75rem 0 0;
    padding-top: 1.25rem;
    border-top: 1px solid var(--portal-line);
    color: var(--portal-ink-faint);
    font-size: .8rem;
    line-height: 1.5;
}

/* Access denied: the only action is secondary, not the page's primary call. */
.identity-actions {
    margin-top: 1.5rem;
}

.identity-actions button {
    height: 42px;
    padding: 0 1.25rem;
    border: 1px solid var(--portal-line-strong);
    background: #fff;
    color: var(--portal-ink);
    font-size: .9rem;
}

.identity-actions button:hover {
    border-color: var(--portal-burgundy-400);
    background: var(--portal-burgundy-50);
    color: var(--portal-ink);
}
