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

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    font-family: var(--font-family-sans);
    background: radial-gradient(circle at 22% 68%, rgba(5, 147, 209, 0.22), transparent 28%), radial-gradient(circle at 82% 86%, rgba(154, 23, 126, 0.30), transparent 30%), linear-gradient(120deg, #013d63 0%, #0d365f 48%, #202b69 74%, #3c1559 100%);
    color: #fff;
}

a,
button,
input {
    -webkit-tap-highlight-color: transparent;
}

/* Public landing and login panels */

.landing-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 0 14px;
}

.landing-main {
    flex: 1 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 0 24px;
}

.login-panel {
    width: 100%;
    display: flex;
    justify-content: center;
    color: #1f2937;
}

.login-card {
    width: 100%;
    max-width: 392px;
    padding: 18px 16px 16px;
    border: 1px solid rgba(214, 218, 225, 0.9);
    border-radius: 12px;
    background: var(--white);
    box-shadow: var(--shadow-brand-panel);
}

#root {
    min-height: 100vh;
}

.brand-lockup {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.brand-glyph {
    display: grid;
    grid-template-columns: repeat(4, 5px);
    gap: 2px;
}

.brand-glyph span {
    width: 5px;
    height: 5px;
    border-radius: 50%;
}

.brand-glyph span:nth-child(1),
.brand-glyph span:nth-child(7),
.brand-glyph span:nth-child(12) {
    background: #59b44d;
}

.brand-glyph span:nth-child(2),
.brand-glyph span:nth-child(5),
.brand-glyph span:nth-child(10) {
    background: #f5c542;
}

.brand-glyph span:nth-child(3),
.brand-glyph span:nth-child(8),
.brand-glyph span:nth-child(11) {
    background: #18a0db;
}

.brand-glyph span:nth-child(4),
.brand-glyph span:nth-child(6),
.brand-glyph span:nth-child(9) {
    background: #a33d97;
}

.brand-wordmark {
    font-size: 23px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #15528c;
    text-transform: lowercase;
}

.brand-formerly-text {
    margin-top: 4px;
    font-size: 10px;
    color: #8a8f98;
    font-style: italic;
}

.brand-spacer,
.field-spacer {
    height: 16px;
}

.login-card h2 {
    margin: 0;
    font-size: 24px;
    line-height: 1.25;
    font-weight: 500;
    color: #1f2937;
}

.status-panel {
    display: flex;
    justify-content: center;
    padding: 18px 0;
    background: transparent;
    border: 0;
    margin: 0;
}

.status-panel.is-hidden,
.form-panel.is-hidden,
.validation-summary.is-hidden {
    display: none !important;
}

.spinner {
    width: 26px;
    height: 26px;
    border: 3px solid rgba(15, 95, 153, 0.22);
    border-top-color: #0f5f99;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.field-label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 400;
    color: #616b77;
}

.text-input,
.primary-button {
    width: 100%;
    min-height: 40px;
    font: inherit;
    border-radius: 8px;
}

.text-input {
    padding: 0 12px;
    border: 1px solid #d6dae1;
    background: var(--white);
    color: #1f2937;
    outline: none;
    transition: border-color 0.14s ease, box-shadow 0.14s ease;
}

.text-input::placeholder {
    color: #8d96a2;
}

.text-input:focus,
.text-input[data-invalid="true"] {
    border-color: #0f5f99;
    box-shadow: 0 0 0 3px rgba(15, 95, 153, 0.16);
}

.validation-summary {
    margin-top: 12px;
    margin-bottom: 0;
    padding: 10px 12px;
    border: 1px solid #e6b4b4;
    border-radius: 8px;
    background: #fff1f1;
    color: #a42828;
    font-size: 13px;
    line-height: 1.4;
}

.primary-button {
    border: 1px solid #0f5f99;
    background: #0f5f99;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.primary-button:hover,
.primary-button:focus-visible {
    background: #0b4d7d;
    border-color: #0b4d7d;
}

.primary-button:disabled {
    opacity: 0.72;
    cursor: wait;
}

.support-link-container {
    text-align: right;
}

.text-link {
    color: #0f5f99;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}

.text-link:hover,
.text-link:focus-visible {
    color: #0b4d7d;
    text-decoration: underline;
}

.text-input:hover,
.auth-shell-search input:hover {
    border-color: #b9c5d2;
}

.legal-footer {
    flex: 0 0 auto;
    padding: 0 0 12px;
    color: rgba(255, 255, 255, 0.98);
    font-size: 10px;
    line-height: 1.5;
    text-shadow: var(--shadow-text-inverse);
}

/* Client selection */

.client-selection-shell .landing-main {
    padding-top: 48px;
}

.client-selection-card {
    max-width: 720px;
}

.client-selection-intro {
    margin: 10px 0 0;
    color: #526173;
    font-size: 14px;
    line-height: 1.5;
}

.client-selection-list {
    list-style: none;
    margin: 20px 0 0;
    padding: 0;
    display: grid;
    gap: 10px;
}

.client-selection-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    border: 1px solid #d6dae1;
    border-radius: 10px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    color: #1f2937;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: transform 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
}

.client-selection-link:hover,
.client-selection-link:focus-visible {
    border-color: #0f5f99;
    box-shadow: 0 0 0 3px rgba(15, 95, 153, 0.16);
    transform: translateY(-1px);
}

.client-selection-arrow {
    color: #0f5f99;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.auth-shell-page {
    min-height: 100vh;
    background: radial-gradient(circle at 20% 24%, rgba(5, 147, 209, 0.10), transparent 30%), linear-gradient(180deg, #f7fbff 0%, #eef5fb 100%);
    color: #1f2937;
}

/* Authenticated shell navigation */

.auth-shell-navbar {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 14px 24px;
    background: #fff;
    border-bottom: 1px solid #dfe5ec;
    box-shadow: 0 4px 18px rgba(16, 24, 40, 0.06);
}

.auth-shell-brand,
.auth-shell-actions,
.auth-shell-nav {
    display: flex;
    align-items: center;
}

.auth-shell-brand {
    gap: 12px;
    flex-shrink: 0;
}

.auth-shell-brand-link {
    display: inline-flex;
    align-items: center;
}

.auth-shell-brand-link img {
    height: 34px;
}

.auth-shell-brand-text {
    padding-left: 12px;
    border-left: 1px solid #dfe5ec;
    font-size: 24px;
    font-weight: 500;
    color: #1f2937;
}

.auth-shell-search {
    flex: 1 1 280px;
    min-width: 200px;
}

.auth-shell-search input {
    width: 100%;
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid #d4dce5;
    border-radius: 999px;
    background: #f8fafc;
    color: #334155;
    font: inherit;
}

.auth-shell-nav {
    gap: 8px;
}

.auth-shell-actions {
    margin-left: auto;
    gap: 10px;
}

.auth-shell-nav-link,
.auth-shell-dropdown-toggle {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 14px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #1f2937;
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
}

.auth-shell-nav-link:hover,
.auth-shell-nav-link:focus-visible,
.auth-shell-dropdown-toggle:hover,
.auth-shell-dropdown-toggle:focus-visible {
    background: #eff6ff;
    color: #0f5f99;
}

.auth-shell-dropdown-toggle::after {
    content: "";
    width: 8px;
    height: 8px;
    margin-left: 10px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg) translateY(-1px);
    transition: transform 0.14s ease;
}

.auth-shell-dropdown.is-open .auth-shell-dropdown-toggle::after {
    transform: rotate(-135deg) translateY(-1px);
}

.auth-shell-dropdown {
    position: relative;
}

.auth-shell-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 240px;
    padding: 8px;
    border: 1px solid #dfe5ec;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.16);
    display: none;
    z-index: 20;
}

.auth-shell-dropdown.is-open .auth-shell-dropdown-menu {
    display: block;
}

.auth-shell-dropdown-menu-right {
    left: auto;
    right: 0;
}

.auth-shell-dropdown-heading {
    padding: 10px 12px 8px;
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
}

.auth-shell-dropdown-link {
    display: block;
    padding: 10px 12px;
    border-radius: 8px;
    color: #1f2937;
    font-size: 14px;
    text-decoration: none;
}

.auth-shell-dropdown-link:hover,
.auth-shell-dropdown-link:focus-visible,
.auth-shell-dropdown-link.is-active {
    background: #eff6ff;
    color: #0f5f99;
}

.auth-shell-content {
    max-width: 1180px;
    margin: 0 auto;
    padding: 28px 20px 32px;
}

/* Legacy shell compatibility */

.legacy-alert-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    padding: 14px 16px;
    border: 1px solid #b9e1eb;
    border-radius: 12px;
    background: #edf9fd;
    color: #0f4c5c;
}

.legacy-alert-banner p {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
}

.legacy-alert-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #0ea5b7;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
}

.auth-shell-card {
    padding: 22px;
    border: 1px solid #dfe5ec;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.auth-shell-card > *:first-child {
    margin-top: 0;
}

.auth-shell-card > *:last-child {
    margin-bottom: 0;
}

.auth-shell-loading-card {
    max-width: 220px;
    margin: 120px auto 0;
    display: flex;
    justify-content: center;
}

.auth-shell-title {
    margin: 0 0 18px;
    color: #111827;
    font-size: 28px;
    font-weight: 500;
}

.legacy-client-list {
    list-style: none;
    margin: 0;
    padding: 0;
    border: 1px solid #dfe5ec;
    border-radius: 12px;
    overflow: hidden;
}

.legacy-client-list li + li {
    border-top: 1px solid #dfe5ec;
}

.legacy-client-link {
    display: block;
    padding: 14px 16px;
    color: #0f5f99;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.14s ease, color 0.14s ease;
}

.legacy-client-link:hover,
.legacy-client-link:focus-visible {
    background: #f8fbff;
    text-decoration: underline;
}

.legacy-mvc-page {
    min-height: 100vh;
    background: var(--white);
    color: #212529;
    line-height: 1.5;
    font-family: Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
}

body:has(.legacy-mvc-page) {
    background: var(--white);
    color: #212529;
    line-height: 1.5;
    font-family: Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
}

body:has(.legacy-clients-page),
.legacy-clients-page {
    background: #f7f7f7 !important;
}

.legacy-clients-page #body {
    background: transparent !important;
}

.legacy-mvc-page .legacy-mvc-navbar {
    background-color: var(--white);
}

.legacy-mvc-page #body {
    min-height: calc(100vh - 58.8px);
    position: relative;
    padding-bottom: 115px;
}

.legacy-mvc-page #body:has(> .footer-container.legal-footer) {
    padding-bottom: 0;
}

.legacy-clients-page .legacy-loading-card {
    display: flex;
    justify-content: center;
    padding-top: 120px;
}

.legacy-clients-page .legacy-clients-breadcrumbs {
    margin-top: -3px !important;
    margin-bottom: 3px !important;
}

.legacy-clients-page .legacy-client-alert {
    display: flex;
    align-items: center;
    margin-left: -15px;
    margin-right: -15px;
}

.legacy-clients-page .legacy-client-alert.alert-info {
    color: var(--accent-primary-dark);
    background-color: var(--accent-primary-light);
    border-color: var(--accent-primary-lighter);
}

.legacy-clients-page .legacy-client-alert p {
    color: inherit;
    display: flex;
    align-items: center;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    margin: 0;
}

.legacy-clients-page .card-body {
    padding: 1.25rem;
}

.legacy-clients-page .list-group {
    margin-bottom: 0;
    text-align: left;
}

.legacy-clients-page .list-group-item {
    text-align: left;
}

.legacy-clients-page .footer-container {
    position: absolute;
    bottom: 0;
    width: calc(100% - 40px);
}

.legacy-clients-page .footer-text {
    text-align: start;
    font-size: 12px;
    line-height: 17px;
    color: var(--neutral-neutral-700);
}

.legacy-clients-page .footer-text p {
    margin-top: 0;
    margin-bottom: 1rem;
}

.legacy-home-page .footer-container {
    margin-top: 24px;
}

.legacy-home-page .footer-text {
    text-align: start;
    font-size: 12px;
    color: var(--neutral-neutral-700);
}

.legacy-home-page .footer-text p {
    margin-bottom: 1rem;
}

/* Responsive adjustments */

@media (max-width: 1400px) {
    .legacy-mvc-page #body {
        padding-bottom: 100px;
    }
}

@media (max-width: 1060px) {
    .legacy-mvc-page #body {
        padding-bottom: 120px;
    }
}

@media (max-width: 768px) {
    .legacy-mvc-page #body {
        padding-bottom: 160px;
    }
}

@media (max-width: 576px) {
    .legacy-mvc-page #body {
        padding-bottom: 200px;
    }
}

@media (max-width: 460px) {
    .legacy-mvc-page #body {
        padding-bottom: 270px;
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 640px) {
    .landing-shell {
        padding: 0 10px;
    }

    .landing-main {
        padding-top: 20px;
        padding-bottom: 18px;
    }

    .login-card {
        max-width: 100%;
    }

    .auth-shell-navbar {
        flex-wrap: wrap;
        padding: 14px 16px;
    }

    .auth-shell-search,
    .auth-shell-nav,
    .auth-shell-actions {
        width: 100%;
    }

    .auth-shell-nav,
    .auth-shell-actions {
        flex-wrap: wrap;
    }

    .auth-shell-actions {
        margin-left: 0;
    }

    .auth-shell-dropdown-menu,
    .auth-shell-dropdown-menu-right {
        left: 0;
        right: auto;
        width: min(280px, calc(100vw - 48px));
    }

    .auth-shell-content {
        padding: 20px 12px 28px;
    }
}

/* Legacy login bridge */

body:has(.legacy-login-page) {
    margin: 0;
    background: url("/Content/Images/darkergradient12.svg") center center fixed;
    background-repeat: no-repeat;
    background-size: cover;
    color: #fff;
    font-family: Roboto, "Segoe UI", Arial, sans-serif;
}

.legacy-login-page {
    min-height: 100vh;
    padding: 0;
    background: transparent;
    color: #fff;
}

.legacy-login-page .body-content {
    min-height: 100vh;
}

.legacy-login-page .status-panel {
    padding: 18px 0;
}

.legacy-login-page .login-container {
    box-shadow: none;
    color: var(--neutral-neutral-900);
    line-height: 21px;
    padding: 24px;
}

.legacy-login-page .login-container h2 {
    color: var(--neutral-neutral-900);
    font-size: 24px;
    line-height: 28.8px;
    margin: 0 0 8px;
}

.legacy-login-page .login-container label {
    color: var(--neutral-neutral-700);
}

.legacy-login-page .login-container input {
    color: var(--neutral-neutral-900);
    font-size: 16px;
    font-family: inherit;
    line-height: 24px;
}

.legacy-login-page .login-container .login-button {
    font-family: inherit;
    line-height: 21px;
}

.legacy-login-page .brand-formerly-text {
    margin: 2px 0 0 2px;
    color: #808387;
    font-family: Roboto, Arial, sans-serif;
    font-size: 13px;
    line-height: 19.5px;
}

.legacy-login-page .login-container input.hidden {
    display: none !important;
}

.legacy-login-page .login-container input.invalid-input {
    border: 1px solid #c42b18 !important;
}

.legacy-login-page .login-button.primary {
    background-color: var(--accent-primary);
    border-color: var(--accent-primary);
    color: var(--white);
}

.legacy-login-page .Message-text {
    color: #c42b18;
    font-size: 14px;
    line-height: 20px;
}

.legacy-login-page .footer-container {
    background: transparent;
    color: #fff;
}

.legacy-login-page .legacy-link-button {
    appearance: none;
    border: 0;
    background: transparent;
    padding: 0;
    font: inherit;
    cursor: pointer;
}

.legacy-login-page .legal-footer {
    padding: 0;
    font-size: 12px;
    line-height: 1.5;
    text-shadow: none;
}

.legacy-login-page .muse-fixed-notification {
    position: fixed;
    z-index: 1002;
    top: 100px;
    right: 10px;
    float: right;
}

.legacy-login-page .password-inline-error {
    display: none;
    position: absolute;
    top: 55%;
}

.legacy-login-page .login-email-label {
    font-size: 14px;
}

.legacy-login-page .confirmed-email-emphasis {
    font-weight: 500;
}

.legacy-login-page .muse-support-dialog-wrapper {
    z-index: 1050;
}

.legacy-login-page .muse-support-dialog {
    max-width: 600px;
}

.legacy-login-page .muse-support-dialog-title {
    display: inline;
}

.legacy-login-page .muse-support-dialog-close {
    opacity: 1;
}

@media (max-width: 430px) {
    .legacy-login-page .login-container {
        width: calc(100vw - 32px);
    }
}
