h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

#blazor-error-ui {
    background: rgba(0, 0, 0, 0.85);
    border-top: 1px solid var(--color-outline-variant, #444);
    bottom: 0;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.4);
    color: #fff;
    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+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}/* =======================================================
   TERRAIN — Design Token System + Bootstrap Overrides
   All custom utilities live here so components stay clean.
   ======================================================= */

/* -------------------------------------------------------
   1. Design Tokens (CSS Custom Properties)
------------------------------------------------------- */
:root {
    /* Primary / Brand */
    --color-primary:                #EA580C;
    --color-primary-dim:            #ff743b;
    --color-primary-fixed:          #ff7943;
    --color-primary-fixed-dim:      #fc6018;
    --color-primary-container:      #ff7943;
    --color-inverse-primary:        #a93900;
    --color-on-primary:             #571a00;
    --color-on-primary-fixed:       #000000;
    --color-on-primary-fixed-variant: #531800;
    --color-on-primary-container:   #441200;

    /* Secondary */
    --color-secondary:              #e5e2e1;
    --color-secondary-dim:          #d6d4d3;
    --color-secondary-fixed:        #e5e2e1;
    --color-secondary-fixed-dim:    #d6d4d3;
    --color-secondary-container:    #474746;
    --color-on-secondary:           #525151;
    --color-on-secondary-fixed:     #403f3f;
    --color-on-secondary-fixed-variant: #5c5b5b;
    --color-on-secondary-container: #d2d0cf;

    /* Tertiary */
    --color-tertiary:               #f9f9f9;
    --color-tertiary-dim:           #ebebeb;
    --color-tertiary-fixed:         #ffffff;
    --color-tertiary-fixed-dim:     #f1f1f1;
    --color-tertiary-container:     #ebebeb;
    --color-on-tertiary:            #5e5f5f;
    --color-on-tertiary-fixed:      #4f5051;
    --color-on-tertiary-fixed-variant: #6c6d6e;
    --color-on-tertiary-container:  #555757;

    /* Error */
    --color-error:                  #ff716c;
    --color-error-dim:              #d7383b;
    --color-error-container:        #9f0519;
    --color-on-error:               #490006;
    --color-on-error-container:     #ffa8a3;

    /* Surfaces */
    --color-background:             #0e0e0e;
    --color-surface:                #0e0e0e;
    --color-surface-dim:            #0e0e0e;
    --color-surface-bright:         #2c2c2c;
    --color-surface-variant:        #262626;
    --color-surface-tint:           #EA580C;
    --color-primary-vivid:          #ff9065;
    --color-surface-container-lowest: #000000;
    --color-surface-container-low:  #131313;
    --color-surface-container:      #191a1a;
    --color-surface-container-high: #1f2020;
    --color-surface-container-highest: #262626;
    --color-inverse-surface:        #fcf9f8;
    --color-inverse-on-surface:     #565555;

    /* Text */
    --color-on-background:          #ffffff;
    --color-on-surface:             #ffffff;
    --color-on-surface-variant:     #adaaaa;

    /* Borders */
    --color-outline:                #767575;
    --color-outline-variant:        #484848;

    /* Bootstrap overrides via CSS vars */
    --bs-primary:                   #EA580C;
    --bs-primary-rgb:               234, 88, 12;
    --bs-secondary:                 #e5e2e1;
    --bs-secondary-rgb:             229, 226, 225;
    --bs-danger:                    #ff716c;
    --bs-danger-rgb:                255, 113, 108;
    --bs-body-bg:                   #0e0e0e;
    --bs-body-color:                #ffffff;
    --bs-border-color:              #484848;
    --bs-border-radius:             0;
    --bs-border-radius-sm:          0;
    --bs-border-radius-lg:          0;
    --bs-border-radius-xl:          0;
    --bs-border-radius-xxl:         0;
    --bs-border-radius-pill:        9999px;

    /* Typography */
    --font-headline: 'Rajdhani', sans-serif;
    --font-body:     'Inter', sans-serif;
}

/* -------------------------------------------------------
   2. Base / Reset
------------------------------------------------------- */
*,
*::before,
*::after {
    border-radius: 0 !important;
}

/* Pill exception — explicit class only */
.rounded-pill { border-radius: 9999px !important; }

html.dark body,
body.terrain-dark {
    background-color: var(--color-background);
    color: var(--color-on-background);
    font-family: var(--font-body);
}

/* -------------------------------------------------------
   3. Material Symbols
------------------------------------------------------- */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    font-family: 'Material Symbols Outlined', sans-serif;
    font-style: normal;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    vertical-align: middle;
    -webkit-font-smoothing: antialiased;
}

.material-symbols-outlined.fill-1 {
    font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* -------------------------------------------------------
   4. Custom Typography Utilities
------------------------------------------------------- */
.font-headline { font-family: var(--font-headline) !important; }
.font-body     { font-family: var(--font-body) !important; }
.font-label    { font-family: var(--font-body) !important; }

.fw-black      { font-weight: 900 !important; }

.tracking-tightest { letter-spacing: -0.05em !important; }
.tracking-tighter  { letter-spacing: -0.03em !important; }
.tracking-tight    { letter-spacing: -0.01em !important; }
.tracking-wide     { letter-spacing: 0.05em !important; }
.tracking-wider    { letter-spacing: 0.08em !important; }
.tracking-widest   { letter-spacing: 0.1em !important; }

/* Display / headline sizes */
.display-mega { font-size: clamp(3.5rem, 10vw, 9rem); line-height: 1; }
.text-5xl     { font-size: 3rem;   line-height: 1; }
.text-6xl     { font-size: 3.75rem; line-height: 1; }
.text-7xl     { font-size: 4.5rem;  line-height: 1; }
.text-8xl     { font-size: 6rem;    line-height: 1; }
.text-9xl     { font-size: 8rem;    line-height: 1; }

/* Small label size */
.fs-label     { font-size: 0.625rem !important; } /* 10px */
.fs-tiny      { font-size: 0.5rem !important;   } /* 8px  */

/* -------------------------------------------------------
   5. Custom Color Utilities — Background
------------------------------------------------------- */
.bg-terrain-primary            { background-color: var(--color-primary) !important; }
.bg-surface                    { background-color: var(--color-surface) !important; }
.bg-surface-dim                { background-color: var(--color-surface-dim) !important; }
.bg-surface-variant            { background-color: var(--color-surface-variant) !important; }
.bg-surface-container-lowest   { background-color: var(--color-surface-container-lowest) !important; }
.bg-surface-container-low      { background-color: var(--color-surface-container-low) !important; }
.bg-surface-container          { background-color: var(--color-surface-container) !important; }
.bg-surface-container-high     { background-color: var(--color-surface-container-high) !important; }
.bg-surface-container-highest  { background-color: var(--color-surface-container-highest) !important; }
.bg-error-container            { background-color: var(--color-error-container) !important; }
.bg-secondary-container        { background-color: var(--color-secondary-container) !important; }

/* -------------------------------------------------------
   6. Custom Color Utilities — Text
------------------------------------------------------- */
.text-primary-brand            { color: var(--color-primary) !important; }
.text-primary-display          { color: var(--color-primary-vivid) !important; }
.text-on-surface               { color: var(--color-on-surface) !important; }
.text-on-surface-variant       { color: var(--color-on-surface-variant) !important; }
.text-on-primary               { color: var(--color-on-primary) !important; }
.text-on-primary-fixed         { color: var(--color-on-primary-fixed) !important; }
.text-secondary-brand          { color: var(--color-secondary) !important; }
.text-outline                  { color: var(--color-outline) !important; }
.text-outline-variant          { color: var(--color-outline-variant) !important; }
.text-on-error-container       { color: var(--color-on-error-container) !important; }
.text-error-brand              { color: var(--color-error) !important; }
.text-on-secondary-container   { color: var(--color-on-secondary-container) !important; }

/* -------------------------------------------------------
   7. Custom Border Utilities
------------------------------------------------------- */
.border-primary-brand   { border-color: var(--color-primary) !important; }
.border-outline         { border-color: var(--color-outline) !important; }
.border-outline-variant { border-color: var(--color-outline-variant) !important; }
.border-error-brand     { border-color: var(--color-error) !important; }
.border-surface-variant { border-color: var(--color-surface-variant) !important; }

.border-start-primary   { border-left: 4px solid var(--color-primary) !important; }
.border-start-primary-lg { border-left: 8px solid var(--color-primary) !important; }
.border-top-primary     { border-top: 4px solid var(--color-primary) !important; }
.border-top-primary-lg  { border-top: 8px solid var(--color-primary) !important; }
.border-bottom-primary  { border-bottom: 4px solid var(--color-primary) !important; }
.border-end-primary     { border-right: 8px solid var(--color-primary) !important; }

/* -------------------------------------------------------
   8. Decorative Patterns
------------------------------------------------------- */
.tire-tread {
    background-image: repeating-linear-gradient(
        45deg,
        rgba(0, 0, 0, 0.1) 0px,
        rgba(0, 0, 0, 0.1) 10px,
        transparent 10px,
        transparent 20px
    );
}

.hazard-stripe {
    background: repeating-linear-gradient(
        -45deg,
        #EA580C,
        #EA580C 10px,
        #0e0e0e 10px,
        #0e0e0e 20px
    );
}

.hazard-stripe-wide {
    background: repeating-linear-gradient(
        -45deg,
        #EA580C,
        #EA580C 20px,
        #0e0e0e 20px,
        #0e0e0e 40px
    );
}

.blueprint-grid {
    background-image: radial-gradient(rgba(234, 88, 12, 0.05) 1px, transparent 1px);
    background-size: 24px 24px;
}

.grid-overlay {
    background-image: linear-gradient(to right, #444 1px, transparent 1px),
                      linear-gradient(to bottom, #444 1px, transparent 1px);
    background-size: 40px 40px;
}

.dot-grid-overlay {
    background-image: radial-gradient(#EA580C 1px, transparent 1px);
    background-size: 40px 40px;
}

/* -------------------------------------------------------
   9. Bootstrap Scrollbar Override
------------------------------------------------------- */
::-webkit-scrollbar          { width: 4px; height: 4px; }
::-webkit-scrollbar-track    { background: var(--color-background); }
::-webkit-scrollbar-thumb    { background: var(--color-primary); }
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar                { -ms-overflow-style: none; scrollbar-width: none; }

/* -------------------------------------------------------
   10. Navigation Components
------------------------------------------------------- */
/* Top Nav */
.terrain-topnav {
    height: 4rem;                   /* 64px — mobile */
    background-color: #000000;
    border-bottom: 4px solid var(--color-primary);
}

.terrain-topnav-desktop {
    height: 5rem;                   /* 80px — desktop */
}

/* Side Nav */
.terrain-sidenav {
    width: 16rem; /* 256px */
    background-color: var(--color-surface-container-low);
    border-right: none;
    top: 5rem;
    height: calc(100vh - 5rem);
}

.terrain-sidenav-wide {
    width: 18rem; /* 288px */
}

.terrain-sidenav-collapsed {
    width: 4.5rem; /* icons only */
}

.sidenav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    font-family: var(--font-headline);
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-secondary);
    opacity: 0.7;
    text-decoration: none;
    transition: all 0.15s ease;
}

.sidenav-item:hover {
    background-color: var(--color-surface-container-highest);
    color: white;
    opacity: 1;
}

.sidenav-item.active {
    background-color: var(--color-primary);
    color: var(--color-surface-container-lowest);
    font-weight: 900;
    opacity: 1;
}

.sidenav-item.active:hover {
    background-color: var(--color-primary-dim);
}

.sidenav-item-collapsed {
    justify-content: center;
    padding: 1rem;
}

.sidenav-toggle-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    background: none;
    border: 1px solid var(--color-outline-variant);
    color: var(--color-secondary);
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.sidenav-toggle-btn:hover {
    background-color: var(--color-surface-container-highest);
    color: white;
    border-color: var(--color-primary);
}

.auth-link-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 0.75rem;
}

.auth-link-row .btn-link,
.auth-link-row a {
    font-size: 0.8125rem;
}

.password-toggle-btn {
    border-color: var(--color-outline-variant) !important;
    color: var(--color-on-surface-variant) !important;
    background: var(--color-surface-container-high) !important;
}

.password-toggle-btn:hover {
    color: var(--color-primary) !important;
}

.verification-sign {
    width: 6rem;
    height: 6rem;
    margin: 0 auto 1.5rem;
    background: var(--color-primary);
    color: var(--color-surface-container-lowest);
    clip-path: polygon(50% 0%, 100% 86%, 0% 86%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 1rem;
}

.verification-sign .material-symbols-outlined {
    font-size: 2.5rem;
}

/* -------------------------------------------------------
   Brand Intro
------------------------------------------------------- */
.brand-nav-cluster {
    gap: 2.75rem;
    min-width: 0;
}

.brand-nav-logo-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16rem;
    height: 4.5rem;
    flex: 0 0 auto;
    overflow: hidden;
    text-decoration: none;
}

.brand-nav-logo {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: 100%;
    object-fit: contain;
    filter: none;
}

.brand-nav-logo--compact {
    display: none;
}

.brand-intro {
    position: fixed;
    inset: 0;
    z-index: 4000;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 22% 44%, rgba(255, 116, 59, 0.12), transparent 18rem),
        linear-gradient(180deg, #000 0%, #050505 58%, #000 100%);
    pointer-events: all;
    overflow: hidden;
}

.brand-intro--pending {
    opacity: 1;
}

.bs-intro-skip .brand-intro--pending {
    display: none;
}

.brand-intro--done {
    opacity: 0;
    pointer-events: none;
    transition: opacity 160ms ease-out;
}

.brand-intro__stage {
    position: relative;
    width: min(78vw, 72rem);
    transform: translate3d(0, 0, 0);
}

.brand-intro__logo {
    display: block;
    width: 100%;
    height: auto;
    user-select: none;
    filter: contrast(1.08) saturate(1.15) drop-shadow(0 0 1rem rgba(255, 116, 59, 0.22));
}

.brand-intro__dust,
.brand-intro__speed-lines {
    position: absolute;
    pointer-events: none;
}

.brand-intro__dust {
    left: -18%;
    width: 138%;
    height: 16%;
    opacity: 0;
    transform: skewX(-24deg) translateX(-45%);
    background:
        linear-gradient(90deg, transparent 0%, rgba(255, 116, 59, 0.04) 18%, rgba(255, 116, 59, 0.82) 48%, rgba(255, 236, 210, 0.56) 54%, rgba(255, 116, 59, 0.1) 72%, transparent 100%);
    mix-blend-mode: screen;
    filter: blur(0.5px);
}

.brand-intro__dust--one {
    top: 56%;
}

.brand-intro__dust--two {
    top: 66%;
    height: 7%;
    background:
        linear-gradient(90deg, transparent 0%, rgba(255, 116, 59, 0.08) 24%, rgba(255, 116, 59, 0.48) 52%, transparent 82%);
}

.brand-intro__speed-lines {
    inset: auto -12% 20% auto;
    width: 50%;
    height: 34%;
    opacity: 0;
}

.brand-intro__speed-lines span {
    position: absolute;
    right: 0;
    width: 100%;
    height: 3px;
    transform: skewX(-24deg);
    background: linear-gradient(90deg, transparent, rgba(255, 116, 59, 0.88), transparent);
}

.brand-intro__speed-lines span:nth-child(1) { top: 12%; width: 74%; }
.brand-intro__speed-lines span:nth-child(2) { top: 42%; width: 100%; }
.brand-intro__speed-lines span:nth-child(3) { top: 72%; width: 58%; }

.brand-intro--run .brand-intro__logo {
    animation: brand-logo-collapse 1350ms cubic-bezier(0.16, 0.84, 0.22, 1) forwards;
}

.brand-intro--run .brand-intro__dust--one {
    animation: brand-dust-sweep 780ms 260ms cubic-bezier(0.18, 0.74, 0.22, 1) forwards;
}

.brand-intro--run .brand-intro__dust--two {
    animation: brand-dust-sweep 640ms 360ms cubic-bezier(0.18, 0.74, 0.22, 1) forwards;
}

.brand-intro--run .brand-intro__speed-lines {
    animation: brand-speed-lines 760ms 380ms ease-out forwards;
}

@keyframes brand-logo-collapse {
    0% {
        opacity: 0;
        transform: translate3d(0, 0.75rem, 0) scale(0.96);
        filter: blur(2px) contrast(1.3) saturate(1.4);
    }
    12% {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1.025);
        filter: blur(0) contrast(1.14) saturate(1.24) drop-shadow(0 0 1.3rem rgba(255, 116, 59, 0.32));
    }
    58% {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
    }
    100% {
        opacity: 1;
        transform: translate3d(calc(-50vw + 9.5rem), calc(-50vh + 3.25rem), 0) scale(0.25);
        filter: contrast(1.12) saturate(1.18) drop-shadow(0 0 0.45rem rgba(255, 116, 59, 0.42));
    }
}

@keyframes brand-dust-sweep {
    0% {
        opacity: 0;
        transform: skewX(-24deg) translateX(-45%);
    }
    18% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: skewX(-24deg) translateX(58%);
    }
}

@keyframes brand-speed-lines {
    0% {
        opacity: 0;
        transform: translateX(32%);
    }
    30% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translateX(-24%);
    }
}

@media (max-width: 991.98px) {
    .brand-nav-cluster {
        gap: 2rem;
    }

    .brand-nav-logo-link {
        width: 13.5rem;
        height: 3.875rem;
    }
}

@media (max-width: 767.98px) {
    .brand-nav-cluster {
        gap: 1.25rem;
    }

    .brand-nav-logo-link {
        width: 4rem;
        height: 3rem;
    }

    .brand-nav-logo--full {
        display: none;
    }

    .brand-nav-logo--compact {
        display: block;
    }

    .brand-intro__stage {
        width: min(90vw, 38rem);
    }

    @keyframes brand-logo-collapse {
        0% {
            opacity: 0;
            transform: translate3d(0, 0.75rem, 0) scale(0.96);
            filter: blur(2px) contrast(1.3) saturate(1.4);
        }
        12% {
            opacity: 1;
            transform: translate3d(0, 0, 0) scale(1.025);
            filter: blur(0) contrast(1.14) saturate(1.24) drop-shadow(0 0 1.3rem rgba(255, 116, 59, 0.32));
        }
        58% {
            opacity: 1;
            transform: translate3d(0, 0, 0) scale(1);
        }
        100% {
            opacity: 1;
            transform: translate3d(calc(-50vw + 5.25rem), calc(-50vh + 2.8rem), 0) scale(0.12);
            filter: contrast(1.12) saturate(1.18) drop-shadow(0 0 0.45rem rgba(255, 116, 59, 0.42));
        }
    }
}

@media (prefers-reduced-motion: reduce) {
    .brand-intro {
        display: none !important;
    }

    .brand-intro *,
    .brand-intro *::before,
    .brand-intro *::after {
        animation: none !important;
        transition: none !important;
    }
}

/* Bottom Nav (Mobile) */
.terrain-bottom-nav {
    height: 4rem;
    background-color: #000000;
    border-top: 2px solid #262626;
}

.terrain-bottom-nav .nav-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    color: rgba(255,255,255,0.4);
    text-decoration: none;
    font-family: var(--font-body);
    font-weight: 900;
    font-size: 0.625rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    gap: 0.2rem;
    transition: all 0.1s;
}

.terrain-bottom-nav .nav-tab:hover {
    background-color: rgba(255,255,255,0.05);
}

.terrain-bottom-nav .nav-tab.active {
    background-color: var(--color-primary);
    color: var(--color-surface-container-lowest);
}

/* -------------------------------------------------------
   11. Spot Card Component
------------------------------------------------------- */
.spot-card {
    background-color: var(--color-surface-container-high);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.2s ease;
}

.spot-card:hover .spot-card-img { transform: scale(1.1); }
.spot-card-img { transition: transform 0.5s ease; }
.spot-card-body { border-left: 8px solid var(--color-primary-vivid); }
.spot-card-body.unverified { border-left-color: var(--color-surface-variant); }
.spot-card-arrow {
    opacity: 0;
    transition: opacity 0.2s;
}
.spot-card:hover .spot-card-arrow { opacity: 1; }

/* -------------------------------------------------------
   12. Verified Badge
------------------------------------------------------- */
.verified-badge {
    background-color: var(--color-primary-vivid);
    color: var(--color-on-primary-fixed);
    padding: 0.25rem 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.6875rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

/* -------------------------------------------------------
   13. Map Component
------------------------------------------------------- */
.map-container {
    position: relative;
    overflow: hidden;
}

.map-search-bar {
    background-color: rgba(38, 38, 38, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 2px solid var(--color-primary);
    display: flex;
    align-items: center;
    padding: 0.5rem;
}

.map-search-bar input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--color-on-surface);
    font-family: var(--font-body);
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    width: 100%;
}

.map-search-bar input::placeholder { color: var(--color-outline); }

.leaflet-tile-pane {
    filter: brightness(0.72) saturate(0.8) contrast(1.1);
}

/* -------------------------------------------------------
   14. Forms / Inputs
------------------------------------------------------- */
.terrain-input {
    background-color: var(--color-surface-container-high);
    border: none;
    border-bottom: 2px solid var(--color-primary);
    color: var(--color-on-surface);
    padding: 1rem;
    font-family: var(--font-headline);
    font-weight: 700;
    width: 100%;
    outline: none;
    transition: background-color 0.15s;
}

.terrain-input:focus {
    background-color: var(--color-surface-container-highest);
    border-bottom-color: var(--color-primary);
    box-shadow: none;
}

.terrain-input::placeholder { color: var(--color-outline-variant); }

.terrain-select {
    background-color: var(--color-surface-container-high);
    border: none;
    border-bottom: 2px solid var(--color-outline-variant);
    color: var(--color-on-surface);
    padding: 0.75rem 1rem;
    font-family: var(--font-body);
    width: 100%;
    outline: none;
    appearance: none;
    transition: border-color 0.15s;
}

.terrain-select:focus { border-bottom-color: var(--color-primary); }

.terrain-textarea {
    background-color: var(--color-surface-container-high);
    border: none;
    border-bottom: 2px solid var(--color-outline-variant);
    color: var(--color-on-surface);
    padding: 1rem;
    font-family: var(--font-body);
    width: 100%;
    outline: none;
    resize: none;
    transition: border-color 0.15s;
}

.terrain-textarea:focus { border-bottom-color: var(--color-primary); }

input[type="range"].terrain-range {
    accent-color: var(--color-primary);
    cursor: pointer;
}

/* -------------------------------------------------------
   15. Buttons
------------------------------------------------------- */
.btn-terrain-primary {
    background-color: var(--color-primary-vivid);
    color: var(--color-on-primary-fixed);
    border: none;
    font-family: var(--font-headline);
    font-weight: 900;
    font-size: 1rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.875rem 2rem;
    transition: all 0.1s;
    position: relative;
    overflow: hidden;
}

.btn-terrain-primary::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: repeating-linear-gradient(
        45deg, rgba(0,0,0,0.15) 0px, rgba(0,0,0,0.15) 10px,
        transparent 10px, transparent 20px
    );
    opacity: 1;
    transition: opacity 0.1s;
}

.btn-terrain-primary:hover::after { opacity: 0.4; }

.btn-terrain-primary:hover {
    background-color: var(--color-on-surface);
    color: var(--color-primary-vivid);
}

.btn-terrain-primary:active { transform: scale(0.95); }

.btn-terrain-outline {
    background: transparent;
    border: 2px solid var(--color-outline);
    color: var(--color-on-surface);
    font-family: var(--font-headline);
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.875rem 2rem;
    transition: all 0.15s;
}

.btn-terrain-outline:hover {
    background-color: var(--color-surface-container-high);
    color: var(--color-on-surface);
    border-color: var(--color-outline);
}

.btn-terrain-ghost {
    background-color: var(--color-surface-container-highest);
    color: var(--color-on-surface);
    border: 1px solid var(--color-outline-variant);
    padding: 0.75rem;
    transition: all 0.15s;
}

.btn-terrain-ghost:hover {
    background-color: var(--color-primary);
    color: var(--color-on-primary-fixed);
}

/* -------------------------------------------------------
   16. Leaderboard Rows
------------------------------------------------------- */
.leaderboard-row {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background-color: var(--color-surface-container-high);
    transition: background-color 0.15s;
}

.leaderboard-row:hover { background-color: var(--color-surface-container); }

/* -------------------------------------------------------
   17. Progress Bar Terrain Style
------------------------------------------------------- */
.terrain-progress {
    height: 1rem;
    background-color: var(--color-surface-container);
    position: relative;
    overflow: hidden;
}

.terrain-progress-bar {
    height: 100%;
    background-color: var(--color-primary);
    position: relative;
    overflow: hidden;
}

.terrain-progress-bar::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: repeating-linear-gradient(
        45deg, rgba(0,0,0,0.1) 0px, rgba(0,0,0,0.1) 10px,
        transparent 10px, transparent 20px
    );
    opacity: 0.3;
}

.terrain-progress-bar.danger { background-color: var(--color-error); }
.terrain-progress-bar.neutral { background-color: var(--color-secondary); }

/* -------------------------------------------------------
   18. Step Indicator (Add Spot wizard)
------------------------------------------------------- */
.step-indicator {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
}

.step-indicator.active {
    background-color: var(--color-primary);
    color: var(--color-surface-container-lowest);
}

.step-indicator.inactive {
    background-color: var(--color-surface-container-highest);
    color: var(--color-on-surface-variant);
    opacity: 0.5;
}

/* -------------------------------------------------------
   19. Stats / Data blocks
------------------------------------------------------- */
.stat-block {
    background-color: var(--color-surface-container-highest);
    padding: 1rem 1.5rem;
    border-left: 8px solid var(--color-primary);
    display: flex;
    flex-direction: column;
}

.stat-block-label {
    font-family: var(--font-body);
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-on-surface-variant);
}

.stat-block-value {
    font-family: var(--font-headline);
    font-size: 1.875rem;
    font-weight: 900;
    color: var(--color-secondary);
}

/* -------------------------------------------------------
   20. Map Pin Markers
------------------------------------------------------- */
.scan-marker-icon {
    background: transparent;
    border: 0;
}

.scan-marker {
    --scan-marker-size: 22px;
    --scan-marker-orange: var(--color-primary);
    position: relative;
    width: 44px;
    height: 44px;
    transform: translateZ(0);
    transition: transform 160ms ease, opacity 160ms ease;
    will-change: transform;
}

.scan-marker-icon:hover .scan-marker {
    transform: translateZ(0) scale(1.08);
}

.scan-marker-icon.is-selected .scan-marker {
    transform: translateZ(0) scale(1.12);
}

.scan-marker .pulse,
.scan-marker .marker-glow,
.scan-marker .marker-core {
    position: absolute;
    top: 50%;
    left: 50%;
    pointer-events: none;
}

.scan-marker .pulse {
    width: var(--scan-marker-size);
    height: var(--scan-marker-size);
    border: 1px solid rgba(255, 144, 101, 0.68);
    border-radius: 50%;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.75);
    animation: scan-marker-pulse 2.8s cubic-bezier(0.19, 1, 0.22, 1) infinite;
    will-change: transform, opacity;
}

.scan-marker .pulse-2 {
    animation-delay: 1.25s;
    border-color: rgba(234, 88, 12, 0.5);
}

.scan-marker .marker-glow {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 144, 101, 0.28) 0%, rgba(234, 88, 12, 0.12) 38%, rgba(234, 88, 12, 0) 72%);
    transform: translate(-50%, -50%);
    opacity: 0.82;
}

.scan-marker .marker-core {
    width: var(--scan-marker-size);
    height: var(--scan-marker-size);
    display: grid;
    place-items: center;
    background:
        linear-gradient(135deg, rgba(255,255,255,0.18), rgba(255,255,255,0) 42%),
        var(--scan-marker-orange);
    border: 1px solid rgba(255,255,255,0.72);
    box-shadow: 0 0 0 2px rgba(0,0,0,0.72), 0 3px 10px rgba(0,0,0,0.5);
    clip-path: polygon(50% 0, 92% 28%, 92% 72%, 50% 100%, 8% 72%, 8% 28%);
    transform: translate(-50%, -50%);
}

.scan-marker .marker-core::before,
.scan-marker .marker-core::after {
    content: '';
    position: absolute;
    background: rgba(0,0,0,0.58);
}

.scan-marker .marker-core::before {
    width: 13px;
    height: 1px;
}

.scan-marker .marker-core::after {
    width: 1px;
    height: 13px;
}

.scan-marker .marker-core-dot {
    width: 5px;
    height: 5px;
    z-index: 1;
    border-radius: 50%;
    background: #fff7ed;
    box-shadow: 0 0 5px rgba(255,255,255,0.75);
}

.scan-marker-icon.is-selected .pulse {
    border-color: rgba(255, 144, 101, 0.9);
    animation-duration: 2.2s;
}

.scan-marker-icon.is-selected .marker-core {
    background:
        linear-gradient(135deg, rgba(255,255,255,0.22), rgba(255,255,255,0) 42%),
        #ff6a1a;
    box-shadow: 0 0 0 2px rgba(0,0,0,0.78), 0 0 14px rgba(234, 88, 12, 0.52);
}

@keyframes scan-marker-pulse {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.75);
    }
    18% {
        opacity: 0.5;
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(2.15);
    }
}

@media (prefers-reduced-motion: reduce) {
    .scan-marker,
    .scan-marker .pulse {
        animation: none;
        transition: none;
    }

    .scan-marker .pulse {
        opacity: 0.22;
        transform: translate(-50%, -50%) scale(1.35);
    }
}

/* -------------------------------------------------------
   21. Hero Section
------------------------------------------------------- */
.hero-section {
    position: relative;
    overflow: hidden;
}

.hero-gradient-lr {
    background: linear-gradient(to right, var(--color-background) 0%, rgba(14,14,14,0.6) 40%, transparent 100%);
}

.hero-gradient-t {
    background: linear-gradient(to top, var(--color-background) 0%, rgba(14,14,14,0.4) 50%, transparent 100%);
}

/* -------------------------------------------------------
   22. Gallery Grid
------------------------------------------------------- */
.gallery-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.gallery-item img {
    filter: grayscale(1);
    transition: filter 0.3s ease;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-item:hover img { filter: grayscale(0); }

/* -------------------------------------------------------
   23. Upload Zone
------------------------------------------------------- */
.upload-zone {
    border: 4px dashed var(--color-outline-variant);
    padding: 3rem;
    text-align: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: border-color 0.2s;
}

.upload-zone:hover { border-color: var(--color-primary); }
.upload-zone:hover .upload-icon { color: var(--color-primary); }

.upload-icon {
    color: var(--color-outline-variant);
    font-size: 4rem;
    transition: color 0.2s;
    display: block;
    margin-bottom: 1rem;
}

/* -------------------------------------------------------
   24. Live Feed / Activity Log
------------------------------------------------------- */
.activity-item {
    border-left: 2px solid var(--color-surface-variant);
    padding-left: 1rem;
}

.activity-item.highlight { border-left-color: var(--color-primary); }

.activity-time {
    font-family: monospace;
    font-size: 0.7rem;
    color: var(--color-outline);
    margin-bottom: 0.2rem;
}

/* -------------------------------------------------------
   25. Rig / Vehicle Cards
------------------------------------------------------- */
.rig-card {
    background-color: var(--color-surface-container-low);
    overflow: hidden;
    border-top: 4px solid transparent;
    transition: border-color 0.2s;
}

.rig-card:hover { border-top-color: var(--color-primary); }
.rig-card:hover .rig-card-img { filter: grayscale(0); }

.rig-card-img {
    filter: grayscale(1);
    transition: filter 0.5s ease;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* -------------------------------------------------------
   26. Overlay / Tactical UI Decorations
------------------------------------------------------- */
.coordinate-display {
    background-color: rgba(0,0,0,0.92);
    border-left: 4px solid var(--color-primary);
    padding: 1rem 1.25rem;
    backdrop-filter: blur(16px);
}

.live-feed-panel {
    background-color: rgba(0,0,0,0.92);
    border-top: 4px solid var(--color-primary);
    backdrop-filter: blur(16px);
    min-width: 17rem;
}

/* -------------------------------------------------------
   27. Page Layout Helpers
------------------------------------------------------- */
.content-with-sidenav           { margin-left: 16rem; }
.content-with-sidenav-wide      { margin-left: 18rem; }
.content-with-sidenav-collapsed { margin-left: 4.5rem; }

@media (max-width: 767.98px) {
    .content-with-sidenav,
    .content-with-sidenav-wide,
    .content-with-sidenav-collapsed { margin-left: 0; }
}

.page-pt { padding-top: 5rem; }       /* desktop top nav */
.page-pt-mobile { padding-top: 4rem; } /* mobile top bar  */

/* -------------------------------------------------------
   28. Filter Sidebar (Retractable)
------------------------------------------------------- */
.filter-sidebar {
    width: 3.5rem;
    transition: width 0.3s ease;
    overflow: hidden;
    border-right: 4px solid rgba(255,144,101,0.2);
}

.filter-sidebar:hover { width: 12rem; }

.filter-sidebar-label {
    opacity: 0;
    transition: opacity 0.2s;
    white-space: nowrap;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.filter-sidebar:hover .filter-sidebar-label { opacity: 1; }

/* -------------------------------------------------------
   29. Bento Grid
------------------------------------------------------- */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

@media (max-width: 767.98px) {
    .bento-grid { grid-template-columns: 1fr; }
}

/* -------------------------------------------------------
   30. Selection
------------------------------------------------------- */
::selection {
    background-color: var(--color-primary);
    color: var(--color-on-primary-fixed);
}

/* -------------------------------------------------------
   31. RC Wheel Spinner
------------------------------------------------------- */
.rc-wheel {
    display: inline-block;
    width: 2.5rem;
    height: 2.5rem;
    position: relative;
    animation: rc-wheel-spin 0.8s linear infinite;
}

.rc-wheel-sm {
    width: 1.25rem;
    height: 1.25rem;
}

.rc-wheel::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 3px solid var(--color-surface-container-high);
    border-top-color: var(--color-primary);
    border-right-color: var(--color-primary);
}

.rc-wheel::after {
    content: '';
    position: absolute;
    inset: 20%;
    border-radius: 50%;
    background-color: var(--color-surface-container-high);
    border: 2px solid var(--color-primary);
    box-shadow: 0 0 0 2px var(--color-surface-container-high);
}

.rc-wheel-sm::before {
    border-width: 2px;
}

.rc-wheel-sm::after {
    inset: 22%;
    border-width: 1.5px;
}

@keyframes rc-wheel-spin {
    to { transform: rotate(360deg); }
}

/* ── Map: You Are Here marker ─────────────────────────────── */
.user-location-marker {
    position: relative;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-pulse {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid var(--color-primary);
    animation: user-ping 1.5s ease-out infinite;
    opacity: 0;
}

.user-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--color-primary);
    border: 3px solid #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 3px rgba(234,88,12,0.3);
    z-index: 1;
}

.user-dot span {
    font-size: 0.45rem;
    font-weight: 900;
    color: #fff;
    font-family: var(--font-headline);
    letter-spacing: 0.05em;
    line-height: 1;
}

@keyframes user-ping {
    0%   { transform: scale(0.8); opacity: 0.8; }
    100% { transform: scale(2);   opacity: 0;   }
}

/* ── Map: address search result marker ────────────────────── */
.search-result-marker {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    width: 36px;
    height: 36px;
}

.search-result-marker .material-symbols-outlined {
    font-size: 2.25rem;
    color: #fff;
    -webkit-text-stroke: 1px var(--color-primary);
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.6));
}

.about-page-gutter {
    padding-left: clamp(4rem, 6vw, 7rem) !important;
    padding-right: clamp(2rem, 5vw, 6rem) !important;
}

@media (max-width: 767.98px) {
    .about-page-gutter {
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
    }
}

/* ── Mobile Drawer ─────────────────────────────────────────────────────────── */
.mobile-drawer {
    width: 16rem;
    top: 5rem;
    height: calc(100vh - 5rem);
    background-color: var(--color-surface-container-low);
    border-right: 2px solid rgba(255, 144, 101, 0.3);
    animation: drawer-slide-in 0.2s ease-out;
}

.mobile-drawer-backdrop {
    position: fixed;
    top: 5rem;
    right: 0;
    bottom: 0;
    left: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1049;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

@keyframes drawer-slide-in {
    from { transform: translateX(-100%); }
    to   { transform: translateX(0); }
}
