html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: #f6f5f2; color: #282828; overflow-x: hidden; }
.portal-main { width: min(1180px, 100%); margin: 0 auto; padding: 2rem clamp(1rem, 4vw, 3rem); }
.auth-shell { width: 100%; display: grid; place-items: center; }
.auth-card {
    width: min(100%, 440px);
    padding: clamp(1.25rem, 5vw, 2.5rem);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 14px 40px rgba(0,0,0,.09);
}
.auth-card--gateway {
    text-align: center;
    border: 1px solid #ebe6de;
    background: linear-gradient(165deg, #fff 0%, #faf7f2 55%, #f3ebe1 100%);
    box-shadow: 0 16px 44px rgba(40, 28, 12, 0.1);
}
.auth-brand {
    display: grid;
    gap: 0.55rem;
    justify-items: center;
    text-align: center;
    margin: 0 0 1.35rem;
}
.auth-brand__logo {
    display: block;
    width: min(220px, 72vw);
    height: auto;
    margin-inline: auto;
}
.auth-brand__tagline {
    margin: 0;
    color: #8a847b;
    font-size: 0.82rem;
    letter-spacing: 0.04em;
}
.auth-brand__wordmark {
    color: var(--auth-brand-primary, #17324d);
    font-size: clamp(1.45rem, 5vw, 2rem);
    line-height: 1.15;
    letter-spacing: -0.02em;
}
.auth-eyebrow {
    margin: 0 0 0.4rem;
    color: var(--auth-brand-secondary, #bb6b22);
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.78rem;
}
.auth-card--gateway h1 {
    margin: 0 0 0.55rem;
    font-size: clamp(1.65rem, 3.2vw, 2rem);
    letter-spacing: -0.02em;
}
.auth-lead {
    margin: 0 0 1.35rem;
    color: #5e5952;
    font-size: 0.98rem;
    line-height: 1.5;
}
.auth-card__cta {
    width: 100%;
    min-height: 50px;
    font-size: 1.02rem;
}
.auth-footnote {
    margin: 1.15rem 0 0;
    color: #8a847b;
    font-size: 0.86rem;
    line-height: 1.45;
}
.auth-back {
    display: inline-block;
    margin-top: 0.85rem;
    font-weight: 650;
}
.auth-hint { color: #6f6a63; font-size: .92rem; }
.brand-mark, .eyebrow { color: #bb6b22; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.auth-card form { display: grid; gap: 1rem; margin-top: 1.5rem; }
.auth-card label { display: grid; gap: .45rem; font-weight: 650; }
.auth-card input { width: 100%; min-height: 48px; border: 1px solid #c9c5be; border-radius: 10px; padding: .75rem; font: inherit; }
.primary {
    min-height: 46px;
    border: 0;
    border-radius: 999px;
    padding: .75rem 1.4rem;
    background: linear-gradient(145deg, #c8782e 0%, #bb6b22 55%, #a35c1b 100%);
    color: #fff;
    font-weight: 750;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(187, 107, 34, 0.28);
    transition: filter .15s ease, box-shadow .15s ease;
}
.primary:is(a) { display: inline-flex; align-items: center; text-decoration: none; }
.primary:hover:not(:disabled) { filter: brightness(1.05); box-shadow: 0 4px 14px rgba(187, 107, 34, 0.34); }
.primary:disabled { opacity: .6; cursor: wait; }
.alert { padding: .8rem 1rem; border-radius: 12px; background: #fff0ee; color: #8a241c; border: 1px solid #f5c9c3; }
.dashboard { display: grid; gap: 1.75rem; }
.dashboard__loading {
    padding: 1.5rem;
    border-radius: 16px;
    background: #fff;
    border: 1px solid #ebe6de;
    color: #6f6a63;
    box-shadow: 0 4px 14px rgba(0,0,0,.045);
}
.dashboard__hero {
    padding: 1.5rem 1.6rem;
    border-radius: 18px;
    background: linear-gradient(165deg, #fff 0%, #faf7f2 45%, #f3ebe1 100%);
    border: 1px solid #ebe6de;
    box-shadow: 0 6px 20px rgba(40, 28, 12, 0.06);
}
.dashboard__hero h1 {
    margin: .35rem 0 .45rem;
    font-size: clamp(1.7rem, 3vw, 2.15rem);
    letter-spacing: -0.02em;
}
.dashboard__email { margin: 0; color: #6f6a63; }
.dashboard__services-head { margin-bottom: 1rem; }
.dashboard__services-head h2 { margin: 0 0 .35rem; }
.dashboard__services-head p { margin: 0; color: #6f6a63; font-size: .92rem; }
.service-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 1.1rem; }
.service-card {
    position: relative;
    min-width: 0;
    padding: 1.35rem 1.35rem 1.25rem;
    border-radius: 16px;
    background: linear-gradient(145deg, #fff 0%, #fcfbf9 100%);
    border: 1px solid #ebe6de;
    border-top: 3px solid #bb6b22;
    box-shadow: 0 6px 18px rgba(40, 28, 12, 0.06);
    overflow-wrap: anywhere;
    transition: box-shadow .2s ease, border-color .2s ease;
}
.service-card:hover { box-shadow: 0 10px 26px rgba(40, 28, 12, 0.09); border-color: #e0d8cc; }
.service-card--empty { border-top-color: #c9c5be; }
.service-card h3 { margin: 0 2.5rem .55rem 0; font-size: 1.12rem; }
.service-card__desc { margin: 0 0 .65rem; color: #5e5952; font-size: .9rem; }
.service-card__ref {
    display: block;
    color: #8a847b;
    font-size: .78rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.service-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem; margin-top: 1.15rem; }
.service-actions .secondary {
    display: inline-flex;
    align-items: center;
    min-height: 46px;
    padding: .7rem 1.2rem;
    border: 1px solid #c9c5be;
    border-radius: 999px;
    background: #fff;
    color: #282828;
    text-decoration: none;
    font-weight: 700;
    transition: background .15s ease, border-color .15s ease;
}
.service-actions .secondary:hover { background: #faf7f2; border-color: #b5aea4; }
.status {
    float: right;
    border-radius: 999px;
    padding: .3rem .7rem;
    background: #f4e4d5;
    color: #864914;
    font-size: .78rem;
    font-weight: 750;
    border: 1px solid transparent;
}
.status--done { background: #e7f5eb; color: #27653a; border-color: #c6e6cf; }
.status--progress { background: #fff4d8; color: #6a5521; border-color: #f0dfa6; }
.status--new { background: #edf2f7; color: #405266; border-color: #d7e0ea; }
.nav-button { width: 100%; min-height: 44px; border: 0; background: transparent; text-align: left; cursor: pointer; }
@media (max-width: 480px) { .portal-main { padding: 1.25rem 1rem; } .primary { width: 100%; } .auth-card { border-radius: 14px; } }

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #0071c1;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNT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-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

/* Blazor WASM boot splash */
.app-boot-splash {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    overflow: hidden;
}

.app-boot-splash__bg {
    position: absolute;
    inset: -15%;
    background:
        radial-gradient(ellipse 80% 55% at 20% 30%, rgba(37, 140, 251, 0.2), transparent 52%),
        radial-gradient(ellipse 65% 50% at 85% 70%, rgba(192, 45, 118, 0.14), transparent 48%),
        linear-gradient(165deg, #f0f6fc 0%, #e8f0fa 45%, #dce8f4 100%);
    animation: app-boot-bg-drift 18s ease-in-out infinite alternate;
}

.app-boot-splash__aurora {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(27, 110, 194, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(27, 110, 194, 0.06) 1px, transparent 1px);
    background-size: 52px 52px;
    mask-image: radial-gradient(ellipse 72% 62% at 50% 45%, #000 0%, transparent 72%);
    pointer-events: none;
    animation: app-boot-grid-pulse 10s ease-in-out infinite;
}

.app-boot-splash__card {
    position: relative;
    text-align: center;
    padding: 2.25rem 2.5rem 2.35rem;
    max-width: min(26rem, 100%);
    border-radius: 1.35rem;
    background: linear-gradient(155deg, rgba(255, 255, 255, 0.92) 0%, rgba(255, 255, 255, 0.78) 100%);
    border: 1px solid rgba(255, 255, 255, 0.95);
    box-shadow:
        0 0 0 1px rgba(27, 110, 194, 0.06) inset,
        0 28px 70px rgba(27, 60, 120, 0.12),
        0 0 60px rgba(37, 140, 251, 0.08);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.app-boot-splash__brand {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 1.35rem;
    min-height: 4.5rem;
}

.app-boot-splash__logo-glow {
    position: absolute;
    left: 18%;
    top: 50%;
    width: min(140px, 38vw);
    height: min(140px, 38vw);
    border-radius: 50%;
    background:
        radial-gradient(circle at 50% 50%, rgba(197, 160, 89, 0.38) 0%, rgba(197, 160, 89, 0.09) 48%, transparent 70%);
    filter: blur(3px);
    pointer-events: none;
    z-index: 0;
    transform: translate(-50%, -50%);
    animation: app-boot-gold-breathe 3.8s ease-in-out infinite;
}

.app-boot-splash__logo-frame {
    position: relative;
    z-index: 1;
    display: inline-block;
    max-width: min(300px, 90vw);
    overflow: hidden;
    border-radius: 12px;
    animation: app-boot-logo-float 5.5s ease-in-out infinite;
}

.app-boot-splash__logo {
    display: block;
    width: 100%;
    height: auto;
    vertical-align: top;
    filter:
        drop-shadow(0 6px 20px rgba(26, 58, 92, 0.12))
        drop-shadow(0 0 20px rgba(197, 160, 89, 0.1));
}

.app-boot-splash__logo[hidden],
.app-boot-splash__neutral[hidden] {
    display: none;
}

.app-boot-splash__neutral {
    min-height: 4.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    color: #17324d;
    font-size: clamp(1.35rem, 5vw, 2rem);
    letter-spacing: 0.04em;
}

.app-boot-splash__neutral span { font-weight: 500; }
.app-boot-splash__neutral strong { color: #bb6b22; font-weight: 800; }

.app-boot-splash__logo-frame::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(
        115deg,
        transparent 36%,
        rgba(255, 255, 255, 0.65) 47%,
        rgba(255, 248, 220, 0.9) 50%,
        rgba(255, 255, 255, 0.55) 53%,
        transparent 64%
    );
    transform: translateX(-140%) skewX(-14deg);
    animation: app-boot-logo-shimmer 5s ease-in-out infinite;
    pointer-events: none;
    mix-blend-mode: soft-light;
}

.app-boot-splash__ring-wrap {
    position: relative;
    width: 9.25rem;
    height: 9.25rem;
    margin: 0 auto 0.35rem;
}

.app-boot-splash__orbit {
    position: absolute;
    inset: 0;
    margin: auto;
    border-radius: 50%;
    pointer-events: none;
    border: 1px solid transparent;
    transform-origin: center center;
}

.app-boot-splash__orbit--a {
    width: calc(100% + 10px);
    height: calc(100% + 10px);
    border-color: rgba(27, 110, 194, 0.28);
    border-style: dashed;
    animation: app-boot-spin 22s linear infinite;
}

.app-boot-splash__orbit--b {
    width: calc(100% + 28px);
    height: calc(100% + 28px);
    border-color: rgba(192, 45, 118, 0.15);
    border-style: dotted;
    border-width: 2px;
    animation: app-boot-spin-reverse 32s linear infinite;
}

.app-boot-splash .loading-progress {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 0;
    filter: drop-shadow(0 0 14px rgba(37, 140, 251, 0.35));
}

.app-boot-splash .loading-progress circle {
    fill: none;
    stroke: rgba(27, 110, 194, 0.12);
    stroke-width: 0.55rem;
    stroke-linecap: round;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.app-boot-splash .loading-progress circle:last-child {
    stroke: url(#boot-ring-grad);
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}

.app-boot-splash .loading-progress-text {
    position: relative;
    inset: auto;
    margin-top: 0.15rem;
    text-align: center;
    font-weight: 600;
    font-size: 0.8125rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #1a3a5c;
}

.app-boot-splash .loading-progress-text::after {
    content: var(--blazor-load-percentage-text, "Loading");
    animation: app-boot-text-shimmer 2.8s ease-in-out infinite;
}

.app-boot-splash__tagline {
    margin: 1.1rem 0 0;
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: rgba(26, 58, 92, 0.55);
}

@keyframes app-boot-bg-drift {
    0% { transform: translate(0, 0) rotate(0deg) scale(1); }
    100% { transform: translate(1.5%, -1%) rotate(1deg) scale(1.03); }
}

@keyframes app-boot-grid-pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 0.85; }
}

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

@keyframes app-boot-spin-reverse {
    to { transform: rotate(-360deg); }
}

@keyframes app-boot-text-shimmer {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes app-boot-gold-breathe {
    0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.95; transform: translate(-50%, -50%) scale(1.14); }
}

@keyframes app-boot-logo-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

@keyframes app-boot-logo-shimmer {
    0%, 28% { transform: translateX(-140%) skewX(-14deg); }
    55%, 100% { transform: translateX(160%) skewX(-14deg); }
}

@media (prefers-reduced-motion: reduce) {
    .app-boot-splash__bg,
    .app-boot-splash__aurora,
    .app-boot-splash__orbit--a,
    .app-boot-splash__orbit--b,
    .app-boot-splash .loading-progress-text::after,
    .app-boot-splash__logo-glow,
    .app-boot-splash__logo-frame,
    .app-boot-splash__logo-frame::after {
        animation: none;
    }
}

code {
    color: #c02d76;
}

/* Staging environment banner (matches Employee Portal) */
.tc-staging-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.125rem;
    padding: 0.5rem 1rem 0.625rem;
    background: hsl(38, 92%, 50%);
    border-top: 2px solid hsl(32, 95%, 38%);
    color: hsl(24, 45%, 12%);
    text-align: center;
    box-shadow: 0 -2px 8px hsla(24, 45%, 12%, 0.12);
}

.tc-staging-banner__title {
    margin: 0;
    font-size: 0.8125rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 0.06em;
}

.tc-staging-banner__message {
    margin: 0;
    font-size: 0.6875rem;
    font-weight: 500;
    line-height: 1.35;
    opacity: 0.92;
}

html:has(.tc-staging-banner) {
    scroll-padding-bottom: 3.5rem;
}

html:has(.tc-staging-banner) .portal-shell,
html:has(.tc-staging-banner) .auth-layout {
    padding-bottom: 3.5rem;
}

html:has(.tc-staging-banner) .portal-toast-host {
    bottom: 4.75rem;
}

@media (max-width: 767.98px) {
    html:has(.tc-staging-banner) .portal-toast-host {
        top: max(.75rem, env(safe-area-inset-top));
        bottom: auto;
    }
}
.portal-icon {
    display: inline-block;
    flex: 0 0 auto;
    width: 1.1rem;
    height: 1.1rem;
    margin-inline-end: .38rem;
    vertical-align: -.18em;
}

.portal-icon--trailing {
    margin-inline: .38rem 0;
}
