﻿.welcome-page .logo {
  width: 64px;
}

.icon-banner {
  width: 32px;
}

.body-container {
  height: 100vh;
}

.welcome-page li {
  list-style: none;
  padding: 4px;
}

.logged-out-page iframe {
  display: none;
  width: 0;
  height: 0;
}

.grants-page .card {
  margin-top: 20px;
  border-bottom: 1px solid lightgray;
}
.grants-page .card .card-title {
  font-size: 120%;
  font-weight: bold;
}
.grants-page .card .card-title img {
  width: 100px;
  height: 100px;
}
.grants-page .card label {
  font-weight: bold;
}

/* Sharefy login page */

    :root {
        --login-purple: #8b5cf6;
        --login-purple-dark: #6d28d9;
        --login-purple-mid: #7c4fef;
        --login-dark: #171521;
        --login-text: #080b1c;
        --login-muted: #647084;
        --login-border: #dde3ec;
    }

    html,
    body {
        min-height: 100%;
        margin: 0;
        background: #ffffff;
        font-family: Inter, system-ui, Arial, Helvetica, sans-serif;
    }

    .body-container {
        min-height: 100dvh;
        margin: 0 !important;
        padding: 0 !important;
    }

    .login-shell {
        min-height: 100dvh;
        display: flex;
        overflow: hidden;
        background: #ffffff;
        color: var(--login-text);
        font-family: Inter, system-ui, Arial, Helvetica, sans-serif;
    }

    .login-visual {
        position: relative;
        width: 56%;
        min-height: 100dvh;
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
        color: #ffffff;
        background:
            radial-gradient(circle at 98% 8%, rgba(255, 255, 255, 0.11) 0 10rem, transparent 10.1rem),
            linear-gradient(140deg, var(--login-purple) 0%, var(--login-purple-mid) 45%, var(--login-purple-dark) 100%);
    }

    .login-visual::after {
        content: "";
        position: absolute;
        top: -18%;
        right: -9.7rem;
        width: 13.4rem;
        height: 137%;
        background: #ffffff;
        border-radius: 54% 0 0 46% / 47% 0 0 53%;
        z-index: 3;
    }

    .login-visual::before {
        content: "";
        position: absolute;
        right: -2.15rem;
        top: 50%;
        width: 5.5rem;
        height: 11.5rem;
        transform: translateY(-50%);
        background: var(--login-purple-dark);
        clip-path: polygon(38% 0, 100% 50%, 38% 100%, 0 50%);
        z-index: 2;
    }

    .login-shape {
        position: absolute;
        display: block;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.08);
    }

    .login-shape-top {
        top: -3.5rem;
        right: -0.5rem;
        width: 20.5rem;
        height: 20.5rem;
    }

    .login-shape-bottom {
        left: -6rem;
        bottom: -8rem;
        width: 19rem;
        height: 19rem;
    }

    .login-visual-content {
        position: relative;
        z-index: 4;
        width: min(56%, 34rem);
        min-width: 29rem;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .brand-lockup {
        margin-bottom: 2.5rem;
    }

    .brand-logo {
        width: min(16.75rem, 100%);
        height: auto;
        margin: 0 auto;
        display: block;
    }

    .brand-lockup p {
        margin: 0.65rem 0 0;
        font-size: 0.78rem;
        font-weight: 800;
        letter-spacing: 0.18rem;
        text-transform: uppercase;
        color: rgba(255, 255, 255, 0.78);
    }

    .feature-card {
        width: 28.8rem;
        height: 21.5rem;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 1.5rem;
        border: 1px solid rgba(255, 255, 255, 0.14);
        background: rgba(255, 255, 255, 0.08);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
    }

    .feature-illustration {
        position: relative;
        width: 9.5rem;
        height: 7rem;
        color: rgba(255, 255, 255, 0.34);
    }

    .feature-check {
        position: absolute;
        top: 0;
        left: 50%;
        width: 3.1rem;
        height: 3.1rem;
        display: flex;
        align-items: center;
        justify-content: center;
        transform: translate(-50%, -12%);
        border-radius: 50%;
        border: 1px solid rgba(255, 255, 255, 0.18);
        background: rgba(255, 255, 255, 0.08);
    }

    .feature-check svg {
        width: 1.9rem;
        height: 1.9rem;
        fill: currentColor;
    }

    .feature-window {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        height: 4.6rem;
        border: 1px solid rgba(255, 255, 255, 0.14);
        border-radius: 0.7rem;
        background: rgba(255, 255, 255, 0.04);
    }

    .feature-line {
        position: absolute;
        left: 0.9rem;
        width: 3rem;
        height: 0.2rem;
        border-radius: 999px;
        background: currentColor;
    }

    .feature-line-wide {
        top: 0.9rem;
        width: 2.8rem;
    }

    .feature-line:not(.feature-line-wide):not(.feature-line-short) {
        top: 1.55rem;
    }

    .feature-line-short {
        top: 2.2rem;
    }

    .feature-side {
        position: absolute;
        top: 0.8rem;
        right: 0.8rem;
        width: 2.9rem;
        height: 2.9rem;
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 0.45rem;
        background: rgba(255, 255, 255, 0.05);
    }

    .feature-side span {
        position: absolute;
        left: 0.6rem;
        width: 1.55rem;
        height: 0.14rem;
        border-radius: 999px;
        background: currentColor;
    }

    .feature-side span:first-child {
        top: 1rem;
    }

    .feature-side span:last-child {
        top: 1.55rem;
    }

    .visual-copy {
        margin-top: 2.4rem;
    }

    .visual-copy h2 {
        margin: 0;
        font-size: 1.55rem;
        line-height: 1.28;
        font-weight: 800;
        letter-spacing: 0;
    }

    .visual-copy p {
        margin: 0.8rem 0 0;
        font-size: 0.9rem;
        color: rgba(255, 255, 255, 0.76);
    }

    .login-form-panel {
        width: 44%;
        min-height: 100dvh;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 3rem clamp(2rem, 5vw, 6rem);
        background: #ffffff;
    }

    .login-form-wrap {
        width: min(100%, 23.75rem);
    }

    .mobile-brand {
        display: none;
    }

    .login-header {
        margin-bottom: 2.25rem;
    }

    .login-header h2 {
        margin: 0;
        color: var(--login-text);
        font-size: 1.75rem;
        line-height: 1.16;
        font-weight: 800;
        letter-spacing: 0;
    }

    .login-header p {
        margin: 0.75rem 0 0;
        color: var(--login-muted);
        font-size: 0.83rem;
        letter-spacing: 0;
    }

    .login-form {
        margin: 0;
    }

    .form-field {
        margin-bottom: 1.25rem;
    }

    .form-field label {
        display: block;
        margin-bottom: 0.55rem;
        color: #4f5c6e;
        font-size: 0.72rem;
        line-height: 1;
        font-weight: 800;
        letter-spacing: 0.06rem;
        text-transform: uppercase;
    }

    .login-input {
        width: 100%;
        height: 2.95rem;
        padding: 0 1rem;
        color: var(--login-text);
        font-size: 0.94rem;
        border: 1px solid var(--login-border);
        border-radius: 0.7rem;
        background: #ffffff;
        outline: none;
        transition: border-color 0.15s ease, box-shadow 0.15s ease;
    }

    .login-input::placeholder {
        color: #9aa3b3;
    }

    .login-input:focus {
        border-color: #8b5cf6;
        box-shadow: 0 0 0 0.18rem rgba(139, 92, 246, 0.11);
    }

    .password-field {
        position: relative;
    }

    .password-input {
        padding-right: 3.1rem;
    }

    .password-toggle {
        position: absolute;
        top: 50%;
        right: 0.72rem;
        width: 2rem;
        height: 2rem;
        display: flex;
        align-items: center;
        justify-content: center;
        transform: translateY(-50%);
        color: var(--login-purple);
        border: 0;
        border-radius: 50%;
        background: transparent;
        cursor: pointer;
    }

    .password-toggle:focus-visible {
        outline: 2px solid rgba(139, 92, 246, 0.35);
        outline-offset: 2px;
    }

    .password-icon {
        width: 1rem;
        height: 1rem;
        fill: currentColor;
    }

    .password-icon-visible,
    .password-toggle.is-visible .password-icon-hidden {
        display: none;
    }

    .password-toggle.is-visible .password-icon-visible {
        display: block;
    }

    .login-submit {
        width: 100%;
        height: 2.9rem;
        margin-top: 0.6rem;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        color: #ffffff;
        font-size: 0.88rem;
        font-weight: 800;
        letter-spacing: 0.12rem;
        text-transform: uppercase;
        border: 0;
        border-radius: 0.7rem;
        background: linear-gradient(90deg, #8b5cf6 0%, #6d28d9 100%);
        box-shadow: 0 0.8rem 1.35rem rgba(109, 40, 217, 0.25);
        cursor: pointer;
        transition: transform 0.15s ease, box-shadow 0.15s ease;
    }

    .login-submit:hover {
        transform: translateY(-1px);
        box-shadow: 0 0.9rem 1.45rem rgba(109, 40, 217, 0.3);
    }

    .login-submit:focus-visible {
        outline: 2px solid rgba(139, 92, 246, 0.35);
        outline-offset: 3px;
    }

    .login-divider {
        position: relative;
        margin: 1.55rem 0;
        height: 1px;
        background: var(--login-border);
    }

    .login-divider span {
        position: absolute;
        left: 50%;
        top: 50%;
        padding: 0 0.8rem;
        transform: translate(-50%, -50%);
        color: #bdc5d2;
        font-size: 0.78rem;
        background: #ffffff;
    }

    .forgot-link {
        width: 100%;
        height: 2.85rem;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        color: var(--login-purple);
        font-size: 0.83rem;
        font-weight: 800;
        letter-spacing: 0.09rem;
        text-transform: uppercase;
        text-decoration: none;
        border: 1px solid var(--login-purple);
        border-radius: 0.7rem;
        background: #ffffff;
        transition: color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
    }

    .forgot-link:hover {
        color: #ffffff;
        text-decoration: none;
        background: var(--login-purple);
        box-shadow: 0 0.5rem 1rem rgba(109, 40, 217, 0.18);
    }

    .forgot-link:focus-visible {
        outline: 2px solid rgba(139, 92, 246, 0.35);
        outline-offset: 3px;
    }

    .login-secondary {
        width: 100%;
        height: 2.85rem;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        color: var(--login-purple);
        font-size: 0.83rem;
        font-weight: 800;
        letter-spacing: 0.09rem;
        text-transform: uppercase;
        border: 1px solid rgba(139, 92, 246, 0.35);
        border-radius: 0.7rem;
        background: rgba(139, 92, 246, 0.06);
        cursor: pointer;
        transition: color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
    }

    .login-secondary:hover {
        color: #ffffff;
        background: var(--login-purple);
        box-shadow: 0 0.5rem 1rem rgba(109, 40, 217, 0.18);
    }

    .login-secondary:focus-visible {
        outline: 2px solid rgba(139, 92, 246, 0.35);
        outline-offset: 3px;
    }

    .password-reset-actions {
        margin: 1rem 0 0;
    }

    .password-reset-back-link {
        margin-top: 1rem;
    }

    .otp-input {
        text-transform: uppercase;
        letter-spacing: 0.22rem;
        font-weight: 800;
    }

    .password-hints {
        margin: -0.35rem 0 1.2rem;
        padding: 0.9rem 1rem;
        color: var(--login-muted);
        font-size: 0.78rem;
        line-height: 1.45;
        border: 1px solid #e5e9f1;
        border-radius: 0.7rem;
        background: #f8faff;
    }

    .password-rule {
        position: relative;
        margin-bottom: 0.35rem;
        padding-left: 1.05rem;
    }

    .password-rule:last-child {
        margin-bottom: 0;
    }

    .password-rule::before {
        content: "";
        position: absolute;
        left: 0;
        top: 0.46rem;
        width: 0.42rem;
        height: 0.42rem;
        border-radius: 50%;
        background: #c4ccd8;
    }

    .password-rule.is-valid {
        color: #157347;
        font-weight: 700;
    }

    .password-rule.is-valid::before {
        background: #198754;
    }

    .mfa-methods {
        display: flex;
        flex-direction: column;
        gap: 0.85rem;
        margin: 1.5rem 0 0.5rem;
    }

    .mfa-method-btn {
        width: 100%;
        min-height: 4.75rem;
        display: flex;
        align-items: center;
        gap: 1rem;
        padding: 1rem 1.15rem;
        text-decoration: none;
        color: inherit;
        border: 1.5px solid rgba(139, 92, 246, 0.35);
        border-radius: 0.85rem;
        background: #ffffff;
        transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, transform 0.15s ease;
    }

    .mfa-method-btn:hover,
    .mfa-method-btn:focus-visible {
        border-color: var(--login-purple);
        box-shadow: 0 0.45rem 1rem rgba(109, 40, 217, 0.12);
        transform: translateY(-1px);
        text-decoration: none;
        color: inherit;
        outline: none;
    }

    .mfa-method-btn:focus-visible {
        outline: 2px solid rgba(139, 92, 246, 0.35);
        outline-offset: 3px;
    }

    .mfa-method-btn__icon {
        flex-shrink: 0;
        width: 2.5rem;
        height: 2.5rem;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 1.35rem;
        border-radius: 0.65rem;
        background: rgba(139, 92, 246, 0.08);
    }

    .mfa-method-btn__content {
        flex: 1;
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 0.35rem;
    }

    .mfa-method-btn__title {
        display: block;
        color: var(--login-text);
        font-size: 0.95rem;
        font-weight: 800;
        line-height: 1.3;
    }

    .mfa-method-btn__desc {
        display: block;
        color: var(--login-muted);
        font-size: 0.82rem;
        line-height: 1.45;
    }

    .mfa-method-btn__arrow {
        flex-shrink: 0;
        width: 1.15rem;
        height: 1.15rem;
        fill: none;
        stroke: #94a3b8;
        stroke-width: 2;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .mfa-method-btn:hover .mfa-method-btn__arrow,
    .mfa-method-btn:focus-visible .mfa-method-btn__arrow {
        stroke: var(--login-purple);
    }

    .login-footer {
        margin-top: 2rem;
        color: #98a2b3;
        font-size: 0.72rem;
        text-align: center;
    }

    .alert,
    .validation-summary-errors {
        margin-bottom: 1.25rem;
        font-size: 0.85rem;
    }

    .validation-summary-errors ul {
        margin-bottom: 0;
        padding-left: 1.15rem;
    }

    @media (max-width: 991.98px) {
        .login-shell {
            min-height: 100dvh;
            display: block;
            overflow-y: auto;
        }

        .login-visual {
            display: none;
        }

        .login-form-panel {
            width: 100%;
            min-height: 100dvh;
            flex-direction: column;
            align-items: flex-start;
            justify-content: flex-start;
            padding: 2rem 1.25rem;
        }

        .login-form-wrap {
            width: 100%;
            max-width: 25rem;
            margin: 0 auto;
        }

        .mobile-brand {
            width: 100%;
            max-width: 25rem;
            margin: 0 auto 2.4rem;
            display: flex;
            align-items: center;
            gap: 0.85rem;
            color: var(--login-text);
        }

        .mobile-brand-logo {
            width: 7.5rem;
            height: auto;
            flex: 0 0 7.5rem;
        }

        .mobile-brand strong,
        .mobile-brand span {
            display: block;
            letter-spacing: 0;
        }

        .mobile-brand strong {
            font-size: 1.1rem;
            font-weight: 800;
        }

        .mobile-brand span {
            margin-top: 0.2rem;
            color: var(--login-muted);
            font-size: 0.78rem;
        }

        .login-header {
            margin-bottom: 2rem;
        }

        .login-header h2 {
            font-size: 1.6rem;
        }
    }

    @media (min-width: 992px) and (max-width: 1399.98px) {
        .login-visual-content {
            width: min(62%, 31rem);
            min-width: 25rem;
        }

        .feature-card {
            width: 25.5rem;
            height: 19rem;
        }

        .login-form-panel {
            padding-inline: 3rem;
        }
    }

    @media (max-width: 420px) {
        .login-form-panel {
            padding: 1.5rem 1rem;
        }

        .login-input,
        .login-submit,
        .login-secondary,
        .forgot-link {
            height: 3rem;
        }

        .forgot-link,
        .login-secondary,
        .login-submit {
            font-size: 0.78rem;
            letter-spacing: 0.075rem;
        }

        .login-footer {
            line-height: 1.45;
        }
    }

    /* Logout page */
    .logout-icon {
        width: 3.5rem;
        height: 3.5rem;
        margin: 0 auto 1.25rem;
        display: flex;
        align-items: center;
        justify-content: center;
        background: linear-gradient(135deg, rgba(139, 92, 246, 0.12) 0%, rgba(139, 92, 246, 0.18) 100%);
        border-radius: 50%;
        color: #8b5cf6;
    }

    .logout-icon svg {
        width: 1.6rem;
        height: 1.6rem;
        fill: currentColor;
    }

    .logout-message {
        margin: 1.25rem 0 1.5rem;
        padding: 1rem 1.25rem;
        background: #f8f9fc;
        border-radius: 0.75rem;
        border-left: 3px solid #8b5cf6;
        color: #475467;
        font-size: 0.875rem;
        line-height: 1.55;
    }

    .logout-return-btn {
        text-decoration: none;
    }

    .login-submit-secondary {
        margin-top: 0.75rem;
        background: transparent;
        color: #8b5cf6;
        border: 1.5px solid #8b5cf6;
        box-shadow: none;
    }

    .login-submit-secondary:hover {
        background: rgba(139, 92, 246, 0.05);
        box-shadow: none;
        transform: translateY(-1px);
    }
/* Sharefy IdentityServer admin portal */
.admin-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 260px 1fr;
    background: #f8fafc;
    color: #0f172a;
}

.admin-sidebar {
    background: var(--login-dark, #171521);
    color: #e2e8f0;
    padding: 24px 18px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.admin-brand {
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
}

.admin-sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.admin-sidebar nav a,
.admin-exit {
    color: #cbd5e1;
    text-decoration: none;
    padding: 10px 12px;
    border-radius: 6px;
}

.admin-sidebar nav a.active,
.admin-sidebar nav a:hover,
.admin-exit:hover {
    background: rgba(139, 92, 246, 0.24);
    color: #fff;
}

.admin-exit {
    margin-top: auto;
}

.admin-main {
    padding: 28px;
    overflow-x: auto;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
}

.admin-header h1 {
    font-size: 1.7rem;
    margin: 0 0 6px;
}

.admin-header p {
    margin: 0;
    color: #64748b;
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
}

.admin-card,
.admin-panel {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.admin-card {
    padding: 18px;
}

.admin-card strong {
    display: block;
    font-size: 1.8rem;
}

.admin-card span {
    color: #64748b;
}

.admin-panel {
    padding: 18px;
    margin-bottom: 18px;
}

.admin-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
}

.admin-form-grid label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: .9rem;
    color: #334155;
}

.admin-form-grid input,
.admin-form-grid textarea,
.admin-form-grid select {
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 9px 10px;
    background: #fff;
    color: #0f172a;
}

.admin-form-grid textarea {
    min-height: 88px;
}

.admin-actions {
    margin-top: 14px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.admin-button {
    border: 0;
    border-radius: 6px;
    padding: 10px 14px;
    background: #8b5cf6;
    color: #fff;
    cursor: pointer;
    text-decoration: none;
}
.admin-button:hover { background: #6d28d9; }

.admin-muted-button {
    background: #e2e8f0;
    color: #0f172a;
}

.admin-danger-button {
    background: #dc2626;
    color: #fff;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}

.admin-table th,
.admin-table td {
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
    padding: 10px 12px;
    vertical-align: top;
}

.admin-table th {
    background: #f1f5f9;
    color: #334155;
    font-weight: 600;
}

.admin-search {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
}

.admin-search input {
    flex: 1;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 9px 10px;
}

.admin-pagination {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 12px;
}

.admin-validation {
    color: #b91c1c;
    margin: 0 0 12px;
}

@media (max-width: 820px) {
    .admin-shell {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        position: static;
    }
}
