:root {
    --portal-primary: #17396d;
    --portal-primary-dark: #10284a;
    --portal-accent: #c62e2e;
    --portal-soft: #edf3fb;
    --portal-border: #d9e0ea;
    --portal-text: #182033;
    --portal-muted: #667085;
    --portal-success: #0f8a4b;
    --portal-success-bg: #e9f9ef;
    --portal-error: #b42318;
    --portal-error-bg: #feeeec;
    --portal-warning: #9a6700;
    --portal-warning-bg: #fff6dd;
    --portal-card: #ffffff;
    --portal-shadow: 0 18px 40px -24px rgba(16, 40, 74, 0.45);
    --portal-radius: 24px;
    --portal-page-gutter: 10vw;
    --portal-page-width: 80vw;
}

body.portal-body {
    background:
        radial-gradient(circle at top left, rgba(23, 57, 109, 0.12), transparent 24%),
        linear-gradient(180deg, #f7f9fc 0%, #edf1f7 100%);
    color: var(--portal-text);
    font-family: "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

body.portal-login-body {
    --portal-primary: #173f74;
    --portal-primary-dark: #102d54;
    --portal-accent: #c52b36;
    --portal-border: #d6d9de;
    --portal-text: #17191d;
    --portal-muted: #5f6875;
    --portal-card: #ffffff;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    background: linear-gradient(180deg, #f5f5f4 0%, #eceeef 100%);
}

body.portal-login-body button {
    margin: 0;
}

body.portal-body h1,
body.portal-body h2,
body.portal-body h3,
body.portal-body h4,
body.portal-body h5,
body.portal-body h6,
body.portal-body p,
body.portal-body a,
body.portal-body li,
body.portal-body strong,
body.portal-body span,
body.portal-body label,
body.portal-body input,
body.portal-body select,
body.portal-body textarea,
body.portal-body button {
    font-family: inherit;
}

body.portal-support-body {
    --portal-primary: #111827;
    --portal-primary-dark: #020617;
    --portal-accent: #2563eb;
    --portal-soft: #f3f4f6;
    --portal-border: rgba(15, 23, 42, 0.08);
    --portal-text: #0f172a;
    --portal-muted: #667085;
    --portal-success: #0f8a4b;
    --portal-success-bg: #edf9f1;
    --portal-error: #b42318;
    --portal-error-bg: #fff1f1;
    --portal-warning: #9a6700;
    --portal-warning-bg: #fff8e7;
    --portal-card: rgba(255, 255, 255, 0.82);
    --portal-shadow: 0 40px 80px -52px rgba(15, 23, 42, 0.3);
    background:
        radial-gradient(circle at top center, rgba(37, 99, 235, 0.09), transparent 28%),
        radial-gradient(circle at bottom left, rgba(15, 23, 42, 0.06), transparent 24%),
        linear-gradient(180deg, #fafafa 0%, #f4f5f7 100%);
}

.portal-page {
    width: var(--portal-page-width);
    margin: 120px var(--portal-page-gutter) 80px;
}

.portal-page.portal-admin {
    width: var(--portal-page-width);
}

.portal-page.portal-admin.portal-shop-admin-page {
    width: var(--portal-page-width);
    margin-right: var(--portal-page-gutter);
    margin-left: var(--portal-page-gutter);
}

.portal-page.portal-shop-page {
    width: var(--portal-page-width);
    margin-right: var(--portal-page-gutter);
    margin-left: var(--portal-page-gutter);
}

.portal-page.portal-admin.portal-user-admin-page {
    width: var(--portal-page-width);
    margin-right: var(--portal-page-gutter);
    margin-left: var(--portal-page-gutter);
}

.portal-page.portal-news-admin-page {
    width: var(--portal-page-width);
    margin-right: var(--portal-page-gutter);
    margin-left: var(--portal-page-gutter);
}

.portal-page.portal-events-admin-page {
    width: var(--portal-page-width);
    margin-right: var(--portal-page-gutter);
    margin-left: var(--portal-page-gutter);
}

.portal-page.portal-admin.portal-referee-admin-page {
    width: var(--portal-page-width);
    margin-right: var(--portal-page-gutter);
    margin-left: var(--portal-page-gutter);
}

.portal-page.portal-main-dashboard-page {
    width: var(--portal-page-width);
    margin-right: var(--portal-page-gutter);
    margin-left: var(--portal-page-gutter);
}

.portal-page.portal-referee-gallery-page {
    width: var(--portal-page-width);
    margin-right: var(--portal-page-gutter);
    margin-left: var(--portal-page-gutter);
}

.portal-page.portal-gallery-admin-page {
    width: var(--portal-page-width);
    margin-right: var(--portal-page-gutter);
    margin-left: var(--portal-page-gutter);
}

.portal-page.portal-public-gallery-page {
    width: var(--portal-page-width);
    margin-right: var(--portal-page-gutter);
    margin-left: var(--portal-page-gutter);
}

.portal-page.portal-requests-page {
    width: var(--portal-page-width);
    margin-right: var(--portal-page-gutter);
    margin-left: var(--portal-page-gutter);
}

.portal-page.portal-applications-page {
    width: var(--portal-page-width);
    margin-right: var(--portal-page-gutter);
    margin-left: var(--portal-page-gutter);
}

.portal-page.portal-profile-page {
    width: var(--portal-page-width);
    margin-right: var(--portal-page-gutter);
    margin-left: var(--portal-page-gutter);
    margin-top: 48px;
}

.portal-card,
.portal-panel,
.portal-section {
    background: var(--portal-card);
    border: 1px solid var(--portal-border);
    border-radius: var(--portal-radius);
    box-shadow: var(--portal-shadow);
}

.portal-card {
    padding: 2rem;
}

.portal-hero {
    display: grid;
    grid-template-columns: 1.25fr 0.9fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

body.portal-login-body .portal-login {
    --portal-login-card-pad: clamp(1.75rem, 3.4vw, 3rem);
    width: auto;
    min-height: 100vh;
    margin-top: 0;
    margin-bottom: 0;
    margin-left: var(--portal-page-gutter);
    margin-right: var(--portal-page-gutter);
    padding: 10vh 0;
    box-sizing: border-box;
    align-content: center;
}

.portal-login-page {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(1rem, 2.4vh, 2rem);
}

.portal-login-page::before {
    content: none;
}

.portal-login-page > * {
    position: relative;
    z-index: 1;
}

.portal-login-hero {
    display: grid;
    grid-template-columns: 11.5rem minmax(0, 1fr);
    align-items: center;
    gap: clamp(2rem, 4vw, 3.75rem);
    padding: clamp(0.75rem, 1.8vw, 1.5rem) 0;
}

.portal-login-brand {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-height: 8.75rem;
}

.portal-login-brand img {
    display: block;
    width: min(9rem, 100%);
    height: auto;
}

.portal-login-intro {
    padding: clamp(1rem, 2vw, 1.8rem) 0;
}

.portal-login-hero .portal-copy {
    max-width: 980px;
    margin: 0;
    color: var(--portal-muted);
    font-size: clamp(1rem, 1.35vw, 1.22rem);
    line-height: 1.65;
}

body.portal-login-body .portal-login .portal-title {
    margin-bottom: 0.9rem;
    color: var(--portal-text);
    font-size: clamp(2.75rem, 4.4vw, 4.25rem);
    font-family: inherit;
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1;
}

.portal-login-actions {
    margin: 0;
    padding-left: 0;
    align-items: center;
    justify-content: flex-start;
}

.portal-login-actions .portal-button-secondary,
.portal-login-actions .portal-button-ghost {
    flex: 0 0 10.75rem;
    width: 10.75rem;
    min-width: 0;
    min-height: 0;
    height: 2.75rem;
    padding: 0 1.2rem;
    border-color: #d4d8dd;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--portal-text);
    box-shadow: none;
    line-height: 1;
    box-sizing: border-box;
}

.portal-login-actions .portal-button-secondary {
    color: var(--portal-primary);
}

.portal-login-actions button.portal-button-secondary {
    font: inherit;
}

.portal-login-actions a.portal-button-ghost {
    padding-top: 0;
    padding-bottom: 0;
}

.portal-login-panel-stage {
    display: grid;
    margin: 0;
    perspective: 1400px;
}

.portal-login-panel {
    grid-area: 1 / 1;
    width: 100%;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    filter: blur(5px);
    transform: translateY(18px) scale(0.985) rotateX(-2deg);
    transform-origin: top center;
    transition:
        opacity 0.28s ease,
        transform 0.34s cubic-bezier(0.2, 0.8, 0.2, 1),
        filter 0.28s ease,
        visibility 0s linear 0.34s;
}

.portal-login-panel.is-active {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    filter: blur(0);
    transform: translateY(0) scale(1) rotateX(0);
    transition:
        opacity 0.28s ease 0.08s,
        transform 0.34s cubic-bezier(0.2, 0.8, 0.2, 1) 0.08s,
        filter 0.28s ease 0.08s,
        visibility 0s linear 0s;
}

.portal-login-card {
    display: grid;
    align-content: start;
    gap: 1.35rem;
    margin: 0;
    padding: var(--portal-login-card-pad);
    border: 0;
    border-radius: 28px;
    background: #ffffff;
    box-shadow: none;
}

.portal-login-card-heading h2 {
    margin: 0;
    font-size: clamp(1.6rem, 2.4vw, 2.25rem);
    letter-spacing: 0;
}

.portal-login-card .portal-form {
    align-content: start;
    gap: 1.35rem;
}

.portal-login-card .portal-grid.two-col {
    align-items: start;
    column-gap: clamp(1.25rem, 3vw, 2rem);
}

.portal-login-card .portal-field {
    gap: 0.55rem;
    grid-template-rows: auto auto auto;
}

.portal-login-card .portal-field label {
    font-size: 1rem;
}

.portal-login-card .portal-field input {
    height: 3.25rem;
    min-height: 0;
    padding: 0 1rem;
    border-color: #d2d5da;
    border-radius: 18px;
    background: #fcfcfd;
    font-size: 1rem;
    line-height: 1;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.portal-login-card .portal-field input:focus {
    border-color: var(--portal-primary);
    background: #ffffff;
    box-shadow:
        0 0 0 4px rgba(23, 63, 116, 0.13),
        0 12px 28px -22px rgba(23, 25, 29, 0.4);
    outline: none;
}

.portal-password-control {
    position: relative;
}

.portal-password-control input {
    padding-right: 3.15rem;
}

.portal-password-toggle {
    position: absolute;
    top: 50%;
    right: 0.85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.2rem;
    height: 2.2rem;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--portal-muted);
    cursor: pointer;
    transform: translateY(-50%);
    transition: background 0.2s ease, color 0.2s ease;
}

.portal-password-toggle:hover,
.portal-password-toggle:focus-visible {
    background: rgba(23, 57, 109, 0.08);
    color: var(--portal-primary);
    outline: none;
}

.portal-password-toggle svg {
    width: 1.25rem;
    height: 1.25rem;
}

.portal-password-eye-off,
.portal-password-toggle.is-visible .portal-password-eye {
    display: none;
}

.portal-password-toggle.is-visible .portal-password-eye-off {
    display: block;
}

.portal-login-help-link {
    justify-self: start;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--portal-primary);
    font: inherit;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
}

.portal-login-help-link:hover,
.portal-login-help-link:focus-visible {
    color: var(--portal-primary-dark);
    text-decoration: underline;
    outline: none;
}

.portal-access-card[hidden] {
    display: none;
}

.portal-access-copy {
    display: grid;
    gap: 0.7rem;
    max-width: 940px;
    color: var(--portal-muted);
    line-height: 1.7;
}

.portal-access-copy p {
    margin: 0;
}

.portal-access-actions {
    gap: 0.8rem;
    align-items: center;
}

.portal-password-request-form {
    max-width: 720px;
}

.portal-email-check-message[data-state="checking"] {
    color: var(--portal-muted);
}

.portal-email-check-message[data-state="success"] {
    color: var(--portal-success);
}

.portal-email-check-message[data-state="warning"] {
    color: var(--portal-warning);
}

.portal-email-check-message[data-state="error"] {
    color: var(--portal-error);
}

.portal-login-card .portal-button {
    min-width: 7rem;
    background: var(--portal-primary);
}

.portal-login-card .portal-button,
.portal-login-card .portal-button-secondary,
.portal-login-card .portal-button-ghost {
    min-height: 44px;
    padding: 0.65rem 1.1rem;
    border-radius: 14px;
    line-height: 1.2;
    box-sizing: border-box;
}

.portal-password-reset-page {
    min-height: 52vh;
    align-content: start;
}

.portal-password-reset-card {
    max-width: 980px;
}

.portal-password-reset-notice {
    display: grid;
    gap: 1rem;
    padding: 1.5rem;
    border-color: rgba(180, 35, 42, 0.22);
}

.portal-password-reset-request-list {
    display: grid;
    gap: 0.85rem;
}

.portal-password-reset-request-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid var(--portal-border);
    border-radius: 18px;
    background: #f8fafc;
}

.portal-password-reset-request-item > div:first-child {
    display: grid;
    gap: 0.2rem;
}

.portal-password-reset-request-item span,
.portal-password-reset-request-item small {
    color: var(--portal-muted);
}

.portal-password-reset-request-actions {
    justify-content: flex-end;
}

.portal-password-reset-request-actions form {
    margin: 0;
}

.portal-title {
    margin: 0 0 0.75rem;
    font-size: clamp(2.3rem, 4vw, 3.5rem);
    letter-spacing: -0.04em;
    line-height: 1;
}

.portal-eyebrow {
    margin: 0 0 0.75rem;
    color: var(--portal-accent);
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.portal-copy,
.portal-muted {
    color: var(--portal-muted);
    line-height: 1.7;
}

.portal-grid {
    display: grid;
    gap: 1rem;
}

.portal-grid.two-col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.portal-grid.three-col {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.portal-grid.four-col {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.portal-form {
    display: grid;
    gap: 1rem;
}

.portal-field {
    display: grid;
    gap: 0.45rem;
}

.portal-field label {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--portal-text);
}

.portal-field input,
.portal-field select,
.portal-field textarea {
    width: 100%;
    padding: 0.85rem 0.95rem;
    border: 1px solid var(--portal-border);
    border-radius: 16px;
    background: #fbfcfe;
    color: var(--portal-text);
    font: inherit;
}

.portal-field textarea {
    min-height: 110px;
    resize: vertical;
}

.portal-field-help {
    margin: 0;
    color: var(--portal-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

.portal-size-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(86px, 1fr));
    gap: 0.65rem;
    max-width: 760px;
}

.portal-size-option {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    min-height: 48px;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--portal-border);
    border-radius: 14px;
    background: #fbfcfe;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.portal-size-option input {
    width: 18px;
    height: 18px;
    min-width: 18px;
    margin: 0;
    accent-color: var(--portal-primary);
    cursor: pointer;
    order: 2;
}

.portal-form .portal-size-option input[type="checkbox"],
.portal-inline-form .portal-size-option input[type="checkbox"] {
    width: 18px;
    min-width: 18px;
    height: 18px;
    padding: 0;
    border: 1px solid #8a94a6;
    border-radius: 4px;
    background: #fff;
}

.portal-size-option span {
    order: 1;
    color: var(--portal-text);
    font-size: 0.9rem;
    font-weight: 800;
}

.portal-size-option:has(input:checked) {
    border-color: var(--portal-primary);
    background: #eef5ff;
    box-shadow: inset 0 0 0 1px rgba(23, 57, 109, 0.12);
}

.portal-size-option:has(input:focus-visible) {
    outline: 3px solid rgba(37, 99, 235, 0.22);
    outline-offset: 2px;
}

.portal-check {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.95rem;
    color: var(--portal-text);
}

.portal-form .portal-check input[type="checkbox"],
.portal-inline-form .portal-check input[type="checkbox"] {
    width: 18px;
    min-width: 18px;
    height: 18px;
    margin: 0;
    padding: 0;
    flex: 0 0 18px;
    accent-color: var(--portal-primary);
    cursor: pointer;
}

.portal-button,
.portal-button-secondary,
.portal-button-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 48px;
    padding: 0.85rem 1.25rem;
    border-radius: 16px;
    border: 1px solid transparent;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.portal-button:hover,
.portal-button-secondary:hover,
.portal-button-ghost:hover,
.portal-button:focus-visible,
.portal-button-secondary:focus-visible,
.portal-button-ghost:focus-visible {
    transform: translateY(-1px);
    outline: none;
}

.portal-button {
    background: var(--portal-primary);
    color: white;
}

.portal-button-secondary {
    background: var(--portal-soft);
    border-color: var(--portal-border);
    color: var(--portal-primary);
}

.portal-button-ghost {
    background: transparent;
    border-color: var(--portal-border);
    color: var(--portal-text);
}

.portal-sign-out-icon,
.portal-profile-icon {
    width: 1.15em;
    height: 1.15em;
    flex: 0 0 auto;
}

.portal-button-danger {
    border-color: rgba(180, 35, 24, 0.24);
    color: var(--portal-error);
}

.portal-button-danger:hover,
.portal-button-danger:focus-visible {
    background: var(--portal-error);
    border-color: var(--portal-error);
    color: #ffffff;
}

.portal-icon-button svg {
    width: 1.15em;
    height: 1.15em;
    flex: 0 0 auto;
}

.portal-button-with-arrow::after {
    content: "";
    width: 0.95rem;
    height: 0.95rem;
    flex: 0 0 auto;
    background: currentColor;
    mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 17 17 7M9 7h8v8' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

.portal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.portal-action-info-row,
.portal-action-link-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
}

.portal-action-info-row > span.portal-button-secondary {
    min-height: 44px;
    background: rgba(255, 255, 255, 0.68);
    border-color: rgba(148, 163, 184, 0.22);
    color: #475569;
    box-shadow: none;
    cursor: default;
}

.portal-action-link-row > a.portal-button-secondary {
    min-height: 44px;
    background: rgba(255, 255, 255, 0.94);
    border-color: rgba(23, 57, 109, 0.2);
    color: #17396d;
    box-shadow: 0 18px 38px -30px rgba(15, 23, 42, 0.72);
}

.portal-action-link-row > a.portal-button-secondary::after {
    content: "";
    width: 0.95rem;
    height: 0.95rem;
    background: currentColor;
    mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 17 17 7M9 7h8v8' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

.portal-admin-page-actions,
.portal-news-admin-page-actions,
.portal-events-admin-page-actions,
.portal-referee-admin-page-actions,
.portal-shop-page-actions,
.portal-support-page-actions,
.portal-main-dashboard-actions,
.portal-referee-gallery-page-actions,
.portal-gallery-admin-page-actions,
.portal-requests-page-actions {
    row-gap: 0.85rem;
    column-gap: 0.75rem;
}

.portal-applications-page-actions {
    row-gap: 0.85rem;
    column-gap: 0.75rem;
}

.portal-admin-page-actions > span.portal-button-secondary,
.portal-news-admin-page-actions > span.portal-button-secondary,
.portal-events-admin-page-actions > span.portal-button-secondary,
.portal-referee-admin-page-actions > span.portal-button-secondary,
.portal-shop-page-actions > span.portal-button-secondary,
.portal-support-page-actions > span.portal-button-secondary,
.portal-main-dashboard-actions > span.portal-button-secondary,
.portal-referee-gallery-page-actions > span.portal-button-secondary,
.portal-gallery-admin-page-actions > span.portal-button-secondary,
.portal-requests-page-actions > span.portal-button-secondary {
    min-height: 44px;
    background: rgba(255, 255, 255, 0.68);
    border-color: rgba(148, 163, 184, 0.22);
    color: #475569;
    box-shadow: none;
    cursor: default;
}

.portal-applications-page-actions > span.portal-button-secondary {
    min-height: 44px;
    background: rgba(255, 255, 255, 0.68);
    border-color: rgba(148, 163, 184, 0.22);
    color: #475569;
    box-shadow: none;
    cursor: default;
}

.portal-referee-admin-stat-row > span.portal-button-secondary {
    min-height: 44px;
    background: rgba(255, 255, 255, 0.68);
    border-color: rgba(148, 163, 184, 0.22);
    color: #475569;
    box-shadow: none;
    cursor: default;
}

.portal-admin-page-actions > a.portal-button-secondary,
.portal-news-admin-page-actions > a.portal-button-secondary,
.portal-events-admin-page-actions > a.portal-button-secondary,
.portal-referee-admin-page-actions > a.portal-button-secondary,
.portal-shop-page-actions > a.portal-button-secondary,
.portal-support-page-actions > a.portal-button-secondary,
.portal-main-dashboard-actions > a.portal-button-secondary,
.portal-referee-gallery-page-actions > a.portal-button-secondary,
.portal-gallery-admin-page-actions > a.portal-button-secondary,
.portal-requests-page-actions > a.portal-button-secondary {
    min-height: 44px;
    background: rgba(255, 255, 255, 0.94);
    border-color: rgba(23, 57, 109, 0.2);
    color: #17396d;
    box-shadow: 0 18px 38px -30px rgba(15, 23, 42, 0.72);
}

.portal-referee-admin-button-row > a.portal-button-secondary {
    min-height: 44px;
    background: rgba(255, 255, 255, 0.94);
    border-color: rgba(23, 57, 109, 0.2);
    color: #17396d;
    box-shadow: 0 18px 38px -30px rgba(15, 23, 42, 0.72);
}

.portal-applications-page-actions > a.portal-button-secondary {
    min-height: 44px;
    background: rgba(255, 255, 255, 0.94);
    border-color: rgba(23, 57, 109, 0.2);
    color: #17396d;
    box-shadow: 0 18px 38px -30px rgba(15, 23, 42, 0.72);
}

.portal-admin-page-actions > a.portal-button-secondary::after,
.portal-news-admin-page-actions > a.portal-button-secondary::after,
.portal-events-admin-page-actions > a.portal-button-secondary::after,
.portal-referee-admin-page-actions > a.portal-button-secondary::after,
.portal-shop-page-actions > a.portal-button-secondary::after,
.portal-support-page-actions > a.portal-button-secondary::after,
.portal-main-dashboard-actions > a.portal-button-secondary::after,
.portal-referee-gallery-page-actions > a.portal-button-secondary::after,
.portal-gallery-admin-page-actions > a.portal-button-secondary::after,
.portal-requests-page-actions > a.portal-button-secondary::after {
    content: "";
    width: 0.95rem;
    height: 0.95rem;
    background: currentColor;
    mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 17 17 7M9 7h8v8' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

.portal-referee-admin-button-row > a.portal-button-secondary::after {
    content: "";
    width: 0.95rem;
    height: 0.95rem;
    background: currentColor;
    mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 17 17 7M9 7h8v8' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

.portal-applications-page-actions > a.portal-button-secondary::after {
    content: "";
    width: 0.95rem;
    height: 0.95rem;
    background: currentColor;
    mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 17 17 7M9 7h8v8' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

.portal-shop-admin-page .portal-admin-hero {
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.portal-user-admin-page .portal-admin-hero {
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.portal-shop-admin-page .portal-admin-hero .portal-row-between {
    display: block;
}

.portal-user-admin-page .portal-admin-hero .portal-row-between {
    display: block;
}

.portal-shop-admin-page .portal-admin-page-actions {
    justify-content: flex-start;
    margin: 0.85rem 0 1.5rem;
}

.portal-user-admin-page .portal-admin-page-actions {
    justify-content: flex-start;
    margin: 0.85rem 0 1.5rem;
}

.portal-shop-admin-page .portal-admin-layout-main {
    margin-top: 100px;
}

.portal-user-admin-page .portal-admin-layout-main {
    margin-top: 100px;
}

.portal-news-admin-page .portal-news-admin-hero {
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.portal-news-admin-page .portal-news-admin-hero .portal-copy,
.portal-news-admin-page .portal-news-admin-hero .portal-eyebrow {
    color: var(--portal-muted);
}

.portal-news-admin-page .portal-news-admin-page-actions {
    justify-content: flex-start;
    align-items: center;
    margin: 0.85rem 0 100px;
}

.portal-news-admin-page .portal-news-admin-count {
    cursor: default;
}

.portal-logs-admin-page .portal-logs-admin-hero {
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.portal-logs-admin-page .portal-logs-admin-hero .portal-copy,
.portal-logs-admin-page .portal-logs-admin-hero .portal-eyebrow {
    color: var(--portal-muted);
}

.portal-logs-admin-page .portal-logs-admin-page-actions {
    justify-content: flex-start;
    align-items: center;
    margin: 0.85rem 0 1.5rem;
}

.portal-logs-admin-page .portal-logs-admin-count {
    cursor: default;
}

.portal-logs-summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 1.5rem;
}

.portal-logs-summary-card {
    display: grid;
    gap: 0.35rem;
    padding: 1.35rem 1.45rem;
    border-left: 4px solid var(--logs-accent);
}

.portal-logs-summary-card p {
    margin: 0;
    color: var(--portal-muted);
    font-size: 0.92rem;
}

.portal-logs-summary-card strong {
    color: var(--logs-accent);
    font-size: clamp(1.7rem, 3.2vw, 2.35rem);
    line-height: 1;
}

.portal-logs-filters-section,
.portal-logs-feed-section {
    display: grid;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
    padding: 20px 40px;
}

.portal-logs-feed {
    display: grid;
    gap: 0.85rem;
}

.portal-logs-entry {
    display: grid;
    gap: 0.75rem;
    padding: 1rem 1.1rem;
    border: 1px solid var(--portal-border);
    border-radius: 18px;
    background: #fdfefe;
}

.portal-logs-entry-topline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 0.55rem;
}

.portal-logs-entry-details {
    margin: 0;
    color: var(--portal-text);
    line-height: 1.65;
}

.portal-logs-entry-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem 0.8rem;
    margin-top: 0.85rem;
    color: var(--portal-muted);
    font-size: 0.9rem;
}

.portal-logs-pagination {
    justify-content: flex-end;
    margin-top: 0.35rem;
}

.portal-news-admin-create-grid {
    grid-template-columns: minmax(0, 1fr);
}

.portal-news-admin-page .news-admin-article-card {
    gap: 0;
    padding: 0;
    overflow: hidden;
}

.news-admin-article-summary {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1.5rem;
    align-items: center;
    width: 100%;
    margin: 0;
    padding: 1rem 1.25rem;
    border: 0;
    background: transparent;
    color: var(--portal-text);
    text-align: left;
    cursor: pointer;
}

.news-admin-article-summary:hover,
.news-admin-article-summary:focus-visible {
    background: rgba(23, 57, 109, 0.045);
    outline: none;
}

.news-admin-article-summary-main {
    display: grid;
    gap: 0.25rem;
    min-width: 0;
}

.news-admin-article-summary-main strong {
    overflow: hidden;
    font-size: 1.05rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.news-admin-article-summary-main > span {
    color: var(--portal-muted);
    font-size: 0.9rem;
}

.news-admin-article-byline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 0.75rem;
    margin-top: 0.2rem;
    color: var(--portal-muted);
    font-size: 0.78rem;
    font-weight: 500;
    line-height: 1.45;
}

.news-admin-article-byline > span {
    padding-left: 0.75rem;
    border-left: 1px solid var(--portal-border);
}

.news-admin-article-summary-meta {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    color: var(--portal-muted);
    font-size: 0.86rem;
    white-space: nowrap;
}

.news-admin-article-status {
    padding: 0.3rem 0.55rem;
    border-radius: 999px;
    background: var(--portal-warning-bg);
    color: var(--portal-warning);
    font-size: 0.78rem;
    font-weight: 700;
}

.news-admin-article-status.is-published {
    background: var(--portal-success-bg);
    color: var(--portal-success);
}

.news-admin-article-chevron {
    width: 0.65rem;
    height: 0.65rem;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.25s ease;
}

.news-admin-article-card.is-expanded .news-admin-article-chevron {
    transform: rotate(225deg);
}

.news-admin-article-panel {
    display: grid;
    grid-template-rows: 0fr;
    border-top: 1px solid transparent;
    transition: grid-template-rows 0.32s ease, border-color 0.2s ease;
}

.news-admin-article-card.is-expanded .news-admin-article-panel {
    grid-template-rows: 1fr;
    border-top-color: var(--portal-border);
}

.news-admin-article-panel-inner {
    min-height: 0;
    overflow: hidden;
}

.news-admin-article-panel-inner > .portal-form {
    padding: 1.25rem;
}

.news-admin-progressive-upload {
    display: grid;
    gap: 0.75rem;
}

.news-admin-upload-list {
    display: grid;
    gap: 0.65rem;
}

.portal-news-admin-page .news-admin-upload-slot {
    display: grid;
    grid-template-columns: minmax(6.5rem, 9rem) minmax(0, 1fr) auto;
    gap: 0.65rem;
    align-items: center;
    padding: 0.75rem;
    border: 1px solid rgba(15, 23, 42, 0.09);
    border-radius: 10px;
    background: #ffffff;
}

.portal-news-admin-page .news-admin-upload-slot[hidden],
.portal-news-admin-page .news-admin-upload-metadata[hidden],
.portal-news-admin-page .news-admin-upload-remove[hidden],
.portal-news-admin-page .news-admin-add-upload[hidden] {
    display: none;
}

.news-admin-upload-slot-header {
    display: contents;
}

.news-admin-upload-slot-header label {
    grid-column: 1;
    margin: 0;
}

.portal-news-admin-page .news-admin-upload-slot > input[type="file"] {
    grid-column: 2;
    min-width: 0;
}

.news-admin-upload-remove {
    grid-column: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--portal-muted);
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
}

.news-admin-upload-remove:hover,
.news-admin-upload-remove:focus-visible {
    background: var(--portal-error-bg);
    color: var(--portal-error);
    outline: none;
}

.news-admin-upload-metadata {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}

.news-admin-upload-metadata input:only-child {
    grid-column: 1 / -1;
}

.news-admin-upload-metadata.is-photo {
    grid-template-columns: 4.5rem minmax(0, 1fr);
    align-items: center;
}

.news-admin-upload-preview {
    width: 4.5rem;
    height: 4.5rem;
    border-radius: 8px;
    object-fit: cover;
    background: var(--portal-soft);
}

.news-admin-upload-preview[hidden] {
    display: none;
}

.news-admin-thumbnail-field {
    display: grid;
    gap: 0.75rem;
}

.news-admin-thumbnail-preview {
    width: min(100%, 18rem);
    max-height: 12rem;
    border-radius: 12px;
    object-fit: cover;
    border: 1px solid var(--portal-border);
    background: var(--portal-soft);
    box-shadow: 0 12px 24px -22px rgba(15, 23, 42, 0.8);
}

.news-admin-thumbnail-preview[hidden] {
    display: none;
}

.news-admin-existing-thumbnail {
    max-width: 18rem;
}

.news-admin-add-upload {
    justify-self: start;
    min-height: 40px;
    margin: 0;
    padding: 0.55rem 0.85rem;
    border: 1px solid var(--portal-border);
    border-radius: 10px;
    background: #ffffff;
    color: var(--portal-primary);
    font-weight: 700;
    cursor: pointer;
}

.news-admin-add-upload:hover,
.news-admin-add-upload:focus-visible {
    border-color: rgba(23, 57, 109, 0.32);
    background: var(--portal-soft);
    outline: none;
}

.portal-events-admin-page .portal-events-admin-hero {
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.portal-events-admin-page .portal-events-admin-hero .portal-copy,
.portal-events-admin-page .portal-events-admin-hero .portal-eyebrow {
    color: var(--portal-muted);
}

.portal-events-admin-page .portal-events-admin-page-actions {
    justify-content: flex-start;
    align-items: center;
    margin: 0.85rem 0 100px;
}

.portal-events-admin-page .portal-events-admin-count {
    cursor: default;
}

.portal-referee-admin-page .portal-referee-admin-hero {
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.portal-referee-admin-page .portal-referee-admin-hero .portal-copy,
.portal-referee-admin-page .portal-referee-admin-hero .portal-eyebrow {
    color: var(--portal-muted);
}

.portal-referee-admin-page .portal-referee-admin-page-actions {
    display: grid;
    justify-content: flex-start;
    align-items: center;
    gap: 1.05rem;
    margin: 0.85rem 0 100px;
}

.portal-referee-admin-stat-row,
.portal-referee-admin-button-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.portal-referee-admin-page .portal-referee-admin-count {
    cursor: default;
}

.portal-referee-admin-create-section {
    margin-bottom: 100px;
}

.portal-events-entry-list {
    display: grid;
    gap: 0.75rem;
}

.portal-events-entry-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.75rem;
    align-items: end;
    padding: 0.8rem;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 18px;
    background: rgba(248, 250, 252, 0.72);
}

.portal-events-entry-edit {
    display: grid;
    grid-template-columns: 100px 180px minmax(240px, 1fr) auto;
    gap: 0.75rem;
    align-items: end;
}

.portal-events-entry-row .portal-field {
    gap: 0.35rem;
}

.portal-events-entry-row .portal-field span {
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--portal-muted);
}

.portal-events-entry-row select,
.portal-events-entry-row input[type="text"] {
    min-height: 46px;
}

.portal-events-entry-delete {
    display: flex;
    align-items: end;
}

.portal-flash-stack {
    position: fixed;
    top: 116px;
    right: 2rem;
    z-index: 3000;
    width: min(390px, calc(100vw - 2rem));
    margin: 0;
    display: grid;
    gap: 0.75rem;
    pointer-events: none;
}

.portal-flash {
    margin: 0;
    padding: 0.95rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 20px;
    box-shadow: 0 24px 70px -34px rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(16px);
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.45;
    animation:
        portalFlashIn 220ms ease-out both,
        portalFlashOut 260ms ease-in 4.8s forwards;
    pointer-events: auto;
}

.portal-flash-success {
    background: rgba(236, 253, 245, 0.94);
    color: var(--portal-success);
}

.portal-flash-error {
    background: rgba(254, 242, 242, 0.94);
    color: var(--portal-error);
}

.portal-flash-warning {
    background: rgba(255, 251, 235, 0.94);
    color: var(--portal-warning);
}

@keyframes portalFlashIn {
    from {
        opacity: 0;
        transform: translate(18px, -4px);
    }

    to {
        opacity: 1;
        transform: translate(0, 0);
    }
}

@keyframes portalFlashOut {
    to {
        opacity: 0;
        transform: translateX(18px);
        visibility: hidden;
    }
}

.portal-stat-list {
    display: grid;
    gap: 0.9rem;
}

.portal-stat {
    padding: 1rem 1.1rem;
    border-radius: 18px;
    background: var(--portal-soft);
}

.portal-stat strong {
    display: block;
    font-size: 1.65rem;
    line-height: 1;
    margin-bottom: 0.35rem;
    font-weight: 800;
}

.portal-shop-layout {
    display: grid;
    grid-template-columns: 1.5fr 0.85fr;
    gap: 1.5rem;
    align-items: start;
}

.portal-shop-page .portal-shop-hero {
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    color: var(--portal-text);
}

.portal-shop-page .portal-shop-hero .portal-copy,
.portal-shop-page .portal-shop-hero .portal-eyebrow {
    color: var(--portal-muted);
}

.portal-shop-page .portal-shop-page-actions {
    justify-content: flex-start;
    align-items: center;
    margin: 0.85rem 0 100px;
}

.portal-shop-page .portal-shop-count {
    cursor: default;
}

.portal-shop-page .portal-shop-layout {
    gap: 2rem;
}

.portal-shop-panel {
    padding: 1.5rem;
}

.portal-shop-cart-panel {
    position: sticky;
    top: 120px;
}

.portal-shop-history {
    margin-top: 100px;
    margin-bottom: 100px;
}

.portal-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1rem;
}

.portal-product-card {
    padding: 0.8rem;
    border: 1px solid var(--portal-border);
    border-radius: 20px;
    background: #fff;
}

.portal-product-visual {
    position: relative;
    margin-bottom: 0.75rem;
}

.portal-product-card img {
    display: block;
    width: 100%;
    height: 175px;
    object-fit: contain;
    border-radius: 16px;
    background: #f5f7fb;
}

.portal-product-overlay {
    position: absolute;
    top: 0.65rem;
    left: 0.65rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
    max-width: calc(100% - 1.3rem);
}

.portal-product-overlay .portal-price,
.portal-product-overlay .portal-badge {
    min-height: 30px;
    padding: 0.3rem 0.65rem;
    border: 1px solid rgba(23, 57, 109, 0.1);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 8px 18px -14px rgba(16, 40, 74, 0.55);
    backdrop-filter: blur(8px);
}

.portal-product-overlay .portal-price {
    display: inline-flex;
    align-items: center;
    font-size: 1rem;
}

.portal-product-card .portal-form {
    gap: 0.7rem;
    margin-top: 0.75rem;
}

.portal-product-card h3,
.portal-section-title {
    margin: 0 0 0.4rem;
    font-size: 1.25rem;
}

.portal-product-meta {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: center;
    margin: 0.75rem 0;
}

.portal-price {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--portal-primary);
}

.portal-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: var(--portal-soft);
    color: var(--portal-primary);
    font-size: 0.82rem;
    font-weight: 700;
    text-align: center;
}

.portal-badge.portal-badge-success {
    background: var(--portal-success-bg);
    color: var(--portal-success);
}

.portal-badge.portal-badge-warning {
    background: var(--portal-warning-bg);
    color: var(--portal-warning);
}

.portal-badge.portal-badge-danger {
    background: var(--portal-error-bg);
    color: var(--portal-error);
}

.portal-badge.portal-badge-neutral {
    background: #eef2f7;
    color: #44506a;
}

.portal-cart-list,
.portal-order-list {
    display: grid;
    gap: 0.85rem;
}

.portal-cart-item,
.portal-order-card,
.portal-admin-card {
    padding: 1rem;
    border: 1px solid var(--portal-border);
    border-radius: 18px;
    background: #fff;
}

.portal-product-list-heading {
    margin: 1.35rem 0 0.85rem;
}

.portal-product-list-heading h3 {
    margin: 0;
    color: var(--portal-text);
    font-size: 1.15rem;
}

.portal-product-admin-list {
    gap: 1rem;
}

.portal-product-admin-card {
    padding: 1.15rem;
}

.portal-product-card-actions {
    justify-content: flex-end;
    padding-top: 0.9rem;
    margin-top: 0.25rem;
    border-top: 1px solid var(--portal-border);
}

.portal-collapsible-section {
    padding: 0;
    overflow: hidden;
}

.portal-collapsible-section details {
    display: block;
}

.portal-collapsible-section summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.5rem;
    cursor: pointer;
    list-style: none;
}

.portal-collapsible-section summary::-webkit-details-marker {
    display: none;
}

.portal-collapsible-section summary > span:first-child {
    display: grid;
    gap: 0.35rem;
}

.portal-collapsible-section summary .portal-eyebrow,
.portal-collapsible-section summary .portal-section-title {
    margin: 0;
}

.portal-collapsible-meta {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    flex: 0 0 auto;
}

.portal-collapsible-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0.55rem 0.85rem;
    border: 1px solid var(--portal-border);
    border-radius: 14px;
    background: #f8fafc;
    color: var(--portal-primary);
    font-size: 0.85rem;
    font-weight: 800;
}

.portal-collapsible-section details[open] .portal-collapsible-toggle {
    font-size: 0;
}

.portal-collapsible-section details[open] .portal-collapsible-toggle::before {
    content: "Minimize";
    font-size: 0.85rem;
}

.portal-collapsible-body {
    padding: 0 1.5rem 1.5rem;
}

.portal-order-item-list {
    display: grid;
    gap: 0.65rem;
    margin: 0.95rem 0;
}

.portal-order-item-row {
    display: grid;
    grid-template-columns: 64px minmax(180px, 1fr) auto;
    align-items: center;
    gap: 0.85rem;
    padding: 0.75rem;
    border: 1px solid var(--portal-border);
    border-radius: 16px;
    background: #f8fbff;
}

.portal-order-item-row img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    border-radius: 14px;
    background: #fff;
}

.portal-order-item-copy {
    display: grid;
    gap: 0.2rem;
    min-width: 0;
}

.portal-order-item-copy strong {
    color: var(--portal-text);
    line-height: 1.2;
}

.portal-order-item-copy span,
.portal-order-item-meta span {
    color: var(--portal-muted);
    font-size: 0.9rem;
}

.portal-order-item-meta {
    display: grid;
    gap: 0.2rem;
    justify-items: end;
}

.portal-order-status-inline {
    justify-content: flex-start;
    margin: 0;
}

.portal-order-status-inline select {
    min-width: 150px;
}

.portal-order-footer-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-top: 1.35rem;
}

.portal-referee-admin-preview {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 220px;
}

.portal-referee-admin-preview img {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    object-fit: cover;
    border: 1px solid var(--portal-border);
    background: var(--portal-soft);
}

.portal-referee-admin-preview div {
    display: grid;
    gap: 0.25rem;
}

.portal-referee-division-list {
    display: grid;
    gap: 1.25rem;
}

.portal-referee-division {
    display: grid;
    gap: 0.85rem;
}

.portal-referee-search-form {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 0 0 1.25rem;
}

.portal-referee-search-field {
    flex: 1 1 320px;
}

.portal-referee-search-field span {
    display: block;
    margin-bottom: 0.45rem;
    color: var(--portal-muted);
    font-size: 0.9rem;
    font-weight: 700;
}

.portal-referee-search-field input {
    min-height: 56px;
    height: 56px;
    border-radius: 22px;
}

.portal-referee-search-actions {
    display: flex;
    margin: 0;
    gap: 0.7rem;
    align-items: stretch;
}

.portal-referee-search-actions .portal-button-secondary,
.portal-referee-search-actions .portal-button-ghost {
    min-height: 56px;
    height: 56px;
    padding-top: 0;
    padding-bottom: 0;
    border-radius: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    line-height: 1;
    vertical-align: middle;
    margin: 0;
}

.portal-referee-search-summary {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex-wrap: wrap;
    margin: 0 0 1.25rem;
}

.portal-referee-search-summary p {
    margin: 0;
    color: var(--portal-muted);
}

.portal-referee-division-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.15rem;
    border: 1px solid var(--portal-border);
    border-radius: 18px;
    background: rgba(248, 250, 252, 0.78);
    color: var(--portal-text);
    cursor: pointer;
    text-align: left;
}

.portal-referee-division-header h3 {
    margin: 0;
    color: var(--portal-text);
    font-size: clamp(1.2rem, 2vw, 1.65rem);
}

.portal-referee-division-header-meta {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.portal-referee-division-chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(148, 163, 184, 0.18);
    transition: transform 0.2s ease;
}

.portal-referee-division-chevron svg {
    width: 18px;
    height: 18px;
}

.portal-referee-bars {
    display: grid;
    gap: 0.7rem;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.28s ease, opacity 0.2s ease;
}

.portal-referee-division.is-expanded .portal-referee-bars {
    max-height: 10000px;
    opacity: 1;
}

.portal-referee-division.is-expanded .portal-referee-division-chevron {
    transform: rotate(180deg);
}

.portal-referee-bar {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) auto;
    align-items: center;
    gap: 0.85rem;
    padding: 0.75rem 0.9rem;
    border: 1px solid var(--portal-border);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.9);
}

.portal-referee-bar.is-inactive {
    background: rgba(248, 250, 252, 0.62);
    border-color: rgba(148, 163, 184, 0.18);
}

.portal-referee-bar.is-inactive .portal-referee-bar-person img {
    opacity: 0.58;
    filter: grayscale(0.55);
}

.portal-referee-bar.is-inactive .portal-referee-bar-person strong {
    color: #64748b;
}

.portal-referee-inline-status {
    display: inline-flex;
    align-items: center;
    margin-left: 0.45rem;
    padding: 0.18rem 0.45rem;
    border-radius: 999px;
    background: rgba(254, 226, 226, 0.86);
    color: #991b1b !important;
    font-size: 0.72rem !important;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.portal-referee-bar-person {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    min-width: 0;
}

.portal-referee-bar-person img {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    object-fit: cover;
    background: var(--portal-soft);
    flex: 0 0 auto;
}

.portal-referee-bar-person div {
    display: grid;
    gap: 0.18rem;
    min-width: 0;
}

.portal-referee-bar-person strong {
    color: var(--portal-text);
    font-size: 1.05rem;
    line-height: 1.2;
}

.portal-referee-profile-link {
    color: var(--portal-text);
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.2;
    text-decoration: none;
    width: max-content;
    max-width: 100%;
}

.portal-referee-profile-link:hover,
.portal-referee-profile-link:focus-visible {
    color: var(--portal-primary);
    text-decoration: underline;
    text-underline-offset: 0.18em;
}

.portal-referee-bar.is-inactive .portal-referee-profile-link {
    color: #64748b;
}

.portal-referee-bar-person span {
    color: var(--portal-muted);
    font-size: 0.95rem;
}

.portal-referee-bar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.portal-referee-quick-form label {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin: 0;
}

.portal-referee-more-trigger {
    color: var(--portal-text);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.portal-referee-quick-form select {
    width: auto;
    min-width: 220px;
    min-height: 44px;
    padding: 0.55rem 0.8rem;
    border: 1px solid var(--portal-border);
    border-radius: 16px;
    background: #fff;
    color: var(--portal-text);
    font: inherit;
}

.portal-referee-status-form {
    margin: 0;
}

.portal-referee-status-select {
    min-width: 160px;
    min-height: 44px;
    padding: 0.55rem 0.85rem;
    border-radius: 999px;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.portal-referee-status-select.is-active {
    color: #166534;
    border: 1px solid rgba(34, 197, 94, 0.28);
    background: rgba(220, 252, 231, 0.72);
}

.portal-referee-status-select.is-inactive {
    color: #991b1b;
    border: 1px solid rgba(239, 68, 68, 0.32);
    background: rgba(254, 226, 226, 0.78);
}

.portal-referee-more-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    min-width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 999px;
    white-space: nowrap;
}

.portal-referee-more-trigger svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 3;
    stroke-linecap: round;
}

.portal-referee-options-modal {
    width: min(920px, 88vw);
    max-height: 86vh;
    margin: auto;
    padding: 0;
    border: 1px solid rgba(148, 163, 184, 0.26);
    border-radius: 28px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96));
    box-shadow: 0 34px 90px -38px rgba(15, 23, 42, 0.72);
    color: var(--portal-text);
    overflow: hidden;
}

.portal-referee-options-modal::backdrop {
    background: rgba(15, 23, 42, 0.38);
    backdrop-filter: blur(10px);
}

.portal-referee-options-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.35rem 1.5rem;
    border-bottom: 1px solid var(--portal-border);
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.12), transparent 34%),
        rgba(255, 255, 255, 0.72);
}

.portal-referee-options-header .portal-support-section-kicker {
    margin: 0 0 0.2rem;
}

.portal-referee-options-form {
    padding: 1.5rem;
}

.portal-referee-options-form .portal-actions {
    justify-content: flex-end;
}

.portal-user-card-list {
    display: grid;
    gap: 1rem;
}

.portal-user-card {
    display: grid;
    grid-template-columns: minmax(280px, 1.2fr) minmax(180px, 0.7fr) minmax(260px, 1fr) auto;
    align-items: center;
    gap: 1.25rem;
    padding: 1rem;
    border: 1px solid var(--portal-border);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.88);
}

.portal-user-card-main {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    min-width: 0;
}

.portal-user-avatar {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 18px;
    background: linear-gradient(135deg, #eaf1fb, #f8fafc);
    color: var(--portal-primary);
    font-weight: 900;
    flex: 0 0 auto;
}

.portal-user-card h3,
.portal-user-modal h3 {
    margin: 0 0 0.2rem;
    color: var(--portal-text);
    font-size: 1.1rem;
    line-height: 1.2;
}

.portal-user-card p,
.portal-user-modal p {
    margin: 0;
    color: var(--portal-muted);
}

.portal-user-card-profile,
.portal-user-card-access {
    display: grid;
    gap: 0.35rem;
}

.portal-user-card-profile .portal-eyebrow,
.portal-user-card-access .portal-eyebrow {
    margin-bottom: 0.1rem;
    font-size: 0.72rem;
}

.portal-user-card-profile strong {
    color: var(--portal-text);
}

.portal-user-card-profile span {
    color: var(--portal-muted);
}

.portal-user-tile-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.2rem;
}

.portal-user-tile-summary span {
    padding: 0.3rem 0.55rem;
    border-radius: 999px;
    background: var(--portal-soft);
    color: var(--portal-primary);
    font-size: 0.78rem;
    font-weight: 800;
}

.portal-badge-warning {
    background: #fff7ed;
    color: #c2410c;
}

.portal-danger-link {
    color: #b42318;
}

.portal-user-card-actions {
    display: flex;
    justify-content: flex-end;
}

.portal-user-modal {
    width: min(1040px, 90vw);
    max-height: 86vh;
    margin: auto;
    padding: 0;
    border: 1px solid rgba(148, 163, 184, 0.26);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.98);
    color: var(--portal-text);
    box-shadow: 0 34px 90px -38px rgba(15, 23, 42, 0.72);
    overflow: hidden;
}

.portal-user-modal::backdrop {
    background: rgba(15, 23, 42, 0.38);
    backdrop-filter: blur(10px);
}

.portal-user-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.35rem 1.5rem;
    border-bottom: 1px solid var(--portal-border);
    background:
        radial-gradient(circle at top left, rgba(23, 57, 109, 0.12), transparent 34%),
        rgba(248, 250, 252, 0.88);
}

.portal-user-modal-form {
    padding: 1.5rem;
    max-height: calc(86vh - 112px);
    overflow: auto;
}

.portal-user-modal-section {
    display: grid;
    gap: 0.8rem;
    padding: 1rem;
    border: 1px solid var(--portal-border);
    border-radius: 20px;
    background: rgba(248, 250, 252, 0.72);
}

.portal-user-switch-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem 1.25rem;
}

.portal-user-modal-actions {
    justify-content: flex-end;
    position: sticky;
    bottom: 0;
    padding-top: 0.5rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0), #fff 45%);
}

.portal-cart-row,
.portal-admin-toolbar,
.portal-row-between {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: center;
}

.portal-total {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--portal-primary-dark);
}

.portal-admin-layout {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 1.5rem;
}

.portal-admin-layout-main {
    grid-template-columns: minmax(0, 1fr);
}

.portal-ticket-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.2fr);
    gap: 1.5rem;
    align-items: start;
    min-width: 0;
}

.portal-ticket-layout-admin {
    grid-template-columns: minmax(280px, 0.85fr) minmax(0, 1.15fr);
}

.portal-ticket-layout > *,
.portal-context-grid > *,
.portal-grid > *,
.portal-filter-grid > *,
.portal-support-panel,
.portal-support-thread,
.portal-support-control-card,
.portal-support-context-card,
.portal-support-message {
    min-width: 0;
}

.portal-ticket-list {
    display: grid;
    gap: 0.85rem;
}

.portal-ticket-card {
    display: grid;
    gap: 0.75rem;
    padding: 1rem;
    border: 1px solid var(--portal-border);
    border-radius: 18px;
    background: #fff;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.portal-ticket-card:hover,
.portal-ticket-card:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(23, 57, 109, 0.3);
    box-shadow: var(--portal-shadow);
    outline: none;
}

.portal-ticket-card.is-active {
    border-color: var(--portal-primary);
    background: #f9fbff;
}

.portal-ticket-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: center;
    color: var(--portal-muted);
    font-size: 0.92rem;
}

.portal-filter-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
    align-items: end;
}

.portal-filter-form input,
.portal-filter-form select {
    width: 100%;
    min-height: 46px;
    padding: 0.8rem 0.9rem;
    border: 1px solid var(--portal-border);
    border-radius: 14px;
    background: #fbfcfe;
    font: inherit;
}

.portal-check-inline {
    min-height: 46px;
    padding: 0.8rem 0.95rem;
    border: 1px solid var(--portal-border);
    border-radius: 14px;
    background: #fbfcfe;
}

.portal-conversation {
    display: grid;
    gap: 0.85rem;
}

.portal-message {
    padding: 1rem 1.1rem;
    border-radius: 20px;
    border: 1px solid var(--portal-border);
    background: #fff;
}

.portal-message-own {
    background: #f6f9ff;
    border-color: rgba(23, 57, 109, 0.16);
}

.portal-message-admin {
    background: #fffaf2;
    border-color: rgba(154, 103, 0, 0.16);
}

.portal-message-note {
    background: #f6f7fb;
    border-color: rgba(68, 80, 106, 0.18);
}

.portal-message-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.65rem;
    font-size: 0.92rem;
    color: var(--portal-muted);
}

.portal-attachments {
    display: grid;
    gap: 0.6rem;
    margin-top: 0.9rem;
}

.portal-attachment-link {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: center;
    padding: 0.75rem 0.9rem;
    border: 1px solid var(--portal-border);
    border-radius: 14px;
    background: #fbfcfe;
    color: var(--portal-primary);
    font-weight: 600;
    text-decoration: none;
    min-width: 0;
    overflow-wrap: anywhere;
}

.portal-context-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.portal-mini-list {
    display: grid;
    gap: 0.75rem;
}

.portal-mini-list-item {
    display: grid;
    gap: 0.25rem;
    padding: 0.85rem 0.95rem;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid var(--portal-border);
}

.portal-sidebar {
    position: sticky;
    top: 120px;
    padding: 1.5rem;
}

.portal-nav {
    display: grid;
    gap: 0.75rem;
}

.portal-nav a {
    padding: 0.8rem 0.95rem;
    border-radius: 16px;
    color: var(--portal-text);
    text-decoration: none;
    background: #f6f8fc;
    border: 1px solid var(--portal-border);
}

.portal-table-wrap {
    overflow-x: auto;
}

.portal-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.portal-table th,
.portal-table td {
    padding: 0.9rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--portal-border);
    vertical-align: top;
}

.portal-table th {
    color: var(--portal-muted);
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.portal-inline-form {
    display: grid;
    gap: 0.65rem;
}

.portal-inline-form input,
.portal-inline-form select,
.portal-inline-form textarea {
    width: 100%;
    min-width: 120px;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--portal-border);
    border-radius: 12px;
    background: #fbfcfe;
    font: inherit;
}

.portal-empty {
    padding: 1rem;
    border-radius: 16px;
    background: #f8fafc;
    color: var(--portal-muted);
    border: 1px dashed var(--portal-border);
}

.portal-page.portal-admin.portal-support-page {
    width: var(--portal-page-width);
    margin-right: var(--portal-page-gutter);
    margin-left: var(--portal-page-gutter);
    font-family: "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.portal-support-page .portal-support-hero-card {
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: none;
}

.portal-support-page .portal-support-hero-card::before {
    display: none;
}

.portal-support-page .portal-support-page-actions {
    justify-content: flex-start;
    margin: 0.85rem 0 0;
}

.portal-support-hero-card,
.portal-support-panel,
.portal-support-context-card,
.portal-support-control-card {
    position: relative;
    overflow: hidden;
    border-radius: 32px;
    border: 1px solid rgba(255, 255, 255, 0.55);
    background: rgba(255, 255, 255, 0.78);
    box-shadow: var(--portal-shadow);
    backdrop-filter: blur(22px);
}

.portal-support-hero-card::before,
.portal-support-panel::before {
    content: "";
    position: absolute;
    inset: auto auto 0 0;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.1), transparent 70%);
    pointer-events: none;
}

.portal-support-hero-card {
    padding: clamp(1.6rem, 3vw, 2.8rem);
    margin-bottom: 1.5rem;
}

.portal-support-hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    align-items: start;
    position: relative;
    z-index: 1;
}

.portal-support-kicker,
.portal-support-section-kicker {
    margin: 0 0 0.8rem;
    color: #4b5563;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.portal-support-display {
    margin: 0 0 0.9rem;
    font-size: clamp(2.45rem, 5vw, 4.5rem);
    line-height: 0.96;
    letter-spacing: -0.06em;
    max-width: 11ch;
}

.portal-support-lead {
    max-width: 56ch;
    margin: 0 0 1.25rem;
    color: var(--portal-muted);
    font-size: 1.05rem;
    line-height: 1.75;
}

.portal-support-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-bottom: 1.35rem;
}

.portal-support-chip {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(255, 255, 255, 0.72);
    color: #475467;
    font-size: 0.9rem;
    font-weight: 600;
}

.portal-support-step-stack {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    flex-wrap: wrap;
    gap: 0.9rem;
    margin: 100px 0 1.5rem;
}

.portal-support-step-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.9rem;
    align-items: start;
    flex: 1 1 260px;
    padding: 1rem 1.05rem;
    border-radius: 24px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(255, 255, 255, 0.72);
}

.portal-support-step-card strong {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 1rem;
}

.portal-support-step-card p {
    margin: 0;
    color: var(--portal-muted);
    line-height: 1.6;
}

.portal-support-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: linear-gradient(180deg, #111827 0%, #1f2937 100%);
    color: white;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.portal-support-icon svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.portal-support-icon-soft {
    background: #f3f4f6;
    color: #111827;
    box-shadow: none;
}

.portal-support-metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.portal-support-metric-card {
    display: grid;
    gap: 0.5rem;
    padding: 1.1rem 1.15rem;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.78);
    box-shadow: var(--portal-shadow);
    backdrop-filter: blur(20px);
}

.portal-support-metric-card strong {
    font-size: clamp(1.5rem, 3vw, 2rem);
    line-height: 1;
    letter-spacing: -0.04em;
}

.portal-support-metric-card span:last-child {
    color: var(--portal-muted);
}

.portal-support-layout {
    margin-top: 100px;
    margin-bottom: 100px;
}

.portal-support-workflow {
    display: grid;
    gap: 1.5rem;
}

.portal-support-followup-grid {
    display: grid;
    grid-template-columns: minmax(300px, 0.85fr) minmax(0, 1.15fr);
    gap: 1.5rem;
    align-items: start;
}

.portal-support-stack {
    display: grid;
    gap: 1rem;
}

.portal-support-panel {
    padding: 1.35rem;
}

.portal-support-thread {
    overflow: hidden;
}

.portal-support-panel-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.1rem;
    position: relative;
    z-index: 1;
}

.portal-support-panel-title,
.portal-support-subtitle {
    margin: 0;
    font-size: clamp(1.2rem, 2vw, 1.45rem);
    letter-spacing: -0.03em;
}

.portal-support-count-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 0.95rem;
    border-radius: 999px;
    background: #111827;
    color: white;
    font-weight: 700;
}

.portal-support-ticket-card {
    gap: 0.85rem;
    padding: 1rem 1.05rem;
    border-radius: 22px;
    border-color: rgba(15, 23, 42, 0.07);
    background: rgba(255, 255, 255, 0.74);
}

.portal-support-ticket-card.is-active {
    border-color: rgba(17, 24, 39, 0.18);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(248, 250, 252, 0.96));
}

.portal-support-ticket-card strong {
    font-size: 1rem;
    line-height: 1.4;
}

.portal-support-thread {
    display: grid;
    gap: 1rem;
}

.portal-support-thread .portal-support-panel-title,
.portal-support-ticket-card strong,
.portal-message,
.portal-message-meta,
.portal-muted {
    overflow-wrap: anywhere;
}

.portal-support-control-card select,
.portal-support-control-card button {
    width: 100%;
    min-width: 0;
}

.portal-support-thread-header {
    margin-bottom: 0.5rem;
}

.portal-support-meta-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin: -0.2rem 0 0.1rem;
}

.portal-support-meta-strip span {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid rgba(15, 23, 42, 0.06);
    color: #475467;
    font-size: 0.9rem;
    font-weight: 500;
}

.portal-support-message {
    border-radius: 26px;
    border-color: rgba(15, 23, 42, 0.07);
    padding: 1.1rem 1.15rem;
    box-shadow: 0 16px 34px -28px rgba(15, 23, 42, 0.28);
}

.portal-support-form {
    position: relative;
    z-index: 1;
}

.portal-support-form .portal-field input,
.portal-support-form .portal-field select,
.portal-support-form .portal-field textarea,
.portal-filter-form input,
.portal-filter-form select {
    min-height: 50px;
    border-radius: 18px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(248, 250, 252, 0.9);
}

.portal-support-form .portal-field textarea {
    min-height: 132px;
}

.portal-support-context-card,
.portal-support-control-card {
    padding: 1rem 1.05rem;
}

.portal-support-reply-form {
    margin-top: 0.5rem;
    padding-top: 0.25rem;
}

.portal-attachment-link {
    border-radius: 16px;
    border-color: rgba(15, 23, 42, 0.06);
    background: rgba(248, 250, 252, 0.88);
}

body.portal-support-body .portal-button {
    background: linear-gradient(180deg, #111827 0%, #020617 100%);
}

body.portal-support-body .portal-button-secondary {
    background: rgba(255, 255, 255, 0.84);
    color: #111827;
}

body.portal-support-body .portal-button-ghost {
    background: transparent;
}

.portal-profile-body {
    --portal-profile-ink: #0f172a;
    --portal-profile-wash: rgba(255, 255, 255, 0.76);
}

.portal-profile-page {
    display: grid;
    gap: 1rem;
}

.portal-profile-hero {
    display: block;
    min-height: 0;
    padding-top: 0;
}

.portal-referee-info-hero {
    display: flex;
    align-items: center;
    gap: 1.1rem;
}

.portal-referee-info-hero img {
    width: 88px;
    height: 88px;
    border-radius: 18px;
    object-fit: cover;
    border: 1px solid var(--portal-border);
    background: var(--portal-soft);
    flex: 0 0 auto;
}

.portal-profile-summary-card {
    display: grid;
    gap: 0.35rem;
    padding: 1.2rem 1.35rem;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 0 24px 56px -44px rgba(15, 23, 42, 0.55);
}

.portal-profile-summary-card span,
.portal-profile-summary-card small {
    color: var(--portal-muted);
}

.portal-profile-summary-card strong {
    color: var(--portal-profile-ink);
    font-size: 1.15rem;
}

.portal-profile-actions {
    margin-top: -0.5rem;
    margin-bottom: 2rem;
}

.portal-profile-actions .portal-sign-out-button {
    background: #ffffff;
    border-color: rgba(148, 163, 184, 0.42);
    color: var(--portal-profile-ink);
}

.portal-profile-form {
    gap: 1.5rem;
}

.portal-profile-section {
    padding: 0;
    border: 0;
    border-radius: var(--portal-radius);
    background: rgba(255, 255, 255, 0.88);
    box-shadow: none;
    overflow: hidden;
}

.portal-profile-section-toggle {
    width: 100%;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
    padding: clamp(1.15rem, 2.1vw, 1.55rem) clamp(1.25rem, 2.5vw, 2rem);
    border: 0;
    background: transparent;
    color: var(--portal-profile-ink);
    cursor: pointer;
    text-align: left;
}

.portal-profile-section-toggle:hover,
.portal-profile-section-toggle:focus-visible {
    background: rgba(241, 245, 249, 0.58);
    outline: none;
}

.portal-profile-section-icon {
    width: 3rem;
    height: 3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    background: rgba(23, 57, 109, 0.08);
    color: var(--portal-primary);
}

.portal-profile-section-icon svg {
    width: 1.45rem;
    height: 1.45rem;
}

.portal-profile-section-title {
    display: grid;
    gap: 0.25rem;
}

.portal-profile-section-title .portal-eyebrow {
    margin: 0;
}

.portal-profile-section-title strong {
    color: var(--portal-profile-ink);
    font-size: clamp(1.45rem, 2.1vw, 2rem);
    letter-spacing: -0.035em;
}

.portal-profile-section-chevron {
    width: 2.35rem;
    height: 2.35rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(241, 245, 249, 0.92);
    color: var(--portal-profile-ink);
    transition: transform 0.2s ease;
}

.portal-profile-section-chevron::before {
    content: "";
    width: 0.55rem;
    height: 0.55rem;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translate(-1px, -1px);
}

.portal-profile-section.is-open .portal-profile-section-chevron {
    transform: rotate(180deg);
}

.portal-profile-section-content {
    padding: 0 clamp(1.25rem, 2.5vw, 2rem) clamp(1.5rem, 3vw, 2.4rem);
}

.portal-profile-section .portal-eyebrow {
    color: #64748b;
}

.portal-profile-section .portal-field input:disabled {
    background: #f1f5f9;
    color: #64748b;
    cursor: not-allowed;
}

.portal-profile-repeat-grid {
    display: grid;
    gap: 1rem;
}

.portal-profile-repeat-card {
    padding: 1rem;
    border: 0;
    border-radius: 22px;
    background: rgba(241, 245, 249, 0.86);
}

.portal-profile-repeat-heading,
.portal-profile-subsection-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.portal-profile-repeat-heading strong,
.portal-profile-subsection-header h3 {
    margin: 0;
    color: var(--portal-profile-ink);
}

.portal-profile-remove-row {
    min-height: 38px;
    padding: 0.55rem 0.85rem;
    border: 1px solid rgba(180, 35, 24, 0.2);
    border-radius: 999px;
    background: #fff;
    color: var(--portal-error);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.portal-profile-subsection {
    display: grid;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
}

.portal-profile-sticky-save {
    position: sticky;
    bottom: 1.25rem;
    z-index: 4;
    display: flex;
    justify-content: flex-end;
    padding: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 22px 48px -34px rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(16px);
}

.portal-profile-section-intro {
    margin: -0.6rem 0 1.25rem;
}

.portal-profile-documents-upload {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 0.7fr);
    gap: 1rem;
    align-items: end;
    margin-bottom: 1.25rem;
}

.portal-profile-documents-list {
    display: grid;
    gap: 0.75rem;
}

.portal-profile-document-row,
.portal-profile-empty-documents {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.1rem;
    border-radius: 18px;
    background: rgba(241, 245, 249, 0.86);
    color: var(--portal-profile-ink);
    text-decoration: none;
}

.portal-profile-document-row span {
    display: grid;
    gap: 0.25rem;
}

.portal-profile-document-row small,
.portal-profile-empty-documents {
    color: var(--portal-muted);
}

.portal-applications-page {
    display: grid;
    gap: 1.5rem;
}

.portal-applications-hero {
    margin: -100px 0 0 0;
    padding: 0;
    min-height: 220px;
    display: flex;
    align-items: end;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    color: var(--portal-text);
}

.portal-applications-page-actions {
    justify-content: flex-start;
    align-items: center;
    margin: 0.85rem 0 100px;
}

.portal-applications-layout {
    display: grid;
    grid-template-columns: minmax(280px, 0.34fr) minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
}

.portal-applications-queue,
.portal-application-detail {
    padding: clamp(1.35rem, 2.5vw, 2rem);
}

.portal-applications-list,
.portal-application-document-list {
    display: grid;
    gap: 0.8rem;
}

.portal-application-queue-group {
    display: grid;
    gap: 0.85rem;
    padding-top: 1.1rem;
    margin-top: 1.1rem;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
}

.portal-application-queue-group:first-of-type {
    margin-top: 0.75rem;
}

.portal-application-queue-heading {
    gap: 0.75rem;
}

.portal-application-queue-heading h3 {
    margin: 0;
    color: var(--portal-text);
    font-size: 1rem;
    letter-spacing: -0.02em;
}

.portal-application-list-item,
.portal-application-document {
    display: grid;
    gap: 0.45rem;
    padding: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 18px;
    background: rgba(248, 250, 252, 0.68);
    color: var(--portal-text);
    text-decoration: none;
}

.portal-application-list-item.is-selected {
    border-color: rgba(23, 57, 109, 0.34);
    background: #fff;
    box-shadow: 0 20px 44px -34px rgba(15, 23, 42, 0.5);
}

.portal-closed-applications-section {
    display: grid;
    gap: 1.2rem;
    margin-top: 100px;
    padding: clamp(1.35rem, 2.5vw, 2rem);
}

.portal-closed-applications-heading {
    gap: 1rem;
    align-items: start;
}

.portal-closed-applications-heading h2 {
    margin: 0;
}

.portal-closed-application-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.portal-closed-application-card {
    display: grid;
    gap: 0.65rem;
    padding: 1rem;
    border-radius: 20px;
    background: rgba(248, 250, 252, 0.82);
}

.portal-closed-application-card.is-selected {
    background: #ffffff;
    box-shadow: 0 20px 44px -34px rgba(15, 23, 42, 0.5);
}

.portal-closed-application-card h3,
.portal-closed-application-card p {
    margin: 0;
}

.portal-closed-application-card p {
    color: var(--portal-muted);
    overflow-wrap: anywhere;
}

.portal-closed-application-card .portal-button-secondary {
    justify-self: start;
    margin-top: 0.35rem;
}

.portal-application-list-item span:not(.portal-badge),
.portal-application-document span,
.portal-application-info-card span,
.portal-application-data-grid span {
    color: var(--portal-muted);
}

.portal-application-detail {
    display: grid;
    gap: 1.35rem;
    overflow: hidden;
}

.portal-application-detail-header {
    gap: 1rem;
    align-items: start;
}

.portal-application-info-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.portal-application-info-card,
.portal-application-data-grid > div {
    display: grid;
    gap: 0.35rem;
    padding: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 18px;
    background: rgba(248, 250, 252, 0.7);
}

.portal-application-controls,
.portal-application-upload-form {
    padding: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.72);
}

.portal-application-action-row {
    padding: 1rem;
    border-radius: 22px;
    background: rgba(241, 245, 249, 0.7);
}

.portal-application-action-row form {
    display: inline-flex;
}

.portal-application-footer-actions {
    align-items: center;
    padding-top: 0.2rem;
}

.portal-application-footer-actions form {
    display: inline-flex;
}

.portal-button:disabled,
.portal-button-secondary:disabled,
.portal-button-ghost:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
}

.portal-support-danger-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    border-color: rgba(185, 28, 28, 0.18);
    background: rgba(254, 242, 242, 0.72);
}

.portal-application-audit-modal {
    width: min(760px, 92vw);
    max-height: 82vh;
    margin: auto;
    padding: 0;
    border: 1px solid rgba(148, 163, 184, 0.26);
    border-radius: 28px;
    background: #ffffff;
    box-shadow: 0 34px 90px -38px rgba(15, 23, 42, 0.72);
    color: var(--portal-text);
    overflow: hidden;
}

.portal-application-audit-modal::backdrop {
    background: rgba(15, 23, 42, 0.38);
    backdrop-filter: blur(10px);
}

.portal-application-audit-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.35rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
    background:
        radial-gradient(circle at top left, rgba(23, 57, 109, 0.1), transparent 36%),
        rgba(248, 250, 252, 0.92);
}

.portal-application-audit-header h3 {
    margin: 0;
}

.portal-modal-close {
    width: 48px;
    height: 48px;
    display: inline-grid;
    place-items: center;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 999px;
    background: #ffffff;
    color: var(--portal-text);
    cursor: pointer;
}

.portal-modal-close svg {
    width: 1.2rem;
    height: 1.2rem;
}

.portal-application-audit-body {
    max-height: 62vh;
    padding: 1.25rem;
    overflow: auto;
}

.portal-application-audit-list {
    display: grid;
    gap: 0.85rem;
}

.portal-application-audit-item {
    display: grid;
    grid-template-columns: minmax(150px, 0.8fr) minmax(140px, 0.75fr) minmax(120px, 0.7fr);
    gap: 0.5rem 0.85rem;
    padding: 1rem;
    border-radius: 18px;
    background: rgba(248, 250, 252, 0.86);
}

.portal-application-audit-item time,
.portal-application-audit-item span,
.portal-application-audit-item p {
    color: var(--portal-muted);
}

.portal-application-audit-item p {
    grid-column: 1 / -1;
    margin: 0.25rem 0 0;
    line-height: 1.55;
}

.portal-application-subsection {
    display: grid;
    gap: 1rem;
    padding-top: 1.35rem;
    border-top: 1px solid rgba(148, 163, 184, 0.22);
}

.portal-application-subsection h3 {
    margin: 0;
}

.portal-application-collapsible {
    gap: 0;
}

.portal-application-collapsible-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    border: 0;
    border-radius: 20px;
    background: rgba(241, 245, 249, 0.72);
    color: var(--portal-text);
    cursor: pointer;
    text-align: left;
}

.portal-application-collapsible-toggle:hover,
.portal-application-collapsible-toggle:focus-visible {
    background: rgba(226, 232, 240, 0.82);
    outline: none;
}

.portal-application-collapsible-toggle > span:first-child {
    display: grid;
    gap: 0.25rem;
}

.portal-application-collapsible-toggle .portal-eyebrow {
    margin: 0;
}

.portal-application-collapsible-toggle strong {
    font-size: 1.2rem;
}

.portal-application-collapsible-chevron {
    width: 2.25rem;
    height: 2.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--portal-text);
    transition: transform 0.2s ease;
}

.portal-application-collapsible-chevron::before {
    content: "";
    width: 0.5rem;
    height: 0.5rem;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translate(-1px, -1px);
}

.portal-application-collapsible.is-open .portal-application-collapsible-chevron {
    transform: rotate(180deg);
}

.portal-application-collapsible-content {
    padding-top: 1rem;
}

.portal-application-document-stack {
    display: grid;
    gap: 0.9rem;
}

.portal-application-pdf-card {
    display: grid;
    gap: 1rem;
    padding: 1rem;
    border-radius: 22px;
    background: rgba(241, 245, 249, 0.86);
}

.portal-application-pdf-meta {
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
    min-width: 0;
}

.portal-application-pdf-meta > div {
    display: grid;
    gap: 0.25rem;
    min-width: 0;
}

.portal-application-pdf-meta strong,
.portal-application-pdf-meta span:not(.portal-application-pdf-icon) {
    max-width: 100%;
}

.portal-application-pdf-meta span:not(.portal-application-pdf-icon) {
    color: var(--portal-muted);
}

.portal-application-pdf-icon {
    width: 3rem;
    height: 3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: 18px;
    background: rgba(198, 46, 46, 0.1);
    color: var(--portal-accent);
}

.portal-application-pdf-icon svg {
    width: 1.45rem;
    height: 1.45rem;
}

.portal-application-pdf-icon-alt {
    background: rgba(23, 57, 109, 0.1);
    color: var(--portal-primary);
}

.portal-application-pdf-actions {
    width: 100%;
    align-items: stretch;
}

.portal-application-pdf-actions a {
    flex: 1 1 0;
    justify-content: center;
}

.portal-application-data-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.portal-application-data-grid strong {
    overflow-wrap: anywhere;
}

@media (max-width: 980px) {
    .portal-hero,
    .portal-profile-hero,
    .portal-applications-layout,
    .portal-application-info-grid,
    .portal-application-data-grid,
    .portal-closed-application-grid,
    .portal-shop-layout,
    .portal-admin-layout,
    .portal-ticket-layout,
    .portal-context-grid,
    .portal-support-hero-grid,
    .portal-support-followup-grid,
    .portal-support-metric-grid,
    .portal-filter-grid,
    .portal-profile-documents-upload,
    .portal-grid.two-col,
    .portal-grid.three-col,
    .portal-grid.four-col {
        grid-template-columns: 1fr;
    }

    .portal-events-entry-row,
    .portal-events-entry-edit {
        grid-template-columns: 1fr;
    }

    .portal-events-entry-delete {
        justify-content: stretch;
    }

    .portal-events-entry-delete button,
    .portal-events-entry-edit button {
        width: 100%;
    }

    .news-admin-article-summary {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.75rem;
        padding-right: 3rem;
    }

    .news-admin-article-summary-meta {
        display: grid;
        grid-template-columns: auto auto;
        justify-content: start;
        white-space: normal;
    }

    .news-admin-article-summary-meta > span:nth-child(3) {
        grid-column: 1 / -1;
    }

    .news-admin-article-chevron {
        position: absolute;
        top: 50%;
        right: 1.25rem;
        margin-top: -0.35rem;
    }

    .news-admin-article-card {
        padding: 0;
    }

    .news-admin-upload-metadata {
        grid-template-columns: minmax(0, 1fr);
    }

    .portal-logs-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .portal-news-admin-page .news-admin-upload-slot {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .news-admin-upload-slot-header label {
        grid-column: 1;
    }

    .news-admin-upload-remove {
        grid-column: 2;
    }

    .portal-news-admin-page .news-admin-upload-slot > input[type="file"] {
        grid-column: 1 / -1;
    }

    .portal-application-pdf-card {
        gap: 0.85rem;
    }

    .portal-application-pdf-actions {
        width: 100%;
    }

    .portal-application-pdf-actions a {
        flex: 1 1 auto;
    }

    .portal-sidebar {
        position: static;
    }

    .portal-user-card {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .portal-user-card-actions {
        justify-content: flex-start;
    }

    .portal-order-item-row {
        grid-template-columns: 64px minmax(0, 1fr);
    }

    .portal-order-status-inline,
    .portal-order-item-meta {
        grid-column: 1 / -1;
        justify-content: flex-start;
        justify-items: start;
    }

    .portal-shop-cart-panel {
        position: static;
    }

    body.portal-login-body .portal-login {
        width: auto;
        min-height: 100vh;
        padding: 10vh 0;
    }

    .portal-login-page {
        gap: 0.85rem;
    }

    .portal-login-hero {
        grid-template-columns: 1fr;
        gap: 0.85rem;
        min-height: 0;
        padding: 0.5rem 0;
    }

    .portal-login-brand {
        width: min(9.5rem, 100%);
        min-height: 7.25rem;
        justify-self: start;
    }

    .portal-login-brand img {
        width: min(7.6rem, 100%);
    }

    .portal-login-actions {
        padding-left: 0;
    }

    .portal-login-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    :root {
        --portal-page-gutter: 10vw;
        --portal-page-width: 80vw;
    }

    .portal-page {
        margin-top: 95px;
    }

    body.portal-login-body .portal-page {
        margin-top: 0;
    }

    body.portal-login-body .portal-login {
        width: auto;
        padding: 10vh 0;
        margin-right: var(--portal-page-gutter);
        margin-left: var(--portal-page-gutter);
    }

    .portal-login-page {
        gap: 1rem;
    }

    .portal-login-card {
        margin: 0;
        padding: 1.35rem;
        border-radius: 24px;
    }

    body.portal-login-body .portal-login .portal-title {
        font-size: 2.15rem;
        margin-bottom: 0.7rem;
    }

    .portal-login-hero .portal-copy {
        line-height: 1.55;
    }

    .portal-login-actions {
        flex-direction: column;
        align-items: stretch;
        padding: 0;
    }

    .portal-login-actions .portal-button-secondary,
    .portal-login-actions .portal-button-ghost,
    .portal-login-card .portal-button,
    .portal-access-actions .portal-button,
    .portal-access-actions .portal-button-secondary,
    .portal-access-actions .portal-button-ghost {
        flex: 1 1 auto;
        width: 100%;
    }

    .portal-login-card .portal-field input {
        min-height: 3.5rem;
    }

    .portal-password-reset-request-item {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .portal-password-reset-request-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .portal-password-reset-request-actions a,
    .portal-password-reset-request-actions form,
    .portal-password-reset-request-actions button {
        width: 100%;
    }

    .portal-login-help-link {
        font-size: 0.88rem;
    }

    .portal-access-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .portal-flash-stack {
        top: 92px;
        right: 1rem;
        left: 1rem;
        width: auto;
    }

    .portal-admin-page-actions > a.portal-button-secondary,
    .portal-news-admin-page-actions > a.portal-button-secondary,
    .portal-events-admin-page-actions > a.portal-button-secondary,
    .portal-referee-admin-page-actions > a.portal-button-secondary,
    .portal-shop-page-actions > a.portal-button-secondary,
    .portal-support-page-actions > a.portal-button-secondary,
    .portal-main-dashboard-actions > a.portal-button-secondary,
    .portal-referee-gallery-page-actions > a.portal-button-secondary,
    .portal-gallery-admin-page-actions > a.portal-button-secondary,
    .portal-requests-page-actions > a.portal-button-secondary,
    .portal-referee-admin-button-row > a.portal-button-secondary {
        flex: 1 1 180px;
    }

    .portal-support-display {
        max-width: none;
    }

    .portal-card,
    .portal-panel,
    .portal-section,
    .portal-sidebar {
        padding: 1.25rem;
    }

    .portal-referee-division-header,
    .portal-referee-bar,
    .portal-referee-bar-actions,
    .portal-referee-quick-form label {
        align-items: stretch;
        flex-direction: column;
    }

    .portal-referee-division-header-meta {
        justify-content: space-between;
    }

    .portal-referee-bar {
        grid-template-columns: 1fr;
    }

    .portal-referee-bar-actions {
        justify-content: stretch;
    }

    .portal-referee-quick-form,
    .portal-referee-quick-form select,
    .portal-referee-bar-actions form,
    .portal-referee-bar-actions button,
    .portal-referee-search-field,
    .portal-referee-search-actions,
    .portal-referee-search-actions > * {
        width: 100%;
    }

    .portal-user-modal,
    .portal-referee-options-modal,
    .portal-application-audit-modal {
        width: 94vw;
    }

    .portal-user-modal-header,
    .portal-referee-options-header,
    .portal-application-audit-header {
        align-items: stretch;
        flex-direction: column;
    }

    .portal-application-audit-item {
        grid-template-columns: 1fr;
    }
}

.portal-dashboard-page {
    display: grid;
    gap: 1.5rem;
}

.portal-main-dashboard-page .portal-main-dashboard-hero {
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    color: var(--portal-text);
}

.portal-main-dashboard-page .portal-main-dashboard-hero .portal-copy,
.portal-main-dashboard-page .portal-main-dashboard-hero .portal-eyebrow {
    color: var(--portal-muted);
}

.portal-main-dashboard-page .portal-main-dashboard-actions {
    justify-content: flex-start;
    align-items: center;
    margin: 0.85rem 0 100px;
}

.portal-main-dashboard-page .portal-main-dashboard-count {
    cursor: default;
}

.portal-referee-gallery-page .portal-referee-gallery-hero {
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    color: var(--portal-text);
}

.portal-referee-gallery-page .portal-referee-gallery-hero .portal-copy,
.portal-referee-gallery-page .portal-referee-gallery-hero .portal-eyebrow {
    color: var(--portal-muted);
}

.portal-referee-gallery-page .portal-referee-gallery-page-actions {
    justify-content: flex-start;
    align-items: center;
    margin: 0.85rem 0 100px;
}

.portal-referee-gallery-page .portal-referee-gallery-count {
    cursor: default;
}

.portal-referee-gallery-upload-grid {
    margin-bottom: 100px;
}

.portal-gallery-admin-page .portal-gallery-admin-hero {
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    color: var(--portal-text);
}

.portal-gallery-admin-page .portal-gallery-admin-hero .portal-copy,
.portal-gallery-admin-page .portal-gallery-admin-hero .portal-eyebrow {
    color: var(--portal-muted);
}

.portal-gallery-admin-page .portal-gallery-admin-page-actions {
    justify-content: flex-start;
    align-items: center;
    margin: 0.85rem 0 100px;
}

.portal-gallery-admin-page .portal-gallery-admin-count {
    cursor: default;
}

.portal-gallery-admin-workspace {
    gap: 100px;
}

.portal-gallery-tool {
    overflow: hidden;
    border: 1px solid var(--portal-border);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.78);
}

.portal-gallery-tool + .portal-gallery-tool {
    margin-top: 0.85rem;
}

.portal-gallery-tool-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 72px;
    padding: 0.9rem 1.1rem;
    color: var(--portal-text);
    cursor: pointer;
    list-style: none;
}

.portal-gallery-tool-summary::-webkit-details-marker {
    display: none;
}

.portal-gallery-tool-summary:hover,
.portal-gallery-tool-summary:focus-visible {
    background: rgba(23, 57, 109, 0.045);
    outline: none;
}

.portal-gallery-tool-summary > span:first-child {
    display: grid;
    gap: 0.25rem;
}

.portal-gallery-tool-summary strong {
    font-size: 1rem;
}

.portal-gallery-tool-summary small,
.portal-gallery-album-byline {
    color: var(--portal-muted);
    font-size: 0.8rem;
    font-weight: 500;
    line-height: 1.45;
}

.portal-gallery-album-byline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 0.75rem;
    margin-top: 0.55rem;
}

.portal-gallery-album-byline > span {
    padding-left: 0.75rem;
    border-left: 1px solid var(--portal-border);
}

.portal-gallery-tool-chevron {
    width: 0.65rem;
    height: 0.65rem;
    flex: 0 0 auto;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    color: var(--portal-muted);
    transform: rotate(45deg);
    transition: transform 0.25s ease;
}

.portal-gallery-tool[open] .portal-gallery-tool-chevron {
    transform: rotate(225deg);
}

.portal-gallery-danger-tool .portal-gallery-tool-summary strong {
    color: var(--portal-error);
}

.portal-gallery-tool-content {
    padding: 0 1rem 1rem;
    border-top: 1px solid var(--portal-border);
}

.portal-gallery-tool-content > .portal-admin-card,
.portal-gallery-tool-content > .portal-support-form {
    margin: 1rem 0 0;
}

.portal-gallery-upload-picker {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    padding: 0.8rem;
    border: 1px solid var(--portal-border);
    border-radius: 12px;
    background: #ffffff;
}

.portal-gallery-upload-picker input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

.portal-gallery-upload-picker label {
    margin: 0;
    cursor: pointer;
}

.portal-gallery-upload-picker span {
    color: var(--portal-muted);
    font-size: 0.9rem;
}

.portal-gallery-upload-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
    gap: 0.6rem;
}

.portal-gallery-upload-preview[hidden] {
    display: none;
}

.portal-gallery-upload-preview figure {
    display: grid;
    gap: 0.35rem;
    min-width: 0;
    margin: 0;
}

.portal-gallery-upload-preview img {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 8px;
    object-fit: cover;
    background: var(--portal-soft);
}

.portal-gallery-upload-preview figcaption {
    overflow: hidden;
    color: var(--portal-muted);
    font-size: 0.7rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.portal-public-gallery-page .portal-public-gallery-spotlight {
    background:
        radial-gradient(circle at 88% 18%, rgba(248, 113, 113, 0.18), transparent 26%),
        linear-gradient(135deg, #fff7ed 0%, #ffffff 52%, #eff6ff 100%);
    border: 1px solid rgba(15, 23, 42, 0.08);
    color: var(--portal-text);
    box-shadow: 0 28px 70px -46px rgba(15, 23, 42, 0.55);
}

.portal-public-gallery-page .portal-public-gallery-spotlight .portal-title {
    color: #0f172a;
}

.portal-public-gallery-page .portal-public-gallery-spotlight .portal-eyebrow {
    color: #b42318;
}

.portal-public-gallery-page .portal-public-gallery-spotlight .portal-copy {
    color: #475569;
}

.portal-public-gallery-page .portal-public-gallery-spotlight .portal-button {
    background: #0f172a;
    color: #ffffff;
}

.portal-public-gallery-page .portal-public-gallery-spotlight .portal-button-secondary {
    background: rgba(255, 255, 255, 0.86);
    color: #17396d;
    border: 1px solid rgba(23, 57, 109, 0.14);
    box-shadow: 0 14px 30px -24px rgba(15, 23, 42, 0.55);
}

.portal-requests-page .portal-requests-hero {
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    color: var(--portal-text);
}

.portal-requests-page .portal-requests-hero .portal-copy,
.portal-requests-page .portal-requests-hero .portal-eyebrow {
    color: var(--portal-muted);
}

.portal-requests-page .portal-requests-page-actions {
    justify-content: flex-start;
    align-items: center;
    margin: 0.85rem 0 100px;
}

.portal-requests-count {
    cursor: default;
}

.portal-requests-list {
    display: grid;
    gap: 1rem;
    padding: 1.5rem;
}

.portal-request-card {
    display: grid;
    gap: 1rem;
}

.portal-request-reason {
    padding: 1rem;
    border-radius: 18px;
    background: rgba(248, 250, 252, 0.88);
    border: 1px solid rgba(148, 163, 184, 0.18);
    color: #334155;
    line-height: 1.65;
}

.portal-request-review-form {
    padding-top: 0.25rem;
}

.portal-gallery-delete-request-card {
    border-color: rgba(180, 35, 24, 0.18);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 247, 247, 0.72));
}

.portal-dashboard-hero {
    display: grid;
    gap: 1rem;
    align-items: end;
    background:
        radial-gradient(circle at top right, rgba(15, 118, 110, 0.22), transparent 34%),
        linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(30, 41, 59, 0.88));
    color: #f8fafc;
}

.portal-dashboard-hero .portal-copy,
.portal-dashboard-hero .portal-eyebrow {
    color: rgba(248, 250, 252, 0.82);
}

.portal-dashboard-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.portal-dashboard-summary .portal-badge {
    min-height: 28px;
}

.portal-gallery-album-page,
.portal-gallery-album-page .portal-title,
.portal-gallery-album-page .portal-eyebrow,
.portal-gallery-album-page .portal-copy,
.portal-gallery-album-page .portal-badge,
.portal-gallery-album-page .portal-button-secondary,
.portal-gallery-album-page .portal-empty {
    font-family: "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.portal-gallery-album-hero .portal-eyebrow,
.portal-gallery-album-hero .portal-title,
.portal-gallery-album-hero .portal-copy {
    color: #ffffff;
}

.portal-gallery-album-hero .portal-eyebrow {
    opacity: 0.82;
}

.portal-gallery-album-title {
    margin-bottom: 0.5rem;
    font-size: clamp(2.1rem, 4vw, 3.2rem);
    color: #ffffff;
}

.portal-gallery-album-hero .portal-copy {
    max-width: 1120px;
    color: rgba(255, 255, 255, 0.84);
}

.portal-gallery-album-hero .portal-dashboard-summary {
    align-items: stretch;
}

.portal-gallery-album-action {
    min-height: 52px;
    padding: 0 1.45rem;
    border-radius: 18px;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1;
}

.portal-gallery-album-hero .portal-badge.portal-gallery-album-action {
    background: rgba(255, 255, 255, 0.94);
    color: #17396d;
    border: 1px solid rgba(255, 255, 255, 0.78);
}

.portal-gallery-album-hero .portal-button-secondary.portal-gallery-album-action {
    background: rgba(255, 255, 255, 0.94);
    border-color: rgba(255, 255, 255, 0.78);
    color: #17396d;
}

.portal-gallery-album-empty {
    color: #64748b;
    font-size: 1rem;
    line-height: 1.6;
}

.portal-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 1rem;
}

.portal-dashboard-tile {
    grid-column: span 4;
    display: grid;
    gap: 1rem;
    min-height: 220px;
    padding: 1.4rem;
    border-radius: 22px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96)),
        linear-gradient(135deg, color-mix(in srgb, var(--tile-accent) 16%, white), white);
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.08);
    text-decoration: none;
    color: #0f172a;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.portal-dashboard-tile.is-featured {
    grid-column: span 8;
}

.portal-dashboard-tile:hover {
    transform: translateY(-3px);
    box-shadow: 0 28px 58px rgba(15, 23, 42, 0.12);
    border-color: color-mix(in srgb, var(--tile-accent) 42%, white);
}

.portal-dashboard-tile-icon {
    width: 3.2rem;
    height: 3.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    background: color-mix(in srgb, var(--tile-accent) 12%, white);
    color: var(--tile-accent);
}

.portal-dashboard-tile-icon svg {
    width: 1.5rem;
    height: 1.5rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.portal-dashboard-tile-copy {
    display: grid;
    gap: 0.45rem;
}

.portal-dashboard-tile-label {
    font-size: 1.2rem;
    font-weight: 700;
}

.portal-dashboard-tile-copy p {
    margin: 0;
    color: #475569;
    line-height: 1.6;
}

.portal-dashboard-tile-link {
    margin-top: auto;
    display: inline-flex;
    width: fit-content;
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--tile-accent) 14%, white);
    color: var(--tile-accent);
    font-weight: 700;
}

.portal-dashboard-access-form,
.portal-dashboard-role-grid {
    display: grid;
    gap: 1rem;
}

.portal-dashboard-role-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.portal-dashboard-check-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem 1rem;
    margin-top: 0.9rem;
}

.portal-gallery-hero-image {
    width: 100%;
    max-height: 320px;
    object-fit: cover;
    border-radius: 20px;
    margin-top: 0.5rem;
}

.portal-gallery-card-image {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 18px;
}

.portal-gallery-admin-album-grid .gallery-card {
    cursor: pointer;
}

.portal-gallery-admin-album-card {
    border: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
}

.portal-gallery-album-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    justify-content: flex-end;
}

.portal-gallery-community-badge {
    background: var(--portal-soft);
    color: var(--portal-primary);
}

.portal-gallery-pending-alert {
    display: inline-flex;
    align-items: center;
    justify-self: start;
    min-height: 42px;
    padding: 0.65rem 0.9rem;
    border: 1px solid rgba(154, 103, 0, 0.2);
    border-radius: 12px;
    background: var(--portal-warning-bg);
    color: var(--portal-warning);
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
}

.portal-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.portal-gallery-grid-public {
    padding-bottom: 1rem;
}

.portal-gallery-photo-card {
    display: grid;
    gap: 0.6rem;
    padding: 1rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.22);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.06);
}

.portal-gallery-photo-card input[type="checkbox"] {
    justify-self: start;
}

.portal-gallery-photo-card img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 14px;
}

.portal-gallery-photo-image-wrap {
    position: relative;
}

.portal-gallery-photo-image-wrap img {
    display: block;
}

.portal-gallery-cover-badge {
    position: absolute;
    left: 0.85rem;
    bottom: 0.85rem;
    background: rgba(255, 255, 255, 0.9);
    color: #475569;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.16);
    backdrop-filter: blur(10px);
}

.portal-gallery-photo-card strong {
    font-size: 1rem;
}

.portal-gallery-photo-card span {
    color: #64748b;
    font-size: 0.92rem;
}

.portal-gallery-photo-card-admin {
    align-content: start;
}

.portal-gallery-photo-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.5rem;
    align-items: center;
}

.portal-gallery-photo-actions input[type="text"] {
    min-width: 0;
}

.portal-gallery-select-check {
    margin-top: 0.25rem;
}

.portal-gallery-visibility-check {
    display: inline-grid;
    grid-template-columns: auto auto;
    align-self: flex-start;
    justify-content: start;
    align-items: center;
    width: fit-content;
    max-width: 100%;
    gap: 0.45rem;
    margin-top: 0.25rem;
    line-height: 1.25;
}

.portal-gallery-visibility-check input[type="checkbox"] {
    flex: 0 0 auto;
    margin: 0;
}

.portal-gallery-visibility-check span {
    display: inline-block;
    white-space: nowrap;
}

.portal-gallery-public-card {
    padding: 0.9rem;
}

@media (max-width: 980px) {
    .portal-dashboard-grid,
    .portal-logs-summary-grid,
    .portal-dashboard-role-grid,
    .portal-gallery-grid {
        grid-template-columns: 1fr;
    }

    .portal-dashboard-tile,
    .portal-dashboard-tile.is-featured {
        grid-column: span 1;
    }
}
